objective categorical abstract machine language personal data server
65
fork

Configure Feed

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

Update lexicons

futurGH 8ec718a4 a1cc895a

+5837 -4451
+40 -121
pegasus/lexicons/app_bsky_actor_defs.ml
··· 1 1 (* re-exported from App_bsky_shared_1 *) 2 2 3 3 type profile_view_basic = App_bsky_shared_1.profile_view_basic 4 - 5 - let profile_view_basic_of_yojson = 6 - App_bsky_shared_1.profile_view_basic_of_yojson 7 - 8 - let profile_view_basic_to_yojson = 9 - App_bsky_shared_1.profile_view_basic_to_yojson 4 + let profile_view_basic_of_yojson = App_bsky_shared_1.profile_view_basic_of_yojson 5 + let profile_view_basic_to_yojson = App_bsky_shared_1.profile_view_basic_to_yojson 10 6 11 7 type profile_view = App_bsky_shared_1.profile_view 12 - 13 8 let profile_view_of_yojson = App_bsky_shared_1.profile_view_of_yojson 14 - 15 9 let profile_view_to_yojson = App_bsky_shared_1.profile_view_to_yojson 16 10 17 11 type profile_view_detailed = App_bsky_shared_1.profile_view_detailed 18 - 19 - let profile_view_detailed_of_yojson = 20 - App_bsky_shared_1.profile_view_detailed_of_yojson 21 - 22 - let profile_view_detailed_to_yojson = 23 - App_bsky_shared_1.profile_view_detailed_to_yojson 12 + let profile_view_detailed_of_yojson = App_bsky_shared_1.profile_view_detailed_of_yojson 13 + let profile_view_detailed_to_yojson = App_bsky_shared_1.profile_view_detailed_to_yojson 24 14 25 15 type profile_associated = App_bsky_shared_1.profile_associated 26 - 27 - let profile_associated_of_yojson = 28 - App_bsky_shared_1.profile_associated_of_yojson 29 - 30 - let profile_associated_to_yojson = 31 - App_bsky_shared_1.profile_associated_to_yojson 16 + let profile_associated_of_yojson = App_bsky_shared_1.profile_associated_of_yojson 17 + let profile_associated_to_yojson = App_bsky_shared_1.profile_associated_to_yojson 32 18 33 19 type profile_associated_chat = App_bsky_shared_1.profile_associated_chat 34 - 35 - let profile_associated_chat_of_yojson = 36 - App_bsky_shared_1.profile_associated_chat_of_yojson 20 + let profile_associated_chat_of_yojson = App_bsky_shared_1.profile_associated_chat_of_yojson 21 + let profile_associated_chat_to_yojson = App_bsky_shared_1.profile_associated_chat_to_yojson 37 22 38 - let profile_associated_chat_to_yojson = 39 - App_bsky_shared_1.profile_associated_chat_to_yojson 23 + type profile_associated_germ = App_bsky_shared_1.profile_associated_germ 24 + let profile_associated_germ_of_yojson = App_bsky_shared_1.profile_associated_germ_of_yojson 25 + let profile_associated_germ_to_yojson = App_bsky_shared_1.profile_associated_germ_to_yojson 40 26 41 - type profile_associated_activity_subscription = 42 - App_bsky_shared_1.profile_associated_activity_subscription 43 - 44 - let profile_associated_activity_subscription_of_yojson = 45 - App_bsky_shared_1.profile_associated_activity_subscription_of_yojson 46 - 47 - let profile_associated_activity_subscription_to_yojson = 48 - App_bsky_shared_1.profile_associated_activity_subscription_to_yojson 27 + type profile_associated_activity_subscription = App_bsky_shared_1.profile_associated_activity_subscription 28 + let profile_associated_activity_subscription_of_yojson = App_bsky_shared_1.profile_associated_activity_subscription_of_yojson 29 + let profile_associated_activity_subscription_to_yojson = App_bsky_shared_1.profile_associated_activity_subscription_to_yojson 49 30 50 31 type viewer_state = App_bsky_shared_1.actor_viewer_state 51 - 52 32 let viewer_state_of_yojson = App_bsky_shared_1.actor_viewer_state_of_yojson 53 - 54 33 let viewer_state_to_yojson = App_bsky_shared_1.actor_viewer_state_to_yojson 55 34 56 35 type known_followers = App_bsky_shared_1.known_followers 57 - 58 36 let known_followers_of_yojson = App_bsky_shared_1.known_followers_of_yojson 59 - 60 37 let known_followers_to_yojson = App_bsky_shared_1.known_followers_to_yojson 61 38 62 39 type verification_state = App_bsky_shared_1.verification_state 63 - 64 - let verification_state_of_yojson = 65 - App_bsky_shared_1.verification_state_of_yojson 66 - 67 - let verification_state_to_yojson = 68 - App_bsky_shared_1.verification_state_to_yojson 40 + let verification_state_of_yojson = App_bsky_shared_1.verification_state_of_yojson 41 + let verification_state_to_yojson = App_bsky_shared_1.verification_state_to_yojson 69 42 70 43 type verification_view = App_bsky_shared_1.verification_view 71 - 72 44 let verification_view_of_yojson = App_bsky_shared_1.verification_view_of_yojson 73 - 74 45 let verification_view_to_yojson = App_bsky_shared_1.verification_view_to_yojson 75 46 76 47 type preferences = App_bsky_shared_1.preferences 77 - 78 48 let preferences_of_yojson = App_bsky_shared_1.preferences_of_yojson 79 - 80 49 let preferences_to_yojson = App_bsky_shared_1.preferences_to_yojson 81 50 82 51 type adult_content_pref = App_bsky_shared_1.adult_content_pref 83 - 84 - let adult_content_pref_of_yojson = 85 - App_bsky_shared_1.adult_content_pref_of_yojson 86 - 87 - let adult_content_pref_to_yojson = 88 - App_bsky_shared_1.adult_content_pref_to_yojson 52 + let adult_content_pref_of_yojson = App_bsky_shared_1.adult_content_pref_of_yojson 53 + let adult_content_pref_to_yojson = App_bsky_shared_1.adult_content_pref_to_yojson 89 54 90 55 type content_label_pref = App_bsky_shared_1.content_label_pref 91 - 92 - let content_label_pref_of_yojson = 93 - App_bsky_shared_1.content_label_pref_of_yojson 94 - 95 - let content_label_pref_to_yojson = 96 - App_bsky_shared_1.content_label_pref_to_yojson 56 + let content_label_pref_of_yojson = App_bsky_shared_1.content_label_pref_of_yojson 57 + let content_label_pref_to_yojson = App_bsky_shared_1.content_label_pref_to_yojson 97 58 98 59 type saved_feed = App_bsky_shared_1.saved_feed 99 - 100 60 let saved_feed_of_yojson = App_bsky_shared_1.saved_feed_of_yojson 101 - 102 61 let saved_feed_to_yojson = App_bsky_shared_1.saved_feed_to_yojson 103 62 104 63 type saved_feeds_pref_v2 = App_bsky_shared_1.saved_feeds_pref_v2 105 - 106 - let saved_feeds_pref_v2_of_yojson = 107 - App_bsky_shared_1.saved_feeds_pref_v2_of_yojson 108 - 109 - let saved_feeds_pref_v2_to_yojson = 110 - App_bsky_shared_1.saved_feeds_pref_v2_to_yojson 64 + let saved_feeds_pref_v2_of_yojson = App_bsky_shared_1.saved_feeds_pref_v2_of_yojson 65 + let saved_feeds_pref_v2_to_yojson = App_bsky_shared_1.saved_feeds_pref_v2_to_yojson 111 66 112 67 type saved_feeds_pref = App_bsky_shared_1.saved_feeds_pref 113 - 114 68 let saved_feeds_pref_of_yojson = App_bsky_shared_1.saved_feeds_pref_of_yojson 115 - 116 69 let saved_feeds_pref_to_yojson = App_bsky_shared_1.saved_feeds_pref_to_yojson 117 70 118 71 type personal_details_pref = App_bsky_shared_1.personal_details_pref 119 - 120 - let personal_details_pref_of_yojson = 121 - App_bsky_shared_1.personal_details_pref_of_yojson 72 + let personal_details_pref_of_yojson = App_bsky_shared_1.personal_details_pref_of_yojson 73 + let personal_details_pref_to_yojson = App_bsky_shared_1.personal_details_pref_to_yojson 122 74 123 - let personal_details_pref_to_yojson = 124 - App_bsky_shared_1.personal_details_pref_to_yojson 75 + type declared_age_pref = App_bsky_shared_1.declared_age_pref 76 + let declared_age_pref_of_yojson = App_bsky_shared_1.declared_age_pref_of_yojson 77 + let declared_age_pref_to_yojson = App_bsky_shared_1.declared_age_pref_to_yojson 125 78 126 79 type feed_view_pref = App_bsky_shared_1.feed_view_pref 127 - 128 80 let feed_view_pref_of_yojson = App_bsky_shared_1.feed_view_pref_of_yojson 129 - 130 81 let feed_view_pref_to_yojson = App_bsky_shared_1.feed_view_pref_to_yojson 131 82 132 83 type thread_view_pref = App_bsky_shared_1.thread_view_pref 133 - 134 84 let thread_view_pref_of_yojson = App_bsky_shared_1.thread_view_pref_of_yojson 135 - 136 85 let thread_view_pref_to_yojson = App_bsky_shared_1.thread_view_pref_to_yojson 137 86 138 87 type interests_pref = App_bsky_shared_1.interests_pref 139 - 140 88 let interests_pref_of_yojson = App_bsky_shared_1.interests_pref_of_yojson 141 - 142 89 let interests_pref_to_yojson = App_bsky_shared_1.interests_pref_to_yojson 143 90 144 91 type muted_word_target = App_bsky_shared_1.muted_word_target 145 - 146 92 let muted_word_target_of_yojson = App_bsky_shared_1.muted_word_target_of_yojson 147 - 148 93 let muted_word_target_to_yojson = App_bsky_shared_1.muted_word_target_to_yojson 149 94 150 95 type muted_word = App_bsky_shared_1.muted_word 151 - 152 96 let muted_word_of_yojson = App_bsky_shared_1.muted_word_of_yojson 153 - 154 97 let muted_word_to_yojson = App_bsky_shared_1.muted_word_to_yojson 155 98 156 99 type muted_words_pref = App_bsky_shared_1.muted_words_pref 157 - 158 100 let muted_words_pref_of_yojson = App_bsky_shared_1.muted_words_pref_of_yojson 159 - 160 101 let muted_words_pref_to_yojson = App_bsky_shared_1.muted_words_pref_to_yojson 161 102 162 103 type hidden_posts_pref = App_bsky_shared_1.hidden_posts_pref 163 - 164 104 let hidden_posts_pref_of_yojson = App_bsky_shared_1.hidden_posts_pref_of_yojson 165 - 166 105 let hidden_posts_pref_to_yojson = App_bsky_shared_1.hidden_posts_pref_to_yojson 167 106 168 107 type labelers_pref = App_bsky_shared_1.labelers_pref 169 - 170 108 let labelers_pref_of_yojson = App_bsky_shared_1.labelers_pref_of_yojson 171 - 172 109 let labelers_pref_to_yojson = App_bsky_shared_1.labelers_pref_to_yojson 173 110 174 111 type labeler_pref_item = App_bsky_shared_1.labeler_pref_item 175 - 176 112 let labeler_pref_item_of_yojson = App_bsky_shared_1.labeler_pref_item_of_yojson 177 - 178 113 let labeler_pref_item_to_yojson = App_bsky_shared_1.labeler_pref_item_to_yojson 179 114 180 115 type bsky_app_state_pref = App_bsky_shared_1.bsky_app_state_pref 181 - 182 - let bsky_app_state_pref_of_yojson = 183 - App_bsky_shared_1.bsky_app_state_pref_of_yojson 184 - 185 - let bsky_app_state_pref_to_yojson = 186 - App_bsky_shared_1.bsky_app_state_pref_to_yojson 116 + let bsky_app_state_pref_of_yojson = App_bsky_shared_1.bsky_app_state_pref_of_yojson 117 + let bsky_app_state_pref_to_yojson = App_bsky_shared_1.bsky_app_state_pref_to_yojson 187 118 188 119 type bsky_app_progress_guide = App_bsky_shared_1.bsky_app_progress_guide 189 - 190 - let bsky_app_progress_guide_of_yojson = 191 - App_bsky_shared_1.bsky_app_progress_guide_of_yojson 192 - 193 - let bsky_app_progress_guide_to_yojson = 194 - App_bsky_shared_1.bsky_app_progress_guide_to_yojson 120 + let bsky_app_progress_guide_of_yojson = App_bsky_shared_1.bsky_app_progress_guide_of_yojson 121 + let bsky_app_progress_guide_to_yojson = App_bsky_shared_1.bsky_app_progress_guide_to_yojson 195 122 196 123 type nux = App_bsky_shared_1.nux 197 - 198 124 let nux_of_yojson = App_bsky_shared_1.nux_of_yojson 199 - 200 125 let nux_to_yojson = App_bsky_shared_1.nux_to_yojson 201 126 202 127 type verification_prefs = App_bsky_shared_1.verification_prefs 203 - 204 - let verification_prefs_of_yojson = 205 - App_bsky_shared_1.verification_prefs_of_yojson 206 - 207 - let verification_prefs_to_yojson = 208 - App_bsky_shared_1.verification_prefs_to_yojson 209 - 210 - type post_interaction_settings_pref = 211 - App_bsky_shared_1.post_interaction_settings_pref 128 + let verification_prefs_of_yojson = App_bsky_shared_1.verification_prefs_of_yojson 129 + let verification_prefs_to_yojson = App_bsky_shared_1.verification_prefs_to_yojson 212 130 213 - let post_interaction_settings_pref_of_yojson = 214 - App_bsky_shared_1.post_interaction_settings_pref_of_yojson 131 + type live_event_preferences = App_bsky_shared_1.live_event_preferences 132 + let live_event_preferences_of_yojson = App_bsky_shared_1.live_event_preferences_of_yojson 133 + let live_event_preferences_to_yojson = App_bsky_shared_1.live_event_preferences_to_yojson 215 134 216 - let post_interaction_settings_pref_to_yojson = 217 - App_bsky_shared_1.post_interaction_settings_pref_to_yojson 135 + type post_interaction_settings_pref = App_bsky_shared_1.post_interaction_settings_pref 136 + let post_interaction_settings_pref_of_yojson = App_bsky_shared_1.post_interaction_settings_pref_of_yojson 137 + let post_interaction_settings_pref_to_yojson = App_bsky_shared_1.post_interaction_settings_pref_to_yojson 218 138 219 139 type status_view = App_bsky_shared_1.status_view 220 - 221 140 let status_view_of_yojson = App_bsky_shared_1.status_view_of_yojson 222 - 223 141 let status_view_to_yojson = App_bsky_shared_1.status_view_to_yojson 142 +
+8 -4
pegasus/lexicons/app_bsky_actor_getPreferences.ml
··· 5 5 let nsid = "app.bsky.actor.getPreferences" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type output = {preferences: App_bsky_actor_defs.preferences} 12 - [@@deriving yojson {strict= false}] 10 + type output = 11 + { 12 + preferences: App_bsky_actor_defs.preferences; 13 + } 14 + [@@deriving yojson {strict= false}] 13 15 14 - let call (client : Hermes.client) : output Lwt.t = 16 + let call 17 + (client : Hermes.client) : output Lwt.t = 15 18 Hermes.query client nsid (`Assoc []) output_of_yojson 16 19 end 20 +
+10 -3
pegasus/lexicons/app_bsky_actor_getProfile.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.actor.getProfile" 6 6 7 - type params = {actor: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + actor: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = App_bsky_actor_defs.profile_view_detailed 10 - [@@deriving yojson {strict= false}] 14 + [@@deriving yojson {strict= false}] 11 15 12 - let call ~actor (client : Hermes.client) : output Lwt.t = 16 + let call 17 + ~actor 18 + (client : Hermes.client) : output Lwt.t = 13 19 let params : params = {actor} in 14 20 Hermes.query client nsid (params_to_yojson params) output_of_yojson 15 21 end 22 +
+13 -7
pegasus/lexicons/app_bsky_actor_getProfiles.ml
··· 5 5 let nsid = "app.bsky.actor.getProfiles" 6 6 7 7 type params = 8 - { actors: string list 9 - [@of_yojson Hermes_util.query_string_list_of_yojson] 10 - [@to_yojson Hermes_util.query_string_list_to_yojson] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actors: string list; 10 + } 11 + [@@xrpc_query] 12 12 13 - type output = {profiles: App_bsky_actor_defs.profile_view_detailed list} 14 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + profiles: App_bsky_actor_defs.profile_view_detailed list; 16 + } 17 + [@@deriving yojson {strict= false}] 15 18 16 - let call ~actors (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~actors 21 + (client : Hermes.client) : output Lwt.t = 17 22 let params : params = {actors} in 18 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 24 end 25 +
+17 -7
pegasus/lexicons/app_bsky_actor_getSuggestions.ml
··· 5 5 let nsid = "app.bsky.actor.getSuggestions" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; actors: App_bsky_actor_defs.profile_view list 14 - ; rec_id: int option [@key "recId"] [@default None] } 15 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + actors: App_bsky_actor_defs.profile_view list; 18 + rec_id: int option [@key "recId"] [@default None]; 19 + rec_id_str: string option [@key "recIdStr"] [@default None]; 20 + } 21 + [@@deriving yojson {strict= false}] 16 22 17 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 18 27 let params : params = {limit; cursor} in 19 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 20 29 end 30 +
+23 -26
pegasus/lexicons/app_bsky_actor_profile.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "com.atproto.label.defs#selfLabels" -> ( 12 - match Com_atproto_label_defs.self_labels_of_yojson json with 13 - | Ok v -> 14 - Ok (SelfLabels v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "com.atproto.label.defs#selfLabels" -> 12 + (match Com_atproto_label_defs.self_labels_of_yojson json with 13 + | Ok v -> Ok (SelfLabels v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let labels_to_yojson = function 22 - | SelfLabels v -> ( 23 - match Com_atproto_label_defs.self_labels_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 26 - | other -> 27 - other ) 28 - | Unknown j -> 29 - j 19 + | SelfLabels v -> 20 + (match Com_atproto_label_defs.self_labels_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 30 24 31 25 type main = 32 - { display_name: string option [@key "displayName"] [@default None] 33 - ; description: string option [@default None] 34 - ; avatar: Hermes.blob option [@default None] 35 - ; banner: Hermes.blob option [@default None] 36 - ; labels: labels option [@default None] 37 - ; joined_via_starter_pack: Com_atproto_repo_strongRef.main option 38 - [@key "joinedViaStarterPack"] [@default None] 39 - ; pinned_post: Com_atproto_repo_strongRef.main option 40 - [@key "pinnedPost"] [@default None] 41 - ; created_at: string option [@key "createdAt"] [@default None] } 26 + { 27 + display_name: string option [@key "displayName"] [@default None]; 28 + description: string option [@default None]; 29 + pronouns: string option [@default None]; 30 + website: string option [@default None]; 31 + avatar: Hermes.blob option [@default None]; 32 + banner: Hermes.blob option [@default None]; 33 + labels: labels option [@default None]; 34 + joined_via_starter_pack: Com_atproto_repo_strongRef.main option [@key "joinedViaStarterPack"] [@default None]; 35 + pinned_post: Com_atproto_repo_strongRef.main option [@key "pinnedPost"] [@default None]; 36 + created_at: string option [@key "createdAt"] [@default None]; 37 + } 42 38 [@@deriving yojson {strict= false}] 39 +
+9 -6
pegasus/lexicons/app_bsky_actor_putPreferences.ml
··· 5 5 let nsid = "app.bsky.actor.putPreferences" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {preferences: App_bsky_actor_defs.preferences} 10 + type input = 11 + { 12 + preferences: App_bsky_actor_defs.preferences; 13 + } 12 14 [@@deriving yojson {strict= false}] 13 15 14 16 type output = unit 15 - 16 17 let output_of_yojson _ = Ok () 17 18 18 - let call ~preferences (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~preferences 21 + (client : Hermes.client) : output Lwt.t = 19 22 let params = () in 20 23 let input = Some ({preferences} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 25 end 26 +
+19 -9
pegasus/lexicons/app_bsky_actor_searchActors.ml
··· 5 5 let nsid = "app.bsky.actor.searchActors" 6 6 7 7 type params = 8 - { term: string option [@default None] 9 - ; q: string option [@default None] 10 - ; limit: int option [@default None] 11 - ; cursor: string option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + term: string option [@default None]; 10 + q: string option [@default None]; 11 + limit: int option [@default None]; 12 + cursor: string option [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 16 type output = 15 - { cursor: string option [@default None] 16 - ; actors: App_bsky_actor_defs.profile_view list } 17 - [@@deriving yojson {strict= false}] 17 + { 18 + cursor: string option [@default None]; 19 + actors: App_bsky_actor_defs.profile_view list; 20 + } 21 + [@@deriving yojson {strict= false}] 18 22 19 - let call ?term ?q ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ?term 25 + ?q 26 + ?limit 27 + ?cursor 28 + (client : Hermes.client) : output Lwt.t = 20 29 let params : params = {term; q; limit; cursor} in 21 30 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 31 end 32 +
+17 -7
pegasus/lexicons/app_bsky_actor_searchActorsTypeahead.ml
··· 5 5 let nsid = "app.bsky.actor.searchActorsTypeahead" 6 6 7 7 type params = 8 - { term: string option [@default None] 9 - ; q: string option [@default None] 10 - ; limit: int option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + term: string option [@default None]; 10 + q: string option [@default None]; 11 + limit: int option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 - type output = {actors: App_bsky_actor_defs.profile_view_basic list} 14 - [@@deriving yojson {strict= false}] 15 + type output = 16 + { 17 + actors: App_bsky_actor_defs.profile_view_basic list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?term ?q ?limit (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?term 23 + ?q 24 + ?limit 25 + (client : Hermes.client) : output Lwt.t = 17 26 let params : params = {term; q; limit} in 18 27 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 28 end 29 +
+17 -20
pegasus/lexicons/app_bsky_actor_status.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "app.bsky.embed.external" -> ( 12 - match App_bsky_embed_external.main_of_yojson json with 13 - | Ok v -> 14 - Ok (External v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "app.bsky.embed.external" -> 12 + (match App_bsky_embed_external.main_of_yojson json with 13 + | Ok v -> Ok (External v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let embed_to_yojson = function 22 - | External v -> ( 23 - match App_bsky_embed_external.main_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc (("$type", `String "app.bsky.embed.external") :: fields) 26 - | other -> 27 - other ) 28 - | Unknown j -> 29 - j 19 + | External v -> 20 + (match App_bsky_embed_external.main_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.external") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 30 24 31 25 type main = 32 - { status: string 33 - ; embed: embed option [@default None] 34 - ; duration_minutes: int option [@key "durationMinutes"] [@default None] 35 - ; created_at: string [@key "createdAt"] } 26 + { 27 + status: string; 28 + embed: embed option [@default None]; 29 + duration_minutes: int option [@key "durationMinutes"] [@default None]; 30 + created_at: string [@key "createdAt"]; 31 + } 36 32 [@@deriving yojson {strict= false}] 37 33 38 34 (** Advertises an account as currently offering live content. *) 39 35 let live = "app.bsky.actor.status#live" 36 +
+16 -13
pegasus/lexicons/app_bsky_ageassurance_begin.ml
··· 5 5 let nsid = "app.bsky.ageassurance.begin" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { email: string 13 - ; language: string 14 - ; country_code: string [@key "countryCode"] 15 - ; region_code: string option [@key "regionCode"] [@default None] } 11 + { 12 + email: string; 13 + language: string; 14 + country_code: string [@key "countryCode"]; 15 + region_code: string option [@key "regionCode"] [@default None]; 16 + } 16 17 [@@deriving yojson {strict= false}] 17 18 18 19 type output = App_bsky_ageassurance_defs.state 19 - [@@deriving yojson {strict= false}] 20 + [@@deriving yojson {strict= false}] 20 21 21 - let call ~email ~language ~country_code ?region_code (client : Hermes.client) 22 - : output Lwt.t = 22 + let call 23 + ~email 24 + ~language 25 + ~country_code 26 + ?region_code 27 + (client : Hermes.client) : output Lwt.t = 23 28 let params = () in 24 - let input = 25 - Some ({email; language; country_code; region_code} |> input_to_yojson) 26 - in 27 - Hermes.procedure client nsid (params_to_yojson params) input 28 - output_of_yojson 29 + let input = Some ({email; language; country_code; region_code} |> input_to_yojson) in 30 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 29 31 end 32 +
+132 -164
pegasus/lexicons/app_bsky_ageassurance_defs.ml
··· 2 2 3 3 (** string type with known values: The access level granted based on Age Assurance data we've processed. *) 4 4 type access = string 5 - 6 5 let access_of_yojson = function 7 - | `String s -> 8 - Ok s 9 - | _ -> 10 - Error "access: expected string" 11 - 6 + | `String s -> Ok s 7 + | _ -> Error "access: expected string" 12 8 let access_to_yojson s = `String s 13 9 14 10 (** string type with known values: The status of the Age Assurance process. *) 15 11 type status = string 16 - 17 12 let status_of_yojson = function 18 - | `String s -> 19 - Ok s 20 - | _ -> 21 - Error "status: expected string" 22 - 13 + | `String s -> Ok s 14 + | _ -> Error "status: expected string" 23 15 let status_to_yojson s = `String s 24 16 25 17 type state = 26 - { last_initiated_at: string option [@key "lastInitiatedAt"] [@default None] 27 - ; status: status 28 - ; access: access } 18 + { 19 + last_initiated_at: string option [@key "lastInitiatedAt"] [@default None]; 20 + status: status; 21 + access: access; 22 + } 29 23 [@@deriving yojson {strict= false}] 30 24 31 25 type state_metadata = 32 - {account_created_at: string option [@key "accountCreatedAt"] [@default None]} 26 + { 27 + account_created_at: string option [@key "accountCreatedAt"] [@default None]; 28 + } 33 29 [@@deriving yojson {strict= false}] 34 30 35 - type config_region_rule_if_account_older_than = {date: string; access: access} 31 + type config_region_rule_if_account_older_than = 32 + { 33 + date: string; 34 + access: access; 35 + } 36 36 [@@deriving yojson {strict= false}] 37 37 38 - type config_region_rule_if_account_newer_than = {date: string; access: access} 38 + type config_region_rule_if_account_newer_than = 39 + { 40 + date: string; 41 + access: access; 42 + } 39 43 [@@deriving yojson {strict= false}] 40 44 41 - type config_region_rule_if_assured_under_age = {age: int; access: access} 45 + type config_region_rule_if_assured_under_age = 46 + { 47 + age: int; 48 + access: access; 49 + } 42 50 [@@deriving yojson {strict= false}] 43 51 44 - type config_region_rule_if_assured_over_age = {age: int; access: access} 52 + type config_region_rule_if_assured_over_age = 53 + { 54 + age: int; 55 + access: access; 56 + } 45 57 [@@deriving yojson {strict= false}] 46 58 47 - type config_region_rule_if_declared_under_age = {age: int; access: access} 59 + type config_region_rule_if_declared_under_age = 60 + { 61 + age: int; 62 + access: access; 63 + } 48 64 [@@deriving yojson {strict= false}] 49 65 50 - type config_region_rule_if_declared_over_age = {age: int; access: access} 66 + type config_region_rule_if_declared_over_age = 67 + { 68 + age: int; 69 + access: access; 70 + } 51 71 [@@deriving yojson {strict= false}] 52 72 53 - type config_region_rule_default = {access: access} 73 + type config_region_rule_default = 74 + { 75 + access: access; 76 + } 54 77 [@@deriving yojson {strict= false}] 55 78 56 79 type rules_item = 57 80 | ConfigRegionRuleDefault of config_region_rule_default 58 81 | ConfigRegionRuleIfDeclaredOverAge of config_region_rule_if_declared_over_age 59 - | ConfigRegionRuleIfDeclaredUnderAge of 60 - config_region_rule_if_declared_under_age 82 + | ConfigRegionRuleIfDeclaredUnderAge of config_region_rule_if_declared_under_age 61 83 | ConfigRegionRuleIfAssuredOverAge of config_region_rule_if_assured_over_age 62 84 | ConfigRegionRuleIfAssuredUnderAge of config_region_rule_if_assured_under_age 63 - | ConfigRegionRuleIfAccountNewerThan of 64 - config_region_rule_if_account_newer_than 65 - | ConfigRegionRuleIfAccountOlderThan of 66 - config_region_rule_if_account_older_than 85 + | ConfigRegionRuleIfAccountNewerThan of config_region_rule_if_account_newer_than 86 + | ConfigRegionRuleIfAccountOlderThan of config_region_rule_if_account_older_than 67 87 | Unknown of Yojson.Safe.t 68 88 69 89 let rules_item_of_yojson json = 70 90 let open Yojson.Safe.Util in 71 91 try 72 92 match json |> member "$type" |> to_string with 73 - | "app.bsky.ageassurance.defs#configRegionRuleDefault" -> ( 74 - match config_region_rule_default_of_yojson json with 75 - | Ok v -> 76 - Ok (ConfigRegionRuleDefault v) 77 - | Error e -> 78 - Error e ) 79 - | "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" -> ( 80 - match config_region_rule_if_declared_over_age_of_yojson json with 81 - | Ok v -> 82 - Ok (ConfigRegionRuleIfDeclaredOverAge v) 83 - | Error e -> 84 - Error e ) 85 - | "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" -> ( 86 - match config_region_rule_if_declared_under_age_of_yojson json with 87 - | Ok v -> 88 - Ok (ConfigRegionRuleIfDeclaredUnderAge v) 89 - | Error e -> 90 - Error e ) 91 - | "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" -> ( 92 - match config_region_rule_if_assured_over_age_of_yojson json with 93 - | Ok v -> 94 - Ok (ConfigRegionRuleIfAssuredOverAge v) 95 - | Error e -> 96 - Error e ) 97 - | "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" -> ( 98 - match config_region_rule_if_assured_under_age_of_yojson json with 99 - | Ok v -> 100 - Ok (ConfigRegionRuleIfAssuredUnderAge v) 101 - | Error e -> 102 - Error e ) 103 - | "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" -> ( 104 - match config_region_rule_if_account_newer_than_of_yojson json with 105 - | Ok v -> 106 - Ok (ConfigRegionRuleIfAccountNewerThan v) 107 - | Error e -> 108 - Error e ) 109 - | "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" -> ( 110 - match config_region_rule_if_account_older_than_of_yojson json with 111 - | Ok v -> 112 - Ok (ConfigRegionRuleIfAccountOlderThan v) 113 - | Error e -> 114 - Error e ) 115 - | _ -> 116 - Ok (Unknown json) 93 + | "app.bsky.ageassurance.defs#configRegionRuleDefault" -> 94 + (match config_region_rule_default_of_yojson json with 95 + | Ok v -> Ok (ConfigRegionRuleDefault v) 96 + | Error e -> Error e) 97 + | "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" -> 98 + (match config_region_rule_if_declared_over_age_of_yojson json with 99 + | Ok v -> Ok (ConfigRegionRuleIfDeclaredOverAge v) 100 + | Error e -> Error e) 101 + | "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" -> 102 + (match config_region_rule_if_declared_under_age_of_yojson json with 103 + | Ok v -> Ok (ConfigRegionRuleIfDeclaredUnderAge v) 104 + | Error e -> Error e) 105 + | "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" -> 106 + (match config_region_rule_if_assured_over_age_of_yojson json with 107 + | Ok v -> Ok (ConfigRegionRuleIfAssuredOverAge v) 108 + | Error e -> Error e) 109 + | "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" -> 110 + (match config_region_rule_if_assured_under_age_of_yojson json with 111 + | Ok v -> Ok (ConfigRegionRuleIfAssuredUnderAge v) 112 + | Error e -> Error e) 113 + | "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" -> 114 + (match config_region_rule_if_account_newer_than_of_yojson json with 115 + | Ok v -> Ok (ConfigRegionRuleIfAccountNewerThan v) 116 + | Error e -> Error e) 117 + | "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" -> 118 + (match config_region_rule_if_account_older_than_of_yojson json with 119 + | Ok v -> Ok (ConfigRegionRuleIfAccountOlderThan v) 120 + | Error e -> Error e) 121 + | _ -> Ok (Unknown json) 117 122 with _ -> Error "failed to parse union" 118 123 119 124 let rules_item_to_yojson = function 120 - | ConfigRegionRuleDefault v -> ( 121 - match config_region_rule_default_to_yojson v with 122 - | `Assoc fields -> 123 - `Assoc 124 - ( ( "$type" 125 - , `String "app.bsky.ageassurance.defs#configRegionRuleDefault" ) 126 - :: fields ) 127 - | other -> 128 - other ) 129 - | ConfigRegionRuleIfDeclaredOverAge v -> ( 130 - match config_region_rule_if_declared_over_age_to_yojson v with 131 - | `Assoc fields -> 132 - `Assoc 133 - ( ( "$type" 134 - , `String 135 - "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" 136 - ) 137 - :: fields ) 138 - | other -> 139 - other ) 140 - | ConfigRegionRuleIfDeclaredUnderAge v -> ( 141 - match config_region_rule_if_declared_under_age_to_yojson v with 142 - | `Assoc fields -> 143 - `Assoc 144 - ( ( "$type" 145 - , `String 146 - "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" 147 - ) 148 - :: fields ) 149 - | other -> 150 - other ) 151 - | ConfigRegionRuleIfAssuredOverAge v -> ( 152 - match config_region_rule_if_assured_over_age_to_yojson v with 153 - | `Assoc fields -> 154 - `Assoc 155 - ( ( "$type" 156 - , `String 157 - "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" ) 158 - :: fields ) 159 - | other -> 160 - other ) 161 - | ConfigRegionRuleIfAssuredUnderAge v -> ( 162 - match config_region_rule_if_assured_under_age_to_yojson v with 163 - | `Assoc fields -> 164 - `Assoc 165 - ( ( "$type" 166 - , `String 167 - "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" 168 - ) 169 - :: fields ) 170 - | other -> 171 - other ) 172 - | ConfigRegionRuleIfAccountNewerThan v -> ( 173 - match config_region_rule_if_account_newer_than_to_yojson v with 174 - | `Assoc fields -> 175 - `Assoc 176 - ( ( "$type" 177 - , `String 178 - "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" 179 - ) 180 - :: fields ) 181 - | other -> 182 - other ) 183 - | ConfigRegionRuleIfAccountOlderThan v -> ( 184 - match config_region_rule_if_account_older_than_to_yojson v with 185 - | `Assoc fields -> 186 - `Assoc 187 - ( ( "$type" 188 - , `String 189 - "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" 190 - ) 191 - :: fields ) 192 - | other -> 193 - other ) 194 - | Unknown j -> 195 - j 125 + | ConfigRegionRuleDefault v -> 126 + (match config_region_rule_default_to_yojson v with 127 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleDefault") :: fields) 128 + | other -> other) 129 + | ConfigRegionRuleIfDeclaredOverAge v -> 130 + (match config_region_rule_if_declared_over_age_to_yojson v with 131 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge") :: fields) 132 + | other -> other) 133 + | ConfigRegionRuleIfDeclaredUnderAge v -> 134 + (match config_region_rule_if_declared_under_age_to_yojson v with 135 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge") :: fields) 136 + | other -> other) 137 + | ConfigRegionRuleIfAssuredOverAge v -> 138 + (match config_region_rule_if_assured_over_age_to_yojson v with 139 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge") :: fields) 140 + | other -> other) 141 + | ConfigRegionRuleIfAssuredUnderAge v -> 142 + (match config_region_rule_if_assured_under_age_to_yojson v with 143 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge") :: fields) 144 + | other -> other) 145 + | ConfigRegionRuleIfAccountNewerThan v -> 146 + (match config_region_rule_if_account_newer_than_to_yojson v with 147 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan") :: fields) 148 + | other -> other) 149 + | ConfigRegionRuleIfAccountOlderThan v -> 150 + (match config_region_rule_if_account_older_than_to_yojson v with 151 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan") :: fields) 152 + | other -> other) 153 + | Unknown j -> j 196 154 197 155 type config_region = 198 - { country_code: string [@key "countryCode"] 199 - ; region_code: string option [@key "regionCode"] [@default None] 200 - ; rules: rules_item list } 156 + { 157 + country_code: string [@key "countryCode"]; 158 + region_code: string option [@key "regionCode"] [@default None]; 159 + min_access_age: int [@key "minAccessAge"]; 160 + rules: rules_item list; 161 + } 201 162 [@@deriving yojson {strict= false}] 202 163 203 - type config = {regions: config_region list} [@@deriving yojson {strict= false}] 164 + type config = 165 + { 166 + regions: config_region list; 167 + } 168 + [@@deriving yojson {strict= false}] 204 169 205 170 type event = 206 - { created_at: string [@key "createdAt"] 207 - ; attempt_id: string [@key "attemptId"] 208 - ; status: string 209 - ; access: string 210 - ; country_code: string [@key "countryCode"] 211 - ; region_code: string option [@key "regionCode"] [@default None] 212 - ; email: string option [@default None] 213 - ; init_ip: string option [@key "initIp"] [@default None] 214 - ; init_ua: string option [@key "initUa"] [@default None] 215 - ; complete_ip: string option [@key "completeIp"] [@default None] 216 - ; complete_ua: string option [@key "completeUa"] [@default None] } 171 + { 172 + created_at: string [@key "createdAt"]; 173 + attempt_id: string [@key "attemptId"]; 174 + status: string; 175 + access: string; 176 + country_code: string [@key "countryCode"]; 177 + region_code: string option [@key "regionCode"] [@default None]; 178 + email: string option [@default None]; 179 + init_ip: string option [@key "initIp"] [@default None]; 180 + init_ua: string option [@key "initUa"] [@default None]; 181 + complete_ip: string option [@key "completeIp"] [@default None]; 182 + complete_ua: string option [@key "completeUa"] [@default None]; 183 + } 217 184 [@@deriving yojson {strict= false}] 185 +
+4 -3
pegasus/lexicons/app_bsky_ageassurance_getConfig.ml
··· 5 5 let nsid = "app.bsky.ageassurance.getConfig" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = App_bsky_ageassurance_defs.config 12 - [@@deriving yojson {strict= false}] 11 + [@@deriving yojson {strict= false}] 13 12 14 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 15 15 Hermes.query client nsid (`Assoc []) output_of_yojson 16 16 end 17 +
+15 -7
pegasus/lexicons/app_bsky_ageassurance_getState.ml
··· 5 5 let nsid = "app.bsky.ageassurance.getState" 6 6 7 7 type params = 8 - { country_code: string [@key "countryCode"] 9 - ; region_code: string option [@key "regionCode"] [@default None] } 10 - [@@deriving yojson {strict= false}] 8 + { 9 + country_code: string [@key "countryCode"]; 10 + region_code: string option [@key "regionCode"] [@default None]; 11 + } 12 + [@@xrpc_query] 11 13 12 14 type output = 13 - { state: App_bsky_ageassurance_defs.state 14 - ; metadata: App_bsky_ageassurance_defs.state_metadata } 15 - [@@deriving yojson {strict= false}] 15 + { 16 + state: App_bsky_ageassurance_defs.state; 17 + metadata: App_bsky_ageassurance_defs.state_metadata; 18 + } 19 + [@@deriving yojson {strict= false}] 16 20 17 - let call ~country_code ?region_code (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ~country_code 23 + ?region_code 24 + (client : Hermes.client) : output Lwt.t = 18 25 let params : params = {country_code; region_code} in 19 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 20 27 end 28 +
+19
pegasus/lexicons/app_bsky_authCreatePosts.ml
··· 1 + (* generated from app.bsky.authCreatePosts *) 2 + 3 + (** app.bsky.authCreatePosts *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authDeleteContent.ml
··· 1 + (* generated from app.bsky.authDeleteContent *) 2 + 3 + (** app.bsky.authDeleteContent *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authFullApp.ml
··· 1 + (* generated from app.bsky.authFullApp *) 2 + 3 + (** app.bsky.authFullApp *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authManageFeedDeclarations.ml
··· 1 + (* generated from app.bsky.authManageFeedDeclarations *) 2 + 3 + (** app.bsky.authManageFeedDeclarations *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authManageLabelerService.ml
··· 1 + (* generated from app.bsky.authManageLabelerService *) 2 + 3 + (** app.bsky.authManageLabelerService *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authManageModeration.ml
··· 1 + (* generated from app.bsky.authManageModeration *) 2 + 3 + (** app.bsky.authManageModeration *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authManageNotifications.ml
··· 1 + (* generated from app.bsky.authManageNotifications *) 2 + 3 + (** app.bsky.authManageNotifications *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authManageProfile.ml
··· 1 + (* generated from app.bsky.authManageProfile *) 2 + 3 + (** app.bsky.authManageProfile *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+19
pegasus/lexicons/app_bsky_authViewAll.ml
··· 1 + (* generated from app.bsky.authViewAll *) 2 + 3 + (** app.bsky.authViewAll *) 4 + type permission = 5 + { resource: string 6 + ; lxm: string list option [@default None] 7 + ; aud: string option [@default None] 8 + ; inherit_aud: bool option [@key "inheritAud"] [@default None] 9 + ; collection: string list option [@default None] 10 + ; action: string list option [@default None] 11 + ; accept: string list option [@default None] } 12 + [@@deriving yojson {strict= false}] 13 + 14 + type main = 15 + { title: string option [@default None] 16 + ; detail: string option [@default None] 17 + ; permissions: permission list } 18 + [@@deriving yojson {strict= false}] 19 +
+12 -6
pegasus/lexicons/app_bsky_bookmark_createBookmark.ml
··· 5 5 let nsid = "app.bsky.bookmark.createBookmark" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {uri: string; cid: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + uri: string; 13 + cid: string; 14 + } 15 + [@@deriving yojson {strict= false}] 12 16 13 17 type output = unit 14 - 15 18 let output_of_yojson _ = Ok () 16 19 17 - let call ~uri ~cid (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~uri 22 + ~cid 23 + (client : Hermes.client) : output Lwt.t = 18 24 let params = () in 19 25 let input = Some ({uri; cid} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 27 end 28 +
+36 -44
pegasus/lexicons/app_bsky_bookmark_defs.ml
··· 1 1 (* generated from app.bsky.bookmark.defs *) 2 2 3 - type bookmark = {subject: Com_atproto_repo_strongRef.main} 3 + type bookmark = 4 + { 5 + subject: Com_atproto_repo_strongRef.main; 6 + } 4 7 [@@deriving yojson {strict= false}] 5 8 6 9 type item = ··· 13 16 let open Yojson.Safe.Util in 14 17 try 15 18 match json |> member "$type" |> to_string with 16 - | "app.bsky.feed.defs#blockedPost" -> ( 17 - match App_bsky_feed_defs.blocked_post_of_yojson json with 18 - | Ok v -> 19 - Ok (BlockedPost v) 20 - | Error e -> 21 - Error e ) 22 - | "app.bsky.feed.defs#notFoundPost" -> ( 23 - match App_bsky_feed_defs.not_found_post_of_yojson json with 24 - | Ok v -> 25 - Ok (NotFoundPost v) 26 - | Error e -> 27 - Error e ) 28 - | "app.bsky.feed.defs#postView" -> ( 29 - match App_bsky_feed_defs.post_view_of_yojson json with 30 - | Ok v -> 31 - Ok (PostView v) 32 - | Error e -> 33 - Error e ) 34 - | _ -> 35 - Ok (Unknown json) 19 + | "app.bsky.feed.defs#blockedPost" -> 20 + (match App_bsky_feed_defs.blocked_post_of_yojson json with 21 + | Ok v -> Ok (BlockedPost v) 22 + | Error e -> Error e) 23 + | "app.bsky.feed.defs#notFoundPost" -> 24 + (match App_bsky_feed_defs.not_found_post_of_yojson json with 25 + | Ok v -> Ok (NotFoundPost v) 26 + | Error e -> Error e) 27 + | "app.bsky.feed.defs#postView" -> 28 + (match App_bsky_feed_defs.post_view_of_yojson json with 29 + | Ok v -> Ok (PostView v) 30 + | Error e -> Error e) 31 + | _ -> Ok (Unknown json) 36 32 with _ -> Error "failed to parse union" 37 33 38 34 let item_to_yojson = function 39 - | BlockedPost v -> ( 40 - match App_bsky_feed_defs.blocked_post_to_yojson v with 41 - | `Assoc fields -> 42 - `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 43 - | other -> 44 - other ) 45 - | NotFoundPost v -> ( 46 - match App_bsky_feed_defs.not_found_post_to_yojson v with 47 - | `Assoc fields -> 48 - `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 49 - | other -> 50 - other ) 51 - | PostView v -> ( 52 - match App_bsky_feed_defs.post_view_to_yojson v with 53 - | `Assoc fields -> 54 - `Assoc (("$type", `String "app.bsky.feed.defs#postView") :: fields) 55 - | other -> 56 - other ) 57 - | Unknown j -> 58 - j 35 + | BlockedPost v -> 36 + (match App_bsky_feed_defs.blocked_post_to_yojson v with 37 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 38 + | other -> other) 39 + | NotFoundPost v -> 40 + (match App_bsky_feed_defs.not_found_post_to_yojson v with 41 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 42 + | other -> other) 43 + | PostView v -> 44 + (match App_bsky_feed_defs.post_view_to_yojson v with 45 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#postView") :: fields) 46 + | other -> other) 47 + | Unknown j -> j 59 48 60 49 type bookmark_view = 61 - { subject: Com_atproto_repo_strongRef.main 62 - ; created_at: string option [@key "createdAt"] [@default None] 63 - ; item: item } 50 + { 51 + subject: Com_atproto_repo_strongRef.main; 52 + created_at: string option [@key "createdAt"] [@default None]; 53 + item: item; 54 + } 64 55 [@@deriving yojson {strict= false}] 56 +
+10 -6
pegasus/lexicons/app_bsky_bookmark_deleteBookmark.ml
··· 5 5 let nsid = "app.bsky.bookmark.deleteBookmark" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {uri: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + uri: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~uri (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~uri 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({uri} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+15 -6
pegasus/lexicons/app_bsky_bookmark_getBookmarks.ml
··· 5 5 let nsid = "app.bsky.bookmark.getBookmarks" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; bookmarks: App_bsky_bookmark_defs.bookmark_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + bookmarks: App_bsky_bookmark_defs.bookmark_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+14 -4
pegasus/lexicons/app_bsky_contact_defs.ml
··· 1 1 (* generated from app.bsky.contact.defs *) 2 2 3 3 type match_and_contact_index = 4 - { match_: App_bsky_actor_defs.profile_view [@key "match"] 5 - ; contact_index: int [@key "contactIndex"] } 4 + { 5 + match_: App_bsky_actor_defs.profile_view [@key "match"]; 6 + contact_index: int [@key "contactIndex"]; 7 + } 6 8 [@@deriving yojson {strict= false}] 7 9 8 10 type sync_status = 9 - {synced_at: string [@key "syncedAt"]; matches_count: int [@key "matchesCount"]} 11 + { 12 + synced_at: string [@key "syncedAt"]; 13 + matches_count: int [@key "matchesCount"]; 14 + } 10 15 [@@deriving yojson {strict= false}] 11 16 12 - type notification = {from: string; to_: string [@key "to"]} 17 + type notification = 18 + { 19 + from: string; 20 + to_: string [@key "to"]; 21 + } 13 22 [@@deriving yojson {strict= false}] 23 +
+12 -9
pegasus/lexicons/app_bsky_contact_dismissMatch.ml
··· 5 5 let nsid = "app.bsky.contact.dismissMatch" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {subject: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + subject: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 17 + let output_of_yojson _ = Ok () 18 + let output_to_yojson () = `Assoc [] 14 19 15 - let output_of_yojson _ = Ok () 16 - 17 - let output_to_yojson () = `Assoc [] 18 - 19 - let call ~subject (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~subject 22 + (client : Hermes.client) : output Lwt.t = 20 23 let params = () in 21 24 let input = Some ({subject} |> input_to_yojson) in 22 - Hermes.procedure client nsid (params_to_yojson params) input 23 - output_of_yojson 25 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 24 26 end 27 +
+15 -6
pegasus/lexicons/app_bsky_contact_getMatches.ml
··· 5 5 let nsid = "app.bsky.contact.getMatches" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; matches: App_bsky_actor_defs.profile_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + matches: App_bsky_actor_defs.profile_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+7 -5
pegasus/lexicons/app_bsky_contact_getSyncStatus.ml
··· 5 5 let nsid = "app.bsky.contact.getSyncStatus" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { sync_status: App_bsky_contact_defs.sync_status option 13 - [@key "syncStatus"] [@default None] } 14 - [@@deriving yojson {strict= false}] 11 + { 12 + sync_status: App_bsky_contact_defs.sync_status option [@key "syncStatus"] [@default None]; 13 + } 14 + [@@deriving yojson {strict= false}] 15 15 16 - let call (client : Hermes.client) : output Lwt.t = 16 + let call 17 + (client : Hermes.client) : output Lwt.t = 17 18 Hermes.query client nsid (`Assoc []) output_of_yojson 18 19 end 20 +
+15 -9
pegasus/lexicons/app_bsky_contact_importContacts.ml
··· 5 5 let nsid = "app.bsky.contact.importContacts" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {token: string; contacts: string list} 10 + type input = 11 + { 12 + token: string; 13 + contacts: string list; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = 15 - { matches_and_contact_indexes: 16 - App_bsky_contact_defs.match_and_contact_index list 17 - [@key "matchesAndContactIndexes"] } 18 - [@@deriving yojson {strict= false}] 18 + { 19 + matches_and_contact_indexes: App_bsky_contact_defs.match_and_contact_index list [@key "matchesAndContactIndexes"]; 20 + } 21 + [@@deriving yojson {strict= false}] 19 22 20 - let call ~token ~contacts (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~token 25 + ~contacts 26 + (client : Hermes.client) : output Lwt.t = 21 27 let params = () in 22 28 let input = Some ({token; contacts} |> input_to_yojson) in 23 - Hermes.procedure client nsid (params_to_yojson params) input 24 - output_of_yojson 29 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 25 30 end 31 +
+6 -10
pegasus/lexicons/app_bsky_contact_removeData.ml
··· 5 5 let nsid = "app.bsky.contact.removeData" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = unit 12 - 13 11 let input_of_yojson _ = Ok () 14 - 15 12 let input_to_yojson () = `Assoc [] 16 13 17 14 type output = unit 18 - 19 - let output_of_yojson _ = Ok () 20 - 21 - let output_to_yojson () = `Assoc [] 15 + let output_of_yojson _ = Ok () 16 + let output_to_yojson () = `Assoc [] 22 17 23 - let call (client : Hermes.client) : output Lwt.t = 18 + let call 19 + (client : Hermes.client) : output Lwt.t = 24 20 let params = () in 25 21 let input = Some (input_to_yojson ()) in 26 - Hermes.procedure client nsid (params_to_yojson params) input 27 - output_of_yojson 22 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 28 23 end 24 +
+13 -9
pegasus/lexicons/app_bsky_contact_sendNotification.ml
··· 5 5 let nsid = "app.bsky.contact.sendNotification" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {from: string; to_: string [@key "to"]} 10 + type input = 11 + { 12 + from: string; 13 + to_: string [@key "to"]; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 - let output_of_yojson _ = Ok () 17 - 18 - let output_to_yojson () = `Assoc [] 18 + let output_of_yojson _ = Ok () 19 + let output_to_yojson () = `Assoc [] 19 20 20 - let call ~from ~to_ (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ~from 23 + ~to_ 24 + (client : Hermes.client) : output Lwt.t = 21 25 let params = () in 22 26 let input = Some ({from; to_} |> input_to_yojson) in 23 - Hermes.procedure client nsid (params_to_yojson params) input 24 - output_of_yojson 27 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 25 28 end 29 +
+12 -9
pegasus/lexicons/app_bsky_contact_startPhoneVerification.ml
··· 5 5 let nsid = "app.bsky.contact.startPhoneVerification" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {phone: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + phone: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 17 + let output_of_yojson _ = Ok () 18 + let output_to_yojson () = `Assoc [] 14 19 15 - let output_of_yojson _ = Ok () 16 - 17 - let output_to_yojson () = `Assoc [] 18 - 19 - let call ~phone (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~phone 22 + (client : Hermes.client) : output Lwt.t = 20 23 let params = () in 21 24 let input = Some ({phone} |> input_to_yojson) in 22 - Hermes.procedure client nsid (params_to_yojson params) input 23 - output_of_yojson 25 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 24 26 end 27 +
+17 -6
pegasus/lexicons/app_bsky_contact_verifyPhone.ml
··· 5 5 let nsid = "app.bsky.contact.verifyPhone" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {phone: string; code: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + phone: string; 13 + code: string; 14 + } 15 + [@@deriving yojson {strict= false}] 12 16 13 - type output = {token: string} [@@deriving yojson {strict= false}] 17 + type output = 18 + { 19 + token: string; 20 + } 21 + [@@deriving yojson {strict= false}] 14 22 15 - let call ~phone ~code (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~phone 25 + ~code 26 + (client : Hermes.client) : output Lwt.t = 16 27 let params = () in 17 28 let input = Some ({phone; code} |> input_to_yojson) in 18 - Hermes.procedure client nsid (params_to_yojson params) input 19 - output_of_yojson 29 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 20 30 end 31 +
+29
pegasus/lexicons/app_bsky_draft_createDraft.ml
··· 1 + (* generated from app.bsky.draft.createDraft *) 2 + 3 + (** Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication. *) 4 + module Main = struct 5 + let nsid = "app.bsky.draft.createDraft" 6 + 7 + type params = unit 8 + let params_to_yojson () = `Assoc [] 9 + 10 + type input = 11 + { 12 + draft: App_bsky_draft_defs.draft; 13 + } 14 + [@@deriving yojson {strict= false}] 15 + 16 + type output = 17 + { 18 + id: string; 19 + } 20 + [@@deriving yojson {strict= false}] 21 + 22 + let call 23 + ~draft 24 + (client : Hermes.client) : output Lwt.t = 25 + let params = () in 26 + let input = Some ({draft} |> input_to_yojson) in 27 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 28 + end 29 +
+173
pegasus/lexicons/app_bsky_draft_defs.ml
··· 1 + (* generated from app.bsky.draft.defs *) 2 + 3 + type draft_embed_record = 4 + { 5 + record: Com_atproto_repo_strongRef.main; 6 + } 7 + [@@deriving yojson {strict= false}] 8 + 9 + type draft_embed_external = 10 + { 11 + uri: string; 12 + } 13 + [@@deriving yojson {strict= false}] 14 + 15 + type draft_embed_caption = 16 + { 17 + lang: string; 18 + content: string; 19 + } 20 + [@@deriving yojson {strict= false}] 21 + 22 + type draft_embed_local_ref = 23 + { 24 + path: string; 25 + } 26 + [@@deriving yojson {strict= false}] 27 + 28 + type draft_embed_video = 29 + { 30 + local_ref: draft_embed_local_ref [@key "localRef"]; 31 + alt: string option [@default None]; 32 + captions: draft_embed_caption list option [@default None]; 33 + } 34 + [@@deriving yojson {strict= false}] 35 + 36 + type draft_embed_image = 37 + { 38 + local_ref: draft_embed_local_ref [@key "localRef"]; 39 + alt: string option [@default None]; 40 + } 41 + [@@deriving yojson {strict= false}] 42 + 43 + type labels = 44 + | SelfLabels of Com_atproto_label_defs.self_labels 45 + | Unknown of Yojson.Safe.t 46 + 47 + let labels_of_yojson json = 48 + let open Yojson.Safe.Util in 49 + try 50 + match json |> member "$type" |> to_string with 51 + | "com.atproto.label.defs#selfLabels" -> 52 + (match Com_atproto_label_defs.self_labels_of_yojson json with 53 + | Ok v -> Ok (SelfLabels v) 54 + | Error e -> Error e) 55 + | _ -> Ok (Unknown json) 56 + with _ -> Error "failed to parse union" 57 + 58 + let labels_to_yojson = function 59 + | SelfLabels v -> 60 + (match Com_atproto_label_defs.self_labels_to_yojson v with 61 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 62 + | other -> other) 63 + | Unknown j -> j 64 + 65 + type draft_post = 66 + { 67 + text: string; 68 + labels: labels option [@default None]; 69 + embed_images: draft_embed_image list option [@key "embedImages"] [@default None]; 70 + embed_videos: draft_embed_video list option [@key "embedVideos"] [@default None]; 71 + embed_externals: draft_embed_external list option [@key "embedExternals"] [@default None]; 72 + embed_records: draft_embed_record list option [@key "embedRecords"] [@default None]; 73 + } 74 + [@@deriving yojson {strict= false}] 75 + 76 + type threadgate_allow_item = 77 + | MentionRule of App_bsky_feed_threadgate.mention_rule 78 + | FollowerRule of App_bsky_feed_threadgate.follower_rule 79 + | FollowingRule of App_bsky_feed_threadgate.following_rule 80 + | ListRule of App_bsky_feed_threadgate.list_rule 81 + | Unknown of Yojson.Safe.t 82 + 83 + let threadgate_allow_item_of_yojson json = 84 + let open Yojson.Safe.Util in 85 + try 86 + match json |> member "$type" |> to_string with 87 + | "app.bsky.feed.threadgate#mentionRule" -> 88 + (match App_bsky_feed_threadgate.mention_rule_of_yojson json with 89 + | Ok v -> Ok (MentionRule v) 90 + | Error e -> Error e) 91 + | "app.bsky.feed.threadgate#followerRule" -> 92 + (match App_bsky_feed_threadgate.follower_rule_of_yojson json with 93 + | Ok v -> Ok (FollowerRule v) 94 + | Error e -> Error e) 95 + | "app.bsky.feed.threadgate#followingRule" -> 96 + (match App_bsky_feed_threadgate.following_rule_of_yojson json with 97 + | Ok v -> Ok (FollowingRule v) 98 + | Error e -> Error e) 99 + | "app.bsky.feed.threadgate#listRule" -> 100 + (match App_bsky_feed_threadgate.list_rule_of_yojson json with 101 + | Ok v -> Ok (ListRule v) 102 + | Error e -> Error e) 103 + | _ -> Ok (Unknown json) 104 + with _ -> Error "failed to parse union" 105 + 106 + let threadgate_allow_item_to_yojson = function 107 + | MentionRule v -> 108 + (match App_bsky_feed_threadgate.mention_rule_to_yojson v with 109 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#mentionRule") :: fields) 110 + | other -> other) 111 + | FollowerRule v -> 112 + (match App_bsky_feed_threadgate.follower_rule_to_yojson v with 113 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#followerRule") :: fields) 114 + | other -> other) 115 + | FollowingRule v -> 116 + (match App_bsky_feed_threadgate.following_rule_to_yojson v with 117 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#followingRule") :: fields) 118 + | other -> other) 119 + | ListRule v -> 120 + (match App_bsky_feed_threadgate.list_rule_to_yojson v with 121 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#listRule") :: fields) 122 + | other -> other) 123 + | Unknown j -> j 124 + 125 + type postgate_embedding_rules_item = 126 + | DisableRule of App_bsky_feed_postgate.disable_rule 127 + | Unknown of Yojson.Safe.t 128 + 129 + let postgate_embedding_rules_item_of_yojson json = 130 + let open Yojson.Safe.Util in 131 + try 132 + match json |> member "$type" |> to_string with 133 + | "app.bsky.feed.postgate#disableRule" -> 134 + (match App_bsky_feed_postgate.disable_rule_of_yojson json with 135 + | Ok v -> Ok (DisableRule v) 136 + | Error e -> Error e) 137 + | _ -> Ok (Unknown json) 138 + with _ -> Error "failed to parse union" 139 + 140 + let postgate_embedding_rules_item_to_yojson = function 141 + | DisableRule v -> 142 + (match App_bsky_feed_postgate.disable_rule_to_yojson v with 143 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.postgate#disableRule") :: fields) 144 + | other -> other) 145 + | Unknown j -> j 146 + 147 + type draft = 148 + { 149 + device_id: string option [@key "deviceId"] [@default None]; 150 + device_name: string option [@key "deviceName"] [@default None]; 151 + posts: draft_post list; 152 + langs: string list option [@default None]; 153 + postgate_embedding_rules: postgate_embedding_rules_item list option [@key "postgateEmbeddingRules"] [@default None]; 154 + threadgate_allow: threadgate_allow_item list option [@key "threadgateAllow"] [@default None]; 155 + } 156 + [@@deriving yojson {strict= false}] 157 + 158 + type draft_with_id = 159 + { 160 + id: string; 161 + draft: draft; 162 + } 163 + [@@deriving yojson {strict= false}] 164 + 165 + type draft_view = 166 + { 167 + id: string; 168 + draft: draft; 169 + created_at: string [@key "createdAt"]; 170 + updated_at: string [@key "updatedAt"]; 171 + } 172 + [@@deriving yojson {strict= false}] 173 +
+26
pegasus/lexicons/app_bsky_draft_deleteDraft.ml
··· 1 + (* generated from app.bsky.draft.deleteDraft *) 2 + 3 + (** Deletes a draft by ID. Requires authentication. *) 4 + module Main = struct 5 + let nsid = "app.bsky.draft.deleteDraft" 6 + 7 + type params = unit 8 + let params_to_yojson () = `Assoc [] 9 + 10 + type input = 11 + { 12 + id: string; 13 + } 14 + [@@deriving yojson {strict= false}] 15 + 16 + type output = unit 17 + let output_of_yojson _ = Ok () 18 + 19 + let call 20 + ~id 21 + (client : Hermes.client) : output Lwt.t = 22 + let params = () in 23 + let input = Some ({id} |> input_to_yojson) in 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 25 + end 26 +
+28
pegasus/lexicons/app_bsky_draft_getDrafts.ml
··· 1 + (* generated from app.bsky.draft.getDrafts *) 2 + 3 + (** Gets views of user drafts. Requires authentication. *) 4 + module Main = struct 5 + let nsid = "app.bsky.draft.getDrafts" 6 + 7 + type params = 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 13 + 14 + type output = 15 + { 16 + cursor: string option [@default None]; 17 + drafts: App_bsky_draft_defs.draft_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 20 + 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 25 + let params : params = {limit; cursor} in 26 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 27 + end 28 +
+26
pegasus/lexicons/app_bsky_draft_updateDraft.ml
··· 1 + (* generated from app.bsky.draft.updateDraft *) 2 + 3 + (** Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication. *) 4 + module Main = struct 5 + let nsid = "app.bsky.draft.updateDraft" 6 + 7 + type params = unit 8 + let params_to_yojson () = `Assoc [] 9 + 10 + type input = 11 + { 12 + draft: App_bsky_draft_defs.draft_with_id; 13 + } 14 + [@@deriving yojson {strict= false}] 15 + 16 + type output = unit 17 + let output_of_yojson _ = Ok () 18 + 19 + let call 20 + ~draft 21 + (client : Hermes.client) : output Lwt.t = 22 + let params = () in 23 + let input = Some ({draft} |> input_to_yojson) in 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 25 + end 26 +
+6 -1
pegasus/lexicons/app_bsky_embed_defs.ml
··· 1 1 (* generated from app.bsky.embed.defs *) 2 2 3 - type aspect_ratio = {width: int; height: int} 3 + type aspect_ratio = 4 + { 5 + width: int; 6 + height: int; 7 + } 4 8 [@@deriving yojson {strict= false}] 9 +
+21 -10
pegasus/lexicons/app_bsky_embed_external.ml
··· 1 1 (* generated from app.bsky.embed.external *) 2 2 3 3 type external_ = 4 - { uri: string 5 - ; title: string 6 - ; description: string 7 - ; thumb: Hermes.blob option [@default None] } 4 + { 5 + uri: string; 6 + title: string; 7 + description: string; 8 + thumb: Hermes.blob option [@default None]; 9 + } 8 10 [@@deriving yojson {strict= false}] 9 11 10 - type main = {external_: external_ [@key "external"]} 12 + type main = 13 + { 14 + external_: external_ [@key "external"]; 15 + } 11 16 [@@deriving yojson {strict= false}] 12 17 13 18 type view_external = 14 - { uri: string 15 - ; title: string 16 - ; description: string 17 - ; thumb: string option [@default None] } 19 + { 20 + uri: string; 21 + title: string; 22 + description: string; 23 + thumb: string option [@default None]; 24 + } 18 25 [@@deriving yojson {strict= false}] 19 26 20 - type view = {external_: view_external [@key "external"]} 27 + type view = 28 + { 29 + external_: view_external [@key "external"]; 30 + } 21 31 [@@deriving yojson {strict= false}] 32 +
+22 -11
pegasus/lexicons/app_bsky_embed_images.ml
··· 1 1 (* generated from app.bsky.embed.images *) 2 2 3 3 type image = 4 - { image: Hermes.blob 5 - ; alt: string 6 - ; aspect_ratio: App_bsky_embed_defs.aspect_ratio option 7 - [@key "aspectRatio"] [@default None] } 4 + { 5 + image: Hermes.blob; 6 + alt: string; 7 + aspect_ratio: App_bsky_embed_defs.aspect_ratio option [@key "aspectRatio"] [@default None]; 8 + } 8 9 [@@deriving yojson {strict= false}] 9 10 10 - type main = {images: image list} [@@deriving yojson {strict= false}] 11 + type main = 12 + { 13 + images: image list; 14 + } 15 + [@@deriving yojson {strict= false}] 11 16 12 17 type view_image = 13 - { thumb: string 14 - ; fullsize: string 15 - ; alt: string 16 - ; aspect_ratio: App_bsky_embed_defs.aspect_ratio option 17 - [@key "aspectRatio"] [@default None] } 18 + { 19 + thumb: string; 20 + fullsize: string; 21 + alt: string; 22 + aspect_ratio: App_bsky_embed_defs.aspect_ratio option [@key "aspectRatio"] [@default None]; 23 + } 18 24 [@@deriving yojson {strict= false}] 19 25 20 - type view = {images: view_image list} [@@deriving yojson {strict= false}] 26 + type view = 27 + { 28 + images: view_image list; 29 + } 30 + [@@deriving yojson {strict= false}] 31 +
+1 -12
pegasus/lexicons/app_bsky_embed_record.ml
··· 1 1 (* re-exported from App_bsky_shared_1 *) 2 2 3 3 type main = App_bsky_shared_1.record_main 4 - 5 4 let main_of_yojson = App_bsky_shared_1.record_main_of_yojson 6 - 7 5 let main_to_yojson = App_bsky_shared_1.record_main_to_yojson 8 6 9 7 type view = App_bsky_shared_1.record_view 10 - 11 8 let view_of_yojson = App_bsky_shared_1.record_view_of_yojson 12 - 13 9 let view_to_yojson = App_bsky_shared_1.record_view_to_yojson 14 10 15 11 type view_record = App_bsky_shared_1.view_record 16 - 17 12 let view_record_of_yojson = App_bsky_shared_1.view_record_of_yojson 18 - 19 13 let view_record_to_yojson = App_bsky_shared_1.view_record_to_yojson 20 14 21 15 type view_not_found = App_bsky_shared_1.view_not_found 22 - 23 16 let view_not_found_of_yojson = App_bsky_shared_1.view_not_found_of_yojson 24 - 25 17 let view_not_found_to_yojson = App_bsky_shared_1.view_not_found_to_yojson 26 18 27 19 type view_blocked = App_bsky_shared_1.view_blocked 28 - 29 20 let view_blocked_of_yojson = App_bsky_shared_1.view_blocked_of_yojson 30 - 31 21 let view_blocked_to_yojson = App_bsky_shared_1.view_blocked_to_yojson 32 22 33 23 type view_detached = App_bsky_shared_1.view_detached 34 - 35 24 let view_detached_of_yojson = App_bsky_shared_1.view_detached_of_yojson 25 + let view_detached_to_yojson = App_bsky_shared_1.view_detached_to_yojson 36 26 37 - let view_detached_to_yojson = App_bsky_shared_1.view_detached_to_yojson
+1 -4
pegasus/lexicons/app_bsky_embed_recordWithMedia.ml
··· 1 1 (* re-exported from App_bsky_shared_1 *) 2 2 3 3 type main = App_bsky_shared_1.record_with_media_main 4 - 5 4 let main_of_yojson = App_bsky_shared_1.record_with_media_main_of_yojson 6 - 7 5 let main_to_yojson = App_bsky_shared_1.record_with_media_main_to_yojson 8 6 9 7 type view = App_bsky_shared_1.record_with_media_view 10 - 11 8 let view_of_yojson = App_bsky_shared_1.record_with_media_view_of_yojson 12 - 13 9 let view_to_yojson = App_bsky_shared_1.record_with_media_view_to_yojson 10 +
+21 -12
pegasus/lexicons/app_bsky_embed_video.ml
··· 1 1 (* generated from app.bsky.embed.video *) 2 2 3 - type caption = {lang: string; file: Hermes.blob} 3 + type caption = 4 + { 5 + lang: string; 6 + file: Hermes.blob; 7 + } 4 8 [@@deriving yojson {strict= false}] 5 9 6 10 type main = 7 - { video: Hermes.blob 8 - ; captions: caption list option [@default None] 9 - ; alt: string option [@default None] 10 - ; aspect_ratio: App_bsky_embed_defs.aspect_ratio option 11 - [@key "aspectRatio"] [@default None] } 11 + { 12 + video: Hermes.blob; 13 + captions: caption list option [@default None]; 14 + alt: string option [@default None]; 15 + aspect_ratio: App_bsky_embed_defs.aspect_ratio option [@key "aspectRatio"] [@default None]; 16 + presentation: string option [@default None]; 17 + } 12 18 [@@deriving yojson {strict= false}] 13 19 14 20 type view = 15 - { cid: string 16 - ; playlist: string 17 - ; thumbnail: string option [@default None] 18 - ; alt: string option [@default None] 19 - ; aspect_ratio: App_bsky_embed_defs.aspect_ratio option 20 - [@key "aspectRatio"] [@default None] } 21 + { 22 + cid: string; 23 + playlist: string; 24 + thumbnail: string option [@default None]; 25 + alt: string option [@default None]; 26 + aspect_ratio: App_bsky_embed_defs.aspect_ratio option [@key "aspectRatio"] [@default None]; 27 + presentation: string option [@default None]; 28 + } 21 29 [@@deriving yojson {strict= false}] 30 +
+9 -52
pegasus/lexicons/app_bsky_feed_defs.ml
··· 1 1 (* re-exported from App_bsky_shared_1 *) 2 2 3 3 type post_view = App_bsky_shared_1.post_view 4 - 5 4 let post_view_of_yojson = App_bsky_shared_1.post_view_of_yojson 6 - 7 5 let post_view_to_yojson = App_bsky_shared_1.post_view_to_yojson 8 6 9 7 type viewer_state = App_bsky_shared_1.feed_viewer_state 10 - 11 8 let viewer_state_of_yojson = App_bsky_shared_1.feed_viewer_state_of_yojson 12 - 13 9 let viewer_state_to_yojson = App_bsky_shared_1.feed_viewer_state_to_yojson 14 10 15 11 type thread_context = App_bsky_shared_1.thread_context 16 - 17 12 let thread_context_of_yojson = App_bsky_shared_1.thread_context_of_yojson 18 - 19 13 let thread_context_to_yojson = App_bsky_shared_1.thread_context_to_yojson 20 14 21 15 type feed_view_post = App_bsky_shared_1.feed_view_post 22 - 23 16 let feed_view_post_of_yojson = App_bsky_shared_1.feed_view_post_of_yojson 24 - 25 17 let feed_view_post_to_yojson = App_bsky_shared_1.feed_view_post_to_yojson 26 18 27 19 type reply_ref = App_bsky_shared_1.reply_ref 28 - 29 20 let reply_ref_of_yojson = App_bsky_shared_1.reply_ref_of_yojson 30 - 31 21 let reply_ref_to_yojson = App_bsky_shared_1.reply_ref_to_yojson 32 22 33 23 type reason_repost = App_bsky_shared_1.reason_repost 34 - 35 24 let reason_repost_of_yojson = App_bsky_shared_1.reason_repost_of_yojson 36 - 37 25 let reason_repost_to_yojson = App_bsky_shared_1.reason_repost_to_yojson 38 26 39 27 type reason_pin = App_bsky_shared_1.reason_pin 40 - 41 28 let reason_pin_of_yojson = App_bsky_shared_1.reason_pin_of_yojson 42 - 43 29 let reason_pin_to_yojson = App_bsky_shared_1.reason_pin_to_yojson 44 30 45 31 type thread_view_post = App_bsky_shared_1.thread_view_post 46 - 47 32 let thread_view_post_of_yojson = App_bsky_shared_1.thread_view_post_of_yojson 48 - 49 33 let thread_view_post_to_yojson = App_bsky_shared_1.thread_view_post_to_yojson 50 34 51 35 type not_found_post = App_bsky_shared_1.not_found_post 52 - 53 36 let not_found_post_of_yojson = App_bsky_shared_1.not_found_post_of_yojson 54 - 55 37 let not_found_post_to_yojson = App_bsky_shared_1.not_found_post_to_yojson 56 38 57 39 type blocked_post = App_bsky_shared_1.blocked_post 58 - 59 40 let blocked_post_of_yojson = App_bsky_shared_1.blocked_post_of_yojson 60 - 61 41 let blocked_post_to_yojson = App_bsky_shared_1.blocked_post_to_yojson 62 42 63 43 type blocked_author = App_bsky_shared_1.blocked_author 64 - 65 44 let blocked_author_of_yojson = App_bsky_shared_1.blocked_author_of_yojson 66 - 67 45 let blocked_author_to_yojson = App_bsky_shared_1.blocked_author_to_yojson 68 46 69 47 type generator_view = App_bsky_shared_1.generator_view 70 - 71 48 let generator_view_of_yojson = App_bsky_shared_1.generator_view_of_yojson 72 - 73 49 let generator_view_to_yojson = App_bsky_shared_1.generator_view_to_yojson 74 50 75 51 type generator_viewer_state = App_bsky_shared_1.generator_viewer_state 76 - 77 - let generator_viewer_state_of_yojson = 78 - App_bsky_shared_1.generator_viewer_state_of_yojson 79 - 80 - let generator_viewer_state_to_yojson = 81 - App_bsky_shared_1.generator_viewer_state_to_yojson 52 + let generator_viewer_state_of_yojson = App_bsky_shared_1.generator_viewer_state_of_yojson 53 + let generator_viewer_state_to_yojson = App_bsky_shared_1.generator_viewer_state_to_yojson 82 54 83 55 type skeleton_feed_post = App_bsky_shared_1.skeleton_feed_post 84 - 85 - let skeleton_feed_post_of_yojson = 86 - App_bsky_shared_1.skeleton_feed_post_of_yojson 87 - 88 - let skeleton_feed_post_to_yojson = 89 - App_bsky_shared_1.skeleton_feed_post_to_yojson 56 + let skeleton_feed_post_of_yojson = App_bsky_shared_1.skeleton_feed_post_of_yojson 57 + let skeleton_feed_post_to_yojson = App_bsky_shared_1.skeleton_feed_post_to_yojson 90 58 91 59 type skeleton_reason_repost = App_bsky_shared_1.skeleton_reason_repost 92 - 93 - let skeleton_reason_repost_of_yojson = 94 - App_bsky_shared_1.skeleton_reason_repost_of_yojson 95 - 96 - let skeleton_reason_repost_to_yojson = 97 - App_bsky_shared_1.skeleton_reason_repost_to_yojson 60 + let skeleton_reason_repost_of_yojson = App_bsky_shared_1.skeleton_reason_repost_of_yojson 61 + let skeleton_reason_repost_to_yojson = App_bsky_shared_1.skeleton_reason_repost_to_yojson 98 62 99 63 type skeleton_reason_pin = App_bsky_shared_1.skeleton_reason_pin 100 - 101 - let skeleton_reason_pin_of_yojson = 102 - App_bsky_shared_1.skeleton_reason_pin_of_yojson 103 - 104 - let skeleton_reason_pin_to_yojson = 105 - App_bsky_shared_1.skeleton_reason_pin_to_yojson 64 + let skeleton_reason_pin_of_yojson = App_bsky_shared_1.skeleton_reason_pin_of_yojson 65 + let skeleton_reason_pin_to_yojson = App_bsky_shared_1.skeleton_reason_pin_to_yojson 106 66 107 67 type threadgate_view = App_bsky_shared_1.threadgate_view 108 - 109 68 let threadgate_view_of_yojson = App_bsky_shared_1.threadgate_view_of_yojson 110 - 111 69 let threadgate_view_to_yojson = App_bsky_shared_1.threadgate_view_to_yojson 112 70 113 71 type interaction = App_bsky_shared_1.interaction 114 - 115 72 let interaction_of_yojson = App_bsky_shared_1.interaction_of_yojson 116 - 117 73 let interaction_to_yojson = App_bsky_shared_1.interaction_to_yojson 118 74 119 75 let request_less = App_bsky_shared_1.request_less ··· 143 99 let interaction_quote = App_bsky_shared_1.interaction_quote 144 100 145 101 let interaction_share = App_bsky_shared_1.interaction_share 102 +
+18 -7
pegasus/lexicons/app_bsky_feed_describeFeedGenerator.ml
··· 1 1 (* generated from app.bsky.feed.describeFeedGenerator *) 2 2 3 3 type links = 4 - { privacy_policy: string option [@key "privacyPolicy"] [@default None] 5 - ; terms_of_service: string option [@key "termsOfService"] [@default None] } 4 + { 5 + privacy_policy: string option [@key "privacyPolicy"] [@default None]; 6 + terms_of_service: string option [@key "termsOfService"] [@default None]; 7 + } 6 8 [@@deriving yojson {strict= false}] 7 9 8 - type feed = {uri: string} [@@deriving yojson {strict= false}] 10 + type feed = 11 + { 12 + uri: string; 13 + } 14 + [@@deriving yojson {strict= false}] 9 15 10 16 (** Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). *) 11 17 module Main = struct 12 18 let nsid = "app.bsky.feed.describeFeedGenerator" 13 19 14 20 type params = unit 15 - 16 21 let params_to_yojson () = `Assoc [] 17 22 18 23 type output = 19 - {did: string; feeds: feed list; links: links option [@default None]} 20 - [@@deriving yojson {strict= false}] 24 + { 25 + did: string; 26 + feeds: feed list; 27 + links: links option [@default None]; 28 + } 29 + [@@deriving yojson {strict= false}] 21 30 22 - let call (client : Hermes.client) : output Lwt.t = 31 + let call 32 + (client : Hermes.client) : output Lwt.t = 23 33 Hermes.query client nsid (`Assoc []) output_of_yojson 24 34 end 35 +
+22 -27
pegasus/lexicons/app_bsky_feed_generator.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "com.atproto.label.defs#selfLabels" -> ( 12 - match Com_atproto_label_defs.self_labels_of_yojson json with 13 - | Ok v -> 14 - Ok (SelfLabels v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "com.atproto.label.defs#selfLabels" -> 12 + (match Com_atproto_label_defs.self_labels_of_yojson json with 13 + | Ok v -> Ok (SelfLabels v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let labels_to_yojson = function 22 - | SelfLabels v -> ( 23 - match Com_atproto_label_defs.self_labels_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 26 - | other -> 27 - other ) 28 - | Unknown j -> 29 - j 19 + | SelfLabels v -> 20 + (match Com_atproto_label_defs.self_labels_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 30 24 31 25 type main = 32 - { did: string 33 - ; display_name: string [@key "displayName"] 34 - ; description: string option [@default None] 35 - ; description_facets: App_bsky_richtext_facet.main list option 36 - [@key "descriptionFacets"] [@default None] 37 - ; avatar: Hermes.blob option [@default None] 38 - ; accepts_interactions: bool option 39 - [@key "acceptsInteractions"] [@default None] 40 - ; labels: labels option [@default None] 41 - ; content_mode: string option [@key "contentMode"] [@default None] 42 - ; created_at: string [@key "createdAt"] } 26 + { 27 + did: string; 28 + display_name: string [@key "displayName"]; 29 + description: string option [@default None]; 30 + description_facets: App_bsky_richtext_facet.main list option [@key "descriptionFacets"] [@default None]; 31 + avatar: Hermes.blob option [@default None]; 32 + accepts_interactions: bool option [@key "acceptsInteractions"] [@default None]; 33 + labels: labels option [@default None]; 34 + content_mode: string option [@key "contentMode"] [@default None]; 35 + created_at: string [@key "createdAt"]; 36 + } 43 37 [@@deriving yojson {strict= false}] 38 +
+17 -8
pegasus/lexicons/app_bsky_feed_getActorFeeds.ml
··· 5 5 let nsid = "app.bsky.feed.getActorFeeds" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feeds: App_bsky_feed_defs.generator_view list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feeds: App_bsky_feed_defs.generator_view list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~actor 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {actor; limit; cursor} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+17 -8
pegasus/lexicons/app_bsky_feed_getActorLikes.ml
··· 5 5 let nsid = "app.bsky.feed.getActorLikes" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feed: App_bsky_feed_defs.feed_view_post list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feed: App_bsky_feed_defs.feed_view_post list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~actor 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {actor; limit; cursor} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+21 -11
pegasus/lexicons/app_bsky_feed_getAuthorFeed.ml
··· 5 5 let nsid = "app.bsky.feed.getAuthorFeed" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] 11 - ; filter: string option [@default None] 12 - ; include_pins: bool option [@key "includePins"] [@default None] } 13 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + filter: string option [@default None]; 13 + include_pins: bool option [@key "includePins"] [@default None]; 14 + } 15 + [@@xrpc_query] 14 16 15 17 type output = 16 - { cursor: string option [@default None] 17 - ; feed: App_bsky_feed_defs.feed_view_post list } 18 - [@@deriving yojson {strict= false}] 18 + { 19 + cursor: string option [@default None]; 20 + feed: App_bsky_feed_defs.feed_view_post list; 21 + } 22 + [@@deriving yojson {strict= false}] 19 23 20 - let call ~actor ?limit ?cursor ?filter ?include_pins (client : Hermes.client) 21 - : output Lwt.t = 24 + let call 25 + ~actor 26 + ?limit 27 + ?cursor 28 + ?filter 29 + ?include_pins 30 + (client : Hermes.client) : output Lwt.t = 22 31 let params : params = {actor; limit; cursor; filter; include_pins} in 23 32 Hermes.query client nsid (params_to_yojson params) output_of_yojson 24 33 end 34 +
+17 -8
pegasus/lexicons/app_bsky_feed_getFeed.ml
··· 5 5 let nsid = "app.bsky.feed.getFeed" 6 6 7 7 type params = 8 - { feed: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + feed: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feed: App_bsky_feed_defs.feed_view_post list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feed: App_bsky_feed_defs.feed_view_post list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ~feed ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~feed 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {feed; limit; cursor} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+15 -6
pegasus/lexicons/app_bsky_feed_getFeedGenerator.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.feed.getFeedGenerator" 6 6 7 - type params = {feed: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + feed: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = 10 - { view: App_bsky_feed_defs.generator_view 11 - ; is_online: bool [@key "isOnline"] 12 - ; is_valid: bool [@key "isValid"] } 13 - [@@deriving yojson {strict= false}] 14 + { 15 + view: App_bsky_feed_defs.generator_view; 16 + is_online: bool [@key "isOnline"]; 17 + is_valid: bool [@key "isValid"]; 18 + } 19 + [@@deriving yojson {strict= false}] 14 20 15 - let call ~feed (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ~feed 23 + (client : Hermes.client) : output Lwt.t = 16 24 let params : params = {feed} in 17 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 18 26 end 27 +
+13 -7
pegasus/lexicons/app_bsky_feed_getFeedGenerators.ml
··· 5 5 let nsid = "app.bsky.feed.getFeedGenerators" 6 6 7 7 type params = 8 - { feeds: string list 9 - [@of_yojson Hermes_util.query_string_list_of_yojson] 10 - [@to_yojson Hermes_util.query_string_list_to_yojson] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + feeds: string list; 10 + } 11 + [@@xrpc_query] 12 12 13 - type output = {feeds: App_bsky_feed_defs.generator_view list} 14 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + feeds: App_bsky_feed_defs.generator_view list; 16 + } 17 + [@@deriving yojson {strict= false}] 15 18 16 - let call ~feeds (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~feeds 21 + (client : Hermes.client) : output Lwt.t = 17 22 let params : params = {feeds} in 18 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 24 end 25 +
+18 -9
pegasus/lexicons/app_bsky_feed_getFeedSkeleton.ml
··· 5 5 let nsid = "app.bsky.feed.getFeedSkeleton" 6 6 7 7 type params = 8 - { feed: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + feed: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feed: App_bsky_feed_defs.skeleton_feed_post list 16 - ; req_id: string option [@key "reqId"] [@default None] } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feed: App_bsky_feed_defs.skeleton_feed_post list; 19 + req_id: string option [@key "reqId"] [@default None]; 20 + } 21 + [@@deriving yojson {strict= false}] 18 22 19 - let call ~feed ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~feed 25 + ?limit 26 + ?cursor 27 + (client : Hermes.client) : output Lwt.t = 20 28 let params : params = {feed; limit; cursor} in 21 29 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 30 end 31 +
+26 -14
pegasus/lexicons/app_bsky_feed_getLikes.ml
··· 1 1 (* generated from app.bsky.feed.getLikes *) 2 2 3 3 type like = 4 - { indexed_at: string [@key "indexedAt"] 5 - ; created_at: string [@key "createdAt"] 6 - ; actor: App_bsky_actor_defs.profile_view } 4 + { 5 + indexed_at: string [@key "indexedAt"]; 6 + created_at: string [@key "createdAt"]; 7 + actor: App_bsky_actor_defs.profile_view; 8 + } 7 9 [@@deriving yojson {strict= false}] 8 10 9 11 (** Get like records which reference a subject (by AT-URI and CID). *) ··· 11 13 let nsid = "app.bsky.feed.getLikes" 12 14 13 15 type params = 14 - { uri: string 15 - ; cid: string option [@default None] 16 - ; limit: int option [@default None] 17 - ; cursor: string option [@default None] } 18 - [@@deriving yojson {strict= false}] 16 + { 17 + uri: string; 18 + cid: string option [@default None]; 19 + limit: int option [@default None]; 20 + cursor: string option [@default None]; 21 + } 22 + [@@xrpc_query] 19 23 20 24 type output = 21 - { uri: string 22 - ; cid: string option [@default None] 23 - ; cursor: string option [@default None] 24 - ; likes: like list } 25 - [@@deriving yojson {strict= false}] 25 + { 26 + uri: string; 27 + cid: string option [@default None]; 28 + cursor: string option [@default None]; 29 + likes: like list; 30 + } 31 + [@@deriving yojson {strict= false}] 26 32 27 - let call ~uri ?cid ?limit ?cursor (client : Hermes.client) : output Lwt.t = 33 + let call 34 + ~uri 35 + ?cid 36 + ?limit 37 + ?cursor 38 + (client : Hermes.client) : output Lwt.t = 28 39 let params : params = {uri; cid; limit; cursor} in 29 40 Hermes.query client nsid (params_to_yojson params) output_of_yojson 30 41 end 42 +
+17 -8
pegasus/lexicons/app_bsky_feed_getListFeed.ml
··· 5 5 let nsid = "app.bsky.feed.getListFeed" 6 6 7 7 type params = 8 - { list_: string [@key "list"] 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + list_: string [@key "list"]; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feed: App_bsky_feed_defs.feed_view_post list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feed: App_bsky_feed_defs.feed_view_post list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ~list_ ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~list_ 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {list_; limit; cursor} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+54 -60
pegasus/lexicons/app_bsky_feed_getPostThread.ml
··· 5 5 let nsid = "app.bsky.feed.getPostThread" 6 6 7 7 type params = 8 - { uri: string 9 - ; depth: int option [@default None] 10 - ; parent_height: int option [@key "parentHeight"] [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + uri: string; 10 + depth: int option [@default None]; 11 + parent_height: int option [@key "parentHeight"] [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type thread = 14 - | ThreadViewPost of App_bsky_feed_defs.thread_view_post 15 - | NotFoundPost of App_bsky_feed_defs.not_found_post 16 - | BlockedPost of App_bsky_feed_defs.blocked_post 17 - | Unknown of Yojson.Safe.t 16 + | ThreadViewPost of App_bsky_feed_defs.thread_view_post 17 + | NotFoundPost of App_bsky_feed_defs.not_found_post 18 + | BlockedPost of App_bsky_feed_defs.blocked_post 19 + | Unknown of Yojson.Safe.t 18 20 19 - let thread_of_yojson json = 20 - let open Yojson.Safe.Util in 21 - try 22 - match json |> member "$type" |> to_string with 23 - | "app.bsky.feed.defs#threadViewPost" -> ( 24 - match App_bsky_feed_defs.thread_view_post_of_yojson json with 25 - | Ok v -> 26 - Ok (ThreadViewPost v) 27 - | Error e -> 28 - Error e ) 29 - | "app.bsky.feed.defs#notFoundPost" -> ( 30 - match App_bsky_feed_defs.not_found_post_of_yojson json with 31 - | Ok v -> 32 - Ok (NotFoundPost v) 33 - | Error e -> 34 - Error e ) 35 - | "app.bsky.feed.defs#blockedPost" -> ( 36 - match App_bsky_feed_defs.blocked_post_of_yojson json with 37 - | Ok v -> 38 - Ok (BlockedPost v) 39 - | Error e -> 40 - Error e ) 41 - | _ -> 42 - Ok (Unknown json) 43 - with _ -> Error "failed to parse union" 21 + let thread_of_yojson json = 22 + let open Yojson.Safe.Util in 23 + try 24 + match json |> member "$type" |> to_string with 25 + | "app.bsky.feed.defs#threadViewPost" -> 26 + (match App_bsky_feed_defs.thread_view_post_of_yojson json with 27 + | Ok v -> Ok (ThreadViewPost v) 28 + | Error e -> Error e) 29 + | "app.bsky.feed.defs#notFoundPost" -> 30 + (match App_bsky_feed_defs.not_found_post_of_yojson json with 31 + | Ok v -> Ok (NotFoundPost v) 32 + | Error e -> Error e) 33 + | "app.bsky.feed.defs#blockedPost" -> 34 + (match App_bsky_feed_defs.blocked_post_of_yojson json with 35 + | Ok v -> Ok (BlockedPost v) 36 + | Error e -> Error e) 37 + | _ -> Ok (Unknown json) 38 + with _ -> Error "failed to parse union" 44 39 45 - let thread_to_yojson = function 46 - | ThreadViewPost v -> ( 47 - match App_bsky_feed_defs.thread_view_post_to_yojson v with 48 - | `Assoc fields -> 49 - `Assoc 50 - (("$type", `String "app.bsky.feed.defs#threadViewPost") :: fields) 51 - | other -> 52 - other ) 53 - | NotFoundPost v -> ( 54 - match App_bsky_feed_defs.not_found_post_to_yojson v with 55 - | `Assoc fields -> 56 - `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 57 - | other -> 58 - other ) 59 - | BlockedPost v -> ( 60 - match App_bsky_feed_defs.blocked_post_to_yojson v with 61 - | `Assoc fields -> 62 - `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 63 - | other -> 64 - other ) 65 - | Unknown j -> 66 - j 40 + let thread_to_yojson = function 41 + | ThreadViewPost v -> 42 + (match App_bsky_feed_defs.thread_view_post_to_yojson v with 43 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#threadViewPost") :: fields) 44 + | other -> other) 45 + | NotFoundPost v -> 46 + (match App_bsky_feed_defs.not_found_post_to_yojson v with 47 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 48 + | other -> other) 49 + | BlockedPost v -> 50 + (match App_bsky_feed_defs.blocked_post_to_yojson v with 51 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 52 + | other -> other) 53 + | Unknown j -> j 67 54 68 - type output = 69 - { thread: thread 70 - ; threadgate: App_bsky_feed_defs.threadgate_view option [@default None] } 71 - [@@deriving yojson {strict= false}] 55 + type output = 56 + { 57 + thread: thread; 58 + threadgate: App_bsky_feed_defs.threadgate_view option [@default None]; 59 + } 60 + [@@deriving yojson {strict= false}] 72 61 73 - let call ~uri ?depth ?parent_height (client : Hermes.client) : output Lwt.t = 62 + let call 63 + ~uri 64 + ?depth 65 + ?parent_height 66 + (client : Hermes.client) : output Lwt.t = 74 67 let params : params = {uri; depth; parent_height} in 75 68 Hermes.query client nsid (params_to_yojson params) output_of_yojson 76 69 end 70 +
+13 -7
pegasus/lexicons/app_bsky_feed_getPosts.ml
··· 5 5 let nsid = "app.bsky.feed.getPosts" 6 6 7 7 type params = 8 - { uris: string list 9 - [@of_yojson Hermes_util.query_string_list_of_yojson] 10 - [@to_yojson Hermes_util.query_string_list_to_yojson] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + uris: string list; 10 + } 11 + [@@xrpc_query] 12 12 13 - type output = {posts: App_bsky_feed_defs.post_view list} 14 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + posts: App_bsky_feed_defs.post_view list; 16 + } 17 + [@@deriving yojson {strict= false}] 15 18 16 - let call ~uris (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~uris 21 + (client : Hermes.client) : output Lwt.t = 17 22 let params : params = {uris} in 18 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 24 end 25 +
+21 -11
pegasus/lexicons/app_bsky_feed_getQuotes.ml
··· 5 5 let nsid = "app.bsky.feed.getQuotes" 6 6 7 7 type params = 8 - { uri: string 9 - ; cid: string option [@default None] 10 - ; limit: int option [@default None] 11 - ; cursor: string option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + uri: string; 10 + cid: string option [@default None]; 11 + limit: int option [@default None]; 12 + cursor: string option [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 16 type output = 15 - { uri: string 16 - ; cid: string option [@default None] 17 - ; cursor: string option [@default None] 18 - ; posts: App_bsky_feed_defs.post_view list } 19 - [@@deriving yojson {strict= false}] 17 + { 18 + uri: string; 19 + cid: string option [@default None]; 20 + cursor: string option [@default None]; 21 + posts: App_bsky_feed_defs.post_view list; 22 + } 23 + [@@deriving yojson {strict= false}] 20 24 21 - let call ~uri ?cid ?limit ?cursor (client : Hermes.client) : output Lwt.t = 25 + let call 26 + ~uri 27 + ?cid 28 + ?limit 29 + ?cursor 30 + (client : Hermes.client) : output Lwt.t = 22 31 let params : params = {uri; cid; limit; cursor} in 23 32 Hermes.query client nsid (params_to_yojson params) output_of_yojson 24 33 end 34 +
+21 -11
pegasus/lexicons/app_bsky_feed_getRepostedBy.ml
··· 5 5 let nsid = "app.bsky.feed.getRepostedBy" 6 6 7 7 type params = 8 - { uri: string 9 - ; cid: string option [@default None] 10 - ; limit: int option [@default None] 11 - ; cursor: string option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + uri: string; 10 + cid: string option [@default None]; 11 + limit: int option [@default None]; 12 + cursor: string option [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 16 type output = 15 - { uri: string 16 - ; cid: string option [@default None] 17 - ; cursor: string option [@default None] 18 - ; reposted_by: App_bsky_actor_defs.profile_view list [@key "repostedBy"] } 19 - [@@deriving yojson {strict= false}] 17 + { 18 + uri: string; 19 + cid: string option [@default None]; 20 + cursor: string option [@default None]; 21 + reposted_by: App_bsky_actor_defs.profile_view list [@key "repostedBy"]; 22 + } 23 + [@@deriving yojson {strict= false}] 20 24 21 - let call ~uri ?cid ?limit ?cursor (client : Hermes.client) : output Lwt.t = 25 + let call 26 + ~uri 27 + ?cid 28 + ?limit 29 + ?cursor 30 + (client : Hermes.client) : output Lwt.t = 22 31 let params : params = {uri; cid; limit; cursor} in 23 32 Hermes.query client nsid (params_to_yojson params) output_of_yojson 24 33 end 34 +
+15 -6
pegasus/lexicons/app_bsky_feed_getSuggestedFeeds.ml
··· 5 5 let nsid = "app.bsky.feed.getSuggestedFeeds" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; feeds: App_bsky_feed_defs.generator_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + feeds: App_bsky_feed_defs.generator_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+17 -8
pegasus/lexicons/app_bsky_feed_getTimeline.ml
··· 5 5 let nsid = "app.bsky.feed.getTimeline" 6 6 7 7 type params = 8 - { algorithm: string option [@default None] 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + algorithm: string option [@default None]; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feed: App_bsky_feed_defs.feed_view_post list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feed: App_bsky_feed_defs.feed_view_post list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ?algorithm ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ?algorithm 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {algorithm; limit; cursor} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+6 -3
pegasus/lexicons/app_bsky_feed_like.ml
··· 1 1 (* generated from app.bsky.feed.like *) 2 2 3 3 type main = 4 - { subject: Com_atproto_repo_strongRef.main 5 - ; created_at: string [@key "createdAt"] 6 - ; via: Com_atproto_repo_strongRef.main option [@default None] } 4 + { 5 + subject: Com_atproto_repo_strongRef.main; 6 + created_at: string [@key "createdAt"]; 7 + via: Com_atproto_repo_strongRef.main option [@default None]; 8 + } 7 9 [@@deriving yojson {strict= false}] 10 +
+79 -93
pegasus/lexicons/app_bsky_feed_post.ml
··· 1 1 (* generated from app.bsky.feed.post *) 2 2 3 3 type reply_ref = 4 - { root: Com_atproto_repo_strongRef.main 5 - ; parent: Com_atproto_repo_strongRef.main } 4 + { 5 + root: Com_atproto_repo_strongRef.main; 6 + parent: Com_atproto_repo_strongRef.main; 7 + } 6 8 [@@deriving yojson {strict= false}] 7 9 8 - type text_slice = {start: int; end_: int [@key "end"]} 10 + type text_slice = 11 + { 12 + start: int; 13 + end_: int [@key "end"]; 14 + } 9 15 [@@deriving yojson {strict= false}] 10 16 11 - type entity = {index: text_slice; type_: string [@key "type"]; value: string} 17 + type entity = 18 + { 19 + index: text_slice; 20 + type_: string [@key "type"]; 21 + value: string; 22 + } 12 23 [@@deriving yojson {strict= false}] 13 24 14 25 type labels = ··· 19 30 let open Yojson.Safe.Util in 20 31 try 21 32 match json |> member "$type" |> to_string with 22 - | "com.atproto.label.defs#selfLabels" -> ( 23 - match Com_atproto_label_defs.self_labels_of_yojson json with 24 - | Ok v -> 25 - Ok (SelfLabels v) 26 - | Error e -> 27 - Error e ) 28 - | _ -> 29 - Ok (Unknown json) 33 + | "com.atproto.label.defs#selfLabels" -> 34 + (match Com_atproto_label_defs.self_labels_of_yojson json with 35 + | Ok v -> Ok (SelfLabels v) 36 + | Error e -> Error e) 37 + | _ -> Ok (Unknown json) 30 38 with _ -> Error "failed to parse union" 31 39 32 40 let labels_to_yojson = function 33 - | SelfLabels v -> ( 34 - match Com_atproto_label_defs.self_labels_to_yojson v with 35 - | `Assoc fields -> 36 - `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 37 - | other -> 38 - other ) 39 - | Unknown j -> 40 - j 41 + | SelfLabels v -> 42 + (match Com_atproto_label_defs.self_labels_to_yojson v with 43 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 44 + | other -> other) 45 + | Unknown j -> j 41 46 42 47 type embed = 43 48 | Images of App_bsky_embed_images.main ··· 51 56 let open Yojson.Safe.Util in 52 57 try 53 58 match json |> member "$type" |> to_string with 54 - | "app.bsky.embed.images" -> ( 55 - match App_bsky_embed_images.main_of_yojson json with 56 - | Ok v -> 57 - Ok (Images v) 58 - | Error e -> 59 - Error e ) 60 - | "app.bsky.embed.video" -> ( 61 - match App_bsky_embed_video.main_of_yojson json with 62 - | Ok v -> 63 - Ok (Video v) 64 - | Error e -> 65 - Error e ) 66 - | "app.bsky.embed.external" -> ( 67 - match App_bsky_embed_external.main_of_yojson json with 68 - | Ok v -> 69 - Ok (External v) 70 - | Error e -> 71 - Error e ) 72 - | "app.bsky.embed.record" -> ( 73 - match App_bsky_embed_record.main_of_yojson json with 74 - | Ok v -> 75 - Ok (Record v) 76 - | Error e -> 77 - Error e ) 78 - | "app.bsky.embed.recordWithMedia" -> ( 79 - match App_bsky_embed_recordWithMedia.main_of_yojson json with 80 - | Ok v -> 81 - Ok (RecordWithMedia v) 82 - | Error e -> 83 - Error e ) 84 - | _ -> 85 - Ok (Unknown json) 59 + | "app.bsky.embed.images" -> 60 + (match App_bsky_embed_images.main_of_yojson json with 61 + | Ok v -> Ok (Images v) 62 + | Error e -> Error e) 63 + | "app.bsky.embed.video" -> 64 + (match App_bsky_embed_video.main_of_yojson json with 65 + | Ok v -> Ok (Video v) 66 + | Error e -> Error e) 67 + | "app.bsky.embed.external" -> 68 + (match App_bsky_embed_external.main_of_yojson json with 69 + | Ok v -> Ok (External v) 70 + | Error e -> Error e) 71 + | "app.bsky.embed.record" -> 72 + (match App_bsky_embed_record.main_of_yojson json with 73 + | Ok v -> Ok (Record v) 74 + | Error e -> Error e) 75 + | "app.bsky.embed.recordWithMedia" -> 76 + (match App_bsky_embed_recordWithMedia.main_of_yojson json with 77 + | Ok v -> Ok (RecordWithMedia v) 78 + | Error e -> Error e) 79 + | _ -> Ok (Unknown json) 86 80 with _ -> Error "failed to parse union" 87 81 88 82 let embed_to_yojson = function 89 - | Images v -> ( 90 - match App_bsky_embed_images.main_to_yojson v with 91 - | `Assoc fields -> 92 - `Assoc (("$type", `String "app.bsky.embed.images") :: fields) 93 - | other -> 94 - other ) 95 - | Video v -> ( 96 - match App_bsky_embed_video.main_to_yojson v with 97 - | `Assoc fields -> 98 - `Assoc (("$type", `String "app.bsky.embed.video") :: fields) 99 - | other -> 100 - other ) 101 - | External v -> ( 102 - match App_bsky_embed_external.main_to_yojson v with 103 - | `Assoc fields -> 104 - `Assoc (("$type", `String "app.bsky.embed.external") :: fields) 105 - | other -> 106 - other ) 107 - | Record v -> ( 108 - match App_bsky_embed_record.main_to_yojson v with 109 - | `Assoc fields -> 110 - `Assoc (("$type", `String "app.bsky.embed.record") :: fields) 111 - | other -> 112 - other ) 113 - | RecordWithMedia v -> ( 114 - match App_bsky_embed_recordWithMedia.main_to_yojson v with 115 - | `Assoc fields -> 116 - `Assoc (("$type", `String "app.bsky.embed.recordWithMedia") :: fields) 117 - | other -> 118 - other ) 119 - | Unknown j -> 120 - j 83 + | Images v -> 84 + (match App_bsky_embed_images.main_to_yojson v with 85 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.images") :: fields) 86 + | other -> other) 87 + | Video v -> 88 + (match App_bsky_embed_video.main_to_yojson v with 89 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.video") :: fields) 90 + | other -> other) 91 + | External v -> 92 + (match App_bsky_embed_external.main_to_yojson v with 93 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.external") :: fields) 94 + | other -> other) 95 + | Record v -> 96 + (match App_bsky_embed_record.main_to_yojson v with 97 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record") :: fields) 98 + | other -> other) 99 + | RecordWithMedia v -> 100 + (match App_bsky_embed_recordWithMedia.main_to_yojson v with 101 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.recordWithMedia") :: fields) 102 + | other -> other) 103 + | Unknown j -> j 121 104 122 105 type main = 123 - { text: string 124 - ; entities: entity list option [@default None] 125 - ; facets: App_bsky_richtext_facet.main list option [@default None] 126 - ; reply: reply_ref option [@default None] 127 - ; embed: embed option [@default None] 128 - ; langs: string list option [@default None] 129 - ; labels: labels option [@default None] 130 - ; tags: string list option [@default None] 131 - ; created_at: string [@key "createdAt"] } 106 + { 107 + text: string; 108 + entities: entity list option [@default None]; 109 + facets: App_bsky_richtext_facet.main list option [@default None]; 110 + reply: reply_ref option [@default None]; 111 + embed: embed option [@default None]; 112 + langs: string list option [@default None]; 113 + labels: labels option [@default None]; 114 + tags: string list option [@default None]; 115 + created_at: string [@key "createdAt"]; 116 + } 132 117 [@@deriving yojson {strict= false}] 118 +
+17 -25
pegasus/lexicons/app_bsky_feed_postgate.ml
··· 1 1 (* generated from app.bsky.feed.postgate *) 2 2 3 3 type disable_rule = unit 4 - 5 4 let disable_rule_of_yojson _ = Ok () 6 - 7 5 let disable_rule_to_yojson () = `Assoc [] 8 6 9 7 type embedding_rules_item = ··· 14 12 let open Yojson.Safe.Util in 15 13 try 16 14 match json |> member "$type" |> to_string with 17 - | "app.bsky.feed.postgate#disableRule" -> ( 18 - match disable_rule_of_yojson json with 19 - | Ok v -> 20 - Ok (DisableRule v) 21 - | Error e -> 22 - Error e ) 23 - | _ -> 24 - Ok (Unknown json) 15 + | "app.bsky.feed.postgate#disableRule" -> 16 + (match disable_rule_of_yojson json with 17 + | Ok v -> Ok (DisableRule v) 18 + | Error e -> Error e) 19 + | _ -> Ok (Unknown json) 25 20 with _ -> Error "failed to parse union" 26 21 27 22 let embedding_rules_item_to_yojson = function 28 - | DisableRule v -> ( 29 - match disable_rule_to_yojson v with 30 - | `Assoc fields -> 31 - `Assoc 32 - (("$type", `String "app.bsky.feed.postgate#disableRule") :: fields) 33 - | other -> 34 - other ) 35 - | Unknown j -> 36 - j 23 + | DisableRule v -> 24 + (match disable_rule_to_yojson v with 25 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.postgate#disableRule") :: fields) 26 + | other -> other) 27 + | Unknown j -> j 37 28 38 29 type main = 39 - { created_at: string [@key "createdAt"] 40 - ; post: string 41 - ; detached_embedding_uris: string list option 42 - [@key "detachedEmbeddingUris"] [@default None] 43 - ; embedding_rules: embedding_rules_item list option 44 - [@key "embeddingRules"] [@default None] } 30 + { 31 + created_at: string [@key "createdAt"]; 32 + post: string; 33 + detached_embedding_uris: string list option [@key "detachedEmbeddingUris"] [@default None]; 34 + embedding_rules: embedding_rules_item list option [@key "embeddingRules"] [@default None]; 35 + } 45 36 [@@deriving yojson {strict= false}] 37 +
+6 -3
pegasus/lexicons/app_bsky_feed_repost.ml
··· 1 1 (* generated from app.bsky.feed.repost *) 2 2 3 3 type main = 4 - { subject: Com_atproto_repo_strongRef.main 5 - ; created_at: string [@key "createdAt"] 6 - ; via: Com_atproto_repo_strongRef.main option [@default None] } 4 + { 5 + subject: Com_atproto_repo_strongRef.main; 6 + created_at: string [@key "createdAt"]; 7 + via: Com_atproto_repo_strongRef.main option [@default None]; 8 + } 7 9 [@@deriving yojson {strict= false}] 10 +
+37 -36
pegasus/lexicons/app_bsky_feed_searchPosts.ml
··· 5 5 let nsid = "app.bsky.feed.searchPosts" 6 6 7 7 type params = 8 - { q: string 9 - ; sort: string option [@default None] 10 - ; since: string option [@default None] 11 - ; until: string option [@default None] 12 - ; mentions: string option [@default None] 13 - ; author: string option [@default None] 14 - ; lang: string option [@default None] 15 - ; domain: string option [@default None] 16 - ; url: string option [@default None] 17 - ; tag: string list option 18 - [@default None] 19 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 20 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] 21 - ; limit: int option [@default None] 22 - ; cursor: string option [@default None] } 23 - [@@deriving yojson {strict= false}] 8 + { 9 + q: string; 10 + sort: string option [@default None]; 11 + since: string option [@default None]; 12 + until: string option [@default None]; 13 + mentions: string option [@default None]; 14 + author: string option [@default None]; 15 + lang: string option [@default None]; 16 + domain: string option [@default None]; 17 + url: string option [@default None]; 18 + tag: string list option [@default None]; 19 + limit: int option [@default None]; 20 + cursor: string option [@default None]; 21 + } 22 + [@@xrpc_query] 24 23 25 24 type output = 26 - { cursor: string option [@default None] 27 - ; hits_total: int option [@key "hitsTotal"] [@default None] 28 - ; posts: App_bsky_feed_defs.post_view list } 29 - [@@deriving yojson {strict= false}] 25 + { 26 + cursor: string option [@default None]; 27 + hits_total: int option [@key "hitsTotal"] [@default None]; 28 + posts: App_bsky_feed_defs.post_view list; 29 + } 30 + [@@deriving yojson {strict= false}] 30 31 31 - let call ~q ?sort ?since ?until ?mentions ?author ?lang ?domain ?url ?tag 32 - ?limit ?cursor (client : Hermes.client) : output Lwt.t = 33 - let params : params = 34 - { q 35 - ; sort 36 - ; since 37 - ; until 38 - ; mentions 39 - ; author 40 - ; lang 41 - ; domain 42 - ; url 43 - ; tag 44 - ; limit 45 - ; cursor } 46 - in 32 + let call 33 + ~q 34 + ?sort 35 + ?since 36 + ?until 37 + ?mentions 38 + ?author 39 + ?lang 40 + ?domain 41 + ?url 42 + ?tag 43 + ?limit 44 + ?cursor 45 + (client : Hermes.client) : output Lwt.t = 46 + let params : params = {q; sort; since; until; mentions; author; lang; domain; url; tag; limit; cursor} in 47 47 Hermes.query client nsid (params_to_yojson params) output_of_yojson 48 48 end 49 +
+14 -10
pegasus/lexicons/app_bsky_feed_sendInteractions.ml
··· 5 5 let nsid = "app.bsky.feed.sendInteractions" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {interactions: App_bsky_feed_defs.interaction list} 10 + type input = 11 + { 12 + feed: string option [@default None]; 13 + interactions: App_bsky_feed_defs.interaction list; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 - let output_of_yojson _ = Ok () 17 - 18 - let output_to_yojson () = `Assoc [] 18 + let output_of_yojson _ = Ok () 19 + let output_to_yojson () = `Assoc [] 19 20 20 - let call ~interactions (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?feed 23 + ~interactions 24 + (client : Hermes.client) : output Lwt.t = 21 25 let params = () in 22 - let input = Some ({interactions} |> input_to_yojson) in 23 - Hermes.procedure client nsid (params_to_yojson params) input 24 - output_of_yojson 26 + let input = Some ({feed; interactions} |> input_to_yojson) in 27 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 25 28 end 29 +
+45 -66
pegasus/lexicons/app_bsky_feed_threadgate.ml
··· 1 1 (* generated from app.bsky.feed.threadgate *) 2 2 3 - type list_rule = {list_: string [@key "list"]} 3 + type list_rule = 4 + { 5 + list_: string [@key "list"]; 6 + } 4 7 [@@deriving yojson {strict= false}] 5 8 6 9 type following_rule = unit 7 - 8 10 let following_rule_of_yojson _ = Ok () 9 - 10 11 let following_rule_to_yojson () = `Assoc [] 11 12 12 13 type follower_rule = unit 13 - 14 14 let follower_rule_of_yojson _ = Ok () 15 - 16 15 let follower_rule_to_yojson () = `Assoc [] 17 16 18 17 type mention_rule = unit 19 - 20 18 let mention_rule_of_yojson _ = Ok () 21 - 22 19 let mention_rule_to_yojson () = `Assoc [] 23 20 24 21 type allow_item = ··· 32 29 let open Yojson.Safe.Util in 33 30 try 34 31 match json |> member "$type" |> to_string with 35 - | "app.bsky.feed.threadgate#mentionRule" -> ( 36 - match mention_rule_of_yojson json with 37 - | Ok v -> 38 - Ok (MentionRule v) 39 - | Error e -> 40 - Error e ) 41 - | "app.bsky.feed.threadgate#followerRule" -> ( 42 - match follower_rule_of_yojson json with 43 - | Ok v -> 44 - Ok (FollowerRule v) 45 - | Error e -> 46 - Error e ) 47 - | "app.bsky.feed.threadgate#followingRule" -> ( 48 - match following_rule_of_yojson json with 49 - | Ok v -> 50 - Ok (FollowingRule v) 51 - | Error e -> 52 - Error e ) 53 - | "app.bsky.feed.threadgate#listRule" -> ( 54 - match list_rule_of_yojson json with 55 - | Ok v -> 56 - Ok (ListRule v) 57 - | Error e -> 58 - Error e ) 59 - | _ -> 60 - Ok (Unknown json) 32 + | "app.bsky.feed.threadgate#mentionRule" -> 33 + (match mention_rule_of_yojson json with 34 + | Ok v -> Ok (MentionRule v) 35 + | Error e -> Error e) 36 + | "app.bsky.feed.threadgate#followerRule" -> 37 + (match follower_rule_of_yojson json with 38 + | Ok v -> Ok (FollowerRule v) 39 + | Error e -> Error e) 40 + | "app.bsky.feed.threadgate#followingRule" -> 41 + (match following_rule_of_yojson json with 42 + | Ok v -> Ok (FollowingRule v) 43 + | Error e -> Error e) 44 + | "app.bsky.feed.threadgate#listRule" -> 45 + (match list_rule_of_yojson json with 46 + | Ok v -> Ok (ListRule v) 47 + | Error e -> Error e) 48 + | _ -> Ok (Unknown json) 61 49 with _ -> Error "failed to parse union" 62 50 63 51 let allow_item_to_yojson = function 64 - | MentionRule v -> ( 65 - match mention_rule_to_yojson v with 66 - | `Assoc fields -> 67 - `Assoc 68 - (("$type", `String "app.bsky.feed.threadgate#mentionRule") :: fields) 69 - | other -> 70 - other ) 71 - | FollowerRule v -> ( 72 - match follower_rule_to_yojson v with 73 - | `Assoc fields -> 74 - `Assoc 75 - (("$type", `String "app.bsky.feed.threadgate#followerRule") :: fields) 76 - | other -> 77 - other ) 78 - | FollowingRule v -> ( 79 - match following_rule_to_yojson v with 80 - | `Assoc fields -> 81 - `Assoc 82 - (("$type", `String "app.bsky.feed.threadgate#followingRule") :: fields) 83 - | other -> 84 - other ) 85 - | ListRule v -> ( 86 - match list_rule_to_yojson v with 87 - | `Assoc fields -> 88 - `Assoc (("$type", `String "app.bsky.feed.threadgate#listRule") :: fields) 89 - | other -> 90 - other ) 91 - | Unknown j -> 92 - j 52 + | MentionRule v -> 53 + (match mention_rule_to_yojson v with 54 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#mentionRule") :: fields) 55 + | other -> other) 56 + | FollowerRule v -> 57 + (match follower_rule_to_yojson v with 58 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#followerRule") :: fields) 59 + | other -> other) 60 + | FollowingRule v -> 61 + (match following_rule_to_yojson v with 62 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#followingRule") :: fields) 63 + | other -> other) 64 + | ListRule v -> 65 + (match list_rule_to_yojson v with 66 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#listRule") :: fields) 67 + | other -> other) 68 + | Unknown j -> j 93 69 94 70 type main = 95 - { post: string 96 - ; allow: allow_item list option [@default None] 97 - ; created_at: string [@key "createdAt"] 98 - ; hidden_replies: string list option [@key "hiddenReplies"] [@default None] } 71 + { 72 + post: string; 73 + allow: allow_item list option [@default None]; 74 + created_at: string [@key "createdAt"]; 75 + hidden_replies: string list option [@key "hiddenReplies"] [@default None]; 76 + } 99 77 [@@deriving yojson {strict= false}] 78 +
+6 -1
pegasus/lexicons/app_bsky_graph_block.ml
··· 1 1 (* generated from app.bsky.graph.block *) 2 2 3 - type main = {subject: string; created_at: string [@key "createdAt"]} 3 + type main = 4 + { 5 + subject: string; 6 + created_at: string [@key "createdAt"]; 7 + } 4 8 [@@deriving yojson {strict= false}] 9 +
+3 -22
pegasus/lexicons/app_bsky_graph_defs.ml
··· 1 1 (* re-exported from App_bsky_shared_1 *) 2 2 3 3 type list_view_basic = App_bsky_shared_1.list_view_basic 4 - 5 4 let list_view_basic_of_yojson = App_bsky_shared_1.list_view_basic_of_yojson 6 - 7 5 let list_view_basic_to_yojson = App_bsky_shared_1.list_view_basic_to_yojson 8 6 9 7 type list_view = App_bsky_shared_1.list_view 10 - 11 8 let list_view_of_yojson = App_bsky_shared_1.list_view_of_yojson 12 - 13 9 let list_view_to_yojson = App_bsky_shared_1.list_view_to_yojson 14 10 15 11 type list_item_view = App_bsky_shared_1.list_item_view 16 - 17 12 let list_item_view_of_yojson = App_bsky_shared_1.list_item_view_of_yojson 18 - 19 13 let list_item_view_to_yojson = App_bsky_shared_1.list_item_view_to_yojson 20 14 21 15 type starter_pack_view = App_bsky_shared_1.starter_pack_view 22 - 23 16 let starter_pack_view_of_yojson = App_bsky_shared_1.starter_pack_view_of_yojson 24 - 25 17 let starter_pack_view_to_yojson = App_bsky_shared_1.starter_pack_view_to_yojson 26 18 27 19 type starter_pack_view_basic = App_bsky_shared_1.starter_pack_view_basic 28 - 29 - let starter_pack_view_basic_of_yojson = 30 - App_bsky_shared_1.starter_pack_view_basic_of_yojson 31 - 32 - let starter_pack_view_basic_to_yojson = 33 - App_bsky_shared_1.starter_pack_view_basic_to_yojson 20 + let starter_pack_view_basic_of_yojson = App_bsky_shared_1.starter_pack_view_basic_of_yojson 21 + let starter_pack_view_basic_to_yojson = App_bsky_shared_1.starter_pack_view_basic_to_yojson 34 22 35 23 type list_purpose = App_bsky_shared_1.list_purpose 36 - 37 24 let list_purpose_of_yojson = App_bsky_shared_1.list_purpose_of_yojson 38 - 39 25 let list_purpose_to_yojson = App_bsky_shared_1.list_purpose_to_yojson 40 26 41 27 let modlist = App_bsky_shared_1.modlist ··· 45 31 let referencelist = App_bsky_shared_1.referencelist 46 32 47 33 type list_viewer_state = App_bsky_shared_1.list_viewer_state 48 - 49 34 let list_viewer_state_of_yojson = App_bsky_shared_1.list_viewer_state_of_yojson 50 - 51 35 let list_viewer_state_to_yojson = App_bsky_shared_1.list_viewer_state_to_yojson 52 36 53 37 type not_found_actor = App_bsky_shared_1.not_found_actor 54 - 55 38 let not_found_actor_of_yojson = App_bsky_shared_1.not_found_actor_of_yojson 56 - 57 39 let not_found_actor_to_yojson = App_bsky_shared_1.not_found_actor_to_yojson 58 40 59 41 type relationship = App_bsky_shared_1.relationship 60 - 61 42 let relationship_of_yojson = App_bsky_shared_1.relationship_of_yojson 43 + let relationship_to_yojson = App_bsky_shared_1.relationship_to_yojson 62 44 63 - let relationship_to_yojson = App_bsky_shared_1.relationship_to_yojson
+7 -1
pegasus/lexicons/app_bsky_graph_follow.ml
··· 1 1 (* generated from app.bsky.graph.follow *) 2 2 3 - type main = {subject: string; created_at: string [@key "createdAt"]} 3 + type main = 4 + { 5 + subject: string; 6 + created_at: string [@key "createdAt"]; 7 + via: Com_atproto_repo_strongRef.main option [@default None]; 8 + } 4 9 [@@deriving yojson {strict= false}] 10 +
+17 -9
pegasus/lexicons/app_bsky_graph_getActorStarterPacks.ml
··· 5 5 let nsid = "app.bsky.graph.getActorStarterPacks" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; starter_packs: App_bsky_graph_defs.starter_pack_view_basic list 16 - [@key "starterPacks"] } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + starter_packs: App_bsky_graph_defs.starter_pack_view_basic list [@key "starterPacks"]; 19 + } 20 + [@@deriving yojson {strict= false}] 18 21 19 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~actor 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 20 27 let params : params = {actor; limit; cursor} in 21 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 29 end 30 +
+15 -6
pegasus/lexicons/app_bsky_graph_getBlocks.ml
··· 5 5 let nsid = "app.bsky.graph.getBlocks" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; blocks: App_bsky_actor_defs.profile_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + blocks: App_bsky_actor_defs.profile_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+18 -9
pegasus/lexicons/app_bsky_graph_getFollowers.ml
··· 5 5 let nsid = "app.bsky.graph.getFollowers" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { subject: App_bsky_actor_defs.profile_view 15 - ; cursor: string option [@default None] 16 - ; followers: App_bsky_actor_defs.profile_view list } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + subject: App_bsky_actor_defs.profile_view; 18 + cursor: string option [@default None]; 19 + followers: App_bsky_actor_defs.profile_view list; 20 + } 21 + [@@deriving yojson {strict= false}] 18 22 19 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~actor 25 + ?limit 26 + ?cursor 27 + (client : Hermes.client) : output Lwt.t = 20 28 let params : params = {actor; limit; cursor} in 21 29 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 30 end 31 +
+18 -9
pegasus/lexicons/app_bsky_graph_getFollows.ml
··· 5 5 let nsid = "app.bsky.graph.getFollows" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { subject: App_bsky_actor_defs.profile_view 15 - ; cursor: string option [@default None] 16 - ; follows: App_bsky_actor_defs.profile_view list } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + subject: App_bsky_actor_defs.profile_view; 18 + cursor: string option [@default None]; 19 + follows: App_bsky_actor_defs.profile_view list; 20 + } 21 + [@@deriving yojson {strict= false}] 18 22 19 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~actor 25 + ?limit 26 + ?cursor 27 + (client : Hermes.client) : output Lwt.t = 20 28 let params : params = {actor; limit; cursor} in 21 29 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 30 end 31 +
+18 -9
pegasus/lexicons/app_bsky_graph_getKnownFollowers.ml
··· 5 5 let nsid = "app.bsky.graph.getKnownFollowers" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { subject: App_bsky_actor_defs.profile_view 15 - ; cursor: string option [@default None] 16 - ; followers: App_bsky_actor_defs.profile_view list } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + subject: App_bsky_actor_defs.profile_view; 18 + cursor: string option [@default None]; 19 + followers: App_bsky_actor_defs.profile_view list; 20 + } 21 + [@@deriving yojson {strict= false}] 18 22 19 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~actor 25 + ?limit 26 + ?cursor 27 + (client : Hermes.client) : output Lwt.t = 20 28 let params : params = {actor; limit; cursor} in 21 29 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 30 end 31 +
+18 -9
pegasus/lexicons/app_bsky_graph_getList.ml
··· 5 5 let nsid = "app.bsky.graph.getList" 6 6 7 7 type params = 8 - { list_: string [@key "list"] 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + list_: string [@key "list"]; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; list_: App_bsky_graph_defs.list_view [@key "list"] 16 - ; items: App_bsky_graph_defs.list_item_view list } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + list_: App_bsky_graph_defs.list_view [@key "list"]; 19 + items: App_bsky_graph_defs.list_item_view list; 20 + } 21 + [@@deriving yojson {strict= false}] 18 22 19 - let call ~list_ ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~list_ 25 + ?limit 26 + ?cursor 27 + (client : Hermes.client) : output Lwt.t = 20 28 let params : params = {list_; limit; cursor} in 21 29 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 30 end 31 +
+15 -6
pegasus/lexicons/app_bsky_graph_getListBlocks.ml
··· 5 5 let nsid = "app.bsky.graph.getListBlocks" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; lists: App_bsky_graph_defs.list_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + lists: App_bsky_graph_defs.list_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+15 -6
pegasus/lexicons/app_bsky_graph_getListMutes.ml
··· 5 5 let nsid = "app.bsky.graph.getListMutes" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; lists: App_bsky_graph_defs.list_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + lists: App_bsky_graph_defs.list_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+19 -13
pegasus/lexicons/app_bsky_graph_getLists.ml
··· 5 5 let nsid = "app.bsky.graph.getLists" 6 6 7 7 type params = 8 - { actor: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] 11 - ; purposes: string list option 12 - [@default None] 13 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 14 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] } 15 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + purposes: string list option [@default None]; 13 + } 14 + [@@xrpc_query] 16 15 17 16 type output = 18 - { cursor: string option [@default None] 19 - ; lists: App_bsky_graph_defs.list_view list } 20 - [@@deriving yojson {strict= false}] 17 + { 18 + cursor: string option [@default None]; 19 + lists: App_bsky_graph_defs.list_view list; 20 + } 21 + [@@deriving yojson {strict= false}] 21 22 22 - let call ~actor ?limit ?cursor ?purposes (client : Hermes.client) : 23 - output Lwt.t = 23 + let call 24 + ~actor 25 + ?limit 26 + ?cursor 27 + ?purposes 28 + (client : Hermes.client) : output Lwt.t = 24 29 let params : params = {actor; limit; cursor; purposes} in 25 30 Hermes.query client nsid (params_to_yojson params) output_of_yojson 26 31 end 32 +
+23 -17
pegasus/lexicons/app_bsky_graph_getListsWithMembership.ml
··· 1 1 (* generated from app.bsky.graph.getListsWithMembership *) 2 2 3 3 type list_with_membership = 4 - { list_: App_bsky_graph_defs.list_view [@key "list"] 5 - ; list_item: App_bsky_graph_defs.list_item_view option 6 - [@key "listItem"] [@default None] } 4 + { 5 + list_: App_bsky_graph_defs.list_view [@key "list"]; 6 + list_item: App_bsky_graph_defs.list_item_view option [@key "listItem"] [@default None]; 7 + } 7 8 [@@deriving yojson {strict= false}] 8 9 9 10 (** Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth. *) ··· 11 12 let nsid = "app.bsky.graph.getListsWithMembership" 12 13 13 14 type params = 14 - { actor: string 15 - ; limit: int option [@default None] 16 - ; cursor: string option [@default None] 17 - ; purposes: string list option 18 - [@default None] 19 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 20 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] } 21 - [@@deriving yojson {strict= false}] 15 + { 16 + actor: string; 17 + limit: int option [@default None]; 18 + cursor: string option [@default None]; 19 + purposes: string list option [@default None]; 20 + } 21 + [@@xrpc_query] 22 22 23 23 type output = 24 - { cursor: string option [@default None] 25 - ; lists_with_membership: list_with_membership list 26 - [@key "listsWithMembership"] } 27 - [@@deriving yojson {strict= false}] 24 + { 25 + cursor: string option [@default None]; 26 + lists_with_membership: list_with_membership list [@key "listsWithMembership"]; 27 + } 28 + [@@deriving yojson {strict= false}] 28 29 29 - let call ~actor ?limit ?cursor ?purposes (client : Hermes.client) : 30 - output Lwt.t = 30 + let call 31 + ~actor 32 + ?limit 33 + ?cursor 34 + ?purposes 35 + (client : Hermes.client) : output Lwt.t = 31 36 let params : params = {actor; limit; cursor; purposes} in 32 37 Hermes.query client nsid (params_to_yojson params) output_of_yojson 33 38 end 39 +
+15 -6
pegasus/lexicons/app_bsky_graph_getMutes.ml
··· 5 5 let nsid = "app.bsky.graph.getMutes" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; mutes: App_bsky_actor_defs.profile_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + mutes: App_bsky_actor_defs.profile_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+43 -50
pegasus/lexicons/app_bsky_graph_getRelationships.ml
··· 5 5 let nsid = "app.bsky.graph.getRelationships" 6 6 7 7 type params = 8 - { actor: string 9 - ; others: string list option 10 - [@default None] 11 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 12 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] } 13 - [@@deriving yojson {strict= false}] 8 + { 9 + actor: string; 10 + others: string list option [@default None]; 11 + } 12 + [@@xrpc_query] 14 13 15 14 type relationships_item = 16 - | Relationship of App_bsky_graph_defs.relationship 17 - | NotFoundActor of App_bsky_graph_defs.not_found_actor 18 - | Unknown of Yojson.Safe.t 15 + | Relationship of App_bsky_graph_defs.relationship 16 + | NotFoundActor of App_bsky_graph_defs.not_found_actor 17 + | Unknown of Yojson.Safe.t 19 18 20 - let relationships_item_of_yojson json = 21 - let open Yojson.Safe.Util in 22 - try 23 - match json |> member "$type" |> to_string with 24 - | "app.bsky.graph.defs#relationship" -> ( 25 - match App_bsky_graph_defs.relationship_of_yojson json with 26 - | Ok v -> 27 - Ok (Relationship v) 28 - | Error e -> 29 - Error e ) 30 - | "app.bsky.graph.defs#notFoundActor" -> ( 31 - match App_bsky_graph_defs.not_found_actor_of_yojson json with 32 - | Ok v -> 33 - Ok (NotFoundActor v) 34 - | Error e -> 35 - Error e ) 36 - | _ -> 37 - Ok (Unknown json) 38 - with _ -> Error "failed to parse union" 19 + let relationships_item_of_yojson json = 20 + let open Yojson.Safe.Util in 21 + try 22 + match json |> member "$type" |> to_string with 23 + | "app.bsky.graph.defs#relationship" -> 24 + (match App_bsky_graph_defs.relationship_of_yojson json with 25 + | Ok v -> Ok (Relationship v) 26 + | Error e -> Error e) 27 + | "app.bsky.graph.defs#notFoundActor" -> 28 + (match App_bsky_graph_defs.not_found_actor_of_yojson json with 29 + | Ok v -> Ok (NotFoundActor v) 30 + | Error e -> Error e) 31 + | _ -> Ok (Unknown json) 32 + with _ -> Error "failed to parse union" 39 33 40 - let relationships_item_to_yojson = function 41 - | Relationship v -> ( 42 - match App_bsky_graph_defs.relationship_to_yojson v with 43 - | `Assoc fields -> 44 - `Assoc 45 - (("$type", `String "app.bsky.graph.defs#relationship") :: fields) 46 - | other -> 47 - other ) 48 - | NotFoundActor v -> ( 49 - match App_bsky_graph_defs.not_found_actor_to_yojson v with 50 - | `Assoc fields -> 51 - `Assoc 52 - (("$type", `String "app.bsky.graph.defs#notFoundActor") :: fields) 53 - | other -> 54 - other ) 55 - | Unknown j -> 56 - j 34 + let relationships_item_to_yojson = function 35 + | Relationship v -> 36 + (match App_bsky_graph_defs.relationship_to_yojson v with 37 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.graph.defs#relationship") :: fields) 38 + | other -> other) 39 + | NotFoundActor v -> 40 + (match App_bsky_graph_defs.not_found_actor_to_yojson v with 41 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.graph.defs#notFoundActor") :: fields) 42 + | other -> other) 43 + | Unknown j -> j 57 44 58 - type output = 59 - { actor: string option [@default None] 60 - ; relationships: relationships_item list } 61 - [@@deriving yojson {strict= false}] 45 + type output = 46 + { 47 + actor: string option [@default None]; 48 + relationships: relationships_item list; 49 + } 50 + [@@deriving yojson {strict= false}] 62 51 63 - let call ~actor ?others (client : Hermes.client) : output Lwt.t = 52 + let call 53 + ~actor 54 + ?others 55 + (client : Hermes.client) : output Lwt.t = 64 56 let params : params = {actor; others} in 65 57 Hermes.query client nsid (params_to_yojson params) output_of_yojson 66 58 end 59 +
+13 -5
pegasus/lexicons/app_bsky_graph_getStarterPack.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.graph.getStarterPack" 6 6 7 - type params = {starter_pack: string [@key "starterPack"]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + starter_pack: string [@key "starterPack"]; 10 + } 11 + [@@xrpc_query] 9 12 10 13 type output = 11 - {starter_pack: App_bsky_graph_defs.starter_pack_view [@key "starterPack"]} 12 - [@@deriving yojson {strict= false}] 14 + { 15 + starter_pack: App_bsky_graph_defs.starter_pack_view [@key "starterPack"]; 16 + } 17 + [@@deriving yojson {strict= false}] 13 18 14 - let call ~starter_pack (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~starter_pack 21 + (client : Hermes.client) : output Lwt.t = 15 22 let params : params = {starter_pack} in 16 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 24 end 25 +
+12 -8
pegasus/lexicons/app_bsky_graph_getStarterPacks.ml
··· 5 5 let nsid = "app.bsky.graph.getStarterPacks" 6 6 7 7 type params = 8 - { uris: string list 9 - [@of_yojson Hermes_util.query_string_list_of_yojson] 10 - [@to_yojson Hermes_util.query_string_list_to_yojson] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + uris: string list; 10 + } 11 + [@@xrpc_query] 12 12 13 13 type output = 14 - { starter_packs: App_bsky_graph_defs.starter_pack_view_basic list 15 - [@key "starterPacks"] } 16 - [@@deriving yojson {strict= false}] 14 + { 15 + starter_packs: App_bsky_graph_defs.starter_pack_view_basic list [@key "starterPacks"]; 16 + } 17 + [@@deriving yojson {strict= false}] 17 18 18 - let call ~uris (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~uris 21 + (client : Hermes.client) : output Lwt.t = 19 22 let params : params = {uris} in 20 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 24 end 25 +
+21 -12
pegasus/lexicons/app_bsky_graph_getStarterPacksWithMembership.ml
··· 1 1 (* generated from app.bsky.graph.getStarterPacksWithMembership *) 2 2 3 3 type starter_pack_with_membership = 4 - { starter_pack: App_bsky_graph_defs.starter_pack_view [@key "starterPack"] 5 - ; list_item: App_bsky_graph_defs.list_item_view option 6 - [@key "listItem"] [@default None] } 4 + { 5 + starter_pack: App_bsky_graph_defs.starter_pack_view [@key "starterPack"]; 6 + list_item: App_bsky_graph_defs.list_item_view option [@key "listItem"] [@default None]; 7 + } 7 8 [@@deriving yojson {strict= false}] 8 9 9 10 (** Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. *) ··· 11 12 let nsid = "app.bsky.graph.getStarterPacksWithMembership" 12 13 13 14 type params = 14 - { actor: string 15 - ; limit: int option [@default None] 16 - ; cursor: string option [@default None] } 17 - [@@deriving yojson {strict= false}] 15 + { 16 + actor: string; 17 + limit: int option [@default None]; 18 + cursor: string option [@default None]; 19 + } 20 + [@@xrpc_query] 18 21 19 22 type output = 20 - { cursor: string option [@default None] 21 - ; starter_packs_with_membership: starter_pack_with_membership list 22 - [@key "starterPacksWithMembership"] } 23 - [@@deriving yojson {strict= false}] 23 + { 24 + cursor: string option [@default None]; 25 + starter_packs_with_membership: starter_pack_with_membership list [@key "starterPacksWithMembership"]; 26 + } 27 + [@@deriving yojson {strict= false}] 24 28 25 - let call ~actor ?limit ?cursor (client : Hermes.client) : output Lwt.t = 29 + let call 30 + ~actor 31 + ?limit 32 + ?cursor 33 + (client : Hermes.client) : output Lwt.t = 26 34 let params : params = {actor; limit; cursor} in 27 35 Hermes.query client nsid (params_to_yojson params) output_of_yojson 28 36 end 37 +
+16 -6
pegasus/lexicons/app_bsky_graph_getSuggestedFollowsByActor.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.graph.getSuggestedFollowsByActor" 6 6 7 - type params = {actor: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + actor: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = 10 - { suggestions: App_bsky_actor_defs.profile_view list 11 - ; is_fallback: bool option [@key "isFallback"] [@default None] 12 - ; rec_id: int option [@key "recId"] [@default None] } 13 - [@@deriving yojson {strict= false}] 14 + { 15 + suggestions: App_bsky_actor_defs.profile_view list; 16 + rec_id_str: string option [@key "recIdStr"] [@default None]; 17 + is_fallback: bool option [@key "isFallback"] [@default None]; 18 + rec_id: int option [@key "recId"] [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 14 21 15 - let call ~actor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~actor 24 + (client : Hermes.client) : output Lwt.t = 16 25 let params : params = {actor} in 17 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 18 27 end 28 +
+20 -24
pegasus/lexicons/app_bsky_graph_list.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "com.atproto.label.defs#selfLabels" -> ( 12 - match Com_atproto_label_defs.self_labels_of_yojson json with 13 - | Ok v -> 14 - Ok (SelfLabels v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "com.atproto.label.defs#selfLabels" -> 12 + (match Com_atproto_label_defs.self_labels_of_yojson json with 13 + | Ok v -> Ok (SelfLabels v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let labels_to_yojson = function 22 - | SelfLabels v -> ( 23 - match Com_atproto_label_defs.self_labels_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 26 - | other -> 27 - other ) 28 - | Unknown j -> 29 - j 19 + | SelfLabels v -> 20 + (match Com_atproto_label_defs.self_labels_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 30 24 31 25 type main = 32 - { purpose: App_bsky_graph_defs.list_purpose 33 - ; name: string 34 - ; description: string option [@default None] 35 - ; description_facets: App_bsky_richtext_facet.main list option 36 - [@key "descriptionFacets"] [@default None] 37 - ; avatar: Hermes.blob option [@default None] 38 - ; labels: labels option [@default None] 39 - ; created_at: string [@key "createdAt"] } 26 + { 27 + purpose: App_bsky_graph_defs.list_purpose; 28 + name: string; 29 + description: string option [@default None]; 30 + description_facets: App_bsky_richtext_facet.main list option [@key "descriptionFacets"] [@default None]; 31 + avatar: Hermes.blob option [@default None]; 32 + labels: labels option [@default None]; 33 + created_at: string [@key "createdAt"]; 34 + } 40 35 [@@deriving yojson {strict= false}] 36 +
+6 -1
pegasus/lexicons/app_bsky_graph_listblock.ml
··· 1 1 (* generated from app.bsky.graph.listblock *) 2 2 3 - type main = {subject: string; created_at: string [@key "createdAt"]} 3 + type main = 4 + { 5 + subject: string; 6 + created_at: string [@key "createdAt"]; 7 + } 4 8 [@@deriving yojson {strict= false}] 9 +
+6 -3
pegasus/lexicons/app_bsky_graph_listitem.ml
··· 1 1 (* generated from app.bsky.graph.listitem *) 2 2 3 3 type main = 4 - { subject: string 5 - ; list_: string [@key "list"] 6 - ; created_at: string [@key "createdAt"] } 4 + { 5 + subject: string; 6 + list_: string [@key "list"]; 7 + created_at: string [@key "createdAt"]; 8 + } 7 9 [@@deriving yojson {strict= false}] 10 +
+10 -6
pegasus/lexicons/app_bsky_graph_muteActor.ml
··· 5 5 let nsid = "app.bsky.graph.muteActor" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {actor: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + actor: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~actor (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~actor 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({actor} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+10 -6
pegasus/lexicons/app_bsky_graph_muteActorList.ml
··· 5 5 let nsid = "app.bsky.graph.muteActorList" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {list_: string [@key "list"]} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + list_: string [@key "list"]; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~list_ (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~list_ 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({list_} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+10 -6
pegasus/lexicons/app_bsky_graph_muteThread.ml
··· 5 5 let nsid = "app.bsky.graph.muteThread" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {root: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + root: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~root (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~root 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({root} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+17 -9
pegasus/lexicons/app_bsky_graph_searchStarterPacks.ml
··· 5 5 let nsid = "app.bsky.graph.searchStarterPacks" 6 6 7 7 type params = 8 - { q: string 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + q: string; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; starter_packs: App_bsky_graph_defs.starter_pack_view_basic list 16 - [@key "starterPacks"] } 17 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + starter_packs: App_bsky_graph_defs.starter_pack_view_basic list [@key "starterPacks"]; 19 + } 20 + [@@deriving yojson {strict= false}] 18 21 19 - let call ~q ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~q 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 20 27 let params : params = {q; limit; cursor} in 21 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 29 end 30 +
+14 -8
pegasus/lexicons/app_bsky_graph_starterpack.ml
··· 1 1 (* generated from app.bsky.graph.starterpack *) 2 2 3 - type feed_item = {uri: string} [@@deriving yojson {strict= false}] 3 + type feed_item = 4 + { 5 + uri: string; 6 + } 7 + [@@deriving yojson {strict= false}] 4 8 5 9 type main = 6 - { name: string 7 - ; description: string option [@default None] 8 - ; description_facets: App_bsky_richtext_facet.main list option 9 - [@key "descriptionFacets"] [@default None] 10 - ; list_: string [@key "list"] 11 - ; feeds: feed_item list option [@default None] 12 - ; created_at: string [@key "createdAt"] } 10 + { 11 + name: string; 12 + description: string option [@default None]; 13 + description_facets: App_bsky_richtext_facet.main list option [@key "descriptionFacets"] [@default None]; 14 + list_: string [@key "list"]; 15 + feeds: feed_item list option [@default None]; 16 + created_at: string [@key "createdAt"]; 17 + } 13 18 [@@deriving yojson {strict= false}] 19 +
+10 -6
pegasus/lexicons/app_bsky_graph_unmuteActor.ml
··· 5 5 let nsid = "app.bsky.graph.unmuteActor" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {actor: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + actor: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~actor (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~actor 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({actor} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+10 -6
pegasus/lexicons/app_bsky_graph_unmuteActorList.ml
··· 5 5 let nsid = "app.bsky.graph.unmuteActorList" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {list_: string [@key "list"]} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + list_: string [@key "list"]; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~list_ (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~list_ 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({list_} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+10 -6
pegasus/lexicons/app_bsky_graph_unmuteThread.ml
··· 5 5 let nsid = "app.bsky.graph.unmuteThread" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {root: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + root: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~root (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~root 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({root} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+7 -4
pegasus/lexicons/app_bsky_graph_verification.ml
··· 1 1 (* generated from app.bsky.graph.verification *) 2 2 3 3 type main = 4 - { subject: string 5 - ; handle: string 6 - ; display_name: string [@key "displayName"] 7 - ; created_at: string [@key "createdAt"] } 4 + { 5 + subject: string; 6 + handle: string; 7 + display_name: string [@key "displayName"]; 8 + created_at: string [@key "createdAt"]; 9 + } 8 10 [@@deriving yojson {strict= false}] 11 +
+5 -16
pegasus/lexicons/app_bsky_labeler_defs.ml
··· 1 1 (* re-exported from App_bsky_shared_1 *) 2 2 3 3 type labeler_view = App_bsky_shared_1.labeler_view 4 - 5 4 let labeler_view_of_yojson = App_bsky_shared_1.labeler_view_of_yojson 6 - 7 5 let labeler_view_to_yojson = App_bsky_shared_1.labeler_view_to_yojson 8 6 9 7 type labeler_view_detailed = App_bsky_shared_1.labeler_view_detailed 10 - 11 - let labeler_view_detailed_of_yojson = 12 - App_bsky_shared_1.labeler_view_detailed_of_yojson 13 - 14 - let labeler_view_detailed_to_yojson = 15 - App_bsky_shared_1.labeler_view_detailed_to_yojson 8 + let labeler_view_detailed_of_yojson = App_bsky_shared_1.labeler_view_detailed_of_yojson 9 + let labeler_view_detailed_to_yojson = App_bsky_shared_1.labeler_view_detailed_to_yojson 16 10 17 11 type labeler_viewer_state = App_bsky_shared_1.labeler_viewer_state 18 - 19 - let labeler_viewer_state_of_yojson = 20 - App_bsky_shared_1.labeler_viewer_state_of_yojson 21 - 22 - let labeler_viewer_state_to_yojson = 23 - App_bsky_shared_1.labeler_viewer_state_to_yojson 12 + let labeler_viewer_state_of_yojson = App_bsky_shared_1.labeler_viewer_state_of_yojson 13 + let labeler_viewer_state_to_yojson = App_bsky_shared_1.labeler_viewer_state_to_yojson 24 14 25 15 type labeler_policies = App_bsky_shared_1.labeler_policies 26 - 27 16 let labeler_policies_of_yojson = App_bsky_shared_1.labeler_policies_of_yojson 28 - 29 17 let labeler_policies_to_yojson = App_bsky_shared_1.labeler_policies_to_yojson 18 +
+42 -47
pegasus/lexicons/app_bsky_labeler_getServices.ml
··· 5 5 let nsid = "app.bsky.labeler.getServices" 6 6 7 7 type params = 8 - { dids: string list 9 - [@of_yojson Hermes_util.query_string_list_of_yojson] 10 - [@to_yojson Hermes_util.query_string_list_to_yojson] 11 - ; detailed: bool option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + dids: string list; 10 + detailed: bool option [@default None]; 11 + } 12 + [@@xrpc_query] 13 13 14 14 type views_item = 15 - | LabelerView of App_bsky_labeler_defs.labeler_view 16 - | LabelerViewDetailed of App_bsky_labeler_defs.labeler_view_detailed 17 - | Unknown of Yojson.Safe.t 15 + | LabelerView of App_bsky_labeler_defs.labeler_view 16 + | LabelerViewDetailed of App_bsky_labeler_defs.labeler_view_detailed 17 + | Unknown of Yojson.Safe.t 18 18 19 - let views_item_of_yojson json = 20 - let open Yojson.Safe.Util in 21 - try 22 - match json |> member "$type" |> to_string with 23 - | "app.bsky.labeler.defs#labelerView" -> ( 24 - match App_bsky_labeler_defs.labeler_view_of_yojson json with 25 - | Ok v -> 26 - Ok (LabelerView v) 27 - | Error e -> 28 - Error e ) 29 - | "app.bsky.labeler.defs#labelerViewDetailed" -> ( 30 - match App_bsky_labeler_defs.labeler_view_detailed_of_yojson json with 31 - | Ok v -> 32 - Ok (LabelerViewDetailed v) 33 - | Error e -> 34 - Error e ) 35 - | _ -> 36 - Ok (Unknown json) 37 - with _ -> Error "failed to parse union" 19 + let views_item_of_yojson json = 20 + let open Yojson.Safe.Util in 21 + try 22 + match json |> member "$type" |> to_string with 23 + | "app.bsky.labeler.defs#labelerView" -> 24 + (match App_bsky_labeler_defs.labeler_view_of_yojson json with 25 + | Ok v -> Ok (LabelerView v) 26 + | Error e -> Error e) 27 + | "app.bsky.labeler.defs#labelerViewDetailed" -> 28 + (match App_bsky_labeler_defs.labeler_view_detailed_of_yojson json with 29 + | Ok v -> Ok (LabelerViewDetailed v) 30 + | Error e -> Error e) 31 + | _ -> Ok (Unknown json) 32 + with _ -> Error "failed to parse union" 38 33 39 - let views_item_to_yojson = function 40 - | LabelerView v -> ( 41 - match App_bsky_labeler_defs.labeler_view_to_yojson v with 42 - | `Assoc fields -> 43 - `Assoc 44 - (("$type", `String "app.bsky.labeler.defs#labelerView") :: fields) 45 - | other -> 46 - other ) 47 - | LabelerViewDetailed v -> ( 48 - match App_bsky_labeler_defs.labeler_view_detailed_to_yojson v with 49 - | `Assoc fields -> 50 - `Assoc 51 - ( ("$type", `String "app.bsky.labeler.defs#labelerViewDetailed") 52 - :: fields ) 53 - | other -> 54 - other ) 55 - | Unknown j -> 56 - j 34 + let views_item_to_yojson = function 35 + | LabelerView v -> 36 + (match App_bsky_labeler_defs.labeler_view_to_yojson v with 37 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.labeler.defs#labelerView") :: fields) 38 + | other -> other) 39 + | LabelerViewDetailed v -> 40 + (match App_bsky_labeler_defs.labeler_view_detailed_to_yojson v with 41 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.labeler.defs#labelerViewDetailed") :: fields) 42 + | other -> other) 43 + | Unknown j -> j 57 44 58 - type output = {views: views_item list} [@@deriving yojson {strict= false}] 45 + type output = 46 + { 47 + views: views_item list; 48 + } 49 + [@@deriving yojson {strict= false}] 59 50 60 - let call ~dids ?detailed (client : Hermes.client) : output Lwt.t = 51 + let call 52 + ~dids 53 + ?detailed 54 + (client : Hermes.client) : output Lwt.t = 61 55 let params : params = {dids; detailed} in 62 56 Hermes.query client nsid (params_to_yojson params) output_of_yojson 63 57 end 58 +
+19 -25
pegasus/lexicons/app_bsky_labeler_service.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "com.atproto.label.defs#selfLabels" -> ( 12 - match Com_atproto_label_defs.self_labels_of_yojson json with 13 - | Ok v -> 14 - Ok (SelfLabels v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "com.atproto.label.defs#selfLabels" -> 12 + (match Com_atproto_label_defs.self_labels_of_yojson json with 13 + | Ok v -> Ok (SelfLabels v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let labels_to_yojson = function 22 - | SelfLabels v -> ( 23 - match Com_atproto_label_defs.self_labels_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 26 - | other -> 27 - other ) 28 - | Unknown j -> 29 - j 19 + | SelfLabels v -> 20 + (match Com_atproto_label_defs.self_labels_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.label.defs#selfLabels") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 30 24 31 25 type main = 32 - { policies: App_bsky_labeler_defs.labeler_policies 33 - ; labels: labels option [@default None] 34 - ; created_at: string [@key "createdAt"] 35 - ; reason_types: Com_atproto_moderation_defs.reason_type list option 36 - [@key "reasonTypes"] [@default None] 37 - ; subject_types: Com_atproto_moderation_defs.subject_type list option 38 - [@key "subjectTypes"] [@default None] 39 - ; subject_collections: string list option 40 - [@key "subjectCollections"] [@default None] } 26 + { 27 + policies: App_bsky_labeler_defs.labeler_policies; 28 + labels: labels option [@default None]; 29 + created_at: string [@key "createdAt"]; 30 + reason_types: Com_atproto_moderation_defs.reason_type list option [@key "reasonTypes"] [@default None]; 31 + subject_types: Com_atproto_moderation_defs.subject_type list option [@key "subjectTypes"] [@default None]; 32 + subject_collections: string list option [@key "subjectCollections"] [@default None]; 33 + } 41 34 [@@deriving yojson {strict= false}] 35 +
+5 -1
pegasus/lexicons/app_bsky_notification_declaration.ml
··· 1 1 (* generated from app.bsky.notification.declaration *) 2 2 3 - type main = {allow_subscriptions: string [@key "allowSubscriptions"]} 3 + type main = 4 + { 5 + allow_subscriptions: string [@key "allowSubscriptions"]; 6 + } 4 7 [@@deriving yojson {strict= false}] 8 +
+39 -21
pegasus/lexicons/app_bsky_notification_defs.ml
··· 1 1 (* generated from app.bsky.notification.defs *) 2 2 3 3 type record_deleted = unit 4 - 5 4 let record_deleted_of_yojson _ = Ok () 6 - 7 5 let record_deleted_to_yojson () = `Assoc [] 8 6 9 - type chat_preference = {include_: string [@key "include"]; push: bool} 7 + type chat_preference = 8 + { 9 + include_: string [@key "include"]; 10 + push: bool; 11 + } 10 12 [@@deriving yojson {strict= false}] 11 13 12 14 type filterable_preference = 13 - {include_: string [@key "include"]; list_: bool [@key "list"]; push: bool} 15 + { 16 + include_: string [@key "include"]; 17 + list_: bool [@key "list"]; 18 + push: bool; 19 + } 14 20 [@@deriving yojson {strict= false}] 15 21 16 - type preference = {list_: bool [@key "list"]; push: bool} 22 + type preference = 23 + { 24 + list_: bool [@key "list"]; 25 + push: bool; 26 + } 17 27 [@@deriving yojson {strict= false}] 18 28 19 29 type preferences = 20 - { chat: chat_preference 21 - ; follow: filterable_preference 22 - ; like: filterable_preference 23 - ; like_via_repost: filterable_preference [@key "likeViaRepost"] 24 - ; mention: filterable_preference 25 - ; quote: filterable_preference 26 - ; reply: filterable_preference 27 - ; repost: filterable_preference 28 - ; repost_via_repost: filterable_preference [@key "repostViaRepost"] 29 - ; starterpack_joined: preference [@key "starterpackJoined"] 30 - ; subscribed_post: preference [@key "subscribedPost"] 31 - ; unverified: preference 32 - ; verified: preference } 30 + { 31 + chat: chat_preference; 32 + follow: filterable_preference; 33 + like: filterable_preference; 34 + like_via_repost: filterable_preference [@key "likeViaRepost"]; 35 + mention: filterable_preference; 36 + quote: filterable_preference; 37 + reply: filterable_preference; 38 + repost: filterable_preference; 39 + repost_via_repost: filterable_preference [@key "repostViaRepost"]; 40 + starterpack_joined: preference [@key "starterpackJoined"]; 41 + subscribed_post: preference [@key "subscribedPost"]; 42 + unverified: preference; 43 + verified: preference; 44 + } 33 45 [@@deriving yojson {strict= false}] 34 46 35 - type activity_subscription = {post: bool; reply: bool} 47 + type activity_subscription = 48 + { 49 + post: bool; 50 + reply: bool; 51 + } 36 52 [@@deriving yojson {strict= false}] 37 53 38 54 type subject_activity_subscription = 39 - { subject: string 40 - ; activity_subscription: activity_subscription [@key "activitySubscription"] 55 + { 56 + subject: string; 57 + activity_subscription: activity_subscription [@key "activitySubscription"]; 41 58 } 42 59 [@@deriving yojson {strict= false}] 60 +
+8 -4
pegasus/lexicons/app_bsky_notification_getPreferences.ml
··· 5 5 let nsid = "app.bsky.notification.getPreferences" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type output = {preferences: App_bsky_notification_defs.preferences} 12 - [@@deriving yojson {strict= false}] 10 + type output = 11 + { 12 + preferences: App_bsky_notification_defs.preferences; 13 + } 14 + [@@deriving yojson {strict= false}] 13 15 14 - let call (client : Hermes.client) : output Lwt.t = 16 + let call 17 + (client : Hermes.client) : output Lwt.t = 15 18 Hermes.query client nsid (`Assoc []) output_of_yojson 16 19 end 20 +
+15 -5
pegasus/lexicons/app_bsky_notification_getUnreadCount.ml
··· 5 5 let nsid = "app.bsky.notification.getUnreadCount" 6 6 7 7 type params = 8 - { priority: bool option [@default None] 9 - ; seen_at: string option [@key "seenAt"] [@default None] } 10 - [@@deriving yojson {strict= false}] 8 + { 9 + priority: bool option [@default None]; 10 + seen_at: string option [@key "seenAt"] [@default None]; 11 + } 12 + [@@xrpc_query] 11 13 12 - type output = {count: int} [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + count: int; 17 + } 18 + [@@deriving yojson {strict= false}] 13 19 14 - let call ?priority ?seen_at (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?priority 22 + ?seen_at 23 + (client : Hermes.client) : output Lwt.t = 15 24 let params : params = {priority; seen_at} in 16 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 26 end 27 +
+15 -6
pegasus/lexicons/app_bsky_notification_listActivitySubscriptions.ml
··· 5 5 let nsid = "app.bsky.notification.listActivitySubscriptions" 6 6 7 7 type params = 8 - {limit: int option [@default None]; cursor: string option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { cursor: string option [@default None] 13 - ; subscriptions: App_bsky_actor_defs.profile_view list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + cursor: string option [@default None]; 17 + subscriptions: App_bsky_actor_defs.profile_view list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?limit 23 + ?cursor 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {limit; cursor} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+34 -25
pegasus/lexicons/app_bsky_notification_listNotifications.ml
··· 1 1 (* generated from app.bsky.notification.listNotifications *) 2 2 3 3 type notification = 4 - { uri: string 5 - ; cid: string 6 - ; author: App_bsky_actor_defs.profile_view 7 - ; reason: string 8 - ; reason_subject: string option [@key "reasonSubject"] [@default None] 9 - ; record: Yojson.Safe.t 10 - ; is_read: bool [@key "isRead"] 11 - ; indexed_at: string [@key "indexedAt"] 12 - ; labels: Com_atproto_label_defs.label list option [@default None] } 4 + { 5 + uri: string; 6 + cid: string; 7 + author: App_bsky_actor_defs.profile_view; 8 + reason: string; 9 + reason_subject: string option [@key "reasonSubject"] [@default None]; 10 + record: Yojson.Safe.t; 11 + is_read: bool [@key "isRead"]; 12 + indexed_at: string [@key "indexedAt"]; 13 + labels: Com_atproto_label_defs.label list option [@default None]; 14 + } 13 15 [@@deriving yojson {strict= false}] 14 16 15 17 (** Enumerate notifications for the requesting account. Requires auth. *) ··· 17 19 let nsid = "app.bsky.notification.listNotifications" 18 20 19 21 type params = 20 - { reasons: string list option 21 - [@default None] 22 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 23 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] 24 - ; limit: int option [@default None] 25 - ; priority: bool option [@default None] 26 - ; cursor: string option [@default None] 27 - ; seen_at: string option [@key "seenAt"] [@default None] } 28 - [@@deriving yojson {strict= false}] 22 + { 23 + reasons: string list option [@default None]; 24 + limit: int option [@default None]; 25 + priority: bool option [@default None]; 26 + cursor: string option [@default None]; 27 + seen_at: string option [@key "seenAt"] [@default None]; 28 + } 29 + [@@xrpc_query] 29 30 30 31 type output = 31 - { cursor: string option [@default None] 32 - ; notifications: notification list 33 - ; priority: bool option [@default None] 34 - ; seen_at: string option [@key "seenAt"] [@default None] } 35 - [@@deriving yojson {strict= false}] 32 + { 33 + cursor: string option [@default None]; 34 + notifications: notification list; 35 + priority: bool option [@default None]; 36 + seen_at: string option [@key "seenAt"] [@default None]; 37 + } 38 + [@@deriving yojson {strict= false}] 36 39 37 - let call ?reasons ?limit ?priority ?cursor ?seen_at (client : Hermes.client) : 38 - output Lwt.t = 40 + let call 41 + ?reasons 42 + ?limit 43 + ?priority 44 + ?cursor 45 + ?seen_at 46 + (client : Hermes.client) : output Lwt.t = 39 47 let params : params = {reasons; limit; priority; cursor; seen_at} in 40 48 Hermes.query client nsid (params_to_yojson params) output_of_yojson 41 49 end 50 +
+15 -13
pegasus/lexicons/app_bsky_notification_putActivitySubscription.ml
··· 5 5 let nsid = "app.bsky.notification.putActivitySubscription" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { subject: string 13 - ; activity_subscription: App_bsky_notification_defs.activity_subscription 14 - [@key "activitySubscription"] } 11 + { 12 + subject: string; 13 + activity_subscription: App_bsky_notification_defs.activity_subscription [@key "activitySubscription"]; 14 + } 15 15 [@@deriving yojson {strict= false}] 16 16 17 17 type output = 18 - { subject: string 19 - ; activity_subscription: 20 - App_bsky_notification_defs.activity_subscription option 21 - [@key "activitySubscription"] [@default None] } 22 - [@@deriving yojson {strict= false}] 18 + { 19 + subject: string; 20 + activity_subscription: App_bsky_notification_defs.activity_subscription option [@key "activitySubscription"] [@default None]; 21 + } 22 + [@@deriving yojson {strict= false}] 23 23 24 - let call ~subject ~activity_subscription (client : Hermes.client) : 25 - output Lwt.t = 24 + let call 25 + ~subject 26 + ~activity_subscription 27 + (client : Hermes.client) : output Lwt.t = 26 28 let params = () in 27 29 let input = Some ({subject; activity_subscription} |> input_to_yojson) in 28 - Hermes.procedure client nsid (params_to_yojson params) input 29 - output_of_yojson 30 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 30 31 end 32 +
+10 -6
pegasus/lexicons/app_bsky_notification_putPreferences.ml
··· 5 5 let nsid = "app.bsky.notification.putPreferences" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {priority: bool} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + priority: bool; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~priority (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~priority 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({priority} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+38 -48
pegasus/lexicons/app_bsky_notification_putPreferencesV2.ml
··· 5 5 let nsid = "app.bsky.notification.putPreferencesV2" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { chat: App_bsky_notification_defs.chat_preference option [@default None] 13 - ; follow: App_bsky_notification_defs.filterable_preference option 14 - [@default None] 15 - ; like: App_bsky_notification_defs.filterable_preference option 16 - [@default None] 17 - ; like_via_repost: App_bsky_notification_defs.filterable_preference option 18 - [@key "likeViaRepost"] [@default None] 19 - ; mention: App_bsky_notification_defs.filterable_preference option 20 - [@default None] 21 - ; quote: App_bsky_notification_defs.filterable_preference option 22 - [@default None] 23 - ; reply: App_bsky_notification_defs.filterable_preference option 24 - [@default None] 25 - ; repost: App_bsky_notification_defs.filterable_preference option 26 - [@default None] 27 - ; repost_via_repost: App_bsky_notification_defs.filterable_preference option 28 - [@key "repostViaRepost"] [@default None] 29 - ; starterpack_joined: App_bsky_notification_defs.preference option 30 - [@key "starterpackJoined"] [@default None] 31 - ; subscribed_post: App_bsky_notification_defs.preference option 32 - [@key "subscribedPost"] [@default None] 33 - ; unverified: App_bsky_notification_defs.preference option [@default None] 34 - ; verified: App_bsky_notification_defs.preference option [@default None] } 11 + { 12 + chat: App_bsky_notification_defs.chat_preference option [@default None]; 13 + follow: App_bsky_notification_defs.filterable_preference option [@default None]; 14 + like: App_bsky_notification_defs.filterable_preference option [@default None]; 15 + like_via_repost: App_bsky_notification_defs.filterable_preference option [@key "likeViaRepost"] [@default None]; 16 + mention: App_bsky_notification_defs.filterable_preference option [@default None]; 17 + quote: App_bsky_notification_defs.filterable_preference option [@default None]; 18 + reply: App_bsky_notification_defs.filterable_preference option [@default None]; 19 + repost: App_bsky_notification_defs.filterable_preference option [@default None]; 20 + repost_via_repost: App_bsky_notification_defs.filterable_preference option [@key "repostViaRepost"] [@default None]; 21 + starterpack_joined: App_bsky_notification_defs.preference option [@key "starterpackJoined"] [@default None]; 22 + subscribed_post: App_bsky_notification_defs.preference option [@key "subscribedPost"] [@default None]; 23 + unverified: App_bsky_notification_defs.preference option [@default None]; 24 + verified: App_bsky_notification_defs.preference option [@default None]; 25 + } 35 26 [@@deriving yojson {strict= false}] 36 27 37 - type output = {preferences: App_bsky_notification_defs.preferences} 38 - [@@deriving yojson {strict= false}] 28 + type output = 29 + { 30 + preferences: App_bsky_notification_defs.preferences; 31 + } 32 + [@@deriving yojson {strict= false}] 39 33 40 - let call ?chat ?follow ?like ?like_via_repost ?mention ?quote ?reply ?repost 41 - ?repost_via_repost ?starterpack_joined ?subscribed_post ?unverified 42 - ?verified (client : Hermes.client) : output Lwt.t = 34 + let call 35 + ?chat 36 + ?follow 37 + ?like 38 + ?like_via_repost 39 + ?mention 40 + ?quote 41 + ?reply 42 + ?repost 43 + ?repost_via_repost 44 + ?starterpack_joined 45 + ?subscribed_post 46 + ?unverified 47 + ?verified 48 + (client : Hermes.client) : output Lwt.t = 43 49 let params = () in 44 - let input = 45 - Some 46 - ( { chat 47 - ; follow 48 - ; like 49 - ; like_via_repost 50 - ; mention 51 - ; quote 52 - ; reply 53 - ; repost 54 - ; repost_via_repost 55 - ; starterpack_joined 56 - ; subscribed_post 57 - ; unverified 58 - ; verified } 59 - |> input_to_yojson ) 60 - in 61 - Hermes.procedure client nsid (params_to_yojson params) input 62 - output_of_yojson 50 + let input = Some ({chat; follow; like; like_via_repost; mention; quote; reply; repost; repost_via_repost; starterpack_joined; subscribed_post; unverified; verified} |> input_to_yojson) in 51 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 63 52 end 53 +
+16 -15
pegasus/lexicons/app_bsky_notification_registerPush.ml
··· 5 5 let nsid = "app.bsky.notification.registerPush" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { service_did: string [@key "serviceDid"] 13 - ; token: string 14 - ; platform: string 15 - ; app_id: string [@key "appId"] 16 - ; age_restricted: bool option [@key "ageRestricted"] [@default None] } 11 + { 12 + service_did: string [@key "serviceDid"]; 13 + token: string; 14 + platform: string; 15 + app_id: string [@key "appId"]; 16 + age_restricted: bool option [@key "ageRestricted"] [@default None]; 17 + } 17 18 [@@deriving yojson {strict= false}] 18 19 19 20 type output = unit 20 - 21 21 let output_of_yojson _ = Ok () 22 22 23 - let call ~service_did ~token ~platform ~app_id ?age_restricted 23 + let call 24 + ~service_did 25 + ~token 26 + ~platform 27 + ~app_id 28 + ?age_restricted 24 29 (client : Hermes.client) : output Lwt.t = 25 30 let params = () in 26 - let input = 27 - Some 28 - ( {service_did; token; platform; app_id; age_restricted} 29 - |> input_to_yojson ) 30 - in 31 - Hermes.procedure client nsid (params_to_yojson params) input 32 - output_of_yojson 31 + let input = Some ({service_did; token; platform; app_id; age_restricted} |> input_to_yojson) in 32 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 33 33 end 34 +
+15 -13
pegasus/lexicons/app_bsky_notification_unregisterPush.ml
··· 5 5 let nsid = "app.bsky.notification.unregisterPush" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { service_did: string [@key "serviceDid"] 13 - ; token: string 14 - ; platform: string 15 - ; app_id: string [@key "appId"] } 11 + { 12 + service_did: string [@key "serviceDid"]; 13 + token: string; 14 + platform: string; 15 + app_id: string [@key "appId"]; 16 + } 16 17 [@@deriving yojson {strict= false}] 17 18 18 19 type output = unit 19 - 20 20 let output_of_yojson _ = Ok () 21 21 22 - let call ~service_did ~token ~platform ~app_id (client : Hermes.client) : 23 - output Lwt.t = 22 + let call 23 + ~service_did 24 + ~token 25 + ~platform 26 + ~app_id 27 + (client : Hermes.client) : output Lwt.t = 24 28 let params = () in 25 - let input = 26 - Some ({service_did; token; platform; app_id} |> input_to_yojson) 27 - in 28 - Hermes.procedure client nsid (params_to_yojson params) input 29 - output_of_yojson 29 + let input = Some ({service_did; token; platform; app_id} |> input_to_yojson) in 30 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 30 31 end 32 +
+9 -6
pegasus/lexicons/app_bsky_notification_updateSeen.ml
··· 5 5 let nsid = "app.bsky.notification.updateSeen" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {seen_at: string [@key "seenAt"]} 10 + type input = 11 + { 12 + seen_at: string [@key "seenAt"]; 13 + } 12 14 [@@deriving yojson {strict= false}] 13 15 14 16 type output = unit 15 - 16 17 let output_of_yojson _ = Ok () 17 18 18 - let call ~seen_at (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~seen_at 21 + (client : Hermes.client) : output Lwt.t = 19 22 let params = () in 20 23 let input = Some ({seen_at} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 25 end 26 +
+51 -37
pegasus/lexicons/app_bsky_richtext_facet.ml
··· 1 1 (* generated from app.bsky.richtext.facet *) 2 2 3 - type tag = {tag: string} [@@deriving yojson {strict= false}] 3 + type tag = 4 + { 5 + tag: string; 6 + } 7 + [@@deriving yojson {strict= false}] 4 8 5 - type link = {uri: string} [@@deriving yojson {strict= false}] 9 + type link = 10 + { 11 + uri: string; 12 + } 13 + [@@deriving yojson {strict= false}] 6 14 7 - type mention = {did: string} [@@deriving yojson {strict= false}] 15 + type mention = 16 + { 17 + did: string; 18 + } 19 + [@@deriving yojson {strict= false}] 8 20 9 21 type byte_slice = 10 - {byte_start: int [@key "byteStart"]; byte_end: int [@key "byteEnd"]} 22 + { 23 + byte_start: int [@key "byteStart"]; 24 + byte_end: int [@key "byteEnd"]; 25 + } 11 26 [@@deriving yojson {strict= false}] 12 27 13 28 type features_item = ··· 20 35 let open Yojson.Safe.Util in 21 36 try 22 37 match json |> member "$type" |> to_string with 23 - | "app.bsky.richtext.facet#mention" -> ( 24 - match mention_of_yojson json with 25 - | Ok v -> 26 - Ok (Mention v) 27 - | Error e -> 28 - Error e ) 29 - | "app.bsky.richtext.facet#link" -> ( 30 - match link_of_yojson json with Ok v -> Ok (Link v) | Error e -> Error e ) 31 - | "app.bsky.richtext.facet#tag" -> ( 32 - match tag_of_yojson json with Ok v -> Ok (Tag v) | Error e -> Error e ) 33 - | _ -> 34 - Ok (Unknown json) 38 + | "app.bsky.richtext.facet#mention" -> 39 + (match mention_of_yojson json with 40 + | Ok v -> Ok (Mention v) 41 + | Error e -> Error e) 42 + | "app.bsky.richtext.facet#link" -> 43 + (match link_of_yojson json with 44 + | Ok v -> Ok (Link v) 45 + | Error e -> Error e) 46 + | "app.bsky.richtext.facet#tag" -> 47 + (match tag_of_yojson json with 48 + | Ok v -> Ok (Tag v) 49 + | Error e -> Error e) 50 + | _ -> Ok (Unknown json) 35 51 with _ -> Error "failed to parse union" 36 52 37 53 let features_item_to_yojson = function 38 - | Mention v -> ( 39 - match mention_to_yojson v with 40 - | `Assoc fields -> 41 - `Assoc (("$type", `String "app.bsky.richtext.facet#mention") :: fields) 42 - | other -> 43 - other ) 44 - | Link v -> ( 45 - match link_to_yojson v with 46 - | `Assoc fields -> 47 - `Assoc (("$type", `String "app.bsky.richtext.facet#link") :: fields) 48 - | other -> 49 - other ) 50 - | Tag v -> ( 51 - match tag_to_yojson v with 52 - | `Assoc fields -> 53 - `Assoc (("$type", `String "app.bsky.richtext.facet#tag") :: fields) 54 - | other -> 55 - other ) 56 - | Unknown j -> 57 - j 54 + | Mention v -> 55 + (match mention_to_yojson v with 56 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.richtext.facet#mention") :: fields) 57 + | other -> other) 58 + | Link v -> 59 + (match link_to_yojson v with 60 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.richtext.facet#link") :: fields) 61 + | other -> other) 62 + | Tag v -> 63 + (match tag_to_yojson v with 64 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.richtext.facet#tag") :: fields) 65 + | other -> other) 66 + | Unknown j -> j 58 67 59 - type main = {index: byte_slice; features: features_item list} 68 + type main = 69 + { 70 + index: byte_slice; 71 + features: features_item list; 72 + } 60 73 [@@deriving yojson {strict= false}] 74 +
+1020 -1323
pegasus/lexicons/app_bsky_shared_1.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "app.bsky.embed.external#view" -> ( 12 - match App_bsky_embed_external.view_of_yojson json with 13 - | Ok v -> 14 - Ok (ExternalView v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "app.bsky.embed.external#view" -> 12 + (match App_bsky_embed_external.view_of_yojson json with 13 + | Ok v -> Ok (ExternalView v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let actor_embed_to_yojson = function 22 - | ExternalView v -> ( 23 - match App_bsky_embed_external.view_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc (("$type", `String "app.bsky.embed.external#view") :: fields) 26 - | other -> 27 - other ) 28 - | Unknown j -> 29 - j 19 + | ExternalView v -> 20 + (match App_bsky_embed_external.view_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.external#view") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 30 24 31 25 type status_view = 32 - { status: string 33 - ; record: Yojson.Safe.t 34 - ; embed: actor_embed option [@default None] 35 - ; expires_at: string option [@key "expiresAt"] [@default None] 36 - ; is_active: bool option [@key "isActive"] [@default None] } 26 + { 27 + uri: string option [@default None]; 28 + cid: string option [@default None]; 29 + status: string; 30 + record: Yojson.Safe.t; 31 + embed: actor_embed option [@default None]; 32 + labels: Com_atproto_label_defs.label list option [@default None]; 33 + expires_at: string option [@key "expiresAt"] [@default None]; 34 + is_active: bool option [@key "isActive"] [@default None]; 35 + is_disabled: bool option [@key "isDisabled"] [@default None]; 36 + } 37 37 [@@deriving yojson {strict= false}] 38 38 39 39 type verification_view = 40 - { issuer: string 41 - ; uri: string 42 - ; is_valid: bool [@key "isValid"] 43 - ; created_at: string [@key "createdAt"] } 40 + { 41 + issuer: string; 42 + uri: string; 43 + is_valid: bool [@key "isValid"]; 44 + created_at: string [@key "createdAt"]; 45 + } 44 46 [@@deriving yojson {strict= false}] 45 47 46 48 type verification_state = 47 - { verifications: verification_view list 48 - ; verified_status: string [@key "verifiedStatus"] 49 - ; trusted_verifier_status: string [@key "trustedVerifierStatus"] } 49 + { 50 + verifications: verification_view list; 51 + verified_status: string [@key "verifiedStatus"]; 52 + trusted_verifier_status: string [@key "trustedVerifierStatus"]; 53 + } 50 54 [@@deriving yojson {strict= false}] 51 55 52 56 type list_viewer_state = 53 - {muted: bool option [@default None]; blocked: string option [@default None]} 57 + { 58 + muted: bool option [@default None]; 59 + blocked: string option [@default None]; 60 + } 54 61 [@@deriving yojson {strict= false}] 55 62 56 63 (** string type with known values *) 57 64 type list_purpose = string 58 - 59 65 let list_purpose_of_yojson = function 60 - | `String s -> 61 - Ok s 62 - | _ -> 63 - Error "list_purpose: expected string" 64 - 66 + | `String s -> Ok s 67 + | _ -> Error "list_purpose: expected string" 65 68 let list_purpose_to_yojson s = `String s 66 69 67 70 type list_view_basic = 68 - { uri: string 69 - ; cid: string 70 - ; name: string 71 - ; purpose: list_purpose 72 - ; avatar: string option [@default None] 73 - ; list_item_count: int option [@key "listItemCount"] [@default None] 74 - ; labels: Com_atproto_label_defs.label list option [@default None] 75 - ; viewer: list_viewer_state option [@default None] 76 - ; indexed_at: string option [@key "indexedAt"] [@default None] } 71 + { 72 + uri: string; 73 + cid: string; 74 + name: string; 75 + purpose: list_purpose; 76 + avatar: string option [@default None]; 77 + list_item_count: int option [@key "listItemCount"] [@default None]; 78 + labels: Com_atproto_label_defs.label list option [@default None]; 79 + viewer: list_viewer_state option [@default None]; 80 + indexed_at: string option [@key "indexedAt"] [@default None]; 81 + } 82 + [@@deriving yojson {strict= false}] 83 + 84 + type profile_associated_germ = 85 + { 86 + message_me_url: string [@key "messageMeUrl"]; 87 + show_button_to: string [@key "showButtonTo"]; 88 + } 77 89 [@@deriving yojson {strict= false}] 78 90 79 91 type profile_associated_activity_subscription = 80 - {allow_subscriptions: string [@key "allowSubscriptions"]} 92 + { 93 + allow_subscriptions: string [@key "allowSubscriptions"]; 94 + } 81 95 [@@deriving yojson {strict= false}] 82 96 83 - type profile_associated_chat = {allow_incoming: string [@key "allowIncoming"]} 97 + type profile_associated_chat = 98 + { 99 + allow_incoming: string [@key "allowIncoming"]; 100 + } 84 101 [@@deriving yojson {strict= false}] 85 102 86 103 type profile_associated = 87 - { lists: int option [@default None] 88 - ; feedgens: int option [@default None] 89 - ; starter_packs: int option [@key "starterPacks"] [@default None] 90 - ; labeler: bool option [@default None] 91 - ; chat: profile_associated_chat option [@default None] 92 - ; activity_subscription: profile_associated_activity_subscription option 93 - [@key "activitySubscription"] [@default None] } 104 + { 105 + lists: int option [@default None]; 106 + feedgens: int option [@default None]; 107 + starter_packs: int option [@key "starterPacks"] [@default None]; 108 + labeler: bool option [@default None]; 109 + chat: profile_associated_chat option [@default None]; 110 + activity_subscription: profile_associated_activity_subscription option [@key "activitySubscription"] [@default None]; 111 + germ: profile_associated_germ option [@default None]; 112 + } 94 113 [@@deriving yojson {strict= false}] 95 114 96 - type profile_view_basic = 97 - { did: string 98 - ; handle: string 99 - ; display_name: string option [@key "displayName"] [@default None] 100 - ; avatar: string option [@default None] 101 - ; associated: profile_associated option [@default None] 102 - ; viewer: actor_viewer_state option [@default None] 103 - ; labels: Com_atproto_label_defs.label list option [@default None] 104 - ; created_at: string option [@key "createdAt"] [@default None] 105 - ; verification: verification_state option [@default None] 106 - ; status: status_view option [@default None] } 107 - 108 - and actor_viewer_state = 109 - { muted: bool option [@default None] 110 - ; muted_by_list: list_view_basic option [@key "mutedByList"] [@default None] 111 - ; blocked_by: bool option [@key "blockedBy"] [@default None] 112 - ; blocking: string option [@default None] 113 - ; blocking_by_list: list_view_basic option 114 - [@key "blockingByList"] [@default None] 115 - ; following: string option [@default None] 116 - ; followed_by: string option [@key "followedBy"] [@default None] 117 - ; known_followers: known_followers option 118 - [@key "knownFollowers"] [@default None] 119 - ; activity_subscription: 120 - App_bsky_notification_defs.activity_subscription option 121 - [@key "activitySubscription"] [@default None] } 122 - 123 - and known_followers = {count: int; followers: profile_view_basic list} 115 + type profile_view_basic = { 116 + did: string; 117 + handle: string; 118 + display_name: string option [@key "displayName"] [@default None]; 119 + pronouns: string option [@default None]; 120 + avatar: string option [@default None]; 121 + associated: profile_associated option [@default None]; 122 + viewer: actor_viewer_state option [@default None]; 123 + labels: Com_atproto_label_defs.label list option [@default None]; 124 + created_at: string option [@key "createdAt"] [@default None]; 125 + verification: verification_state option [@default None]; 126 + status: status_view option [@default None]; 127 + debug: Yojson.Safe.t option [@default None]; 128 + } 129 + and actor_viewer_state = { 130 + muted: bool option [@default None]; 131 + muted_by_list: list_view_basic option [@key "mutedByList"] [@default None]; 132 + blocked_by: bool option [@key "blockedBy"] [@default None]; 133 + blocking: string option [@default None]; 134 + blocking_by_list: list_view_basic option [@key "blockingByList"] [@default None]; 135 + following: string option [@default None]; 136 + followed_by: string option [@key "followedBy"] [@default None]; 137 + known_followers: known_followers option [@key "knownFollowers"] [@default None]; 138 + activity_subscription: App_bsky_notification_defs.activity_subscription option [@key "activitySubscription"] [@default None]; 139 + } 140 + and known_followers = { 141 + count: int; 142 + followers: profile_view_basic list; 143 + } 124 144 125 145 let rec profile_view_basic_of_yojson json = 126 146 let open Yojson.Safe.Util in ··· 128 148 let did = json |> member "did" |> to_string in 129 149 let handle = json |> member "handle" |> to_string in 130 150 let display_name = json |> member "displayName" |> to_option to_string in 151 + let pronouns = json |> member "pronouns" |> to_option to_string in 131 152 let avatar = json |> member "avatar" |> to_option to_string in 132 - let associated = 133 - json |> member "associated" 134 - |> to_option (fun x -> 135 - match profile_associated_of_yojson x with Ok v -> Some v | _ -> None ) 136 - |> Option.join 137 - in 138 - let viewer = 139 - json |> member "viewer" 140 - |> to_option (fun x -> 141 - match actor_viewer_state_of_yojson x with Ok v -> Some v | _ -> None ) 142 - |> Option.join 143 - in 144 - let labels = 145 - json |> member "labels" 146 - |> to_option (fun j -> 147 - to_list j 148 - |> List.filter_map (fun x -> 149 - match Com_atproto_label_defs.label_of_yojson x with 150 - | Ok v -> 151 - Some v 152 - | _ -> 153 - None ) ) 154 - in 153 + let associated = json |> member "associated" |> to_option (fun x -> match profile_associated_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 154 + let viewer = json |> member "viewer" |> to_option (fun x -> match actor_viewer_state_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 155 + let labels = json |> member "labels" |> to_option (fun j -> to_list j |> List.filter_map (fun x -> match Com_atproto_label_defs.label_of_yojson x with Ok v -> Some v | _ -> None)) in 155 156 let created_at = json |> member "createdAt" |> to_option to_string in 156 - let verification = 157 - json |> member "verification" 158 - |> to_option (fun x -> 159 - match verification_state_of_yojson x with Ok v -> Some v | _ -> None ) 160 - |> Option.join 161 - in 162 - let status = 163 - json |> member "status" 164 - |> to_option (fun x -> 165 - match status_view_of_yojson x with Ok v -> Some v | _ -> None ) 166 - |> Option.join 167 - in 168 - Ok 169 - { did 170 - ; handle 171 - ; display_name 172 - ; avatar 173 - ; associated 174 - ; viewer 175 - ; labels 176 - ; created_at 177 - ; verification 178 - ; status } 157 + let verification = json |> member "verification" |> to_option (fun x -> match verification_state_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 158 + let status = json |> member "status" |> to_option (fun x -> match status_view_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 159 + let debug = json |> member "debug" |> to_option (fun j -> j) in 160 + Ok { did; handle; display_name; pronouns; avatar; associated; viewer; labels; created_at; verification; status; debug } 179 161 with e -> Error (Printexc.to_string e) 180 162 181 163 and actor_viewer_state_of_yojson json = 182 164 let open Yojson.Safe.Util in 183 165 try 184 166 let muted = json |> member "muted" |> to_option to_bool in 185 - let muted_by_list = 186 - json |> member "mutedByList" 187 - |> to_option (fun x -> 188 - match list_view_basic_of_yojson x with Ok v -> Some v | _ -> None ) 189 - |> Option.join 190 - in 167 + let muted_by_list = json |> member "mutedByList" |> to_option (fun x -> match list_view_basic_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 191 168 let blocked_by = json |> member "blockedBy" |> to_option to_bool in 192 169 let blocking = json |> member "blocking" |> to_option to_string in 193 - let blocking_by_list = 194 - json |> member "blockingByList" 195 - |> to_option (fun x -> 196 - match list_view_basic_of_yojson x with Ok v -> Some v | _ -> None ) 197 - |> Option.join 198 - in 170 + let blocking_by_list = json |> member "blockingByList" |> to_option (fun x -> match list_view_basic_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 199 171 let following = json |> member "following" |> to_option to_string in 200 172 let followed_by = json |> member "followedBy" |> to_option to_string in 201 - let known_followers = 202 - json |> member "knownFollowers" 203 - |> to_option (fun x -> 204 - match known_followers_of_yojson x with Ok v -> Some v | _ -> None ) 205 - |> Option.join 206 - in 207 - let activity_subscription = 208 - json 209 - |> member "activitySubscription" 210 - |> to_option (fun x -> 211 - match 212 - App_bsky_notification_defs.activity_subscription_of_yojson x 213 - with 214 - | Ok v -> 215 - Some v 216 - | _ -> 217 - None ) 218 - |> Option.join 219 - in 220 - Ok 221 - { muted 222 - ; muted_by_list 223 - ; blocked_by 224 - ; blocking 225 - ; blocking_by_list 226 - ; following 227 - ; followed_by 228 - ; known_followers 229 - ; activity_subscription } 173 + let known_followers = json |> member "knownFollowers" |> to_option (fun x -> match known_followers_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 174 + let activity_subscription = json |> member "activitySubscription" |> to_option (fun x -> match App_bsky_notification_defs.activity_subscription_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 175 + Ok { muted; muted_by_list; blocked_by; blocking; blocking_by_list; following; followed_by; known_followers; activity_subscription } 230 176 with e -> Error (Printexc.to_string e) 231 177 232 178 and known_followers_of_yojson json = 233 179 let open Yojson.Safe.Util in 234 180 try 235 181 let count = json |> member "count" |> to_int in 236 - let followers = 237 - json |> member "followers" 238 - |> fun j -> 239 - to_list j 240 - |> List.filter_map (fun x -> 241 - match profile_view_basic_of_yojson x with Ok v -> Some v | _ -> None ) 242 - in 243 - Ok {count; followers} 182 + let followers = json |> member "followers" |> (fun j -> to_list j |> List.filter_map (fun x -> match profile_view_basic_of_yojson x with Ok v -> Some v | _ -> None)) in 183 + Ok { count; followers } 244 184 with e -> Error (Printexc.to_string e) 245 185 246 186 and profile_view_basic_to_yojson (r : profile_view_basic) = 247 - `Assoc 248 - [ ("did", (fun s -> `String s) r.did) 249 - ; ("handle", (fun s -> `String s) r.handle) 250 - ; ( "displayName" 251 - , match r.display_name with 252 - | Some v -> 253 - (fun s -> `String s) v 254 - | None -> 255 - `Null ) 256 - ; ( "avatar" 257 - , match r.avatar with Some v -> (fun s -> `String s) v | None -> `Null ) 258 - ; ( "associated" 259 - , match r.associated with 260 - | Some v -> 261 - profile_associated_to_yojson v 262 - | None -> 263 - `Null ) 264 - ; ( "viewer" 265 - , match r.viewer with 266 - | Some v -> 267 - actor_viewer_state_to_yojson v 268 - | None -> 269 - `Null ) 270 - ; ( "labels" 271 - , match r.labels with 272 - | Some v -> 273 - (fun l -> `List (List.map Com_atproto_label_defs.label_to_yojson l)) 274 - v 275 - | None -> 276 - `Null ) 277 - ; ( "createdAt" 278 - , match r.created_at with 279 - | Some v -> 280 - (fun s -> `String s) v 281 - | None -> 282 - `Null ) 283 - ; ( "verification" 284 - , match r.verification with 285 - | Some v -> 286 - verification_state_to_yojson v 287 - | None -> 288 - `Null ) 289 - ; ( "status" 290 - , match r.status with Some v -> status_view_to_yojson v | None -> `Null ) 291 - ] 187 + `Assoc [ 188 + ("did", (fun s -> `String s) r.did); 189 + ("handle", (fun s -> `String s) r.handle); 190 + ("displayName", match r.display_name with Some v -> (fun s -> `String s) v | None -> `Null); 191 + ("pronouns", match r.pronouns with Some v -> (fun s -> `String s) v | None -> `Null); 192 + ("avatar", match r.avatar with Some v -> (fun s -> `String s) v | None -> `Null); 193 + ("associated", match r.associated with Some v -> profile_associated_to_yojson v | None -> `Null); 194 + ("viewer", match r.viewer with Some v -> actor_viewer_state_to_yojson v | None -> `Null); 195 + ("labels", match r.labels with Some v -> (fun l -> `List (List.map Com_atproto_label_defs.label_to_yojson l)) v | None -> `Null); 196 + ("createdAt", match r.created_at with Some v -> (fun s -> `String s) v | None -> `Null); 197 + ("verification", match r.verification with Some v -> verification_state_to_yojson v | None -> `Null); 198 + ("status", match r.status with Some v -> status_view_to_yojson v | None -> `Null); 199 + ("debug", match r.debug with Some v -> (fun j -> j) v | None -> `Null) 200 + ] 292 201 293 202 and actor_viewer_state_to_yojson (r : actor_viewer_state) = 294 - `Assoc 295 - [ ( "muted" 296 - , match r.muted with Some v -> (fun b -> `Bool b) v | None -> `Null ) 297 - ; ( "mutedByList" 298 - , match r.muted_by_list with 299 - | Some v -> 300 - list_view_basic_to_yojson v 301 - | None -> 302 - `Null ) 303 - ; ( "blockedBy" 304 - , match r.blocked_by with Some v -> (fun b -> `Bool b) v | None -> `Null 305 - ) 306 - ; ( "blocking" 307 - , match r.blocking with Some v -> (fun s -> `String s) v | None -> `Null 308 - ) 309 - ; ( "blockingByList" 310 - , match r.blocking_by_list with 311 - | Some v -> 312 - list_view_basic_to_yojson v 313 - | None -> 314 - `Null ) 315 - ; ( "following" 316 - , match r.following with 317 - | Some v -> 318 - (fun s -> `String s) v 319 - | None -> 320 - `Null ) 321 - ; ( "followedBy" 322 - , match r.followed_by with 323 - | Some v -> 324 - (fun s -> `String s) v 325 - | None -> 326 - `Null ) 327 - ; ( "knownFollowers" 328 - , match r.known_followers with 329 - | Some v -> 330 - known_followers_to_yojson v 331 - | None -> 332 - `Null ) 333 - ; ( "activitySubscription" 334 - , match r.activity_subscription with 335 - | Some v -> 336 - App_bsky_notification_defs.activity_subscription_to_yojson v 337 - | None -> 338 - `Null ) ] 203 + `Assoc [ 204 + ("muted", match r.muted with Some v -> (fun b -> `Bool b) v | None -> `Null); 205 + ("mutedByList", match r.muted_by_list with Some v -> list_view_basic_to_yojson v | None -> `Null); 206 + ("blockedBy", match r.blocked_by with Some v -> (fun b -> `Bool b) v | None -> `Null); 207 + ("blocking", match r.blocking with Some v -> (fun s -> `String s) v | None -> `Null); 208 + ("blockingByList", match r.blocking_by_list with Some v -> list_view_basic_to_yojson v | None -> `Null); 209 + ("following", match r.following with Some v -> (fun s -> `String s) v | None -> `Null); 210 + ("followedBy", match r.followed_by with Some v -> (fun s -> `String s) v | None -> `Null); 211 + ("knownFollowers", match r.known_followers with Some v -> known_followers_to_yojson v | None -> `Null); 212 + ("activitySubscription", match r.activity_subscription with Some v -> App_bsky_notification_defs.activity_subscription_to_yojson v | None -> `Null) 213 + ] 339 214 340 215 and known_followers_to_yojson (r : known_followers) = 341 - `Assoc 342 - [ ("count", (fun i -> `Int i) r.count) 343 - ; ( "followers" 344 - , (fun l -> `List (List.map profile_view_basic_to_yojson l)) r.followers 345 - ) ] 216 + `Assoc [ 217 + ("count", (fun i -> `Int i) r.count); 218 + ("followers", (fun l -> `List (List.map profile_view_basic_to_yojson l)) r.followers) 219 + ] 346 220 347 221 type profile_view = 348 - { did: string 349 - ; handle: string 350 - ; display_name: string option [@key "displayName"] [@default None] 351 - ; description: string option [@default None] 352 - ; avatar: string option [@default None] 353 - ; associated: profile_associated option [@default None] 354 - ; indexed_at: string option [@key "indexedAt"] [@default None] 355 - ; created_at: string option [@key "createdAt"] [@default None] 356 - ; viewer: actor_viewer_state option [@default None] 357 - ; labels: Com_atproto_label_defs.label list option [@default None] 358 - ; verification: verification_state option [@default None] 359 - ; status: status_view option [@default None] } 222 + { 223 + did: string; 224 + handle: string; 225 + display_name: string option [@key "displayName"] [@default None]; 226 + pronouns: string option [@default None]; 227 + description: string option [@default None]; 228 + avatar: string option [@default None]; 229 + associated: profile_associated option [@default None]; 230 + indexed_at: string option [@key "indexedAt"] [@default None]; 231 + created_at: string option [@key "createdAt"] [@default None]; 232 + viewer: actor_viewer_state option [@default None]; 233 + labels: Com_atproto_label_defs.label list option [@default None]; 234 + verification: verification_state option [@default None]; 235 + status: status_view option [@default None]; 236 + debug: Yojson.Safe.t option [@default None]; 237 + } 360 238 [@@deriving yojson {strict= false}] 361 239 362 240 type starter_pack_view_basic = 363 - { uri: string 364 - ; cid: string 365 - ; record: Yojson.Safe.t 366 - ; creator: profile_view_basic 367 - ; list_item_count: int option [@key "listItemCount"] [@default None] 368 - ; joined_week_count: int option [@key "joinedWeekCount"] [@default None] 369 - ; joined_all_time_count: int option 370 - [@key "joinedAllTimeCount"] [@default None] 371 - ; labels: Com_atproto_label_defs.label list option [@default None] 372 - ; indexed_at: string [@key "indexedAt"] } 241 + { 242 + uri: string; 243 + cid: string; 244 + record: Yojson.Safe.t; 245 + creator: profile_view_basic; 246 + list_item_count: int option [@key "listItemCount"] [@default None]; 247 + joined_week_count: int option [@key "joinedWeekCount"] [@default None]; 248 + joined_all_time_count: int option [@key "joinedAllTimeCount"] [@default None]; 249 + labels: Com_atproto_label_defs.label list option [@default None]; 250 + indexed_at: string [@key "indexedAt"]; 251 + } 373 252 [@@deriving yojson {strict= false}] 374 253 375 254 type profile_view_detailed = 376 - { did: string 377 - ; handle: string 378 - ; display_name: string option [@key "displayName"] [@default None] 379 - ; description: string option [@default None] 380 - ; avatar: string option [@default None] 381 - ; banner: string option [@default None] 382 - ; followers_count: int option [@key "followersCount"] [@default None] 383 - ; follows_count: int option [@key "followsCount"] [@default None] 384 - ; posts_count: int option [@key "postsCount"] [@default None] 385 - ; associated: profile_associated option [@default None] 386 - ; joined_via_starter_pack: starter_pack_view_basic option 387 - [@key "joinedViaStarterPack"] [@default None] 388 - ; indexed_at: string option [@key "indexedAt"] [@default None] 389 - ; created_at: string option [@key "createdAt"] [@default None] 390 - ; viewer: actor_viewer_state option [@default None] 391 - ; labels: Com_atproto_label_defs.label list option [@default None] 392 - ; pinned_post: Com_atproto_repo_strongRef.main option 393 - [@key "pinnedPost"] [@default None] 394 - ; verification: verification_state option [@default None] 395 - ; status: status_view option [@default None] } 255 + { 256 + did: string; 257 + handle: string; 258 + display_name: string option [@key "displayName"] [@default None]; 259 + description: string option [@default None]; 260 + pronouns: string option [@default None]; 261 + website: string option [@default None]; 262 + avatar: string option [@default None]; 263 + banner: string option [@default None]; 264 + followers_count: int option [@key "followersCount"] [@default None]; 265 + follows_count: int option [@key "followsCount"] [@default None]; 266 + posts_count: int option [@key "postsCount"] [@default None]; 267 + associated: profile_associated option [@default None]; 268 + joined_via_starter_pack: starter_pack_view_basic option [@key "joinedViaStarterPack"] [@default None]; 269 + indexed_at: string option [@key "indexedAt"] [@default None]; 270 + created_at: string option [@key "createdAt"] [@default None]; 271 + viewer: actor_viewer_state option [@default None]; 272 + labels: Com_atproto_label_defs.label list option [@default None]; 273 + pinned_post: Com_atproto_repo_strongRef.main option [@key "pinnedPost"] [@default None]; 274 + verification: verification_state option [@default None]; 275 + status: status_view option [@default None]; 276 + debug: Yojson.Safe.t option [@default None]; 277 + } 278 + [@@deriving yojson {strict= false}] 279 + 280 + type live_event_preferences = 281 + { 282 + hidden_feed_ids: string list option [@key "hiddenFeedIds"] [@default None]; 283 + hide_all_feeds: bool option [@key "hideAllFeeds"] [@default None]; 284 + } 396 285 [@@deriving yojson {strict= false}] 397 286 398 287 type verification_prefs = 399 - {hide_badges: bool option [@key "hideBadges"] [@default None]} 288 + { 289 + hide_badges: bool option [@key "hideBadges"] [@default None]; 290 + } 400 291 [@@deriving yojson {strict= false}] 401 292 402 293 type postgate_embedding_rules_item = ··· 407 298 let open Yojson.Safe.Util in 408 299 try 409 300 match json |> member "$type" |> to_string with 410 - | "app.bsky.feed.postgate#disableRule" -> ( 411 - match App_bsky_feed_postgate.disable_rule_of_yojson json with 412 - | Ok v -> 413 - Ok (PostgateDisableRule v) 414 - | Error e -> 415 - Error e ) 416 - | _ -> 417 - Ok (Unknown json) 301 + | "app.bsky.feed.postgate#disableRule" -> 302 + (match App_bsky_feed_postgate.disable_rule_of_yojson json with 303 + | Ok v -> Ok (PostgateDisableRule v) 304 + | Error e -> Error e) 305 + | _ -> Ok (Unknown json) 418 306 with _ -> Error "failed to parse union" 419 307 420 308 let postgate_embedding_rules_item_to_yojson = function 421 - | PostgateDisableRule v -> ( 422 - match App_bsky_feed_postgate.disable_rule_to_yojson v with 423 - | `Assoc fields -> 424 - `Assoc 425 - (("$type", `String "app.bsky.feed.postgate#disableRule") :: fields) 426 - | other -> 427 - other ) 428 - | Unknown j -> 429 - j 309 + | PostgateDisableRule v -> 310 + (match App_bsky_feed_postgate.disable_rule_to_yojson v with 311 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.postgate#disableRule") :: fields) 312 + | other -> other) 313 + | Unknown j -> j 430 314 431 315 type threadgate_allow_rules_item = 432 316 | ThreadgateMentionRule of App_bsky_feed_threadgate.mention_rule ··· 439 323 let open Yojson.Safe.Util in 440 324 try 441 325 match json |> member "$type" |> to_string with 442 - | "app.bsky.feed.threadgate#mentionRule" -> ( 443 - match App_bsky_feed_threadgate.mention_rule_of_yojson json with 444 - | Ok v -> 445 - Ok (ThreadgateMentionRule v) 446 - | Error e -> 447 - Error e ) 448 - | "app.bsky.feed.threadgate#followerRule" -> ( 449 - match App_bsky_feed_threadgate.follower_rule_of_yojson json with 450 - | Ok v -> 451 - Ok (ThreadgateFollowerRule v) 452 - | Error e -> 453 - Error e ) 454 - | "app.bsky.feed.threadgate#followingRule" -> ( 455 - match App_bsky_feed_threadgate.following_rule_of_yojson json with 456 - | Ok v -> 457 - Ok (ThreadgateFollowingRule v) 458 - | Error e -> 459 - Error e ) 460 - | "app.bsky.feed.threadgate#listRule" -> ( 461 - match App_bsky_feed_threadgate.list_rule_of_yojson json with 462 - | Ok v -> 463 - Ok (ThreadgateListRule v) 464 - | Error e -> 465 - Error e ) 466 - | _ -> 467 - Ok (Unknown json) 326 + | "app.bsky.feed.threadgate#mentionRule" -> 327 + (match App_bsky_feed_threadgate.mention_rule_of_yojson json with 328 + | Ok v -> Ok (ThreadgateMentionRule v) 329 + | Error e -> Error e) 330 + | "app.bsky.feed.threadgate#followerRule" -> 331 + (match App_bsky_feed_threadgate.follower_rule_of_yojson json with 332 + | Ok v -> Ok (ThreadgateFollowerRule v) 333 + | Error e -> Error e) 334 + | "app.bsky.feed.threadgate#followingRule" -> 335 + (match App_bsky_feed_threadgate.following_rule_of_yojson json with 336 + | Ok v -> Ok (ThreadgateFollowingRule v) 337 + | Error e -> Error e) 338 + | "app.bsky.feed.threadgate#listRule" -> 339 + (match App_bsky_feed_threadgate.list_rule_of_yojson json with 340 + | Ok v -> Ok (ThreadgateListRule v) 341 + | Error e -> Error e) 342 + | _ -> Ok (Unknown json) 468 343 with _ -> Error "failed to parse union" 469 344 470 345 let threadgate_allow_rules_item_to_yojson = function 471 - | ThreadgateMentionRule v -> ( 472 - match App_bsky_feed_threadgate.mention_rule_to_yojson v with 473 - | `Assoc fields -> 474 - `Assoc 475 - (("$type", `String "app.bsky.feed.threadgate#mentionRule") :: fields) 476 - | other -> 477 - other ) 478 - | ThreadgateFollowerRule v -> ( 479 - match App_bsky_feed_threadgate.follower_rule_to_yojson v with 480 - | `Assoc fields -> 481 - `Assoc 482 - (("$type", `String "app.bsky.feed.threadgate#followerRule") :: fields) 483 - | other -> 484 - other ) 485 - | ThreadgateFollowingRule v -> ( 486 - match App_bsky_feed_threadgate.following_rule_to_yojson v with 487 - | `Assoc fields -> 488 - `Assoc 489 - (("$type", `String "app.bsky.feed.threadgate#followingRule") :: fields) 490 - | other -> 491 - other ) 492 - | ThreadgateListRule v -> ( 493 - match App_bsky_feed_threadgate.list_rule_to_yojson v with 494 - | `Assoc fields -> 495 - `Assoc (("$type", `String "app.bsky.feed.threadgate#listRule") :: fields) 496 - | other -> 497 - other ) 498 - | Unknown j -> 499 - j 346 + | ThreadgateMentionRule v -> 347 + (match App_bsky_feed_threadgate.mention_rule_to_yojson v with 348 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#mentionRule") :: fields) 349 + | other -> other) 350 + | ThreadgateFollowerRule v -> 351 + (match App_bsky_feed_threadgate.follower_rule_to_yojson v with 352 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#followerRule") :: fields) 353 + | other -> other) 354 + | ThreadgateFollowingRule v -> 355 + (match App_bsky_feed_threadgate.following_rule_to_yojson v with 356 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#followingRule") :: fields) 357 + | other -> other) 358 + | ThreadgateListRule v -> 359 + (match App_bsky_feed_threadgate.list_rule_to_yojson v with 360 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.threadgate#listRule") :: fields) 361 + | other -> other) 362 + | Unknown j -> j 500 363 501 364 type post_interaction_settings_pref = 502 - { threadgate_allow_rules: threadgate_allow_rules_item list option 503 - [@key "threadgateAllowRules"] [@default None] 504 - ; postgate_embedding_rules: postgate_embedding_rules_item list option 505 - [@key "postgateEmbeddingRules"] [@default None] } 365 + { 366 + threadgate_allow_rules: threadgate_allow_rules_item list option [@key "threadgateAllowRules"] [@default None]; 367 + postgate_embedding_rules: postgate_embedding_rules_item list option [@key "postgateEmbeddingRules"] [@default None]; 368 + } 506 369 [@@deriving yojson {strict= false}] 507 370 508 - type labeler_pref_item = {did: string} [@@deriving yojson {strict= false}] 371 + type labeler_pref_item = 372 + { 373 + did: string; 374 + } 375 + [@@deriving yojson {strict= false}] 509 376 510 - type labelers_pref = {labelers: labeler_pref_item list} 377 + type labelers_pref = 378 + { 379 + labelers: labeler_pref_item list; 380 + } 511 381 [@@deriving yojson {strict= false}] 512 382 513 383 type nux = 514 - { id: string 515 - ; completed: bool 516 - ; data: string option [@default None] 517 - ; expires_at: string option [@key "expiresAt"] [@default None] } 384 + { 385 + id: string; 386 + completed: bool; 387 + data: string option [@default None]; 388 + expires_at: string option [@key "expiresAt"] [@default None]; 389 + } 518 390 [@@deriving yojson {strict= false}] 519 391 520 - type bsky_app_progress_guide = {guide: string} 392 + type bsky_app_progress_guide = 393 + { 394 + guide: string; 395 + } 521 396 [@@deriving yojson {strict= false}] 522 397 523 398 type bsky_app_state_pref = 524 - { active_progress_guide: bsky_app_progress_guide option 525 - [@key "activeProgressGuide"] [@default None] 526 - ; queued_nudges: string list option [@key "queuedNudges"] [@default None] 527 - ; nuxs: nux list option [@default None] } 399 + { 400 + active_progress_guide: bsky_app_progress_guide option [@key "activeProgressGuide"] [@default None]; 401 + queued_nudges: string list option [@key "queuedNudges"] [@default None]; 402 + nuxs: nux list option [@default None]; 403 + } 528 404 [@@deriving yojson {strict= false}] 529 405 530 - type hidden_posts_pref = {items: string list} 406 + type hidden_posts_pref = 407 + { 408 + items: string list; 409 + } 531 410 [@@deriving yojson {strict= false}] 532 411 533 412 (** string type with known values *) 534 413 type muted_word_target = string 535 - 536 414 let muted_word_target_of_yojson = function 537 - | `String s -> 538 - Ok s 539 - | _ -> 540 - Error "muted_word_target: expected string" 541 - 415 + | `String s -> Ok s 416 + | _ -> Error "muted_word_target: expected string" 542 417 let muted_word_target_to_yojson s = `String s 543 418 544 419 type muted_word = 545 - { id: string option [@default None] 546 - ; value: string 547 - ; targets: muted_word_target list 548 - ; actor_target: string option [@key "actorTarget"] [@default None] 549 - ; expires_at: string option [@key "expiresAt"] [@default None] } 420 + { 421 + id: string option [@default None]; 422 + value: string; 423 + targets: muted_word_target list; 424 + actor_target: string option [@key "actorTarget"] [@default None]; 425 + expires_at: string option [@key "expiresAt"] [@default None]; 426 + } 550 427 [@@deriving yojson {strict= false}] 551 428 552 - type muted_words_pref = {items: muted_word list} 429 + type muted_words_pref = 430 + { 431 + items: muted_word list; 432 + } 553 433 [@@deriving yojson {strict= false}] 554 434 555 - type interests_pref = {tags: string list} [@@deriving yojson {strict= false}] 435 + type interests_pref = 436 + { 437 + tags: string list; 438 + } 439 + [@@deriving yojson {strict= false}] 556 440 557 441 type thread_view_pref = 558 - { sort: string option [@default None] 559 - ; prioritize_followed_users: bool option 560 - [@key "prioritizeFollowedUsers"] [@default None] } 442 + { 443 + sort: string option [@default None]; 444 + } 561 445 [@@deriving yojson {strict= false}] 562 446 563 447 type feed_view_pref = 564 - { feed: string 565 - ; hide_replies: bool option [@key "hideReplies"] [@default None] 566 - ; hide_replies_by_unfollowed: bool option 567 - [@key "hideRepliesByUnfollowed"] [@default None] 568 - ; hide_replies_by_like_count: int option 569 - [@key "hideRepliesByLikeCount"] [@default None] 570 - ; hide_reposts: bool option [@key "hideReposts"] [@default None] 571 - ; hide_quote_posts: bool option [@key "hideQuotePosts"] [@default None] } 448 + { 449 + feed: string; 450 + hide_replies: bool option [@key "hideReplies"] [@default None]; 451 + hide_replies_by_unfollowed: bool option [@key "hideRepliesByUnfollowed"] [@default None]; 452 + hide_replies_by_like_count: int option [@key "hideRepliesByLikeCount"] [@default None]; 453 + hide_reposts: bool option [@key "hideReposts"] [@default None]; 454 + hide_quote_posts: bool option [@key "hideQuotePosts"] [@default None]; 455 + } 456 + [@@deriving yojson {strict= false}] 457 + 458 + type declared_age_pref = 459 + { 460 + is_over_age13: bool option [@key "isOverAge13"] [@default None]; 461 + is_over_age16: bool option [@key "isOverAge16"] [@default None]; 462 + is_over_age18: bool option [@key "isOverAge18"] [@default None]; 463 + } 572 464 [@@deriving yojson {strict= false}] 573 465 574 466 type personal_details_pref = 575 - {birth_date: string option [@key "birthDate"] [@default None]} 467 + { 468 + birth_date: string option [@key "birthDate"] [@default None]; 469 + } 576 470 [@@deriving yojson {strict= false}] 577 471 578 472 type saved_feed = 579 - {id: string; type_: string [@key "type"]; value: string; pinned: bool} 473 + { 474 + id: string; 475 + type_: string [@key "type"]; 476 + value: string; 477 + pinned: bool; 478 + } 580 479 [@@deriving yojson {strict= false}] 581 480 582 - type saved_feeds_pref_v2 = {items: saved_feed list} 481 + type saved_feeds_pref_v2 = 482 + { 483 + items: saved_feed list; 484 + } 583 485 [@@deriving yojson {strict= false}] 584 486 585 487 type saved_feeds_pref = 586 - { pinned: string list 587 - ; saved: string list 588 - ; timeline_index: int option [@key "timelineIndex"] [@default None] } 488 + { 489 + pinned: string list; 490 + saved: string list; 491 + timeline_index: int option [@key "timelineIndex"] [@default None]; 492 + } 589 493 [@@deriving yojson {strict= false}] 590 494 591 495 type content_label_pref = 592 - { labeler_did: string option [@key "labelerDid"] [@default None] 593 - ; label: string 594 - ; visibility: string } 496 + { 497 + labeler_did: string option [@key "labelerDid"] [@default None]; 498 + label: string; 499 + visibility: string; 500 + } 595 501 [@@deriving yojson {strict= false}] 596 502 597 - type adult_content_pref = {enabled: bool} [@@deriving yojson {strict= false}] 503 + type adult_content_pref = 504 + { 505 + enabled: bool; 506 + } 507 + [@@deriving yojson {strict= false}] 598 508 599 509 type preferences_item = 600 510 | AdultContentPref of adult_content_pref ··· 602 512 | SavedFeedsPref of saved_feeds_pref 603 513 | SavedFeedsPrefV2 of saved_feeds_pref_v2 604 514 | PersonalDetailsPref of personal_details_pref 515 + | DeclaredAgePref of declared_age_pref 605 516 | FeedViewPref of feed_view_pref 606 517 | ThreadViewPref of thread_view_pref 607 518 | InterestsPref of interests_pref ··· 611 522 | LabelersPref of labelers_pref 612 523 | PostInteractionSettingsPref of post_interaction_settings_pref 613 524 | VerificationPrefs of verification_prefs 525 + | LiveEventPreferences of live_event_preferences 614 526 | Unknown of Yojson.Safe.t 615 527 616 528 let preferences_item_of_yojson json = 617 529 let open Yojson.Safe.Util in 618 530 try 619 531 match json |> member "$type" |> to_string with 620 - | "app.bsky.actor.defs#adultContentPref" -> ( 621 - match adult_content_pref_of_yojson json with 622 - | Ok v -> 623 - Ok (AdultContentPref v) 624 - | Error e -> 625 - Error e ) 626 - | "app.bsky.actor.defs#contentLabelPref" -> ( 627 - match content_label_pref_of_yojson json with 628 - | Ok v -> 629 - Ok (ContentLabelPref v) 630 - | Error e -> 631 - Error e ) 632 - | "app.bsky.actor.defs#savedFeedsPref" -> ( 633 - match saved_feeds_pref_of_yojson json with 634 - | Ok v -> 635 - Ok (SavedFeedsPref v) 636 - | Error e -> 637 - Error e ) 638 - | "app.bsky.actor.defs#savedFeedsPrefV2" -> ( 639 - match saved_feeds_pref_v2_of_yojson json with 640 - | Ok v -> 641 - Ok (SavedFeedsPrefV2 v) 642 - | Error e -> 643 - Error e ) 644 - | "app.bsky.actor.defs#personalDetailsPref" -> ( 645 - match personal_details_pref_of_yojson json with 646 - | Ok v -> 647 - Ok (PersonalDetailsPref v) 648 - | Error e -> 649 - Error e ) 650 - | "app.bsky.actor.defs#feedViewPref" -> ( 651 - match feed_view_pref_of_yojson json with 652 - | Ok v -> 653 - Ok (FeedViewPref v) 654 - | Error e -> 655 - Error e ) 656 - | "app.bsky.actor.defs#threadViewPref" -> ( 657 - match thread_view_pref_of_yojson json with 658 - | Ok v -> 659 - Ok (ThreadViewPref v) 660 - | Error e -> 661 - Error e ) 662 - | "app.bsky.actor.defs#interestsPref" -> ( 663 - match interests_pref_of_yojson json with 664 - | Ok v -> 665 - Ok (InterestsPref v) 666 - | Error e -> 667 - Error e ) 668 - | "app.bsky.actor.defs#mutedWordsPref" -> ( 669 - match muted_words_pref_of_yojson json with 670 - | Ok v -> 671 - Ok (MutedWordsPref v) 672 - | Error e -> 673 - Error e ) 674 - | "app.bsky.actor.defs#hiddenPostsPref" -> ( 675 - match hidden_posts_pref_of_yojson json with 676 - | Ok v -> 677 - Ok (HiddenPostsPref v) 678 - | Error e -> 679 - Error e ) 680 - | "app.bsky.actor.defs#bskyAppStatePref" -> ( 681 - match bsky_app_state_pref_of_yojson json with 682 - | Ok v -> 683 - Ok (BskyAppStatePref v) 684 - | Error e -> 685 - Error e ) 686 - | "app.bsky.actor.defs#labelersPref" -> ( 687 - match labelers_pref_of_yojson json with 688 - | Ok v -> 689 - Ok (LabelersPref v) 690 - | Error e -> 691 - Error e ) 692 - | "app.bsky.actor.defs#postInteractionSettingsPref" -> ( 693 - match post_interaction_settings_pref_of_yojson json with 694 - | Ok v -> 695 - Ok (PostInteractionSettingsPref v) 696 - | Error e -> 697 - Error e ) 698 - | "app.bsky.actor.defs#verificationPrefs" -> ( 699 - match verification_prefs_of_yojson json with 700 - | Ok v -> 701 - Ok (VerificationPrefs v) 702 - | Error e -> 703 - Error e ) 704 - | _ -> 705 - Ok (Unknown json) 532 + | "app.bsky.actor.defs#adultContentPref" -> 533 + (match adult_content_pref_of_yojson json with 534 + | Ok v -> Ok (AdultContentPref v) 535 + | Error e -> Error e) 536 + | "app.bsky.actor.defs#contentLabelPref" -> 537 + (match content_label_pref_of_yojson json with 538 + | Ok v -> Ok (ContentLabelPref v) 539 + | Error e -> Error e) 540 + | "app.bsky.actor.defs#savedFeedsPref" -> 541 + (match saved_feeds_pref_of_yojson json with 542 + | Ok v -> Ok (SavedFeedsPref v) 543 + | Error e -> Error e) 544 + | "app.bsky.actor.defs#savedFeedsPrefV2" -> 545 + (match saved_feeds_pref_v2_of_yojson json with 546 + | Ok v -> Ok (SavedFeedsPrefV2 v) 547 + | Error e -> Error e) 548 + | "app.bsky.actor.defs#personalDetailsPref" -> 549 + (match personal_details_pref_of_yojson json with 550 + | Ok v -> Ok (PersonalDetailsPref v) 551 + | Error e -> Error e) 552 + | "app.bsky.actor.defs#declaredAgePref" -> 553 + (match declared_age_pref_of_yojson json with 554 + | Ok v -> Ok (DeclaredAgePref v) 555 + | Error e -> Error e) 556 + | "app.bsky.actor.defs#feedViewPref" -> 557 + (match feed_view_pref_of_yojson json with 558 + | Ok v -> Ok (FeedViewPref v) 559 + | Error e -> Error e) 560 + | "app.bsky.actor.defs#threadViewPref" -> 561 + (match thread_view_pref_of_yojson json with 562 + | Ok v -> Ok (ThreadViewPref v) 563 + | Error e -> Error e) 564 + | "app.bsky.actor.defs#interestsPref" -> 565 + (match interests_pref_of_yojson json with 566 + | Ok v -> Ok (InterestsPref v) 567 + | Error e -> Error e) 568 + | "app.bsky.actor.defs#mutedWordsPref" -> 569 + (match muted_words_pref_of_yojson json with 570 + | Ok v -> Ok (MutedWordsPref v) 571 + | Error e -> Error e) 572 + | "app.bsky.actor.defs#hiddenPostsPref" -> 573 + (match hidden_posts_pref_of_yojson json with 574 + | Ok v -> Ok (HiddenPostsPref v) 575 + | Error e -> Error e) 576 + | "app.bsky.actor.defs#bskyAppStatePref" -> 577 + (match bsky_app_state_pref_of_yojson json with 578 + | Ok v -> Ok (BskyAppStatePref v) 579 + | Error e -> Error e) 580 + | "app.bsky.actor.defs#labelersPref" -> 581 + (match labelers_pref_of_yojson json with 582 + | Ok v -> Ok (LabelersPref v) 583 + | Error e -> Error e) 584 + | "app.bsky.actor.defs#postInteractionSettingsPref" -> 585 + (match post_interaction_settings_pref_of_yojson json with 586 + | Ok v -> Ok (PostInteractionSettingsPref v) 587 + | Error e -> Error e) 588 + | "app.bsky.actor.defs#verificationPrefs" -> 589 + (match verification_prefs_of_yojson json with 590 + | Ok v -> Ok (VerificationPrefs v) 591 + | Error e -> Error e) 592 + | "app.bsky.actor.defs#liveEventPreferences" -> 593 + (match live_event_preferences_of_yojson json with 594 + | Ok v -> Ok (LiveEventPreferences v) 595 + | Error e -> Error e) 596 + | _ -> Ok (Unknown json) 706 597 with _ -> Error "failed to parse union" 707 598 708 599 let preferences_item_to_yojson = function 709 - | AdultContentPref v -> ( 710 - match adult_content_pref_to_yojson v with 711 - | `Assoc fields -> 712 - `Assoc 713 - (("$type", `String "app.bsky.actor.defs#adultContentPref") :: fields) 714 - | other -> 715 - other ) 716 - | ContentLabelPref v -> ( 717 - match content_label_pref_to_yojson v with 718 - | `Assoc fields -> 719 - `Assoc 720 - (("$type", `String "app.bsky.actor.defs#contentLabelPref") :: fields) 721 - | other -> 722 - other ) 723 - | SavedFeedsPref v -> ( 724 - match saved_feeds_pref_to_yojson v with 725 - | `Assoc fields -> 726 - `Assoc 727 - (("$type", `String "app.bsky.actor.defs#savedFeedsPref") :: fields) 728 - | other -> 729 - other ) 730 - | SavedFeedsPrefV2 v -> ( 731 - match saved_feeds_pref_v2_to_yojson v with 732 - | `Assoc fields -> 733 - `Assoc 734 - (("$type", `String "app.bsky.actor.defs#savedFeedsPrefV2") :: fields) 735 - | other -> 736 - other ) 737 - | PersonalDetailsPref v -> ( 738 - match personal_details_pref_to_yojson v with 739 - | `Assoc fields -> 740 - `Assoc 741 - ( ("$type", `String "app.bsky.actor.defs#personalDetailsPref") 742 - :: fields ) 743 - | other -> 744 - other ) 745 - | FeedViewPref v -> ( 746 - match feed_view_pref_to_yojson v with 747 - | `Assoc fields -> 748 - `Assoc (("$type", `String "app.bsky.actor.defs#feedViewPref") :: fields) 749 - | other -> 750 - other ) 751 - | ThreadViewPref v -> ( 752 - match thread_view_pref_to_yojson v with 753 - | `Assoc fields -> 754 - `Assoc 755 - (("$type", `String "app.bsky.actor.defs#threadViewPref") :: fields) 756 - | other -> 757 - other ) 758 - | InterestsPref v -> ( 759 - match interests_pref_to_yojson v with 760 - | `Assoc fields -> 761 - `Assoc (("$type", `String "app.bsky.actor.defs#interestsPref") :: fields) 762 - | other -> 763 - other ) 764 - | MutedWordsPref v -> ( 765 - match muted_words_pref_to_yojson v with 766 - | `Assoc fields -> 767 - `Assoc 768 - (("$type", `String "app.bsky.actor.defs#mutedWordsPref") :: fields) 769 - | other -> 770 - other ) 771 - | HiddenPostsPref v -> ( 772 - match hidden_posts_pref_to_yojson v with 773 - | `Assoc fields -> 774 - `Assoc 775 - (("$type", `String "app.bsky.actor.defs#hiddenPostsPref") :: fields) 776 - | other -> 777 - other ) 778 - | BskyAppStatePref v -> ( 779 - match bsky_app_state_pref_to_yojson v with 780 - | `Assoc fields -> 781 - `Assoc 782 - (("$type", `String "app.bsky.actor.defs#bskyAppStatePref") :: fields) 783 - | other -> 784 - other ) 785 - | LabelersPref v -> ( 786 - match labelers_pref_to_yojson v with 787 - | `Assoc fields -> 788 - `Assoc (("$type", `String "app.bsky.actor.defs#labelersPref") :: fields) 789 - | other -> 790 - other ) 791 - | PostInteractionSettingsPref v -> ( 792 - match post_interaction_settings_pref_to_yojson v with 793 - | `Assoc fields -> 794 - `Assoc 795 - ( ("$type", `String "app.bsky.actor.defs#postInteractionSettingsPref") 796 - :: fields ) 797 - | other -> 798 - other ) 799 - | VerificationPrefs v -> ( 800 - match verification_prefs_to_yojson v with 801 - | `Assoc fields -> 802 - `Assoc 803 - (("$type", `String "app.bsky.actor.defs#verificationPrefs") :: fields) 804 - | other -> 805 - other ) 806 - | Unknown j -> 807 - j 600 + | AdultContentPref v -> 601 + (match adult_content_pref_to_yojson v with 602 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#adultContentPref") :: fields) 603 + | other -> other) 604 + | ContentLabelPref v -> 605 + (match content_label_pref_to_yojson v with 606 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#contentLabelPref") :: fields) 607 + | other -> other) 608 + | SavedFeedsPref v -> 609 + (match saved_feeds_pref_to_yojson v with 610 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#savedFeedsPref") :: fields) 611 + | other -> other) 612 + | SavedFeedsPrefV2 v -> 613 + (match saved_feeds_pref_v2_to_yojson v with 614 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#savedFeedsPrefV2") :: fields) 615 + | other -> other) 616 + | PersonalDetailsPref v -> 617 + (match personal_details_pref_to_yojson v with 618 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#personalDetailsPref") :: fields) 619 + | other -> other) 620 + | DeclaredAgePref v -> 621 + (match declared_age_pref_to_yojson v with 622 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#declaredAgePref") :: fields) 623 + | other -> other) 624 + | FeedViewPref v -> 625 + (match feed_view_pref_to_yojson v with 626 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#feedViewPref") :: fields) 627 + | other -> other) 628 + | ThreadViewPref v -> 629 + (match thread_view_pref_to_yojson v with 630 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#threadViewPref") :: fields) 631 + | other -> other) 632 + | InterestsPref v -> 633 + (match interests_pref_to_yojson v with 634 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#interestsPref") :: fields) 635 + | other -> other) 636 + | MutedWordsPref v -> 637 + (match muted_words_pref_to_yojson v with 638 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#mutedWordsPref") :: fields) 639 + | other -> other) 640 + | HiddenPostsPref v -> 641 + (match hidden_posts_pref_to_yojson v with 642 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#hiddenPostsPref") :: fields) 643 + | other -> other) 644 + | BskyAppStatePref v -> 645 + (match bsky_app_state_pref_to_yojson v with 646 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#bskyAppStatePref") :: fields) 647 + | other -> other) 648 + | LabelersPref v -> 649 + (match labelers_pref_to_yojson v with 650 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#labelersPref") :: fields) 651 + | other -> other) 652 + | PostInteractionSettingsPref v -> 653 + (match post_interaction_settings_pref_to_yojson v with 654 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#postInteractionSettingsPref") :: fields) 655 + | other -> other) 656 + | VerificationPrefs v -> 657 + (match verification_prefs_to_yojson v with 658 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#verificationPrefs") :: fields) 659 + | other -> other) 660 + | LiveEventPreferences v -> 661 + (match live_event_preferences_to_yojson v with 662 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.actor.defs#liveEventPreferences") :: fields) 663 + | other -> other) 664 + | Unknown j -> j 808 665 809 666 type preferences = preferences_item list 810 - 811 667 let preferences_of_yojson json = 812 668 let open Yojson.Safe.Util in 813 - Ok 814 - ( to_list json 815 - |> List.filter_map (fun x -> 816 - match preferences_item_of_yojson x with Ok v -> Some v | _ -> None ) ) 817 - 669 + Ok (to_list json |> List.filter_map (fun x -> match preferences_item_of_yojson x with Ok v -> Some v | _ -> None)) 818 670 let preferences_to_yojson l = `List (List.map preferences_item_to_yojson l) 819 671 820 - type record_main = {record: Com_atproto_repo_strongRef.main} 672 + type record_main = 673 + { 674 + record: Com_atproto_repo_strongRef.main; 675 + } 821 676 [@@deriving yojson {strict= false}] 822 677 823 - type labeler_viewer_state = {like: string option [@default None]} 678 + type labeler_viewer_state = 679 + { 680 + like: string option [@default None]; 681 + } 824 682 [@@deriving yojson {strict= false}] 825 683 826 684 type labeler_view = 827 - { uri: string 828 - ; cid: string 829 - ; creator: profile_view 830 - ; like_count: int option [@key "likeCount"] [@default None] 831 - ; viewer: labeler_viewer_state option [@default None] 832 - ; indexed_at: string [@key "indexedAt"] 833 - ; labels: Com_atproto_label_defs.label list option [@default None] } 685 + { 686 + uri: string; 687 + cid: string; 688 + creator: profile_view; 689 + like_count: int option [@key "likeCount"] [@default None]; 690 + viewer: labeler_viewer_state option [@default None]; 691 + indexed_at: string [@key "indexedAt"]; 692 + labels: Com_atproto_label_defs.label list option [@default None]; 693 + } 834 694 [@@deriving yojson {strict= false}] 835 695 836 696 type list_view = 837 - { uri: string 838 - ; cid: string 839 - ; creator: profile_view 840 - ; name: string 841 - ; purpose: list_purpose 842 - ; description: string option [@default None] 843 - ; description_facets: App_bsky_richtext_facet.main list option 844 - [@key "descriptionFacets"] [@default None] 845 - ; avatar: string option [@default None] 846 - ; list_item_count: int option [@key "listItemCount"] [@default None] 847 - ; labels: Com_atproto_label_defs.label list option [@default None] 848 - ; viewer: list_viewer_state option [@default None] 849 - ; indexed_at: string [@key "indexedAt"] } 697 + { 698 + uri: string; 699 + cid: string; 700 + creator: profile_view; 701 + name: string; 702 + purpose: list_purpose; 703 + description: string option [@default None]; 704 + description_facets: App_bsky_richtext_facet.main list option [@key "descriptionFacets"] [@default None]; 705 + avatar: string option [@default None]; 706 + list_item_count: int option [@key "listItemCount"] [@default None]; 707 + labels: Com_atproto_label_defs.label list option [@default None]; 708 + viewer: list_viewer_state option [@default None]; 709 + indexed_at: string [@key "indexedAt"]; 710 + } 850 711 [@@deriving yojson {strict= false}] 851 712 852 - type generator_viewer_state = {like: string option [@default None]} 713 + type generator_viewer_state = 714 + { 715 + like: string option [@default None]; 716 + } 853 717 [@@deriving yojson {strict= false}] 854 718 855 719 type generator_view = 856 - { uri: string 857 - ; cid: string 858 - ; did: string 859 - ; creator: profile_view 860 - ; display_name: string [@key "displayName"] 861 - ; description: string option [@default None] 862 - ; description_facets: App_bsky_richtext_facet.main list option 863 - [@key "descriptionFacets"] [@default None] 864 - ; avatar: string option [@default None] 865 - ; like_count: int option [@key "likeCount"] [@default None] 866 - ; accepts_interactions: bool option 867 - [@key "acceptsInteractions"] [@default None] 868 - ; labels: Com_atproto_label_defs.label list option [@default None] 869 - ; viewer: generator_viewer_state option [@default None] 870 - ; content_mode: string option [@key "contentMode"] [@default None] 871 - ; indexed_at: string [@key "indexedAt"] } 720 + { 721 + uri: string; 722 + cid: string; 723 + did: string; 724 + creator: profile_view; 725 + display_name: string [@key "displayName"]; 726 + description: string option [@default None]; 727 + description_facets: App_bsky_richtext_facet.main list option [@key "descriptionFacets"] [@default None]; 728 + avatar: string option [@default None]; 729 + like_count: int option [@key "likeCount"] [@default None]; 730 + accepts_interactions: bool option [@key "acceptsInteractions"] [@default None]; 731 + labels: Com_atproto_label_defs.label list option [@default None]; 732 + viewer: generator_viewer_state option [@default None]; 733 + content_mode: string option [@key "contentMode"] [@default None]; 734 + indexed_at: string [@key "indexedAt"]; 735 + } 872 736 [@@deriving yojson {strict= false}] 873 737 874 - type view_detached = {uri: string; detached: bool} 738 + type view_detached = 739 + { 740 + uri: string; 741 + detached: bool; 742 + } 875 743 [@@deriving yojson {strict= false}] 876 744 877 745 type blocked_author = 878 - {did: string; viewer: actor_viewer_state option [@default None]} 746 + { 747 + did: string; 748 + viewer: actor_viewer_state option [@default None]; 749 + } 879 750 [@@deriving yojson {strict= false}] 880 751 881 - type view_blocked = {uri: string; blocked: bool; author: blocked_author} 752 + type view_blocked = 753 + { 754 + uri: string; 755 + blocked: bool; 756 + author: blocked_author; 757 + } 882 758 [@@deriving yojson {strict= false}] 883 759 884 - type view_not_found = {uri: string; not_found: bool [@key "notFound"]} 760 + type view_not_found = 761 + { 762 + uri: string; 763 + not_found: bool [@key "notFound"]; 764 + } 885 765 [@@deriving yojson {strict= false}] 886 766 887 767 type record_with_media_media = ··· 894 774 let open Yojson.Safe.Util in 895 775 try 896 776 match json |> member "$type" |> to_string with 897 - | "app.bsky.embed.images" -> ( 898 - match App_bsky_embed_images.main_of_yojson json with 899 - | Ok v -> 900 - Ok (Images v) 901 - | Error e -> 902 - Error e ) 903 - | "app.bsky.embed.video" -> ( 904 - match App_bsky_embed_video.main_of_yojson json with 905 - | Ok v -> 906 - Ok (Video v) 907 - | Error e -> 908 - Error e ) 909 - | "app.bsky.embed.external" -> ( 910 - match App_bsky_embed_external.main_of_yojson json with 911 - | Ok v -> 912 - Ok (External v) 913 - | Error e -> 914 - Error e ) 915 - | _ -> 916 - Ok (Unknown json) 777 + | "app.bsky.embed.images" -> 778 + (match App_bsky_embed_images.main_of_yojson json with 779 + | Ok v -> Ok (Images v) 780 + | Error e -> Error e) 781 + | "app.bsky.embed.video" -> 782 + (match App_bsky_embed_video.main_of_yojson json with 783 + | Ok v -> Ok (Video v) 784 + | Error e -> Error e) 785 + | "app.bsky.embed.external" -> 786 + (match App_bsky_embed_external.main_of_yojson json with 787 + | Ok v -> Ok (External v) 788 + | Error e -> Error e) 789 + | _ -> Ok (Unknown json) 917 790 with _ -> Error "failed to parse union" 918 791 919 792 let record_with_media_media_to_yojson = function 920 - | Images v -> ( 921 - match App_bsky_embed_images.main_to_yojson v with 922 - | `Assoc fields -> 923 - `Assoc (("$type", `String "app.bsky.embed.images") :: fields) 924 - | other -> 925 - other ) 926 - | Video v -> ( 927 - match App_bsky_embed_video.main_to_yojson v with 928 - | `Assoc fields -> 929 - `Assoc (("$type", `String "app.bsky.embed.video") :: fields) 930 - | other -> 931 - other ) 932 - | External v -> ( 933 - match App_bsky_embed_external.main_to_yojson v with 934 - | `Assoc fields -> 935 - `Assoc (("$type", `String "app.bsky.embed.external") :: fields) 936 - | other -> 937 - other ) 938 - | Unknown j -> 939 - j 793 + | Images v -> 794 + (match App_bsky_embed_images.main_to_yojson v with 795 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.images") :: fields) 796 + | other -> other) 797 + | Video v -> 798 + (match App_bsky_embed_video.main_to_yojson v with 799 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.video") :: fields) 800 + | other -> other) 801 + | External v -> 802 + (match App_bsky_embed_external.main_to_yojson v with 803 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.external") :: fields) 804 + | other -> other) 805 + | Unknown j -> j 940 806 941 807 type embeds_item = 942 808 | ImagesView of App_bsky_embed_images.view ··· 945 811 | RecordView of record_view 946 812 | RecordWithMediaView of record_with_media_view 947 813 | Unknown of Yojson.Safe.t 948 - 949 814 and record = 950 815 | ViewRecord of view_record 951 816 | ViewNotFound of view_not_found ··· 956 821 | DefsLabelerView of labeler_view 957 822 | DefsStarterPackViewBasic of starter_pack_view_basic 958 823 | Unknown of Yojson.Safe.t 959 - 960 - and record_view = {record: record} 961 - 962 - and view_record = 963 - { uri: string 964 - ; cid: string 965 - ; author: profile_view_basic 966 - ; value: Yojson.Safe.t 967 - ; labels: Com_atproto_label_defs.label list option [@default None] 968 - ; reply_count: int option [@key "replyCount"] [@default None] 969 - ; repost_count: int option [@key "repostCount"] [@default None] 970 - ; like_count: int option [@key "likeCount"] [@default None] 971 - ; quote_count: int option [@key "quoteCount"] [@default None] 972 - ; embeds: embeds_item list option [@default None] 973 - ; indexed_at: string [@key "indexedAt"] } 974 - 975 - and record_with_media_view = 976 - {record: record_view; media: record_with_media_media} 824 + and record_view = { 825 + record: record; 826 + } 827 + and view_record = { 828 + uri: string; 829 + cid: string; 830 + author: profile_view_basic; 831 + value: Yojson.Safe.t; 832 + labels: Com_atproto_label_defs.label list option [@default None]; 833 + reply_count: int option [@key "replyCount"] [@default None]; 834 + repost_count: int option [@key "repostCount"] [@default None]; 835 + like_count: int option [@key "likeCount"] [@default None]; 836 + quote_count: int option [@key "quoteCount"] [@default None]; 837 + embeds: embeds_item list option [@default None]; 838 + indexed_at: string [@key "indexedAt"]; 839 + } 840 + and record_with_media_view = { 841 + record: record_view; 842 + media: record_with_media_media; 843 + } 977 844 978 845 let rec embeds_item_of_yojson json = 979 846 let open Yojson.Safe.Util in 980 847 try 981 848 match json |> member "$type" |> to_string with 982 - | "app.bsky.embed.images#view" -> ( 983 - match App_bsky_embed_images.view_of_yojson json with 984 - | Ok v -> 985 - Ok (ImagesView v) 986 - | Error e -> 987 - Error e ) 988 - | "app.bsky.embed.video#view" -> ( 989 - match App_bsky_embed_video.view_of_yojson json with 990 - | Ok v -> 991 - Ok (VideoView v) 992 - | Error e -> 993 - Error e ) 994 - | "app.bsky.embed.external#view" -> ( 995 - match App_bsky_embed_external.view_of_yojson json with 996 - | Ok v -> 997 - Ok (ExternalView v) 998 - | Error e -> 999 - Error e ) 1000 - | "app.bsky.embed.record#view" -> ( 1001 - match record_view_of_yojson json with 1002 - | Ok v -> 1003 - Ok (RecordView v) 1004 - | Error e -> 1005 - Error e ) 1006 - | "app.bsky.embed.recordWithMedia#view" -> ( 1007 - match record_with_media_view_of_yojson json with 1008 - | Ok v -> 1009 - Ok (RecordWithMediaView v) 1010 - | Error e -> 1011 - Error e ) 1012 - | _ -> 1013 - Ok (Unknown json) 849 + | "app.bsky.embed.images#view" -> 850 + (match App_bsky_embed_images.view_of_yojson json with 851 + | Ok v -> Ok (ImagesView v) 852 + | Error e -> Error e) 853 + | "app.bsky.embed.video#view" -> 854 + (match App_bsky_embed_video.view_of_yojson json with 855 + | Ok v -> Ok (VideoView v) 856 + | Error e -> Error e) 857 + | "app.bsky.embed.external#view" -> 858 + (match App_bsky_embed_external.view_of_yojson json with 859 + | Ok v -> Ok (ExternalView v) 860 + | Error e -> Error e) 861 + | "app.bsky.embed.record#view" -> 862 + (match record_view_of_yojson json with 863 + | Ok v -> Ok (RecordView v) 864 + | Error e -> Error e) 865 + | "app.bsky.embed.recordWithMedia#view" -> 866 + (match record_with_media_view_of_yojson json with 867 + | Ok v -> Ok (RecordWithMediaView v) 868 + | Error e -> Error e) 869 + | _ -> Ok (Unknown json) 1014 870 with _ -> Error "failed to parse union" 1015 871 1016 872 and record_of_yojson json = 1017 873 let open Yojson.Safe.Util in 1018 874 try 1019 875 match json |> member "$type" |> to_string with 1020 - | "app.bsky.embed.record#viewRecord" -> ( 1021 - match view_record_of_yojson json with 1022 - | Ok v -> 1023 - Ok (ViewRecord v) 1024 - | Error e -> 1025 - Error e ) 1026 - | "app.bsky.embed.record#viewNotFound" -> ( 1027 - match view_not_found_of_yojson json with 1028 - | Ok v -> 1029 - Ok (ViewNotFound v) 1030 - | Error e -> 1031 - Error e ) 1032 - | "app.bsky.embed.record#viewBlocked" -> ( 1033 - match view_blocked_of_yojson json with 1034 - | Ok v -> 1035 - Ok (ViewBlocked v) 1036 - | Error e -> 1037 - Error e ) 1038 - | "app.bsky.embed.record#viewDetached" -> ( 1039 - match view_detached_of_yojson json with 1040 - | Ok v -> 1041 - Ok (ViewDetached v) 1042 - | Error e -> 1043 - Error e ) 1044 - | "app.bsky.feed.defs#generatorView" -> ( 1045 - match generator_view_of_yojson json with 1046 - | Ok v -> 1047 - Ok (DefsGeneratorView v) 1048 - | Error e -> 1049 - Error e ) 1050 - | "app.bsky.graph.defs#listView" -> ( 1051 - match list_view_of_yojson json with 1052 - | Ok v -> 1053 - Ok (DefsListView v) 1054 - | Error e -> 1055 - Error e ) 1056 - | "app.bsky.labeler.defs#labelerView" -> ( 1057 - match labeler_view_of_yojson json with 1058 - | Ok v -> 1059 - Ok (DefsLabelerView v) 1060 - | Error e -> 1061 - Error e ) 1062 - | "app.bsky.graph.defs#starterPackViewBasic" -> ( 1063 - match starter_pack_view_basic_of_yojson json with 1064 - | Ok v -> 1065 - Ok (DefsStarterPackViewBasic v) 1066 - | Error e -> 1067 - Error e ) 1068 - | _ -> 1069 - Ok (Unknown json) 876 + | "app.bsky.embed.record#viewRecord" -> 877 + (match view_record_of_yojson json with 878 + | Ok v -> Ok (ViewRecord v) 879 + | Error e -> Error e) 880 + | "app.bsky.embed.record#viewNotFound" -> 881 + (match view_not_found_of_yojson json with 882 + | Ok v -> Ok (ViewNotFound v) 883 + | Error e -> Error e) 884 + | "app.bsky.embed.record#viewBlocked" -> 885 + (match view_blocked_of_yojson json with 886 + | Ok v -> Ok (ViewBlocked v) 887 + | Error e -> Error e) 888 + | "app.bsky.embed.record#viewDetached" -> 889 + (match view_detached_of_yojson json with 890 + | Ok v -> Ok (ViewDetached v) 891 + | Error e -> Error e) 892 + | "app.bsky.feed.defs#generatorView" -> 893 + (match generator_view_of_yojson json with 894 + | Ok v -> Ok (DefsGeneratorView v) 895 + | Error e -> Error e) 896 + | "app.bsky.graph.defs#listView" -> 897 + (match list_view_of_yojson json with 898 + | Ok v -> Ok (DefsListView v) 899 + | Error e -> Error e) 900 + | "app.bsky.labeler.defs#labelerView" -> 901 + (match labeler_view_of_yojson json with 902 + | Ok v -> Ok (DefsLabelerView v) 903 + | Error e -> Error e) 904 + | "app.bsky.graph.defs#starterPackViewBasic" -> 905 + (match starter_pack_view_basic_of_yojson json with 906 + | Ok v -> Ok (DefsStarterPackViewBasic v) 907 + | Error e -> Error e) 908 + | _ -> Ok (Unknown json) 1070 909 with _ -> Error "failed to parse union" 1071 910 1072 911 and record_view_of_yojson json = 1073 912 let open Yojson.Safe.Util in 1074 913 try 1075 914 let record = json |> member "record" |> record_of_yojson |> Result.get_ok in 1076 - Ok {record} 915 + Ok { record } 1077 916 with e -> Error (Printexc.to_string e) 1078 917 1079 918 and view_record_of_yojson json = ··· 1081 920 try 1082 921 let uri = json |> member "uri" |> to_string in 1083 922 let cid = json |> member "cid" |> to_string in 1084 - let author = 1085 - json |> member "author" |> profile_view_basic_of_yojson |> Result.get_ok 1086 - in 1087 - let value = json |> member "value" |> fun j -> j in 1088 - let labels = 1089 - json |> member "labels" 1090 - |> to_option (fun j -> 1091 - to_list j 1092 - |> List.filter_map (fun x -> 1093 - match Com_atproto_label_defs.label_of_yojson x with 1094 - | Ok v -> 1095 - Some v 1096 - | _ -> 1097 - None ) ) 1098 - in 923 + let author = json |> member "author" |> profile_view_basic_of_yojson |> Result.get_ok in 924 + let value = json |> member "value" |> (fun j -> j) in 925 + let labels = json |> member "labels" |> to_option (fun j -> to_list j |> List.filter_map (fun x -> match Com_atproto_label_defs.label_of_yojson x with Ok v -> Some v | _ -> None)) in 1099 926 let reply_count = json |> member "replyCount" |> to_option to_int in 1100 927 let repost_count = json |> member "repostCount" |> to_option to_int in 1101 928 let like_count = json |> member "likeCount" |> to_option to_int in 1102 929 let quote_count = json |> member "quoteCount" |> to_option to_int in 1103 - let embeds = 1104 - json |> member "embeds" 1105 - |> to_option (fun j -> 1106 - to_list j 1107 - |> List.filter_map (fun x -> 1108 - match embeds_item_of_yojson x with Ok v -> Some v | _ -> None ) ) 1109 - in 930 + let embeds = json |> member "embeds" |> to_option (fun j -> to_list j |> List.filter_map (fun x -> match embeds_item_of_yojson x with Ok v -> Some v | _ -> None)) in 1110 931 let indexed_at = json |> member "indexedAt" |> to_string in 1111 - Ok 1112 - { uri 1113 - ; cid 1114 - ; author 1115 - ; value 1116 - ; labels 1117 - ; reply_count 1118 - ; repost_count 1119 - ; like_count 1120 - ; quote_count 1121 - ; embeds 1122 - ; indexed_at } 932 + Ok { uri; cid; author; value; labels; reply_count; repost_count; like_count; quote_count; embeds; indexed_at } 1123 933 with e -> Error (Printexc.to_string e) 1124 934 1125 935 and record_with_media_view_of_yojson json = 1126 936 let open Yojson.Safe.Util in 1127 937 try 1128 - let record = 1129 - json |> member "record" |> record_view_of_yojson |> Result.get_ok 1130 - in 1131 - let media = 1132 - json |> member "media" |> record_with_media_media_of_yojson 1133 - |> Result.get_ok 1134 - in 1135 - Ok {record; media} 938 + let record = json |> member "record" |> record_view_of_yojson |> Result.get_ok in 939 + let media = json |> member "media" |> record_with_media_media_of_yojson |> Result.get_ok in 940 + Ok { record; media } 1136 941 with e -> Error (Printexc.to_string e) 1137 942 1138 943 and embeds_item_to_yojson = function 1139 - | ImagesView v -> ( 1140 - match App_bsky_embed_images.view_to_yojson v with 1141 - | `Assoc fields -> 1142 - `Assoc (("$type", `String "app.bsky.embed.images#view") :: fields) 1143 - | other -> 1144 - other ) 1145 - | VideoView v -> ( 1146 - match App_bsky_embed_video.view_to_yojson v with 1147 - | `Assoc fields -> 1148 - `Assoc (("$type", `String "app.bsky.embed.video#view") :: fields) 1149 - | other -> 1150 - other ) 1151 - | ExternalView v -> ( 1152 - match App_bsky_embed_external.view_to_yojson v with 1153 - | `Assoc fields -> 1154 - `Assoc (("$type", `String "app.bsky.embed.external#view") :: fields) 1155 - | other -> 1156 - other ) 1157 - | RecordView v -> ( 1158 - match record_view_to_yojson v with 1159 - | `Assoc fields -> 1160 - `Assoc (("$type", `String "app.bsky.embed.record#view") :: fields) 1161 - | other -> 1162 - other ) 1163 - | RecordWithMediaView v -> ( 1164 - match record_with_media_view_to_yojson v with 1165 - | `Assoc fields -> 1166 - `Assoc 1167 - (("$type", `String "app.bsky.embed.recordWithMedia#view") :: fields) 1168 - | other -> 1169 - other ) 1170 - | Unknown j -> 1171 - j 944 + | ImagesView v -> 945 + (match App_bsky_embed_images.view_to_yojson v with 946 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.images#view") :: fields) 947 + | other -> other) 948 + | VideoView v -> 949 + (match App_bsky_embed_video.view_to_yojson v with 950 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.video#view") :: fields) 951 + | other -> other) 952 + | ExternalView v -> 953 + (match App_bsky_embed_external.view_to_yojson v with 954 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.external#view") :: fields) 955 + | other -> other) 956 + | RecordView v -> 957 + (match record_view_to_yojson v with 958 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record#view") :: fields) 959 + | other -> other) 960 + | RecordWithMediaView v -> 961 + (match record_with_media_view_to_yojson v with 962 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.recordWithMedia#view") :: fields) 963 + | other -> other) 964 + | Unknown j -> j 1172 965 1173 966 and record_to_yojson = function 1174 - | ViewRecord v -> ( 1175 - match view_record_to_yojson v with 1176 - | `Assoc fields -> 1177 - `Assoc (("$type", `String "app.bsky.embed.record#viewRecord") :: fields) 1178 - | other -> 1179 - other ) 1180 - | ViewNotFound v -> ( 1181 - match view_not_found_to_yojson v with 1182 - | `Assoc fields -> 1183 - `Assoc 1184 - (("$type", `String "app.bsky.embed.record#viewNotFound") :: fields) 1185 - | other -> 1186 - other ) 1187 - | ViewBlocked v -> ( 1188 - match view_blocked_to_yojson v with 1189 - | `Assoc fields -> 1190 - `Assoc (("$type", `String "app.bsky.embed.record#viewBlocked") :: fields) 1191 - | other -> 1192 - other ) 1193 - | ViewDetached v -> ( 1194 - match view_detached_to_yojson v with 1195 - | `Assoc fields -> 1196 - `Assoc 1197 - (("$type", `String "app.bsky.embed.record#viewDetached") :: fields) 1198 - | other -> 1199 - other ) 1200 - | DefsGeneratorView v -> ( 1201 - match generator_view_to_yojson v with 1202 - | `Assoc fields -> 1203 - `Assoc (("$type", `String "app.bsky.feed.defs#generatorView") :: fields) 1204 - | other -> 1205 - other ) 1206 - | DefsListView v -> ( 1207 - match list_view_to_yojson v with 1208 - | `Assoc fields -> 1209 - `Assoc (("$type", `String "app.bsky.graph.defs#listView") :: fields) 1210 - | other -> 1211 - other ) 1212 - | DefsLabelerView v -> ( 1213 - match labeler_view_to_yojson v with 1214 - | `Assoc fields -> 1215 - `Assoc (("$type", `String "app.bsky.labeler.defs#labelerView") :: fields) 1216 - | other -> 1217 - other ) 1218 - | DefsStarterPackViewBasic v -> ( 1219 - match starter_pack_view_basic_to_yojson v with 1220 - | `Assoc fields -> 1221 - `Assoc 1222 - ( ("$type", `String "app.bsky.graph.defs#starterPackViewBasic") 1223 - :: fields ) 1224 - | other -> 1225 - other ) 1226 - | Unknown j -> 1227 - j 967 + | ViewRecord v -> 968 + (match view_record_to_yojson v with 969 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record#viewRecord") :: fields) 970 + | other -> other) 971 + | ViewNotFound v -> 972 + (match view_not_found_to_yojson v with 973 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record#viewNotFound") :: fields) 974 + | other -> other) 975 + | ViewBlocked v -> 976 + (match view_blocked_to_yojson v with 977 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record#viewBlocked") :: fields) 978 + | other -> other) 979 + | ViewDetached v -> 980 + (match view_detached_to_yojson v with 981 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record#viewDetached") :: fields) 982 + | other -> other) 983 + | DefsGeneratorView v -> 984 + (match generator_view_to_yojson v with 985 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#generatorView") :: fields) 986 + | other -> other) 987 + | DefsListView v -> 988 + (match list_view_to_yojson v with 989 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.graph.defs#listView") :: fields) 990 + | other -> other) 991 + | DefsLabelerView v -> 992 + (match labeler_view_to_yojson v with 993 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.labeler.defs#labelerView") :: fields) 994 + | other -> other) 995 + | DefsStarterPackViewBasic v -> 996 + (match starter_pack_view_basic_to_yojson v with 997 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.graph.defs#starterPackViewBasic") :: fields) 998 + | other -> other) 999 + | Unknown j -> j 1228 1000 1229 1001 and record_view_to_yojson (r : record_view) = 1230 - `Assoc [("record", record_to_yojson r.record)] 1002 + `Assoc [ 1003 + ("record", record_to_yojson r.record) 1004 + ] 1231 1005 1232 1006 and view_record_to_yojson (r : view_record) = 1233 - `Assoc 1234 - [ ("uri", (fun s -> `String s) r.uri) 1235 - ; ("cid", (fun s -> `String s) r.cid) 1236 - ; ("author", profile_view_basic_to_yojson r.author) 1237 - ; ("value", (fun j -> j) r.value) 1238 - ; ( "labels" 1239 - , match r.labels with 1240 - | Some v -> 1241 - (fun l -> `List (List.map Com_atproto_label_defs.label_to_yojson l)) 1242 - v 1243 - | None -> 1244 - `Null ) 1245 - ; ( "replyCount" 1246 - , match r.reply_count with Some v -> (fun i -> `Int i) v | None -> `Null 1247 - ) 1248 - ; ( "repostCount" 1249 - , match r.repost_count with 1250 - | Some v -> 1251 - (fun i -> `Int i) v 1252 - | None -> 1253 - `Null ) 1254 - ; ( "likeCount" 1255 - , match r.like_count with Some v -> (fun i -> `Int i) v | None -> `Null ) 1256 - ; ( "quoteCount" 1257 - , match r.quote_count with Some v -> (fun i -> `Int i) v | None -> `Null 1258 - ) 1259 - ; ( "embeds" 1260 - , match r.embeds with 1261 - | Some v -> 1262 - (fun l -> `List (List.map embeds_item_to_yojson l)) v 1263 - | None -> 1264 - `Null ) 1265 - ; ("indexedAt", (fun s -> `String s) r.indexed_at) ] 1007 + `Assoc [ 1008 + ("uri", (fun s -> `String s) r.uri); 1009 + ("cid", (fun s -> `String s) r.cid); 1010 + ("author", profile_view_basic_to_yojson r.author); 1011 + ("value", (fun j -> j) r.value); 1012 + ("labels", match r.labels with Some v -> (fun l -> `List (List.map Com_atproto_label_defs.label_to_yojson l)) v | None -> `Null); 1013 + ("replyCount", match r.reply_count with Some v -> (fun i -> `Int i) v | None -> `Null); 1014 + ("repostCount", match r.repost_count with Some v -> (fun i -> `Int i) v | None -> `Null); 1015 + ("likeCount", match r.like_count with Some v -> (fun i -> `Int i) v | None -> `Null); 1016 + ("quoteCount", match r.quote_count with Some v -> (fun i -> `Int i) v | None -> `Null); 1017 + ("embeds", match r.embeds with Some v -> (fun l -> `List (List.map embeds_item_to_yojson l)) v | None -> `Null); 1018 + ("indexedAt", (fun s -> `String s) r.indexed_at) 1019 + ] 1266 1020 1267 1021 and record_with_media_view_to_yojson (r : record_with_media_view) = 1268 - `Assoc 1269 - [ ("record", record_view_to_yojson r.record) 1270 - ; ("media", record_with_media_media_to_yojson r.media) ] 1022 + `Assoc [ 1023 + ("record", record_view_to_yojson r.record); 1024 + ("media", record_with_media_media_to_yojson r.media) 1025 + ] 1271 1026 1272 1027 type record_with_media_main = 1273 - {record: record_main; media: record_with_media_media} 1028 + { 1029 + record: record_main; 1030 + media: record_with_media_media; 1031 + } 1274 1032 [@@deriving yojson {strict= false}] 1275 1033 1276 1034 type threadgate_view = 1277 - { uri: string option [@default None] 1278 - ; cid: string option [@default None] 1279 - ; record: Yojson.Safe.t option [@default None] 1280 - ; lists: list_view_basic list option [@default None] } 1035 + { 1036 + uri: string option [@default None]; 1037 + cid: string option [@default None]; 1038 + record: Yojson.Safe.t option [@default None]; 1039 + lists: list_view_basic list option [@default None]; 1040 + } 1281 1041 [@@deriving yojson {strict= false}] 1282 1042 1283 1043 type feed_viewer_state = 1284 - { repost: string option [@default None] 1285 - ; like: string option [@default None] 1286 - ; thread_muted: bool option [@key "threadMuted"] [@default None] 1287 - ; reply_disabled: bool option [@key "replyDisabled"] [@default None] 1288 - ; embedding_disabled: bool option [@key "embeddingDisabled"] [@default None] 1289 - ; pinned: bool option [@default None] } 1044 + { 1045 + repost: string option [@default None]; 1046 + like: string option [@default None]; 1047 + bookmarked: bool option [@default None]; 1048 + thread_muted: bool option [@key "threadMuted"] [@default None]; 1049 + reply_disabled: bool option [@key "replyDisabled"] [@default None]; 1050 + embedding_disabled: bool option [@key "embeddingDisabled"] [@default None]; 1051 + pinned: bool option [@default None]; 1052 + } 1290 1053 [@@deriving yojson {strict= false}] 1291 1054 1292 1055 type feed_embed = ··· 1301 1064 let open Yojson.Safe.Util in 1302 1065 try 1303 1066 match json |> member "$type" |> to_string with 1304 - | "app.bsky.embed.images#view" -> ( 1305 - match App_bsky_embed_images.view_of_yojson json with 1306 - | Ok v -> 1307 - Ok (ImagesView v) 1308 - | Error e -> 1309 - Error e ) 1310 - | "app.bsky.embed.video#view" -> ( 1311 - match App_bsky_embed_video.view_of_yojson json with 1312 - | Ok v -> 1313 - Ok (VideoView v) 1314 - | Error e -> 1315 - Error e ) 1316 - | "app.bsky.embed.external#view" -> ( 1317 - match App_bsky_embed_external.view_of_yojson json with 1318 - | Ok v -> 1319 - Ok (ExternalView v) 1320 - | Error e -> 1321 - Error e ) 1322 - | "app.bsky.embed.record#view" -> ( 1323 - match record_view_of_yojson json with 1324 - | Ok v -> 1325 - Ok (RecordView v) 1326 - | Error e -> 1327 - Error e ) 1328 - | "app.bsky.embed.recordWithMedia#view" -> ( 1329 - match record_with_media_view_of_yojson json with 1330 - | Ok v -> 1331 - Ok (RecordWithMediaView v) 1332 - | Error e -> 1333 - Error e ) 1334 - | _ -> 1335 - Ok (Unknown json) 1067 + | "app.bsky.embed.images#view" -> 1068 + (match App_bsky_embed_images.view_of_yojson json with 1069 + | Ok v -> Ok (ImagesView v) 1070 + | Error e -> Error e) 1071 + | "app.bsky.embed.video#view" -> 1072 + (match App_bsky_embed_video.view_of_yojson json with 1073 + | Ok v -> Ok (VideoView v) 1074 + | Error e -> Error e) 1075 + | "app.bsky.embed.external#view" -> 1076 + (match App_bsky_embed_external.view_of_yojson json with 1077 + | Ok v -> Ok (ExternalView v) 1078 + | Error e -> Error e) 1079 + | "app.bsky.embed.record#view" -> 1080 + (match record_view_of_yojson json with 1081 + | Ok v -> Ok (RecordView v) 1082 + | Error e -> Error e) 1083 + | "app.bsky.embed.recordWithMedia#view" -> 1084 + (match record_with_media_view_of_yojson json with 1085 + | Ok v -> Ok (RecordWithMediaView v) 1086 + | Error e -> Error e) 1087 + | _ -> Ok (Unknown json) 1336 1088 with _ -> Error "failed to parse union" 1337 1089 1338 1090 let feed_embed_to_yojson = function 1339 - | ImagesView v -> ( 1340 - match App_bsky_embed_images.view_to_yojson v with 1341 - | `Assoc fields -> 1342 - `Assoc (("$type", `String "app.bsky.embed.images#view") :: fields) 1343 - | other -> 1344 - other ) 1345 - | VideoView v -> ( 1346 - match App_bsky_embed_video.view_to_yojson v with 1347 - | `Assoc fields -> 1348 - `Assoc (("$type", `String "app.bsky.embed.video#view") :: fields) 1349 - | other -> 1350 - other ) 1351 - | ExternalView v -> ( 1352 - match App_bsky_embed_external.view_to_yojson v with 1353 - | `Assoc fields -> 1354 - `Assoc (("$type", `String "app.bsky.embed.external#view") :: fields) 1355 - | other -> 1356 - other ) 1357 - | RecordView v -> ( 1358 - match record_view_to_yojson v with 1359 - | `Assoc fields -> 1360 - `Assoc (("$type", `String "app.bsky.embed.record#view") :: fields) 1361 - | other -> 1362 - other ) 1363 - | RecordWithMediaView v -> ( 1364 - match record_with_media_view_to_yojson v with 1365 - | `Assoc fields -> 1366 - `Assoc 1367 - (("$type", `String "app.bsky.embed.recordWithMedia#view") :: fields) 1368 - | other -> 1369 - other ) 1370 - | Unknown j -> 1371 - j 1091 + | ImagesView v -> 1092 + (match App_bsky_embed_images.view_to_yojson v with 1093 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.images#view") :: fields) 1094 + | other -> other) 1095 + | VideoView v -> 1096 + (match App_bsky_embed_video.view_to_yojson v with 1097 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.video#view") :: fields) 1098 + | other -> other) 1099 + | ExternalView v -> 1100 + (match App_bsky_embed_external.view_to_yojson v with 1101 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.external#view") :: fields) 1102 + | other -> other) 1103 + | RecordView v -> 1104 + (match record_view_to_yojson v with 1105 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.record#view") :: fields) 1106 + | other -> other) 1107 + | RecordWithMediaView v -> 1108 + (match record_with_media_view_to_yojson v with 1109 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.embed.recordWithMedia#view") :: fields) 1110 + | other -> other) 1111 + | Unknown j -> j 1372 1112 1373 1113 type post_view = 1374 - { uri: string 1375 - ; cid: string 1376 - ; author: profile_view_basic 1377 - ; record: Yojson.Safe.t 1378 - ; embed: embeds_item option [@default None] 1379 - ; reply_count: int option [@key "replyCount"] [@default None] 1380 - ; repost_count: int option [@key "repostCount"] [@default None] 1381 - ; like_count: int option [@key "likeCount"] [@default None] 1382 - ; quote_count: int option [@key "quoteCount"] [@default None] 1383 - ; indexed_at: string [@key "indexedAt"] 1384 - ; viewer: feed_viewer_state option [@default None] 1385 - ; labels: Com_atproto_label_defs.label list option [@default None] 1386 - ; threadgate: threadgate_view option [@default None] } 1114 + { 1115 + uri: string; 1116 + cid: string; 1117 + author: profile_view_basic; 1118 + record: Yojson.Safe.t; 1119 + embed: embeds_item option [@default None]; 1120 + bookmark_count: int option [@key "bookmarkCount"] [@default None]; 1121 + reply_count: int option [@key "replyCount"] [@default None]; 1122 + repost_count: int option [@key "repostCount"] [@default None]; 1123 + like_count: int option [@key "likeCount"] [@default None]; 1124 + quote_count: int option [@key "quoteCount"] [@default None]; 1125 + indexed_at: string [@key "indexedAt"]; 1126 + viewer: feed_viewer_state option [@default None]; 1127 + labels: Com_atproto_label_defs.label list option [@default None]; 1128 + threadgate: threadgate_view option [@default None]; 1129 + debug: Yojson.Safe.t option [@default None]; 1130 + } 1387 1131 [@@deriving yojson {strict= false}] 1388 1132 1389 1133 type thread_context = 1390 - {root_author_like: string option [@key "rootAuthorLike"] [@default None]} 1134 + { 1135 + root_author_like: string option [@key "rootAuthorLike"] [@default None]; 1136 + } 1391 1137 [@@deriving yojson {strict= false}] 1392 1138 1393 1139 type reason_pin = unit 1394 - 1395 1140 let reason_pin_of_yojson _ = Ok () 1396 - 1397 1141 let reason_pin_to_yojson () = `Assoc [] 1398 1142 1399 1143 type reason_repost = 1400 - { by: profile_view_basic 1401 - ; uri: string option [@default None] 1402 - ; cid: string option [@default None] 1403 - ; indexed_at: string [@key "indexedAt"] } 1144 + { 1145 + by: profile_view_basic; 1146 + uri: string option [@default None]; 1147 + cid: string option [@default None]; 1148 + indexed_at: string [@key "indexedAt"]; 1149 + } 1404 1150 [@@deriving yojson {strict= false}] 1405 1151 1406 - type blocked_post = {uri: string; blocked: bool; author: blocked_author} 1152 + type blocked_post = 1153 + { 1154 + uri: string; 1155 + blocked: bool; 1156 + author: blocked_author; 1157 + } 1407 1158 [@@deriving yojson {strict= false}] 1408 1159 1409 - type not_found_post = {uri: string; not_found: bool [@key "notFound"]} 1160 + type not_found_post = 1161 + { 1162 + uri: string; 1163 + not_found: bool [@key "notFound"]; 1164 + } 1410 1165 [@@deriving yojson {strict= false}] 1411 1166 1412 1167 type feed_parent = ··· 1419 1174 let open Yojson.Safe.Util in 1420 1175 try 1421 1176 match json |> member "$type" |> to_string with 1422 - | "app.bsky.feed.defs#postView" -> ( 1423 - match post_view_of_yojson json with 1424 - | Ok v -> 1425 - Ok (PostView v) 1426 - | Error e -> 1427 - Error e ) 1428 - | "app.bsky.feed.defs#notFoundPost" -> ( 1429 - match not_found_post_of_yojson json with 1430 - | Ok v -> 1431 - Ok (NotFoundPost v) 1432 - | Error e -> 1433 - Error e ) 1434 - | "app.bsky.feed.defs#blockedPost" -> ( 1435 - match blocked_post_of_yojson json with 1436 - | Ok v -> 1437 - Ok (BlockedPost v) 1438 - | Error e -> 1439 - Error e ) 1440 - | _ -> 1441 - Ok (Unknown json) 1177 + | "app.bsky.feed.defs#postView" -> 1178 + (match post_view_of_yojson json with 1179 + | Ok v -> Ok (PostView v) 1180 + | Error e -> Error e) 1181 + | "app.bsky.feed.defs#notFoundPost" -> 1182 + (match not_found_post_of_yojson json with 1183 + | Ok v -> Ok (NotFoundPost v) 1184 + | Error e -> Error e) 1185 + | "app.bsky.feed.defs#blockedPost" -> 1186 + (match blocked_post_of_yojson json with 1187 + | Ok v -> Ok (BlockedPost v) 1188 + | Error e -> Error e) 1189 + | _ -> Ok (Unknown json) 1442 1190 with _ -> Error "failed to parse union" 1443 1191 1444 1192 let feed_parent_to_yojson = function 1445 - | PostView v -> ( 1446 - match post_view_to_yojson v with 1447 - | `Assoc fields -> 1448 - `Assoc (("$type", `String "app.bsky.feed.defs#postView") :: fields) 1449 - | other -> 1450 - other ) 1451 - | NotFoundPost v -> ( 1452 - match not_found_post_to_yojson v with 1453 - | `Assoc fields -> 1454 - `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 1455 - | other -> 1456 - other ) 1457 - | BlockedPost v -> ( 1458 - match blocked_post_to_yojson v with 1459 - | `Assoc fields -> 1460 - `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 1461 - | other -> 1462 - other ) 1463 - | Unknown j -> 1464 - j 1193 + | PostView v -> 1194 + (match post_view_to_yojson v with 1195 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#postView") :: fields) 1196 + | other -> other) 1197 + | NotFoundPost v -> 1198 + (match not_found_post_to_yojson v with 1199 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 1200 + | other -> other) 1201 + | BlockedPost v -> 1202 + (match blocked_post_to_yojson v with 1203 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 1204 + | other -> other) 1205 + | Unknown j -> j 1465 1206 1466 1207 type root = 1467 1208 | PostView of post_view ··· 1473 1214 let open Yojson.Safe.Util in 1474 1215 try 1475 1216 match json |> member "$type" |> to_string with 1476 - | "app.bsky.feed.defs#postView" -> ( 1477 - match post_view_of_yojson json with 1478 - | Ok v -> 1479 - Ok (PostView v) 1480 - | Error e -> 1481 - Error e ) 1482 - | "app.bsky.feed.defs#notFoundPost" -> ( 1483 - match not_found_post_of_yojson json with 1484 - | Ok v -> 1485 - Ok (NotFoundPost v) 1486 - | Error e -> 1487 - Error e ) 1488 - | "app.bsky.feed.defs#blockedPost" -> ( 1489 - match blocked_post_of_yojson json with 1490 - | Ok v -> 1491 - Ok (BlockedPost v) 1492 - | Error e -> 1493 - Error e ) 1494 - | _ -> 1495 - Ok (Unknown json) 1217 + | "app.bsky.feed.defs#postView" -> 1218 + (match post_view_of_yojson json with 1219 + | Ok v -> Ok (PostView v) 1220 + | Error e -> Error e) 1221 + | "app.bsky.feed.defs#notFoundPost" -> 1222 + (match not_found_post_of_yojson json with 1223 + | Ok v -> Ok (NotFoundPost v) 1224 + | Error e -> Error e) 1225 + | "app.bsky.feed.defs#blockedPost" -> 1226 + (match blocked_post_of_yojson json with 1227 + | Ok v -> Ok (BlockedPost v) 1228 + | Error e -> Error e) 1229 + | _ -> Ok (Unknown json) 1496 1230 with _ -> Error "failed to parse union" 1497 1231 1498 1232 let root_to_yojson = function 1499 - | PostView v -> ( 1500 - match post_view_to_yojson v with 1501 - | `Assoc fields -> 1502 - `Assoc (("$type", `String "app.bsky.feed.defs#postView") :: fields) 1503 - | other -> 1504 - other ) 1505 - | NotFoundPost v -> ( 1506 - match not_found_post_to_yojson v with 1507 - | `Assoc fields -> 1508 - `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 1509 - | other -> 1510 - other ) 1511 - | BlockedPost v -> ( 1512 - match blocked_post_to_yojson v with 1513 - | `Assoc fields -> 1514 - `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 1515 - | other -> 1516 - other ) 1517 - | Unknown j -> 1518 - j 1233 + | PostView v -> 1234 + (match post_view_to_yojson v with 1235 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#postView") :: fields) 1236 + | other -> other) 1237 + | NotFoundPost v -> 1238 + (match not_found_post_to_yojson v with 1239 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 1240 + | other -> other) 1241 + | BlockedPost v -> 1242 + (match blocked_post_to_yojson v with 1243 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 1244 + | other -> other) 1245 + | Unknown j -> j 1519 1246 1520 1247 type reply_ref = 1521 - { root: feed_parent 1522 - ; parent: feed_parent 1523 - ; grandparent_author: profile_view_basic option 1524 - [@key "grandparentAuthor"] [@default None] } 1248 + { 1249 + root: feed_parent; 1250 + parent: feed_parent; 1251 + grandparent_author: profile_view_basic option [@key "grandparentAuthor"] [@default None]; 1252 + } 1525 1253 [@@deriving yojson {strict= false}] 1526 1254 1527 1255 type feed_reason = ··· 1533 1261 let open Yojson.Safe.Util in 1534 1262 try 1535 1263 match json |> member "$type" |> to_string with 1536 - | "app.bsky.feed.defs#reasonRepost" -> ( 1537 - match reason_repost_of_yojson json with 1538 - | Ok v -> 1539 - Ok (ReasonRepost v) 1540 - | Error e -> 1541 - Error e ) 1542 - | "app.bsky.feed.defs#reasonPin" -> ( 1543 - match reason_pin_of_yojson json with 1544 - | Ok v -> 1545 - Ok (ReasonPin v) 1546 - | Error e -> 1547 - Error e ) 1548 - | _ -> 1549 - Ok (Unknown json) 1264 + | "app.bsky.feed.defs#reasonRepost" -> 1265 + (match reason_repost_of_yojson json with 1266 + | Ok v -> Ok (ReasonRepost v) 1267 + | Error e -> Error e) 1268 + | "app.bsky.feed.defs#reasonPin" -> 1269 + (match reason_pin_of_yojson json with 1270 + | Ok v -> Ok (ReasonPin v) 1271 + | Error e -> Error e) 1272 + | _ -> Ok (Unknown json) 1550 1273 with _ -> Error "failed to parse union" 1551 1274 1552 1275 let feed_reason_to_yojson = function 1553 - | ReasonRepost v -> ( 1554 - match reason_repost_to_yojson v with 1555 - | `Assoc fields -> 1556 - `Assoc (("$type", `String "app.bsky.feed.defs#reasonRepost") :: fields) 1557 - | other -> 1558 - other ) 1559 - | ReasonPin v -> ( 1560 - match reason_pin_to_yojson v with 1561 - | `Assoc fields -> 1562 - `Assoc (("$type", `String "app.bsky.feed.defs#reasonPin") :: fields) 1563 - | other -> 1564 - other ) 1565 - | Unknown j -> 1566 - j 1276 + | ReasonRepost v -> 1277 + (match reason_repost_to_yojson v with 1278 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#reasonRepost") :: fields) 1279 + | other -> other) 1280 + | ReasonPin v -> 1281 + (match reason_pin_to_yojson v with 1282 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#reasonPin") :: fields) 1283 + | other -> other) 1284 + | Unknown j -> j 1567 1285 1568 1286 type feed_view_post = 1569 - { post: post_view 1570 - ; reply: reply_ref option [@default None] 1571 - ; reason: feed_reason option [@default None] 1572 - ; feed_context: string option [@key "feedContext"] [@default None] 1573 - ; req_id: string option [@key "reqId"] [@default None] } 1287 + { 1288 + post: post_view; 1289 + reply: reply_ref option [@default None]; 1290 + reason: feed_reason option [@default None]; 1291 + feed_context: string option [@key "feedContext"] [@default None]; 1292 + req_id: string option [@key "reqId"] [@default None]; 1293 + } 1574 1294 [@@deriving yojson {strict= false}] 1575 1295 1576 1296 type replies_item = ··· 1578 1298 | NotFoundPost of not_found_post 1579 1299 | BlockedPost of blocked_post 1580 1300 | Unknown of Yojson.Safe.t 1581 - 1582 - and thread_view_post = 1583 - { post: post_view 1584 - ; parent: replies_item option [@default None] 1585 - ; replies: replies_item list option [@default None] 1586 - ; thread_context: thread_context option [@key "threadContext"] [@default None] 1587 - } 1301 + and thread_view_post = { 1302 + post: post_view; 1303 + parent: replies_item option [@default None]; 1304 + replies: replies_item list option [@default None]; 1305 + thread_context: thread_context option [@key "threadContext"] [@default None]; 1306 + } 1588 1307 1589 1308 let rec replies_item_of_yojson json = 1590 1309 let open Yojson.Safe.Util in 1591 1310 try 1592 1311 match json |> member "$type" |> to_string with 1593 - | "app.bsky.feed.defs#threadViewPost" -> ( 1594 - match thread_view_post_of_yojson json with 1595 - | Ok v -> 1596 - Ok (ThreadViewPost v) 1597 - | Error e -> 1598 - Error e ) 1599 - | "app.bsky.feed.defs#notFoundPost" -> ( 1600 - match not_found_post_of_yojson json with 1601 - | Ok v -> 1602 - Ok (NotFoundPost v) 1603 - | Error e -> 1604 - Error e ) 1605 - | "app.bsky.feed.defs#blockedPost" -> ( 1606 - match blocked_post_of_yojson json with 1607 - | Ok v -> 1608 - Ok (BlockedPost v) 1609 - | Error e -> 1610 - Error e ) 1611 - | _ -> 1612 - Ok (Unknown json) 1312 + | "app.bsky.feed.defs#threadViewPost" -> 1313 + (match thread_view_post_of_yojson json with 1314 + | Ok v -> Ok (ThreadViewPost v) 1315 + | Error e -> Error e) 1316 + | "app.bsky.feed.defs#notFoundPost" -> 1317 + (match not_found_post_of_yojson json with 1318 + | Ok v -> Ok (NotFoundPost v) 1319 + | Error e -> Error e) 1320 + | "app.bsky.feed.defs#blockedPost" -> 1321 + (match blocked_post_of_yojson json with 1322 + | Ok v -> Ok (BlockedPost v) 1323 + | Error e -> Error e) 1324 + | _ -> Ok (Unknown json) 1613 1325 with _ -> Error "failed to parse union" 1614 1326 1615 1327 and thread_view_post_of_yojson json = 1616 1328 let open Yojson.Safe.Util in 1617 1329 try 1618 1330 let post = json |> member "post" |> post_view_of_yojson |> Result.get_ok in 1619 - let parent = 1620 - json |> member "parent" 1621 - |> to_option (fun x -> 1622 - match replies_item_of_yojson x with Ok v -> Some v | _ -> None ) 1623 - |> Option.join 1624 - in 1625 - let replies = 1626 - json |> member "replies" 1627 - |> to_option (fun j -> 1628 - to_list j 1629 - |> List.filter_map (fun x -> 1630 - match replies_item_of_yojson x with Ok v -> Some v | _ -> None ) ) 1631 - in 1632 - let thread_context = 1633 - json |> member "threadContext" 1634 - |> to_option (fun x -> 1635 - match thread_context_of_yojson x with Ok v -> Some v | _ -> None ) 1636 - |> Option.join 1637 - in 1638 - Ok {post; parent; replies; thread_context} 1331 + let parent = json |> member "parent" |> to_option (fun x -> match replies_item_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 1332 + let replies = json |> member "replies" |> to_option (fun j -> to_list j |> List.filter_map (fun x -> match replies_item_of_yojson x with Ok v -> Some v | _ -> None)) in 1333 + let thread_context = json |> member "threadContext" |> to_option (fun x -> match thread_context_of_yojson x with Ok v -> Some v | _ -> None) |> Option.join in 1334 + Ok { post; parent; replies; thread_context } 1639 1335 with e -> Error (Printexc.to_string e) 1640 1336 1641 1337 and replies_item_to_yojson = function 1642 - | ThreadViewPost v -> ( 1643 - match thread_view_post_to_yojson v with 1644 - | `Assoc fields -> 1645 - `Assoc (("$type", `String "app.bsky.feed.defs#threadViewPost") :: fields) 1646 - | other -> 1647 - other ) 1648 - | NotFoundPost v -> ( 1649 - match not_found_post_to_yojson v with 1650 - | `Assoc fields -> 1651 - `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 1652 - | other -> 1653 - other ) 1654 - | BlockedPost v -> ( 1655 - match blocked_post_to_yojson v with 1656 - | `Assoc fields -> 1657 - `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 1658 - | other -> 1659 - other ) 1660 - | Unknown j -> 1661 - j 1338 + | ThreadViewPost v -> 1339 + (match thread_view_post_to_yojson v with 1340 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#threadViewPost") :: fields) 1341 + | other -> other) 1342 + | NotFoundPost v -> 1343 + (match not_found_post_to_yojson v with 1344 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#notFoundPost") :: fields) 1345 + | other -> other) 1346 + | BlockedPost v -> 1347 + (match blocked_post_to_yojson v with 1348 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.feed.defs#blockedPost") :: fields) 1349 + | other -> other) 1350 + | Unknown j -> j 1662 1351 1663 1352 and thread_view_post_to_yojson (r : thread_view_post) = 1664 - `Assoc 1665 - [ ("post", post_view_to_yojson r.post) 1666 - ; ( "parent" 1667 - , match r.parent with Some v -> replies_item_to_yojson v | None -> `Null 1668 - ) 1669 - ; ( "replies" 1670 - , match r.replies with 1671 - | Some v -> 1672 - (fun l -> `List (List.map replies_item_to_yojson l)) v 1673 - | None -> 1674 - `Null ) 1675 - ; ( "threadContext" 1676 - , match r.thread_context with 1677 - | Some v -> 1678 - thread_context_to_yojson v 1679 - | None -> 1680 - `Null ) ] 1353 + `Assoc [ 1354 + ("post", post_view_to_yojson r.post); 1355 + ("parent", match r.parent with Some v -> replies_item_to_yojson v | None -> `Null); 1356 + ("replies", match r.replies with Some v -> (fun l -> `List (List.map replies_item_to_yojson l)) v | None -> `Null); 1357 + ("threadContext", match r.thread_context with Some v -> thread_context_to_yojson v | None -> `Null) 1358 + ] 1681 1359 1682 1360 type skeleton_reason_pin = unit 1683 - 1684 1361 let skeleton_reason_pin_of_yojson _ = Ok () 1685 - 1686 1362 let skeleton_reason_pin_to_yojson () = `Assoc [] 1687 1363 1688 - type skeleton_reason_repost = {repost: string} 1364 + type skeleton_reason_repost = 1365 + { 1366 + repost: string; 1367 + } 1689 1368 [@@deriving yojson {strict= false}] 1690 1369 1691 1370 type skeleton_feed_post = 1692 - { post: string 1693 - ; reason: feed_reason option [@default None] 1694 - ; feed_context: string option [@key "feedContext"] [@default None] } 1371 + { 1372 + post: string; 1373 + reason: feed_reason option [@default None]; 1374 + feed_context: string option [@key "feedContext"] [@default None]; 1375 + } 1695 1376 [@@deriving yojson {strict= false}] 1696 1377 1697 1378 type interaction = 1698 - { item: string option [@default None] 1699 - ; event: string option [@default None] 1700 - ; feed_context: string option [@key "feedContext"] [@default None] 1701 - ; req_id: string option [@key "reqId"] [@default None] } 1379 + { 1380 + item: string option [@default None]; 1381 + event: string option [@default None]; 1382 + feed_context: string option [@key "feedContext"] [@default None]; 1383 + req_id: string option [@key "reqId"] [@default None]; 1384 + } 1702 1385 [@@deriving yojson {strict= false}] 1703 1386 1704 1387 (** Request that less content like the given feed item be shown in the feed *) ··· 1743 1426 (** User shared the feed item *) 1744 1427 let interaction_share = "app.bsky.feed.defs#interactionShare" 1745 1428 1746 - type list_item_view = {uri: string; subject: profile_view} 1429 + type list_item_view = 1430 + { 1431 + uri: string; 1432 + subject: profile_view; 1433 + } 1747 1434 [@@deriving yojson {strict= false}] 1748 1435 1749 1436 type starter_pack_view = 1750 - { uri: string 1751 - ; cid: string 1752 - ; record: Yojson.Safe.t 1753 - ; creator: profile_view_basic 1754 - ; list_: list_view_basic option [@key "list"] [@default None] 1755 - ; list_items_sample: list_item_view list option 1756 - [@key "listItemsSample"] [@default None] 1757 - ; feeds: generator_view list option [@default None] 1758 - ; joined_week_count: int option [@key "joinedWeekCount"] [@default None] 1759 - ; joined_all_time_count: int option 1760 - [@key "joinedAllTimeCount"] [@default None] 1761 - ; labels: Com_atproto_label_defs.label list option [@default None] 1762 - ; indexed_at: string [@key "indexedAt"] } 1437 + { 1438 + uri: string; 1439 + cid: string; 1440 + record: Yojson.Safe.t; 1441 + creator: profile_view_basic; 1442 + list_: list_view_basic option [@key "list"] [@default None]; 1443 + list_items_sample: list_item_view list option [@key "listItemsSample"] [@default None]; 1444 + feeds: generator_view list option [@default None]; 1445 + joined_week_count: int option [@key "joinedWeekCount"] [@default None]; 1446 + joined_all_time_count: int option [@key "joinedAllTimeCount"] [@default None]; 1447 + labels: Com_atproto_label_defs.label list option [@default None]; 1448 + indexed_at: string [@key "indexedAt"]; 1449 + } 1763 1450 [@@deriving yojson {strict= false}] 1764 1451 1765 1452 (** A list of actors to apply an aggregate moderation action (mute/block) on. *) ··· 1771 1458 (** A list of actors used for only for reference purposes such as within a starter pack. *) 1772 1459 let referencelist = "app.bsky.graph.defs#referencelist" 1773 1460 1774 - type not_found_actor = {actor: string; not_found: bool [@key "notFound"]} 1461 + type not_found_actor = 1462 + { 1463 + actor: string; 1464 + not_found: bool [@key "notFound"]; 1465 + } 1775 1466 [@@deriving yojson {strict= false}] 1776 1467 1777 1468 type relationship = 1778 - { did: string 1779 - ; following: string option [@default None] 1780 - ; followed_by: string option [@key "followedBy"] [@default None] } 1469 + { 1470 + did: string; 1471 + following: string option [@default None]; 1472 + followed_by: string option [@key "followedBy"] [@default None]; 1473 + blocking: string option [@default None]; 1474 + blocked_by: string option [@key "blockedBy"] [@default None]; 1475 + blocking_by_list: string option [@key "blockingByList"] [@default None]; 1476 + blocked_by_list: string option [@key "blockedByList"] [@default None]; 1477 + } 1781 1478 [@@deriving yojson {strict= false}] 1782 1479 1783 1480 type labeler_policies = 1784 - { label_values: Com_atproto_label_defs.label_value list [@key "labelValues"] 1785 - ; label_value_definitions: 1786 - Com_atproto_label_defs.label_value_definition list option 1787 - [@key "labelValueDefinitions"] [@default None] } 1481 + { 1482 + label_values: Com_atproto_label_defs.label_value list [@key "labelValues"]; 1483 + label_value_definitions: Com_atproto_label_defs.label_value_definition list option [@key "labelValueDefinitions"] [@default None]; 1484 + } 1788 1485 [@@deriving yojson {strict= false}] 1789 1486 1790 1487 type labeler_view_detailed = 1791 - { uri: string 1792 - ; cid: string 1793 - ; creator: profile_view 1794 - ; policies: labeler_policies 1795 - ; like_count: int option [@key "likeCount"] [@default None] 1796 - ; viewer: labeler_viewer_state option [@default None] 1797 - ; indexed_at: string [@key "indexedAt"] 1798 - ; labels: Com_atproto_label_defs.label list option [@default None] 1799 - ; reason_types: Com_atproto_moderation_defs.reason_type list option 1800 - [@key "reasonTypes"] [@default None] 1801 - ; subject_types: Com_atproto_moderation_defs.subject_type list option 1802 - [@key "subjectTypes"] [@default None] 1803 - ; subject_collections: string list option 1804 - [@key "subjectCollections"] [@default None] } 1488 + { 1489 + uri: string; 1490 + cid: string; 1491 + creator: profile_view; 1492 + policies: labeler_policies; 1493 + like_count: int option [@key "likeCount"] [@default None]; 1494 + viewer: labeler_viewer_state option [@default None]; 1495 + indexed_at: string [@key "indexedAt"]; 1496 + labels: Com_atproto_label_defs.label list option [@default None]; 1497 + reason_types: Com_atproto_moderation_defs.reason_type list option [@key "reasonTypes"] [@default None]; 1498 + subject_types: Com_atproto_moderation_defs.subject_type list option [@key "subjectTypes"] [@default None]; 1499 + subject_collections: string list option [@key "subjectCollections"] [@default None]; 1500 + } 1805 1501 [@@deriving yojson {strict= false}] 1502 +
+67 -44
pegasus/lexicons/app_bsky_unspecced_defs.ml
··· 1 1 (* generated from app.bsky.unspecced.defs *) 2 2 3 - type skeleton_search_post = {uri: string} [@@deriving yojson {strict= false}] 3 + type skeleton_search_post = 4 + { 5 + uri: string; 6 + } 7 + [@@deriving yojson {strict= false}] 4 8 5 - type skeleton_search_actor = {did: string} [@@deriving yojson {strict= false}] 9 + type skeleton_search_actor = 10 + { 11 + did: string; 12 + } 13 + [@@deriving yojson {strict= false}] 6 14 7 - type skeleton_search_starter_pack = {uri: string} 15 + type skeleton_search_starter_pack = 16 + { 17 + uri: string; 18 + } 8 19 [@@deriving yojson {strict= false}] 9 20 10 21 type trending_topic = 11 - { topic: string 12 - ; display_name: string option [@key "displayName"] [@default None] 13 - ; description: string option [@default None] 14 - ; link: string } 22 + { 23 + topic: string; 24 + display_name: string option [@key "displayName"] [@default None]; 25 + description: string option [@default None]; 26 + link: string; 27 + } 15 28 [@@deriving yojson {strict= false}] 16 29 17 30 type skeleton_trend = 18 - { topic: string 19 - ; display_name: string [@key "displayName"] 20 - ; link: string 21 - ; started_at: string [@key "startedAt"] 22 - ; post_count: int [@key "postCount"] 23 - ; status: string option [@default None] 24 - ; category: string option [@default None] 25 - ; dids: string list } 31 + { 32 + topic: string; 33 + display_name: string [@key "displayName"]; 34 + link: string; 35 + started_at: string [@key "startedAt"]; 36 + post_count: int [@key "postCount"]; 37 + status: string option [@default None]; 38 + category: string option [@default None]; 39 + dids: string list; 40 + } 26 41 [@@deriving yojson {strict= false}] 27 42 28 43 type trend_view = 29 - { topic: string 30 - ; display_name: string [@key "displayName"] 31 - ; link: string 32 - ; started_at: string [@key "startedAt"] 33 - ; post_count: int [@key "postCount"] 34 - ; status: string option [@default None] 35 - ; category: string option [@default None] 36 - ; actors: App_bsky_actor_defs.profile_view_basic list } 44 + { 45 + topic: string; 46 + display_name: string [@key "displayName"]; 47 + link: string; 48 + started_at: string [@key "startedAt"]; 49 + post_count: int [@key "postCount"]; 50 + status: string option [@default None]; 51 + category: string option [@default None]; 52 + actors: App_bsky_actor_defs.profile_view_basic list; 53 + } 37 54 [@@deriving yojson {strict= false}] 38 55 39 56 type thread_item_post = 40 - { post: App_bsky_feed_defs.post_view 41 - ; more_parents: bool [@key "moreParents"] 42 - ; more_replies: int [@key "moreReplies"] 43 - ; op_thread: bool [@key "opThread"] 44 - ; hidden_by_threadgate: bool [@key "hiddenByThreadgate"] 45 - ; muted_by_viewer: bool [@key "mutedByViewer"] } 57 + { 58 + post: App_bsky_feed_defs.post_view; 59 + more_parents: bool [@key "moreParents"]; 60 + more_replies: int [@key "moreReplies"]; 61 + op_thread: bool [@key "opThread"]; 62 + hidden_by_threadgate: bool [@key "hiddenByThreadgate"]; 63 + muted_by_viewer: bool [@key "mutedByViewer"]; 64 + } 46 65 [@@deriving yojson {strict= false}] 47 66 48 67 type thread_item_no_unauthenticated = unit 49 - 50 68 let thread_item_no_unauthenticated_of_yojson _ = Ok () 51 - 52 69 let thread_item_no_unauthenticated_to_yojson () = `Assoc [] 53 70 54 71 type thread_item_not_found = unit 55 - 56 72 let thread_item_not_found_of_yojson _ = Ok () 57 - 58 73 let thread_item_not_found_to_yojson () = `Assoc [] 59 74 60 - type thread_item_blocked = {author: App_bsky_feed_defs.blocked_author} 75 + type thread_item_blocked = 76 + { 77 + author: App_bsky_feed_defs.blocked_author; 78 + } 61 79 [@@deriving yojson {strict= false}] 62 80 63 81 type age_assurance_state = 64 - { last_initiated_at: string option [@key "lastInitiatedAt"] [@default None] 65 - ; status: string } 82 + { 83 + last_initiated_at: string option [@key "lastInitiatedAt"] [@default None]; 84 + status: string; 85 + } 66 86 [@@deriving yojson {strict= false}] 67 87 68 88 type age_assurance_event = 69 - { created_at: string [@key "createdAt"] 70 - ; status: string 71 - ; attempt_id: string [@key "attemptId"] 72 - ; email: string option [@default None] 73 - ; init_ip: string option [@key "initIp"] [@default None] 74 - ; init_ua: string option [@key "initUa"] [@default None] 75 - ; complete_ip: string option [@key "completeIp"] [@default None] 76 - ; complete_ua: string option [@key "completeUa"] [@default None] } 89 + { 90 + created_at: string [@key "createdAt"]; 91 + status: string; 92 + attempt_id: string [@key "attemptId"]; 93 + email: string option [@default None]; 94 + init_ip: string option [@key "initIp"] [@default None]; 95 + init_ua: string option [@key "initUa"] [@default None]; 96 + complete_ip: string option [@key "completeIp"] [@default None]; 97 + complete_ua: string option [@key "completeUa"] [@default None]; 98 + } 77 99 [@@deriving yojson {strict= false}] 100 +
+4 -3
pegasus/lexicons/app_bsky_unspecced_getAgeAssuranceState.ml
··· 5 5 let nsid = "app.bsky.unspecced.getAgeAssuranceState" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = App_bsky_unspecced_defs.age_assurance_state 12 - [@@deriving yojson {strict= false}] 11 + [@@deriving yojson {strict= false}] 13 12 14 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 15 15 Hermes.query client nsid (`Assoc []) output_of_yojson 16 16 end 17 +
+13 -7
pegasus/lexicons/app_bsky_unspecced_getConfig.ml
··· 1 1 (* generated from app.bsky.unspecced.getConfig *) 2 2 3 - type live_now_config = {did: string; domains: string list} 3 + type live_now_config = 4 + { 5 + did: string; 6 + domains: string list; 7 + } 4 8 [@@deriving yojson {strict= false}] 5 9 6 10 (** Get miscellaneous runtime configuration. *) ··· 8 12 let nsid = "app.bsky.unspecced.getConfig" 9 13 10 14 type params = unit 11 - 12 15 let params_to_yojson () = `Assoc [] 13 16 14 17 type output = 15 - { check_email_confirmed: bool option 16 - [@key "checkEmailConfirmed"] [@default None] 17 - ; live_now: live_now_config list option [@key "liveNow"] [@default None] } 18 - [@@deriving yojson {strict= false}] 18 + { 19 + check_email_confirmed: bool option [@key "checkEmailConfirmed"] [@default None]; 20 + live_now: live_now_config list option [@key "liveNow"] [@default None]; 21 + } 22 + [@@deriving yojson {strict= false}] 19 23 20 - let call (client : Hermes.client) : output Lwt.t = 24 + let call 25 + (client : Hermes.client) : output Lwt.t = 21 26 Hermes.query client nsid (`Assoc []) output_of_yojson 22 27 end 28 +
+13 -6
pegasus/lexicons/app_bsky_unspecced_getOnboardingSuggestedStarterPacks.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.unspecced.getOnboardingSuggestedStarterPacks" 6 6 7 - type params = {limit: int option [@default None]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + limit: int option [@default None]; 10 + } 11 + [@@xrpc_query] 9 12 10 13 type output = 11 - { starter_packs: App_bsky_graph_defs.starter_pack_view list 12 - [@key "starterPacks"] } 13 - [@@deriving yojson {strict= false}] 14 + { 15 + starter_packs: App_bsky_graph_defs.starter_pack_view list [@key "starterPacks"]; 16 + } 17 + [@@deriving yojson {strict= false}] 14 18 15 - let call ?limit (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ?limit 21 + (client : Hermes.client) : output Lwt.t = 16 22 let params : params = {limit} in 17 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 18 24 end 25 +
+15 -5
pegasus/lexicons/app_bsky_unspecced_getOnboardingSuggestedStarterPacksSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton" 6 6 7 7 type params = 8 - {viewer: string option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 - type output = {starter_packs: string list [@key "starterPacks"]} 12 - [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + starter_packs: string list [@key "starterPacks"]; 17 + } 18 + [@@deriving yojson {strict= false}] 13 19 14 - let call ?viewer ?limit (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?viewer 22 + ?limit 23 + (client : Hermes.client) : output Lwt.t = 15 24 let params : params = {viewer; limit} in 16 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 26 end 27 +
+31
pegasus/lexicons/app_bsky_unspecced_getOnboardingSuggestedUsersSkeleton.ml
··· 1 + (* generated from app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton *) 2 + 3 + (** Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton" 6 + 7 + type params = 8 + { 9 + viewer: string option [@default None]; 10 + category: string option [@default None]; 11 + limit: int option [@default None]; 12 + } 13 + [@@xrpc_query] 14 + 15 + type output = 16 + { 17 + dids: string list; 18 + rec_id: string option [@key "recId"] [@default None]; 19 + rec_id_str: string option [@key "recIdStr"] [@default None]; 20 + } 21 + [@@deriving yojson {strict= false}] 22 + 23 + let call 24 + ?viewer 25 + ?category 26 + ?limit 27 + (client : Hermes.client) : output Lwt.t = 28 + let params : params = {viewer; category; limit} in 29 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 30 + end 31 +
+17 -8
pegasus/lexicons/app_bsky_unspecced_getPopularFeedGenerators.ml
··· 5 5 let nsid = "app.bsky.unspecced.getPopularFeedGenerators" 6 6 7 7 type params = 8 - { limit: int option [@default None] 9 - ; cursor: string option [@default None] 10 - ; query: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + limit: int option [@default None]; 10 + cursor: string option [@default None]; 11 + query: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; feeds: App_bsky_feed_defs.generator_view list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + feeds: App_bsky_feed_defs.generator_view list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ?limit ?cursor ?query (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ?limit 24 + ?cursor 25 + ?query 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {limit; cursor; query} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+30 -26
pegasus/lexicons/app_bsky_unspecced_getPostThreadOtherV2.ml
··· 8 8 let open Yojson.Safe.Util in 9 9 try 10 10 match json |> member "$type" |> to_string with 11 - | "app.bsky.unspecced.defs#threadItemPost" -> ( 12 - match App_bsky_unspecced_defs.thread_item_post_of_yojson json with 13 - | Ok v -> 14 - Ok (ThreadItemPost v) 15 - | Error e -> 16 - Error e ) 17 - | _ -> 18 - Ok (Unknown json) 11 + | "app.bsky.unspecced.defs#threadItemPost" -> 12 + (match App_bsky_unspecced_defs.thread_item_post_of_yojson json with 13 + | Ok v -> Ok (ThreadItemPost v) 14 + | Error e -> Error e) 15 + | _ -> Ok (Unknown json) 19 16 with _ -> Error "failed to parse union" 20 17 21 18 let value_to_yojson = function 22 - | ThreadItemPost v -> ( 23 - match App_bsky_unspecced_defs.thread_item_post_to_yojson v with 24 - | `Assoc fields -> 25 - `Assoc 26 - (("$type", `String "app.bsky.unspecced.defs#threadItemPost") :: fields) 27 - | other -> 28 - other ) 29 - | Unknown j -> 30 - j 19 + | ThreadItemPost v -> 20 + (match App_bsky_unspecced_defs.thread_item_post_to_yojson v with 21 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.unspecced.defs#threadItemPost") :: fields) 22 + | other -> other) 23 + | Unknown j -> j 31 24 32 - type thread_item = {uri: string; depth: int; value: value} 25 + type thread_item = 26 + { 27 + uri: string; 28 + depth: int; 29 + value: value; 30 + } 33 31 [@@deriving yojson {strict= false}] 34 32 35 33 (** (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests. *) ··· 37 35 let nsid = "app.bsky.unspecced.getPostThreadOtherV2" 38 36 39 37 type params = 40 - { anchor: string 41 - ; prioritize_followed_users: bool option 42 - [@key "prioritizeFollowedUsers"] [@default None] } 43 - [@@deriving yojson {strict= false}] 38 + { 39 + anchor: string; 40 + } 41 + [@@xrpc_query] 44 42 45 - type output = {thread: thread_item list} [@@deriving yojson {strict= false}] 43 + type output = 44 + { 45 + thread: thread_item list; 46 + } 47 + [@@deriving yojson {strict= false}] 46 48 47 - let call ~anchor ?prioritize_followed_users (client : Hermes.client) : 48 - output Lwt.t = 49 - let params : params = {anchor; prioritize_followed_users} in 49 + let call 50 + ~anchor 51 + (client : Hermes.client) : output Lwt.t = 52 + let params : params = {anchor} in 50 53 Hermes.query client nsid (params_to_yojson params) output_of_yojson 51 54 end 55 +
+64 -84
pegasus/lexicons/app_bsky_unspecced_getPostThreadV2.ml
··· 2 2 3 3 type value = 4 4 | ThreadItemPost of App_bsky_unspecced_defs.thread_item_post 5 - | ThreadItemNoUnauthenticated of 6 - App_bsky_unspecced_defs.thread_item_no_unauthenticated 5 + | ThreadItemNoUnauthenticated of App_bsky_unspecced_defs.thread_item_no_unauthenticated 7 6 | ThreadItemNotFound of App_bsky_unspecced_defs.thread_item_not_found 8 7 | ThreadItemBlocked of App_bsky_unspecced_defs.thread_item_blocked 9 8 | Unknown of Yojson.Safe.t ··· 12 11 let open Yojson.Safe.Util in 13 12 try 14 13 match json |> member "$type" |> to_string with 15 - | "app.bsky.unspecced.defs#threadItemPost" -> ( 16 - match App_bsky_unspecced_defs.thread_item_post_of_yojson json with 17 - | Ok v -> 18 - Ok (ThreadItemPost v) 19 - | Error e -> 20 - Error e ) 21 - | "app.bsky.unspecced.defs#threadItemNoUnauthenticated" -> ( 22 - match 23 - App_bsky_unspecced_defs.thread_item_no_unauthenticated_of_yojson json 24 - with 25 - | Ok v -> 26 - Ok (ThreadItemNoUnauthenticated v) 27 - | Error e -> 28 - Error e ) 29 - | "app.bsky.unspecced.defs#threadItemNotFound" -> ( 30 - match App_bsky_unspecced_defs.thread_item_not_found_of_yojson json with 31 - | Ok v -> 32 - Ok (ThreadItemNotFound v) 33 - | Error e -> 34 - Error e ) 35 - | "app.bsky.unspecced.defs#threadItemBlocked" -> ( 36 - match App_bsky_unspecced_defs.thread_item_blocked_of_yojson json with 37 - | Ok v -> 38 - Ok (ThreadItemBlocked v) 39 - | Error e -> 40 - Error e ) 41 - | _ -> 42 - Ok (Unknown json) 14 + | "app.bsky.unspecced.defs#threadItemPost" -> 15 + (match App_bsky_unspecced_defs.thread_item_post_of_yojson json with 16 + | Ok v -> Ok (ThreadItemPost v) 17 + | Error e -> Error e) 18 + | "app.bsky.unspecced.defs#threadItemNoUnauthenticated" -> 19 + (match App_bsky_unspecced_defs.thread_item_no_unauthenticated_of_yojson json with 20 + | Ok v -> Ok (ThreadItemNoUnauthenticated v) 21 + | Error e -> Error e) 22 + | "app.bsky.unspecced.defs#threadItemNotFound" -> 23 + (match App_bsky_unspecced_defs.thread_item_not_found_of_yojson json with 24 + | Ok v -> Ok (ThreadItemNotFound v) 25 + | Error e -> Error e) 26 + | "app.bsky.unspecced.defs#threadItemBlocked" -> 27 + (match App_bsky_unspecced_defs.thread_item_blocked_of_yojson json with 28 + | Ok v -> Ok (ThreadItemBlocked v) 29 + | Error e -> Error e) 30 + | _ -> Ok (Unknown json) 43 31 with _ -> Error "failed to parse union" 44 32 45 33 let value_to_yojson = function 46 - | ThreadItemPost v -> ( 47 - match App_bsky_unspecced_defs.thread_item_post_to_yojson v with 48 - | `Assoc fields -> 49 - `Assoc 50 - (("$type", `String "app.bsky.unspecced.defs#threadItemPost") :: fields) 51 - | other -> 52 - other ) 53 - | ThreadItemNoUnauthenticated v -> ( 54 - match 55 - App_bsky_unspecced_defs.thread_item_no_unauthenticated_to_yojson v 56 - with 57 - | `Assoc fields -> 58 - `Assoc 59 - ( ( "$type" 60 - , `String "app.bsky.unspecced.defs#threadItemNoUnauthenticated" ) 61 - :: fields ) 62 - | other -> 63 - other ) 64 - | ThreadItemNotFound v -> ( 65 - match App_bsky_unspecced_defs.thread_item_not_found_to_yojson v with 66 - | `Assoc fields -> 67 - `Assoc 68 - ( ("$type", `String "app.bsky.unspecced.defs#threadItemNotFound") 69 - :: fields ) 70 - | other -> 71 - other ) 72 - | ThreadItemBlocked v -> ( 73 - match App_bsky_unspecced_defs.thread_item_blocked_to_yojson v with 74 - | `Assoc fields -> 75 - `Assoc 76 - ( ("$type", `String "app.bsky.unspecced.defs#threadItemBlocked") 77 - :: fields ) 78 - | other -> 79 - other ) 80 - | Unknown j -> 81 - j 34 + | ThreadItemPost v -> 35 + (match App_bsky_unspecced_defs.thread_item_post_to_yojson v with 36 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.unspecced.defs#threadItemPost") :: fields) 37 + | other -> other) 38 + | ThreadItemNoUnauthenticated v -> 39 + (match App_bsky_unspecced_defs.thread_item_no_unauthenticated_to_yojson v with 40 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.unspecced.defs#threadItemNoUnauthenticated") :: fields) 41 + | other -> other) 42 + | ThreadItemNotFound v -> 43 + (match App_bsky_unspecced_defs.thread_item_not_found_to_yojson v with 44 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.unspecced.defs#threadItemNotFound") :: fields) 45 + | other -> other) 46 + | ThreadItemBlocked v -> 47 + (match App_bsky_unspecced_defs.thread_item_blocked_to_yojson v with 48 + | `Assoc fields -> `Assoc (("$type", `String "app.bsky.unspecced.defs#threadItemBlocked") :: fields) 49 + | other -> other) 50 + | Unknown j -> j 82 51 83 - type thread_item = {uri: string; depth: int; value: value} 52 + type thread_item = 53 + { 54 + uri: string; 55 + depth: int; 56 + value: value; 57 + } 84 58 [@@deriving yojson {strict= false}] 85 59 86 60 (** (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. *) ··· 88 62 let nsid = "app.bsky.unspecced.getPostThreadV2" 89 63 90 64 type params = 91 - { anchor: string 92 - ; above: bool option [@default None] 93 - ; below: int option [@default None] 94 - ; branching_factor: int option [@key "branchingFactor"] [@default None] 95 - ; prioritize_followed_users: bool option 96 - [@key "prioritizeFollowedUsers"] [@default None] 97 - ; sort: string option [@default None] } 98 - [@@deriving yojson {strict= false}] 65 + { 66 + anchor: string; 67 + above: bool option [@default None]; 68 + below: int option [@default None]; 69 + branching_factor: int option [@key "branchingFactor"] [@default None]; 70 + sort: string option [@default None]; 71 + } 72 + [@@xrpc_query] 99 73 100 74 type output = 101 - { thread: thread_item list 102 - ; threadgate: App_bsky_feed_defs.threadgate_view option [@default None] 103 - ; has_other_replies: bool [@key "hasOtherReplies"] } 104 - [@@deriving yojson {strict= false}] 75 + { 76 + thread: thread_item list; 77 + threadgate: App_bsky_feed_defs.threadgate_view option [@default None]; 78 + has_other_replies: bool [@key "hasOtherReplies"]; 79 + } 80 + [@@deriving yojson {strict= false}] 105 81 106 - let call ~anchor ?above ?below ?branching_factor ?prioritize_followed_users 107 - ?sort (client : Hermes.client) : output Lwt.t = 108 - let params : params = 109 - {anchor; above; below; branching_factor; prioritize_followed_users; sort} 110 - in 82 + let call 83 + ~anchor 84 + ?above 85 + ?below 86 + ?branching_factor 87 + ?sort 88 + (client : Hermes.client) : output Lwt.t = 89 + let params : params = {anchor; above; below; branching_factor; sort} in 111 90 Hermes.query client nsid (params_to_yojson params) output_of_yojson 112 91 end 92 +
+14 -5
pegasus/lexicons/app_bsky_unspecced_getSuggestedFeeds.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.unspecced.getSuggestedFeeds" 6 6 7 - type params = {limit: int option [@default None]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + limit: int option [@default None]; 10 + } 11 + [@@xrpc_query] 9 12 10 - type output = {feeds: App_bsky_feed_defs.generator_view list} 11 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + feeds: App_bsky_feed_defs.generator_view list; 16 + } 17 + [@@deriving yojson {strict= false}] 12 18 13 - let call ?limit (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ?limit 21 + (client : Hermes.client) : output Lwt.t = 14 22 let params : params = {limit} in 15 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 16 24 end 25 +
+15 -4
pegasus/lexicons/app_bsky_unspecced_getSuggestedFeedsSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.getSuggestedFeedsSkeleton" 6 6 7 7 type params = 8 - {viewer: string option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 - type output = {feeds: string list} [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + feeds: string list; 17 + } 18 + [@@deriving yojson {strict= false}] 12 19 13 - let call ?viewer ?limit (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?viewer 22 + ?limit 23 + (client : Hermes.client) : output Lwt.t = 14 24 let params : params = {viewer; limit} in 15 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 16 26 end 27 +
+29
pegasus/lexicons/app_bsky_unspecced_getSuggestedOnboardingUsers.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedOnboardingUsers *) 2 + 3 + (** Get a list of suggested users for onboarding *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedOnboardingUsers" 6 + 7 + type params = 8 + { 9 + category: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 13 + 14 + type output = 15 + { 16 + actors: App_bsky_actor_defs.profile_view list; 17 + rec_id: string option [@key "recId"] [@default None]; 18 + rec_id_str: string option [@key "recIdStr"] [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 21 + 22 + let call 23 + ?category 24 + ?limit 25 + (client : Hermes.client) : output Lwt.t = 26 + let params : params = {category; limit} in 27 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 28 + end 29 +
+13 -6
pegasus/lexicons/app_bsky_unspecced_getSuggestedStarterPacks.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.unspecced.getSuggestedStarterPacks" 6 6 7 - type params = {limit: int option [@default None]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + limit: int option [@default None]; 10 + } 11 + [@@xrpc_query] 9 12 10 13 type output = 11 - { starter_packs: App_bsky_graph_defs.starter_pack_view list 12 - [@key "starterPacks"] } 13 - [@@deriving yojson {strict= false}] 14 + { 15 + starter_packs: App_bsky_graph_defs.starter_pack_view list [@key "starterPacks"]; 16 + } 17 + [@@deriving yojson {strict= false}] 14 18 15 - let call ?limit (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ?limit 21 + (client : Hermes.client) : output Lwt.t = 16 22 let params : params = {limit} in 17 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 18 24 end 25 +
+15 -5
pegasus/lexicons/app_bsky_unspecced_getSuggestedStarterPacksSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.getSuggestedStarterPacksSkeleton" 6 6 7 7 type params = 8 - {viewer: string option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 - type output = {starter_packs: string list [@key "starterPacks"]} 12 - [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + starter_packs: string list [@key "starterPacks"]; 17 + } 18 + [@@deriving yojson {strict= false}] 13 19 14 - let call ?viewer ?limit (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?viewer 22 + ?limit 23 + (client : Hermes.client) : output Lwt.t = 15 24 let params : params = {viewer; limit} in 16 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 26 end 27 +
+17 -5
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsers.ml
··· 5 5 let nsid = "app.bsky.unspecced.getSuggestedUsers" 6 6 7 7 type params = 8 - {category: string option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + category: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 - type output = {actors: App_bsky_actor_defs.profile_view list} 12 - [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + actors: App_bsky_actor_defs.profile_view list; 17 + rec_id: string option [@key "recId"] [@default None]; 18 + rec_id_str: string option [@key "recIdStr"] [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 13 21 14 - let call ?category ?limit (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ?category 24 + ?limit 25 + (client : Hermes.client) : output Lwt.t = 15 26 let params : params = {category; limit} in 16 27 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 28 end 29 +
+26
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersForDiscover.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedUsersForDiscover *) 2 + 3 + (** Get a list of suggested users for the Discover page *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedUsersForDiscover" 6 + 7 + type params = 8 + { 9 + limit: int option [@default None]; 10 + } 11 + [@@xrpc_query] 12 + 13 + type output = 14 + { 15 + actors: App_bsky_actor_defs.profile_view list; 16 + rec_id_str: string option [@key "recIdStr"] [@default None]; 17 + } 18 + [@@deriving yojson {strict= false}] 19 + 20 + let call 21 + ?limit 22 + (client : Hermes.client) : output Lwt.t = 23 + let params : params = {limit} in 24 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 25 + end 26 +
+28
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersForDiscoverSkeleton.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton *) 2 + 3 + (** Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton" 6 + 7 + type params = 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 13 + 14 + type output = 15 + { 16 + dids: string list; 17 + rec_id_str: string option [@key "recIdStr"] [@default None]; 18 + } 19 + [@@deriving yojson {strict= false}] 20 + 21 + let call 22 + ?viewer 23 + ?limit 24 + (client : Hermes.client) : output Lwt.t = 25 + let params : params = {viewer; limit} in 26 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 27 + end 28 +
+28
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersForExplore.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedUsersForExplore *) 2 + 3 + (** Get a list of suggested users for the Explore page *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedUsersForExplore" 6 + 7 + type params = 8 + { 9 + category: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 13 + 14 + type output = 15 + { 16 + actors: App_bsky_actor_defs.profile_view list; 17 + rec_id_str: string option [@key "recIdStr"] [@default None]; 18 + } 19 + [@@deriving yojson {strict= false}] 20 + 21 + let call 22 + ?category 23 + ?limit 24 + (client : Hermes.client) : output Lwt.t = 25 + let params : params = {category; limit} in 26 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 27 + end 28 +
+30
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersForExploreSkeleton.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedUsersForExploreSkeleton *) 2 + 3 + (** Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton" 6 + 7 + type params = 8 + { 9 + viewer: string option [@default None]; 10 + category: string option [@default None]; 11 + limit: int option [@default None]; 12 + } 13 + [@@xrpc_query] 14 + 15 + type output = 16 + { 17 + dids: string list; 18 + rec_id_str: string option [@key "recIdStr"] [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 21 + 22 + let call 23 + ?viewer 24 + ?category 25 + ?limit 26 + (client : Hermes.client) : output Lwt.t = 27 + let params : params = {viewer; category; limit} in 28 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 29 + end 30 +
+28
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersForSeeMore.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedUsersForSeeMore *) 2 + 3 + (** Get a list of suggested users for the See More page *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedUsersForSeeMore" 6 + 7 + type params = 8 + { 9 + category: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 13 + 14 + type output = 15 + { 16 + actors: App_bsky_actor_defs.profile_view list; 17 + rec_id_str: string option [@key "recIdStr"] [@default None]; 18 + } 19 + [@@deriving yojson {strict= false}] 20 + 21 + let call 22 + ?category 23 + ?limit 24 + (client : Hermes.client) : output Lwt.t = 25 + let params : params = {category; limit} in 26 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 27 + end 28 +
+30
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersForSeeMoreSkeleton.ml
··· 1 + (* generated from app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton *) 2 + 3 + (** Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore *) 4 + module Main = struct 5 + let nsid = "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton" 6 + 7 + type params = 8 + { 9 + viewer: string option [@default None]; 10 + category: string option [@default None]; 11 + limit: int option [@default None]; 12 + } 13 + [@@xrpc_query] 14 + 15 + type output = 16 + { 17 + dids: string list; 18 + rec_id_str: string option [@key "recIdStr"] [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 21 + 22 + let call 23 + ?viewer 24 + ?category 25 + ?limit 26 + (client : Hermes.client) : output Lwt.t = 27 + let params : params = {viewer; category; limit} in 28 + Hermes.query client nsid (params_to_yojson params) output_of_yojson 29 + end 30 +
+19 -6
pegasus/lexicons/app_bsky_unspecced_getSuggestedUsersSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.getSuggestedUsersSkeleton" 6 6 7 7 type params = 8 - { viewer: string option [@default None] 9 - ; category: string option [@default None] 10 - ; limit: int option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + category: string option [@default None]; 11 + limit: int option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 - type output = {dids: string list} [@@deriving yojson {strict= false}] 15 + type output = 16 + { 17 + dids: string list; 18 + rec_id: string option [@key "recId"] [@default None]; 19 + rec_id_str: string option [@key "recIdStr"] [@default None]; 20 + } 21 + [@@deriving yojson {strict= false}] 14 22 15 - let call ?viewer ?category ?limit (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ?viewer 25 + ?category 26 + ?limit 27 + (client : Hermes.client) : output Lwt.t = 16 28 let params : params = {viewer; category; limit} in 17 29 Hermes.query client nsid (params_to_yojson params) output_of_yojson 18 30 end 31 +
+22 -12
pegasus/lexicons/app_bsky_unspecced_getSuggestionsSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.getSuggestionsSkeleton" 6 6 7 7 type params = 8 - { viewer: string option [@default None] 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] 11 - ; relative_to_did: string option [@key "relativeToDid"] [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + relative_to_did: string option [@key "relativeToDid"] [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 16 type output = 15 - { cursor: string option [@default None] 16 - ; actors: App_bsky_unspecced_defs.skeleton_search_actor list 17 - ; relative_to_did: string option [@key "relativeToDid"] [@default None] 18 - ; rec_id: int option [@key "recId"] [@default None] } 19 - [@@deriving yojson {strict= false}] 17 + { 18 + cursor: string option [@default None]; 19 + actors: App_bsky_unspecced_defs.skeleton_search_actor list; 20 + relative_to_did: string option [@key "relativeToDid"] [@default None]; 21 + rec_id: int option [@key "recId"] [@default None]; 22 + rec_id_str: string option [@key "recIdStr"] [@default None]; 23 + } 24 + [@@deriving yojson {strict= false}] 20 25 21 - let call ?viewer ?limit ?cursor ?relative_to_did (client : Hermes.client) : 22 - output Lwt.t = 26 + let call 27 + ?viewer 28 + ?limit 29 + ?cursor 30 + ?relative_to_did 31 + (client : Hermes.client) : output Lwt.t = 23 32 let params : params = {viewer; limit; cursor; relative_to_did} in 24 33 Hermes.query client nsid (params_to_yojson params) output_of_yojson 25 34 end 35 +
+13 -5
pegasus/lexicons/app_bsky_unspecced_getTaggedSuggestions.ml
··· 1 1 (* generated from app.bsky.unspecced.getTaggedSuggestions *) 2 2 3 3 type suggestion = 4 - {tag: string; subject_type: string [@key "subjectType"]; subject: string} 4 + { 5 + tag: string; 6 + subject_type: string [@key "subjectType"]; 7 + subject: string; 8 + } 5 9 [@@deriving yojson {strict= false}] 6 10 7 11 (** Get a list of suggestions (feeds and users) tagged with categories *) ··· 9 13 let nsid = "app.bsky.unspecced.getTaggedSuggestions" 10 14 11 15 type params = unit 12 - 13 16 let params_to_yojson () = `Assoc [] 14 17 15 - type output = {suggestions: suggestion list} 16 - [@@deriving yojson {strict= false}] 18 + type output = 19 + { 20 + suggestions: suggestion list; 21 + } 22 + [@@deriving yojson {strict= false}] 17 23 18 - let call (client : Hermes.client) : output Lwt.t = 24 + let call 25 + (client : Hermes.client) : output Lwt.t = 19 26 Hermes.query client nsid (`Assoc []) output_of_yojson 20 27 end 28 +
+15 -6
pegasus/lexicons/app_bsky_unspecced_getTrendingTopics.ml
··· 5 5 let nsid = "app.bsky.unspecced.getTrendingTopics" 6 6 7 7 type params = 8 - {viewer: string option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 14 type output = 12 - { topics: App_bsky_unspecced_defs.trending_topic list 13 - ; suggested: App_bsky_unspecced_defs.trending_topic list } 14 - [@@deriving yojson {strict= false}] 15 + { 16 + topics: App_bsky_unspecced_defs.trending_topic list; 17 + suggested: App_bsky_unspecced_defs.trending_topic list; 18 + } 19 + [@@deriving yojson {strict= false}] 15 20 16 - let call ?viewer ?limit (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ?viewer 23 + ?limit 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {viewer; limit} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+14 -5
pegasus/lexicons/app_bsky_unspecced_getTrends.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.unspecced.getTrends" 6 6 7 - type params = {limit: int option [@default None]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + limit: int option [@default None]; 10 + } 11 + [@@xrpc_query] 9 12 10 - type output = {trends: App_bsky_unspecced_defs.trend_view list} 11 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + trends: App_bsky_unspecced_defs.trend_view list; 16 + } 17 + [@@deriving yojson {strict= false}] 12 18 13 - let call ?limit (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ?limit 21 + (client : Hermes.client) : output Lwt.t = 14 22 let params : params = {limit} in 15 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 16 24 end 25 +
+15 -5
pegasus/lexicons/app_bsky_unspecced_getTrendsSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.getTrendsSkeleton" 6 6 7 7 type params = 8 - {viewer: string option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + viewer: string option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 - type output = {trends: App_bsky_unspecced_defs.skeleton_trend list} 12 - [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + trends: App_bsky_unspecced_defs.skeleton_trend list; 17 + } 18 + [@@deriving yojson {strict= false}] 13 19 14 - let call ?viewer ?limit (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?viewer 22 + ?limit 23 + (client : Hermes.client) : output Lwt.t = 15 24 let params : params = {viewer; limit} in 16 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 26 end 27 +
+13 -7
pegasus/lexicons/app_bsky_unspecced_initAgeAssurance.ml
··· 5 5 let nsid = "app.bsky.unspecced.initAgeAssurance" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - {email: string; language: string; country_code: string [@key "countryCode"]} 11 + { 12 + email: string; 13 + language: string; 14 + country_code: string [@key "countryCode"]; 15 + } 13 16 [@@deriving yojson {strict= false}] 14 17 15 18 type output = App_bsky_unspecced_defs.age_assurance_state 16 - [@@deriving yojson {strict= false}] 19 + [@@deriving yojson {strict= false}] 17 20 18 - let call ~email ~language ~country_code (client : Hermes.client) : 19 - output Lwt.t = 21 + let call 22 + ~email 23 + ~language 24 + ~country_code 25 + (client : Hermes.client) : output Lwt.t = 20 26 let params = () in 21 27 let input = Some ({email; language; country_code} |> input_to_yojson) in 22 - Hermes.procedure client nsid (params_to_yojson params) input 23 - output_of_yojson 28 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 24 29 end 30 +
+22 -12
pegasus/lexicons/app_bsky_unspecced_searchActorsSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.searchActorsSkeleton" 6 6 7 7 type params = 8 - { q: string 9 - ; viewer: string option [@default None] 10 - ; typeahead: bool option [@default None] 11 - ; limit: int option [@default None] 12 - ; cursor: string option [@default None] } 13 - [@@deriving yojson {strict= false}] 8 + { 9 + q: string; 10 + viewer: string option [@default None]; 11 + typeahead: bool option [@default None]; 12 + limit: int option [@default None]; 13 + cursor: string option [@default None]; 14 + } 15 + [@@xrpc_query] 14 16 15 17 type output = 16 - { cursor: string option [@default None] 17 - ; hits_total: int option [@key "hitsTotal"] [@default None] 18 - ; actors: App_bsky_unspecced_defs.skeleton_search_actor list } 19 - [@@deriving yojson {strict= false}] 18 + { 19 + cursor: string option [@default None]; 20 + hits_total: int option [@key "hitsTotal"] [@default None]; 21 + actors: App_bsky_unspecced_defs.skeleton_search_actor list; 22 + } 23 + [@@deriving yojson {strict= false}] 20 24 21 - let call ~q ?viewer ?typeahead ?limit ?cursor (client : Hermes.client) : 22 - output Lwt.t = 25 + let call 26 + ~q 27 + ?viewer 28 + ?typeahead 29 + ?limit 30 + ?cursor 31 + (client : Hermes.client) : output Lwt.t = 23 32 let params : params = {q; viewer; typeahead; limit; cursor} in 24 33 Hermes.query client nsid (params_to_yojson params) output_of_yojson 25 34 end 35 +
+39 -38
pegasus/lexicons/app_bsky_unspecced_searchPostsSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.searchPostsSkeleton" 6 6 7 7 type params = 8 - { q: string 9 - ; sort: string option [@default None] 10 - ; since: string option [@default None] 11 - ; until: string option [@default None] 12 - ; mentions: string option [@default None] 13 - ; author: string option [@default None] 14 - ; lang: string option [@default None] 15 - ; domain: string option [@default None] 16 - ; url: string option [@default None] 17 - ; tag: string list option 18 - [@default None] 19 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 20 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] 21 - ; viewer: string option [@default None] 22 - ; limit: int option [@default None] 23 - ; cursor: string option [@default None] } 24 - [@@deriving yojson {strict= false}] 8 + { 9 + q: string; 10 + sort: string option [@default None]; 11 + since: string option [@default None]; 12 + until: string option [@default None]; 13 + mentions: string option [@default None]; 14 + author: string option [@default None]; 15 + lang: string option [@default None]; 16 + domain: string option [@default None]; 17 + url: string option [@default None]; 18 + tag: string list option [@default None]; 19 + viewer: string option [@default None]; 20 + limit: int option [@default None]; 21 + cursor: string option [@default None]; 22 + } 23 + [@@xrpc_query] 25 24 26 25 type output = 27 - { cursor: string option [@default None] 28 - ; hits_total: int option [@key "hitsTotal"] [@default None] 29 - ; posts: App_bsky_unspecced_defs.skeleton_search_post list } 30 - [@@deriving yojson {strict= false}] 26 + { 27 + cursor: string option [@default None]; 28 + hits_total: int option [@key "hitsTotal"] [@default None]; 29 + posts: App_bsky_unspecced_defs.skeleton_search_post list; 30 + } 31 + [@@deriving yojson {strict= false}] 31 32 32 - let call ~q ?sort ?since ?until ?mentions ?author ?lang ?domain ?url ?tag 33 - ?viewer ?limit ?cursor (client : Hermes.client) : output Lwt.t = 34 - let params : params = 35 - { q 36 - ; sort 37 - ; since 38 - ; until 39 - ; mentions 40 - ; author 41 - ; lang 42 - ; domain 43 - ; url 44 - ; tag 45 - ; viewer 46 - ; limit 47 - ; cursor } 48 - in 33 + let call 34 + ~q 35 + ?sort 36 + ?since 37 + ?until 38 + ?mentions 39 + ?author 40 + ?lang 41 + ?domain 42 + ?url 43 + ?tag 44 + ?viewer 45 + ?limit 46 + ?cursor 47 + (client : Hermes.client) : output Lwt.t = 48 + let params : params = {q; sort; since; until; mentions; author; lang; domain; url; tag; viewer; limit; cursor} in 49 49 Hermes.query client nsid (params_to_yojson params) output_of_yojson 50 50 end 51 +
+20 -11
pegasus/lexicons/app_bsky_unspecced_searchStarterPacksSkeleton.ml
··· 5 5 let nsid = "app.bsky.unspecced.searchStarterPacksSkeleton" 6 6 7 7 type params = 8 - { q: string 9 - ; viewer: string option [@default None] 10 - ; limit: int option [@default None] 11 - ; cursor: string option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + q: string; 10 + viewer: string option [@default None]; 11 + limit: int option [@default None]; 12 + cursor: string option [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 16 type output = 15 - { cursor: string option [@default None] 16 - ; hits_total: int option [@key "hitsTotal"] [@default None] 17 - ; starter_packs: App_bsky_unspecced_defs.skeleton_search_starter_pack list 18 - [@key "starterPacks"] } 19 - [@@deriving yojson {strict= false}] 17 + { 18 + cursor: string option [@default None]; 19 + hits_total: int option [@key "hitsTotal"] [@default None]; 20 + starter_packs: App_bsky_unspecced_defs.skeleton_search_starter_pack list [@key "starterPacks"]; 21 + } 22 + [@@deriving yojson {strict= false}] 20 23 21 - let call ~q ?viewer ?limit ?cursor (client : Hermes.client) : output Lwt.t = 24 + let call 25 + ~q 26 + ?viewer 27 + ?limit 28 + ?cursor 29 + (client : Hermes.client) : output Lwt.t = 22 30 let params : params = {q; viewer; limit; cursor} in 23 31 Hermes.query client nsid (params_to_yojson params) output_of_yojson 24 32 end 33 +
+10 -7
pegasus/lexicons/app_bsky_video_defs.ml
··· 1 1 (* generated from app.bsky.video.defs *) 2 2 3 3 type job_status = 4 - { job_id: string [@key "jobId"] 5 - ; did: string 6 - ; state: string 7 - ; progress: int option [@default None] 8 - ; blob: Hermes.blob option [@default None] 9 - ; error: string option [@default None] 10 - ; message: string option [@default None] } 4 + { 5 + job_id: string [@key "jobId"]; 6 + did: string; 7 + state: string; 8 + progress: int option [@default None]; 9 + blob: Hermes.blob option [@default None]; 10 + error: string option [@default None]; 11 + message: string option [@default None]; 12 + } 11 13 [@@deriving yojson {strict= false}] 14 +
+14 -5
pegasus/lexicons/app_bsky_video_getJobStatus.ml
··· 4 4 module Main = struct 5 5 let nsid = "app.bsky.video.getJobStatus" 6 6 7 - type params = {job_id: string [@key "jobId"]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + job_id: string [@key "jobId"]; 10 + } 11 + [@@xrpc_query] 9 12 10 - type output = {job_status: App_bsky_video_defs.job_status [@key "jobStatus"]} 11 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + job_status: App_bsky_video_defs.job_status [@key "jobStatus"]; 16 + } 17 + [@@deriving yojson {strict= false}] 12 18 13 - let call ~job_id (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~job_id 21 + (client : Hermes.client) : output Lwt.t = 14 22 let params : params = {job_id} in 15 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 16 24 end 25 +
+11 -10
pegasus/lexicons/app_bsky_video_getUploadLimits.ml
··· 5 5 let nsid = "app.bsky.video.getUploadLimits" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { can_upload: bool [@key "canUpload"] 13 - ; remaining_daily_videos: int option 14 - [@key "remainingDailyVideos"] [@default None] 15 - ; remaining_daily_bytes: int option 16 - [@key "remainingDailyBytes"] [@default None] 17 - ; message: string option [@default None] 18 - ; error: string option [@default None] } 19 - [@@deriving yojson {strict= false}] 11 + { 12 + can_upload: bool [@key "canUpload"]; 13 + remaining_daily_videos: int option [@key "remainingDailyVideos"] [@default None]; 14 + remaining_daily_bytes: int option [@key "remainingDailyBytes"] [@default None]; 15 + message: string option [@default None]; 16 + error: string option [@default None]; 17 + } 18 + [@@deriving yojson {strict= false}] 20 19 21 - let call (client : Hermes.client) : output Lwt.t = 20 + let call 21 + (client : Hermes.client) : output Lwt.t = 22 22 Hermes.query client nsid (`Assoc []) output_of_yojson 23 23 end 24 +
+10 -7
pegasus/lexicons/app_bsky_video_uploadVideo.ml
··· 5 5 let nsid = "app.bsky.video.uploadVideo" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type output = {job_status: App_bsky_video_defs.job_status [@key "jobStatus"]} 12 - [@@deriving yojson {strict= false}] 10 + type output = 11 + { 12 + job_status: App_bsky_video_defs.job_status [@key "jobStatus"]; 13 + } 14 + [@@deriving yojson {strict= false}] 13 15 14 - let call ?input (client : Hermes.client) : output Lwt.t = 16 + let call 17 + ?input 18 + (client : Hermes.client) : output Lwt.t = 15 19 let params = () in 16 - Hermes.procedure_blob client nsid (params_to_yojson params) 17 - (Bytes.of_string (Option.value input ~default:"")) 18 - ~content_type:"video/mp4" output_of_yojson 20 + Hermes.procedure_blob client nsid (params_to_yojson params) (Bytes.of_string (Option.value input ~default:"")) ~content_type:"video/mp4" output_of_yojson 19 21 end 22 +
+34 -21
pegasus/lexicons/com_atproto_admin_defs.ml
··· 1 1 (* generated from com.atproto.admin.defs *) 2 2 3 3 type status_attr = 4 - {applied: bool; ref_: string option [@key "ref"] [@default None]} 4 + { 5 + applied: bool; 6 + ref_: string option [@key "ref"] [@default None]; 7 + } 5 8 [@@deriving yojson {strict= false}] 6 9 7 - type threat_signature = {property: string; value: string} 10 + type threat_signature = 11 + { 12 + property: string; 13 + value: string; 14 + } 8 15 [@@deriving yojson {strict= false}] 9 16 10 17 type account_view = 11 - { did: string 12 - ; handle: string 13 - ; email: string option [@default None] 14 - ; related_records: Yojson.Safe.t list option 15 - [@key "relatedRecords"] [@default None] 16 - ; indexed_at: string [@key "indexedAt"] 17 - ; invited_by: Com_atproto_server_defs.invite_code option 18 - [@key "invitedBy"] [@default None] 19 - ; invites: Com_atproto_server_defs.invite_code list option [@default None] 20 - ; invites_disabled: bool option [@key "invitesDisabled"] [@default None] 21 - ; email_confirmed_at: string option [@key "emailConfirmedAt"] [@default None] 22 - ; invite_note: string option [@key "inviteNote"] [@default None] 23 - ; deactivated_at: string option [@key "deactivatedAt"] [@default None] 24 - ; threat_signatures: threat_signature list option 25 - [@key "threatSignatures"] [@default None] } 18 + { 19 + did: string; 20 + handle: string; 21 + email: string option [@default None]; 22 + related_records: Yojson.Safe.t list option [@key "relatedRecords"] [@default None]; 23 + indexed_at: string [@key "indexedAt"]; 24 + invited_by: Com_atproto_server_defs.invite_code option [@key "invitedBy"] [@default None]; 25 + invites: Com_atproto_server_defs.invite_code list option [@default None]; 26 + invites_disabled: bool option [@key "invitesDisabled"] [@default None]; 27 + email_confirmed_at: string option [@key "emailConfirmedAt"] [@default None]; 28 + invite_note: string option [@key "inviteNote"] [@default None]; 29 + deactivated_at: string option [@key "deactivatedAt"] [@default None]; 30 + threat_signatures: threat_signature list option [@key "threatSignatures"] [@default None]; 31 + } 26 32 [@@deriving yojson {strict= false}] 27 33 28 - type repo_ref = {did: string} [@@deriving yojson {strict= false}] 34 + type repo_ref = 35 + { 36 + did: string; 37 + } 38 + [@@deriving yojson {strict= false}] 29 39 30 40 type repo_blob_ref = 31 - { did: string 32 - ; cid: string 33 - ; record_uri: string option [@key "recordUri"] [@default None] } 41 + { 42 + did: string; 43 + cid: string; 44 + record_uri: string option [@key "recordUri"] [@default None]; 45 + } 34 46 [@@deriving yojson {strict= false}] 47 +
+10 -6
pegasus/lexicons/com_atproto_admin_deleteAccount.ml
··· 5 5 let nsid = "com.atproto.admin.deleteAccount" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {did: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + did: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~did (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~did 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({did} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+11 -6
pegasus/lexicons/com_atproto_admin_disableAccountInvites.ml
··· 5 5 let nsid = "com.atproto.admin.disableAccountInvites" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {account: string; note: string option [@default None]} 10 + type input = 11 + { 12 + account: string; 13 + note: string option [@default None]; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~account ?note (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~account 22 + ?note 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({account; note} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+10 -7
pegasus/lexicons/com_atproto_admin_disableInviteCodes.ml
··· 5 5 let nsid = "com.atproto.admin.disableInviteCodes" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { codes: string list option [@default None] 13 - ; accounts: string list option [@default None] } 11 + { 12 + codes: string list option [@default None]; 13 + accounts: string list option [@default None]; 14 + } 14 15 [@@deriving yojson {strict= false}] 15 16 16 17 type output = unit 17 - 18 18 let output_of_yojson _ = Ok () 19 19 20 - let call ?codes ?accounts (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?codes 22 + ?accounts 23 + (client : Hermes.client) : output Lwt.t = 21 24 let params = () in 22 25 let input = Some ({codes; accounts} |> input_to_yojson) in 23 - Hermes.procedure client nsid (params_to_yojson params) input 24 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 25 27 end 28 +
+11 -6
pegasus/lexicons/com_atproto_admin_enableAccountInvites.ml
··· 5 5 let nsid = "com.atproto.admin.enableAccountInvites" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {account: string; note: string option [@default None]} 10 + type input = 11 + { 12 + account: string; 13 + note: string option [@default None]; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~account ?note (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~account 22 + ?note 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({account; note} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+10 -3
pegasus/lexicons/com_atproto_admin_getAccountInfo.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.admin.getAccountInfo" 6 6 7 - type params = {did: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = Com_atproto_admin_defs.account_view 10 - [@@deriving yojson {strict= false}] 14 + [@@deriving yojson {strict= false}] 11 15 12 - let call ~did (client : Hermes.client) : output Lwt.t = 16 + let call 17 + ~did 18 + (client : Hermes.client) : output Lwt.t = 13 19 let params : params = {did} in 14 20 Hermes.query client nsid (params_to_yojson params) output_of_yojson 15 21 end 22 +
+13 -7
pegasus/lexicons/com_atproto_admin_getAccountInfos.ml
··· 5 5 let nsid = "com.atproto.admin.getAccountInfos" 6 6 7 7 type params = 8 - { dids: string list 9 - [@of_yojson Hermes_util.query_string_list_of_yojson] 10 - [@to_yojson Hermes_util.query_string_list_to_yojson] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + dids: string list; 10 + } 11 + [@@xrpc_query] 12 12 13 - type output = {infos: Com_atproto_admin_defs.account_view list} 14 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + infos: Com_atproto_admin_defs.account_view list; 16 + } 17 + [@@deriving yojson {strict= false}] 15 18 16 - let call ~dids (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~dids 21 + (client : Hermes.client) : output Lwt.t = 17 22 let params : params = {dids} in 18 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 24 end 25 +
+17 -8
pegasus/lexicons/com_atproto_admin_getInviteCodes.ml
··· 5 5 let nsid = "com.atproto.admin.getInviteCodes" 6 6 7 7 type params = 8 - { sort: string option [@default None] 9 - ; limit: int option [@default None] 10 - ; cursor: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + sort: string option [@default None]; 10 + limit: int option [@default None]; 11 + cursor: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; codes: Com_atproto_server_defs.invite_code list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + codes: Com_atproto_server_defs.invite_code list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ?sort ?limit ?cursor (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ?sort 24 + ?limit 25 + ?cursor 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {sort; limit; cursor} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+55 -61
pegasus/lexicons/com_atproto_admin_getSubjectStatus.ml
··· 5 5 let nsid = "com.atproto.admin.getSubjectStatus" 6 6 7 7 type params = 8 - { did: string option [@default None] 9 - ; uri: string option [@default None] 10 - ; blob: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + did: string option [@default None]; 10 + uri: string option [@default None]; 11 + blob: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type subject = 14 - | RepoRef of Com_atproto_admin_defs.repo_ref 15 - | StrongRef of Com_atproto_repo_strongRef.main 16 - | RepoBlobRef of Com_atproto_admin_defs.repo_blob_ref 17 - | Unknown of Yojson.Safe.t 16 + | RepoRef of Com_atproto_admin_defs.repo_ref 17 + | StrongRef of Com_atproto_repo_strongRef.main 18 + | RepoBlobRef of Com_atproto_admin_defs.repo_blob_ref 19 + | Unknown of Yojson.Safe.t 18 20 19 - let subject_of_yojson json = 20 - let open Yojson.Safe.Util in 21 - try 22 - match json |> member "$type" |> to_string with 23 - | "com.atproto.admin.defs#repoRef" -> ( 24 - match Com_atproto_admin_defs.repo_ref_of_yojson json with 25 - | Ok v -> 26 - Ok (RepoRef v) 27 - | Error e -> 28 - Error e ) 29 - | "com.atproto.repo.strongRef" -> ( 30 - match Com_atproto_repo_strongRef.main_of_yojson json with 31 - | Ok v -> 32 - Ok (StrongRef v) 33 - | Error e -> 34 - Error e ) 35 - | "com.atproto.admin.defs#repoBlobRef" -> ( 36 - match Com_atproto_admin_defs.repo_blob_ref_of_yojson json with 37 - | Ok v -> 38 - Ok (RepoBlobRef v) 39 - | Error e -> 40 - Error e ) 41 - | _ -> 42 - Ok (Unknown json) 43 - with _ -> Error "failed to parse union" 21 + let subject_of_yojson json = 22 + let open Yojson.Safe.Util in 23 + try 24 + match json |> member "$type" |> to_string with 25 + | "com.atproto.admin.defs#repoRef" -> 26 + (match Com_atproto_admin_defs.repo_ref_of_yojson json with 27 + | Ok v -> Ok (RepoRef v) 28 + | Error e -> Error e) 29 + | "com.atproto.repo.strongRef" -> 30 + (match Com_atproto_repo_strongRef.main_of_yojson json with 31 + | Ok v -> Ok (StrongRef v) 32 + | Error e -> Error e) 33 + | "com.atproto.admin.defs#repoBlobRef" -> 34 + (match Com_atproto_admin_defs.repo_blob_ref_of_yojson json with 35 + | Ok v -> Ok (RepoBlobRef v) 36 + | Error e -> Error e) 37 + | _ -> Ok (Unknown json) 38 + with _ -> Error "failed to parse union" 44 39 45 - let subject_to_yojson = function 46 - | RepoRef v -> ( 47 - match Com_atproto_admin_defs.repo_ref_to_yojson v with 48 - | `Assoc fields -> 49 - `Assoc (("$type", `String "com.atproto.admin.defs#repoRef") :: fields) 50 - | other -> 51 - other ) 52 - | StrongRef v -> ( 53 - match Com_atproto_repo_strongRef.main_to_yojson v with 54 - | `Assoc fields -> 55 - `Assoc (("$type", `String "com.atproto.repo.strongRef") :: fields) 56 - | other -> 57 - other ) 58 - | RepoBlobRef v -> ( 59 - match Com_atproto_admin_defs.repo_blob_ref_to_yojson v with 60 - | `Assoc fields -> 61 - `Assoc 62 - (("$type", `String "com.atproto.admin.defs#repoBlobRef") :: fields) 63 - | other -> 64 - other ) 65 - | Unknown j -> 66 - j 40 + let subject_to_yojson = function 41 + | RepoRef v -> 42 + (match Com_atproto_admin_defs.repo_ref_to_yojson v with 43 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.admin.defs#repoRef") :: fields) 44 + | other -> other) 45 + | StrongRef v -> 46 + (match Com_atproto_repo_strongRef.main_to_yojson v with 47 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.strongRef") :: fields) 48 + | other -> other) 49 + | RepoBlobRef v -> 50 + (match Com_atproto_admin_defs.repo_blob_ref_to_yojson v with 51 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.admin.defs#repoBlobRef") :: fields) 52 + | other -> other) 53 + | Unknown j -> j 67 54 68 - type output = 69 - { subject: subject 70 - ; takedown: Com_atproto_admin_defs.status_attr option [@default None] 71 - ; deactivated: Com_atproto_admin_defs.status_attr option [@default None] } 72 - [@@deriving yojson {strict= false}] 55 + type output = 56 + { 57 + subject: subject; 58 + takedown: Com_atproto_admin_defs.status_attr option [@default None]; 59 + deactivated: Com_atproto_admin_defs.status_attr option [@default None]; 60 + } 61 + [@@deriving yojson {strict= false}] 73 62 74 - let call ?did ?uri ?blob (client : Hermes.client) : output Lwt.t = 63 + let call 64 + ?did 65 + ?uri 66 + ?blob 67 + (client : Hermes.client) : output Lwt.t = 75 68 let params : params = {did; uri; blob} in 76 69 Hermes.query client nsid (params_to_yojson params) output_of_yojson 77 70 end 71 +
+17 -8
pegasus/lexicons/com_atproto_admin_searchAccounts.ml
··· 5 5 let nsid = "com.atproto.admin.searchAccounts" 6 6 7 7 type params = 8 - { email: string option [@default None] 9 - ; cursor: string option [@default None] 10 - ; limit: int option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + email: string option [@default None]; 10 + cursor: string option [@default None]; 11 + limit: int option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 15 type output = 14 - { cursor: string option [@default None] 15 - ; accounts: Com_atproto_admin_defs.account_view list } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + cursor: string option [@default None]; 18 + accounts: Com_atproto_admin_defs.account_view list; 19 + } 20 + [@@deriving yojson {strict= false}] 17 21 18 - let call ?email ?cursor ?limit (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ?email 24 + ?cursor 25 + ?limit 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params : params = {email; cursor; limit} in 20 28 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 29 end 30 +
+21 -15
pegasus/lexicons/com_atproto_admin_sendEmail.ml
··· 5 5 let nsid = "com.atproto.admin.sendEmail" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { recipient_did: string [@key "recipientDid"] 13 - ; content: string 14 - ; subject: string option [@default None] 15 - ; sender_did: string [@key "senderDid"] 16 - ; comment: string option [@default None] } 11 + { 12 + recipient_did: string [@key "recipientDid"]; 13 + content: string; 14 + subject: string option [@default None]; 15 + sender_did: string [@key "senderDid"]; 16 + comment: string option [@default None]; 17 + } 17 18 [@@deriving yojson {strict= false}] 18 19 19 - type output = {sent: bool} [@@deriving yojson {strict= false}] 20 + type output = 21 + { 22 + sent: bool; 23 + } 24 + [@@deriving yojson {strict= false}] 20 25 21 - let call ~recipient_did ~content ?subject ~sender_did ?comment 26 + let call 27 + ~recipient_did 28 + ~content 29 + ?subject 30 + ~sender_did 31 + ?comment 22 32 (client : Hermes.client) : output Lwt.t = 23 33 let params = () in 24 - let input = 25 - Some 26 - ( {recipient_did; content; subject; sender_did; comment} 27 - |> input_to_yojson ) 28 - in 29 - Hermes.procedure client nsid (params_to_yojson params) input 30 - output_of_yojson 34 + let input = Some ({recipient_did; content; subject; sender_did; comment} |> input_to_yojson) in 35 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 31 36 end 37 +
+11 -6
pegasus/lexicons/com_atproto_admin_updateAccountEmail.ml
··· 5 5 let nsid = "com.atproto.admin.updateAccountEmail" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {account: string; email: string} 10 + type input = 11 + { 12 + account: string; 13 + email: string; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~account ~email (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~account 22 + ~email 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({account; email} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+12 -6
pegasus/lexicons/com_atproto_admin_updateAccountHandle.ml
··· 5 5 let nsid = "com.atproto.admin.updateAccountHandle" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {did: string; handle: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + did: string; 13 + handle: string; 14 + } 15 + [@@deriving yojson {strict= false}] 12 16 13 17 type output = unit 14 - 15 18 let output_of_yojson _ = Ok () 16 19 17 - let call ~did ~handle (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~did 22 + ~handle 23 + (client : Hermes.client) : output Lwt.t = 18 24 let params = () in 19 25 let input = Some ({did; handle} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 27 end 28 +
+11 -6
pegasus/lexicons/com_atproto_admin_updateAccountPassword.ml
··· 5 5 let nsid = "com.atproto.admin.updateAccountPassword" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {did: string; password: string} 10 + type input = 11 + { 12 + did: string; 13 + password: string; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~did ~password (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~did 22 + ~password 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({did; password} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+11 -6
pegasus/lexicons/com_atproto_admin_updateAccountSigningKey.ml
··· 5 5 let nsid = "com.atproto.admin.updateAccountSigningKey" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {did: string; signing_key: string [@key "signingKey"]} 10 + type input = 11 + { 12 + did: string; 13 + signing_key: string [@key "signingKey"]; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~did ~signing_key (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~did 22 + ~signing_key 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({did; signing_key} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+54 -63
pegasus/lexicons/com_atproto_admin_updateSubjectStatus.ml
··· 5 5 let nsid = "com.atproto.admin.updateSubjectStatus" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type subject = 12 - | RepoRef of Com_atproto_admin_defs.repo_ref 13 - | StrongRef of Com_atproto_repo_strongRef.main 14 - | RepoBlobRef of Com_atproto_admin_defs.repo_blob_ref 15 - | Unknown of Yojson.Safe.t 11 + | RepoRef of Com_atproto_admin_defs.repo_ref 12 + | StrongRef of Com_atproto_repo_strongRef.main 13 + | RepoBlobRef of Com_atproto_admin_defs.repo_blob_ref 14 + | Unknown of Yojson.Safe.t 16 15 17 - let subject_of_yojson json = 18 - let open Yojson.Safe.Util in 19 - try 20 - match json |> member "$type" |> to_string with 21 - | "com.atproto.admin.defs#repoRef" -> ( 22 - match Com_atproto_admin_defs.repo_ref_of_yojson json with 23 - | Ok v -> 24 - Ok (RepoRef v) 25 - | Error e -> 26 - Error e ) 27 - | "com.atproto.repo.strongRef" -> ( 28 - match Com_atproto_repo_strongRef.main_of_yojson json with 29 - | Ok v -> 30 - Ok (StrongRef v) 31 - | Error e -> 32 - Error e ) 33 - | "com.atproto.admin.defs#repoBlobRef" -> ( 34 - match Com_atproto_admin_defs.repo_blob_ref_of_yojson json with 35 - | Ok v -> 36 - Ok (RepoBlobRef v) 37 - | Error e -> 38 - Error e ) 39 - | _ -> 40 - Ok (Unknown json) 41 - with _ -> Error "failed to parse union" 16 + let subject_of_yojson json = 17 + let open Yojson.Safe.Util in 18 + try 19 + match json |> member "$type" |> to_string with 20 + | "com.atproto.admin.defs#repoRef" -> 21 + (match Com_atproto_admin_defs.repo_ref_of_yojson json with 22 + | Ok v -> Ok (RepoRef v) 23 + | Error e -> Error e) 24 + | "com.atproto.repo.strongRef" -> 25 + (match Com_atproto_repo_strongRef.main_of_yojson json with 26 + | Ok v -> Ok (StrongRef v) 27 + | Error e -> Error e) 28 + | "com.atproto.admin.defs#repoBlobRef" -> 29 + (match Com_atproto_admin_defs.repo_blob_ref_of_yojson json with 30 + | Ok v -> Ok (RepoBlobRef v) 31 + | Error e -> Error e) 32 + | _ -> Ok (Unknown json) 33 + with _ -> Error "failed to parse union" 42 34 43 - let subject_to_yojson = function 44 - | RepoRef v -> ( 45 - match Com_atproto_admin_defs.repo_ref_to_yojson v with 46 - | `Assoc fields -> 47 - `Assoc (("$type", `String "com.atproto.admin.defs#repoRef") :: fields) 48 - | other -> 49 - other ) 50 - | StrongRef v -> ( 51 - match Com_atproto_repo_strongRef.main_to_yojson v with 52 - | `Assoc fields -> 53 - `Assoc (("$type", `String "com.atproto.repo.strongRef") :: fields) 54 - | other -> 55 - other ) 56 - | RepoBlobRef v -> ( 57 - match Com_atproto_admin_defs.repo_blob_ref_to_yojson v with 58 - | `Assoc fields -> 59 - `Assoc 60 - (("$type", `String "com.atproto.admin.defs#repoBlobRef") :: fields) 61 - | other -> 62 - other ) 63 - | Unknown j -> 64 - j 35 + let subject_to_yojson = function 36 + | RepoRef v -> 37 + (match Com_atproto_admin_defs.repo_ref_to_yojson v with 38 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.admin.defs#repoRef") :: fields) 39 + | other -> other) 40 + | StrongRef v -> 41 + (match Com_atproto_repo_strongRef.main_to_yojson v with 42 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.strongRef") :: fields) 43 + | other -> other) 44 + | RepoBlobRef v -> 45 + (match Com_atproto_admin_defs.repo_blob_ref_to_yojson v with 46 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.admin.defs#repoBlobRef") :: fields) 47 + | other -> other) 48 + | Unknown j -> j 65 49 66 - type input = 67 - { subject: subject 68 - ; takedown: Com_atproto_admin_defs.status_attr option [@default None] 69 - ; deactivated: Com_atproto_admin_defs.status_attr option [@default None] } 50 + type input = 51 + { 52 + subject: subject; 53 + takedown: Com_atproto_admin_defs.status_attr option [@default None]; 54 + deactivated: Com_atproto_admin_defs.status_attr option [@default None]; 55 + } 70 56 [@@deriving yojson {strict= false}] 71 57 72 58 type output = 73 - { subject: subject 74 - ; takedown: Com_atproto_admin_defs.status_attr option [@default None] } 75 - [@@deriving yojson {strict= false}] 59 + { 60 + subject: subject; 61 + takedown: Com_atproto_admin_defs.status_attr option [@default None]; 62 + } 63 + [@@deriving yojson {strict= false}] 76 64 77 - let call ~subject ?takedown ?deactivated (client : Hermes.client) : 78 - output Lwt.t = 65 + let call 66 + ~subject 67 + ?takedown 68 + ?deactivated 69 + (client : Hermes.client) : output Lwt.t = 79 70 let params = () in 80 71 let input = Some ({subject; takedown; deactivated} |> input_to_yojson) in 81 - Hermes.procedure client nsid (params_to_yojson params) input 82 - output_of_yojson 72 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 83 73 end 74 +
+6 -1
pegasus/lexicons/com_atproto_identity_defs.ml
··· 1 1 (* generated from com.atproto.identity.defs *) 2 2 3 3 type identity_info = 4 - {did: string; handle: string; did_doc: Yojson.Safe.t [@key "didDoc"]} 4 + { 5 + did: string; 6 + handle: string; 7 + did_doc: Yojson.Safe.t [@key "didDoc"]; 8 + } 5 9 [@@deriving yojson {strict= false}] 10 +
+10 -8
pegasus/lexicons/com_atproto_identity_getRecommendedDidCredentials.ml
··· 5 5 let nsid = "com.atproto.identity.getRecommendedDidCredentials" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { rotation_keys: string list option [@key "rotationKeys"] [@default None] 13 - ; also_known_as: string list option [@key "alsoKnownAs"] [@default None] 14 - ; verification_methods: Yojson.Safe.t option 15 - [@key "verificationMethods"] [@default None] 16 - ; services: Yojson.Safe.t option [@default None] } 17 - [@@deriving yojson {strict= false}] 11 + { 12 + rotation_keys: string list option [@key "rotationKeys"] [@default None]; 13 + also_known_as: string list option [@key "alsoKnownAs"] [@default None]; 14 + verification_methods: Yojson.Safe.t option [@key "verificationMethods"] [@default None]; 15 + services: Yojson.Safe.t option [@default None]; 16 + } 17 + [@@deriving yojson {strict= false}] 18 18 19 - let call (client : Hermes.client) : output Lwt.t = 19 + let call 20 + (client : Hermes.client) : output Lwt.t = 20 21 Hermes.query client nsid (`Assoc []) output_of_yojson 21 22 end 23 +
+11 -6
pegasus/lexicons/com_atproto_identity_refreshIdentity.ml
··· 5 5 let nsid = "com.atproto.identity.refreshIdentity" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {identifier: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + identifier: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = Com_atproto_identity_defs.identity_info 14 - [@@deriving yojson {strict= false}] 17 + [@@deriving yojson {strict= false}] 15 18 16 - let call ~identifier (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~identifier 21 + (client : Hermes.client) : output Lwt.t = 17 22 let params = () in 18 23 let input = Some ({identifier} |> input_to_yojson) in 19 - Hermes.procedure client nsid (params_to_yojson params) input 20 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 21 25 end 26 +
+4 -5
pegasus/lexicons/com_atproto_identity_requestPlcOperationSignature.ml
··· 5 5 let nsid = "com.atproto.identity.requestPlcOperationSignature" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = unit 12 - 13 11 let output_of_yojson _ = Ok () 14 12 15 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 16 15 let params = () in 17 16 let input = None in 18 - Hermes.procedure client nsid (params_to_yojson params) input 19 - output_of_yojson 17 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 20 18 end 19 +
+14 -4
pegasus/lexicons/com_atproto_identity_resolveDid.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.identity.resolveDid" 6 6 7 - type params = {did: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + } 11 + [@@xrpc_query] 8 12 9 - type output = {did_doc: Yojson.Safe.t [@key "didDoc"]} 10 - [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + did_doc: Yojson.Safe.t [@key "didDoc"]; 16 + } 17 + [@@deriving yojson {strict= false}] 11 18 12 - let call ~did (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~did 21 + (client : Hermes.client) : output Lwt.t = 13 22 let params : params = {did} in 14 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 15 24 end 25 +
+14 -3
pegasus/lexicons/com_atproto_identity_resolveHandle.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.identity.resolveHandle" 6 6 7 - type params = {handle: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + handle: string; 10 + } 11 + [@@xrpc_query] 8 12 9 - type output = {did: string} [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + did: string; 16 + } 17 + [@@deriving yojson {strict= false}] 10 18 11 - let call ~handle (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~handle 21 + (client : Hermes.client) : output Lwt.t = 12 22 let params : params = {handle} in 13 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 14 24 end 25 +
+10 -3
pegasus/lexicons/com_atproto_identity_resolveIdentity.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.identity.resolveIdentity" 6 6 7 - type params = {identifier: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + identifier: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = Com_atproto_identity_defs.identity_info 10 - [@@deriving yojson {strict= false}] 14 + [@@deriving yojson {strict= false}] 11 15 12 - let call ~identifier (client : Hermes.client) : output Lwt.t = 16 + let call 17 + ~identifier 18 + (client : Hermes.client) : output Lwt.t = 13 19 let params : params = {identifier} in 14 20 Hermes.query client nsid (params_to_yojson params) output_of_yojson 15 21 end 22 +
+21 -16
pegasus/lexicons/com_atproto_identity_signPlcOperation.ml
··· 5 5 let nsid = "com.atproto.identity.signPlcOperation" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { token: string option [@default None] 13 - ; rotation_keys: string list option [@key "rotationKeys"] [@default None] 14 - ; also_known_as: string list option [@key "alsoKnownAs"] [@default None] 15 - ; verification_methods: Yojson.Safe.t option 16 - [@key "verificationMethods"] [@default None] 17 - ; services: Yojson.Safe.t option [@default None] } 11 + { 12 + token: string option [@default None]; 13 + rotation_keys: string list option [@key "rotationKeys"] [@default None]; 14 + also_known_as: string list option [@key "alsoKnownAs"] [@default None]; 15 + verification_methods: Yojson.Safe.t option [@key "verificationMethods"] [@default None]; 16 + services: Yojson.Safe.t option [@default None]; 17 + } 18 18 [@@deriving yojson {strict= false}] 19 19 20 - type output = {operation: Yojson.Safe.t} [@@deriving yojson {strict= false}] 20 + type output = 21 + { 22 + operation: Yojson.Safe.t; 23 + } 24 + [@@deriving yojson {strict= false}] 21 25 22 - let call ?token ?rotation_keys ?also_known_as ?verification_methods ?services 26 + let call 27 + ?token 28 + ?rotation_keys 29 + ?also_known_as 30 + ?verification_methods 31 + ?services 23 32 (client : Hermes.client) : output Lwt.t = 24 33 let params = () in 25 - let input = 26 - Some 27 - ( {token; rotation_keys; also_known_as; verification_methods; services} 28 - |> input_to_yojson ) 29 - in 30 - Hermes.procedure client nsid (params_to_yojson params) input 31 - output_of_yojson 34 + let input = Some ({token; rotation_keys; also_known_as; verification_methods; services} |> input_to_yojson) in 35 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 32 36 end 37 +
+10 -6
pegasus/lexicons/com_atproto_identity_submitPlcOperation.ml
··· 5 5 let nsid = "com.atproto.identity.submitPlcOperation" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {operation: Yojson.Safe.t} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + operation: Yojson.Safe.t; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~operation (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~operation 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({operation} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+10 -6
pegasus/lexicons/com_atproto_identity_updateHandle.ml
··· 5 5 let nsid = "com.atproto.identity.updateHandle" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {handle: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + handle: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~handle (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~handle 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({handle} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+36 -24
pegasus/lexicons/com_atproto_label_defs.ml
··· 1 1 (* generated from com.atproto.label.defs *) 2 2 3 3 type label = 4 - { ver: int option [@default None] 5 - ; src: string 6 - ; uri: string 7 - ; cid: string option [@default None] 8 - ; val_: string [@key "val"] 9 - ; neg: bool option [@default None] 10 - ; cts: string 11 - ; exp: string option [@default None] 12 - ; sig_: bytes option [@key "sig"] [@default None] } 4 + { 5 + ver: int option [@default None]; 6 + src: string; 7 + uri: string; 8 + cid: string option [@default None]; 9 + val_: string [@key "val"]; 10 + neg: bool option [@default None]; 11 + cts: string; 12 + exp: string option [@default None]; 13 + sig_: bytes option [@key "sig"] [@default None]; 14 + } 13 15 [@@deriving yojson {strict= false}] 14 16 15 - type self_label = {val_: string [@key "val"]} 17 + type self_label = 18 + { 19 + val_: string [@key "val"]; 20 + } 16 21 [@@deriving yojson {strict= false}] 17 22 18 - type self_labels = {values: self_label list} [@@deriving yojson {strict= false}] 23 + type self_labels = 24 + { 25 + values: self_label list; 26 + } 27 + [@@deriving yojson {strict= false}] 19 28 20 29 type label_value_definition_strings = 21 - {lang: string; name: string; description: string} 30 + { 31 + lang: string; 32 + name: string; 33 + description: string; 34 + } 22 35 [@@deriving yojson {strict= false}] 23 36 24 37 type label_value_definition = 25 - { identifier: string 26 - ; severity: string 27 - ; blurs: string 28 - ; default_setting: string option [@key "defaultSetting"] [@default None] 29 - ; adult_only: bool option [@key "adultOnly"] [@default None] 30 - ; locales: label_value_definition_strings list } 38 + { 39 + identifier: string; 40 + severity: string; 41 + blurs: string; 42 + default_setting: string option [@key "defaultSetting"] [@default None]; 43 + adult_only: bool option [@key "adultOnly"] [@default None]; 44 + locales: label_value_definition_strings list; 45 + } 31 46 [@@deriving yojson {strict= false}] 32 47 33 48 (** string type with known values *) 34 49 type label_value = string 35 - 36 50 let label_value_of_yojson = function 37 - | `String s -> 38 - Ok s 39 - | _ -> 40 - Error "label_value: expected string" 51 + | `String s -> Ok s 52 + | _ -> Error "label_value: expected string" 53 + let label_value_to_yojson s = `String s 41 54 42 - let label_value_to_yojson s = `String s
+19 -16
pegasus/lexicons/com_atproto_label_queryLabels.ml
··· 5 5 let nsid = "com.atproto.label.queryLabels" 6 6 7 7 type params = 8 - { uri_patterns: string list 9 - [@key "uriPatterns"] 10 - [@of_yojson Hermes_util.query_string_list_of_yojson] 11 - [@to_yojson Hermes_util.query_string_list_to_yojson] 12 - ; sources: string list option 13 - [@default None] 14 - [@of_yojson Hermes_util.query_string_list_option_of_yojson] 15 - [@to_yojson Hermes_util.query_string_list_option_to_yojson] 16 - ; limit: int option [@default None] 17 - ; cursor: string option [@default None] } 18 - [@@deriving yojson {strict= false}] 8 + { 9 + uri_patterns: string list [@key "uriPatterns"]; 10 + sources: string list option [@default None]; 11 + limit: int option [@default None]; 12 + cursor: string option [@default None]; 13 + } 14 + [@@xrpc_query] 19 15 20 16 type output = 21 - { cursor: string option [@default None] 22 - ; labels: Com_atproto_label_defs.label list } 23 - [@@deriving yojson {strict= false}] 17 + { 18 + cursor: string option [@default None]; 19 + labels: Com_atproto_label_defs.label list; 20 + } 21 + [@@deriving yojson {strict= false}] 24 22 25 - let call ~uri_patterns ?sources ?limit ?cursor (client : Hermes.client) : 26 - output Lwt.t = 23 + let call 24 + ~uri_patterns 25 + ?sources 26 + ?limit 27 + ?cursor 28 + (client : Hermes.client) : output Lwt.t = 27 29 let params : params = {uri_patterns; sources; limit; cursor} in 28 30 Hermes.query client nsid (params_to_yojson params) output_of_yojson 29 31 end 32 +
+15 -4
pegasus/lexicons/com_atproto_lexicon_resolveLexicon.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.lexicon.resolveLexicon" 6 6 7 - type params = {nsid: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + nsid: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = 10 - {cid: string; schema: Com_atproto_lexicon_schema.main; uri: string} 11 - [@@deriving yojson {strict= false}] 14 + { 15 + cid: string; 16 + schema: Com_atproto_lexicon_schema.main; 17 + uri: string; 18 + } 19 + [@@deriving yojson {strict= false}] 12 20 13 - let call ~nsid (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ~nsid 23 + (client : Hermes.client) : output Lwt.t = 14 24 let params : params = {nsid} in 15 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 16 26 end 27 +
+6 -1
pegasus/lexicons/com_atproto_lexicon_schema.ml
··· 1 1 (* generated from com.atproto.lexicon.schema *) 2 2 3 - type main = {lexicon: int} [@@deriving yojson {strict= false}] 3 + type main = 4 + { 5 + lexicon: int; 6 + } 7 + [@@deriving yojson {strict= false}] 8 +
+57 -58
pegasus/lexicons/com_atproto_moderation_createReport.ml
··· 1 1 (* generated from com.atproto.moderation.createReport *) 2 2 3 - type mod_tool = {name: string; meta: Yojson.Safe.t option [@default None]} 3 + type mod_tool = 4 + { 5 + name: string; 6 + meta: Yojson.Safe.t option [@default None]; 7 + } 4 8 [@@deriving yojson {strict= false}] 5 9 6 10 (** Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth. *) ··· 8 12 let nsid = "com.atproto.moderation.createReport" 9 13 10 14 type params = unit 11 - 12 15 let params_to_yojson () = `Assoc [] 13 16 14 17 type subject = 15 - | RepoRef of Com_atproto_admin_defs.repo_ref 16 - | StrongRef of Com_atproto_repo_strongRef.main 17 - | Unknown of Yojson.Safe.t 18 + | RepoRef of Com_atproto_admin_defs.repo_ref 19 + | StrongRef of Com_atproto_repo_strongRef.main 20 + | Unknown of Yojson.Safe.t 18 21 19 - let subject_of_yojson json = 20 - let open Yojson.Safe.Util in 21 - try 22 - match json |> member "$type" |> to_string with 23 - | "com.atproto.admin.defs#repoRef" -> ( 24 - match Com_atproto_admin_defs.repo_ref_of_yojson json with 25 - | Ok v -> 26 - Ok (RepoRef v) 27 - | Error e -> 28 - Error e ) 29 - | "com.atproto.repo.strongRef" -> ( 30 - match Com_atproto_repo_strongRef.main_of_yojson json with 31 - | Ok v -> 32 - Ok (StrongRef v) 33 - | Error e -> 34 - Error e ) 35 - | _ -> 36 - Ok (Unknown json) 37 - with _ -> Error "failed to parse union" 22 + let subject_of_yojson json = 23 + let open Yojson.Safe.Util in 24 + try 25 + match json |> member "$type" |> to_string with 26 + | "com.atproto.admin.defs#repoRef" -> 27 + (match Com_atproto_admin_defs.repo_ref_of_yojson json with 28 + | Ok v -> Ok (RepoRef v) 29 + | Error e -> Error e) 30 + | "com.atproto.repo.strongRef" -> 31 + (match Com_atproto_repo_strongRef.main_of_yojson json with 32 + | Ok v -> Ok (StrongRef v) 33 + | Error e -> Error e) 34 + | _ -> Ok (Unknown json) 35 + with _ -> Error "failed to parse union" 38 36 39 - let subject_to_yojson = function 40 - | RepoRef v -> ( 41 - match Com_atproto_admin_defs.repo_ref_to_yojson v with 42 - | `Assoc fields -> 43 - `Assoc (("$type", `String "com.atproto.admin.defs#repoRef") :: fields) 44 - | other -> 45 - other ) 46 - | StrongRef v -> ( 47 - match Com_atproto_repo_strongRef.main_to_yojson v with 48 - | `Assoc fields -> 49 - `Assoc (("$type", `String "com.atproto.repo.strongRef") :: fields) 50 - | other -> 51 - other ) 52 - | Unknown j -> 53 - j 37 + let subject_to_yojson = function 38 + | RepoRef v -> 39 + (match Com_atproto_admin_defs.repo_ref_to_yojson v with 40 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.admin.defs#repoRef") :: fields) 41 + | other -> other) 42 + | StrongRef v -> 43 + (match Com_atproto_repo_strongRef.main_to_yojson v with 44 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.strongRef") :: fields) 45 + | other -> other) 46 + | Unknown j -> j 54 47 55 - type input = 56 - { reason_type: Com_atproto_moderation_defs.reason_type [@key "reasonType"] 57 - ; reason: string option [@default None] 58 - ; subject: subject 59 - ; mod_tool: mod_tool option [@key "modTool"] [@default None] } 48 + type input = 49 + { 50 + reason_type: Com_atproto_moderation_defs.reason_type [@key "reasonType"]; 51 + reason: string option [@default None]; 52 + subject: subject; 53 + mod_tool: mod_tool option [@key "modTool"] [@default None]; 54 + } 60 55 [@@deriving yojson {strict= false}] 61 56 62 57 type output = 63 - { id: int 64 - ; reason_type: Com_atproto_moderation_defs.reason_type [@key "reasonType"] 65 - ; reason: string option [@default None] 66 - ; subject: subject 67 - ; reported_by: string [@key "reportedBy"] 68 - ; created_at: string [@key "createdAt"] } 69 - [@@deriving yojson {strict= false}] 58 + { 59 + id: int; 60 + reason_type: Com_atproto_moderation_defs.reason_type [@key "reasonType"]; 61 + reason: string option [@default None]; 62 + subject: subject; 63 + reported_by: string [@key "reportedBy"]; 64 + created_at: string [@key "createdAt"]; 65 + } 66 + [@@deriving yojson {strict= false}] 70 67 71 - let call ~reason_type ?reason ~subject ?mod_tool (client : Hermes.client) : 72 - output Lwt.t = 68 + let call 69 + ~reason_type 70 + ?reason 71 + ~subject 72 + ?mod_tool 73 + (client : Hermes.client) : output Lwt.t = 73 74 let params = () in 74 - let input = 75 - Some ({reason_type; reason; subject; mod_tool} |> input_to_yojson) 76 - in 77 - Hermes.procedure client nsid (params_to_yojson params) input 78 - output_of_yojson 75 + let input = Some ({reason_type; reason; subject; mod_tool} |> input_to_yojson) in 76 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 79 77 end 78 +
+12 -19
pegasus/lexicons/com_atproto_moderation_defs.ml
··· 2 2 3 3 (** string type with known values *) 4 4 type reason_type = string 5 - 6 5 let reason_type_of_yojson = function 7 - | `String s -> 8 - Ok s 9 - | _ -> 10 - Error "reason_type: expected string" 11 - 6 + | `String s -> Ok s 7 + | _ -> Error "reason_type: expected string" 12 8 let reason_type_to_yojson s = `String s 13 9 14 - (** Spam: frequent unwanted promotion, replies, mentions *) 10 + (** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. *) 15 11 let reason_spam = "com.atproto.moderation.defs#reasonSpam" 16 12 17 - (** Direct violation of server rules, laws, terms of service *) 13 + (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 18 14 let reason_violation = "com.atproto.moderation.defs#reasonViolation" 19 15 20 - (** Misleading identity, affiliation, or content *) 16 + (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 21 17 let reason_misleading = "com.atproto.moderation.defs#reasonMisleading" 22 18 23 - (** Unwanted or mislabeled sexual content *) 19 + (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 24 20 let reason_sexual = "com.atproto.moderation.defs#reasonSexual" 25 21 26 - (** Rude, harassing, explicit, or otherwise unwelcoming behavior *) 22 + (** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. *) 27 23 let reason_rude = "com.atproto.moderation.defs#reasonRude" 28 24 29 - (** Other: reports not falling under another report category *) 25 + (** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. *) 30 26 let reason_other = "com.atproto.moderation.defs#reasonOther" 31 27 32 - (** Appeal: appeal a previously taken moderation action *) 28 + (** Appeal a previously taken moderation action *) 33 29 let reason_appeal = "com.atproto.moderation.defs#reasonAppeal" 34 30 35 31 (** string type with known values: Tag describing a type of subject that might be reported. *) 36 32 type subject_type = string 37 - 38 33 let subject_type_of_yojson = function 39 - | `String s -> 40 - Ok s 41 - | _ -> 42 - Error "subject_type: expected string" 34 + | `String s -> Ok s 35 + | _ -> Error "subject_type: expected string" 36 + let subject_type_to_yojson s = `String s 43 37 44 - let subject_type_to_yojson s = `String s
+115 -129
pegasus/lexicons/com_atproto_repo_applyWrites.ml
··· 1 1 (* generated from com.atproto.repo.applyWrites *) 2 2 3 3 type delete_result = unit 4 - 5 4 let delete_result_of_yojson _ = Ok () 6 - 7 5 let delete_result_to_yojson () = `Assoc [] 8 6 9 7 type update_result = 10 - { uri: string 11 - ; cid: string 12 - ; validation_status: string option [@key "validationStatus"] [@default None] 8 + { 9 + uri: string; 10 + cid: string; 11 + validation_status: string option [@key "validationStatus"] [@default None]; 13 12 } 14 13 [@@deriving yojson {strict= false}] 15 14 16 15 type create_result = 17 - { uri: string 18 - ; cid: string 19 - ; validation_status: string option [@key "validationStatus"] [@default None] 16 + { 17 + uri: string; 18 + cid: string; 19 + validation_status: string option [@key "validationStatus"] [@default None]; 20 20 } 21 21 [@@deriving yojson {strict= false}] 22 22 23 - type delete = {collection: string; rkey: string} 23 + type delete = 24 + { 25 + collection: string; 26 + rkey: string; 27 + } 24 28 [@@deriving yojson {strict= false}] 25 29 26 - type update = {collection: string; rkey: string; value: Yojson.Safe.t} 30 + type update = 31 + { 32 + collection: string; 33 + rkey: string; 34 + value: Yojson.Safe.t; 35 + } 27 36 [@@deriving yojson {strict= false}] 28 37 29 38 type create = 30 - {collection: string; rkey: string option [@default None]; value: Yojson.Safe.t} 39 + { 40 + collection: string; 41 + rkey: string option [@default None]; 42 + value: Yojson.Safe.t; 43 + } 31 44 [@@deriving yojson {strict= false}] 32 45 33 46 (** Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. *) ··· 35 48 let nsid = "com.atproto.repo.applyWrites" 36 49 37 50 type params = unit 38 - 39 51 let params_to_yojson () = `Assoc [] 40 52 41 - type writes_item = Create of create | Update of update | Delete of delete 53 + type writes_item = 54 + | Create of create 55 + | Update of update 56 + | Delete of delete 42 57 43 - let writes_item_of_yojson json = 44 - let open Yojson.Safe.Util in 45 - try 46 - match json |> member "$type" |> to_string with 47 - | "com.atproto.repo.applyWrites#create" -> ( 48 - match create_of_yojson json with 49 - | Ok v -> 50 - Ok (Create v) 51 - | Error e -> 52 - Error e ) 53 - | "com.atproto.repo.applyWrites#update" -> ( 54 - match update_of_yojson json with 55 - | Ok v -> 56 - Ok (Update v) 57 - | Error e -> 58 - Error e ) 59 - | "com.atproto.repo.applyWrites#delete" -> ( 60 - match delete_of_yojson json with 61 - | Ok v -> 62 - Ok (Delete v) 63 - | Error e -> 64 - Error e ) 65 - | t -> 66 - Error ("unknown union type: " ^ t) 67 - with _ -> Error "failed to parse union" 58 + let writes_item_of_yojson json = 59 + let open Yojson.Safe.Util in 60 + try 61 + match json |> member "$type" |> to_string with 62 + | "com.atproto.repo.applyWrites#create" -> 63 + (match create_of_yojson json with 64 + | Ok v -> Ok (Create v) 65 + | Error e -> Error e) 66 + | "com.atproto.repo.applyWrites#update" -> 67 + (match update_of_yojson json with 68 + | Ok v -> Ok (Update v) 69 + | Error e -> Error e) 70 + | "com.atproto.repo.applyWrites#delete" -> 71 + (match delete_of_yojson json with 72 + | Ok v -> Ok (Delete v) 73 + | Error e -> Error e) 74 + | t -> Error ("unknown union type: " ^ t) 75 + with _ -> Error "failed to parse union" 68 76 69 - let writes_item_to_yojson = function 70 - | Create v -> ( 71 - match create_to_yojson v with 72 - | `Assoc fields -> 73 - `Assoc 74 - (("$type", `String "com.atproto.repo.applyWrites#create") :: fields) 75 - | other -> 76 - other ) 77 - | Update v -> ( 78 - match update_to_yojson v with 79 - | `Assoc fields -> 80 - `Assoc 81 - (("$type", `String "com.atproto.repo.applyWrites#update") :: fields) 82 - | other -> 83 - other ) 84 - | Delete v -> ( 85 - match delete_to_yojson v with 86 - | `Assoc fields -> 87 - `Assoc 88 - (("$type", `String "com.atproto.repo.applyWrites#delete") :: fields) 89 - | other -> 90 - other ) 77 + let writes_item_to_yojson = function 78 + | Create v -> 79 + (match create_to_yojson v with 80 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.applyWrites#create") :: fields) 81 + | other -> other) 82 + | Update v -> 83 + (match update_to_yojson v with 84 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.applyWrites#update") :: fields) 85 + | other -> other) 86 + | Delete v -> 87 + (match delete_to_yojson v with 88 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.applyWrites#delete") :: fields) 89 + | other -> other) 91 90 92 - type input = 93 - { repo: string 94 - ; validate: bool option [@default None] 95 - ; writes: writes_item list 96 - ; swap_commit: string option [@key "swapCommit"] [@default None] } 91 + type input = 92 + { 93 + repo: string; 94 + validate: bool option [@default None]; 95 + writes: writes_item list; 96 + swap_commit: string option [@key "swapCommit"] [@default None]; 97 + } 97 98 [@@deriving yojson {strict= false}] 98 99 99 100 type results_item = 100 - | CreateResult of create_result 101 - | UpdateResult of update_result 102 - | DeleteResult of delete_result 101 + | CreateResult of create_result 102 + | UpdateResult of update_result 103 + | DeleteResult of delete_result 103 104 104 - let results_item_of_yojson json = 105 - let open Yojson.Safe.Util in 106 - try 107 - match json |> member "$type" |> to_string with 108 - | "com.atproto.repo.applyWrites#createResult" -> ( 109 - match create_result_of_yojson json with 110 - | Ok v -> 111 - Ok (CreateResult v) 112 - | Error e -> 113 - Error e ) 114 - | "com.atproto.repo.applyWrites#updateResult" -> ( 115 - match update_result_of_yojson json with 116 - | Ok v -> 117 - Ok (UpdateResult v) 118 - | Error e -> 119 - Error e ) 120 - | "com.atproto.repo.applyWrites#deleteResult" -> ( 121 - match delete_result_of_yojson json with 122 - | Ok v -> 123 - Ok (DeleteResult v) 124 - | Error e -> 125 - Error e ) 126 - | t -> 127 - Error ("unknown union type: " ^ t) 128 - with _ -> Error "failed to parse union" 105 + let results_item_of_yojson json = 106 + let open Yojson.Safe.Util in 107 + try 108 + match json |> member "$type" |> to_string with 109 + | "com.atproto.repo.applyWrites#createResult" -> 110 + (match create_result_of_yojson json with 111 + | Ok v -> Ok (CreateResult v) 112 + | Error e -> Error e) 113 + | "com.atproto.repo.applyWrites#updateResult" -> 114 + (match update_result_of_yojson json with 115 + | Ok v -> Ok (UpdateResult v) 116 + | Error e -> Error e) 117 + | "com.atproto.repo.applyWrites#deleteResult" -> 118 + (match delete_result_of_yojson json with 119 + | Ok v -> Ok (DeleteResult v) 120 + | Error e -> Error e) 121 + | t -> Error ("unknown union type: " ^ t) 122 + with _ -> Error "failed to parse union" 129 123 130 - let results_item_to_yojson = function 131 - | CreateResult v -> ( 132 - match create_result_to_yojson v with 133 - | `Assoc fields -> 134 - `Assoc 135 - ( ("$type", `String "com.atproto.repo.applyWrites#createResult") 136 - :: fields ) 137 - | other -> 138 - other ) 139 - | UpdateResult v -> ( 140 - match update_result_to_yojson v with 141 - | `Assoc fields -> 142 - `Assoc 143 - ( ("$type", `String "com.atproto.repo.applyWrites#updateResult") 144 - :: fields ) 145 - | other -> 146 - other ) 147 - | DeleteResult v -> ( 148 - match delete_result_to_yojson v with 149 - | `Assoc fields -> 150 - `Assoc 151 - ( ("$type", `String "com.atproto.repo.applyWrites#deleteResult") 152 - :: fields ) 153 - | other -> 154 - other ) 124 + let results_item_to_yojson = function 125 + | CreateResult v -> 126 + (match create_result_to_yojson v with 127 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.applyWrites#createResult") :: fields) 128 + | other -> other) 129 + | UpdateResult v -> 130 + (match update_result_to_yojson v with 131 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.applyWrites#updateResult") :: fields) 132 + | other -> other) 133 + | DeleteResult v -> 134 + (match delete_result_to_yojson v with 135 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.repo.applyWrites#deleteResult") :: fields) 136 + | other -> other) 155 137 156 - type output = 157 - { commit: Com_atproto_repo_defs.commit_meta option [@default None] 158 - ; results: results_item list option [@default None] } 159 - [@@deriving yojson {strict= false}] 138 + type output = 139 + { 140 + commit: Com_atproto_repo_defs.commit_meta option [@default None]; 141 + results: results_item list option [@default None]; 142 + } 143 + [@@deriving yojson {strict= false}] 160 144 161 - let call ~repo ?validate ~writes ?swap_commit (client : Hermes.client) : 162 - output Lwt.t = 145 + let call 146 + ~repo 147 + ?validate 148 + ~writes 149 + ?swap_commit 150 + (client : Hermes.client) : output Lwt.t = 163 151 let params = () in 164 - let input = 165 - Some ({repo; validate; writes; swap_commit} |> input_to_yojson) 166 - in 167 - Hermes.procedure client nsid (params_to_yojson params) input 168 - output_of_yojson 152 + let input = Some ({repo; validate; writes; swap_commit} |> input_to_yojson) in 153 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 169 154 end 155 +
+25 -21
pegasus/lexicons/com_atproto_repo_createRecord.ml
··· 5 5 let nsid = "com.atproto.repo.createRecord" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { repo: string 13 - ; collection: string 14 - ; rkey: string option [@default None] 15 - ; validate: bool option [@default None] 16 - ; record: Yojson.Safe.t 17 - ; swap_commit: string option [@key "swapCommit"] [@default None] } 11 + { 12 + repo: string; 13 + collection: string; 14 + rkey: string option [@default None]; 15 + validate: bool option [@default None]; 16 + record: Yojson.Safe.t; 17 + swap_commit: string option [@key "swapCommit"] [@default None]; 18 + } 18 19 [@@deriving yojson {strict= false}] 19 20 20 21 type output = 21 - { uri: string 22 - ; cid: string 23 - ; commit: Com_atproto_repo_defs.commit_meta option [@default None] 24 - ; validation_status: string option [@key "validationStatus"] [@default None] 25 - } 26 - [@@deriving yojson {strict= false}] 22 + { 23 + uri: string; 24 + cid: string; 25 + commit: Com_atproto_repo_defs.commit_meta option [@default None]; 26 + validation_status: string option [@key "validationStatus"] [@default None]; 27 + } 28 + [@@deriving yojson {strict= false}] 27 29 28 - let call ~repo ~collection ?rkey ?validate ~record ?swap_commit 30 + let call 31 + ~repo 32 + ~collection 33 + ?rkey 34 + ?validate 35 + ~record 36 + ?swap_commit 29 37 (client : Hermes.client) : output Lwt.t = 30 38 let params = () in 31 - let input = 32 - Some 33 - ( {repo; collection; rkey; validate; record; swap_commit} 34 - |> input_to_yojson ) 35 - in 36 - Hermes.procedure client nsid (params_to_yojson params) input 37 - output_of_yojson 39 + let input = Some ({repo; collection; rkey; validate; record; swap_commit} |> input_to_yojson) in 40 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 38 41 end 42 +
+6 -1
pegasus/lexicons/com_atproto_repo_defs.ml
··· 1 1 (* generated from com.atproto.repo.defs *) 2 2 3 - type commit_meta = {cid: string; rev: string} 3 + type commit_meta = 4 + { 5 + cid: string; 6 + rev: string; 7 + } 4 8 [@@deriving yojson {strict= false}] 9 +
+20 -15
pegasus/lexicons/com_atproto_repo_deleteRecord.ml
··· 5 5 let nsid = "com.atproto.repo.deleteRecord" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { repo: string 13 - ; collection: string 14 - ; rkey: string 15 - ; swap_record: string option [@key "swapRecord"] [@default None] 16 - ; swap_commit: string option [@key "swapCommit"] [@default None] } 11 + { 12 + repo: string; 13 + collection: string; 14 + rkey: string; 15 + swap_record: string option [@key "swapRecord"] [@default None]; 16 + swap_commit: string option [@key "swapCommit"] [@default None]; 17 + } 17 18 [@@deriving yojson {strict= false}] 18 19 19 20 type output = 20 - {commit: Com_atproto_repo_defs.commit_meta option [@default None]} 21 - [@@deriving yojson {strict= false}] 21 + { 22 + commit: Com_atproto_repo_defs.commit_meta option [@default None]; 23 + } 24 + [@@deriving yojson {strict= false}] 22 25 23 - let call ~repo ~collection ~rkey ?swap_record ?swap_commit 26 + let call 27 + ~repo 28 + ~collection 29 + ~rkey 30 + ?swap_record 31 + ?swap_commit 24 32 (client : Hermes.client) : output Lwt.t = 25 33 let params = () in 26 - let input = 27 - Some 28 - ({repo; collection; rkey; swap_record; swap_commit} |> input_to_yojson) 29 - in 30 - Hermes.procedure client nsid (params_to_yojson params) input 31 - output_of_yojson 34 + let input = Some ({repo; collection; rkey; swap_record; swap_commit} |> input_to_yojson) in 35 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 32 36 end 37 +
+17 -8
pegasus/lexicons/com_atproto_repo_describeRepo.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.repo.describeRepo" 6 6 7 - type params = {repo: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + repo: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = 10 - { handle: string 11 - ; did: string 12 - ; did_doc: Yojson.Safe.t [@key "didDoc"] 13 - ; collections: string list 14 - ; handle_is_correct: bool [@key "handleIsCorrect"] } 15 - [@@deriving yojson {strict= false}] 14 + { 15 + handle: string; 16 + did: string; 17 + did_doc: Yojson.Safe.t [@key "didDoc"]; 18 + collections: string list; 19 + handle_is_correct: bool [@key "handleIsCorrect"]; 20 + } 21 + [@@deriving yojson {strict= false}] 16 22 17 - let call ~repo (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~repo 25 + (client : Hermes.client) : output Lwt.t = 18 26 let params : params = {repo} in 19 27 Hermes.query client nsid (params_to_yojson params) output_of_yojson 20 28 end 29 +
+20 -9
pegasus/lexicons/com_atproto_repo_getRecord.ml
··· 5 5 let nsid = "com.atproto.repo.getRecord" 6 6 7 7 type params = 8 - { repo: string 9 - ; collection: string 10 - ; rkey: string 11 - ; cid: string option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + repo: string; 10 + collection: string; 11 + rkey: string; 12 + cid: string option [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 16 type output = 15 - {uri: string; cid: string option [@default None]; value: Yojson.Safe.t} 16 - [@@deriving yojson {strict= false}] 17 + { 18 + uri: string; 19 + cid: string option [@default None]; 20 + value: Yojson.Safe.t; 21 + } 22 + [@@deriving yojson {strict= false}] 17 23 18 - let call ~repo ~collection ~rkey ?cid (client : Hermes.client) : output Lwt.t 19 - = 24 + let call 25 + ~repo 26 + ~collection 27 + ~rkey 28 + ?cid 29 + (client : Hermes.client) : output Lwt.t = 20 30 let params : params = {repo; collection; rkey; cid} in 21 31 Hermes.query client nsid (params_to_yojson params) output_of_yojson 22 32 end 33 +
+5 -7
pegasus/lexicons/com_atproto_repo_importRepo.ml
··· 5 5 let nsid = "com.atproto.repo.importRepo" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = unit 12 - 13 11 let output_of_yojson _ = Ok () 14 12 15 - let call ?input (client : Hermes.client) : output Lwt.t = 13 + let call 14 + ?input 15 + (client : Hermes.client) : output Lwt.t = 16 16 let params = () in 17 17 let open Lwt.Syntax in 18 - let* _ = 19 - Hermes.procedure_bytes client nsid (params_to_yojson params) input 20 - ~content_type:"application/vnd.ipld.car" 21 - in 18 + let* _ = Hermes.procedure_bytes client nsid (params_to_yojson params) input ~content_type:"application/vnd.ipld.car" in 22 19 Lwt.return () 23 20 end 21 +
+21 -6
pegasus/lexicons/com_atproto_repo_listMissingBlobs.ml
··· 1 1 (* generated from com.atproto.repo.listMissingBlobs *) 2 2 3 - type record_blob = {cid: string; record_uri: string [@key "recordUri"]} 3 + type record_blob = 4 + { 5 + cid: string; 6 + record_uri: string [@key "recordUri"]; 7 + } 4 8 [@@deriving yojson {strict= false}] 5 9 6 10 (** Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow. *) ··· 8 12 let nsid = "com.atproto.repo.listMissingBlobs" 9 13 10 14 type params = 11 - {limit: int option [@default None]; cursor: string option [@default None]} 12 - [@@deriving yojson {strict= false}] 15 + { 16 + limit: int option [@default None]; 17 + cursor: string option [@default None]; 18 + } 19 + [@@xrpc_query] 13 20 14 - type output = {cursor: string option [@default None]; blobs: record_blob list} 15 - [@@deriving yojson {strict= false}] 21 + type output = 22 + { 23 + cursor: string option [@default None]; 24 + blobs: record_blob list; 25 + } 26 + [@@deriving yojson {strict= false}] 16 27 17 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 28 + let call 29 + ?limit 30 + ?cursor 31 + (client : Hermes.client) : output Lwt.t = 18 32 let params : params = {limit; cursor} in 19 33 Hermes.query client nsid (params_to_yojson params) output_of_yojson 20 34 end 35 +
+28 -11
pegasus/lexicons/com_atproto_repo_listRecords.ml
··· 1 1 (* generated from com.atproto.repo.listRecords *) 2 2 3 - type record = {uri: string; cid: string; value: Yojson.Safe.t} 3 + type record = 4 + { 5 + uri: string; 6 + cid: string; 7 + value: Yojson.Safe.t; 8 + } 4 9 [@@deriving yojson {strict= false}] 5 10 6 11 (** List a range of records in a repository, matching a specific collection. Does not require auth. *) ··· 8 13 let nsid = "com.atproto.repo.listRecords" 9 14 10 15 type params = 11 - { repo: string 12 - ; collection: string 13 - ; limit: int option [@default None] 14 - ; cursor: string option [@default None] 15 - ; reverse: bool option [@default None] } 16 - [@@deriving yojson {strict= false}] 16 + { 17 + repo: string; 18 + collection: string; 19 + limit: int option [@default None]; 20 + cursor: string option [@default None]; 21 + reverse: bool option [@default None]; 22 + } 23 + [@@xrpc_query] 17 24 18 - type output = {cursor: string option [@default None]; records: record list} 19 - [@@deriving yojson {strict= false}] 25 + type output = 26 + { 27 + cursor: string option [@default None]; 28 + records: record list; 29 + } 30 + [@@deriving yojson {strict= false}] 20 31 21 - let call ~repo ~collection ?limit ?cursor ?reverse (client : Hermes.client) : 22 - output Lwt.t = 32 + let call 33 + ~repo 34 + ~collection 35 + ?limit 36 + ?cursor 37 + ?reverse 38 + (client : Hermes.client) : output Lwt.t = 23 39 let params : params = {repo; collection; limit; cursor; reverse} in 24 40 Hermes.query client nsid (params_to_yojson params) output_of_yojson 25 41 end 42 +
+27 -22
pegasus/lexicons/com_atproto_repo_putRecord.ml
··· 5 5 let nsid = "com.atproto.repo.putRecord" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { repo: string 13 - ; collection: string 14 - ; rkey: string 15 - ; validate: bool option [@default None] 16 - ; record: Yojson.Safe.t 17 - ; swap_record: string option [@key "swapRecord"] [@default None] 18 - ; swap_commit: string option [@key "swapCommit"] [@default None] } 11 + { 12 + repo: string; 13 + collection: string; 14 + rkey: string; 15 + validate: bool option [@default None]; 16 + record: Yojson.Safe.t; 17 + swap_record: string option [@key "swapRecord"] [@default None]; 18 + swap_commit: string option [@key "swapCommit"] [@default None]; 19 + } 19 20 [@@deriving yojson {strict= false}] 20 21 21 22 type output = 22 - { uri: string 23 - ; cid: string 24 - ; commit: Com_atproto_repo_defs.commit_meta option [@default None] 25 - ; validation_status: string option [@key "validationStatus"] [@default None] 26 - } 27 - [@@deriving yojson {strict= false}] 23 + { 24 + uri: string; 25 + cid: string; 26 + commit: Com_atproto_repo_defs.commit_meta option [@default None]; 27 + validation_status: string option [@key "validationStatus"] [@default None]; 28 + } 29 + [@@deriving yojson {strict= false}] 28 30 29 - let call ~repo ~collection ~rkey ?validate ~record ?swap_record ?swap_commit 31 + let call 32 + ~repo 33 + ~collection 34 + ~rkey 35 + ?validate 36 + ~record 37 + ?swap_record 38 + ?swap_commit 30 39 (client : Hermes.client) : output Lwt.t = 31 40 let params = () in 32 - let input = 33 - Some 34 - ( {repo; collection; rkey; validate; record; swap_record; swap_commit} 35 - |> input_to_yojson ) 36 - in 37 - Hermes.procedure client nsid (params_to_yojson params) input 38 - output_of_yojson 41 + let input = Some ({repo; collection; rkey; validate; record; swap_record; swap_commit} |> input_to_yojson) in 42 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 39 43 end 44 +
+7 -1
pegasus/lexicons/com_atproto_repo_strongRef.ml
··· 1 1 (* generated from com.atproto.repo.strongRef *) 2 2 3 - type main = {uri: string; cid: string} [@@deriving yojson {strict= false}] 3 + type main = 4 + { 5 + uri: string; 6 + cid: string; 7 + } 8 + [@@deriving yojson {strict= false}] 9 +
+10 -6
pegasus/lexicons/com_atproto_repo_uploadBlob.ml
··· 5 5 let nsid = "com.atproto.repo.uploadBlob" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type output = {blob: Hermes.blob} [@@deriving yojson {strict= false}] 10 + type output = 11 + { 12 + blob: Hermes.blob; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 - let call ?input (client : Hermes.client) : output Lwt.t = 16 + let call 17 + ?input 18 + (client : Hermes.client) : output Lwt.t = 14 19 let params = () in 15 - Hermes.procedure_blob client nsid (params_to_yojson params) 16 - (Bytes.of_string (Option.value input ~default:"")) 17 - ~content_type:"*/*" output_of_yojson 20 + Hermes.procedure_blob client nsid (params_to_yojson params) (Bytes.of_string (Option.value input ~default:"")) ~content_type:"*/*" output_of_yojson 18 21 end 22 +
+4 -5
pegasus/lexicons/com_atproto_server_activateAccount.ml
··· 5 5 let nsid = "com.atproto.server.activateAccount" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = unit 12 - 13 11 let output_of_yojson _ = Ok () 14 12 15 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 16 15 let params = () in 17 16 let input = None in 18 - Hermes.procedure client nsid (params_to_yojson params) input 19 - output_of_yojson 17 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 20 18 end 19 +
+15 -12
pegasus/lexicons/com_atproto_server_checkAccountStatus.ml
··· 5 5 let nsid = "com.atproto.server.checkAccountStatus" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { activated: bool 13 - ; valid_did: bool [@key "validDid"] 14 - ; repo_commit: string [@key "repoCommit"] 15 - ; repo_rev: string [@key "repoRev"] 16 - ; repo_blocks: int [@key "repoBlocks"] 17 - ; indexed_records: int [@key "indexedRecords"] 18 - ; private_state_values: int [@key "privateStateValues"] 19 - ; expected_blobs: int [@key "expectedBlobs"] 20 - ; imported_blobs: int [@key "importedBlobs"] } 21 - [@@deriving yojson {strict= false}] 11 + { 12 + activated: bool; 13 + valid_did: bool [@key "validDid"]; 14 + repo_commit: string [@key "repoCommit"]; 15 + repo_rev: string [@key "repoRev"]; 16 + repo_blocks: int [@key "repoBlocks"]; 17 + indexed_records: int [@key "indexedRecords"]; 18 + private_state_values: int [@key "privateStateValues"]; 19 + expected_blobs: int [@key "expectedBlobs"]; 20 + imported_blobs: int [@key "importedBlobs"]; 21 + } 22 + [@@deriving yojson {strict= false}] 22 23 23 - let call (client : Hermes.client) : output Lwt.t = 24 + let call 25 + (client : Hermes.client) : output Lwt.t = 24 26 Hermes.query client nsid (`Assoc []) output_of_yojson 25 27 end 28 +
+11 -6
pegasus/lexicons/com_atproto_server_confirmEmail.ml
··· 5 5 let nsid = "com.atproto.server.confirmEmail" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {email: string; token: string} 10 + type input = 11 + { 12 + email: string; 13 + token: string; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~email ~token (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~email 22 + ~token 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({email; token} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+32 -34
pegasus/lexicons/com_atproto_server_createAccount.ml
··· 5 5 let nsid = "com.atproto.server.createAccount" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { email: string option [@default None] 13 - ; handle: string 14 - ; did: string option [@default None] 15 - ; invite_code: string option [@key "inviteCode"] [@default None] 16 - ; verification_code: string option [@key "verificationCode"] [@default None] 17 - ; verification_phone: string option 18 - [@key "verificationPhone"] [@default None] 19 - ; password: string option [@default None] 20 - ; recovery_key: string option [@key "recoveryKey"] [@default None] 21 - ; plc_op: Yojson.Safe.t option [@key "plcOp"] [@default None] } 11 + { 12 + email: string option [@default None]; 13 + handle: string; 14 + did: string option [@default None]; 15 + invite_code: string option [@key "inviteCode"] [@default None]; 16 + verification_code: string option [@key "verificationCode"] [@default None]; 17 + verification_phone: string option [@key "verificationPhone"] [@default None]; 18 + password: string option [@default None]; 19 + recovery_key: string option [@key "recoveryKey"] [@default None]; 20 + plc_op: Yojson.Safe.t option [@key "plcOp"] [@default None]; 21 + } 22 22 [@@deriving yojson {strict= false}] 23 23 24 24 type output = 25 - { access_jwt: string [@key "accessJwt"] 26 - ; refresh_jwt: string [@key "refreshJwt"] 27 - ; handle: string 28 - ; did: string 29 - ; did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None] } 30 - [@@deriving yojson {strict= false}] 25 + { 26 + access_jwt: string [@key "accessJwt"]; 27 + refresh_jwt: string [@key "refreshJwt"]; 28 + handle: string; 29 + did: string; 30 + did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None]; 31 + } 32 + [@@deriving yojson {strict= false}] 31 33 32 - let call ?email ~handle ?did ?invite_code ?verification_code 33 - ?verification_phone ?password ?recovery_key ?plc_op 34 + let call 35 + ?email 36 + ~handle 37 + ?did 38 + ?invite_code 39 + ?verification_code 40 + ?verification_phone 41 + ?password 42 + ?recovery_key 43 + ?plc_op 34 44 (client : Hermes.client) : output Lwt.t = 35 45 let params = () in 36 - let input = 37 - Some 38 - ( { email 39 - ; handle 40 - ; did 41 - ; invite_code 42 - ; verification_code 43 - ; verification_phone 44 - ; password 45 - ; recovery_key 46 - ; plc_op } 47 - |> input_to_yojson ) 48 - in 49 - Hermes.procedure client nsid (params_to_yojson params) input 50 - output_of_yojson 46 + let input = Some ({email; handle; did; invite_code; verification_code; verification_phone; password; recovery_key; plc_op} |> input_to_yojson) in 47 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 51 48 end 49 +
+19 -10
pegasus/lexicons/com_atproto_server_createAppPassword.ml
··· 1 1 (* generated from com.atproto.server.createAppPassword *) 2 2 3 3 type app_password = 4 - { name: string 5 - ; password: string 6 - ; created_at: string [@key "createdAt"] 7 - ; privileged: bool option [@default None] } 4 + { 5 + name: string; 6 + password: string; 7 + created_at: string [@key "createdAt"]; 8 + privileged: bool option [@default None]; 9 + } 8 10 [@@deriving yojson {strict= false}] 9 11 10 12 (** Create an App Password. *) ··· 12 14 let nsid = "com.atproto.server.createAppPassword" 13 15 14 16 type params = unit 15 - 16 17 let params_to_yojson () = `Assoc [] 17 18 18 - type input = {name: string; privileged: bool option [@default None]} 19 + type input = 20 + { 21 + name: string; 22 + privileged: bool option [@default None]; 23 + } 19 24 [@@deriving yojson {strict= false}] 20 25 21 - type output = app_password [@@deriving yojson {strict= false}] 26 + type output = app_password 27 + [@@deriving yojson {strict= false}] 22 28 23 - let call ~name ?privileged (client : Hermes.client) : output Lwt.t = 29 + let call 30 + ~name 31 + ?privileged 32 + (client : Hermes.client) : output Lwt.t = 24 33 let params = () in 25 34 let input = Some ({name; privileged} |> input_to_yojson) in 26 - Hermes.procedure client nsid (params_to_yojson params) input 27 - output_of_yojson 35 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 28 36 end 37 +
+15 -7
pegasus/lexicons/com_atproto_server_createInviteCode.ml
··· 5 5 let nsid = "com.atproto.server.createInviteCode" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { use_count: int [@key "useCount"] 13 - ; for_account: string option [@key "forAccount"] [@default None] } 11 + { 12 + use_count: int [@key "useCount"]; 13 + for_account: string option [@key "forAccount"] [@default None]; 14 + } 14 15 [@@deriving yojson {strict= false}] 15 16 16 - type output = {code: string} [@@deriving yojson {strict= false}] 17 + type output = 18 + { 19 + code: string; 20 + } 21 + [@@deriving yojson {strict= false}] 17 22 18 - let call ~use_count ?for_account (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~use_count 25 + ?for_account 26 + (client : Hermes.client) : output Lwt.t = 19 27 let params = () in 20 28 let input = Some ({use_count; for_account} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 29 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 30 end 31 +
+23 -13
pegasus/lexicons/com_atproto_server_createInviteCodes.ml
··· 1 1 (* generated from com.atproto.server.createInviteCodes *) 2 2 3 - type account_codes = {account: string; codes: string list} 3 + type account_codes = 4 + { 5 + account: string; 6 + codes: string list; 7 + } 4 8 [@@deriving yojson {strict= false}] 5 9 6 10 (** Create invite codes. *) ··· 8 12 let nsid = "com.atproto.server.createInviteCodes" 9 13 10 14 type params = unit 11 - 12 15 let params_to_yojson () = `Assoc [] 13 16 14 17 type input = 15 - { code_count: int [@key "codeCount"] 16 - ; use_count: int [@key "useCount"] 17 - ; for_accounts: string list option [@key "forAccounts"] [@default None] } 18 + { 19 + code_count: int [@key "codeCount"]; 20 + use_count: int [@key "useCount"]; 21 + for_accounts: string list option [@key "forAccounts"] [@default None]; 22 + } 18 23 [@@deriving yojson {strict= false}] 19 24 20 - type output = {codes: account_codes list} [@@deriving yojson {strict= false}] 25 + type output = 26 + { 27 + codes: account_codes list; 28 + } 29 + [@@deriving yojson {strict= false}] 21 30 22 - let call ~code_count ~use_count ?for_accounts (client : Hermes.client) : 23 - output Lwt.t = 31 + let call 32 + ~code_count 33 + ~use_count 34 + ?for_accounts 35 + (client : Hermes.client) : output Lwt.t = 24 36 let params = () in 25 - let input = 26 - Some ({code_count; use_count; for_accounts} |> input_to_yojson) 27 - in 28 - Hermes.procedure client nsid (params_to_yojson params) input 29 - output_of_yojson 37 + let input = Some ({code_count; use_count; for_accounts} |> input_to_yojson) in 38 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 30 39 end 40 +
+27 -24
pegasus/lexicons/com_atproto_server_createSession.ml
··· 5 5 let nsid = "com.atproto.server.createSession" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { identifier: string 13 - ; password: string 14 - ; auth_factor_token: string option [@key "authFactorToken"] [@default None] 15 - ; allow_takendown: bool option [@key "allowTakendown"] [@default None] } 11 + { 12 + identifier: string; 13 + password: string; 14 + auth_factor_token: string option [@key "authFactorToken"] [@default None]; 15 + allow_takendown: bool option [@key "allowTakendown"] [@default None]; 16 + } 16 17 [@@deriving yojson {strict= false}] 17 18 18 19 type output = 19 - { access_jwt: string [@key "accessJwt"] 20 - ; refresh_jwt: string [@key "refreshJwt"] 21 - ; handle: string 22 - ; did: string 23 - ; did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None] 24 - ; email: string option [@default None] 25 - ; email_confirmed: bool option [@key "emailConfirmed"] [@default None] 26 - ; email_auth_factor: bool option [@key "emailAuthFactor"] [@default None] 27 - ; active: bool option [@default None] 28 - ; status: string option [@default None] } 29 - [@@deriving yojson {strict= false}] 20 + { 21 + access_jwt: string [@key "accessJwt"]; 22 + refresh_jwt: string [@key "refreshJwt"]; 23 + handle: string; 24 + did: string; 25 + did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None]; 26 + email: string option [@default None]; 27 + email_confirmed: bool option [@key "emailConfirmed"] [@default None]; 28 + email_auth_factor: bool option [@key "emailAuthFactor"] [@default None]; 29 + active: bool option [@default None]; 30 + status: string option [@default None]; 31 + } 32 + [@@deriving yojson {strict= false}] 30 33 31 - let call ~identifier ~password ?auth_factor_token ?allow_takendown 34 + let call 35 + ~identifier 36 + ~password 37 + ?auth_factor_token 38 + ?allow_takendown 32 39 (client : Hermes.client) : output Lwt.t = 33 40 let params = () in 34 - let input = 35 - Some 36 - ( {identifier; password; auth_factor_token; allow_takendown} 37 - |> input_to_yojson ) 38 - in 39 - Hermes.procedure client nsid (params_to_yojson params) input 40 - output_of_yojson 41 + let input = Some ({identifier; password; auth_factor_token; allow_takendown} |> input_to_yojson) in 42 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 41 43 end 44 +
+9 -6
pegasus/lexicons/com_atproto_server_deactivateAccount.ml
··· 5 5 let nsid = "com.atproto.server.deactivateAccount" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {delete_after: string option [@key "deleteAfter"] [@default None]} 10 + type input = 11 + { 12 + delete_after: string option [@key "deleteAfter"] [@default None]; 13 + } 12 14 [@@deriving yojson {strict= false}] 13 15 14 16 type output = unit 15 - 16 17 let output_of_yojson _ = Ok () 17 18 18 - let call ?delete_after (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ?delete_after 21 + (client : Hermes.client) : output Lwt.t = 19 22 let params = () in 20 23 let input = Some ({delete_after} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 25 end 26 +
+14 -8
pegasus/lexicons/com_atproto_server_defs.ml
··· 1 1 (* generated from com.atproto.server.defs *) 2 2 3 3 type invite_code_use = 4 - {used_by: string [@key "usedBy"]; used_at: string [@key "usedAt"]} 4 + { 5 + used_by: string [@key "usedBy"]; 6 + used_at: string [@key "usedAt"]; 7 + } 5 8 [@@deriving yojson {strict= false}] 6 9 7 10 type invite_code = 8 - { code: string 9 - ; available: int 10 - ; disabled: bool 11 - ; for_account: string [@key "forAccount"] 12 - ; created_by: string [@key "createdBy"] 13 - ; created_at: string [@key "createdAt"] 14 - ; uses: invite_code_use list } 11 + { 12 + code: string; 13 + available: int; 14 + disabled: bool; 15 + for_account: string [@key "forAccount"]; 16 + created_by: string [@key "createdBy"]; 17 + created_at: string [@key "createdAt"]; 18 + uses: invite_code_use list; 19 + } 15 20 [@@deriving yojson {strict= false}] 21 +
+13 -6
pegasus/lexicons/com_atproto_server_deleteAccount.ml
··· 5 5 let nsid = "com.atproto.server.deleteAccount" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {did: string; password: string; token: string} 10 + type input = 11 + { 12 + did: string; 13 + password: string; 14 + token: string; 15 + } 12 16 [@@deriving yojson {strict= false}] 13 17 14 18 type output = unit 15 - 16 19 let output_of_yojson _ = Ok () 17 20 18 - let call ~did ~password ~token (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ~did 23 + ~password 24 + ~token 25 + (client : Hermes.client) : output Lwt.t = 19 26 let params = () in 20 27 let input = Some ({did; password; token} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 28 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 29 end 30 +
+5 -6
pegasus/lexicons/com_atproto_server_deleteSession.ml
··· 1 1 (* generated from com.atproto.server.deleteSession *) 2 2 3 - (** Delete the current session. Requires auth. *) 3 + (** Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt'). *) 4 4 module Main = struct 5 5 let nsid = "com.atproto.server.deleteSession" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = unit 12 - 13 11 let output_of_yojson _ = Ok () 14 12 15 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 16 15 let params = () in 17 16 let input = None in 18 - Hermes.procedure client nsid (params_to_yojson params) input 19 - output_of_yojson 17 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 20 18 end 19 +
+20 -14
pegasus/lexicons/com_atproto_server_describeServer.ml
··· 1 1 (* generated from com.atproto.server.describeServer *) 2 2 3 - type contact = {email: string option [@default None]} 3 + type contact = 4 + { 5 + email: string option [@default None]; 6 + } 4 7 [@@deriving yojson {strict= false}] 5 8 6 9 type links = 7 - { privacy_policy: string option [@key "privacyPolicy"] [@default None] 8 - ; terms_of_service: string option [@key "termsOfService"] [@default None] } 10 + { 11 + privacy_policy: string option [@key "privacyPolicy"] [@default None]; 12 + terms_of_service: string option [@key "termsOfService"] [@default None]; 13 + } 9 14 [@@deriving yojson {strict= false}] 10 15 11 16 (** Describes the server's account creation requirements and capabilities. Implemented by PDS. *) ··· 13 18 let nsid = "com.atproto.server.describeServer" 14 19 15 20 type params = unit 16 - 17 21 let params_to_yojson () = `Assoc [] 18 22 19 23 type output = 20 - { invite_code_required: bool option 21 - [@key "inviteCodeRequired"] [@default None] 22 - ; phone_verification_required: bool option 23 - [@key "phoneVerificationRequired"] [@default None] 24 - ; available_user_domains: string list [@key "availableUserDomains"] 25 - ; links: links option [@default None] 26 - ; contact: contact option [@default None] 27 - ; did: string } 28 - [@@deriving yojson {strict= false}] 24 + { 25 + invite_code_required: bool option [@key "inviteCodeRequired"] [@default None]; 26 + phone_verification_required: bool option [@key "phoneVerificationRequired"] [@default None]; 27 + available_user_domains: string list [@key "availableUserDomains"]; 28 + links: links option [@default None]; 29 + contact: contact option [@default None]; 30 + did: string; 31 + } 32 + [@@deriving yojson {strict= false}] 29 33 30 - let call (client : Hermes.client) : output Lwt.t = 34 + let call 35 + (client : Hermes.client) : output Lwt.t = 31 36 Hermes.query client nsid (`Assoc []) output_of_yojson 32 37 end 38 +
+15 -7
pegasus/lexicons/com_atproto_server_getAccountInviteCodes.ml
··· 5 5 let nsid = "com.atproto.server.getAccountInviteCodes" 6 6 7 7 type params = 8 - { include_used: bool option [@key "includeUsed"] [@default None] 9 - ; create_available: bool option [@key "createAvailable"] [@default None] } 10 - [@@deriving yojson {strict= false}] 8 + { 9 + include_used: bool option [@key "includeUsed"] [@default None]; 10 + create_available: bool option [@key "createAvailable"] [@default None]; 11 + } 12 + [@@xrpc_query] 11 13 12 - type output = {codes: Com_atproto_server_defs.invite_code list} 13 - [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + codes: Com_atproto_server_defs.invite_code list; 17 + } 18 + [@@deriving yojson {strict= false}] 14 19 15 - let call ?include_used ?create_available (client : Hermes.client) : 16 - output Lwt.t = 20 + let call 21 + ?include_used 22 + ?create_available 23 + (client : Hermes.client) : output Lwt.t = 17 24 let params : params = {include_used; create_available} in 18 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 26 end 27 +
+17 -6
pegasus/lexicons/com_atproto_server_getServiceAuth.ml
··· 5 5 let nsid = "com.atproto.server.getServiceAuth" 6 6 7 7 type params = 8 - { aud: string 9 - ; exp: int option [@default None] 10 - ; lxm: string option [@default None] } 11 - [@@deriving yojson {strict= false}] 8 + { 9 + aud: string; 10 + exp: int option [@default None]; 11 + lxm: string option [@default None]; 12 + } 13 + [@@xrpc_query] 12 14 13 - type output = {token: string} [@@deriving yojson {strict= false}] 15 + type output = 16 + { 17 + token: string; 18 + } 19 + [@@deriving yojson {strict= false}] 14 20 15 - let call ~aud ?exp ?lxm (client : Hermes.client) : output Lwt.t = 21 + let call 22 + ~aud 23 + ?exp 24 + ?lxm 25 + (client : Hermes.client) : output Lwt.t = 16 26 let params : params = {aud; exp; lxm} in 17 27 Hermes.query client nsid (params_to_yojson params) output_of_yojson 18 28 end 29 +
+14 -11
pegasus/lexicons/com_atproto_server_getSession.ml
··· 5 5 let nsid = "com.atproto.server.getSession" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { handle: string 13 - ; did: string 14 - ; email: string option [@default None] 15 - ; email_confirmed: bool option [@key "emailConfirmed"] [@default None] 16 - ; email_auth_factor: bool option [@key "emailAuthFactor"] [@default None] 17 - ; did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None] 18 - ; active: bool option [@default None] 19 - ; status: string option [@default None] } 20 - [@@deriving yojson {strict= false}] 11 + { 12 + handle: string; 13 + did: string; 14 + did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None]; 15 + email: string option [@default None]; 16 + email_confirmed: bool option [@key "emailConfirmed"] [@default None]; 17 + email_auth_factor: bool option [@key "emailAuthFactor"] [@default None]; 18 + active: bool option [@default None]; 19 + status: string option [@default None]; 20 + } 21 + [@@deriving yojson {strict= false}] 21 22 22 - let call (client : Hermes.client) : output Lwt.t = 23 + let call 24 + (client : Hermes.client) : output Lwt.t = 23 25 Hermes.query client nsid (`Assoc []) output_of_yojson 24 26 end 27 +
+13 -7
pegasus/lexicons/com_atproto_server_listAppPasswords.ml
··· 1 1 (* generated from com.atproto.server.listAppPasswords *) 2 2 3 3 type app_password = 4 - { name: string 5 - ; created_at: string [@key "createdAt"] 6 - ; privileged: bool option [@default None] } 4 + { 5 + name: string; 6 + created_at: string [@key "createdAt"]; 7 + privileged: bool option [@default None]; 8 + } 7 9 [@@deriving yojson {strict= false}] 8 10 9 11 (** List all App Passwords. *) ··· 11 13 let nsid = "com.atproto.server.listAppPasswords" 12 14 13 15 type params = unit 14 - 15 16 let params_to_yojson () = `Assoc [] 16 17 17 - type output = {passwords: app_password list} 18 - [@@deriving yojson {strict= false}] 18 + type output = 19 + { 20 + passwords: app_password list; 21 + } 22 + [@@deriving yojson {strict= false}] 19 23 20 - let call (client : Hermes.client) : output Lwt.t = 24 + let call 25 + (client : Hermes.client) : output Lwt.t = 21 26 Hermes.query client nsid (`Assoc []) output_of_yojson 22 27 end 28 +
+17 -12
pegasus/lexicons/com_atproto_server_refreshSession.ml
··· 5 5 let nsid = "com.atproto.server.refreshSession" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { access_jwt: string [@key "accessJwt"] 13 - ; refresh_jwt: string [@key "refreshJwt"] 14 - ; handle: string 15 - ; did: string 16 - ; did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None] 17 - ; active: bool option [@default None] 18 - ; status: string option [@default None] } 19 - [@@deriving yojson {strict= false}] 11 + { 12 + access_jwt: string [@key "accessJwt"]; 13 + refresh_jwt: string [@key "refreshJwt"]; 14 + handle: string; 15 + did: string; 16 + did_doc: Yojson.Safe.t option [@key "didDoc"] [@default None]; 17 + email: string option [@default None]; 18 + email_confirmed: bool option [@key "emailConfirmed"] [@default None]; 19 + email_auth_factor: bool option [@key "emailAuthFactor"] [@default None]; 20 + active: bool option [@default None]; 21 + status: string option [@default None]; 22 + } 23 + [@@deriving yojson {strict= false}] 20 24 21 - let call (client : Hermes.client) : output Lwt.t = 25 + let call 26 + (client : Hermes.client) : output Lwt.t = 22 27 let params = () in 23 28 let input = None in 24 - Hermes.procedure client nsid (params_to_yojson params) input 25 - output_of_yojson 29 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 26 30 end 31 +
+4 -5
pegasus/lexicons/com_atproto_server_requestAccountDelete.ml
··· 5 5 let nsid = "com.atproto.server.requestAccountDelete" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = unit 12 - 13 11 let output_of_yojson _ = Ok () 14 12 15 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 16 15 let params = () in 17 16 let input = None in 18 - Hermes.procedure client nsid (params_to_yojson params) input 19 - output_of_yojson 17 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 20 18 end 19 +
+4 -5
pegasus/lexicons/com_atproto_server_requestEmailConfirmation.ml
··· 5 5 let nsid = "com.atproto.server.requestEmailConfirmation" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = unit 12 - 13 11 let output_of_yojson _ = Ok () 14 12 15 - let call (client : Hermes.client) : output Lwt.t = 13 + let call 14 + (client : Hermes.client) : output Lwt.t = 16 15 let params = () in 17 16 let input = None in 18 - Hermes.procedure client nsid (params_to_yojson params) input 19 - output_of_yojson 17 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 20 18 end 19 +
+9 -6
pegasus/lexicons/com_atproto_server_requestEmailUpdate.ml
··· 5 5 let nsid = "com.atproto.server.requestEmailUpdate" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type output = {token_required: bool [@key "tokenRequired"]} 12 - [@@deriving yojson {strict= false}] 10 + type output = 11 + { 12 + token_required: bool [@key "tokenRequired"]; 13 + } 14 + [@@deriving yojson {strict= false}] 13 15 14 - let call (client : Hermes.client) : output Lwt.t = 16 + let call 17 + (client : Hermes.client) : output Lwt.t = 15 18 let params = () in 16 19 let input = None in 17 - Hermes.procedure client nsid (params_to_yojson params) input 18 - output_of_yojson 20 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 19 21 end 22 +
+10 -6
pegasus/lexicons/com_atproto_server_requestPasswordReset.ml
··· 5 5 let nsid = "com.atproto.server.requestPasswordReset" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {email: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + email: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~email (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~email 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({email} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+14 -7
pegasus/lexicons/com_atproto_server_reserveSigningKey.ml
··· 5 5 let nsid = "com.atproto.server.reserveSigningKey" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {did: string option [@default None]} 10 + type input = 11 + { 12 + did: string option [@default None]; 13 + } 12 14 [@@deriving yojson {strict= false}] 13 15 14 - type output = {signing_key: string [@key "signingKey"]} 15 - [@@deriving yojson {strict= false}] 16 + type output = 17 + { 18 + signing_key: string [@key "signingKey"]; 19 + } 20 + [@@deriving yojson {strict= false}] 16 21 17 - let call ?did (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ?did 24 + (client : Hermes.client) : output Lwt.t = 18 25 let params = () in 19 26 let input = Some ({did} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 27 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 28 end 29 +
+11 -6
pegasus/lexicons/com_atproto_server_resetPassword.ml
··· 5 5 let nsid = "com.atproto.server.resetPassword" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {token: string; password: string} 10 + type input = 11 + { 12 + token: string; 13 + password: string; 14 + } 12 15 [@@deriving yojson {strict= false}] 13 16 14 17 type output = unit 15 - 16 18 let output_of_yojson _ = Ok () 17 19 18 - let call ~token ~password (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~token 22 + ~password 23 + (client : Hermes.client) : output Lwt.t = 19 24 let params = () in 20 25 let input = Some ({token; password} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 26 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 27 end 28 +
+10 -6
pegasus/lexicons/com_atproto_server_revokeAppPassword.ml
··· 5 5 let nsid = "com.atproto.server.revokeAppPassword" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {name: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + name: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~name (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~name 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({name} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+12 -9
pegasus/lexicons/com_atproto_server_updateEmail.ml
··· 5 5 let nsid = "com.atproto.server.updateEmail" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type input = 12 - { email: string 13 - ; email_auth_factor: bool option [@key "emailAuthFactor"] [@default None] 14 - ; token: string option [@default None] } 11 + { 12 + email: string; 13 + email_auth_factor: bool option [@key "emailAuthFactor"] [@default None]; 14 + token: string option [@default None]; 15 + } 15 16 [@@deriving yojson {strict= false}] 16 17 17 18 type output = unit 18 - 19 19 let output_of_yojson _ = Ok () 20 20 21 - let call ~email ?email_auth_factor ?token (client : Hermes.client) : 22 - output Lwt.t = 21 + let call 22 + ~email 23 + ?email_auth_factor 24 + ?token 25 + (client : Hermes.client) : output Lwt.t = 23 26 let params = () in 24 27 let input = Some ({email; email_auth_factor; token} |> input_to_yojson) in 25 - Hermes.procedure client nsid (params_to_yojson params) input 26 - output_of_yojson 28 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 27 29 end 30 +
+3 -6
pegasus/lexicons/com_atproto_sync_defs.ml
··· 2 2 3 3 (** string type with known values *) 4 4 type host_status = string 5 - 6 5 let host_status_of_yojson = function 7 - | `String s -> 8 - Ok s 9 - | _ -> 10 - Error "host_status: expected string" 6 + | `String s -> Ok s 7 + | _ -> Error "host_status: expected string" 8 + let host_status_to_yojson s = `String s 11 9 12 - let host_status_to_yojson s = `String s
+11 -2
pegasus/lexicons/com_atproto_sync_getBlob.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getBlob" 6 6 7 - type params = {did: string; cid: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + cid: string; 11 + } 12 + [@@xrpc_query] 8 13 9 14 (** raw bytes output with content type *) 10 15 type output = bytes * string 11 16 12 - let call ~did ~cid (client : Hermes.client) : output Lwt.t = 17 + let call 18 + ~did 19 + ~cid 20 + (client : Hermes.client) : output Lwt.t = 13 21 let params : params = {did; cid} in 14 22 Hermes.query_bytes client nsid (params_to_yojson params) 15 23 end 24 +
+10 -6
pegasus/lexicons/com_atproto_sync_getBlocks.ml
··· 5 5 let nsid = "com.atproto.sync.getBlocks" 6 6 7 7 type params = 8 - { did: string 9 - ; cids: string list 10 - [@of_yojson Hermes_util.query_string_list_of_yojson] 11 - [@to_yojson Hermes_util.query_string_list_to_yojson] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + did: string; 10 + cids: string list; 11 + } 12 + [@@xrpc_query] 13 13 14 14 (** raw bytes output with content type *) 15 15 type output = bytes * string 16 16 17 - let call ~did ~cids (client : Hermes.client) : output Lwt.t = 17 + let call 18 + ~did 19 + ~cids 20 + (client : Hermes.client) : output Lwt.t = 18 21 let params : params = {did; cids} in 19 22 Hermes.query_bytes client nsid (params_to_yojson params) 20 23 end 24 +
+9 -2
pegasus/lexicons/com_atproto_sync_getCheckout.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getCheckout" 6 6 7 - type params = {did: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 (** raw bytes output with content type *) 10 14 type output = bytes * string 11 15 12 - let call ~did (client : Hermes.client) : output Lwt.t = 16 + let call 17 + ~did 18 + (client : Hermes.client) : output Lwt.t = 13 19 let params : params = {did} in 14 20 Hermes.query_bytes client nsid (params_to_yojson params) 15 21 end 22 +
+14 -3
pegasus/lexicons/com_atproto_sync_getHead.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getHead" 6 6 7 - type params = {did: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + } 11 + [@@xrpc_query] 8 12 9 - type output = {root: string} [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + root: string; 16 + } 17 + [@@deriving yojson {strict= false}] 10 18 11 - let call ~did (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~did 21 + (client : Hermes.client) : output Lwt.t = 12 22 let params : params = {did} in 13 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 14 24 end 25 +
+16 -7
pegasus/lexicons/com_atproto_sync_getHostStatus.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getHostStatus" 6 6 7 - type params = {hostname: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + hostname: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = 10 - { hostname: string 11 - ; seq: int option [@default None] 12 - ; account_count: int option [@key "accountCount"] [@default None] 13 - ; status: Com_atproto_sync_defs.host_status option [@default None] } 14 - [@@deriving yojson {strict= false}] 14 + { 15 + hostname: string; 16 + seq: int option [@default None]; 17 + account_count: int option [@key "accountCount"] [@default None]; 18 + status: Com_atproto_sync_defs.host_status option [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 15 21 16 - let call ~hostname (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~hostname 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {hostname} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+15 -3
pegasus/lexicons/com_atproto_sync_getLatestCommit.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getLatestCommit" 6 6 7 - type params = {did: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + } 11 + [@@xrpc_query] 8 12 9 - type output = {cid: string; rev: string} [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + cid: string; 16 + rev: string; 17 + } 18 + [@@deriving yojson {strict= false}] 10 19 11 - let call ~did (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~did 22 + (client : Hermes.client) : output Lwt.t = 12 23 let params : params = {did} in 13 24 Hermes.query client nsid (params_to_yojson params) output_of_yojson 14 25 end 26 +
+13 -3
pegasus/lexicons/com_atproto_sync_getRecord.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getRecord" 6 6 7 - type params = {did: string; collection: string; rkey: string} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + collection: string; 11 + rkey: string; 12 + } 13 + [@@xrpc_query] 9 14 10 15 (** raw bytes output with content type *) 11 16 type output = bytes * string 12 17 13 - let call ~did ~collection ~rkey (client : Hermes.client) : output Lwt.t = 18 + let call 19 + ~did 20 + ~collection 21 + ~rkey 22 + (client : Hermes.client) : output Lwt.t = 14 23 let params : params = {did; collection; rkey} in 15 24 Hermes.query_bytes client nsid (params_to_yojson params) 16 25 end 26 +
+11 -3
pegasus/lexicons/com_atproto_sync_getRepo.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getRepo" 6 6 7 - type params = {did: string; since: string option [@default None]} 8 - [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + since: string option [@default None]; 11 + } 12 + [@@xrpc_query] 9 13 10 14 (** raw bytes output with content type *) 11 15 type output = bytes * string 12 16 13 - let call ~did ?since (client : Hermes.client) : output Lwt.t = 17 + let call 18 + ~did 19 + ?since 20 + (client : Hermes.client) : output Lwt.t = 14 21 let params : params = {did; since} in 15 22 Hermes.query_bytes client nsid (params_to_yojson params) 16 23 end 24 +
+16 -7
pegasus/lexicons/com_atproto_sync_getRepoStatus.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.sync.getRepoStatus" 6 6 7 - type params = {did: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + did: string; 10 + } 11 + [@@xrpc_query] 8 12 9 13 type output = 10 - { did: string 11 - ; active: bool 12 - ; status: string option [@default None] 13 - ; rev: string option [@default None] } 14 - [@@deriving yojson {strict= false}] 14 + { 15 + did: string; 16 + active: bool; 17 + status: string option [@default None]; 18 + rev: string option [@default None]; 19 + } 20 + [@@deriving yojson {strict= false}] 15 21 16 - let call ~did (client : Hermes.client) : output Lwt.t = 22 + let call 23 + ~did 24 + (client : Hermes.client) : output Lwt.t = 17 25 let params : params = {did} in 18 26 Hermes.query client nsid (params_to_yojson params) output_of_yojson 19 27 end 28 +
+20 -8
pegasus/lexicons/com_atproto_sync_listBlobs.ml
··· 5 5 let nsid = "com.atproto.sync.listBlobs" 6 6 7 7 type params = 8 - { did: string 9 - ; since: string option [@default None] 10 - ; limit: int option [@default None] 11 - ; cursor: string option [@default None] } 12 - [@@deriving yojson {strict= false}] 8 + { 9 + did: string; 10 + since: string option [@default None]; 11 + limit: int option [@default None]; 12 + cursor: string option [@default None]; 13 + } 14 + [@@xrpc_query] 13 15 14 - type output = {cursor: string option [@default None]; cids: string list} 15 - [@@deriving yojson {strict= false}] 16 + type output = 17 + { 18 + cursor: string option [@default None]; 19 + cids: string list; 20 + } 21 + [@@deriving yojson {strict= false}] 16 22 17 - let call ~did ?since ?limit ?cursor (client : Hermes.client) : output Lwt.t = 23 + let call 24 + ~did 25 + ?since 26 + ?limit 27 + ?cursor 28 + (client : Hermes.client) : output Lwt.t = 18 29 let params : params = {did; since; limit; cursor} in 19 30 Hermes.query client nsid (params_to_yojson params) output_of_yojson 20 31 end 32 +
+22 -9
pegasus/lexicons/com_atproto_sync_listHosts.ml
··· 1 1 (* generated from com.atproto.sync.listHosts *) 2 2 3 3 type host = 4 - { hostname: string 5 - ; seq: int option [@default None] 6 - ; account_count: int option [@key "accountCount"] [@default None] 7 - ; status: Com_atproto_sync_defs.host_status option [@default None] } 4 + { 5 + hostname: string; 6 + seq: int option [@default None]; 7 + account_count: int option [@key "accountCount"] [@default None]; 8 + status: Com_atproto_sync_defs.host_status option [@default None]; 9 + } 8 10 [@@deriving yojson {strict= false}] 9 11 10 12 (** Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays. *) ··· 12 14 let nsid = "com.atproto.sync.listHosts" 13 15 14 16 type params = 15 - {limit: int option [@default None]; cursor: string option [@default None]} 16 - [@@deriving yojson {strict= false}] 17 + { 18 + limit: int option [@default None]; 19 + cursor: string option [@default None]; 20 + } 21 + [@@xrpc_query] 17 22 18 - type output = {cursor: string option [@default None]; hosts: host list} 19 - [@@deriving yojson {strict= false}] 23 + type output = 24 + { 25 + cursor: string option [@default None]; 26 + hosts: host list; 27 + } 28 + [@@deriving yojson {strict= false}] 20 29 21 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 30 + let call 31 + ?limit 32 + ?cursor 33 + (client : Hermes.client) : output Lwt.t = 22 34 let params : params = {limit; cursor} in 23 35 Hermes.query client nsid (params_to_yojson params) output_of_yojson 24 36 end 37 +
+23 -10
pegasus/lexicons/com_atproto_sync_listRepos.ml
··· 1 1 (* generated from com.atproto.sync.listRepos *) 2 2 3 3 type repo = 4 - { did: string 5 - ; head: string 6 - ; rev: string 7 - ; active: bool option [@default None] 8 - ; status: string option [@default None] } 4 + { 5 + did: string; 6 + head: string; 7 + rev: string; 8 + active: bool option [@default None]; 9 + status: string option [@default None]; 10 + } 9 11 [@@deriving yojson {strict= false}] 10 12 11 13 (** Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay. *) ··· 13 15 let nsid = "com.atproto.sync.listRepos" 14 16 15 17 type params = 16 - {limit: int option [@default None]; cursor: string option [@default None]} 17 - [@@deriving yojson {strict= false}] 18 + { 19 + limit: int option [@default None]; 20 + cursor: string option [@default None]; 21 + } 22 + [@@xrpc_query] 18 23 19 - type output = {cursor: string option [@default None]; repos: repo list} 20 - [@@deriving yojson {strict= false}] 24 + type output = 25 + { 26 + cursor: string option [@default None]; 27 + repos: repo list; 28 + } 29 + [@@deriving yojson {strict= false}] 21 30 22 - let call ?limit ?cursor (client : Hermes.client) : output Lwt.t = 31 + let call 32 + ?limit 33 + ?cursor 34 + (client : Hermes.client) : output Lwt.t = 23 35 let params : params = {limit; cursor} in 24 36 Hermes.query client nsid (params_to_yojson params) output_of_yojson 25 37 end 38 +
+23 -8
pegasus/lexicons/com_atproto_sync_listReposByCollection.ml
··· 1 1 (* generated from com.atproto.sync.listReposByCollection *) 2 2 3 - type repo = {did: string} [@@deriving yojson {strict= false}] 3 + type repo = 4 + { 5 + did: string; 6 + } 7 + [@@deriving yojson {strict= false}] 4 8 5 9 (** Enumerates all the DIDs which have records with the given collection NSID. *) 6 10 module Main = struct 7 11 let nsid = "com.atproto.sync.listReposByCollection" 8 12 9 13 type params = 10 - { collection: string 11 - ; limit: int option [@default None] 12 - ; cursor: string option [@default None] } 13 - [@@deriving yojson {strict= false}] 14 + { 15 + collection: string; 16 + limit: int option [@default None]; 17 + cursor: string option [@default None]; 18 + } 19 + [@@xrpc_query] 14 20 15 - type output = {cursor: string option [@default None]; repos: repo list} 16 - [@@deriving yojson {strict= false}] 21 + type output = 22 + { 23 + cursor: string option [@default None]; 24 + repos: repo list; 25 + } 26 + [@@deriving yojson {strict= false}] 17 27 18 - let call ~collection ?limit ?cursor (client : Hermes.client) : output Lwt.t = 28 + let call 29 + ~collection 30 + ?limit 31 + ?cursor 32 + (client : Hermes.client) : output Lwt.t = 19 33 let params : params = {collection; limit; cursor} in 20 34 Hermes.query client nsid (params_to_yojson params) output_of_yojson 21 35 end 36 +
+10 -6
pegasus/lexicons/com_atproto_sync_notifyOfUpdate.ml
··· 5 5 let nsid = "com.atproto.sync.notifyOfUpdate" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {hostname: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + hostname: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~hostname (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~hostname 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({hostname} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+10 -6
pegasus/lexicons/com_atproto_sync_requestCrawl.ml
··· 5 5 let nsid = "com.atproto.sync.requestCrawl" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {hostname: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + hostname: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~hostname (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~hostname 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({hostname} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+12 -9
pegasus/lexicons/com_atproto_temp_addReservedHandle.ml
··· 5 5 let nsid = "com.atproto.temp.addReservedHandle" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {handle: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + handle: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 17 + let output_of_yojson _ = Ok () 18 + let output_to_yojson () = `Assoc [] 14 19 15 - let output_of_yojson _ = Ok () 16 - 17 - let output_to_yojson () = `Assoc [] 18 - 19 - let call ~handle (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ~handle 22 + (client : Hermes.client) : output Lwt.t = 20 23 let params = () in 21 24 let input = Some ({handle} |> input_to_yojson) in 22 - Hermes.procedure client nsid (params_to_yojson params) input 23 - output_of_yojson 25 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 24 26 end 27 +
+54 -57
pegasus/lexicons/com_atproto_temp_checkHandleAvailability.ml
··· 1 1 (* generated from com.atproto.temp.checkHandleAvailability *) 2 2 3 - type suggestion = {handle: string; method_: string [@key "method"]} 3 + type suggestion = 4 + { 5 + handle: string; 6 + method_: string [@key "method"]; 7 + } 4 8 [@@deriving yojson {strict= false}] 5 9 6 - type result_unavailable = {suggestions: suggestion list} 10 + type result_unavailable = 11 + { 12 + suggestions: suggestion list; 13 + } 7 14 [@@deriving yojson {strict= false}] 8 15 9 16 type result_available = unit 10 - 11 17 let result_available_of_yojson _ = Ok () 12 - 13 18 let result_available_to_yojson () = `Assoc [] 14 19 15 20 (** Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions. *) ··· 17 22 let nsid = "com.atproto.temp.checkHandleAvailability" 18 23 19 24 type params = 20 - { handle: string 21 - ; email: string option [@default None] 22 - ; birth_date: string option [@key "birthDate"] [@default None] } 23 - [@@deriving yojson {strict= false}] 25 + { 26 + handle: string; 27 + email: string option [@default None]; 28 + birth_date: string option [@key "birthDate"] [@default None]; 29 + } 30 + [@@xrpc_query] 24 31 25 32 type result_ = 26 - | ResultAvailable of result_available 27 - | ResultUnavailable of result_unavailable 28 - | Unknown of Yojson.Safe.t 33 + | ResultAvailable of result_available 34 + | ResultUnavailable of result_unavailable 35 + | Unknown of Yojson.Safe.t 29 36 30 - let result__of_yojson json = 31 - let open Yojson.Safe.Util in 32 - try 33 - match json |> member "$type" |> to_string with 34 - | "com.atproto.temp.checkHandleAvailability#resultAvailable" -> ( 35 - match result_available_of_yojson json with 36 - | Ok v -> 37 - Ok (ResultAvailable v) 38 - | Error e -> 39 - Error e ) 40 - | "com.atproto.temp.checkHandleAvailability#resultUnavailable" -> ( 41 - match result_unavailable_of_yojson json with 42 - | Ok v -> 43 - Ok (ResultUnavailable v) 44 - | Error e -> 45 - Error e ) 46 - | _ -> 47 - Ok (Unknown json) 48 - with _ -> Error "failed to parse union" 37 + let result__of_yojson json = 38 + let open Yojson.Safe.Util in 39 + try 40 + match json |> member "$type" |> to_string with 41 + | "com.atproto.temp.checkHandleAvailability#resultAvailable" -> 42 + (match result_available_of_yojson json with 43 + | Ok v -> Ok (ResultAvailable v) 44 + | Error e -> Error e) 45 + | "com.atproto.temp.checkHandleAvailability#resultUnavailable" -> 46 + (match result_unavailable_of_yojson json with 47 + | Ok v -> Ok (ResultUnavailable v) 48 + | Error e -> Error e) 49 + | _ -> Ok (Unknown json) 50 + with _ -> Error "failed to parse union" 49 51 50 - let result__to_yojson = function 51 - | ResultAvailable v -> ( 52 - match result_available_to_yojson v with 53 - | `Assoc fields -> 54 - `Assoc 55 - ( ( "$type" 56 - , `String 57 - "com.atproto.temp.checkHandleAvailability#resultAvailable" ) 58 - :: fields ) 59 - | other -> 60 - other ) 61 - | ResultUnavailable v -> ( 62 - match result_unavailable_to_yojson v with 63 - | `Assoc fields -> 64 - `Assoc 65 - ( ( "$type" 66 - , `String 67 - "com.atproto.temp.checkHandleAvailability#resultUnavailable" 68 - ) 69 - :: fields ) 70 - | other -> 71 - other ) 72 - | Unknown j -> 73 - j 52 + let result__to_yojson = function 53 + | ResultAvailable v -> 54 + (match result_available_to_yojson v with 55 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.temp.checkHandleAvailability#resultAvailable") :: fields) 56 + | other -> other) 57 + | ResultUnavailable v -> 58 + (match result_unavailable_to_yojson v with 59 + | `Assoc fields -> `Assoc (("$type", `String "com.atproto.temp.checkHandleAvailability#resultUnavailable") :: fields) 60 + | other -> other) 61 + | Unknown j -> j 74 62 75 - type output = {handle: string; result_: result_ [@key "result"]} 76 - [@@deriving yojson {strict= false}] 63 + type output = 64 + { 65 + handle: string; 66 + result_: result_ [@key "result"]; 67 + } 68 + [@@deriving yojson {strict= false}] 77 69 78 - let call ~handle ?email ?birth_date (client : Hermes.client) : output Lwt.t = 70 + let call 71 + ~handle 72 + ?email 73 + ?birth_date 74 + (client : Hermes.client) : output Lwt.t = 79 75 let params : params = {handle; email; birth_date} in 80 76 Hermes.query client nsid (params_to_yojson params) output_of_yojson 81 77 end 78 +
+9 -6
pegasus/lexicons/com_atproto_temp_checkSignupQueue.ml
··· 5 5 let nsid = "com.atproto.temp.checkSignupQueue" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 10 type output = 12 - { activated: bool 13 - ; place_in_queue: int option [@key "placeInQueue"] [@default None] 14 - ; estimated_time_ms: int option [@key "estimatedTimeMs"] [@default None] } 15 - [@@deriving yojson {strict= false}] 11 + { 12 + activated: bool; 13 + place_in_queue: int option [@key "placeInQueue"] [@default None]; 14 + estimated_time_ms: int option [@key "estimatedTimeMs"] [@default None]; 15 + } 16 + [@@deriving yojson {strict= false}] 16 17 17 - let call (client : Hermes.client) : output Lwt.t = 18 + let call 19 + (client : Hermes.client) : output Lwt.t = 18 20 Hermes.query client nsid (`Assoc []) output_of_yojson 19 21 end 22 +
+14 -3
pegasus/lexicons/com_atproto_temp_dereferenceScope.ml
··· 4 4 module Main = struct 5 5 let nsid = "com.atproto.temp.dereferenceScope" 6 6 7 - type params = {scope: string} [@@deriving yojson {strict= false}] 7 + type params = 8 + { 9 + scope: string; 10 + } 11 + [@@xrpc_query] 8 12 9 - type output = {scope: string} [@@deriving yojson {strict= false}] 13 + type output = 14 + { 15 + scope: string; 16 + } 17 + [@@deriving yojson {strict= false}] 10 18 11 - let call ~scope (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~scope 21 + (client : Hermes.client) : output Lwt.t = 12 22 let params : params = {scope} in 13 23 Hermes.query client nsid (params_to_yojson params) output_of_yojson 14 24 end 25 +
+15 -5
pegasus/lexicons/com_atproto_temp_fetchLabels.ml
··· 5 5 let nsid = "com.atproto.temp.fetchLabels" 6 6 7 7 type params = 8 - {since: int option [@default None]; limit: int option [@default None]} 9 - [@@deriving yojson {strict= false}] 8 + { 9 + since: int option [@default None]; 10 + limit: int option [@default None]; 11 + } 12 + [@@xrpc_query] 10 13 11 - type output = {labels: Com_atproto_label_defs.label list} 12 - [@@deriving yojson {strict= false}] 14 + type output = 15 + { 16 + labels: Com_atproto_label_defs.label list; 17 + } 18 + [@@deriving yojson {strict= false}] 13 19 14 - let call ?since ?limit (client : Hermes.client) : output Lwt.t = 20 + let call 21 + ?since 22 + ?limit 23 + (client : Hermes.client) : output Lwt.t = 15 24 let params : params = {since; limit} in 16 25 Hermes.query client nsid (params_to_yojson params) output_of_yojson 17 26 end 27 +
+9 -6
pegasus/lexicons/com_atproto_temp_requestPhoneVerification.ml
··· 5 5 let nsid = "com.atproto.temp.requestPhoneVerification" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {phone_number: string [@key "phoneNumber"]} 10 + type input = 11 + { 12 + phone_number: string [@key "phoneNumber"]; 13 + } 12 14 [@@deriving yojson {strict= false}] 13 15 14 16 type output = unit 15 - 16 17 let output_of_yojson _ = Ok () 17 18 18 - let call ~phone_number (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~phone_number 21 + (client : Hermes.client) : output Lwt.t = 19 22 let params = () in 20 23 let input = Some ({phone_number} |> input_to_yojson) in 21 - Hermes.procedure client nsid (params_to_yojson params) input 22 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 23 25 end 26 +
+10 -6
pegasus/lexicons/com_atproto_temp_revokeAccountCredentials.ml
··· 5 5 let nsid = "com.atproto.temp.revokeAccountCredentials" 6 6 7 7 type params = unit 8 - 9 8 let params_to_yojson () = `Assoc [] 10 9 11 - type input = {account: string} [@@deriving yojson {strict= false}] 10 + type input = 11 + { 12 + account: string; 13 + } 14 + [@@deriving yojson {strict= false}] 12 15 13 16 type output = unit 14 - 15 17 let output_of_yojson _ = Ok () 16 18 17 - let call ~account (client : Hermes.client) : output Lwt.t = 19 + let call 20 + ~account 21 + (client : Hermes.client) : output Lwt.t = 18 22 let params = () in 19 23 let input = Some ({account} |> input_to_yojson) in 20 - Hermes.procedure client nsid (params_to_yojson params) input 21 - output_of_yojson 24 + Hermes.procedure client nsid (params_to_yojson params) input output_of_yojson 22 25 end 26 +
+19
pegasus/lexicons/com_germnetwork_declaration.ml
··· 1 + (* generated from com.germnetwork.declaration *) 2 + 3 + type message_me = 4 + { 5 + message_me_url: string [@key "messageMeUrl"]; 6 + show_button_to: string [@key "showButtonTo"]; 7 + } 8 + [@@deriving yojson {strict= false}] 9 + 10 + type main = 11 + { 12 + version: string; 13 + current_key: bytes [@key "currentKey"]; 14 + message_me: message_me option [@key "messageMe"] [@default None]; 15 + key_package: bytes option [@key "keyPackage"] [@default None]; 16 + continuity_proofs: bytes list option [@key "continuityProofs"] [@default None]; 17 + } 18 + [@@deriving yojson {strict= false}] 19 +
+1 -1
pegasus/lexicons/dune
··· 2 2 (name lexicons) 3 3 (libraries hermes yojson lwt) 4 4 (preprocess 5 - (pps ppx_deriving_yojson))) 5 + (pps hermes_ppx ppx_deriving_yojson)))
+69 -47
pegasus/lexicons/lexicons.ml
··· 2 2 3 3 module App = struct 4 4 module Bsky = struct 5 + module Draft = struct 6 + module Defs = App_bsky_draft_defs 7 + module CreateDraft = App_bsky_draft_createDraft 8 + module UpdateDraft = App_bsky_draft_updateDraft 9 + module GetDrafts = App_bsky_draft_getDrafts 10 + module DeleteDraft = App_bsky_draft_deleteDraft 11 + end 12 + module AuthManageLabelerService = App_bsky_authManageLabelerService 5 13 module Video = struct 6 14 module UploadVideo = App_bsky_video_uploadVideo 7 15 module Defs = App_bsky_video_defs 8 16 module GetJobStatus = App_bsky_video_getJobStatus 9 17 module GetUploadLimits = App_bsky_video_getUploadLimits 10 18 end 11 - 19 + module Contact = struct 20 + module Defs = App_bsky_contact_defs 21 + module SendNotification = App_bsky_contact_sendNotification 22 + module GetSyncStatus = App_bsky_contact_getSyncStatus 23 + module StartPhoneVerification = App_bsky_contact_startPhoneVerification 24 + module GetMatches = App_bsky_contact_getMatches 25 + module ImportContacts = App_bsky_contact_importContacts 26 + module DismissMatch = App_bsky_contact_dismissMatch 27 + module RemoveData = App_bsky_contact_removeData 28 + module VerifyPhone = App_bsky_contact_verifyPhone 29 + end 30 + module AuthManageNotifications = App_bsky_authManageNotifications 31 + module Bookmark = struct 32 + module Defs = App_bsky_bookmark_defs 33 + module DeleteBookmark = App_bsky_bookmark_deleteBookmark 34 + module GetBookmarks = App_bsky_bookmark_getBookmarks 35 + module CreateBookmark = App_bsky_bookmark_createBookmark 36 + end 12 37 module Embed = struct 13 38 module Defs = App_bsky_embed_defs 14 39 module Record = App_bsky_embed_record ··· 17 42 module Video = App_bsky_embed_video 18 43 module External = App_bsky_embed_external 19 44 end 20 - 45 + module AuthDeleteContent = App_bsky_authDeleteContent 46 + module AuthCreatePosts = App_bsky_authCreatePosts 21 47 module Notification = struct 22 48 module Defs = App_bsky_notification_defs 23 49 module RegisterPush = App_bsky_notification_registerPush 24 50 module PutPreferences = App_bsky_notification_putPreferences 25 - module PutActivitySubscription = 26 - App_bsky_notification_putActivitySubscription 51 + module PutActivitySubscription = App_bsky_notification_putActivitySubscription 27 52 module Declaration = App_bsky_notification_declaration 28 53 module PutPreferencesV2 = App_bsky_notification_putPreferencesV2 29 54 module UpdateSeen = App_bsky_notification_updateSeen 30 - module ListActivitySubscriptions = 31 - App_bsky_notification_listActivitySubscriptions 55 + module ListActivitySubscriptions = App_bsky_notification_listActivitySubscriptions 32 56 module UnregisterPush = App_bsky_notification_unregisterPush 33 57 module GetPreferences = App_bsky_notification_getPreferences 34 58 module ListNotifications = App_bsky_notification_listNotifications 35 59 module GetUnreadCount = App_bsky_notification_getUnreadCount 36 60 end 37 - 38 61 module Unspecced = struct 39 - module GetSuggestedFeedsSkeleton = 40 - App_bsky_unspecced_getSuggestedFeedsSkeleton 41 - module SearchStarterPacksSkeleton = 42 - App_bsky_unspecced_searchStarterPacksSkeleton 62 + module GetSuggestedFeedsSkeleton = App_bsky_unspecced_getSuggestedFeedsSkeleton 63 + module SearchStarterPacksSkeleton = App_bsky_unspecced_searchStarterPacksSkeleton 64 + module GetSuggestedUsersForExplore = App_bsky_unspecced_getSuggestedUsersForExplore 43 65 module Defs = App_bsky_unspecced_defs 66 + module GetOnboardingSuggestedStarterPacksSkeleton = App_bsky_unspecced_getOnboardingSuggestedStarterPacksSkeleton 67 + module GetSuggestedUsersForExploreSkeleton = App_bsky_unspecced_getSuggestedUsersForExploreSkeleton 44 68 module GetSuggestedUsers = App_bsky_unspecced_getSuggestedUsers 45 69 module GetPostThreadOtherV2 = App_bsky_unspecced_getPostThreadOtherV2 46 - module GetSuggestedStarterPacks = 47 - App_bsky_unspecced_getSuggestedStarterPacks 48 - module GetSuggestedStarterPacksSkeleton = 49 - App_bsky_unspecced_getSuggestedStarterPacksSkeleton 50 - module GetSuggestedUsersSkeleton = 51 - App_bsky_unspecced_getSuggestedUsersSkeleton 70 + module GetSuggestedStarterPacks = App_bsky_unspecced_getSuggestedStarterPacks 71 + module GetSuggestedStarterPacksSkeleton = App_bsky_unspecced_getSuggestedStarterPacksSkeleton 72 + module GetOnboardingSuggestedStarterPacks = App_bsky_unspecced_getOnboardingSuggestedStarterPacks 73 + module GetSuggestedUsersSkeleton = App_bsky_unspecced_getSuggestedUsersSkeleton 52 74 module GetPostThreadV2 = App_bsky_unspecced_getPostThreadV2 53 75 module GetTrends = App_bsky_unspecced_getTrends 54 76 module SearchActorsSkeleton = App_bsky_unspecced_searchActorsSkeleton 55 77 module GetSuggestionsSkeleton = App_bsky_unspecced_getSuggestionsSkeleton 56 78 module SearchPostsSkeleton = App_bsky_unspecced_searchPostsSkeleton 79 + module GetOnboardingSuggestedUsersSkeleton = App_bsky_unspecced_getOnboardingSuggestedUsersSkeleton 80 + module GetSuggestedUsersForDiscoverSkeleton = App_bsky_unspecced_getSuggestedUsersForDiscoverSkeleton 81 + module GetSuggestedUsersForDiscover = App_bsky_unspecced_getSuggestedUsersForDiscover 57 82 module GetAgeAssuranceState = App_bsky_unspecced_getAgeAssuranceState 58 - module GetPopularFeedGenerators = 59 - App_bsky_unspecced_getPopularFeedGenerators 83 + module GetPopularFeedGenerators = App_bsky_unspecced_getPopularFeedGenerators 84 + module GetSuggestedOnboardingUsers = App_bsky_unspecced_getSuggestedOnboardingUsers 85 + module GetSuggestedUsersForSeeMore = App_bsky_unspecced_getSuggestedUsersForSeeMore 60 86 module InitAgeAssurance = App_bsky_unspecced_initAgeAssurance 61 87 module GetTrendingTopics = App_bsky_unspecced_getTrendingTopics 62 88 module GetTaggedSuggestions = App_bsky_unspecced_getTaggedSuggestions 89 + module GetSuggestedUsersForSeeMoreSkeleton = App_bsky_unspecced_getSuggestedUsersForSeeMoreSkeleton 63 90 module GetSuggestedFeeds = App_bsky_unspecced_getSuggestedFeeds 64 91 module GetTrendsSkeleton = App_bsky_unspecced_getTrendsSkeleton 65 92 module GetConfig = App_bsky_unspecced_getConfig 66 93 end 67 - 68 94 module Graph = struct 69 95 module GetStarterPacks = App_bsky_graph_getStarterPacks 70 - module GetSuggestedFollowsByActor = 71 - App_bsky_graph_getSuggestedFollowsByActor 96 + module GetSuggestedFollowsByActor = App_bsky_graph_getSuggestedFollowsByActor 72 97 module Block = App_bsky_graph_block 73 - module GetStarterPacksWithMembership = 74 - App_bsky_graph_getStarterPacksWithMembership 98 + module GetStarterPacksWithMembership = App_bsky_graph_getStarterPacksWithMembership 75 99 module Follow = App_bsky_graph_follow 76 100 module Defs = App_bsky_graph_defs 77 101 module GetListsWithMembership = App_bsky_graph_getListsWithMembership ··· 100 124 module UnmuteActor = App_bsky_graph_unmuteActor 101 125 module GetList = App_bsky_graph_getList 102 126 end 103 - 127 + module AuthFullApp = App_bsky_authFullApp 128 + module AuthManageModeration = App_bsky_authManageModeration 104 129 module Feed = struct 105 130 module Generator = App_bsky_feed_generator 106 131 module SendInteractions = App_bsky_feed_sendInteractions ··· 128 153 module GetActorFeeds = App_bsky_feed_getActorFeeds 129 154 module Post = App_bsky_feed_post 130 155 end 131 - 132 156 module Richtext = struct 133 157 module Facet = App_bsky_richtext_facet 134 158 end 135 - 159 + module AuthViewAll = App_bsky_authViewAll 160 + module AuthManageFeedDeclarations = App_bsky_authManageFeedDeclarations 161 + module Ageassurance = struct 162 + module Begin = App_bsky_ageassurance_begin 163 + module Defs = App_bsky_ageassurance_defs 164 + module GetState = App_bsky_ageassurance_getState 165 + module GetConfig = App_bsky_ageassurance_getConfig 166 + end 167 + module AuthManageProfile = App_bsky_authManageProfile 136 168 module Actor = struct 137 169 module SearchActorsTypeahead = App_bsky_actor_searchActorsTypeahead 138 170 module Defs = App_bsky_actor_defs ··· 145 177 module GetPreferences = App_bsky_actor_getPreferences 146 178 module Profile = App_bsky_actor_profile 147 179 end 148 - 149 180 module Labeler = struct 150 181 module Defs = App_bsky_labeler_defs 151 182 module Service = App_bsky_labeler_service ··· 153 184 end 154 185 end 155 186 end 156 - 157 187 module Com = struct 188 + module Germnetwork = struct 189 + module Declaration = Com_germnetwork_declaration 190 + end 158 191 module Atproto = struct 159 192 module Temp = struct 193 + module DereferenceScope = Com_atproto_temp_dereferenceScope 160 194 module AddReservedHandle = Com_atproto_temp_addReservedHandle 161 195 module CheckSignupQueue = Com_atproto_temp_checkSignupQueue 162 196 module CheckHandleAvailability = Com_atproto_temp_checkHandleAvailability 163 - module RequestPhoneVerification = 164 - Com_atproto_temp_requestPhoneVerification 165 - module RevokeAccountCredentials = 166 - Com_atproto_temp_revokeAccountCredentials 197 + module RequestPhoneVerification = Com_atproto_temp_requestPhoneVerification 198 + module RevokeAccountCredentials = Com_atproto_temp_revokeAccountCredentials 167 199 module FetchLabels = Com_atproto_temp_fetchLabels 168 200 end 169 - 170 201 module Identity = struct 171 202 module UpdateHandle = Com_atproto_identity_updateHandle 172 203 module Defs = Com_atproto_identity_defs ··· 175 206 module ResolveIdentity = Com_atproto_identity_resolveIdentity 176 207 module RefreshIdentity = Com_atproto_identity_refreshIdentity 177 208 module ResolveHandle = Com_atproto_identity_resolveHandle 178 - module RequestPlcOperationSignature = 179 - Com_atproto_identity_requestPlcOperationSignature 180 - module GetRecommendedDidCredentials = 181 - Com_atproto_identity_getRecommendedDidCredentials 209 + module RequestPlcOperationSignature = Com_atproto_identity_requestPlcOperationSignature 210 + module GetRecommendedDidCredentials = Com_atproto_identity_getRecommendedDidCredentials 182 211 module ResolveDid = Com_atproto_identity_resolveDid 183 212 end 184 - 185 213 module Admin = struct 186 214 module UpdateAccountEmail = Com_atproto_admin_updateAccountEmail 187 215 module GetAccountInfo = Com_atproto_admin_getAccountInfo ··· 200 228 module GetAccountInfos = Com_atproto_admin_getAccountInfos 201 229 module DeleteAccount = Com_atproto_admin_deleteAccount 202 230 end 203 - 204 231 module Label = struct 205 232 module Defs = Com_atproto_label_defs 206 233 module QueryLabels = Com_atproto_label_queryLabels 207 234 end 208 - 209 235 module Server = struct 210 - module RequestEmailConfirmation = 211 - Com_atproto_server_requestEmailConfirmation 236 + module RequestEmailConfirmation = Com_atproto_server_requestEmailConfirmation 212 237 module ReserveSigningKey = Com_atproto_server_reserveSigningKey 213 238 module Defs = Com_atproto_server_defs 214 239 module GetServiceAuth = Com_atproto_server_getServiceAuth ··· 235 260 module DeleteAccount = Com_atproto_server_deleteAccount 236 261 module CreateInviteCode = Com_atproto_server_createInviteCode 237 262 end 238 - 239 263 module Lexicon = struct 264 + module ResolveLexicon = Com_atproto_lexicon_resolveLexicon 240 265 module Schema = Com_atproto_lexicon_schema 241 266 end 242 - 243 267 module Sync = struct 244 268 module GetHead = Com_atproto_sync_getHead 245 269 module GetBlob = Com_atproto_sync_getBlob ··· 258 282 module ListReposByCollection = Com_atproto_sync_listReposByCollection 259 283 module GetCheckout = Com_atproto_sync_getCheckout 260 284 end 261 - 262 285 module Repo = struct 263 286 module StrongRef = Com_atproto_repo_strongRef 264 287 module Defs = Com_atproto_repo_defs ··· 273 296 module ApplyWrites = Com_atproto_repo_applyWrites 274 297 module ListRecords = Com_atproto_repo_listRecords 275 298 end 276 - 277 299 module Moderation = struct 278 300 module Defs = Com_atproto_moderation_defs 279 301 module CreateReport = Com_atproto_moderation_createReport
+10 -1
pegasus/lib/api/server/refreshSession.ml
··· 14 14 let access_jwt, refresh_jwt = Jwt.generate_jwt did in 15 15 Dream.json @@ Yojson.Safe.to_string 16 16 @@ output_to_yojson 17 - {access_jwt; refresh_jwt; handle; did; active; status; did_doc= None} ) 17 + { access_jwt 18 + ; refresh_jwt 19 + ; handle 20 + ; did 21 + ; active 22 + ; status 23 + ; did_doc= None 24 + ; email= None 25 + ; email_confirmed= None 26 + ; email_auth_factor= None } )
+2 -2
pegasus/lib/migrations/migrations.ml
··· 89 89 List.filter_map 90 90 (fun filename -> 91 91 match parse_migration_filename filename with 92 - | Some (id, name) when not (List.mem id applied) -> begin 93 - match read_migration filename with 92 + | Some (id, name) when not (List.mem id applied) -> 93 + begin match read_migration filename with 94 94 | Some sql -> 95 95 Some (id, name, sql) 96 96 | None ->