OCaml HTML5 parser/serialiser based on Python's JustHTML

Squashed 'ocaml-atp/' changes from 9023a12..a1fa899

a1fa899 Fix non-deterministic lexicon code generation

git-subtree-dir: ocaml-atp
git-subtree-split: a1fa8999f659c33660db64143f7d5fe813353c89

+6258 -6220
+4 -1
hermest/bin/main.ml
··· 37 let rec aux acc p = 38 if Sys.is_directory p then 39 Sys.readdir p |> Array.to_list 40 |> List.map (Filename.concat p) 41 |> List.fold_left aux acc 42 else if Filename.check_suffix p ".json" then p :: acc 43 else acc 44 in 45 - aux [] path 46 47 (* generate module structure from lexicons - unified mode *) 48 let generate ~inputs ~output_dir ~module_name ~public_name =
··· 37 let rec aux acc p = 38 if Sys.is_directory p then 39 Sys.readdir p |> Array.to_list 40 + (* Sort directory entries for deterministic ordering *) 41 + |> List.sort String.compare 42 |> List.map (Filename.concat p) 43 |> List.fold_left aux acc 44 else if Filename.check_suffix p ".json" then p :: acc 45 else acc 46 in 47 + (* Sort final result for deterministic ordering *) 48 + aux [] path |> List.sort String.compare 49 50 (* generate module structure from lexicons - unified mode *) 51 let generate ~inputs ~output_dir ~module_name ~public_name =
+23 -4
hermest/lib/codegen_jsont.ml
··· 532 in 533 match ready with 534 | [] -> 535 - (* Cycle detected or external deps - just append remaining *) 536 - sorted @ remaining 537 - | _ -> sort (sorted @ ready) not_ready 538 in 539 (* Sort support defs first, then append primary defs *) 540 sort [] support_defs @ primary_defs ··· 1461 (* Shouldn't happen after removing cyclic deps, but fall back to alphabetical *) 1462 List.rev sorted 1463 @ List.sort (fun (a, _) (b, _) -> String.compare a b) not_ready 1464 - | _ -> topo_sort (ready @ sorted) not_ready 1465 in 1466 (topo_sort [] children, cyclic_nodes) 1467
··· 532 in 533 match ready with 534 | [] -> 535 + (* Cycle detected or external deps - sort remaining alphabetically *) 536 + let remaining_sorted = 537 + List.sort 538 + (fun (a : def_entry) (b : def_entry) -> 539 + String.compare a.name b.name) 540 + remaining 541 + in 542 + sorted @ remaining_sorted 543 + | _ -> 544 + (* Sort ready elements alphabetically for deterministic output *) 545 + let ready_sorted = 546 + List.sort 547 + (fun (a : def_entry) (b : def_entry) -> 548 + String.compare a.name b.name) 549 + ready 550 + in 551 + sort (sorted @ ready_sorted) not_ready 552 in 553 (* Sort support defs first, then append primary defs *) 554 sort [] support_defs @ primary_defs ··· 1475 (* Shouldn't happen after removing cyclic deps, but fall back to alphabetical *) 1476 List.rev sorted 1477 @ List.sort (fun (a, _) (b, _) -> String.compare a b) not_ready 1478 + | _ -> 1479 + (* Sort ready elements alphabetically for deterministic output *) 1480 + let ready_sorted = 1481 + List.sort (fun (a, _) (b, _) -> String.compare a b) ready 1482 + in 1483 + topo_sort (ready_sorted @ sorted) not_ready 1484 in 1485 (topo_sort [] children, cyclic_nodes) 1486
+16
hermest/lib/naming.ml
··· 323 | Some ns -> ModuleWithChildren (ns, new_children) 324 | None -> Node new_children) 325 in 326 match 327 List.fold_left 328 (fun trie nsid -> 329 let segments = String.split_on_char '.' nsid in 330 insert_segments trie nsid segments) 331 (Node []) nsids 332 with 333 | Node result -> result 334 | ModuleWithChildren (_, result) -> result
··· 323 | Some ns -> ModuleWithChildren (ns, new_children) 324 | None -> Node new_children) 325 in 326 + (* Sort children alphabetically to ensure deterministic output *) 327 + let rec sort_trie = function 328 + | Node children -> 329 + Node 330 + (children 331 + |> List.map (fun (k, v) -> (k, sort_trie v)) 332 + |> List.sort (fun (a, _) (b, _) -> String.compare a b)) 333 + | Module nsid -> Module nsid 334 + | ModuleWithChildren (nsid, children) -> 335 + ModuleWithChildren 336 + ( nsid, 337 + children 338 + |> List.map (fun (k, v) -> (k, sort_trie v)) 339 + |> List.sort (fun (a, _) (b, _) -> String.compare a b) ) 340 + in 341 match 342 List.fold_left 343 (fun trie nsid -> 344 let segments = String.split_on_char '.' nsid in 345 insert_segments trie nsid segments) 346 (Node []) nsids 347 + |> sort_trie 348 with 349 | Node result -> result 350 | ModuleWithChildren (_, result) -> result
+15 -15
lexicons/atproto/atp_lexicon_atproto.ml
··· 31 |> Jsont.Object.finish 32 33 end 34 - module Defs = struct 35 - type commit_meta = { 36 - cid : string; 37 - rev : string; 38 - } 39 - 40 - let commit_meta_jsont = 41 - Jsont.Object.map ~kind:"Commit_meta" 42 - (fun _typ cid rev -> { cid; rev }) 43 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.defs#commitMeta" ~enc:(fun _ -> "com.atproto.repo.defs#commitMeta") 44 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 45 - |> Jsont.Object.mem "rev" Jsont.string ~enc:(fun r -> r.rev) 46 - |> Jsont.Object.finish 47 - 48 - end 49 module ListRecords = struct 50 type record = { 51 cid : string; ··· 144 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 145 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 146 |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 147 |> Jsont.Object.finish 148 149 end
··· 31 |> Jsont.Object.finish 32 33 end 34 module ListRecords = struct 35 type record = { 36 cid : string; ··· 129 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 130 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 131 |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 132 + |> Jsont.Object.finish 133 + 134 + end 135 + module Defs = struct 136 + type commit_meta = { 137 + cid : string; 138 + rev : string; 139 + } 140 + 141 + let commit_meta_jsont = 142 + Jsont.Object.map ~kind:"Commit_meta" 143 + (fun _typ cid rev -> { cid; rev }) 144 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.defs#commitMeta" ~enc:(fun _ -> "com.atproto.repo.defs#commitMeta") 145 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 146 + |> Jsont.Object.mem "rev" Jsont.string ~enc:(fun r -> r.rev) 147 |> Jsont.Object.finish 148 149 end
+11 -11
lexicons/atproto/atp_lexicon_atproto.mli
··· 24 val main_jsont : main Jsont.t 25 26 end 27 - module Defs : sig 28 - 29 - type commit_meta = { 30 - cid : string; 31 - rev : string; 32 - } 33 - 34 - (** Jsont codec for {!type:commit_meta}. *) 35 - val commit_meta_jsont : commit_meta Jsont.t 36 - 37 - end 38 module ListRecords : sig 39 40 type record = { ··· 93 94 (** Jsont codec for {!type:output}. *) 95 val output_jsont : output Jsont.t 96 97 end 98 module PutRecord : sig
··· 24 val main_jsont : main Jsont.t 25 26 end 27 module ListRecords : sig 28 29 type record = { ··· 82 83 (** Jsont codec for {!type:output}. *) 84 val output_jsont : output Jsont.t 85 + 86 + end 87 + module Defs : sig 88 + 89 + type commit_meta = { 90 + cid : string; 91 + rev : string; 92 + } 93 + 94 + (** Jsont codec for {!type:commit_meta}. *) 95 + val commit_meta_jsont : commit_meta Jsont.t 96 97 end 98 module PutRecord : sig
+2856 -2856
lexicons/bsky/atp_lexicon_bsky.ml
··· 15 16 module Com = struct 17 module Atproto = struct 18 - module Label = struct 19 - module Defs = struct 20 - type self_label = { 21 - val_ : string; 22 } 23 24 - let self_label_jsont = 25 - Jsont.Object.map ~kind:"Self_label" 26 - (fun _typ val_ -> { val_ }) 27 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#selfLabel" ~enc:(fun _ -> "com.atproto.label.defs#selfLabel") 28 - |> Jsont.Object.mem "val" Jsont.string ~enc:(fun r -> r.val_) 29 |> Jsont.Object.finish 30 31 - type label_value_definition_strings = { 32 - description : string; 33 - lang : string; 34 - name : string; 35 - } 36 37 - let label_value_definition_strings_jsont = 38 - Jsont.Object.map ~kind:"Label_value_definition_strings" 39 - (fun _typ description lang name -> { description; lang; name }) 40 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#labelValueDefinitionStrings" ~enc:(fun _ -> "com.atproto.label.defs#labelValueDefinitionStrings") 41 - |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 42 - |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 43 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 44 - |> Jsont.Object.finish 45 46 - type label_value = string 47 - let label_value_jsont = Jsont.string 48 49 type label = { 50 cid : string option; 51 cts : string; ··· 73 |> Jsont.Object.opt_mem "ver" Jsont.int ~enc:(fun r -> r.ver) 74 |> Jsont.Object.finish 75 76 - type self_labels = { 77 - values : self_label list; 78 } 79 80 - let self_labels_jsont = 81 - Jsont.Object.map ~kind:"Self_labels" 82 - (fun _typ values -> { values }) 83 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#selfLabels" ~enc:(fun _ -> "com.atproto.label.defs#selfLabels") 84 - |> Jsont.Object.mem "values" (Jsont.list self_label_jsont) ~enc:(fun r -> r.values) 85 |> Jsont.Object.finish 86 87 type label_value_definition = { ··· 105 |> Jsont.Object.mem "severity" Jsont.string ~enc:(fun r -> r.severity) 106 |> Jsont.Object.finish 107 108 end 109 end 110 - module Repo = struct 111 - module StrongRef = struct 112 - type main = { 113 - cid : string; 114 - uri : string; 115 } 116 117 - let main_jsont = 118 - Jsont.Object.map ~kind:"Main" 119 - (fun _typ cid uri -> { cid; uri }) 120 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.strongRef" ~enc:(fun _ -> "com.atproto.repo.strongRef") 121 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 122 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 123 |> Jsont.Object.finish 124 125 end 126 - end 127 - module Moderation = struct 128 module Defs = struct 129 - type subject_type = string 130 - let subject_type_jsont = Jsont.string 131 132 - type reason_violation = string 133 - let reason_violation_jsont = Jsont.string 134 135 - type reason_type = string 136 - let reason_type_jsont = Jsont.string 137 138 - type reason_spam = string 139 - let reason_spam_jsont = Jsont.string 140 141 - type reason_sexual = string 142 - let reason_sexual_jsont = Jsont.string 143 144 - type reason_rude = string 145 - let reason_rude_jsont = Jsont.string 146 147 - type reason_other = string 148 - let reason_other_jsont = Jsont.string 149 150 - type reason_misleading = string 151 - let reason_misleading_jsont = Jsont.string 152 153 - type reason_appeal = string 154 - let reason_appeal_jsont = Jsont.string 155 156 end 157 end 158 - end 159 - end 160 - module App = struct 161 - module Bsky = struct 162 - module AuthManageLabelerService = struct 163 - type main = unit 164 - let main_jsont = Jsont.ignore 165 - 166 - end 167 - module AuthViewAll = struct 168 - type main = unit 169 - let main_jsont = Jsont.ignore 170 - 171 - end 172 - module AuthManageModeration = struct 173 - type main = unit 174 - let main_jsont = Jsont.ignore 175 - 176 - end 177 module Richtext = struct 178 module Facet = struct 179 - type tag = { 180 - tag : string; 181 - } 182 - 183 - let tag_jsont = 184 - Jsont.Object.map ~kind:"Tag" 185 - (fun _typ tag -> { tag }) 186 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#tag" ~enc:(fun _ -> "app.bsky.richtext.facet#tag") 187 - |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 188 - |> Jsont.Object.finish 189 - 190 - type mention = { 191 - did : string; 192 } 193 194 - let mention_jsont = 195 - Jsont.Object.map ~kind:"Mention" 196 - (fun _typ did -> { did }) 197 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#mention" ~enc:(fun _ -> "app.bsky.richtext.facet#mention") 198 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 199 |> Jsont.Object.finish 200 201 type link = { ··· 209 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 210 |> Jsont.Object.finish 211 212 - type byte_slice = { 213 - byte_end : int; 214 - byte_start : int; 215 } 216 217 - let byte_slice_jsont = 218 - Jsont.Object.map ~kind:"Byte_slice" 219 - (fun _typ byte_end byte_start -> { byte_end; byte_start }) 220 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#byteSlice" ~enc:(fun _ -> "app.bsky.richtext.facet#byteSlice") 221 - |> Jsont.Object.mem "byteEnd" Jsont.int ~enc:(fun r -> r.byte_end) 222 - |> Jsont.Object.mem "byteStart" Jsont.int ~enc:(fun r -> r.byte_start) 223 |> Jsont.Object.finish 224 225 type main = { ··· 237 238 end 239 end 240 - module AuthManageFeedDeclarations = struct 241 - type main = unit 242 - let main_jsont = Jsont.ignore 243 244 - end 245 - module AuthFullApp = struct 246 - type main = unit 247 - let main_jsont = Jsont.ignore 248 249 - end 250 - module AuthManageNotifications = struct 251 - type main = unit 252 - let main_jsont = Jsont.ignore 253 254 - end 255 - module AuthManageProfile = struct 256 - type main = unit 257 - let main_jsont = Jsont.ignore 258 259 - end 260 - module Ageassurance = struct 261 - module Defs = struct 262 - type status = string 263 - let status_jsont = Jsont.string 264 265 - type state_metadata = { 266 - account_created_at : string option; 267 } 268 269 - let state_metadata_jsont = 270 - Jsont.Object.map ~kind:"State_metadata" 271 - (fun _typ account_created_at -> { account_created_at }) 272 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#stateMetadata" ~enc:(fun _ -> "app.bsky.ageassurance.defs#stateMetadata") 273 - |> Jsont.Object.opt_mem "accountCreatedAt" Jsont.string ~enc:(fun r -> r.account_created_at) 274 |> Jsont.Object.finish 275 276 - type event = { 277 - access : string; 278 - attempt_id : string; 279 - complete_ip : string option; 280 - complete_ua : string option; 281 - country_code : string; 282 - created_at : string; 283 - email : string option; 284 - init_ip : string option; 285 - init_ua : string option; 286 - region_code : string option; 287 - status : string; 288 } 289 290 - let event_jsont = 291 - Jsont.Object.map ~kind:"Event" 292 - (fun _typ access attempt_id complete_ip complete_ua country_code created_at email init_ip init_ua region_code status -> { access; attempt_id; complete_ip; complete_ua; country_code; created_at; email; init_ip; init_ua; region_code; status }) 293 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#event" ~enc:(fun _ -> "app.bsky.ageassurance.defs#event") 294 - |> Jsont.Object.mem "access" Jsont.string ~enc:(fun r -> r.access) 295 - |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 296 - |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 297 - |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 298 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 299 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 300 - |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 301 - |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 302 - |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 303 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 304 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 305 |> Jsont.Object.finish 306 307 - type config_region = { 308 - country_code : string; 309 - min_access_age : int; 310 - region_code : string option; 311 - rules : Jsont.json list; 312 } 313 314 - let config_region_jsont = 315 - Jsont.Object.map ~kind:"Config_region" 316 - (fun _typ country_code min_access_age region_code rules -> { country_code; min_access_age; region_code; rules }) 317 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegion" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegion") 318 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 319 - |> Jsont.Object.mem "minAccessAge" Jsont.int ~enc:(fun r -> r.min_access_age) 320 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 321 - |> Jsont.Object.mem "rules" (Jsont.list Jsont.json) ~enc:(fun r -> r.rules) 322 |> Jsont.Object.finish 323 324 - type access = string 325 - let access_jsont = Jsont.string 326 327 - type state = { 328 - access : access; 329 - last_initiated_at : string option; 330 - status : status; 331 } 332 333 - let state_jsont = 334 - Jsont.Object.map ~kind:"State" 335 - (fun _typ access last_initiated_at status -> { access; last_initiated_at; status }) 336 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#state" ~enc:(fun _ -> "app.bsky.ageassurance.defs#state") 337 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 338 - |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 339 - |> Jsont.Object.mem "status" status_jsont ~enc:(fun r -> r.status) 340 |> Jsont.Object.finish 341 342 - type config_region_rule_if_declared_under_age = { 343 - access : access; 344 - age : int; 345 } 346 347 - let config_region_rule_if_declared_under_age_jsont = 348 - Jsont.Object.map ~kind:"Config_region_rule_if_declared_under_age" 349 - (fun _typ access age -> { access; age }) 350 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge") 351 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 352 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 353 |> Jsont.Object.finish 354 355 - type config_region_rule_if_declared_over_age = { 356 - access : access; 357 - age : int; 358 } 359 360 - let config_region_rule_if_declared_over_age_jsont = 361 - Jsont.Object.map ~kind:"Config_region_rule_if_declared_over_age" 362 - (fun _typ access age -> { access; age }) 363 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge") 364 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 365 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 366 |> Jsont.Object.finish 367 368 - type config_region_rule_if_assured_under_age = { 369 - access : access; 370 - age : int; 371 } 372 373 - let config_region_rule_if_assured_under_age_jsont = 374 - Jsont.Object.map ~kind:"Config_region_rule_if_assured_under_age" 375 - (fun _typ access age -> { access; age }) 376 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge") 377 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 378 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 379 |> Jsont.Object.finish 380 381 - type config_region_rule_if_assured_over_age = { 382 - access : access; 383 - age : int; 384 } 385 386 - let config_region_rule_if_assured_over_age_jsont = 387 - Jsont.Object.map ~kind:"Config_region_rule_if_assured_over_age" 388 - (fun _typ access age -> { access; age }) 389 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge") 390 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 391 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 392 |> Jsont.Object.finish 393 394 - type config_region_rule_if_account_older_than = { 395 - access : access; 396 - date : string; 397 } 398 399 - let config_region_rule_if_account_older_than_jsont = 400 - Jsont.Object.map ~kind:"Config_region_rule_if_account_older_than" 401 - (fun _typ access date -> { access; date }) 402 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan") 403 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 404 - |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 405 |> Jsont.Object.finish 406 407 - type config_region_rule_if_account_newer_than = { 408 - access : access; 409 - date : string; 410 } 411 412 - let config_region_rule_if_account_newer_than_jsont = 413 - Jsont.Object.map ~kind:"Config_region_rule_if_account_newer_than" 414 - (fun _typ access date -> { access; date }) 415 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan") 416 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 417 - |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 418 |> Jsont.Object.finish 419 420 - type config_region_rule_default = { 421 - access : access; 422 } 423 424 - let config_region_rule_default_jsont = 425 - Jsont.Object.map ~kind:"Config_region_rule_default" 426 - (fun _typ access -> { access }) 427 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleDefault" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleDefault") 428 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 429 |> Jsont.Object.finish 430 431 - type config = { 432 - regions : config_region list; 433 } 434 435 - let config_jsont = 436 - Jsont.Object.map ~kind:"Config" 437 - (fun _typ regions -> { regions }) 438 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#config" ~enc:(fun _ -> "app.bsky.ageassurance.defs#config") 439 - |> Jsont.Object.mem "regions" (Jsont.list config_region_jsont) ~enc:(fun r -> r.regions) 440 |> Jsont.Object.finish 441 442 end 443 - module Begin = struct 444 type input = { 445 - country_code : string; 446 - email : string; 447 - language : string; 448 - region_code : string option; 449 } 450 451 let input_jsont = 452 Jsont.Object.map ~kind:"Input" 453 - (fun _typ country_code email language region_code -> { country_code; email; language; region_code }) 454 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.begin#input" ~enc:(fun _ -> "app.bsky.ageassurance.begin#input") 455 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 456 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 457 - |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 458 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 459 |> Jsont.Object.finish 460 461 - type output = Defs.state 462 463 - let output_jsont = Defs.state_jsont 464 465 end 466 - module GetState = struct 467 - type params = { 468 - country_code : string; 469 - region_code : string option; 470 } 471 472 - let params_jsont = 473 - Jsont.Object.map ~kind:"Params" 474 - (fun country_code region_code -> { 475 - country_code; 476 - region_code; 477 - }) 478 - |> Jsont.Object.mem "countryCode" Jsont.string 479 - ~enc:(fun r -> r.country_code) 480 - |> Jsont.Object.opt_mem "regionCode" Jsont.string 481 - ~enc:(fun r -> r.region_code) 482 |> Jsont.Object.finish 483 484 type output = { 485 - metadata : Defs.state_metadata; 486 - state : Defs.state; 487 } 488 489 let output_jsont = 490 Jsont.Object.map ~kind:"Output" 491 - (fun _typ metadata state -> { metadata; state }) 492 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.getState#output" ~enc:(fun _ -> "app.bsky.ageassurance.getState#output") 493 - |> Jsont.Object.mem "metadata" Defs.state_metadata_jsont ~enc:(fun r -> r.metadata) 494 - |> Jsont.Object.mem "state" Defs.state_jsont ~enc:(fun r -> r.state) 495 |> Jsont.Object.finish 496 497 end 498 - module GetConfig = struct 499 - type output = Defs.config 500 501 - let output_jsont = Defs.config_jsont 502 503 end 504 end 505 module Labeler = struct 506 module Defs = struct 507 - type labeler_viewer_state = { 508 - like : string option; 509 - } 510 - 511 - let labeler_viewer_state_jsont = 512 - Jsont.Object.map ~kind:"Labeler_viewer_state" 513 - (fun _typ like -> { like }) 514 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewerState" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewerState") 515 - |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 516 - |> Jsont.Object.finish 517 - 518 type labeler_policies = { 519 label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; 520 label_values : Com.Atproto.Label.Defs.label_value list; ··· 528 |> Jsont.Object.mem "labelValues" (Jsont.list Com.Atproto.Label.Defs.label_value_jsont) ~enc:(fun r -> r.label_values) 529 |> Jsont.Object.finish 530 531 - type labeler_view_detailed = { 532 cid : string; 533 creator : Jsont.json; 534 indexed_at : string; 535 labels : Com.Atproto.Label.Defs.label list option; 536 like_count : int option; 537 - policies : Jsont.json; 538 - reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 539 - subject_collections : string list option; 540 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 541 uri : string; 542 viewer : Jsont.json option; 543 } 544 545 - let labeler_view_detailed_jsont = 546 - Jsont.Object.map ~kind:"Labeler_view_detailed" 547 - (fun _typ cid creator indexed_at labels like_count policies reason_types subject_collections subject_types uri viewer -> { cid; creator; indexed_at; labels; like_count; policies; reason_types; subject_collections; subject_types; uri; viewer }) 548 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewDetailed" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewDetailed") 549 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 550 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 551 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 552 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 553 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 554 - |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 555 - |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 556 - |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 557 - |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 558 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 559 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 560 |> Jsont.Object.finish 561 562 - type labeler_view = { 563 cid : string; 564 creator : Jsont.json; 565 indexed_at : string; 566 labels : Com.Atproto.Label.Defs.label list option; 567 like_count : int option; 568 uri : string; 569 viewer : Jsont.json option; 570 } 571 572 - let labeler_view_jsont = 573 - Jsont.Object.map ~kind:"Labeler_view" 574 - (fun _typ cid creator indexed_at labels like_count uri viewer -> { cid; creator; indexed_at; labels; like_count; uri; viewer }) 575 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerView" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerView") 576 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 577 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 578 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 579 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 580 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 581 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 582 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 583 |> Jsont.Object.finish ··· 637 638 end 639 end 640 - module AuthCreatePosts = struct 641 - type main = unit 642 - let main_jsont = Jsont.ignore 643 - 644 - end 645 - module Video = struct 646 - module GetUploadLimits = struct 647 - type output = { 648 - can_upload : bool; 649 - error : string option; 650 - message : string option; 651 - remaining_daily_bytes : int option; 652 - remaining_daily_videos : int option; 653 - } 654 - 655 - let output_jsont = 656 - Jsont.Object.map ~kind:"Output" 657 - (fun _typ can_upload error message remaining_daily_bytes remaining_daily_videos -> { can_upload; error; message; remaining_daily_bytes; remaining_daily_videos }) 658 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getUploadLimits#output" ~enc:(fun _ -> "app.bsky.video.getUploadLimits#output") 659 - |> Jsont.Object.mem "canUpload" Jsont.bool ~enc:(fun r -> r.can_upload) 660 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 661 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 662 - |> Jsont.Object.opt_mem "remainingDailyBytes" Jsont.int ~enc:(fun r -> r.remaining_daily_bytes) 663 - |> Jsont.Object.opt_mem "remainingDailyVideos" Jsont.int ~enc:(fun r -> r.remaining_daily_videos) 664 - |> Jsont.Object.finish 665 - 666 - end 667 - module Defs = struct 668 - type job_status = { 669 - blob : Atp.Blob_ref.t option; 670 - did : string; 671 - error : string option; 672 - job_id : string; 673 - message : string option; 674 - progress : int option; 675 - state : string; 676 - } 677 - 678 - let job_status_jsont = 679 - Jsont.Object.map ~kind:"Job_status" 680 - (fun _typ blob did error job_id message progress state -> { blob; did; error; job_id; message; progress; state }) 681 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.defs#jobStatus" ~enc:(fun _ -> "app.bsky.video.defs#jobStatus") 682 - |> Jsont.Object.opt_mem "blob" Atp.Blob_ref.jsont ~enc:(fun r -> r.blob) 683 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 684 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 685 - |> Jsont.Object.mem "jobId" Jsont.string ~enc:(fun r -> r.job_id) 686 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 687 - |> Jsont.Object.opt_mem "progress" Jsont.int ~enc:(fun r -> r.progress) 688 - |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 689 - |> Jsont.Object.finish 690 - 691 - end 692 - module UploadVideo = struct 693 - type input = unit 694 - let input_jsont = Jsont.ignore 695 - 696 - type output = { 697 - job_status : Defs.job_status; 698 - } 699 - 700 - let output_jsont = 701 - Jsont.Object.map ~kind:"Output" 702 - (fun _typ job_status -> { job_status }) 703 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.uploadVideo#output" ~enc:(fun _ -> "app.bsky.video.uploadVideo#output") 704 - |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 705 - |> Jsont.Object.finish 706 - 707 - end 708 - module GetJobStatus = struct 709 - type params = { 710 - job_id : string; 711 - } 712 - 713 - let params_jsont = 714 - Jsont.Object.map ~kind:"Params" 715 - (fun job_id -> { 716 - job_id; 717 - }) 718 - |> Jsont.Object.mem "jobId" Jsont.string 719 - ~enc:(fun r -> r.job_id) 720 - |> Jsont.Object.finish 721 - 722 - type output = { 723 - job_status : Defs.job_status; 724 - } 725 - 726 - let output_jsont = 727 - Jsont.Object.map ~kind:"Output" 728 - (fun _typ job_status -> { job_status }) 729 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getJobStatus#output" ~enc:(fun _ -> "app.bsky.video.getJobStatus#output") 730 - |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 731 - |> Jsont.Object.finish 732 - 733 - end 734 - end 735 module Embed = struct 736 module External = struct 737 - type view_external = { 738 description : string; 739 - thumb : string option; 740 title : string; 741 uri : string; 742 } 743 744 - let view_external_jsont = 745 - Jsont.Object.map ~kind:"View_external" 746 (fun _typ description thumb title uri -> { description; thumb; title; uri }) 747 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#viewExternal" ~enc:(fun _ -> "app.bsky.embed.external#viewExternal") 748 |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 749 - |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 750 |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 751 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 752 |> Jsont.Object.finish 753 754 - type external_ = { 755 description : string; 756 - thumb : Atp.Blob_ref.t option; 757 title : string; 758 uri : string; 759 } 760 761 - let external__jsont = 762 - Jsont.Object.map ~kind:"External_" 763 (fun _typ description thumb title uri -> { description; thumb; title; uri }) 764 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 765 |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 766 - |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 767 |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 768 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 769 |> Jsont.Object.finish 770 771 - type view = { 772 external_ : Jsont.json; 773 } 774 775 - let view_jsont = 776 - Jsont.Object.map ~kind:"View" 777 (fun _typ external_ -> { external_ }) 778 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#view" ~enc:(fun _ -> "app.bsky.embed.external#view") 779 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 780 |> Jsont.Object.finish 781 782 - type main = { 783 external_ : Jsont.json; 784 } 785 786 - let main_jsont = 787 - Jsont.Object.map ~kind:"Main" 788 (fun _typ external_ -> { external_ }) 789 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 790 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 791 |> Jsont.Object.finish 792 ··· 806 |> Jsont.Object.finish 807 808 end 809 - module Images = struct 810 - type view_image = { 811 - alt : string; 812 aspect_ratio : Jsont.json option; 813 - fullsize : string; 814 - thumb : string; 815 } 816 817 - let view_image_jsont = 818 - Jsont.Object.map ~kind:"View_image" 819 - (fun _typ alt aspect_ratio fullsize thumb -> { alt; aspect_ratio; fullsize; thumb }) 820 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#viewImage" ~enc:(fun _ -> "app.bsky.embed.images#viewImage") 821 - |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 822 |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 823 - |> Jsont.Object.mem "fullsize" Jsont.string ~enc:(fun r -> r.fullsize) 824 - |> Jsont.Object.mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 825 |> Jsont.Object.finish 826 827 type image = { 828 alt : string; 829 aspect_ratio : Jsont.json option; ··· 839 |> Jsont.Object.mem "image" Atp.Blob_ref.jsont ~enc:(fun r -> r.image) 840 |> Jsont.Object.finish 841 842 - type view = { 843 - images : Jsont.json list; 844 } 845 846 - let view_jsont = 847 - Jsont.Object.map ~kind:"View" 848 - (fun _typ images -> { images }) 849 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#view" ~enc:(fun _ -> "app.bsky.embed.images#view") 850 - |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 851 |> Jsont.Object.finish 852 853 type main = { ··· 861 |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 862 |> Jsont.Object.finish 863 864 - end 865 - module Video = struct 866 type view = { 867 - alt : string option; 868 - aspect_ratio : Jsont.json option; 869 - cid : string; 870 - playlist : string; 871 - thumbnail : string option; 872 } 873 874 let view_jsont = 875 Jsont.Object.map ~kind:"View" 876 - (fun _typ alt aspect_ratio cid playlist thumbnail -> { alt; aspect_ratio; cid; playlist; thumbnail }) 877 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#view" ~enc:(fun _ -> "app.bsky.embed.video#view") 878 - |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 879 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 880 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 881 - |> Jsont.Object.mem "playlist" Jsont.string ~enc:(fun r -> r.playlist) 882 - |> Jsont.Object.opt_mem "thumbnail" Jsont.string ~enc:(fun r -> r.thumbnail) 883 |> Jsont.Object.finish 884 885 - type caption = { 886 - file : Atp.Blob_ref.t; 887 - lang : string; 888 - } 889 - 890 - let caption_jsont = 891 - Jsont.Object.map ~kind:"Caption" 892 - (fun _typ file lang -> { file; lang }) 893 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#caption" ~enc:(fun _ -> "app.bsky.embed.video#caption") 894 - |> Jsont.Object.mem "file" Atp.Blob_ref.jsont ~enc:(fun r -> r.file) 895 - |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 896 - |> Jsont.Object.finish 897 - 898 type main = { 899 - alt : string option; 900 - aspect_ratio : Jsont.json option; 901 - captions : Jsont.json list option; 902 - video : Atp.Blob_ref.t; 903 } 904 905 let main_jsont = 906 Jsont.Object.map ~kind:"Main" 907 - (fun _typ alt aspect_ratio captions video -> { alt; aspect_ratio; captions; video }) 908 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video" ~enc:(fun _ -> "app.bsky.embed.video") 909 - |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 910 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 911 - |> Jsont.Object.opt_mem "captions" (Jsont.list Jsont.json) ~enc:(fun r -> r.captions) 912 - |> Jsont.Object.mem "video" Atp.Blob_ref.jsont ~enc:(fun r -> r.video) 913 |> Jsont.Object.finish 914 915 - end 916 - module RecordWithMedia = struct 917 type view = { 918 media : Jsont.json; 919 record : Jsont.json; ··· 927 |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 928 |> Jsont.Object.finish 929 930 type main = { 931 - media : Jsont.json; 932 - record : Jsont.json; 933 } 934 935 let main_jsont = 936 Jsont.Object.map ~kind:"Main" 937 - (fun _typ media record -> { media; record }) 938 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia") 939 - |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 940 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 941 |> Jsont.Object.finish 942 943 - end 944 - module Record = struct 945 - type view_record = { 946 - author : Jsont.json; 947 - cid : string; 948 - embeds : Jsont.json list option; 949 - indexed_at : string; 950 - labels : Com.Atproto.Label.Defs.label list option; 951 - like_count : int option; 952 - quote_count : int option; 953 - reply_count : int option; 954 - repost_count : int option; 955 - uri : string; 956 - value : Jsont.json; 957 } 958 959 - let view_record_jsont = 960 - Jsont.Object.map ~kind:"View_record" 961 - (fun _typ author cid embeds indexed_at labels like_count quote_count reply_count repost_count uri value -> { author; cid; embeds; indexed_at; labels; like_count; quote_count; reply_count; repost_count; uri; value }) 962 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewRecord" ~enc:(fun _ -> "app.bsky.embed.record#viewRecord") 963 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 964 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 965 - |> Jsont.Object.opt_mem "embeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.embeds) 966 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 967 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 968 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 969 - |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 970 - |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 971 - |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 972 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 973 - |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 974 |> Jsont.Object.finish 975 976 - type view_not_found = { 977 - not_found : bool; 978 uri : string; 979 } 980 981 - let view_not_found_jsont = 982 - Jsont.Object.map ~kind:"View_not_found" 983 - (fun _typ not_found uri -> { not_found; uri }) 984 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewNotFound" ~enc:(fun _ -> "app.bsky.embed.record#viewNotFound") 985 - |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 986 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 987 |> Jsont.Object.finish 988 ··· 999 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1000 |> Jsont.Object.finish 1001 1002 - type view_blocked = { 1003 - author : Jsont.json; 1004 - blocked : bool; 1005 uri : string; 1006 } 1007 1008 - let view_blocked_jsont = 1009 - Jsont.Object.map ~kind:"View_blocked" 1010 - (fun _typ author blocked uri -> { author; blocked; uri }) 1011 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewBlocked" ~enc:(fun _ -> "app.bsky.embed.record#viewBlocked") 1012 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1013 - |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 1014 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1015 |> Jsont.Object.finish 1016 1017 - type view = { 1018 - record : Jsont.json; 1019 - } 1020 - 1021 - let view_jsont = 1022 - Jsont.Object.map ~kind:"View" 1023 - (fun _typ record -> { record }) 1024 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#view" ~enc:(fun _ -> "app.bsky.embed.record#view") 1025 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1026 - |> Jsont.Object.finish 1027 - 1028 - type main = { 1029 - record : Com.Atproto.Repo.StrongRef.main; 1030 - } 1031 - 1032 - let main_jsont = 1033 - Jsont.Object.map ~kind:"Main" 1034 - (fun _typ record -> { record }) 1035 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record" ~enc:(fun _ -> "app.bsky.embed.record") 1036 - |> Jsont.Object.mem "record" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.record) 1037 - |> Jsont.Object.finish 1038 - 1039 - end 1040 - end 1041 - module Notification = struct 1042 - module UpdateSeen = struct 1043 - type input = { 1044 - seen_at : string; 1045 - } 1046 - 1047 - let input_jsont = 1048 - Jsont.Object.map ~kind:"Input" 1049 - (fun _typ seen_at -> { seen_at }) 1050 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.updateSeen#input" ~enc:(fun _ -> "app.bsky.notification.updateSeen#input") 1051 - |> Jsont.Object.mem "seenAt" Jsont.string ~enc:(fun r -> r.seen_at) 1052 - |> Jsont.Object.finish 1053 - 1054 - end 1055 - module RegisterPush = struct 1056 - type input = { 1057 - age_restricted : bool option; 1058 - app_id : string; 1059 - platform : string; 1060 - service_did : string; 1061 - token : string; 1062 - } 1063 - 1064 - let input_jsont = 1065 - Jsont.Object.map ~kind:"Input" 1066 - (fun _typ age_restricted app_id platform service_did token -> { age_restricted; app_id; platform; service_did; token }) 1067 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.registerPush#input" ~enc:(fun _ -> "app.bsky.notification.registerPush#input") 1068 - |> Jsont.Object.opt_mem "ageRestricted" Jsont.bool ~enc:(fun r -> r.age_restricted) 1069 - |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 1070 - |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 1071 - |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 1072 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1073 - |> Jsont.Object.finish 1074 - 1075 - end 1076 - module ListNotifications = struct 1077 - type notification = { 1078 author : Jsont.json; 1079 cid : string; 1080 indexed_at : string; 1081 - is_read : bool; 1082 labels : Com.Atproto.Label.Defs.label list option; 1083 - reason : string; 1084 - reason_subject : string option; 1085 - record : Jsont.json; 1086 uri : string; 1087 } 1088 1089 - let notification_jsont = 1090 - Jsont.Object.map ~kind:"Notification" 1091 - (fun _typ author cid indexed_at is_read labels reason reason_subject record uri -> { author; cid; indexed_at; is_read; labels; reason; reason_subject; record; uri }) 1092 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listNotifications#notification" ~enc:(fun _ -> "app.bsky.notification.listNotifications#notification") 1093 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1094 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 1095 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1096 - |> Jsont.Object.mem "isRead" Jsont.bool ~enc:(fun r -> r.is_read) 1097 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1098 - |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 1099 - |> Jsont.Object.opt_mem "reasonSubject" Jsont.string ~enc:(fun r -> r.reason_subject) 1100 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1101 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1102 |> Jsont.Object.finish 1103 1104 - type params = { 1105 - cursor : string option; 1106 - limit : int option; 1107 - priority : bool option; 1108 - reasons : string list option; 1109 - seen_at : string option; 1110 - } 1111 1112 - let params_jsont = 1113 - Jsont.Object.map ~kind:"Params" 1114 - (fun cursor limit priority reasons seen_at -> { 1115 - cursor; 1116 - limit; 1117 - priority; 1118 - reasons; 1119 - seen_at; 1120 - }) 1121 - |> Jsont.Object.opt_mem "cursor" Jsont.string 1122 - ~enc:(fun r -> r.cursor) 1123 - |> Jsont.Object.opt_mem "limit" Jsont.int 1124 - ~enc:(fun r -> r.limit) 1125 - |> Jsont.Object.opt_mem "priority" Jsont.bool 1126 - ~enc:(fun r -> r.priority) 1127 - |> Jsont.Object.opt_mem "reasons" (Jsont.list Jsont.string) 1128 - ~enc:(fun r -> r.reasons) 1129 - |> Jsont.Object.opt_mem "seenAt" Jsont.string 1130 - ~enc:(fun r -> r.seen_at) 1131 - |> Jsont.Object.finish 1132 1133 - type output = { 1134 - cursor : string option; 1135 - notifications : Jsont.json list; 1136 - priority : bool option; 1137 - seen_at : string option; 1138 } 1139 1140 - let output_jsont = 1141 - Jsont.Object.map ~kind:"Output" 1142 - (fun _typ cursor notifications priority seen_at -> { cursor; notifications; priority; seen_at }) 1143 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listNotifications#output" ~enc:(fun _ -> "app.bsky.notification.listNotifications#output") 1144 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 1145 - |> Jsont.Object.mem "notifications" (Jsont.list Jsont.json) ~enc:(fun r -> r.notifications) 1146 - |> Jsont.Object.opt_mem "priority" Jsont.bool ~enc:(fun r -> r.priority) 1147 - |> Jsont.Object.opt_mem "seenAt" Jsont.string ~enc:(fun r -> r.seen_at) 1148 |> Jsont.Object.finish 1149 1150 - end 1151 - module GetUnreadCount = struct 1152 - type params = { 1153 - priority : bool option; 1154 - seen_at : string option; 1155 } 1156 1157 - let params_jsont = 1158 - Jsont.Object.map ~kind:"Params" 1159 - (fun priority seen_at -> { 1160 - priority; 1161 - seen_at; 1162 - }) 1163 - |> Jsont.Object.opt_mem "priority" Jsont.bool 1164 - ~enc:(fun r -> r.priority) 1165 - |> Jsont.Object.opt_mem "seenAt" Jsont.string 1166 - ~enc:(fun r -> r.seen_at) 1167 |> Jsont.Object.finish 1168 1169 - type output = { 1170 - count : int; 1171 } 1172 1173 - let output_jsont = 1174 - Jsont.Object.map ~kind:"Output" 1175 - (fun _typ count -> { count }) 1176 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.getUnreadCount#output" ~enc:(fun _ -> "app.bsky.notification.getUnreadCount#output") 1177 - |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 1178 |> Jsont.Object.finish 1179 1180 - end 1181 - module UnregisterPush = struct 1182 - type input = { 1183 - app_id : string; 1184 - platform : string; 1185 - service_did : string; 1186 - token : string; 1187 } 1188 1189 - let input_jsont = 1190 - Jsont.Object.map ~kind:"Input" 1191 - (fun _typ app_id platform service_did token -> { app_id; platform; service_did; token }) 1192 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.unregisterPush#input" ~enc:(fun _ -> "app.bsky.notification.unregisterPush#input") 1193 - |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 1194 - |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 1195 - |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 1196 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1197 |> Jsont.Object.finish 1198 1199 - end 1200 - module PutPreferences = struct 1201 - type input = { 1202 - priority : bool; 1203 } 1204 1205 - let input_jsont = 1206 - Jsont.Object.map ~kind:"Input" 1207 - (fun _typ priority -> { priority }) 1208 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferences#input" ~enc:(fun _ -> "app.bsky.notification.putPreferences#input") 1209 - |> Jsont.Object.mem "priority" Jsont.bool ~enc:(fun r -> r.priority) 1210 |> Jsont.Object.finish 1211 1212 - end 1213 - module Defs = struct 1214 - type record_deleted = unit 1215 - 1216 - let record_deleted_jsont = Jsont.ignore 1217 - 1218 - type preference = { 1219 - list_ : bool; 1220 - push : bool; 1221 } 1222 1223 - let preference_jsont = 1224 - Jsont.Object.map ~kind:"Preference" 1225 - (fun _typ list_ push -> { list_; push }) 1226 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#preference" ~enc:(fun _ -> "app.bsky.notification.defs#preference") 1227 - |> Jsont.Object.mem "list" Jsont.bool ~enc:(fun r -> r.list_) 1228 - |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 1229 |> Jsont.Object.finish 1230 1231 - type filterable_preference = { 1232 - include_ : string; 1233 - list_ : bool; 1234 - push : bool; 1235 } 1236 1237 - let filterable_preference_jsont = 1238 - Jsont.Object.map ~kind:"Filterable_preference" 1239 - (fun _typ include_ list_ push -> { include_; list_; push }) 1240 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#filterablePreference" ~enc:(fun _ -> "app.bsky.notification.defs#filterablePreference") 1241 - |> Jsont.Object.mem "include" Jsont.string ~enc:(fun r -> r.include_) 1242 - |> Jsont.Object.mem "list" Jsont.bool ~enc:(fun r -> r.list_) 1243 - |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 1244 |> Jsont.Object.finish 1245 1246 - type chat_preference = { 1247 - include_ : string; 1248 - push : bool; 1249 } 1250 1251 - let chat_preference_jsont = 1252 - Jsont.Object.map ~kind:"Chat_preference" 1253 - (fun _typ include_ push -> { include_; push }) 1254 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#chatPreference" ~enc:(fun _ -> "app.bsky.notification.defs#chatPreference") 1255 - |> Jsont.Object.mem "include" Jsont.string ~enc:(fun r -> r.include_) 1256 - |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 1257 |> Jsont.Object.finish 1258 1259 - type activity_subscription = { 1260 - post : bool; 1261 - reply : bool; 1262 } 1263 1264 - let activity_subscription_jsont = 1265 - Jsont.Object.map ~kind:"Activity_subscription" 1266 - (fun _typ post reply -> { post; reply }) 1267 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#activitySubscription" ~enc:(fun _ -> "app.bsky.notification.defs#activitySubscription") 1268 - |> Jsont.Object.mem "post" Jsont.bool ~enc:(fun r -> r.post) 1269 - |> Jsont.Object.mem "reply" Jsont.bool ~enc:(fun r -> r.reply) 1270 |> Jsont.Object.finish 1271 1272 - type subject_activity_subscription = { 1273 - activity_subscription : Jsont.json; 1274 - subject : string; 1275 } 1276 1277 - let subject_activity_subscription_jsont = 1278 - Jsont.Object.map ~kind:"Subject_activity_subscription" 1279 - (fun _typ activity_subscription subject -> { activity_subscription; subject }) 1280 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#subjectActivitySubscription" ~enc:(fun _ -> "app.bsky.notification.defs#subjectActivitySubscription") 1281 - |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1282 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1283 |> Jsont.Object.finish 1284 1285 - type preferences = { 1286 - chat : Jsont.json; 1287 - follow : Jsont.json; 1288 - like : Jsont.json; 1289 - like_via_repost : Jsont.json; 1290 - mention : Jsont.json; 1291 - quote : Jsont.json; 1292 - reply : Jsont.json; 1293 - repost : Jsont.json; 1294 - repost_via_repost : Jsont.json; 1295 - starterpack_joined : Jsont.json; 1296 - subscribed_post : Jsont.json; 1297 - unverified : Jsont.json; 1298 - verified : Jsont.json; 1299 } 1300 1301 - let preferences_jsont = 1302 - Jsont.Object.map ~kind:"Preferences" 1303 - (fun _typ chat follow like like_via_repost mention quote reply repost repost_via_repost starterpack_joined subscribed_post unverified verified -> { chat; follow; like; like_via_repost; mention; quote; reply; repost; repost_via_repost; starterpack_joined; subscribed_post; unverified; verified }) 1304 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#preferences" ~enc:(fun _ -> "app.bsky.notification.defs#preferences") 1305 - |> Jsont.Object.mem "chat" Jsont.json ~enc:(fun r -> r.chat) 1306 - |> Jsont.Object.mem "follow" Jsont.json ~enc:(fun r -> r.follow) 1307 - |> Jsont.Object.mem "like" Jsont.json ~enc:(fun r -> r.like) 1308 - |> Jsont.Object.mem "likeViaRepost" Jsont.json ~enc:(fun r -> r.like_via_repost) 1309 - |> Jsont.Object.mem "mention" Jsont.json ~enc:(fun r -> r.mention) 1310 - |> Jsont.Object.mem "quote" Jsont.json ~enc:(fun r -> r.quote) 1311 - |> Jsont.Object.mem "reply" Jsont.json ~enc:(fun r -> r.reply) 1312 - |> Jsont.Object.mem "repost" Jsont.json ~enc:(fun r -> r.repost) 1313 - |> Jsont.Object.mem "repostViaRepost" Jsont.json ~enc:(fun r -> r.repost_via_repost) 1314 - |> Jsont.Object.mem "starterpackJoined" Jsont.json ~enc:(fun r -> r.starterpack_joined) 1315 - |> Jsont.Object.mem "subscribedPost" Jsont.json ~enc:(fun r -> r.subscribed_post) 1316 - |> Jsont.Object.mem "unverified" Jsont.json ~enc:(fun r -> r.unverified) 1317 - |> Jsont.Object.mem "verified" Jsont.json ~enc:(fun r -> r.verified) 1318 |> Jsont.Object.finish 1319 1320 - end 1321 - module Declaration = struct 1322 - type main = { 1323 - allow_subscriptions : string; 1324 } 1325 1326 - let main_jsont = 1327 - Jsont.Object.map ~kind:"Main" 1328 - (fun _typ allow_subscriptions -> { allow_subscriptions }) 1329 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.declaration" ~enc:(fun _ -> "app.bsky.notification.declaration") 1330 - |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1331 |> Jsont.Object.finish 1332 1333 end 1334 - module ListActivitySubscriptions = struct 1335 type params = { 1336 - cursor : string option; 1337 - limit : int option; 1338 } 1339 1340 let params_jsont = 1341 Jsont.Object.map ~kind:"Params" 1342 - (fun cursor limit -> { 1343 - cursor; 1344 - limit; 1345 }) 1346 - |> Jsont.Object.opt_mem "cursor" Jsont.string 1347 - ~enc:(fun r -> r.cursor) 1348 - |> Jsont.Object.opt_mem "limit" Jsont.int 1349 - ~enc:(fun r -> r.limit) 1350 |> Jsont.Object.finish 1351 1352 type output = { 1353 - cursor : string option; 1354 - subscriptions : Jsont.json list; 1355 } 1356 1357 let output_jsont = 1358 Jsont.Object.map ~kind:"Output" 1359 - (fun _typ cursor subscriptions -> { cursor; subscriptions }) 1360 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listActivitySubscriptions#output" ~enc:(fun _ -> "app.bsky.notification.listActivitySubscriptions#output") 1361 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 1362 - |> Jsont.Object.mem "subscriptions" (Jsont.list Jsont.json) ~enc:(fun r -> r.subscriptions) 1363 |> Jsont.Object.finish 1364 1365 end 1366 - module GetPreferences = struct 1367 - type params = unit 1368 - 1369 - let params_jsont = Jsont.ignore 1370 1371 - type output = { 1372 - preferences : Jsont.json; 1373 - } 1374 - 1375 - let output_jsont = 1376 - Jsont.Object.map ~kind:"Output" 1377 - (fun _typ preferences -> { preferences }) 1378 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.getPreferences#output" ~enc:(fun _ -> "app.bsky.notification.getPreferences#output") 1379 - |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 1380 - |> Jsont.Object.finish 1381 1382 end 1383 - module PutActivitySubscription = struct 1384 type input = { 1385 - activity_subscription : Jsont.json; 1386 - subject : string; 1387 } 1388 1389 let input_jsont = 1390 Jsont.Object.map ~kind:"Input" 1391 - (fun _typ activity_subscription subject -> { activity_subscription; subject }) 1392 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putActivitySubscription#input" ~enc:(fun _ -> "app.bsky.notification.putActivitySubscription#input") 1393 - |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1394 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1395 |> Jsont.Object.finish 1396 1397 - type output = { 1398 - activity_subscription : Jsont.json option; 1399 - subject : string; 1400 - } 1401 1402 - let output_jsont = 1403 - Jsont.Object.map ~kind:"Output" 1404 - (fun _typ activity_subscription subject -> { activity_subscription; subject }) 1405 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putActivitySubscription#output" ~enc:(fun _ -> "app.bsky.notification.putActivitySubscription#output") 1406 - |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1407 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1408 - |> Jsont.Object.finish 1409 - 1410 - end 1411 - module PutPreferencesV2 = struct 1412 - type input = { 1413 - chat : Jsont.json option; 1414 - follow : Jsont.json option; 1415 - like : Jsont.json option; 1416 - like_via_repost : Jsont.json option; 1417 - mention : Jsont.json option; 1418 - quote : Jsont.json option; 1419 - reply : Jsont.json option; 1420 - repost : Jsont.json option; 1421 - repost_via_repost : Jsont.json option; 1422 - starterpack_joined : Jsont.json option; 1423 - subscribed_post : Jsont.json option; 1424 - unverified : Jsont.json option; 1425 - verified : Jsont.json option; 1426 - } 1427 - 1428 - let input_jsont = 1429 - Jsont.Object.map ~kind:"Input" 1430 - (fun _typ chat follow like like_via_repost mention quote reply repost repost_via_repost starterpack_joined subscribed_post unverified verified -> { chat; follow; like; like_via_repost; mention; quote; reply; repost; repost_via_repost; starterpack_joined; subscribed_post; unverified; verified }) 1431 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferencesV2#input" ~enc:(fun _ -> "app.bsky.notification.putPreferencesV2#input") 1432 - |> Jsont.Object.opt_mem "chat" Jsont.json ~enc:(fun r -> r.chat) 1433 - |> Jsont.Object.opt_mem "follow" Jsont.json ~enc:(fun r -> r.follow) 1434 - |> Jsont.Object.opt_mem "like" Jsont.json ~enc:(fun r -> r.like) 1435 - |> Jsont.Object.opt_mem "likeViaRepost" Jsont.json ~enc:(fun r -> r.like_via_repost) 1436 - |> Jsont.Object.opt_mem "mention" Jsont.json ~enc:(fun r -> r.mention) 1437 - |> Jsont.Object.opt_mem "quote" Jsont.json ~enc:(fun r -> r.quote) 1438 - |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 1439 - |> Jsont.Object.opt_mem "repost" Jsont.json ~enc:(fun r -> r.repost) 1440 - |> Jsont.Object.opt_mem "repostViaRepost" Jsont.json ~enc:(fun r -> r.repost_via_repost) 1441 - |> Jsont.Object.opt_mem "starterpackJoined" Jsont.json ~enc:(fun r -> r.starterpack_joined) 1442 - |> Jsont.Object.opt_mem "subscribedPost" Jsont.json ~enc:(fun r -> r.subscribed_post) 1443 - |> Jsont.Object.opt_mem "unverified" Jsont.json ~enc:(fun r -> r.unverified) 1444 - |> Jsont.Object.opt_mem "verified" Jsont.json ~enc:(fun r -> r.verified) 1445 - |> Jsont.Object.finish 1446 - 1447 - type output = { 1448 - preferences : Jsont.json; 1449 - } 1450 - 1451 - let output_jsont = 1452 - Jsont.Object.map ~kind:"Output" 1453 - (fun _typ preferences -> { preferences }) 1454 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferencesV2#output" ~enc:(fun _ -> "app.bsky.notification.putPreferencesV2#output") 1455 - |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 1456 - |> Jsont.Object.finish 1457 1458 end 1459 end ··· 1512 1513 end 1514 module Defs = struct 1515 - type verification_view = { 1516 - created_at : string; 1517 - is_valid : bool; 1518 - issuer : string; 1519 - uri : string; 1520 } 1521 1522 - let verification_view_jsont = 1523 - Jsont.Object.map ~kind:"Verification_view" 1524 - (fun _typ created_at is_valid issuer uri -> { created_at; is_valid; issuer; uri }) 1525 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationView" ~enc:(fun _ -> "app.bsky.actor.defs#verificationView") 1526 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1527 - |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 1528 - |> Jsont.Object.mem "issuer" Jsont.string ~enc:(fun r -> r.issuer) 1529 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1530 |> Jsont.Object.finish 1531 1532 - type verification_prefs = { 1533 - hide_badges : bool option; 1534 } 1535 1536 - let verification_prefs_jsont = 1537 - Jsont.Object.map ~kind:"Verification_prefs" 1538 - (fun _typ hide_badges -> { hide_badges }) 1539 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationPrefs" ~enc:(fun _ -> "app.bsky.actor.defs#verificationPrefs") 1540 - |> Jsont.Object.opt_mem "hideBadges" Jsont.bool ~enc:(fun r -> r.hide_badges) 1541 |> Jsont.Object.finish 1542 1543 - type thread_view_pref = { 1544 - sort : string option; 1545 } 1546 1547 - let thread_view_pref_jsont = 1548 - Jsont.Object.map ~kind:"Thread_view_pref" 1549 - (fun _typ sort -> { sort }) 1550 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#threadViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#threadViewPref") 1551 - |> Jsont.Object.opt_mem "sort" Jsont.string ~enc:(fun r -> r.sort) 1552 |> Jsont.Object.finish 1553 1554 - type status_view = { 1555 - cid : string option; 1556 - embed : Jsont.json option; 1557 - expires_at : string option; 1558 - is_active : bool option; 1559 - is_disabled : bool option; 1560 - record : Jsont.json; 1561 - status : string; 1562 - uri : string option; 1563 } 1564 1565 - let status_view_jsont = 1566 - Jsont.Object.map ~kind:"Status_view" 1567 - (fun _typ cid embed expires_at is_active is_disabled record status uri -> { cid; embed; expires_at; is_active; is_disabled; record; status; uri }) 1568 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#statusView" ~enc:(fun _ -> "app.bsky.actor.defs#statusView") 1569 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 1570 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 1571 - |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 1572 - |> Jsont.Object.opt_mem "isActive" Jsont.bool ~enc:(fun r -> r.is_active) 1573 - |> Jsont.Object.opt_mem "isDisabled" Jsont.bool ~enc:(fun r -> r.is_disabled) 1574 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1575 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1576 - |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1577 |> Jsont.Object.finish 1578 1579 - type saved_feeds_pref = { 1580 - pinned : string list; 1581 - saved : string list; 1582 - timeline_index : int option; 1583 } 1584 1585 - let saved_feeds_pref_jsont = 1586 - Jsont.Object.map ~kind:"Saved_feeds_pref" 1587 - (fun _typ pinned saved timeline_index -> { pinned; saved; timeline_index }) 1588 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeedsPref" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeedsPref") 1589 - |> Jsont.Object.mem "pinned" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned) 1590 - |> Jsont.Object.mem "saved" (Jsont.list Jsont.string) ~enc:(fun r -> r.saved) 1591 - |> Jsont.Object.opt_mem "timelineIndex" Jsont.int ~enc:(fun r -> r.timeline_index) 1592 |> Jsont.Object.finish 1593 1594 - type saved_feed = { 1595 - id : string; 1596 - pinned : bool; 1597 - type_ : string; 1598 - value : string; 1599 } 1600 1601 - let saved_feed_jsont = 1602 - Jsont.Object.map ~kind:"Saved_feed" 1603 - (fun _typ id pinned type_ value -> { id; pinned; type_; value }) 1604 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeed" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeed") 1605 - |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1606 - |> Jsont.Object.mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 1607 - |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 1608 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1609 |> Jsont.Object.finish 1610 1611 - type profile_associated_chat = { 1612 - allow_incoming : string; 1613 } 1614 1615 - let profile_associated_chat_jsont = 1616 - Jsont.Object.map ~kind:"Profile_associated_chat" 1617 - (fun _typ allow_incoming -> { allow_incoming }) 1618 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedChat" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedChat") 1619 - |> Jsont.Object.mem "allowIncoming" Jsont.string ~enc:(fun r -> r.allow_incoming) 1620 |> Jsont.Object.finish 1621 1622 - type profile_associated_activity_subscription = { 1623 - allow_subscriptions : string; 1624 } 1625 1626 - let profile_associated_activity_subscription_jsont = 1627 - Jsont.Object.map ~kind:"Profile_associated_activity_subscription" 1628 - (fun _typ allow_subscriptions -> { allow_subscriptions }) 1629 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedActivitySubscription" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedActivitySubscription") 1630 - |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1631 |> Jsont.Object.finish 1632 1633 - type preferences = Jsont.json list 1634 - let preferences_jsont = (Jsont.list Jsont.json) 1635 - 1636 - type post_interaction_settings_pref = { 1637 - postgate_embedding_rules : Jsont.json list option; 1638 - threadgate_allow_rules : Jsont.json list option; 1639 - } 1640 - 1641 - let post_interaction_settings_pref_jsont = 1642 - Jsont.Object.map ~kind:"Post_interaction_settings_pref" 1643 - (fun _typ postgate_embedding_rules threadgate_allow_rules -> { postgate_embedding_rules; threadgate_allow_rules }) 1644 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#postInteractionSettingsPref" ~enc:(fun _ -> "app.bsky.actor.defs#postInteractionSettingsPref") 1645 - |> Jsont.Object.opt_mem "postgateEmbeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.postgate_embedding_rules) 1646 - |> Jsont.Object.opt_mem "threadgateAllowRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.threadgate_allow_rules) 1647 - |> Jsont.Object.finish 1648 - 1649 - type personal_details_pref = { 1650 - birth_date : string option; 1651 - } 1652 - 1653 - let personal_details_pref_jsont = 1654 - Jsont.Object.map ~kind:"Personal_details_pref" 1655 - (fun _typ birth_date -> { birth_date }) 1656 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#personalDetailsPref" ~enc:(fun _ -> "app.bsky.actor.defs#personalDetailsPref") 1657 - |> Jsont.Object.opt_mem "birthDate" Jsont.string ~enc:(fun r -> r.birth_date) 1658 - |> Jsont.Object.finish 1659 1660 type nux = { 1661 completed : bool; ··· 1674 |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1675 |> Jsont.Object.finish 1676 1677 - type muted_word_target = string 1678 - let muted_word_target_jsont = Jsont.string 1679 1680 - type labeler_pref_item = { 1681 - did : string; 1682 } 1683 1684 - let labeler_pref_item_jsont = 1685 - Jsont.Object.map ~kind:"Labeler_pref_item" 1686 - (fun _typ did -> { did }) 1687 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#labelerPrefItem" ~enc:(fun _ -> "app.bsky.actor.defs#labelerPrefItem") 1688 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1689 |> Jsont.Object.finish 1690 1691 - type interests_pref = { 1692 - tags : string list; 1693 } 1694 1695 - let interests_pref_jsont = 1696 - Jsont.Object.map ~kind:"Interests_pref" 1697 - (fun _typ tags -> { tags }) 1698 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#interestsPref" ~enc:(fun _ -> "app.bsky.actor.defs#interestsPref") 1699 - |> Jsont.Object.mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 1700 |> Jsont.Object.finish 1701 1702 - type hidden_posts_pref = { 1703 - items : string list; 1704 } 1705 1706 - let hidden_posts_pref_jsont = 1707 - Jsont.Object.map ~kind:"Hidden_posts_pref" 1708 - (fun _typ items -> { items }) 1709 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#hiddenPostsPref" ~enc:(fun _ -> "app.bsky.actor.defs#hiddenPostsPref") 1710 - |> Jsont.Object.mem "items" (Jsont.list Jsont.string) ~enc:(fun r -> r.items) 1711 |> Jsont.Object.finish 1712 1713 - type feed_view_pref = { 1714 - feed : string; 1715 - hide_quote_posts : bool option; 1716 - hide_replies : bool option; 1717 - hide_replies_by_like_count : int option; 1718 - hide_replies_by_unfollowed : bool option; 1719 - hide_reposts : bool option; 1720 } 1721 1722 - let feed_view_pref_jsont = 1723 - Jsont.Object.map ~kind:"Feed_view_pref" 1724 - (fun _typ feed hide_quote_posts hide_replies hide_replies_by_like_count hide_replies_by_unfollowed hide_reposts -> { feed; hide_quote_posts; hide_replies; hide_replies_by_like_count; hide_replies_by_unfollowed; hide_reposts }) 1725 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#feedViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#feedViewPref") 1726 - |> Jsont.Object.mem "feed" Jsont.string ~enc:(fun r -> r.feed) 1727 - |> Jsont.Object.opt_mem "hideQuotePosts" Jsont.bool ~enc:(fun r -> r.hide_quote_posts) 1728 - |> Jsont.Object.opt_mem "hideReplies" Jsont.bool ~enc:(fun r -> r.hide_replies) 1729 - |> Jsont.Object.opt_mem "hideRepliesByLikeCount" Jsont.int ~enc:(fun r -> r.hide_replies_by_like_count) 1730 - |> Jsont.Object.opt_mem "hideRepliesByUnfollowed" Jsont.bool ~enc:(fun r -> r.hide_replies_by_unfollowed) 1731 - |> Jsont.Object.opt_mem "hideReposts" Jsont.bool ~enc:(fun r -> r.hide_reposts) 1732 |> Jsont.Object.finish 1733 1734 - type declared_age_pref = { 1735 - is_over_age13 : bool option; 1736 - is_over_age16 : bool option; 1737 - is_over_age18 : bool option; 1738 } 1739 1740 - let declared_age_pref_jsont = 1741 - Jsont.Object.map ~kind:"Declared_age_pref" 1742 - (fun _typ is_over_age13 is_over_age16 is_over_age18 -> { is_over_age13; is_over_age16; is_over_age18 }) 1743 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#declaredAgePref" ~enc:(fun _ -> "app.bsky.actor.defs#declaredAgePref") 1744 - |> Jsont.Object.opt_mem "isOverAge13" Jsont.bool ~enc:(fun r -> r.is_over_age13) 1745 - |> Jsont.Object.opt_mem "isOverAge16" Jsont.bool ~enc:(fun r -> r.is_over_age16) 1746 - |> Jsont.Object.opt_mem "isOverAge18" Jsont.bool ~enc:(fun r -> r.is_over_age18) 1747 |> Jsont.Object.finish 1748 1749 - type content_label_pref = { 1750 - label : string; 1751 - labeler_did : string option; 1752 - visibility : string; 1753 } 1754 1755 - let content_label_pref_jsont = 1756 - Jsont.Object.map ~kind:"Content_label_pref" 1757 - (fun _typ label labeler_did visibility -> { label; labeler_did; visibility }) 1758 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#contentLabelPref" ~enc:(fun _ -> "app.bsky.actor.defs#contentLabelPref") 1759 - |> Jsont.Object.mem "label" Jsont.string ~enc:(fun r -> r.label) 1760 - |> Jsont.Object.opt_mem "labelerDid" Jsont.string ~enc:(fun r -> r.labeler_did) 1761 - |> Jsont.Object.mem "visibility" Jsont.string ~enc:(fun r -> r.visibility) 1762 |> Jsont.Object.finish 1763 1764 - type bsky_app_progress_guide = { 1765 - guide : string; 1766 } 1767 1768 - let bsky_app_progress_guide_jsont = 1769 - Jsont.Object.map ~kind:"Bsky_app_progress_guide" 1770 - (fun _typ guide -> { guide }) 1771 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#bskyAppProgressGuide" ~enc:(fun _ -> "app.bsky.actor.defs#bskyAppProgressGuide") 1772 - |> Jsont.Object.mem "guide" Jsont.string ~enc:(fun r -> r.guide) 1773 |> Jsont.Object.finish 1774 1775 - type adult_content_pref = { 1776 - enabled : bool; 1777 } 1778 1779 - let adult_content_pref_jsont = 1780 - Jsont.Object.map ~kind:"Adult_content_pref" 1781 - (fun _typ enabled -> { enabled }) 1782 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#adultContentPref" ~enc:(fun _ -> "app.bsky.actor.defs#adultContentPref") 1783 - |> Jsont.Object.mem "enabled" Jsont.bool ~enc:(fun r -> r.enabled) 1784 |> Jsont.Object.finish 1785 1786 - type verification_state = { 1787 - trusted_verifier_status : string; 1788 - verifications : Jsont.json list; 1789 - verified_status : string; 1790 } 1791 1792 - let verification_state_jsont = 1793 - Jsont.Object.map ~kind:"Verification_state" 1794 - (fun _typ trusted_verifier_status verifications verified_status -> { trusted_verifier_status; verifications; verified_status }) 1795 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationState" ~enc:(fun _ -> "app.bsky.actor.defs#verificationState") 1796 - |> Jsont.Object.mem "trustedVerifierStatus" Jsont.string ~enc:(fun r -> r.trusted_verifier_status) 1797 - |> Jsont.Object.mem "verifications" (Jsont.list Jsont.json) ~enc:(fun r -> r.verifications) 1798 - |> Jsont.Object.mem "verifiedStatus" Jsont.string ~enc:(fun r -> r.verified_status) 1799 |> Jsont.Object.finish 1800 1801 - type saved_feeds_pref_v2 = { 1802 - items : Jsont.json list; 1803 } 1804 1805 - let saved_feeds_pref_v2_jsont = 1806 - Jsont.Object.map ~kind:"Saved_feeds_pref_v2" 1807 - (fun _typ items -> { items }) 1808 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeedsPrefV2" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeedsPrefV2") 1809 - |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 1810 |> Jsont.Object.finish 1811 1812 - type profile_associated = { 1813 - activity_subscription : Jsont.json option; 1814 - chat : Jsont.json option; 1815 - feedgens : int option; 1816 - labeler : bool option; 1817 - lists : int option; 1818 - starter_packs : int option; 1819 } 1820 1821 - let profile_associated_jsont = 1822 - Jsont.Object.map ~kind:"Profile_associated" 1823 - (fun _typ activity_subscription chat feedgens labeler lists starter_packs -> { activity_subscription; chat; feedgens; labeler; lists; starter_packs }) 1824 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociated" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociated") 1825 - |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1826 - |> Jsont.Object.opt_mem "chat" Jsont.json ~enc:(fun r -> r.chat) 1827 - |> Jsont.Object.opt_mem "feedgens" Jsont.int ~enc:(fun r -> r.feedgens) 1828 - |> Jsont.Object.opt_mem "labeler" Jsont.bool ~enc:(fun r -> r.labeler) 1829 - |> Jsont.Object.opt_mem "lists" Jsont.int ~enc:(fun r -> r.lists) 1830 - |> Jsont.Object.opt_mem "starterPacks" Jsont.int ~enc:(fun r -> r.starter_packs) 1831 |> Jsont.Object.finish 1832 1833 type muted_word = { ··· 1849 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1850 |> Jsont.Object.finish 1851 1852 - type labelers_pref = { 1853 - labelers : Jsont.json list; 1854 } 1855 1856 - let labelers_pref_jsont = 1857 - Jsont.Object.map ~kind:"Labelers_pref" 1858 - (fun _typ labelers -> { labelers }) 1859 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#labelersPref" ~enc:(fun _ -> "app.bsky.actor.defs#labelersPref") 1860 - |> Jsont.Object.mem "labelers" (Jsont.list Jsont.json) ~enc:(fun r -> r.labelers) 1861 |> Jsont.Object.finish 1862 1863 - type bsky_app_state_pref = { 1864 - active_progress_guide : Jsont.json option; 1865 - nuxs : Jsont.json list option; 1866 - queued_nudges : string list option; 1867 } 1868 1869 - let bsky_app_state_pref_jsont = 1870 - Jsont.Object.map ~kind:"Bsky_app_state_pref" 1871 - (fun _typ active_progress_guide nuxs queued_nudges -> { active_progress_guide; nuxs; queued_nudges }) 1872 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#bskyAppStatePref" ~enc:(fun _ -> "app.bsky.actor.defs#bskyAppStatePref") 1873 - |> Jsont.Object.opt_mem "activeProgressGuide" Jsont.json ~enc:(fun r -> r.active_progress_guide) 1874 - |> Jsont.Object.opt_mem "nuxs" (Jsont.list Jsont.json) ~enc:(fun r -> r.nuxs) 1875 - |> Jsont.Object.opt_mem "queuedNudges" (Jsont.list Jsont.string) ~enc:(fun r -> r.queued_nudges) 1876 |> Jsont.Object.finish 1877 1878 type muted_words_pref = { ··· 1886 |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 1887 |> Jsont.Object.finish 1888 1889 - type viewer_state = { 1890 - activity_subscription : Jsont.json option; 1891 - blocked_by : bool option; 1892 - blocking : string option; 1893 - blocking_by_list : Jsont.json option; 1894 - followed_by : string option; 1895 - following : string option; 1896 - known_followers : Jsont.json option; 1897 - muted : bool option; 1898 - muted_by_list : Jsont.json option; 1899 } 1900 1901 - let viewer_state_jsont = 1902 - Jsont.Object.map ~kind:"Viewer_state" 1903 - (fun _typ activity_subscription blocked_by blocking blocking_by_list followed_by following known_followers muted muted_by_list -> { activity_subscription; blocked_by; blocking; blocking_by_list; followed_by; following; known_followers; muted; muted_by_list }) 1904 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#viewerState" ~enc:(fun _ -> "app.bsky.actor.defs#viewerState") 1905 - |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1906 - |> Jsont.Object.opt_mem "blockedBy" Jsont.bool ~enc:(fun r -> r.blocked_by) 1907 - |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 1908 - |> Jsont.Object.opt_mem "blockingByList" Jsont.json ~enc:(fun r -> r.blocking_by_list) 1909 - |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 1910 - |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 1911 - |> Jsont.Object.opt_mem "knownFollowers" Jsont.json ~enc:(fun r -> r.known_followers) 1912 - |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 1913 - |> Jsont.Object.opt_mem "mutedByList" Jsont.json ~enc:(fun r -> r.muted_by_list) 1914 |> Jsont.Object.finish 1915 1916 - type profile_view_detailed = { 1917 associated : Jsont.json option; 1918 avatar : string option; 1919 - banner : string option; 1920 created_at : string option; 1921 debug : Jsont.json option; 1922 description : string option; 1923 did : string; 1924 display_name : string option; 1925 - followers_count : int option; 1926 - follows_count : int option; 1927 handle : string; 1928 indexed_at : string option; 1929 - joined_via_starter_pack : Jsont.json option; 1930 labels : Com.Atproto.Label.Defs.label list option; 1931 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 1932 - posts_count : int option; 1933 pronouns : string option; 1934 status : Jsont.json option; 1935 verification : Jsont.json option; 1936 viewer : Jsont.json option; 1937 - website : string option; 1938 } 1939 1940 - let profile_view_detailed_jsont = 1941 - Jsont.Object.map ~kind:"Profile_view_detailed" 1942 - (fun _typ associated avatar banner created_at debug description did display_name followers_count follows_count handle indexed_at joined_via_starter_pack labels pinned_post posts_count pronouns status verification viewer website -> { associated; avatar; banner; created_at; debug; description; did; display_name; followers_count; follows_count; handle; indexed_at; joined_via_starter_pack; labels; pinned_post; posts_count; pronouns; status; verification; viewer; website }) 1943 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileViewDetailed" ~enc:(fun _ -> "app.bsky.actor.defs#profileViewDetailed") 1944 |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1945 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1946 - |> Jsont.Object.opt_mem "banner" Jsont.string ~enc:(fun r -> r.banner) 1947 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1948 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1949 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1950 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1951 |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1952 - |> Jsont.Object.opt_mem "followersCount" Jsont.int ~enc:(fun r -> r.followers_count) 1953 - |> Jsont.Object.opt_mem "followsCount" Jsont.int ~enc:(fun r -> r.follows_count) 1954 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1955 |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1956 - |> Jsont.Object.opt_mem "joinedViaStarterPack" Jsont.json ~enc:(fun r -> r.joined_via_starter_pack) 1957 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1958 - |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 1959 - |> Jsont.Object.opt_mem "postsCount" Jsont.int ~enc:(fun r -> r.posts_count) 1960 |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1961 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 1962 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1963 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1964 - |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 1965 |> Jsont.Object.finish 1966 1967 type profile_view_basic = { ··· 1997 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1998 |> Jsont.Object.finish 1999 2000 - type profile_view = { 2001 associated : Jsont.json option; 2002 avatar : string option; 2003 created_at : string option; 2004 debug : Jsont.json option; 2005 description : string option; 2006 did : string; 2007 display_name : string option; 2008 handle : string; 2009 indexed_at : string option; 2010 labels : Com.Atproto.Label.Defs.label list option; 2011 pronouns : string option; 2012 status : Jsont.json option; 2013 verification : Jsont.json option; 2014 viewer : Jsont.json option; 2015 } 2016 2017 - let profile_view_jsont = 2018 - Jsont.Object.map ~kind:"Profile_view" 2019 - (fun _typ associated avatar created_at debug description did display_name handle indexed_at labels pronouns status verification viewer -> { associated; avatar; created_at; debug; description; did; display_name; handle; indexed_at; labels; pronouns; status; verification; viewer }) 2020 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileView" ~enc:(fun _ -> "app.bsky.actor.defs#profileView") 2021 |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 2022 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2023 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2024 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 2025 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2026 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2027 |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 2028 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 2029 |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2030 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2031 |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 2032 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 2033 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 2034 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2035 |> Jsont.Object.finish 2036 2037 - type known_followers = { 2038 - count : int; 2039 - followers : Jsont.json list; 2040 - } 2041 - 2042 - let known_followers_jsont = 2043 - Jsont.Object.map ~kind:"Known_followers" 2044 - (fun _typ count followers -> { count; followers }) 2045 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#knownFollowers" ~enc:(fun _ -> "app.bsky.actor.defs#knownFollowers") 2046 - |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 2047 - |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2048 - |> Jsont.Object.finish 2049 - 2050 - end 2051 - module GetPreferences = struct 2052 - type params = unit 2053 - 2054 - let params_jsont = Jsont.ignore 2055 - 2056 - type output = { 2057 - preferences : Jsont.json; 2058 } 2059 2060 - let output_jsont = 2061 - Jsont.Object.map ~kind:"Output" 2062 - (fun _typ preferences -> { preferences }) 2063 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getPreferences#output" ~enc:(fun _ -> "app.bsky.actor.getPreferences#output") 2064 - |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 2065 |> Jsont.Object.finish 2066 2067 end ··· 2099 |> Jsont.Object.finish 2100 2101 end 2102 - module GetProfile = struct 2103 - type params = { 2104 - actor : string; 2105 - } 2106 - 2107 - let params_jsont = 2108 - Jsont.Object.map ~kind:"Params" 2109 - (fun actor -> { 2110 - actor; 2111 - }) 2112 - |> Jsont.Object.mem "actor" Jsont.string 2113 - ~enc:(fun r -> r.actor) 2114 - |> Jsont.Object.finish 2115 - 2116 - type output = Jsont.json 2117 - 2118 - let output_jsont = Jsont.json 2119 - 2120 - end 2121 module SearchActors = struct 2122 type params = { 2123 cursor : string option; ··· 2158 |> Jsont.Object.finish 2159 2160 end 2161 module GetSuggestions = struct 2162 type params = { 2163 cursor : string option; ··· 2218 |> Jsont.Object.finish 2219 2220 end 2221 - module PutPreferences = struct 2222 - type input = { 2223 - preferences : Jsont.json; 2224 - } 2225 - 2226 - let input_jsont = 2227 - Jsont.Object.map ~kind:"Input" 2228 - (fun _typ preferences -> { preferences }) 2229 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.putPreferences#input" ~enc:(fun _ -> "app.bsky.actor.putPreferences#input") 2230 - |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 2231 - |> Jsont.Object.finish 2232 - 2233 - end 2234 - end 2235 - module Contact = struct 2236 - module Defs = struct 2237 - type sync_status = { 2238 - matches_count : int; 2239 - synced_at : string; 2240 - } 2241 - 2242 - let sync_status_jsont = 2243 - Jsont.Object.map ~kind:"Sync_status" 2244 - (fun _typ matches_count synced_at -> { matches_count; synced_at }) 2245 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#syncStatus" ~enc:(fun _ -> "app.bsky.contact.defs#syncStatus") 2246 - |> Jsont.Object.mem "matchesCount" Jsont.int ~enc:(fun r -> r.matches_count) 2247 - |> Jsont.Object.mem "syncedAt" Jsont.string ~enc:(fun r -> r.synced_at) 2248 - |> Jsont.Object.finish 2249 - 2250 - type notification = { 2251 - from : string; 2252 - to_ : string; 2253 - } 2254 - 2255 - let notification_jsont = 2256 - Jsont.Object.map ~kind:"Notification" 2257 - (fun _typ from to_ -> { from; to_ }) 2258 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#notification" ~enc:(fun _ -> "app.bsky.contact.defs#notification") 2259 - |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 2260 - |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 2261 - |> Jsont.Object.finish 2262 - 2263 - type match_and_contact_index = { 2264 - contact_index : int; 2265 - match_ : Jsont.json; 2266 - } 2267 - 2268 - let match_and_contact_index_jsont = 2269 - Jsont.Object.map ~kind:"Match_and_contact_index" 2270 - (fun _typ contact_index match_ -> { contact_index; match_ }) 2271 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#matchAndContactIndex" ~enc:(fun _ -> "app.bsky.contact.defs#matchAndContactIndex") 2272 - |> Jsont.Object.mem "contactIndex" Jsont.int ~enc:(fun r -> r.contact_index) 2273 - |> Jsont.Object.mem "match" Jsont.json ~enc:(fun r -> r.match_) 2274 - |> Jsont.Object.finish 2275 - 2276 - end 2277 - module RemoveData = struct 2278 - type input = unit 2279 - 2280 - let input_jsont = Jsont.ignore 2281 - 2282 - type output = unit 2283 - 2284 - let output_jsont = Jsont.ignore 2285 - 2286 - end 2287 - module DismissMatch = struct 2288 - type input = { 2289 - subject : string; 2290 - } 2291 - 2292 - let input_jsont = 2293 - Jsont.Object.map ~kind:"Input" 2294 - (fun _typ subject -> { subject }) 2295 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.dismissMatch#input" ~enc:(fun _ -> "app.bsky.contact.dismissMatch#input") 2296 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2297 - |> Jsont.Object.finish 2298 - 2299 - type output = unit 2300 - 2301 - let output_jsont = Jsont.ignore 2302 - 2303 - end 2304 - module GetMatches = struct 2305 type params = { 2306 - cursor : string option; 2307 - limit : int option; 2308 } 2309 2310 let params_jsont = 2311 Jsont.Object.map ~kind:"Params" 2312 - (fun cursor limit -> { 2313 - cursor; 2314 - limit; 2315 }) 2316 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2317 - ~enc:(fun r -> r.cursor) 2318 - |> Jsont.Object.opt_mem "limit" Jsont.int 2319 - ~enc:(fun r -> r.limit) 2320 |> Jsont.Object.finish 2321 2322 - type output = { 2323 - cursor : string option; 2324 - matches : Jsont.json list; 2325 - } 2326 2327 - let output_jsont = 2328 - Jsont.Object.map ~kind:"Output" 2329 - (fun _typ cursor matches -> { cursor; matches }) 2330 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getMatches#output" ~enc:(fun _ -> "app.bsky.contact.getMatches#output") 2331 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2332 - |> Jsont.Object.mem "matches" (Jsont.list Jsont.json) ~enc:(fun r -> r.matches) 2333 - |> Jsont.Object.finish 2334 2335 end 2336 - module VerifyPhone = struct 2337 - type input = { 2338 - code : string; 2339 - phone : string; 2340 - } 2341 2342 - let input_jsont = 2343 - Jsont.Object.map ~kind:"Input" 2344 - (fun _typ code phone -> { code; phone }) 2345 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#input" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#input") 2346 - |> Jsont.Object.mem "code" Jsont.string ~enc:(fun r -> r.code) 2347 - |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 2348 - |> Jsont.Object.finish 2349 2350 type output = { 2351 - token : string; 2352 } 2353 2354 let output_jsont = 2355 Jsont.Object.map ~kind:"Output" 2356 - (fun _typ token -> { token }) 2357 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#output" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#output") 2358 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 2359 |> Jsont.Object.finish 2360 2361 end 2362 - module StartPhoneVerification = struct 2363 - type input = { 2364 - phone : string; 2365 } 2366 2367 - let input_jsont = 2368 - Jsont.Object.map ~kind:"Input" 2369 - (fun _typ phone -> { phone }) 2370 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.startPhoneVerification#input" ~enc:(fun _ -> "app.bsky.contact.startPhoneVerification#input") 2371 - |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 2372 |> Jsont.Object.finish 2373 2374 - type output = unit 2375 - 2376 - let output_jsont = Jsont.ignore 2377 - 2378 end 2379 - module SendNotification = struct 2380 type input = { 2381 - from : string; 2382 - to_ : string; 2383 } 2384 2385 let input_jsont = 2386 Jsont.Object.map ~kind:"Input" 2387 - (fun _typ from to_ -> { from; to_ }) 2388 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.sendNotification#input" ~enc:(fun _ -> "app.bsky.contact.sendNotification#input") 2389 - |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 2390 - |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 2391 |> Jsont.Object.finish 2392 - 2393 - type output = unit 2394 - 2395 - let output_jsont = Jsont.ignore 2396 2397 end 2398 - module GetSyncStatus = struct 2399 - type params = unit 2400 - 2401 - let params_jsont = Jsont.ignore 2402 - 2403 - type output = { 2404 - sync_status : Defs.sync_status option; 2405 } 2406 2407 - let output_jsont = 2408 - Jsont.Object.map ~kind:"Output" 2409 - (fun _typ sync_status -> { sync_status }) 2410 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getSyncStatus#output" ~enc:(fun _ -> "app.bsky.contact.getSyncStatus#output") 2411 - |> Jsont.Object.opt_mem "syncStatus" Defs.sync_status_jsont ~enc:(fun r -> r.sync_status) 2412 |> Jsont.Object.finish 2413 2414 end 2415 - module ImportContacts = struct 2416 type input = { 2417 - contacts : string list; 2418 - token : string; 2419 } 2420 2421 let input_jsont = 2422 Jsont.Object.map ~kind:"Input" 2423 - (fun _typ contacts token -> { contacts; token }) 2424 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#input" ~enc:(fun _ -> "app.bsky.contact.importContacts#input") 2425 - |> Jsont.Object.mem "contacts" (Jsont.list Jsont.string) ~enc:(fun r -> r.contacts) 2426 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 2427 - |> Jsont.Object.finish 2428 - 2429 - type output = { 2430 - matches_and_contact_indexes : Defs.match_and_contact_index list; 2431 - } 2432 - 2433 - let output_jsont = 2434 - Jsont.Object.map ~kind:"Output" 2435 - (fun _typ matches_and_contact_indexes -> { matches_and_contact_indexes }) 2436 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#output" ~enc:(fun _ -> "app.bsky.contact.importContacts#output") 2437 - |> Jsont.Object.mem "matchesAndContactIndexes" (Jsont.list Defs.match_and_contact_index_jsont) ~enc:(fun r -> r.matches_and_contact_indexes) 2438 |> Jsont.Object.finish 2439 2440 end 2441 - end 2442 - module Graph = struct 2443 module Starterpack = struct 2444 type feed_item = { 2445 uri : string; ··· 2474 |> Jsont.Object.finish 2475 2476 end 2477 - module GetFollows = struct 2478 - type params = { 2479 actor : string; 2480 - cursor : string option; 2481 - limit : int option; 2482 } 2483 2484 - let params_jsont = 2485 - Jsont.Object.map ~kind:"Params" 2486 - (fun actor cursor limit -> { 2487 - actor; 2488 - cursor; 2489 - limit; 2490 - }) 2491 - |> Jsont.Object.mem "actor" Jsont.string 2492 - ~enc:(fun r -> r.actor) 2493 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2494 - ~enc:(fun r -> r.cursor) 2495 - |> Jsont.Object.opt_mem "limit" Jsont.int 2496 - ~enc:(fun r -> r.limit) 2497 |> Jsont.Object.finish 2498 2499 - type output = { 2500 - cursor : string option; 2501 - follows : Jsont.json list; 2502 - subject : Jsont.json; 2503 } 2504 2505 - let output_jsont = 2506 - Jsont.Object.map ~kind:"Output" 2507 - (fun _typ cursor follows subject -> { cursor; follows; subject }) 2508 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollows#output" ~enc:(fun _ -> "app.bsky.graph.getFollows#output") 2509 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2510 - |> Jsont.Object.mem "follows" (Jsont.list Jsont.json) ~enc:(fun r -> r.follows) 2511 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2512 |> Jsont.Object.finish 2513 2514 end ··· 2542 |> Jsont.Object.finish 2543 2544 end 2545 - module Block = struct 2546 - type main = { 2547 - created_at : string; 2548 - subject : string; 2549 } 2550 2551 - let main_jsont = 2552 - Jsont.Object.map ~kind:"Main" 2553 - (fun _typ created_at subject -> { created_at; subject }) 2554 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.block" ~enc:(fun _ -> "app.bsky.graph.block") 2555 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2556 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2557 - |> Jsont.Object.finish 2558 - 2559 - end 2560 - module Listblock = struct 2561 - type main = { 2562 - created_at : string; 2563 - subject : string; 2564 - } 2565 - 2566 - let main_jsont = 2567 - Jsont.Object.map ~kind:"Main" 2568 - (fun _typ created_at subject -> { created_at; subject }) 2569 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listblock" ~enc:(fun _ -> "app.bsky.graph.listblock") 2570 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2571 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2572 |> Jsont.Object.finish 2573 2574 - end 2575 - module MuteThread = struct 2576 - type input = { 2577 - root : string; 2578 } 2579 2580 - let input_jsont = 2581 - Jsont.Object.map ~kind:"Input" 2582 - (fun _typ root -> { root }) 2583 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteThread#input" ~enc:(fun _ -> "app.bsky.graph.muteThread#input") 2584 - |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 2585 |> Jsont.Object.finish 2586 2587 end 2588 - module GetFollowers = struct 2589 type params = { 2590 actor : string; 2591 cursor : string option; ··· 2616 let output_jsont = 2617 Jsont.Object.map ~kind:"Output" 2618 (fun _typ cursor followers subject -> { cursor; followers; subject }) 2619 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getFollowers#output") 2620 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2621 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2622 |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2623 |> Jsont.Object.finish 2624 2625 end 2626 - module UnmuteThread = struct 2627 - type input = { 2628 - root : string; 2629 - } 2630 - 2631 - let input_jsont = 2632 - Jsont.Object.map ~kind:"Input" 2633 - (fun _typ root -> { root }) 2634 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteThread#input" ~enc:(fun _ -> "app.bsky.graph.unmuteThread#input") 2635 - |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 2636 - |> Jsont.Object.finish 2637 - 2638 - end 2639 - module Follow = struct 2640 - type main = { 2641 - created_at : string; 2642 - subject : string; 2643 - via : Com.Atproto.Repo.StrongRef.main option; 2644 - } 2645 - 2646 - let main_jsont = 2647 - Jsont.Object.map ~kind:"Main" 2648 - (fun _typ created_at subject via -> { created_at; subject; via }) 2649 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.follow" ~enc:(fun _ -> "app.bsky.graph.follow") 2650 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2651 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2652 - |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 2653 - |> Jsont.Object.finish 2654 - 2655 - end 2656 - module UnmuteActor = struct 2657 - type input = { 2658 actor : string; 2659 - } 2660 - 2661 - let input_jsont = 2662 - Jsont.Object.map ~kind:"Input" 2663 - (fun _typ actor -> { actor }) 2664 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActor#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActor#input") 2665 - |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 2666 - |> Jsont.Object.finish 2667 - 2668 - end 2669 - module MuteActorList = struct 2670 - type input = { 2671 - list_ : string; 2672 } 2673 2674 - let input_jsont = 2675 - Jsont.Object.map ~kind:"Input" 2676 - (fun _typ list_ -> { list_ }) 2677 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActorList#input" ~enc:(fun _ -> "app.bsky.graph.muteActorList#input") 2678 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2679 |> Jsont.Object.finish 2680 2681 - end 2682 - module UnmuteActorList = struct 2683 - type input = { 2684 - list_ : string; 2685 } 2686 2687 - let input_jsont = 2688 - Jsont.Object.map ~kind:"Input" 2689 - (fun _typ list_ -> { list_ }) 2690 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActorList#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActorList#input") 2691 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2692 |> Jsont.Object.finish 2693 2694 end 2695 - module GetKnownFollowers = struct 2696 type params = { 2697 actor : string; 2698 cursor : string option; ··· 2723 let output_jsont = 2724 Jsont.Object.map ~kind:"Output" 2725 (fun _typ cursor followers subject -> { cursor; followers; subject }) 2726 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getKnownFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getKnownFollowers#output") 2727 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2728 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2729 |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2730 |> Jsont.Object.finish 2731 2732 end 2733 - module MuteActor = struct 2734 - type input = { 2735 - actor : string; 2736 } 2737 2738 - let input_jsont = 2739 - Jsont.Object.map ~kind:"Input" 2740 - (fun _typ actor -> { actor }) 2741 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActor#input" ~enc:(fun _ -> "app.bsky.graph.muteActor#input") 2742 - |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 2743 |> Jsont.Object.finish 2744 2745 end 2746 - module Listitem = struct 2747 type main = { 2748 created_at : string; 2749 - list_ : string; 2750 subject : string; 2751 } 2752 2753 let main_jsont = 2754 Jsont.Object.map ~kind:"Main" 2755 - (fun _typ created_at list_ subject -> { created_at; list_; subject }) 2756 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listitem" ~enc:(fun _ -> "app.bsky.graph.listitem") 2757 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2758 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2759 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2760 |> Jsont.Object.finish 2761 2762 end 2763 module Defs = struct 2764 - type starter_pack_view_basic = { 2765 - cid : string; 2766 - creator : Jsont.json; 2767 - indexed_at : string; 2768 - joined_all_time_count : int option; 2769 - joined_week_count : int option; 2770 - labels : Com.Atproto.Label.Defs.label list option; 2771 - list_item_count : int option; 2772 - record : Jsont.json; 2773 uri : string; 2774 } 2775 2776 - let starter_pack_view_basic_jsont = 2777 - Jsont.Object.map ~kind:"Starter_pack_view_basic" 2778 - (fun _typ cid creator indexed_at joined_all_time_count joined_week_count labels list_item_count record uri -> { cid; creator; indexed_at; joined_all_time_count; joined_week_count; labels; list_item_count; record; uri }) 2779 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackViewBasic") 2780 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2781 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2782 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2783 - |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 2784 - |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 2785 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2786 - |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2787 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2788 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2789 |> Jsont.Object.finish 2790 2791 - type relationship = { 2792 - blocked_by : string option; 2793 - blocked_by_list : string option; 2794 - blocking : string option; 2795 - blocking_by_list : string option; 2796 - did : string; 2797 - followed_by : string option; 2798 - following : string option; 2799 } 2800 2801 - let relationship_jsont = 2802 - Jsont.Object.map ~kind:"Relationship" 2803 - (fun _typ blocked_by blocked_by_list blocking blocking_by_list did followed_by following -> { blocked_by; blocked_by_list; blocking; blocking_by_list; did; followed_by; following }) 2804 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#relationship" ~enc:(fun _ -> "app.bsky.graph.defs#relationship") 2805 - |> Jsont.Object.opt_mem "blockedBy" Jsont.string ~enc:(fun r -> r.blocked_by) 2806 - |> Jsont.Object.opt_mem "blockedByList" Jsont.string ~enc:(fun r -> r.blocked_by_list) 2807 - |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 2808 - |> Jsont.Object.opt_mem "blockingByList" Jsont.string ~enc:(fun r -> r.blocking_by_list) 2809 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2810 - |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 2811 - |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 2812 |> Jsont.Object.finish 2813 2814 - type referencelist = string 2815 - let referencelist_jsont = Jsont.string 2816 2817 type not_found_actor = { 2818 actor : string; ··· 2827 |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 2828 |> Jsont.Object.finish 2829 2830 - type modlist = string 2831 - let modlist_jsont = Jsont.string 2832 2833 - type list_viewer_state = { 2834 - blocked : string option; 2835 - muted : bool option; 2836 } 2837 2838 - let list_viewer_state_jsont = 2839 - Jsont.Object.map ~kind:"List_viewer_state" 2840 - (fun _typ blocked muted -> { blocked; muted }) 2841 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewerState" ~enc:(fun _ -> "app.bsky.graph.defs#listViewerState") 2842 - |> Jsont.Object.opt_mem "blocked" Jsont.string ~enc:(fun r -> r.blocked) 2843 - |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 2844 |> Jsont.Object.finish 2845 2846 - type list_purpose = string 2847 - let list_purpose_jsont = Jsont.string 2848 - 2849 - type list_item_view = { 2850 - subject : Jsont.json; 2851 uri : string; 2852 } 2853 2854 - let list_item_view_jsont = 2855 - Jsont.Object.map ~kind:"List_item_view" 2856 - (fun _typ subject uri -> { subject; uri }) 2857 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listItemView" ~enc:(fun _ -> "app.bsky.graph.defs#listItemView") 2858 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2859 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2860 |> Jsont.Object.finish 2861 2862 - type curatelist = string 2863 - let curatelist_jsont = Jsont.string 2864 - 2865 - type list_view_basic = { 2866 avatar : string option; 2867 cid : string; 2868 - indexed_at : string option; 2869 labels : Com.Atproto.Label.Defs.label list option; 2870 list_item_count : int option; 2871 name : string; ··· 2874 viewer : Jsont.json option; 2875 } 2876 2877 - let list_view_basic_jsont = 2878 - Jsont.Object.map ~kind:"List_view_basic" 2879 - (fun _typ avatar cid indexed_at labels list_item_count name purpose uri viewer -> { avatar; cid; indexed_at; labels; list_item_count; name; purpose; uri; viewer }) 2880 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#listViewBasic") 2881 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2882 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2883 - |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2884 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2885 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2886 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) ··· 2889 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2890 |> Jsont.Object.finish 2891 2892 - type list_view = { 2893 avatar : string option; 2894 cid : string; 2895 - creator : Jsont.json; 2896 - description : string option; 2897 - description_facets : Richtext.Facet.main list option; 2898 - indexed_at : string; 2899 labels : Com.Atproto.Label.Defs.label list option; 2900 list_item_count : int option; 2901 name : string; ··· 2904 viewer : Jsont.json option; 2905 } 2906 2907 - let list_view_jsont = 2908 - Jsont.Object.map ~kind:"List_view" 2909 - (fun _typ avatar cid creator description description_facets indexed_at labels list_item_count name purpose uri viewer -> { avatar; cid; creator; description; description_facets; indexed_at; labels; list_item_count; name; purpose; uri; viewer }) 2910 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listView" ~enc:(fun _ -> "app.bsky.graph.defs#listView") 2911 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2912 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2913 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2914 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2915 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2916 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2917 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2918 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2919 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) ··· 2954 |> Jsont.Object.finish 2955 2956 end 2957 - module GetBlocks = struct 2958 - type params = { 2959 - cursor : string option; 2960 - limit : int option; 2961 - } 2962 - 2963 - let params_jsont = 2964 - Jsont.Object.map ~kind:"Params" 2965 - (fun cursor limit -> { 2966 - cursor; 2967 - limit; 2968 - }) 2969 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2970 - ~enc:(fun r -> r.cursor) 2971 - |> Jsont.Object.opt_mem "limit" Jsont.int 2972 - ~enc:(fun r -> r.limit) 2973 - |> Jsont.Object.finish 2974 - 2975 - type output = { 2976 - blocks : Jsont.json list; 2977 - cursor : string option; 2978 - } 2979 - 2980 - let output_jsont = 2981 - Jsont.Object.map ~kind:"Output" 2982 - (fun _typ blocks cursor -> { blocks; cursor }) 2983 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getBlocks#output") 2984 - |> Jsont.Object.mem "blocks" (Jsont.list Jsont.json) ~enc:(fun r -> r.blocks) 2985 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2986 - |> Jsont.Object.finish 2987 - 2988 - end 2989 - module Verification = struct 2990 type main = { 2991 created_at : string; 2992 - display_name : string; 2993 - handle : string; 2994 subject : string; 2995 } 2996 2997 let main_jsont = 2998 Jsont.Object.map ~kind:"Main" 2999 - (fun _typ created_at display_name handle subject -> { created_at; display_name; handle; subject }) 3000 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.verification" ~enc:(fun _ -> "app.bsky.graph.verification") 3001 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3002 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 3003 - |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 3004 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 3005 |> Jsont.Object.finish 3006 3007 end 3008 - module GetMutes = struct 3009 type params = { 3010 cursor : string option; 3011 limit : int option; 3012 } 3013 3014 let params_jsont = 3015 Jsont.Object.map ~kind:"Params" 3016 - (fun cursor limit -> { 3017 cursor; 3018 limit; 3019 }) 3020 |> Jsont.Object.opt_mem "cursor" Jsont.string 3021 ~enc:(fun r -> r.cursor) 3022 |> Jsont.Object.opt_mem "limit" Jsont.int 3023 ~enc:(fun r -> r.limit) 3024 |> Jsont.Object.finish 3025 3026 type output = { 3027 cursor : string option; 3028 - mutes : Jsont.json list; 3029 } 3030 3031 let output_jsont = 3032 Jsont.Object.map ~kind:"Output" 3033 - (fun _typ cursor mutes -> { cursor; mutes }) 3034 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getMutes#output" ~enc:(fun _ -> "app.bsky.graph.getMutes#output") 3035 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3036 - |> Jsont.Object.mem "mutes" (Jsont.list Jsont.json) ~enc:(fun r -> r.mutes) 3037 |> Jsont.Object.finish 3038 3039 end 3040 - module GetRelationships = struct 3041 - type params = { 3042 - actor : string; 3043 - others : string list option; 3044 - } 3045 - 3046 - let params_jsont = 3047 - Jsont.Object.map ~kind:"Params" 3048 - (fun actor others -> { 3049 - actor; 3050 - others; 3051 - }) 3052 - |> Jsont.Object.mem "actor" Jsont.string 3053 - ~enc:(fun r -> r.actor) 3054 - |> Jsont.Object.opt_mem "others" (Jsont.list Jsont.string) 3055 - ~enc:(fun r -> r.others) 3056 - |> Jsont.Object.finish 3057 - 3058 - type output = { 3059 - actor : string option; 3060 - relationships : Jsont.json list; 3061 } 3062 3063 - let output_jsont = 3064 - Jsont.Object.map ~kind:"Output" 3065 - (fun _typ actor relationships -> { actor; relationships }) 3066 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getRelationships#output" ~enc:(fun _ -> "app.bsky.graph.getRelationships#output") 3067 - |> Jsont.Object.opt_mem "actor" Jsont.string ~enc:(fun r -> r.actor) 3068 - |> Jsont.Object.mem "relationships" (Jsont.list Jsont.json) ~enc:(fun r -> r.relationships) 3069 |> Jsont.Object.finish 3070 3071 end ··· 3118 |> Jsont.Object.finish 3119 3120 end 3121 - module GetActorStarterPacks = struct 3122 type params = { 3123 - actor : string; 3124 - cursor : string option; 3125 - limit : int option; 3126 } 3127 3128 let params_jsont = 3129 Jsont.Object.map ~kind:"Params" 3130 - (fun actor cursor limit -> { 3131 - actor; 3132 - cursor; 3133 - limit; 3134 }) 3135 - |> Jsont.Object.mem "actor" Jsont.string 3136 - ~enc:(fun r -> r.actor) 3137 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3138 - ~enc:(fun r -> r.cursor) 3139 - |> Jsont.Object.opt_mem "limit" Jsont.int 3140 - ~enc:(fun r -> r.limit) 3141 |> Jsont.Object.finish 3142 3143 type output = { 3144 - cursor : string option; 3145 starter_packs : Jsont.json list; 3146 } 3147 3148 let output_jsont = 3149 Jsont.Object.map ~kind:"Output" 3150 - (fun _typ cursor starter_packs -> { cursor; starter_packs }) 3151 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getActorStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getActorStarterPacks#output") 3152 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3153 |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3154 |> Jsont.Object.finish 3155 3156 end 3157 - module List = struct 3158 - type main = { 3159 - avatar : Atp.Blob_ref.t option; 3160 - created_at : string; 3161 - description : string option; 3162 - description_facets : Richtext.Facet.main list option; 3163 - labels : Com.Atproto.Label.Defs.self_labels option; 3164 - name : string; 3165 - purpose : Jsont.json; 3166 } 3167 3168 - let main_jsont = 3169 - Jsont.Object.map ~kind:"Main" 3170 - (fun _typ avatar created_at description description_facets labels name purpose -> { avatar; created_at; description; description_facets; labels; name; purpose }) 3171 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.list" ~enc:(fun _ -> "app.bsky.graph.list") 3172 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 3173 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3174 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 3175 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 3176 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3177 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 3178 - |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 3179 |> Jsont.Object.finish 3180 3181 end 3182 - module SearchStarterPacks = struct 3183 type params = { 3184 - cursor : string option; 3185 - limit : int option; 3186 - q : string; 3187 } 3188 3189 let params_jsont = 3190 Jsont.Object.map ~kind:"Params" 3191 - (fun cursor limit q -> { 3192 - cursor; 3193 - limit; 3194 - q; 3195 }) 3196 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3197 - ~enc:(fun r -> r.cursor) 3198 - |> Jsont.Object.opt_mem "limit" Jsont.int 3199 - ~enc:(fun r -> r.limit) 3200 - |> Jsont.Object.mem "q" Jsont.string 3201 - ~enc:(fun r -> r.q) 3202 |> Jsont.Object.finish 3203 3204 type output = { 3205 - cursor : string option; 3206 - starter_packs : Jsont.json list; 3207 } 3208 3209 let output_jsont = 3210 Jsont.Object.map ~kind:"Output" 3211 - (fun _typ cursor starter_packs -> { cursor; starter_packs }) 3212 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.searchStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.searchStarterPacks#output") 3213 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3214 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3215 |> Jsont.Object.finish 3216 3217 end 3218 - module GetList = struct 3219 type params = { 3220 cursor : string option; 3221 limit : int option; 3222 - list_ : string; 3223 } 3224 3225 let params_jsont = 3226 Jsont.Object.map ~kind:"Params" 3227 - (fun cursor limit list_ -> { 3228 cursor; 3229 limit; 3230 - list_; 3231 }) 3232 |> Jsont.Object.opt_mem "cursor" Jsont.string 3233 ~enc:(fun r -> r.cursor) 3234 |> Jsont.Object.opt_mem "limit" Jsont.int 3235 ~enc:(fun r -> r.limit) 3236 - |> Jsont.Object.mem "list" Jsont.string 3237 - ~enc:(fun r -> r.list_) 3238 |> Jsont.Object.finish 3239 3240 type output = { 3241 cursor : string option; 3242 - items : Jsont.json list; 3243 - list_ : Jsont.json; 3244 } 3245 3246 let output_jsont = 3247 Jsont.Object.map ~kind:"Output" 3248 - (fun _typ cursor items list_ -> { cursor; items; list_ }) 3249 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getList#output" ~enc:(fun _ -> "app.bsky.graph.getList#output") 3250 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3251 - |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 3252 - |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3253 |> Jsont.Object.finish 3254 3255 end 3256 - module GetListBlocks = struct 3257 type params = { 3258 cursor : string option; 3259 limit : int option; 3260 } 3261 3262 let params_jsont = 3263 Jsont.Object.map ~kind:"Params" 3264 - (fun cursor limit -> { 3265 cursor; 3266 limit; 3267 }) 3268 |> Jsont.Object.opt_mem "cursor" Jsont.string 3269 ~enc:(fun r -> r.cursor) 3270 |> Jsont.Object.opt_mem "limit" Jsont.int 3271 ~enc:(fun r -> r.limit) 3272 |> Jsont.Object.finish 3273 3274 type output = { ··· 3279 let output_jsont = 3280 Jsont.Object.map ~kind:"Output" 3281 (fun _typ cursor lists -> { cursor; lists }) 3282 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getListBlocks#output") 3283 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3284 |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3285 |> Jsont.Object.finish 3286 3287 end 3288 - module GetStarterPack = struct 3289 - type params = { 3290 - starter_pack : string; 3291 - } 3292 - 3293 - let params_jsont = 3294 - Jsont.Object.map ~kind:"Params" 3295 - (fun starter_pack -> { 3296 - starter_pack; 3297 - }) 3298 - |> Jsont.Object.mem "starterPack" Jsont.string 3299 - ~enc:(fun r -> r.starter_pack) 3300 - |> Jsont.Object.finish 3301 - 3302 - type output = { 3303 - starter_pack : Jsont.json; 3304 - } 3305 - 3306 - let output_jsont = 3307 - Jsont.Object.map ~kind:"Output" 3308 - (fun _typ starter_pack -> { starter_pack }) 3309 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPack#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPack#output") 3310 - |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 3311 - |> Jsont.Object.finish 3312 - 3313 - end 3314 - module GetListsWithMembership = struct 3315 - type list_with_membership = { 3316 - list_ : Jsont.json; 3317 - list_item : Jsont.json option; 3318 - } 3319 - 3320 - let list_with_membership_jsont = 3321 - Jsont.Object.map ~kind:"List_with_membership" 3322 - (fun _typ list_ list_item -> { list_; list_item }) 3323 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#listWithMembership" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#listWithMembership") 3324 - |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3325 - |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 3326 - |> Jsont.Object.finish 3327 - 3328 type params = { 3329 - actor : string; 3330 cursor : string option; 3331 limit : int option; 3332 - purposes : string list option; 3333 } 3334 3335 let params_jsont = 3336 Jsont.Object.map ~kind:"Params" 3337 - (fun actor cursor limit purposes -> { 3338 - actor; 3339 cursor; 3340 limit; 3341 - purposes; 3342 }) 3343 - |> Jsont.Object.mem "actor" Jsont.string 3344 - ~enc:(fun r -> r.actor) 3345 |> Jsont.Object.opt_mem "cursor" Jsont.string 3346 ~enc:(fun r -> r.cursor) 3347 |> Jsont.Object.opt_mem "limit" Jsont.int 3348 ~enc:(fun r -> r.limit) 3349 - |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3350 - ~enc:(fun r -> r.purposes) 3351 |> Jsont.Object.finish 3352 3353 type output = { 3354 cursor : string option; 3355 - lists_with_membership : Jsont.json list; 3356 } 3357 3358 let output_jsont = 3359 Jsont.Object.map ~kind:"Output" 3360 - (fun _typ cursor lists_with_membership -> { cursor; lists_with_membership }) 3361 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#output" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#output") 3362 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3363 - |> Jsont.Object.mem "listsWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists_with_membership) 3364 |> Jsont.Object.finish 3365 3366 end 3367 - module GetListMutes = struct 3368 type params = { 3369 cursor : string option; 3370 limit : int option; ··· 3390 let output_jsont = 3391 Jsont.Object.map ~kind:"Output" 3392 (fun _typ cursor lists -> { cursor; lists }) 3393 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListMutes#output" ~enc:(fun _ -> "app.bsky.graph.getListMutes#output") 3394 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3395 |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3396 |> Jsont.Object.finish 3397 3398 end 3399 - module GetStarterPacks = struct 3400 type params = { 3401 - uris : string list; 3402 } 3403 3404 let params_jsont = 3405 Jsont.Object.map ~kind:"Params" 3406 - (fun uris -> { 3407 - uris; 3408 }) 3409 - |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 3410 - ~enc:(fun r -> r.uris) 3411 |> Jsont.Object.finish 3412 3413 type output = { 3414 - starter_packs : Jsont.json list; 3415 } 3416 3417 let output_jsont = 3418 Jsont.Object.map ~kind:"Output" 3419 - (fun _typ starter_packs -> { starter_packs }) 3420 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPacks#output") 3421 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3422 |> Jsont.Object.finish 3423 3424 end 3425 - module GetLists = struct 3426 type params = { 3427 actor : string; 3428 cursor : string option; 3429 limit : int option; 3430 - purposes : string list option; 3431 } 3432 3433 let params_jsont = 3434 Jsont.Object.map ~kind:"Params" 3435 - (fun actor cursor limit purposes -> { 3436 actor; 3437 cursor; 3438 limit; 3439 - purposes; 3440 }) 3441 |> Jsont.Object.mem "actor" Jsont.string 3442 ~enc:(fun r -> r.actor) ··· 3444 ~enc:(fun r -> r.cursor) 3445 |> Jsont.Object.opt_mem "limit" Jsont.int 3446 ~enc:(fun r -> r.limit) 3447 - |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3448 - ~enc:(fun r -> r.purposes) 3449 |> Jsont.Object.finish 3450 3451 type output = { 3452 cursor : string option; 3453 - lists : Jsont.json list; 3454 } 3455 3456 let output_jsont = 3457 Jsont.Object.map ~kind:"Output" 3458 - (fun _typ cursor lists -> { cursor; lists }) 3459 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getLists#output" ~enc:(fun _ -> "app.bsky.graph.getLists#output") 3460 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3461 - |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3462 |> Jsont.Object.finish 3463 3464 end 3465 end 3466 module Feed = struct 3467 - module Post = struct 3468 - type text_slice = { 3469 - end_ : int; 3470 - start : int; 3471 } 3472 3473 - let text_slice_jsont = 3474 - Jsont.Object.map ~kind:"Text_slice" 3475 - (fun _typ end_ start -> { end_; start }) 3476 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#textSlice" ~enc:(fun _ -> "app.bsky.feed.post#textSlice") 3477 - |> Jsont.Object.mem "end" Jsont.int ~enc:(fun r -> r.end_) 3478 - |> Jsont.Object.mem "start" Jsont.int ~enc:(fun r -> r.start) 3479 |> Jsont.Object.finish 3480 3481 type reply_ref = { 3482 parent : Com.Atproto.Repo.StrongRef.main; 3483 root : Com.Atproto.Repo.StrongRef.main; ··· 3491 |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3492 |> Jsont.Object.finish 3493 3494 type entity = { 3495 index : Jsont.json; 3496 type_ : string; ··· 3534 |> Jsont.Object.finish 3535 3536 end 3537 - module GetLikes = struct 3538 - type like = { 3539 - actor : Jsont.json; 3540 created_at : string; 3541 - indexed_at : string; 3542 } 3543 3544 - let like_jsont = 3545 - Jsont.Object.map ~kind:"Like" 3546 - (fun _typ actor created_at indexed_at -> { actor; created_at; indexed_at }) 3547 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getLikes#like" ~enc:(fun _ -> "app.bsky.feed.getLikes#like") 3548 - |> Jsont.Object.mem "actor" Jsont.json ~enc:(fun r -> r.actor) 3549 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3550 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3551 |> Jsont.Object.finish 3552 3553 type params = { 3554 cid : string option; 3555 cursor : string option; ··· 3578 type output = { 3579 cid : string option; 3580 cursor : string option; 3581 - likes : Jsont.json list; 3582 uri : string; 3583 } 3584 3585 let output_jsont = 3586 Jsont.Object.map ~kind:"Output" 3587 - (fun _typ cid cursor likes uri -> { cid; cursor; likes; uri }) 3588 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getLikes#output" ~enc:(fun _ -> "app.bsky.feed.getLikes#output") 3589 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3590 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3591 - |> Jsont.Object.mem "likes" (Jsont.list Jsont.json) ~enc:(fun r -> r.likes) 3592 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3593 |> Jsont.Object.finish 3594 3595 end 3596 - module Postgate = struct 3597 - type disable_rule = unit 3598 - 3599 - let disable_rule_jsont = Jsont.ignore 3600 - 3601 - type main = { 3602 created_at : string; 3603 - detached_embedding_uris : string list option; 3604 - embedding_rules : Jsont.json list option; 3605 - post : string; 3606 } 3607 3608 - let main_jsont = 3609 - Jsont.Object.map ~kind:"Main" 3610 - (fun _typ created_at detached_embedding_uris embedding_rules post -> { created_at; detached_embedding_uris; embedding_rules; post }) 3611 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.postgate" ~enc:(fun _ -> "app.bsky.feed.postgate") 3612 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3613 - |> Jsont.Object.opt_mem "detachedEmbeddingUris" (Jsont.list Jsont.string) ~enc:(fun r -> r.detached_embedding_uris) 3614 - |> Jsont.Object.opt_mem "embeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.embedding_rules) 3615 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3616 |> Jsont.Object.finish 3617 3618 - end 3619 - module GetRepostedBy = struct 3620 type params = { 3621 cid : string option; 3622 cursor : string option; ··· 3645 type output = { 3646 cid : string option; 3647 cursor : string option; 3648 - reposted_by : Jsont.json list; 3649 uri : string; 3650 } 3651 3652 let output_jsont = 3653 Jsont.Object.map ~kind:"Output" 3654 - (fun _typ cid cursor reposted_by uri -> { cid; cursor; reposted_by; uri }) 3655 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getRepostedBy#output" ~enc:(fun _ -> "app.bsky.feed.getRepostedBy#output") 3656 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3657 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3658 - |> Jsont.Object.mem "repostedBy" (Jsont.list Jsont.json) ~enc:(fun r -> r.reposted_by) 3659 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3660 |> Jsont.Object.finish 3661 3662 end 3663 - module DescribeFeedGenerator = struct 3664 - type links = { 3665 - privacy_policy : string option; 3666 - terms_of_service : string option; 3667 } 3668 3669 - let links_jsont = 3670 - Jsont.Object.map ~kind:"Links" 3671 - (fun _typ privacy_policy terms_of_service -> { privacy_policy; terms_of_service }) 3672 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#links" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#links") 3673 - |> Jsont.Object.opt_mem "privacyPolicy" Jsont.string ~enc:(fun r -> r.privacy_policy) 3674 - |> Jsont.Object.opt_mem "termsOfService" Jsont.string ~enc:(fun r -> r.terms_of_service) 3675 |> Jsont.Object.finish 3676 3677 type feed = { 3678 uri : string; 3679 } ··· 3685 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3686 |> Jsont.Object.finish 3687 3688 type output = { 3689 did : string; 3690 feeds : Jsont.json list; ··· 3701 |> Jsont.Object.finish 3702 3703 end 3704 - module Threadgate = struct 3705 - type mention_rule = unit 3706 - 3707 - let mention_rule_jsont = Jsont.ignore 3708 - 3709 - type list_rule = { 3710 - list_ : string; 3711 } 3712 3713 - let list_rule_jsont = 3714 - Jsont.Object.map ~kind:"List_rule" 3715 - (fun _typ list_ -> { list_ }) 3716 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate#listRule" ~enc:(fun _ -> "app.bsky.feed.threadgate#listRule") 3717 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3718 |> Jsont.Object.finish 3719 3720 - type following_rule = unit 3721 - 3722 - let following_rule_jsont = Jsont.ignore 3723 3724 - type follower_rule = unit 3725 3726 - let follower_rule_jsont = Jsont.ignore 3727 - 3728 - type main = { 3729 - allow : Jsont.json list option; 3730 - created_at : string; 3731 - hidden_replies : string list option; 3732 - post : string; 3733 - } 3734 3735 - let main_jsont = 3736 - Jsont.Object.map ~kind:"Main" 3737 - (fun _typ allow created_at hidden_replies post -> { allow; created_at; hidden_replies; post }) 3738 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate" ~enc:(fun _ -> "app.bsky.feed.threadgate") 3739 - |> Jsont.Object.opt_mem "allow" (Jsont.list Jsont.json) ~enc:(fun r -> r.allow) 3740 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3741 - |> Jsont.Object.opt_mem "hiddenReplies" (Jsont.list Jsont.string) ~enc:(fun r -> r.hidden_replies) 3742 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3743 - |> Jsont.Object.finish 3744 3745 - end 3746 - module Like = struct 3747 - type main = { 3748 - created_at : string; 3749 - subject : Com.Atproto.Repo.StrongRef.main; 3750 - via : Com.Atproto.Repo.StrongRef.main option; 3751 - } 3752 3753 - let main_jsont = 3754 - Jsont.Object.map ~kind:"Main" 3755 - (fun _typ created_at subject via -> { created_at; subject; via }) 3756 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.like" ~enc:(fun _ -> "app.bsky.feed.like") 3757 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3758 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 3759 - |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3760 - |> Jsont.Object.finish 3761 3762 - end 3763 - module Defs = struct 3764 - type viewer_state = { 3765 - bookmarked : bool option; 3766 - embedding_disabled : bool option; 3767 like : string option; 3768 - pinned : bool option; 3769 - reply_disabled : bool option; 3770 - repost : string option; 3771 - thread_muted : bool option; 3772 } 3773 3774 - let viewer_state_jsont = 3775 - Jsont.Object.map ~kind:"Viewer_state" 3776 - (fun _typ bookmarked embedding_disabled like pinned reply_disabled repost thread_muted -> { bookmarked; embedding_disabled; like; pinned; reply_disabled; repost; thread_muted }) 3777 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#viewerState" ~enc:(fun _ -> "app.bsky.feed.defs#viewerState") 3778 - |> Jsont.Object.opt_mem "bookmarked" Jsont.bool ~enc:(fun r -> r.bookmarked) 3779 - |> Jsont.Object.opt_mem "embeddingDisabled" Jsont.bool ~enc:(fun r -> r.embedding_disabled) 3780 |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3781 - |> Jsont.Object.opt_mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 3782 - |> Jsont.Object.opt_mem "replyDisabled" Jsont.bool ~enc:(fun r -> r.reply_disabled) 3783 - |> Jsont.Object.opt_mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3784 - |> Jsont.Object.opt_mem "threadMuted" Jsont.bool ~enc:(fun r -> r.thread_muted) 3785 |> Jsont.Object.finish 3786 3787 - type threadgate_view = { 3788 - cid : string option; 3789 - lists : Jsont.json list option; 3790 - record : Jsont.json option; 3791 - uri : string option; 3792 } 3793 3794 - let threadgate_view_jsont = 3795 - Jsont.Object.map ~kind:"Threadgate_view" 3796 - (fun _typ cid lists record uri -> { cid; lists; record; uri }) 3797 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadgateView" ~enc:(fun _ -> "app.bsky.feed.defs#threadgateView") 3798 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3799 - |> Jsont.Object.opt_mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3800 - |> Jsont.Object.opt_mem "record" Jsont.json ~enc:(fun r -> r.record) 3801 - |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3802 |> Jsont.Object.finish 3803 3804 - type thread_context = { 3805 - root_author_like : string option; 3806 - } 3807 3808 - let thread_context_jsont = 3809 - Jsont.Object.map ~kind:"Thread_context" 3810 - (fun _typ root_author_like -> { root_author_like }) 3811 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadContext" ~enc:(fun _ -> "app.bsky.feed.defs#threadContext") 3812 - |> Jsont.Object.opt_mem "rootAuthorLike" Jsont.string ~enc:(fun r -> r.root_author_like) 3813 - |> Jsont.Object.finish 3814 3815 - type skeleton_reason_repost = { 3816 - repost : string; 3817 - } 3818 3819 - let skeleton_reason_repost_jsont = 3820 - Jsont.Object.map ~kind:"Skeleton_reason_repost" 3821 - (fun _typ repost -> { repost }) 3822 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonReasonRepost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonReasonRepost") 3823 - |> Jsont.Object.mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3824 - |> Jsont.Object.finish 3825 3826 - type skeleton_reason_pin = unit 3827 3828 - let skeleton_reason_pin_jsont = Jsont.ignore 3829 3830 - type skeleton_feed_post = { 3831 - feed_context : string option; 3832 - post : string; 3833 - reason : Jsont.json option; 3834 } 3835 3836 - let skeleton_feed_post_jsont = 3837 - Jsont.Object.map ~kind:"Skeleton_feed_post" 3838 - (fun _typ feed_context post reason -> { feed_context; post; reason }) 3839 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonFeedPost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonFeedPost") 3840 - |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 3841 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3842 - |> Jsont.Object.opt_mem "reason" Jsont.json ~enc:(fun r -> r.reason) 3843 |> Jsont.Object.finish 3844 3845 - type request_more = string 3846 - let request_more_jsont = Jsont.string 3847 - 3848 - type request_less = string 3849 - let request_less_jsont = Jsont.string 3850 - 3851 - type reply_ref = { 3852 - grandparent_author : Jsont.json option; 3853 - parent : Jsont.json; 3854 - root : Jsont.json; 3855 - } 3856 3857 - let reply_ref_jsont = 3858 - Jsont.Object.map ~kind:"Reply_ref" 3859 - (fun _typ grandparent_author parent root -> { grandparent_author; parent; root }) 3860 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#replyRef" ~enc:(fun _ -> "app.bsky.feed.defs#replyRef") 3861 - |> Jsont.Object.opt_mem "grandparentAuthor" Jsont.json ~enc:(fun r -> r.grandparent_author) 3862 - |> Jsont.Object.mem "parent" Jsont.json ~enc:(fun r -> r.parent) 3863 - |> Jsont.Object.mem "root" Jsont.json ~enc:(fun r -> r.root) 3864 - |> Jsont.Object.finish 3865 3866 type reason_repost = { 3867 by : Jsont.json; ··· 3880 |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3881 |> Jsont.Object.finish 3882 3883 - type reason_pin = unit 3884 - 3885 - let reason_pin_jsont = Jsont.ignore 3886 - 3887 - type not_found_post = { 3888 - not_found : bool; 3889 - uri : string; 3890 } 3891 3892 - let not_found_post_jsont = 3893 - Jsont.Object.map ~kind:"Not_found_post" 3894 - (fun _typ not_found uri -> { not_found; uri }) 3895 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#notFoundPost" ~enc:(fun _ -> "app.bsky.feed.defs#notFoundPost") 3896 - |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 3897 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3898 |> Jsont.Object.finish 3899 3900 - type interaction_share = string 3901 - let interaction_share_jsont = Jsont.string 3902 3903 - type interaction_seen = string 3904 - let interaction_seen_jsont = Jsont.string 3905 3906 - type interaction_repost = string 3907 - let interaction_repost_jsont = Jsont.string 3908 3909 - type interaction_reply = string 3910 - let interaction_reply_jsont = Jsont.string 3911 3912 - type interaction_quote = string 3913 - let interaction_quote_jsont = Jsont.string 3914 3915 - type interaction_like = string 3916 - let interaction_like_jsont = Jsont.string 3917 3918 - type interaction = { 3919 - event : string option; 3920 - feed_context : string option; 3921 - item : string option; 3922 - req_id : string option; 3923 } 3924 3925 - let interaction_jsont = 3926 - Jsont.Object.map ~kind:"Interaction" 3927 - (fun _typ event feed_context item req_id -> { event; feed_context; item; req_id }) 3928 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#interaction" ~enc:(fun _ -> "app.bsky.feed.defs#interaction") 3929 - |> Jsont.Object.opt_mem "event" Jsont.string ~enc:(fun r -> r.event) 3930 - |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 3931 - |> Jsont.Object.opt_mem "item" Jsont.string ~enc:(fun r -> r.item) 3932 - |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 3933 |> Jsont.Object.finish 3934 3935 - type generator_viewer_state = { 3936 - like : string option; 3937 } 3938 3939 - let generator_viewer_state_jsont = 3940 - Jsont.Object.map ~kind:"Generator_viewer_state" 3941 - (fun _typ like -> { like }) 3942 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#generatorViewerState" ~enc:(fun _ -> "app.bsky.feed.defs#generatorViewerState") 3943 - |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3944 |> Jsont.Object.finish 3945 3946 - type content_mode_video = string 3947 - let content_mode_video_jsont = Jsont.string 3948 - 3949 - type content_mode_unspecified = string 3950 - let content_mode_unspecified_jsont = Jsont.string 3951 - 3952 - type clickthrough_reposter = string 3953 - let clickthrough_reposter_jsont = Jsont.string 3954 - 3955 - type clickthrough_item = string 3956 - let clickthrough_item_jsont = Jsont.string 3957 - 3958 - type clickthrough_embed = string 3959 - let clickthrough_embed_jsont = Jsont.string 3960 3961 - type clickthrough_author = string 3962 - let clickthrough_author_jsont = Jsont.string 3963 3964 - type blocked_author = { 3965 - did : string; 3966 - viewer : Jsont.json option; 3967 } 3968 3969 - let blocked_author_jsont = 3970 - Jsont.Object.map ~kind:"Blocked_author" 3971 - (fun _typ did viewer -> { did; viewer }) 3972 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedAuthor" ~enc:(fun _ -> "app.bsky.feed.defs#blockedAuthor") 3973 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 3974 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3975 |> Jsont.Object.finish 3976 3977 - type post_view = { 3978 author : Jsont.json; 3979 - bookmark_count : int option; 3980 - cid : string; 3981 - debug : Jsont.json option; 3982 - embed : Jsont.json option; 3983 - indexed_at : string; 3984 - labels : Com.Atproto.Label.Defs.label list option; 3985 - like_count : int option; 3986 - quote_count : int option; 3987 - record : Jsont.json; 3988 - reply_count : int option; 3989 - repost_count : int option; 3990 - threadgate : Jsont.json option; 3991 uri : string; 3992 - viewer : Jsont.json option; 3993 } 3994 3995 - let post_view_jsont = 3996 - Jsont.Object.map ~kind:"Post_view" 3997 - (fun _typ author bookmark_count cid debug embed indexed_at labels like_count quote_count record reply_count repost_count threadgate uri viewer -> { author; bookmark_count; cid; debug; embed; indexed_at; labels; like_count; quote_count; record; reply_count; repost_count; threadgate; uri; viewer }) 3998 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#postView" ~enc:(fun _ -> "app.bsky.feed.defs#postView") 3999 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 4000 - |> Jsont.Object.opt_mem "bookmarkCount" Jsont.int ~enc:(fun r -> r.bookmark_count) 4001 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4002 - |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 4003 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 4004 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 4005 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 4006 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 4007 - |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 4008 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 4009 - |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 4010 - |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 4011 - |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 4012 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4013 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4014 |> Jsont.Object.finish 4015 4016 type generator_view = { ··· 4050 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4051 |> Jsont.Object.finish 4052 4053 - type blocked_post = { 4054 author : Jsont.json; 4055 - blocked : bool; 4056 uri : string; 4057 } 4058 4059 - let blocked_post_jsont = 4060 - Jsont.Object.map ~kind:"Blocked_post" 4061 - (fun _typ author blocked uri -> { author; blocked; uri }) 4062 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedPost" ~enc:(fun _ -> "app.bsky.feed.defs#blockedPost") 4063 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 4064 - |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 4065 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4066 - |> Jsont.Object.finish 4067 - 4068 - type thread_view_post = { 4069 - parent : Jsont.json option; 4070 - post : Jsont.json; 4071 - replies : Jsont.json list option; 4072 - thread_context : Jsont.json option; 4073 - } 4074 - 4075 - let thread_view_post_jsont = 4076 - Jsont.Object.map ~kind:"Thread_view_post" 4077 - (fun _typ parent post replies thread_context -> { parent; post; replies; thread_context }) 4078 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadViewPost" ~enc:(fun _ -> "app.bsky.feed.defs#threadViewPost") 4079 - |> Jsont.Object.opt_mem "parent" Jsont.json ~enc:(fun r -> r.parent) 4080 - |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 4081 - |> Jsont.Object.opt_mem "replies" (Jsont.list Jsont.json) ~enc:(fun r -> r.replies) 4082 - |> Jsont.Object.opt_mem "threadContext" Jsont.json ~enc:(fun r -> r.thread_context) 4083 |> Jsont.Object.finish 4084 4085 type feed_view_post = { ··· 4101 |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 4102 |> Jsont.Object.finish 4103 4104 - end 4105 - module Repost = struct 4106 - type main = { 4107 - created_at : string; 4108 - subject : Com.Atproto.Repo.StrongRef.main; 4109 - via : Com.Atproto.Repo.StrongRef.main option; 4110 } 4111 4112 - let main_jsont = 4113 - Jsont.Object.map ~kind:"Main" 4114 - (fun _typ created_at subject via -> { created_at; subject; via }) 4115 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.repost" ~enc:(fun _ -> "app.bsky.feed.repost") 4116 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4117 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4118 - |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 4119 |> Jsont.Object.finish 4120 4121 end 4122 - module Generator = struct 4123 - type main = { 4124 - accepts_interactions : bool option; 4125 - avatar : Atp.Blob_ref.t option; 4126 - content_mode : string option; 4127 - created_at : string; 4128 - description : string option; 4129 - description_facets : Richtext.Facet.main list option; 4130 - did : string; 4131 - display_name : string; 4132 - labels : Com.Atproto.Label.Defs.self_labels option; 4133 } 4134 4135 - let main_jsont = 4136 - Jsont.Object.map ~kind:"Main" 4137 - (fun _typ accepts_interactions avatar content_mode created_at description description_facets did display_name labels -> { accepts_interactions; avatar; content_mode; created_at; description; description_facets; did; display_name; labels }) 4138 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.generator" ~enc:(fun _ -> "app.bsky.feed.generator") 4139 - |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 4140 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 4141 - |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 4142 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4143 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 4144 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 4145 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4146 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 4147 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 4148 |> Jsont.Object.finish 4149 4150 end 4151 - module GetPostThread = struct 4152 type params = { 4153 - depth : int option; 4154 - parent_height : int option; 4155 - uri : string; 4156 } 4157 4158 let params_jsont = 4159 Jsont.Object.map ~kind:"Params" 4160 - (fun depth parent_height uri -> { 4161 - depth; 4162 - parent_height; 4163 - uri; 4164 }) 4165 - |> Jsont.Object.opt_mem "depth" Jsont.int 4166 - ~enc:(fun r -> r.depth) 4167 - |> Jsont.Object.opt_mem "parentHeight" Jsont.int 4168 - ~enc:(fun r -> r.parent_height) 4169 - |> Jsont.Object.mem "uri" Jsont.string 4170 - ~enc:(fun r -> r.uri) 4171 |> Jsont.Object.finish 4172 4173 type output = { 4174 - thread : Jsont.json; 4175 - threadgate : Jsont.json option; 4176 } 4177 4178 let output_jsont = 4179 Jsont.Object.map ~kind:"Output" 4180 - (fun _typ thread threadgate -> { thread; threadgate }) 4181 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPostThread#output" ~enc:(fun _ -> "app.bsky.feed.getPostThread#output") 4182 - |> Jsont.Object.mem "thread" Jsont.json ~enc:(fun r -> r.thread) 4183 - |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 4184 |> Jsont.Object.finish 4185 4186 end 4187 - module GetFeed = struct 4188 type params = { 4189 cursor : string option; 4190 - feed : string; 4191 limit : int option; 4192 } 4193 4194 let params_jsont = 4195 Jsont.Object.map ~kind:"Params" 4196 - (fun cursor feed limit -> { 4197 cursor; 4198 - feed; 4199 limit; 4200 }) 4201 |> Jsont.Object.opt_mem "cursor" Jsont.string 4202 ~enc:(fun r -> r.cursor) 4203 - |> Jsont.Object.mem "feed" Jsont.string 4204 - ~enc:(fun r -> r.feed) 4205 |> Jsont.Object.opt_mem "limit" Jsont.int 4206 ~enc:(fun r -> r.limit) 4207 |> Jsont.Object.finish ··· 4214 let output_jsont = 4215 Jsont.Object.map ~kind:"Output" 4216 (fun _typ cursor feed -> { cursor; feed }) 4217 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeed#output" ~enc:(fun _ -> "app.bsky.feed.getFeed#output") 4218 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4219 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4220 |> Jsont.Object.finish 4221 4222 end 4223 module GetQuotes = struct 4224 type params = { 4225 cid : string option; ··· 4264 |> Jsont.Object.finish 4265 4266 end 4267 - module GetListFeed = struct 4268 type params = { 4269 - cursor : string option; 4270 - limit : int option; 4271 - list_ : string; 4272 } 4273 4274 let params_jsont = 4275 Jsont.Object.map ~kind:"Params" 4276 - (fun cursor limit list_ -> { 4277 - cursor; 4278 - limit; 4279 - list_; 4280 }) 4281 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4282 - ~enc:(fun r -> r.cursor) 4283 - |> Jsont.Object.opt_mem "limit" Jsont.int 4284 - ~enc:(fun r -> r.limit) 4285 - |> Jsont.Object.mem "list" Jsont.string 4286 - ~enc:(fun r -> r.list_) 4287 |> Jsont.Object.finish 4288 4289 type output = { 4290 - cursor : string option; 4291 - feed : Jsont.json list; 4292 } 4293 4294 let output_jsont = 4295 Jsont.Object.map ~kind:"Output" 4296 - (fun _typ cursor feed -> { cursor; feed }) 4297 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getListFeed#output" ~enc:(fun _ -> "app.bsky.feed.getListFeed#output") 4298 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4299 - |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4300 |> Jsont.Object.finish 4301 4302 end 4303 - module GetActorLikes = struct 4304 type params = { 4305 - actor : string; 4306 cursor : string option; 4307 limit : int option; 4308 } 4309 4310 let params_jsont = 4311 Jsont.Object.map ~kind:"Params" 4312 - (fun actor cursor limit -> { 4313 - actor; 4314 cursor; 4315 limit; 4316 }) 4317 - |> Jsont.Object.mem "actor" Jsont.string 4318 - ~enc:(fun r -> r.actor) 4319 |> Jsont.Object.opt_mem "cursor" Jsont.string 4320 ~enc:(fun r -> r.cursor) 4321 |> Jsont.Object.opt_mem "limit" Jsont.int 4322 ~enc:(fun r -> r.limit) 4323 |> Jsont.Object.finish 4324 4325 type output = { ··· 4330 let output_jsont = 4331 Jsont.Object.map ~kind:"Output" 4332 (fun _typ cursor feed -> { cursor; feed }) 4333 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getActorLikes#output" ~enc:(fun _ -> "app.bsky.feed.getActorLikes#output") 4334 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4335 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4336 |> Jsont.Object.finish ··· 4374 |> Jsont.Object.finish 4375 4376 end 4377 - module SearchPosts = struct 4378 type params = { 4379 - author : string option; 4380 - cursor : string option; 4381 - domain : string option; 4382 - lang : string option; 4383 - limit : int option; 4384 - mentions : string option; 4385 - q : string; 4386 - since : string option; 4387 - sort : string option; 4388 - tag : string list option; 4389 - until : string option; 4390 - url : string option; 4391 } 4392 4393 let params_jsont = 4394 Jsont.Object.map ~kind:"Params" 4395 - (fun author cursor domain lang limit mentions q since sort tag until url -> { 4396 - author; 4397 - cursor; 4398 - domain; 4399 - lang; 4400 - limit; 4401 - mentions; 4402 - q; 4403 - since; 4404 - sort; 4405 - tag; 4406 - until; 4407 - url; 4408 }) 4409 - |> Jsont.Object.opt_mem "author" Jsont.string 4410 - ~enc:(fun r -> r.author) 4411 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4412 - ~enc:(fun r -> r.cursor) 4413 - |> Jsont.Object.opt_mem "domain" Jsont.string 4414 - ~enc:(fun r -> r.domain) 4415 - |> Jsont.Object.opt_mem "lang" Jsont.string 4416 - ~enc:(fun r -> r.lang) 4417 - |> Jsont.Object.opt_mem "limit" Jsont.int 4418 - ~enc:(fun r -> r.limit) 4419 - |> Jsont.Object.opt_mem "mentions" Jsont.string 4420 - ~enc:(fun r -> r.mentions) 4421 - |> Jsont.Object.mem "q" Jsont.string 4422 - ~enc:(fun r -> r.q) 4423 - |> Jsont.Object.opt_mem "since" Jsont.string 4424 - ~enc:(fun r -> r.since) 4425 - |> Jsont.Object.opt_mem "sort" Jsont.string 4426 - ~enc:(fun r -> r.sort) 4427 - |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 4428 - ~enc:(fun r -> r.tag) 4429 - |> Jsont.Object.opt_mem "until" Jsont.string 4430 - ~enc:(fun r -> r.until) 4431 - |> Jsont.Object.opt_mem "url" Jsont.string 4432 - ~enc:(fun r -> r.url) 4433 |> Jsont.Object.finish 4434 4435 type output = { 4436 - cursor : string option; 4437 - hits_total : int option; 4438 - posts : Jsont.json list; 4439 } 4440 4441 let output_jsont = 4442 Jsont.Object.map ~kind:"Output" 4443 - (fun _typ cursor hits_total posts -> { cursor; hits_total; posts }) 4444 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.searchPosts#output" ~enc:(fun _ -> "app.bsky.feed.searchPosts#output") 4445 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4446 - |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 4447 - |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 4448 |> Jsont.Object.finish 4449 4450 end 4451 - module GetFeedGenerators = struct 4452 type params = { 4453 - feeds : string list; 4454 } 4455 4456 let params_jsont = 4457 Jsont.Object.map ~kind:"Params" 4458 - (fun feeds -> { 4459 - feeds; 4460 }) 4461 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.string) 4462 - ~enc:(fun r -> r.feeds) 4463 |> Jsont.Object.finish 4464 4465 type output = { 4466 - feeds : Jsont.json list; 4467 } 4468 4469 let output_jsont = 4470 Jsont.Object.map ~kind:"Output" 4471 - (fun _typ feeds -> { feeds }) 4472 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedGenerators#output" ~enc:(fun _ -> "app.bsky.feed.getFeedGenerators#output") 4473 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4474 |> Jsont.Object.finish 4475 4476 end 4477 - module SendInteractions = struct 4478 - type input = { 4479 - interactions : Jsont.json list; 4480 } 4481 4482 - let input_jsont = 4483 - Jsont.Object.map ~kind:"Input" 4484 - (fun _typ interactions -> { interactions }) 4485 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.sendInteractions#input" ~enc:(fun _ -> "app.bsky.feed.sendInteractions#input") 4486 - |> Jsont.Object.mem "interactions" (Jsont.list Jsont.json) ~enc:(fun r -> r.interactions) 4487 |> Jsont.Object.finish 4488 4489 - type output = unit 4490 4491 - let output_jsont = Jsont.ignore 4492 4493 end 4494 module GetAuthorFeed = struct ··· 4535 |> Jsont.Object.finish 4536 4537 end 4538 - module GetFeedGenerator = struct 4539 - type params = { 4540 - feed : string; 4541 - } 4542 - 4543 - let params_jsont = 4544 - Jsont.Object.map ~kind:"Params" 4545 - (fun feed -> { 4546 - feed; 4547 - }) 4548 - |> Jsont.Object.mem "feed" Jsont.string 4549 - ~enc:(fun r -> r.feed) 4550 - |> Jsont.Object.finish 4551 - 4552 - type output = { 4553 - is_online : bool; 4554 - is_valid : bool; 4555 - view : Jsont.json; 4556 - } 4557 - 4558 - let output_jsont = 4559 - Jsont.Object.map ~kind:"Output" 4560 - (fun _typ is_online is_valid view -> { is_online; is_valid; view }) 4561 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedGenerator#output" ~enc:(fun _ -> "app.bsky.feed.getFeedGenerator#output") 4562 - |> Jsont.Object.mem "isOnline" Jsont.bool ~enc:(fun r -> r.is_online) 4563 - |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 4564 - |> Jsont.Object.mem "view" Jsont.json ~enc:(fun r -> r.view) 4565 - |> Jsont.Object.finish 4566 - 4567 - end 4568 - module GetSuggestedFeeds = struct 4569 type params = { 4570 cursor : string option; 4571 limit : int option; 4572 } 4573 4574 let params_jsont = 4575 Jsont.Object.map ~kind:"Params" 4576 - (fun cursor limit -> { 4577 cursor; 4578 limit; 4579 }) 4580 |> Jsont.Object.opt_mem "cursor" Jsont.string 4581 ~enc:(fun r -> r.cursor) 4582 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4585 4586 type output = { 4587 cursor : string option; 4588 - feeds : Jsont.json list; 4589 } 4590 4591 let output_jsont = 4592 Jsont.Object.map ~kind:"Output" 4593 - (fun _typ cursor feeds -> { cursor; feeds }) 4594 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getSuggestedFeeds#output" ~enc:(fun _ -> "app.bsky.feed.getSuggestedFeeds#output") 4595 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4596 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4597 |> Jsont.Object.finish 4598 4599 end ··· 4633 |> Jsont.Object.finish 4634 4635 end 4636 - module GetPosts = struct 4637 - type params = { 4638 - uris : string list; 4639 } 4640 4641 - let params_jsont = 4642 - Jsont.Object.map ~kind:"Params" 4643 - (fun uris -> { 4644 - uris; 4645 - }) 4646 - |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 4647 - ~enc:(fun r -> r.uris) 4648 |> Jsont.Object.finish 4649 4650 type output = { 4651 - posts : Jsont.json list; 4652 } 4653 4654 let output_jsont = 4655 Jsont.Object.map ~kind:"Output" 4656 - (fun _typ posts -> { posts }) 4657 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPosts#output" ~enc:(fun _ -> "app.bsky.feed.getPosts#output") 4658 - |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 4659 |> Jsont.Object.finish 4660 4661 end 4662 - module GetTimeline = struct 4663 type params = { 4664 - algorithm : string option; 4665 cursor : string option; 4666 limit : int option; 4667 } 4668 4669 let params_jsont = 4670 Jsont.Object.map ~kind:"Params" 4671 - (fun algorithm cursor limit -> { 4672 - algorithm; 4673 cursor; 4674 limit; 4675 }) 4676 - |> Jsont.Object.opt_mem "algorithm" Jsont.string 4677 - ~enc:(fun r -> r.algorithm) 4678 |> Jsont.Object.opt_mem "cursor" Jsont.string 4679 ~enc:(fun r -> r.cursor) 4680 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4683 4684 type output = { 4685 cursor : string option; 4686 - feed : Jsont.json list; 4687 } 4688 4689 let output_jsont = 4690 Jsont.Object.map ~kind:"Output" 4691 - (fun _typ cursor feed -> { cursor; feed }) 4692 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getTimeline#output" ~enc:(fun _ -> "app.bsky.feed.getTimeline#output") 4693 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4694 - |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4695 |> Jsont.Object.finish 4696 4697 end 4698 - end 4699 - module Bookmark = struct 4700 - module DeleteBookmark = struct 4701 type input = { 4702 - uri : string; 4703 } 4704 4705 let input_jsont = 4706 Jsont.Object.map ~kind:"Input" 4707 - (fun _typ uri -> { uri }) 4708 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.deleteBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.deleteBookmark#input") 4709 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4710 |> Jsont.Object.finish 4711 4712 end 4713 - module CreateBookmark = struct 4714 type input = { 4715 - cid : string; 4716 - uri : string; 4717 } 4718 4719 let input_jsont = 4720 Jsont.Object.map ~kind:"Input" 4721 - (fun _typ cid uri -> { cid; uri }) 4722 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.createBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.createBookmark#input") 4723 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4724 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4725 |> Jsont.Object.finish 4726 4727 - end 4728 - module Defs = struct 4729 - type bookmark_view = { 4730 - created_at : string option; 4731 - item : Jsont.json; 4732 - subject : Com.Atproto.Repo.StrongRef.main; 4733 } 4734 4735 - let bookmark_view_jsont = 4736 - Jsont.Object.map ~kind:"Bookmark_view" 4737 - (fun _typ created_at item subject -> { created_at; item; subject }) 4738 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmarkView" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmarkView") 4739 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4740 - |> Jsont.Object.mem "item" Jsont.json ~enc:(fun r -> r.item) 4741 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4742 |> Jsont.Object.finish 4743 4744 - type bookmark = { 4745 - subject : Com.Atproto.Repo.StrongRef.main; 4746 } 4747 4748 - let bookmark_jsont = 4749 - Jsont.Object.map ~kind:"Bookmark" 4750 - (fun _typ subject -> { subject }) 4751 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmark" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmark") 4752 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4753 |> Jsont.Object.finish 4754 4755 end 4756 - module GetBookmarks = struct 4757 - type params = { 4758 - cursor : string option; 4759 - limit : int option; 4760 } 4761 4762 - let params_jsont = 4763 - Jsont.Object.map ~kind:"Params" 4764 - (fun cursor limit -> { 4765 - cursor; 4766 - limit; 4767 - }) 4768 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4769 - ~enc:(fun r -> r.cursor) 4770 - |> Jsont.Object.opt_mem "limit" Jsont.int 4771 - ~enc:(fun r -> r.limit) 4772 |> Jsont.Object.finish 4773 4774 type output = { 4775 - bookmarks : Defs.bookmark_view list; 4776 - cursor : string option; 4777 } 4778 4779 let output_jsont = 4780 Jsont.Object.map ~kind:"Output" 4781 - (fun _typ bookmarks cursor -> { bookmarks; cursor }) 4782 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.getBookmarks#output" ~enc:(fun _ -> "app.bsky.bookmark.getBookmarks#output") 4783 - |> Jsont.Object.mem "bookmarks" (Jsont.list Defs.bookmark_view_jsont) ~enc:(fun r -> r.bookmarks) 4784 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4785 |> Jsont.Object.finish 4786 4787 end 4788 - end 4789 - module Unspecced = struct 4790 module GetSuggestedUsersSkeleton = struct 4791 type params = { 4792 category : string option; ··· 4823 |> Jsont.Object.finish 4824 4825 end 4826 - module GetOnboardingSuggestedStarterPacks = struct 4827 type params = { 4828 limit : int option; 4829 } 4830 4831 let params_jsont = 4832 Jsont.Object.map ~kind:"Params" 4833 - (fun limit -> { 4834 limit; 4835 }) 4836 |> Jsont.Object.opt_mem "limit" Jsont.int 4837 ~enc:(fun r -> r.limit) 4838 |> Jsont.Object.finish 4839 4840 type output = { 4841 - starter_packs : Jsont.json list; 4842 } 4843 4844 let output_jsont = 4845 Jsont.Object.map ~kind:"Output" 4846 - (fun _typ starter_packs -> { starter_packs }) 4847 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output" ~enc:(fun _ -> "app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output") 4848 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 4849 - |> Jsont.Object.finish 4850 - 4851 - end 4852 - module GetPopularFeedGenerators = struct 4853 - type params = { 4854 - cursor : string option; 4855 - limit : int option; 4856 - query : string option; 4857 - } 4858 - 4859 - let params_jsont = 4860 - Jsont.Object.map ~kind:"Params" 4861 - (fun cursor limit query -> { 4862 - cursor; 4863 - limit; 4864 - query; 4865 - }) 4866 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4867 - ~enc:(fun r -> r.cursor) 4868 - |> Jsont.Object.opt_mem "limit" Jsont.int 4869 - ~enc:(fun r -> r.limit) 4870 - |> Jsont.Object.opt_mem "query" Jsont.string 4871 - ~enc:(fun r -> r.query) 4872 - |> Jsont.Object.finish 4873 - 4874 - type output = { 4875 - cursor : string option; 4876 - feeds : Jsont.json list; 4877 - } 4878 - 4879 - let output_jsont = 4880 - Jsont.Object.map ~kind:"Output" 4881 - (fun _typ cursor feeds -> { cursor; feeds }) 4882 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPopularFeedGenerators#output" ~enc:(fun _ -> "app.bsky.unspecced.getPopularFeedGenerators#output") 4883 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4884 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4885 |> Jsont.Object.finish 4886 4887 end ··· 4915 |> Jsont.Object.finish 4916 4917 end 4918 - module GetSuggestedFeeds = struct 4919 type params = { 4920 limit : int option; 4921 } ··· 4930 |> Jsont.Object.finish 4931 4932 type output = { 4933 - feeds : Jsont.json list; 4934 } 4935 4936 let output_jsont = 4937 Jsont.Object.map ~kind:"Output" 4938 - (fun _typ feeds -> { feeds }) 4939 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedFeeds#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedFeeds#output") 4940 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4941 |> Jsont.Object.finish 4942 4943 end ··· 4971 |> Jsont.Object.finish 4972 4973 end 4974 - module GetConfig = struct 4975 - type live_now_config = { 4976 - did : string; 4977 - domains : string list; 4978 } 4979 4980 - let live_now_config_jsont = 4981 - Jsont.Object.map ~kind:"Live_now_config" 4982 - (fun _typ did domains -> { did; domains }) 4983 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#liveNowConfig" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#liveNowConfig") 4984 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4985 - |> Jsont.Object.mem "domains" (Jsont.list Jsont.string) ~enc:(fun r -> r.domains) 4986 |> Jsont.Object.finish 4987 4988 type output = { 4989 - check_email_confirmed : bool option; 4990 - live_now : live_now_config list option; 4991 } 4992 4993 let output_jsont = 4994 Jsont.Object.map ~kind:"Output" 4995 - (fun _typ check_email_confirmed live_now -> { check_email_confirmed; live_now }) 4996 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#output" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#output") 4997 - |> Jsont.Object.opt_mem "checkEmailConfirmed" Jsont.bool ~enc:(fun r -> r.check_email_confirmed) 4998 - |> Jsont.Object.opt_mem "liveNow" (Jsont.list live_now_config_jsont) ~enc:(fun r -> r.live_now) 4999 |> Jsont.Object.finish 5000 5001 end 5002 - module GetSuggestedStarterPacks = struct 5003 type params = { 5004 limit : int option; 5005 } 5006 5007 let params_jsont = 5008 Jsont.Object.map ~kind:"Params" 5009 - (fun limit -> { 5010 limit; 5011 }) 5012 |> Jsont.Object.opt_mem "limit" Jsont.int 5013 ~enc:(fun r -> r.limit) 5014 |> Jsont.Object.finish 5015 5016 type output = { 5017 - starter_packs : Jsont.json list; 5018 } 5019 5020 let output_jsont = 5021 Jsont.Object.map ~kind:"Output" 5022 - (fun _typ starter_packs -> { starter_packs }) 5023 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedStarterPacks#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedStarterPacks#output") 5024 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 5025 - |> Jsont.Object.finish 5026 - 5027 - end 5028 - module GetSuggestedUsers = struct 5029 - type params = { 5030 - category : string option; 5031 - limit : int option; 5032 - } 5033 - 5034 - let params_jsont = 5035 - Jsont.Object.map ~kind:"Params" 5036 - (fun category limit -> { 5037 - category; 5038 - limit; 5039 - }) 5040 - |> Jsont.Object.opt_mem "category" Jsont.string 5041 - ~enc:(fun r -> r.category) 5042 - |> Jsont.Object.opt_mem "limit" Jsont.int 5043 - ~enc:(fun r -> r.limit) 5044 - |> Jsont.Object.finish 5045 - 5046 - type output = { 5047 - actors : Jsont.json list; 5048 - rec_id : int option; 5049 - } 5050 - 5051 - let output_jsont = 5052 - Jsont.Object.map ~kind:"Output" 5053 - (fun _typ actors rec_id -> { actors; rec_id }) 5054 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedUsers#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedUsers#output") 5055 - |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 5056 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5057 |> Jsont.Object.finish 5058 5059 end ··· 5087 |> Jsont.Object.finish 5088 5089 end 5090 module Defs = struct 5091 - type trending_topic = { 5092 - description : string option; 5093 - display_name : string option; 5094 - link : string; 5095 - topic : string; 5096 } 5097 5098 - let trending_topic_jsont = 5099 - Jsont.Object.map ~kind:"Trending_topic" 5100 - (fun _typ description display_name link topic -> { description; display_name; link; topic }) 5101 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#trendingTopic" ~enc:(fun _ -> "app.bsky.unspecced.defs#trendingTopic") 5102 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 5103 - |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5104 - |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5105 - |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5106 |> Jsont.Object.finish 5107 5108 - type trend_view = { 5109 - actors : Jsont.json list; 5110 category : string option; 5111 display_name : string; 5112 link : string; 5113 post_count : int; ··· 5116 topic : string; 5117 } 5118 5119 - let trend_view_jsont = 5120 - Jsont.Object.map ~kind:"Trend_view" 5121 - (fun _typ actors category display_name link post_count started_at status topic -> { actors; category; display_name; link; post_count; started_at; status; topic }) 5122 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#trendView" ~enc:(fun _ -> "app.bsky.unspecced.defs#trendView") 5123 - |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 5124 |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5125 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5126 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5127 |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) ··· 5130 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5131 |> Jsont.Object.finish 5132 5133 type thread_item_post = { 5134 hidden_by_threadgate : bool; 5135 more_parents : bool; ··· 5151 |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 5152 |> Jsont.Object.finish 5153 5154 - type thread_item_not_found = unit 5155 - 5156 - let thread_item_not_found_jsont = Jsont.ignore 5157 - 5158 - type thread_item_no_unauthenticated = unit 5159 - 5160 - let thread_item_no_unauthenticated_jsont = Jsont.ignore 5161 - 5162 - type thread_item_blocked = { 5163 - author : Jsont.json; 5164 - } 5165 - 5166 - let thread_item_blocked_jsont = 5167 - Jsont.Object.map ~kind:"Thread_item_blocked" 5168 - (fun _typ author -> { author }) 5169 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#threadItemBlocked" ~enc:(fun _ -> "app.bsky.unspecced.defs#threadItemBlocked") 5170 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 5171 - |> Jsont.Object.finish 5172 - 5173 - type skeleton_trend = { 5174 category : string option; 5175 - dids : string list; 5176 display_name : string; 5177 link : string; 5178 post_count : int; ··· 5181 topic : string; 5182 } 5183 5184 - let skeleton_trend_jsont = 5185 - Jsont.Object.map ~kind:"Skeleton_trend" 5186 - (fun _typ category dids display_name link post_count started_at status topic -> { category; dids; display_name; link; post_count; started_at; status; topic }) 5187 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonTrend" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonTrend") 5188 |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5189 - |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) ~enc:(fun r -> r.dids) 5190 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5191 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5192 |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) ··· 5195 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5196 |> Jsont.Object.finish 5197 5198 - type skeleton_search_starter_pack = { 5199 - uri : string; 5200 - } 5201 - 5202 - let skeleton_search_starter_pack_jsont = 5203 - Jsont.Object.map ~kind:"Skeleton_search_starter_pack" 5204 - (fun _typ uri -> { uri }) 5205 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchStarterPack" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchStarterPack") 5206 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5207 - |> Jsont.Object.finish 5208 - 5209 - type skeleton_search_post = { 5210 - uri : string; 5211 } 5212 5213 - let skeleton_search_post_jsont = 5214 - Jsont.Object.map ~kind:"Skeleton_search_post" 5215 - (fun _typ uri -> { uri }) 5216 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchPost" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchPost") 5217 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5218 - |> Jsont.Object.finish 5219 - 5220 - type skeleton_search_actor = { 5221 - did : string; 5222 - } 5223 - 5224 - let skeleton_search_actor_jsont = 5225 - Jsont.Object.map ~kind:"Skeleton_search_actor" 5226 - (fun _typ did -> { did }) 5227 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchActor" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchActor") 5228 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 5229 - |> Jsont.Object.finish 5230 - 5231 - type age_assurance_state = { 5232 - last_initiated_at : string option; 5233 - status : string; 5234 - } 5235 - 5236 - let age_assurance_state_jsont = 5237 - Jsont.Object.map ~kind:"Age_assurance_state" 5238 - (fun _typ last_initiated_at status -> { last_initiated_at; status }) 5239 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#ageAssuranceState" ~enc:(fun _ -> "app.bsky.unspecced.defs#ageAssuranceState") 5240 - |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 5241 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 5242 - |> Jsont.Object.finish 5243 - 5244 - type age_assurance_event = { 5245 - attempt_id : string; 5246 - complete_ip : string option; 5247 - complete_ua : string option; 5248 - created_at : string; 5249 - email : string option; 5250 - init_ip : string option; 5251 - init_ua : string option; 5252 - status : string; 5253 - } 5254 - 5255 - let age_assurance_event_jsont = 5256 - Jsont.Object.map ~kind:"Age_assurance_event" 5257 - (fun _typ attempt_id complete_ip complete_ua created_at email init_ip init_ua status -> { attempt_id; complete_ip; complete_ua; created_at; email; init_ip; init_ua; status }) 5258 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#ageAssuranceEvent" ~enc:(fun _ -> "app.bsky.unspecced.defs#ageAssuranceEvent") 5259 - |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 5260 - |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 5261 - |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 5262 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 5263 - |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 5264 - |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 5265 - |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 5266 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 5267 |> Jsont.Object.finish 5268 5269 end 5270 - module GetTaggedSuggestions = struct 5271 - type suggestion = { 5272 - subject : string; 5273 - subject_type : string; 5274 - tag : string; 5275 } 5276 5277 - let suggestion_jsont = 5278 - Jsont.Object.map ~kind:"Suggestion" 5279 - (fun _typ subject subject_type tag -> { subject; subject_type; tag }) 5280 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#suggestion" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#suggestion") 5281 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 5282 - |> Jsont.Object.mem "subjectType" Jsont.string ~enc:(fun r -> r.subject_type) 5283 - |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 5284 |> Jsont.Object.finish 5285 - 5286 - type params = unit 5287 - 5288 - let params_jsont = Jsont.ignore 5289 5290 type output = { 5291 - suggestions : suggestion list; 5292 } 5293 5294 let output_jsont = 5295 Jsont.Object.map ~kind:"Output" 5296 - (fun _typ suggestions -> { suggestions }) 5297 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#output" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#output") 5298 - |> Jsont.Object.mem "suggestions" (Jsont.list suggestion_jsont) ~enc:(fun r -> r.suggestions) 5299 |> Jsont.Object.finish 5300 5301 end ··· 5377 |> Jsont.Object.finish 5378 5379 end 5380 - module GetPostThreadV2 = struct 5381 - type thread_item = { 5382 - depth : int; 5383 - uri : string; 5384 - value : Jsont.json; 5385 } 5386 5387 - let thread_item_jsont = 5388 - Jsont.Object.map ~kind:"Thread_item" 5389 - (fun _typ depth uri value -> { depth; uri; value }) 5390 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#threadItem") 5391 - |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5392 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5393 - |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 5394 |> Jsont.Object.finish 5395 5396 type params = { 5397 - above : bool option; 5398 - anchor : string; 5399 - below : int option; 5400 - branching_factor : int option; 5401 - sort : string option; 5402 } 5403 5404 let params_jsont = 5405 Jsont.Object.map ~kind:"Params" 5406 - (fun above anchor below branching_factor sort -> { 5407 - above; 5408 - anchor; 5409 - below; 5410 - branching_factor; 5411 - sort; 5412 }) 5413 - |> Jsont.Object.opt_mem "above" Jsont.bool 5414 - ~enc:(fun r -> r.above) 5415 - |> Jsont.Object.mem "anchor" Jsont.string 5416 - ~enc:(fun r -> r.anchor) 5417 - |> Jsont.Object.opt_mem "below" Jsont.int 5418 - ~enc:(fun r -> r.below) 5419 - |> Jsont.Object.opt_mem "branchingFactor" Jsont.int 5420 - ~enc:(fun r -> r.branching_factor) 5421 - |> Jsont.Object.opt_mem "sort" Jsont.string 5422 - ~enc:(fun r -> r.sort) 5423 |> Jsont.Object.finish 5424 5425 type output = { 5426 - has_other_replies : bool; 5427 - thread : thread_item list; 5428 - threadgate : Jsont.json option; 5429 } 5430 5431 let output_jsont = 5432 Jsont.Object.map ~kind:"Output" 5433 - (fun _typ has_other_replies thread threadgate -> { has_other_replies; thread; threadgate }) 5434 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#output" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#output") 5435 - |> Jsont.Object.mem "hasOtherReplies" Jsont.bool ~enc:(fun r -> r.has_other_replies) 5436 - |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5437 - |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 5438 |> Jsont.Object.finish 5439 5440 end ··· 5470 |> Jsont.Object.finish 5471 5472 end 5473 - module GetTrendsSkeleton = struct 5474 type params = { 5475 limit : int option; 5476 viewer : string option; 5477 } 5478 5479 let params_jsont = 5480 Jsont.Object.map ~kind:"Params" 5481 - (fun limit viewer -> { 5482 limit; 5483 viewer; 5484 }) 5485 |> Jsont.Object.opt_mem "limit" Jsont.int 5486 ~enc:(fun r -> r.limit) 5487 |> Jsont.Object.opt_mem "viewer" Jsont.string 5488 ~enc:(fun r -> r.viewer) 5489 |> Jsont.Object.finish 5490 5491 type output = { 5492 - trends : Defs.skeleton_trend list; 5493 } 5494 5495 let output_jsont = 5496 Jsont.Object.map ~kind:"Output" 5497 - (fun _typ trends -> { trends }) 5498 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrendsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrendsSkeleton#output") 5499 - |> Jsont.Object.mem "trends" (Jsont.list Defs.skeleton_trend_jsont) ~enc:(fun r -> r.trends) 5500 |> Jsont.Object.finish 5501 5502 end 5503 - module GetPostThreadOtherV2 = struct 5504 type thread_item = { 5505 depth : int; 5506 uri : string; 5507 - value : Defs.thread_item_post; 5508 } 5509 5510 let thread_item_jsont = 5511 Jsont.Object.map ~kind:"Thread_item" 5512 (fun _typ depth uri value -> { depth; uri; value }) 5513 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadOtherV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadOtherV2#threadItem") 5514 |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5515 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5516 - |> Jsont.Object.mem "value" Defs.thread_item_post_jsont ~enc:(fun r -> r.value) 5517 |> Jsont.Object.finish 5518 5519 type params = { 5520 anchor : string; 5521 } 5522 5523 let params_jsont = 5524 Jsont.Object.map ~kind:"Params" 5525 - (fun anchor -> { 5526 anchor; 5527 }) 5528 |> Jsont.Object.mem "anchor" Jsont.string 5529 ~enc:(fun r -> r.anchor) 5530 |> Jsont.Object.finish 5531 5532 type output = { 5533 thread : thread_item list; 5534 } 5535 5536 let output_jsont = 5537 Jsont.Object.map ~kind:"Output" 5538 - (fun _typ thread -> { thread }) 5539 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadOtherV2#output" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadOtherV2#output") 5540 |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5541 |> Jsont.Object.finish 5542 5543 end 5544 - module InitAgeAssurance = struct 5545 - type input = { 5546 - country_code : string; 5547 - email : string; 5548 - language : string; 5549 } 5550 5551 - let input_jsont = 5552 - Jsont.Object.map ~kind:"Input" 5553 - (fun _typ country_code email language -> { country_code; email; language }) 5554 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.initAgeAssurance#input" ~enc:(fun _ -> "app.bsky.unspecced.initAgeAssurance#input") 5555 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 5556 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 5557 - |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 5558 |> Jsont.Object.finish 5559 5560 - type output = Defs.age_assurance_state 5561 - 5562 - let output_jsont = Defs.age_assurance_state_jsont 5563 - 5564 - end 5565 - module SearchStarterPacksSkeleton = struct 5566 type params = { 5567 - cursor : string option; 5568 - limit : int option; 5569 - q : string; 5570 - viewer : string option; 5571 } 5572 5573 let params_jsont = 5574 Jsont.Object.map ~kind:"Params" 5575 - (fun cursor limit q viewer -> { 5576 - cursor; 5577 - limit; 5578 - q; 5579 - viewer; 5580 }) 5581 - |> Jsont.Object.opt_mem "cursor" Jsont.string 5582 - ~enc:(fun r -> r.cursor) 5583 - |> Jsont.Object.opt_mem "limit" Jsont.int 5584 - ~enc:(fun r -> r.limit) 5585 - |> Jsont.Object.mem "q" Jsont.string 5586 - ~enc:(fun r -> r.q) 5587 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5588 - ~enc:(fun r -> r.viewer) 5589 |> Jsont.Object.finish 5590 5591 type output = { 5592 - cursor : string option; 5593 - hits_total : int option; 5594 - starter_packs : Defs.skeleton_search_starter_pack list; 5595 } 5596 5597 let output_jsont = 5598 Jsont.Object.map ~kind:"Output" 5599 - (fun _typ cursor hits_total starter_packs -> { cursor; hits_total; starter_packs }) 5600 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchStarterPacksSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchStarterPacksSkeleton#output") 5601 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5602 - |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5603 - |> Jsont.Object.mem "starterPacks" (Jsont.list Defs.skeleton_search_starter_pack_jsont) ~enc:(fun r -> r.starter_packs) 5604 |> Jsont.Object.finish 5605 5606 end 5607 - module SearchActorsSkeleton = struct 5608 - type params = { 5609 - cursor : string option; 5610 - limit : int option; 5611 - q : string; 5612 - typeahead : bool option; 5613 - viewer : string option; 5614 } 5615 5616 - let params_jsont = 5617 - Jsont.Object.map ~kind:"Params" 5618 - (fun cursor limit q typeahead viewer -> { 5619 - cursor; 5620 - limit; 5621 - q; 5622 - typeahead; 5623 - viewer; 5624 - }) 5625 - |> Jsont.Object.opt_mem "cursor" Jsont.string 5626 - ~enc:(fun r -> r.cursor) 5627 - |> Jsont.Object.opt_mem "limit" Jsont.int 5628 - ~enc:(fun r -> r.limit) 5629 - |> Jsont.Object.mem "q" Jsont.string 5630 - ~enc:(fun r -> r.q) 5631 - |> Jsont.Object.opt_mem "typeahead" Jsont.bool 5632 - ~enc:(fun r -> r.typeahead) 5633 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5634 - ~enc:(fun r -> r.viewer) 5635 |> Jsont.Object.finish 5636 5637 - type output = { 5638 - actors : Defs.skeleton_search_actor list; 5639 - cursor : string option; 5640 - hits_total : int option; 5641 } 5642 5643 - let output_jsont = 5644 - Jsont.Object.map ~kind:"Output" 5645 - (fun _typ actors cursor hits_total -> { actors; cursor; hits_total }) 5646 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchActorsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchActorsSkeleton#output") 5647 - |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5648 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5649 - |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5650 |> Jsont.Object.finish 5651 5652 end 5653 - module GetAgeAssuranceState = struct 5654 - type output = Defs.age_assurance_state 5655 5656 - let output_jsont = Defs.age_assurance_state_jsont 5657 5658 end 5659 - module GetSuggestionsSkeleton = struct 5660 type params = { 5661 cursor : string option; 5662 limit : int option; 5663 - relative_to_did : string option; 5664 - viewer : string option; 5665 } 5666 5667 let params_jsont = 5668 Jsont.Object.map ~kind:"Params" 5669 - (fun cursor limit relative_to_did viewer -> { 5670 cursor; 5671 limit; 5672 - relative_to_did; 5673 - viewer; 5674 }) 5675 |> Jsont.Object.opt_mem "cursor" Jsont.string 5676 ~enc:(fun r -> r.cursor) 5677 |> Jsont.Object.opt_mem "limit" Jsont.int 5678 ~enc:(fun r -> r.limit) 5679 - |> Jsont.Object.opt_mem "relativeToDid" Jsont.string 5680 - ~enc:(fun r -> r.relative_to_did) 5681 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5682 - ~enc:(fun r -> r.viewer) 5683 |> Jsont.Object.finish 5684 5685 type output = { 5686 - actors : Defs.skeleton_search_actor list; 5687 cursor : string option; 5688 - rec_id : int option; 5689 - relative_to_did : string option; 5690 } 5691 5692 let output_jsont = 5693 Jsont.Object.map ~kind:"Output" 5694 - (fun _typ actors cursor rec_id relative_to_did -> { actors; cursor; rec_id; relative_to_did }) 5695 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestionsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestionsSkeleton#output") 5696 - |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5697 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5698 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5699 - |> Jsont.Object.opt_mem "relativeToDid" Jsont.string ~enc:(fun r -> r.relative_to_did) 5700 - |> Jsont.Object.finish 5701 - 5702 - end 5703 - module GetTrends = struct 5704 - type params = { 5705 - limit : int option; 5706 - } 5707 - 5708 - let params_jsont = 5709 - Jsont.Object.map ~kind:"Params" 5710 - (fun limit -> { 5711 - limit; 5712 - }) 5713 - |> Jsont.Object.opt_mem "limit" Jsont.int 5714 - ~enc:(fun r -> r.limit) 5715 - |> Jsont.Object.finish 5716 - 5717 - type output = { 5718 - trends : Defs.trend_view list; 5719 - } 5720 - 5721 - let output_jsont = 5722 - Jsont.Object.map ~kind:"Output" 5723 - (fun _typ trends -> { trends }) 5724 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrends#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrends#output") 5725 - |> Jsont.Object.mem "trends" (Jsont.list Defs.trend_view_jsont) ~enc:(fun r -> r.trends) 5726 |> Jsont.Object.finish 5727 5728 end
··· 15 16 module Com = struct 17 module Atproto = struct 18 + module Repo = struct 19 + module StrongRef = struct 20 + type main = { 21 + cid : string; 22 + uri : string; 23 } 24 25 + let main_jsont = 26 + Jsont.Object.map ~kind:"Main" 27 + (fun _typ cid uri -> { cid; uri }) 28 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.strongRef" ~enc:(fun _ -> "com.atproto.repo.strongRef") 29 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 30 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 31 |> Jsont.Object.finish 32 33 + end 34 + end 35 + module Moderation = struct 36 + module Defs = struct 37 + type reason_appeal = string 38 + let reason_appeal_jsont = Jsont.string 39 + 40 + type reason_misleading = string 41 + let reason_misleading_jsont = Jsont.string 42 + 43 + type reason_other = string 44 + let reason_other_jsont = Jsont.string 45 + 46 + type reason_rude = string 47 + let reason_rude_jsont = Jsont.string 48 + 49 + type reason_sexual = string 50 + let reason_sexual_jsont = Jsont.string 51 + 52 + type reason_spam = string 53 + let reason_spam_jsont = Jsont.string 54 + 55 + type reason_type = string 56 + let reason_type_jsont = Jsont.string 57 58 + type reason_violation = string 59 + let reason_violation_jsont = Jsont.string 60 61 + type subject_type = string 62 + let subject_type_jsont = Jsont.string 63 64 + end 65 + end 66 + module Label = struct 67 + module Defs = struct 68 type label = { 69 cid : string option; 70 cts : string; ··· 92 |> Jsont.Object.opt_mem "ver" Jsont.int ~enc:(fun r -> r.ver) 93 |> Jsont.Object.finish 94 95 + type label_value = string 96 + let label_value_jsont = Jsont.string 97 + 98 + type label_value_definition_strings = { 99 + description : string; 100 + lang : string; 101 + name : string; 102 } 103 104 + let label_value_definition_strings_jsont = 105 + Jsont.Object.map ~kind:"Label_value_definition_strings" 106 + (fun _typ description lang name -> { description; lang; name }) 107 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#labelValueDefinitionStrings" ~enc:(fun _ -> "com.atproto.label.defs#labelValueDefinitionStrings") 108 + |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 109 + |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 110 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 111 + |> Jsont.Object.finish 112 + 113 + type self_label = { 114 + val_ : string; 115 + } 116 + 117 + let self_label_jsont = 118 + Jsont.Object.map ~kind:"Self_label" 119 + (fun _typ val_ -> { val_ }) 120 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#selfLabel" ~enc:(fun _ -> "com.atproto.label.defs#selfLabel") 121 + |> Jsont.Object.mem "val" Jsont.string ~enc:(fun r -> r.val_) 122 |> Jsont.Object.finish 123 124 type label_value_definition = { ··· 142 |> Jsont.Object.mem "severity" Jsont.string ~enc:(fun r -> r.severity) 143 |> Jsont.Object.finish 144 145 + type self_labels = { 146 + values : self_label list; 147 + } 148 + 149 + let self_labels_jsont = 150 + Jsont.Object.map ~kind:"Self_labels" 151 + (fun _typ values -> { values }) 152 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#selfLabels" ~enc:(fun _ -> "com.atproto.label.defs#selfLabels") 153 + |> Jsont.Object.mem "values" (Jsont.list self_label_jsont) ~enc:(fun r -> r.values) 154 + |> Jsont.Object.finish 155 + 156 end 157 end 158 + end 159 + end 160 + module App = struct 161 + module Bsky = struct 162 + module Video = struct 163 + module GetUploadLimits = struct 164 + type output = { 165 + can_upload : bool; 166 + error : string option; 167 + message : string option; 168 + remaining_daily_bytes : int option; 169 + remaining_daily_videos : int option; 170 } 171 172 + let output_jsont = 173 + Jsont.Object.map ~kind:"Output" 174 + (fun _typ can_upload error message remaining_daily_bytes remaining_daily_videos -> { can_upload; error; message; remaining_daily_bytes; remaining_daily_videos }) 175 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getUploadLimits#output" ~enc:(fun _ -> "app.bsky.video.getUploadLimits#output") 176 + |> Jsont.Object.mem "canUpload" Jsont.bool ~enc:(fun r -> r.can_upload) 177 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 178 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 179 + |> Jsont.Object.opt_mem "remainingDailyBytes" Jsont.int ~enc:(fun r -> r.remaining_daily_bytes) 180 + |> Jsont.Object.opt_mem "remainingDailyVideos" Jsont.int ~enc:(fun r -> r.remaining_daily_videos) 181 |> Jsont.Object.finish 182 183 end 184 module Defs = struct 185 + type job_status = { 186 + blob : Atp.Blob_ref.t option; 187 + did : string; 188 + error : string option; 189 + job_id : string; 190 + message : string option; 191 + progress : int option; 192 + state : string; 193 + } 194 195 + let job_status_jsont = 196 + Jsont.Object.map ~kind:"Job_status" 197 + (fun _typ blob did error job_id message progress state -> { blob; did; error; job_id; message; progress; state }) 198 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.defs#jobStatus" ~enc:(fun _ -> "app.bsky.video.defs#jobStatus") 199 + |> Jsont.Object.opt_mem "blob" Atp.Blob_ref.jsont ~enc:(fun r -> r.blob) 200 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 201 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 202 + |> Jsont.Object.mem "jobId" Jsont.string ~enc:(fun r -> r.job_id) 203 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 204 + |> Jsont.Object.opt_mem "progress" Jsont.int ~enc:(fun r -> r.progress) 205 + |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 206 + |> Jsont.Object.finish 207 208 + end 209 + module UploadVideo = struct 210 + type input = unit 211 + let input_jsont = Jsont.ignore 212 213 + type output = { 214 + job_status : Defs.job_status; 215 + } 216 217 + let output_jsont = 218 + Jsont.Object.map ~kind:"Output" 219 + (fun _typ job_status -> { job_status }) 220 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.uploadVideo#output" ~enc:(fun _ -> "app.bsky.video.uploadVideo#output") 221 + |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 222 + |> Jsont.Object.finish 223 224 + end 225 + module GetJobStatus = struct 226 + type params = { 227 + job_id : string; 228 + } 229 230 + let params_jsont = 231 + Jsont.Object.map ~kind:"Params" 232 + (fun job_id -> { 233 + job_id; 234 + }) 235 + |> Jsont.Object.mem "jobId" Jsont.string 236 + ~enc:(fun r -> r.job_id) 237 + |> Jsont.Object.finish 238 239 + type output = { 240 + job_status : Defs.job_status; 241 + } 242 243 + let output_jsont = 244 + Jsont.Object.map ~kind:"Output" 245 + (fun _typ job_status -> { job_status }) 246 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getJobStatus#output" ~enc:(fun _ -> "app.bsky.video.getJobStatus#output") 247 + |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 248 + |> Jsont.Object.finish 249 250 end 251 end 252 module Richtext = struct 253 module Facet = struct 254 + type byte_slice = { 255 + byte_end : int; 256 + byte_start : int; 257 } 258 259 + let byte_slice_jsont = 260 + Jsont.Object.map ~kind:"Byte_slice" 261 + (fun _typ byte_end byte_start -> { byte_end; byte_start }) 262 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#byteSlice" ~enc:(fun _ -> "app.bsky.richtext.facet#byteSlice") 263 + |> Jsont.Object.mem "byteEnd" Jsont.int ~enc:(fun r -> r.byte_end) 264 + |> Jsont.Object.mem "byteStart" Jsont.int ~enc:(fun r -> r.byte_start) 265 |> Jsont.Object.finish 266 267 type link = { ··· 275 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 276 |> Jsont.Object.finish 277 278 + type mention = { 279 + did : string; 280 } 281 282 + let mention_jsont = 283 + Jsont.Object.map ~kind:"Mention" 284 + (fun _typ did -> { did }) 285 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#mention" ~enc:(fun _ -> "app.bsky.richtext.facet#mention") 286 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 287 + |> Jsont.Object.finish 288 + 289 + type tag = { 290 + tag : string; 291 + } 292 + 293 + let tag_jsont = 294 + Jsont.Object.map ~kind:"Tag" 295 + (fun _typ tag -> { tag }) 296 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#tag" ~enc:(fun _ -> "app.bsky.richtext.facet#tag") 297 + |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 298 |> Jsont.Object.finish 299 300 type main = { ··· 312 313 end 314 end 315 + module Notification = struct 316 + module UpdateSeen = struct 317 + type input = { 318 + seen_at : string; 319 + } 320 321 + let input_jsont = 322 + Jsont.Object.map ~kind:"Input" 323 + (fun _typ seen_at -> { seen_at }) 324 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.updateSeen#input" ~enc:(fun _ -> "app.bsky.notification.updateSeen#input") 325 + |> Jsont.Object.mem "seenAt" Jsont.string ~enc:(fun r -> r.seen_at) 326 + |> Jsont.Object.finish 327 328 + end 329 + module UnregisterPush = struct 330 + type input = { 331 + app_id : string; 332 + platform : string; 333 + service_did : string; 334 + token : string; 335 + } 336 337 + let input_jsont = 338 + Jsont.Object.map ~kind:"Input" 339 + (fun _typ app_id platform service_did token -> { app_id; platform; service_did; token }) 340 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.unregisterPush#input" ~enc:(fun _ -> "app.bsky.notification.unregisterPush#input") 341 + |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 342 + |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 343 + |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 344 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 345 + |> Jsont.Object.finish 346 347 + end 348 + module RegisterPush = struct 349 + type input = { 350 + age_restricted : bool option; 351 + app_id : string; 352 + platform : string; 353 + service_did : string; 354 + token : string; 355 + } 356 357 + let input_jsont = 358 + Jsont.Object.map ~kind:"Input" 359 + (fun _typ age_restricted app_id platform service_did token -> { age_restricted; app_id; platform; service_did; token }) 360 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.registerPush#input" ~enc:(fun _ -> "app.bsky.notification.registerPush#input") 361 + |> Jsont.Object.opt_mem "ageRestricted" Jsont.bool ~enc:(fun r -> r.age_restricted) 362 + |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 363 + |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 364 + |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 365 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 366 + |> Jsont.Object.finish 367 + 368 + end 369 + module PutPreferences = struct 370 + type input = { 371 + priority : bool; 372 } 373 374 + let input_jsont = 375 + Jsont.Object.map ~kind:"Input" 376 + (fun _typ priority -> { priority }) 377 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferences#input" ~enc:(fun _ -> "app.bsky.notification.putPreferences#input") 378 + |> Jsont.Object.mem "priority" Jsont.bool ~enc:(fun r -> r.priority) 379 |> Jsont.Object.finish 380 381 + end 382 + module ListNotifications = struct 383 + type notification = { 384 + author : Jsont.json; 385 + cid : string; 386 + indexed_at : string; 387 + is_read : bool; 388 + labels : Com.Atproto.Label.Defs.label list option; 389 + reason : string; 390 + reason_subject : string option; 391 + record : Jsont.json; 392 + uri : string; 393 } 394 395 + let notification_jsont = 396 + Jsont.Object.map ~kind:"Notification" 397 + (fun _typ author cid indexed_at is_read labels reason reason_subject record uri -> { author; cid; indexed_at; is_read; labels; reason; reason_subject; record; uri }) 398 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listNotifications#notification" ~enc:(fun _ -> "app.bsky.notification.listNotifications#notification") 399 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 400 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 401 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 402 + |> Jsont.Object.mem "isRead" Jsont.bool ~enc:(fun r -> r.is_read) 403 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 404 + |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 405 + |> Jsont.Object.opt_mem "reasonSubject" Jsont.string ~enc:(fun r -> r.reason_subject) 406 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 407 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 408 |> Jsont.Object.finish 409 410 + type params = { 411 + cursor : string option; 412 + limit : int option; 413 + priority : bool option; 414 + reasons : string list option; 415 + seen_at : string option; 416 } 417 418 + let params_jsont = 419 + Jsont.Object.map ~kind:"Params" 420 + (fun cursor limit priority reasons seen_at -> { 421 + cursor; 422 + limit; 423 + priority; 424 + reasons; 425 + seen_at; 426 + }) 427 + |> Jsont.Object.opt_mem "cursor" Jsont.string 428 + ~enc:(fun r -> r.cursor) 429 + |> Jsont.Object.opt_mem "limit" Jsont.int 430 + ~enc:(fun r -> r.limit) 431 + |> Jsont.Object.opt_mem "priority" Jsont.bool 432 + ~enc:(fun r -> r.priority) 433 + |> Jsont.Object.opt_mem "reasons" (Jsont.list Jsont.string) 434 + ~enc:(fun r -> r.reasons) 435 + |> Jsont.Object.opt_mem "seenAt" Jsont.string 436 + ~enc:(fun r -> r.seen_at) 437 |> Jsont.Object.finish 438 439 + type output = { 440 + cursor : string option; 441 + notifications : Jsont.json list; 442 + priority : bool option; 443 + seen_at : string option; 444 + } 445 446 + let output_jsont = 447 + Jsont.Object.map ~kind:"Output" 448 + (fun _typ cursor notifications priority seen_at -> { cursor; notifications; priority; seen_at }) 449 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listNotifications#output" ~enc:(fun _ -> "app.bsky.notification.listNotifications#output") 450 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 451 + |> Jsont.Object.mem "notifications" (Jsont.list Jsont.json) ~enc:(fun r -> r.notifications) 452 + |> Jsont.Object.opt_mem "priority" Jsont.bool ~enc:(fun r -> r.priority) 453 + |> Jsont.Object.opt_mem "seenAt" Jsont.string ~enc:(fun r -> r.seen_at) 454 + |> Jsont.Object.finish 455 + 456 + end 457 + module ListActivitySubscriptions = struct 458 + type params = { 459 + cursor : string option; 460 + limit : int option; 461 } 462 463 + let params_jsont = 464 + Jsont.Object.map ~kind:"Params" 465 + (fun cursor limit -> { 466 + cursor; 467 + limit; 468 + }) 469 + |> Jsont.Object.opt_mem "cursor" Jsont.string 470 + ~enc:(fun r -> r.cursor) 471 + |> Jsont.Object.opt_mem "limit" Jsont.int 472 + ~enc:(fun r -> r.limit) 473 |> Jsont.Object.finish 474 475 + type output = { 476 + cursor : string option; 477 + subscriptions : Jsont.json list; 478 } 479 480 + let output_jsont = 481 + Jsont.Object.map ~kind:"Output" 482 + (fun _typ cursor subscriptions -> { cursor; subscriptions }) 483 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listActivitySubscriptions#output" ~enc:(fun _ -> "app.bsky.notification.listActivitySubscriptions#output") 484 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 485 + |> Jsont.Object.mem "subscriptions" (Jsont.list Jsont.json) ~enc:(fun r -> r.subscriptions) 486 |> Jsont.Object.finish 487 488 + end 489 + module GetUnreadCount = struct 490 + type params = { 491 + priority : bool option; 492 + seen_at : string option; 493 } 494 495 + let params_jsont = 496 + Jsont.Object.map ~kind:"Params" 497 + (fun priority seen_at -> { 498 + priority; 499 + seen_at; 500 + }) 501 + |> Jsont.Object.opt_mem "priority" Jsont.bool 502 + ~enc:(fun r -> r.priority) 503 + |> Jsont.Object.opt_mem "seenAt" Jsont.string 504 + ~enc:(fun r -> r.seen_at) 505 |> Jsont.Object.finish 506 507 + type output = { 508 + count : int; 509 } 510 511 + let output_jsont = 512 + Jsont.Object.map ~kind:"Output" 513 + (fun _typ count -> { count }) 514 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.getUnreadCount#output" ~enc:(fun _ -> "app.bsky.notification.getUnreadCount#output") 515 + |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 516 |> Jsont.Object.finish 517 518 + end 519 + module Defs = struct 520 + type activity_subscription = { 521 + post : bool; 522 + reply : bool; 523 } 524 525 + let activity_subscription_jsont = 526 + Jsont.Object.map ~kind:"Activity_subscription" 527 + (fun _typ post reply -> { post; reply }) 528 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#activitySubscription" ~enc:(fun _ -> "app.bsky.notification.defs#activitySubscription") 529 + |> Jsont.Object.mem "post" Jsont.bool ~enc:(fun r -> r.post) 530 + |> Jsont.Object.mem "reply" Jsont.bool ~enc:(fun r -> r.reply) 531 |> Jsont.Object.finish 532 533 + type chat_preference = { 534 + include_ : string; 535 + push : bool; 536 } 537 538 + let chat_preference_jsont = 539 + Jsont.Object.map ~kind:"Chat_preference" 540 + (fun _typ include_ push -> { include_; push }) 541 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#chatPreference" ~enc:(fun _ -> "app.bsky.notification.defs#chatPreference") 542 + |> Jsont.Object.mem "include" Jsont.string ~enc:(fun r -> r.include_) 543 + |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 544 |> Jsont.Object.finish 545 546 + type filterable_preference = { 547 + include_ : string; 548 + list_ : bool; 549 + push : bool; 550 } 551 552 + let filterable_preference_jsont = 553 + Jsont.Object.map ~kind:"Filterable_preference" 554 + (fun _typ include_ list_ push -> { include_; list_; push }) 555 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#filterablePreference" ~enc:(fun _ -> "app.bsky.notification.defs#filterablePreference") 556 + |> Jsont.Object.mem "include" Jsont.string ~enc:(fun r -> r.include_) 557 + |> Jsont.Object.mem "list" Jsont.bool ~enc:(fun r -> r.list_) 558 + |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 559 |> Jsont.Object.finish 560 561 + type preference = { 562 + list_ : bool; 563 + push : bool; 564 + } 565 + 566 + let preference_jsont = 567 + Jsont.Object.map ~kind:"Preference" 568 + (fun _typ list_ push -> { list_; push }) 569 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#preference" ~enc:(fun _ -> "app.bsky.notification.defs#preference") 570 + |> Jsont.Object.mem "list" Jsont.bool ~enc:(fun r -> r.list_) 571 + |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 572 + |> Jsont.Object.finish 573 + 574 + type record_deleted = unit 575 + 576 + let record_deleted_jsont = Jsont.ignore 577 + 578 + type preferences = { 579 + chat : Jsont.json; 580 + follow : Jsont.json; 581 + like : Jsont.json; 582 + like_via_repost : Jsont.json; 583 + mention : Jsont.json; 584 + quote : Jsont.json; 585 + reply : Jsont.json; 586 + repost : Jsont.json; 587 + repost_via_repost : Jsont.json; 588 + starterpack_joined : Jsont.json; 589 + subscribed_post : Jsont.json; 590 + unverified : Jsont.json; 591 + verified : Jsont.json; 592 + } 593 + 594 + let preferences_jsont = 595 + Jsont.Object.map ~kind:"Preferences" 596 + (fun _typ chat follow like like_via_repost mention quote reply repost repost_via_repost starterpack_joined subscribed_post unverified verified -> { chat; follow; like; like_via_repost; mention; quote; reply; repost; repost_via_repost; starterpack_joined; subscribed_post; unverified; verified }) 597 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#preferences" ~enc:(fun _ -> "app.bsky.notification.defs#preferences") 598 + |> Jsont.Object.mem "chat" Jsont.json ~enc:(fun r -> r.chat) 599 + |> Jsont.Object.mem "follow" Jsont.json ~enc:(fun r -> r.follow) 600 + |> Jsont.Object.mem "like" Jsont.json ~enc:(fun r -> r.like) 601 + |> Jsont.Object.mem "likeViaRepost" Jsont.json ~enc:(fun r -> r.like_via_repost) 602 + |> Jsont.Object.mem "mention" Jsont.json ~enc:(fun r -> r.mention) 603 + |> Jsont.Object.mem "quote" Jsont.json ~enc:(fun r -> r.quote) 604 + |> Jsont.Object.mem "reply" Jsont.json ~enc:(fun r -> r.reply) 605 + |> Jsont.Object.mem "repost" Jsont.json ~enc:(fun r -> r.repost) 606 + |> Jsont.Object.mem "repostViaRepost" Jsont.json ~enc:(fun r -> r.repost_via_repost) 607 + |> Jsont.Object.mem "starterpackJoined" Jsont.json ~enc:(fun r -> r.starterpack_joined) 608 + |> Jsont.Object.mem "subscribedPost" Jsont.json ~enc:(fun r -> r.subscribed_post) 609 + |> Jsont.Object.mem "unverified" Jsont.json ~enc:(fun r -> r.unverified) 610 + |> Jsont.Object.mem "verified" Jsont.json ~enc:(fun r -> r.verified) 611 + |> Jsont.Object.finish 612 + 613 + type subject_activity_subscription = { 614 + activity_subscription : Jsont.json; 615 + subject : string; 616 } 617 618 + let subject_activity_subscription_jsont = 619 + Jsont.Object.map ~kind:"Subject_activity_subscription" 620 + (fun _typ activity_subscription subject -> { activity_subscription; subject }) 621 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#subjectActivitySubscription" ~enc:(fun _ -> "app.bsky.notification.defs#subjectActivitySubscription") 622 + |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 623 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 624 |> Jsont.Object.finish 625 626 + end 627 + module Declaration = struct 628 + type main = { 629 + allow_subscriptions : string; 630 } 631 632 + let main_jsont = 633 + Jsont.Object.map ~kind:"Main" 634 + (fun _typ allow_subscriptions -> { allow_subscriptions }) 635 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.declaration" ~enc:(fun _ -> "app.bsky.notification.declaration") 636 + |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 637 |> Jsont.Object.finish 638 639 end 640 + module PutPreferencesV2 = struct 641 type input = { 642 + chat : Jsont.json option; 643 + follow : Jsont.json option; 644 + like : Jsont.json option; 645 + like_via_repost : Jsont.json option; 646 + mention : Jsont.json option; 647 + quote : Jsont.json option; 648 + reply : Jsont.json option; 649 + repost : Jsont.json option; 650 + repost_via_repost : Jsont.json option; 651 + starterpack_joined : Jsont.json option; 652 + subscribed_post : Jsont.json option; 653 + unverified : Jsont.json option; 654 + verified : Jsont.json option; 655 } 656 657 let input_jsont = 658 Jsont.Object.map ~kind:"Input" 659 + (fun _typ chat follow like like_via_repost mention quote reply repost repost_via_repost starterpack_joined subscribed_post unverified verified -> { chat; follow; like; like_via_repost; mention; quote; reply; repost; repost_via_repost; starterpack_joined; subscribed_post; unverified; verified }) 660 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferencesV2#input" ~enc:(fun _ -> "app.bsky.notification.putPreferencesV2#input") 661 + |> Jsont.Object.opt_mem "chat" Jsont.json ~enc:(fun r -> r.chat) 662 + |> Jsont.Object.opt_mem "follow" Jsont.json ~enc:(fun r -> r.follow) 663 + |> Jsont.Object.opt_mem "like" Jsont.json ~enc:(fun r -> r.like) 664 + |> Jsont.Object.opt_mem "likeViaRepost" Jsont.json ~enc:(fun r -> r.like_via_repost) 665 + |> Jsont.Object.opt_mem "mention" Jsont.json ~enc:(fun r -> r.mention) 666 + |> Jsont.Object.opt_mem "quote" Jsont.json ~enc:(fun r -> r.quote) 667 + |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 668 + |> Jsont.Object.opt_mem "repost" Jsont.json ~enc:(fun r -> r.repost) 669 + |> Jsont.Object.opt_mem "repostViaRepost" Jsont.json ~enc:(fun r -> r.repost_via_repost) 670 + |> Jsont.Object.opt_mem "starterpackJoined" Jsont.json ~enc:(fun r -> r.starterpack_joined) 671 + |> Jsont.Object.opt_mem "subscribedPost" Jsont.json ~enc:(fun r -> r.subscribed_post) 672 + |> Jsont.Object.opt_mem "unverified" Jsont.json ~enc:(fun r -> r.unverified) 673 + |> Jsont.Object.opt_mem "verified" Jsont.json ~enc:(fun r -> r.verified) 674 |> Jsont.Object.finish 675 676 + type output = { 677 + preferences : Jsont.json; 678 + } 679 680 + let output_jsont = 681 + Jsont.Object.map ~kind:"Output" 682 + (fun _typ preferences -> { preferences }) 683 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferencesV2#output" ~enc:(fun _ -> "app.bsky.notification.putPreferencesV2#output") 684 + |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 685 + |> Jsont.Object.finish 686 687 end 688 + module PutActivitySubscription = struct 689 + type input = { 690 + activity_subscription : Jsont.json; 691 + subject : string; 692 } 693 694 + let input_jsont = 695 + Jsont.Object.map ~kind:"Input" 696 + (fun _typ activity_subscription subject -> { activity_subscription; subject }) 697 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putActivitySubscription#input" ~enc:(fun _ -> "app.bsky.notification.putActivitySubscription#input") 698 + |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 699 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 700 |> Jsont.Object.finish 701 702 type output = { 703 + activity_subscription : Jsont.json option; 704 + subject : string; 705 } 706 707 let output_jsont = 708 Jsont.Object.map ~kind:"Output" 709 + (fun _typ activity_subscription subject -> { activity_subscription; subject }) 710 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putActivitySubscription#output" ~enc:(fun _ -> "app.bsky.notification.putActivitySubscription#output") 711 + |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 712 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 713 |> Jsont.Object.finish 714 715 end 716 + module GetPreferences = struct 717 + type params = unit 718 719 + let params_jsont = Jsont.ignore 720 + 721 + type output = { 722 + preferences : Jsont.json; 723 + } 724 + 725 + let output_jsont = 726 + Jsont.Object.map ~kind:"Output" 727 + (fun _typ preferences -> { preferences }) 728 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.getPreferences#output" ~enc:(fun _ -> "app.bsky.notification.getPreferences#output") 729 + |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 730 + |> Jsont.Object.finish 731 732 end 733 end 734 module Labeler = struct 735 module Defs = struct 736 type labeler_policies = { 737 label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; 738 label_values : Com.Atproto.Label.Defs.label_value list; ··· 746 |> Jsont.Object.mem "labelValues" (Jsont.list Com.Atproto.Label.Defs.label_value_jsont) ~enc:(fun r -> r.label_values) 747 |> Jsont.Object.finish 748 749 + type labeler_viewer_state = { 750 + like : string option; 751 + } 752 + 753 + let labeler_viewer_state_jsont = 754 + Jsont.Object.map ~kind:"Labeler_viewer_state" 755 + (fun _typ like -> { like }) 756 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewerState" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewerState") 757 + |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 758 + |> Jsont.Object.finish 759 + 760 + type labeler_view = { 761 cid : string; 762 creator : Jsont.json; 763 indexed_at : string; 764 labels : Com.Atproto.Label.Defs.label list option; 765 like_count : int option; 766 uri : string; 767 viewer : Jsont.json option; 768 } 769 770 + let labeler_view_jsont = 771 + Jsont.Object.map ~kind:"Labeler_view" 772 + (fun _typ cid creator indexed_at labels like_count uri viewer -> { cid; creator; indexed_at; labels; like_count; uri; viewer }) 773 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerView" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerView") 774 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 775 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 776 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 777 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 778 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 779 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 780 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 781 |> Jsont.Object.finish 782 783 + type labeler_view_detailed = { 784 cid : string; 785 creator : Jsont.json; 786 indexed_at : string; 787 labels : Com.Atproto.Label.Defs.label list option; 788 like_count : int option; 789 + policies : Jsont.json; 790 + reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 791 + subject_collections : string list option; 792 + subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 793 uri : string; 794 viewer : Jsont.json option; 795 } 796 797 + let labeler_view_detailed_jsont = 798 + Jsont.Object.map ~kind:"Labeler_view_detailed" 799 + (fun _typ cid creator indexed_at labels like_count policies reason_types subject_collections subject_types uri viewer -> { cid; creator; indexed_at; labels; like_count; policies; reason_types; subject_collections; subject_types; uri; viewer }) 800 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewDetailed" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewDetailed") 801 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 802 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 803 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 804 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 805 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 806 + |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 807 + |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 808 + |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 809 + |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 810 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 811 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 812 |> Jsont.Object.finish ··· 866 867 end 868 end 869 module Embed = struct 870 module External = struct 871 + type external_ = { 872 description : string; 873 + thumb : Atp.Blob_ref.t option; 874 title : string; 875 uri : string; 876 } 877 878 + let external__jsont = 879 + Jsont.Object.map ~kind:"External_" 880 (fun _typ description thumb title uri -> { description; thumb; title; uri }) 881 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 882 |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 883 + |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 884 |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 885 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 886 |> Jsont.Object.finish 887 888 + type view_external = { 889 description : string; 890 + thumb : string option; 891 title : string; 892 uri : string; 893 } 894 895 + let view_external_jsont = 896 + Jsont.Object.map ~kind:"View_external" 897 (fun _typ description thumb title uri -> { description; thumb; title; uri }) 898 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#viewExternal" ~enc:(fun _ -> "app.bsky.embed.external#viewExternal") 899 |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 900 + |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 901 |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 902 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 903 |> Jsont.Object.finish 904 905 + type main = { 906 external_ : Jsont.json; 907 } 908 909 + let main_jsont = 910 + Jsont.Object.map ~kind:"Main" 911 (fun _typ external_ -> { external_ }) 912 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 913 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 914 |> Jsont.Object.finish 915 916 + type view = { 917 external_ : Jsont.json; 918 } 919 920 + let view_jsont = 921 + Jsont.Object.map ~kind:"View" 922 (fun _typ external_ -> { external_ }) 923 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#view" ~enc:(fun _ -> "app.bsky.embed.external#view") 924 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 925 |> Jsont.Object.finish 926 ··· 940 |> Jsont.Object.finish 941 942 end 943 + module Video = struct 944 + type caption = { 945 + file : Atp.Blob_ref.t; 946 + lang : string; 947 + } 948 + 949 + let caption_jsont = 950 + Jsont.Object.map ~kind:"Caption" 951 + (fun _typ file lang -> { file; lang }) 952 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#caption" ~enc:(fun _ -> "app.bsky.embed.video#caption") 953 + |> Jsont.Object.mem "file" Atp.Blob_ref.jsont ~enc:(fun r -> r.file) 954 + |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 955 + |> Jsont.Object.finish 956 + 957 + type view = { 958 + alt : string option; 959 + aspect_ratio : Jsont.json option; 960 + cid : string; 961 + playlist : string; 962 + thumbnail : string option; 963 + } 964 + 965 + let view_jsont = 966 + Jsont.Object.map ~kind:"View" 967 + (fun _typ alt aspect_ratio cid playlist thumbnail -> { alt; aspect_ratio; cid; playlist; thumbnail }) 968 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#view" ~enc:(fun _ -> "app.bsky.embed.video#view") 969 + |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 970 + |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 971 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 972 + |> Jsont.Object.mem "playlist" Jsont.string ~enc:(fun r -> r.playlist) 973 + |> Jsont.Object.opt_mem "thumbnail" Jsont.string ~enc:(fun r -> r.thumbnail) 974 + |> Jsont.Object.finish 975 + 976 + type main = { 977 + alt : string option; 978 aspect_ratio : Jsont.json option; 979 + captions : Jsont.json list option; 980 + video : Atp.Blob_ref.t; 981 } 982 983 + let main_jsont = 984 + Jsont.Object.map ~kind:"Main" 985 + (fun _typ alt aspect_ratio captions video -> { alt; aspect_ratio; captions; video }) 986 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video" ~enc:(fun _ -> "app.bsky.embed.video") 987 + |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 988 |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 989 + |> Jsont.Object.opt_mem "captions" (Jsont.list Jsont.json) ~enc:(fun r -> r.captions) 990 + |> Jsont.Object.mem "video" Atp.Blob_ref.jsont ~enc:(fun r -> r.video) 991 |> Jsont.Object.finish 992 993 + end 994 + module Images = struct 995 type image = { 996 alt : string; 997 aspect_ratio : Jsont.json option; ··· 1007 |> Jsont.Object.mem "image" Atp.Blob_ref.jsont ~enc:(fun r -> r.image) 1008 |> Jsont.Object.finish 1009 1010 + type view_image = { 1011 + alt : string; 1012 + aspect_ratio : Jsont.json option; 1013 + fullsize : string; 1014 + thumb : string; 1015 } 1016 1017 + let view_image_jsont = 1018 + Jsont.Object.map ~kind:"View_image" 1019 + (fun _typ alt aspect_ratio fullsize thumb -> { alt; aspect_ratio; fullsize; thumb }) 1020 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#viewImage" ~enc:(fun _ -> "app.bsky.embed.images#viewImage") 1021 + |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 1022 + |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 1023 + |> Jsont.Object.mem "fullsize" Jsont.string ~enc:(fun r -> r.fullsize) 1024 + |> Jsont.Object.mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 1025 |> Jsont.Object.finish 1026 1027 type main = { ··· 1035 |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 1036 |> Jsont.Object.finish 1037 1038 type view = { 1039 + images : Jsont.json list; 1040 } 1041 1042 let view_jsont = 1043 Jsont.Object.map ~kind:"View" 1044 + (fun _typ images -> { images }) 1045 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#view" ~enc:(fun _ -> "app.bsky.embed.images#view") 1046 + |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 1047 |> Jsont.Object.finish 1048 1049 + end 1050 + module RecordWithMedia = struct 1051 type main = { 1052 + media : Jsont.json; 1053 + record : Jsont.json; 1054 } 1055 1056 let main_jsont = 1057 Jsont.Object.map ~kind:"Main" 1058 + (fun _typ media record -> { media; record }) 1059 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia") 1060 + |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 1061 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1062 |> Jsont.Object.finish 1063 1064 type view = { 1065 media : Jsont.json; 1066 record : Jsont.json; ··· 1074 |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1075 |> Jsont.Object.finish 1076 1077 + end 1078 + module Record = struct 1079 type main = { 1080 + record : Com.Atproto.Repo.StrongRef.main; 1081 } 1082 1083 let main_jsont = 1084 Jsont.Object.map ~kind:"Main" 1085 + (fun _typ record -> { record }) 1086 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record" ~enc:(fun _ -> "app.bsky.embed.record") 1087 + |> Jsont.Object.mem "record" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.record) 1088 |> Jsont.Object.finish 1089 1090 + type view = { 1091 + record : Jsont.json; 1092 } 1093 1094 + let view_jsont = 1095 + Jsont.Object.map ~kind:"View" 1096 + (fun _typ record -> { record }) 1097 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#view" ~enc:(fun _ -> "app.bsky.embed.record#view") 1098 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1099 |> Jsont.Object.finish 1100 1101 + type view_blocked = { 1102 + author : Jsont.json; 1103 + blocked : bool; 1104 uri : string; 1105 } 1106 1107 + let view_blocked_jsont = 1108 + Jsont.Object.map ~kind:"View_blocked" 1109 + (fun _typ author blocked uri -> { author; blocked; uri }) 1110 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewBlocked" ~enc:(fun _ -> "app.bsky.embed.record#viewBlocked") 1111 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1112 + |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 1113 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1114 |> Jsont.Object.finish 1115 ··· 1126 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1127 |> Jsont.Object.finish 1128 1129 + type view_not_found = { 1130 + not_found : bool; 1131 uri : string; 1132 } 1133 1134 + let view_not_found_jsont = 1135 + Jsont.Object.map ~kind:"View_not_found" 1136 + (fun _typ not_found uri -> { not_found; uri }) 1137 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewNotFound" ~enc:(fun _ -> "app.bsky.embed.record#viewNotFound") 1138 + |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 1139 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1140 |> Jsont.Object.finish 1141 1142 + type view_record = { 1143 author : Jsont.json; 1144 cid : string; 1145 + embeds : Jsont.json list option; 1146 indexed_at : string; 1147 labels : Com.Atproto.Label.Defs.label list option; 1148 + like_count : int option; 1149 + quote_count : int option; 1150 + reply_count : int option; 1151 + repost_count : int option; 1152 uri : string; 1153 + value : Jsont.json; 1154 } 1155 1156 + let view_record_jsont = 1157 + Jsont.Object.map ~kind:"View_record" 1158 + (fun _typ author cid embeds indexed_at labels like_count quote_count reply_count repost_count uri value -> { author; cid; embeds; indexed_at; labels; like_count; quote_count; reply_count; repost_count; uri; value }) 1159 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewRecord" ~enc:(fun _ -> "app.bsky.embed.record#viewRecord") 1160 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1161 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 1162 + |> Jsont.Object.opt_mem "embeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.embeds) 1163 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1164 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1165 + |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 1166 + |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 1167 + |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 1168 + |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 1169 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1170 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 1171 |> Jsont.Object.finish 1172 1173 + end 1174 + end 1175 + module AuthViewAll = struct 1176 + type main = unit 1177 + let main_jsont = Jsont.ignore 1178 + 1179 + end 1180 + module AuthManageProfile = struct 1181 + type main = unit 1182 + let main_jsont = Jsont.ignore 1183 + 1184 + end 1185 + module AuthManageNotifications = struct 1186 + type main = unit 1187 + let main_jsont = Jsont.ignore 1188 + 1189 + end 1190 + module AuthManageModeration = struct 1191 + type main = unit 1192 + let main_jsont = Jsont.ignore 1193 + 1194 + end 1195 + module AuthManageLabelerService = struct 1196 + type main = unit 1197 + let main_jsont = Jsont.ignore 1198 + 1199 + end 1200 + module AuthManageFeedDeclarations = struct 1201 + type main = unit 1202 + let main_jsont = Jsont.ignore 1203 1204 + end 1205 + module AuthFullApp = struct 1206 + type main = unit 1207 + let main_jsont = Jsont.ignore 1208 1209 + end 1210 + module AuthCreatePosts = struct 1211 + type main = unit 1212 + let main_jsont = Jsont.ignore 1213 + 1214 + end 1215 + module Ageassurance = struct 1216 + module Defs = struct 1217 + type access = string 1218 + let access_jsont = Jsont.string 1219 + 1220 + type config_region = { 1221 + country_code : string; 1222 + min_access_age : int; 1223 + region_code : string option; 1224 + rules : Jsont.json list; 1225 } 1226 1227 + let config_region_jsont = 1228 + Jsont.Object.map ~kind:"Config_region" 1229 + (fun _typ country_code min_access_age region_code rules -> { country_code; min_access_age; region_code; rules }) 1230 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegion" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegion") 1231 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 1232 + |> Jsont.Object.mem "minAccessAge" Jsont.int ~enc:(fun r -> r.min_access_age) 1233 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 1234 + |> Jsont.Object.mem "rules" (Jsont.list Jsont.json) ~enc:(fun r -> r.rules) 1235 |> Jsont.Object.finish 1236 1237 + type event = { 1238 + access : string; 1239 + attempt_id : string; 1240 + complete_ip : string option; 1241 + complete_ua : string option; 1242 + country_code : string; 1243 + created_at : string; 1244 + email : string option; 1245 + init_ip : string option; 1246 + init_ua : string option; 1247 + region_code : string option; 1248 + status : string; 1249 } 1250 1251 + let event_jsont = 1252 + Jsont.Object.map ~kind:"Event" 1253 + (fun _typ access attempt_id complete_ip complete_ua country_code created_at email init_ip init_ua region_code status -> { access; attempt_id; complete_ip; complete_ua; country_code; created_at; email; init_ip; init_ua; region_code; status }) 1254 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#event" ~enc:(fun _ -> "app.bsky.ageassurance.defs#event") 1255 + |> Jsont.Object.mem "access" Jsont.string ~enc:(fun r -> r.access) 1256 + |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 1257 + |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 1258 + |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 1259 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 1260 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1261 + |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 1262 + |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 1263 + |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 1264 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 1265 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1266 |> Jsont.Object.finish 1267 1268 + type state_metadata = { 1269 + account_created_at : string option; 1270 } 1271 1272 + let state_metadata_jsont = 1273 + Jsont.Object.map ~kind:"State_metadata" 1274 + (fun _typ account_created_at -> { account_created_at }) 1275 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#stateMetadata" ~enc:(fun _ -> "app.bsky.ageassurance.defs#stateMetadata") 1276 + |> Jsont.Object.opt_mem "accountCreatedAt" Jsont.string ~enc:(fun r -> r.account_created_at) 1277 |> Jsont.Object.finish 1278 1279 + type status = string 1280 + let status_jsont = Jsont.string 1281 + 1282 + type config = { 1283 + regions : config_region list; 1284 } 1285 1286 + let config_jsont = 1287 + Jsont.Object.map ~kind:"Config" 1288 + (fun _typ regions -> { regions }) 1289 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#config" ~enc:(fun _ -> "app.bsky.ageassurance.defs#config") 1290 + |> Jsont.Object.mem "regions" (Jsont.list config_region_jsont) ~enc:(fun r -> r.regions) 1291 |> Jsont.Object.finish 1292 1293 + type config_region_rule_default = { 1294 + access : access; 1295 } 1296 1297 + let config_region_rule_default_jsont = 1298 + Jsont.Object.map ~kind:"Config_region_rule_default" 1299 + (fun _typ access -> { access }) 1300 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleDefault" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleDefault") 1301 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1302 |> Jsont.Object.finish 1303 1304 + type config_region_rule_if_account_newer_than = { 1305 + access : access; 1306 + date : string; 1307 } 1308 1309 + let config_region_rule_if_account_newer_than_jsont = 1310 + Jsont.Object.map ~kind:"Config_region_rule_if_account_newer_than" 1311 + (fun _typ access date -> { access; date }) 1312 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan") 1313 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1314 + |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 1315 |> Jsont.Object.finish 1316 1317 + type config_region_rule_if_account_older_than = { 1318 + access : access; 1319 + date : string; 1320 } 1321 1322 + let config_region_rule_if_account_older_than_jsont = 1323 + Jsont.Object.map ~kind:"Config_region_rule_if_account_older_than" 1324 + (fun _typ access date -> { access; date }) 1325 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan") 1326 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1327 + |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 1328 |> Jsont.Object.finish 1329 1330 + type config_region_rule_if_assured_over_age = { 1331 + access : access; 1332 + age : int; 1333 } 1334 1335 + let config_region_rule_if_assured_over_age_jsont = 1336 + Jsont.Object.map ~kind:"Config_region_rule_if_assured_over_age" 1337 + (fun _typ access age -> { access; age }) 1338 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge") 1339 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1340 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 1341 |> Jsont.Object.finish 1342 1343 + type config_region_rule_if_assured_under_age = { 1344 + access : access; 1345 + age : int; 1346 } 1347 1348 + let config_region_rule_if_assured_under_age_jsont = 1349 + Jsont.Object.map ~kind:"Config_region_rule_if_assured_under_age" 1350 + (fun _typ access age -> { access; age }) 1351 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge") 1352 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1353 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 1354 |> Jsont.Object.finish 1355 1356 + type config_region_rule_if_declared_over_age = { 1357 + access : access; 1358 + age : int; 1359 } 1360 1361 + let config_region_rule_if_declared_over_age_jsont = 1362 + Jsont.Object.map ~kind:"Config_region_rule_if_declared_over_age" 1363 + (fun _typ access age -> { access; age }) 1364 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge") 1365 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1366 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 1367 |> Jsont.Object.finish 1368 1369 + type config_region_rule_if_declared_under_age = { 1370 + access : access; 1371 + age : int; 1372 } 1373 1374 + let config_region_rule_if_declared_under_age_jsont = 1375 + Jsont.Object.map ~kind:"Config_region_rule_if_declared_under_age" 1376 + (fun _typ access age -> { access; age }) 1377 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge") 1378 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1379 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 1380 |> Jsont.Object.finish 1381 1382 + type state = { 1383 + access : access; 1384 + last_initiated_at : string option; 1385 + status : status; 1386 } 1387 1388 + let state_jsont = 1389 + Jsont.Object.map ~kind:"State" 1390 + (fun _typ access last_initiated_at status -> { access; last_initiated_at; status }) 1391 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#state" ~enc:(fun _ -> "app.bsky.ageassurance.defs#state") 1392 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1393 + |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 1394 + |> Jsont.Object.mem "status" status_jsont ~enc:(fun r -> r.status) 1395 |> Jsont.Object.finish 1396 1397 end 1398 + module GetState = struct 1399 type params = { 1400 + country_code : string; 1401 + region_code : string option; 1402 } 1403 1404 let params_jsont = 1405 Jsont.Object.map ~kind:"Params" 1406 + (fun country_code region_code -> { 1407 + country_code; 1408 + region_code; 1409 }) 1410 + |> Jsont.Object.mem "countryCode" Jsont.string 1411 + ~enc:(fun r -> r.country_code) 1412 + |> Jsont.Object.opt_mem "regionCode" Jsont.string 1413 + ~enc:(fun r -> r.region_code) 1414 |> Jsont.Object.finish 1415 1416 type output = { 1417 + metadata : Defs.state_metadata; 1418 + state : Defs.state; 1419 } 1420 1421 let output_jsont = 1422 Jsont.Object.map ~kind:"Output" 1423 + (fun _typ metadata state -> { metadata; state }) 1424 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.getState#output" ~enc:(fun _ -> "app.bsky.ageassurance.getState#output") 1425 + |> Jsont.Object.mem "metadata" Defs.state_metadata_jsont ~enc:(fun r -> r.metadata) 1426 + |> Jsont.Object.mem "state" Defs.state_jsont ~enc:(fun r -> r.state) 1427 |> Jsont.Object.finish 1428 1429 end 1430 + module GetConfig = struct 1431 + type output = Defs.config 1432 1433 + let output_jsont = Defs.config_jsont 1434 1435 end 1436 + module Begin = struct 1437 type input = { 1438 + country_code : string; 1439 + email : string; 1440 + language : string; 1441 + region_code : string option; 1442 } 1443 1444 let input_jsont = 1445 Jsont.Object.map ~kind:"Input" 1446 + (fun _typ country_code email language region_code -> { country_code; email; language; region_code }) 1447 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.begin#input" ~enc:(fun _ -> "app.bsky.ageassurance.begin#input") 1448 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 1449 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 1450 + |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 1451 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 1452 |> Jsont.Object.finish 1453 1454 + type output = Defs.state 1455 1456 + let output_jsont = Defs.state_jsont 1457 1458 end 1459 end ··· 1512 1513 end 1514 module Defs = struct 1515 + type adult_content_pref = { 1516 + enabled : bool; 1517 } 1518 1519 + let adult_content_pref_jsont = 1520 + Jsont.Object.map ~kind:"Adult_content_pref" 1521 + (fun _typ enabled -> { enabled }) 1522 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#adultContentPref" ~enc:(fun _ -> "app.bsky.actor.defs#adultContentPref") 1523 + |> Jsont.Object.mem "enabled" Jsont.bool ~enc:(fun r -> r.enabled) 1524 |> Jsont.Object.finish 1525 1526 + type bsky_app_progress_guide = { 1527 + guide : string; 1528 } 1529 1530 + let bsky_app_progress_guide_jsont = 1531 + Jsont.Object.map ~kind:"Bsky_app_progress_guide" 1532 + (fun _typ guide -> { guide }) 1533 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#bskyAppProgressGuide" ~enc:(fun _ -> "app.bsky.actor.defs#bskyAppProgressGuide") 1534 + |> Jsont.Object.mem "guide" Jsont.string ~enc:(fun r -> r.guide) 1535 |> Jsont.Object.finish 1536 1537 + type content_label_pref = { 1538 + label : string; 1539 + labeler_did : string option; 1540 + visibility : string; 1541 } 1542 1543 + let content_label_pref_jsont = 1544 + Jsont.Object.map ~kind:"Content_label_pref" 1545 + (fun _typ label labeler_did visibility -> { label; labeler_did; visibility }) 1546 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#contentLabelPref" ~enc:(fun _ -> "app.bsky.actor.defs#contentLabelPref") 1547 + |> Jsont.Object.mem "label" Jsont.string ~enc:(fun r -> r.label) 1548 + |> Jsont.Object.opt_mem "labelerDid" Jsont.string ~enc:(fun r -> r.labeler_did) 1549 + |> Jsont.Object.mem "visibility" Jsont.string ~enc:(fun r -> r.visibility) 1550 |> Jsont.Object.finish 1551 1552 + type declared_age_pref = { 1553 + is_over_age13 : bool option; 1554 + is_over_age16 : bool option; 1555 + is_over_age18 : bool option; 1556 } 1557 1558 + let declared_age_pref_jsont = 1559 + Jsont.Object.map ~kind:"Declared_age_pref" 1560 + (fun _typ is_over_age13 is_over_age16 is_over_age18 -> { is_over_age13; is_over_age16; is_over_age18 }) 1561 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#declaredAgePref" ~enc:(fun _ -> "app.bsky.actor.defs#declaredAgePref") 1562 + |> Jsont.Object.opt_mem "isOverAge13" Jsont.bool ~enc:(fun r -> r.is_over_age13) 1563 + |> Jsont.Object.opt_mem "isOverAge16" Jsont.bool ~enc:(fun r -> r.is_over_age16) 1564 + |> Jsont.Object.opt_mem "isOverAge18" Jsont.bool ~enc:(fun r -> r.is_over_age18) 1565 |> Jsont.Object.finish 1566 1567 + type feed_view_pref = { 1568 + feed : string; 1569 + hide_quote_posts : bool option; 1570 + hide_replies : bool option; 1571 + hide_replies_by_like_count : int option; 1572 + hide_replies_by_unfollowed : bool option; 1573 + hide_reposts : bool option; 1574 } 1575 1576 + let feed_view_pref_jsont = 1577 + Jsont.Object.map ~kind:"Feed_view_pref" 1578 + (fun _typ feed hide_quote_posts hide_replies hide_replies_by_like_count hide_replies_by_unfollowed hide_reposts -> { feed; hide_quote_posts; hide_replies; hide_replies_by_like_count; hide_replies_by_unfollowed; hide_reposts }) 1579 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#feedViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#feedViewPref") 1580 + |> Jsont.Object.mem "feed" Jsont.string ~enc:(fun r -> r.feed) 1581 + |> Jsont.Object.opt_mem "hideQuotePosts" Jsont.bool ~enc:(fun r -> r.hide_quote_posts) 1582 + |> Jsont.Object.opt_mem "hideReplies" Jsont.bool ~enc:(fun r -> r.hide_replies) 1583 + |> Jsont.Object.opt_mem "hideRepliesByLikeCount" Jsont.int ~enc:(fun r -> r.hide_replies_by_like_count) 1584 + |> Jsont.Object.opt_mem "hideRepliesByUnfollowed" Jsont.bool ~enc:(fun r -> r.hide_replies_by_unfollowed) 1585 + |> Jsont.Object.opt_mem "hideReposts" Jsont.bool ~enc:(fun r -> r.hide_reposts) 1586 |> Jsont.Object.finish 1587 1588 + type hidden_posts_pref = { 1589 + items : string list; 1590 } 1591 1592 + let hidden_posts_pref_jsont = 1593 + Jsont.Object.map ~kind:"Hidden_posts_pref" 1594 + (fun _typ items -> { items }) 1595 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#hiddenPostsPref" ~enc:(fun _ -> "app.bsky.actor.defs#hiddenPostsPref") 1596 + |> Jsont.Object.mem "items" (Jsont.list Jsont.string) ~enc:(fun r -> r.items) 1597 |> Jsont.Object.finish 1598 1599 + type interests_pref = { 1600 + tags : string list; 1601 } 1602 1603 + let interests_pref_jsont = 1604 + Jsont.Object.map ~kind:"Interests_pref" 1605 + (fun _typ tags -> { tags }) 1606 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#interestsPref" ~enc:(fun _ -> "app.bsky.actor.defs#interestsPref") 1607 + |> Jsont.Object.mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 1608 |> Jsont.Object.finish 1609 1610 + type labeler_pref_item = { 1611 + did : string; 1612 } 1613 1614 + let labeler_pref_item_jsont = 1615 + Jsont.Object.map ~kind:"Labeler_pref_item" 1616 + (fun _typ did -> { did }) 1617 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#labelerPrefItem" ~enc:(fun _ -> "app.bsky.actor.defs#labelerPrefItem") 1618 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1619 |> Jsont.Object.finish 1620 1621 + type muted_word_target = string 1622 + let muted_word_target_jsont = Jsont.string 1623 1624 type nux = { 1625 completed : bool; ··· 1638 |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1639 |> Jsont.Object.finish 1640 1641 + type personal_details_pref = { 1642 + birth_date : string option; 1643 + } 1644 + 1645 + let personal_details_pref_jsont = 1646 + Jsont.Object.map ~kind:"Personal_details_pref" 1647 + (fun _typ birth_date -> { birth_date }) 1648 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#personalDetailsPref" ~enc:(fun _ -> "app.bsky.actor.defs#personalDetailsPref") 1649 + |> Jsont.Object.opt_mem "birthDate" Jsont.string ~enc:(fun r -> r.birth_date) 1650 + |> Jsont.Object.finish 1651 1652 + type post_interaction_settings_pref = { 1653 + postgate_embedding_rules : Jsont.json list option; 1654 + threadgate_allow_rules : Jsont.json list option; 1655 } 1656 1657 + let post_interaction_settings_pref_jsont = 1658 + Jsont.Object.map ~kind:"Post_interaction_settings_pref" 1659 + (fun _typ postgate_embedding_rules threadgate_allow_rules -> { postgate_embedding_rules; threadgate_allow_rules }) 1660 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#postInteractionSettingsPref" ~enc:(fun _ -> "app.bsky.actor.defs#postInteractionSettingsPref") 1661 + |> Jsont.Object.opt_mem "postgateEmbeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.postgate_embedding_rules) 1662 + |> Jsont.Object.opt_mem "threadgateAllowRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.threadgate_allow_rules) 1663 |> Jsont.Object.finish 1664 1665 + type preferences = Jsont.json list 1666 + let preferences_jsont = (Jsont.list Jsont.json) 1667 + 1668 + type profile_associated_activity_subscription = { 1669 + allow_subscriptions : string; 1670 } 1671 1672 + let profile_associated_activity_subscription_jsont = 1673 + Jsont.Object.map ~kind:"Profile_associated_activity_subscription" 1674 + (fun _typ allow_subscriptions -> { allow_subscriptions }) 1675 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedActivitySubscription" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedActivitySubscription") 1676 + |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1677 |> Jsont.Object.finish 1678 1679 + type profile_associated_chat = { 1680 + allow_incoming : string; 1681 } 1682 1683 + let profile_associated_chat_jsont = 1684 + Jsont.Object.map ~kind:"Profile_associated_chat" 1685 + (fun _typ allow_incoming -> { allow_incoming }) 1686 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedChat" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedChat") 1687 + |> Jsont.Object.mem "allowIncoming" Jsont.string ~enc:(fun r -> r.allow_incoming) 1688 |> Jsont.Object.finish 1689 1690 + type saved_feed = { 1691 + id : string; 1692 + pinned : bool; 1693 + type_ : string; 1694 + value : string; 1695 } 1696 1697 + let saved_feed_jsont = 1698 + Jsont.Object.map ~kind:"Saved_feed" 1699 + (fun _typ id pinned type_ value -> { id; pinned; type_; value }) 1700 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeed" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeed") 1701 + |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1702 + |> Jsont.Object.mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 1703 + |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 1704 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1705 |> Jsont.Object.finish 1706 1707 + type saved_feeds_pref = { 1708 + pinned : string list; 1709 + saved : string list; 1710 + timeline_index : int option; 1711 } 1712 1713 + let saved_feeds_pref_jsont = 1714 + Jsont.Object.map ~kind:"Saved_feeds_pref" 1715 + (fun _typ pinned saved timeline_index -> { pinned; saved; timeline_index }) 1716 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeedsPref" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeedsPref") 1717 + |> Jsont.Object.mem "pinned" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned) 1718 + |> Jsont.Object.mem "saved" (Jsont.list Jsont.string) ~enc:(fun r -> r.saved) 1719 + |> Jsont.Object.opt_mem "timelineIndex" Jsont.int ~enc:(fun r -> r.timeline_index) 1720 |> Jsont.Object.finish 1721 1722 + type status_view = { 1723 + cid : string option; 1724 + embed : Jsont.json option; 1725 + expires_at : string option; 1726 + is_active : bool option; 1727 + is_disabled : bool option; 1728 + record : Jsont.json; 1729 + status : string; 1730 + uri : string option; 1731 } 1732 1733 + let status_view_jsont = 1734 + Jsont.Object.map ~kind:"Status_view" 1735 + (fun _typ cid embed expires_at is_active is_disabled record status uri -> { cid; embed; expires_at; is_active; is_disabled; record; status; uri }) 1736 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#statusView" ~enc:(fun _ -> "app.bsky.actor.defs#statusView") 1737 + |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 1738 + |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 1739 + |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 1740 + |> Jsont.Object.opt_mem "isActive" Jsont.bool ~enc:(fun r -> r.is_active) 1741 + |> Jsont.Object.opt_mem "isDisabled" Jsont.bool ~enc:(fun r -> r.is_disabled) 1742 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1743 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1744 + |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1745 |> Jsont.Object.finish 1746 1747 + type thread_view_pref = { 1748 + sort : string option; 1749 } 1750 1751 + let thread_view_pref_jsont = 1752 + Jsont.Object.map ~kind:"Thread_view_pref" 1753 + (fun _typ sort -> { sort }) 1754 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#threadViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#threadViewPref") 1755 + |> Jsont.Object.opt_mem "sort" Jsont.string ~enc:(fun r -> r.sort) 1756 |> Jsont.Object.finish 1757 1758 + type verification_prefs = { 1759 + hide_badges : bool option; 1760 } 1761 1762 + let verification_prefs_jsont = 1763 + Jsont.Object.map ~kind:"Verification_prefs" 1764 + (fun _typ hide_badges -> { hide_badges }) 1765 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationPrefs" ~enc:(fun _ -> "app.bsky.actor.defs#verificationPrefs") 1766 + |> Jsont.Object.opt_mem "hideBadges" Jsont.bool ~enc:(fun r -> r.hide_badges) 1767 |> Jsont.Object.finish 1768 1769 + type verification_view = { 1770 + created_at : string; 1771 + is_valid : bool; 1772 + issuer : string; 1773 + uri : string; 1774 } 1775 1776 + let verification_view_jsont = 1777 + Jsont.Object.map ~kind:"Verification_view" 1778 + (fun _typ created_at is_valid issuer uri -> { created_at; is_valid; issuer; uri }) 1779 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationView" ~enc:(fun _ -> "app.bsky.actor.defs#verificationView") 1780 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1781 + |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 1782 + |> Jsont.Object.mem "issuer" Jsont.string ~enc:(fun r -> r.issuer) 1783 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1784 |> Jsont.Object.finish 1785 1786 + type bsky_app_state_pref = { 1787 + active_progress_guide : Jsont.json option; 1788 + nuxs : Jsont.json list option; 1789 + queued_nudges : string list option; 1790 } 1791 1792 + let bsky_app_state_pref_jsont = 1793 + Jsont.Object.map ~kind:"Bsky_app_state_pref" 1794 + (fun _typ active_progress_guide nuxs queued_nudges -> { active_progress_guide; nuxs; queued_nudges }) 1795 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#bskyAppStatePref" ~enc:(fun _ -> "app.bsky.actor.defs#bskyAppStatePref") 1796 + |> Jsont.Object.opt_mem "activeProgressGuide" Jsont.json ~enc:(fun r -> r.active_progress_guide) 1797 + |> Jsont.Object.opt_mem "nuxs" (Jsont.list Jsont.json) ~enc:(fun r -> r.nuxs) 1798 + |> Jsont.Object.opt_mem "queuedNudges" (Jsont.list Jsont.string) ~enc:(fun r -> r.queued_nudges) 1799 |> Jsont.Object.finish 1800 1801 + type labelers_pref = { 1802 + labelers : Jsont.json list; 1803 } 1804 1805 + let labelers_pref_jsont = 1806 + Jsont.Object.map ~kind:"Labelers_pref" 1807 + (fun _typ labelers -> { labelers }) 1808 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#labelersPref" ~enc:(fun _ -> "app.bsky.actor.defs#labelersPref") 1809 + |> Jsont.Object.mem "labelers" (Jsont.list Jsont.json) ~enc:(fun r -> r.labelers) 1810 |> Jsont.Object.finish 1811 1812 type muted_word = { ··· 1828 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1829 |> Jsont.Object.finish 1830 1831 + type profile_associated = { 1832 + activity_subscription : Jsont.json option; 1833 + chat : Jsont.json option; 1834 + feedgens : int option; 1835 + labeler : bool option; 1836 + lists : int option; 1837 + starter_packs : int option; 1838 } 1839 1840 + let profile_associated_jsont = 1841 + Jsont.Object.map ~kind:"Profile_associated" 1842 + (fun _typ activity_subscription chat feedgens labeler lists starter_packs -> { activity_subscription; chat; feedgens; labeler; lists; starter_packs }) 1843 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociated" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociated") 1844 + |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1845 + |> Jsont.Object.opt_mem "chat" Jsont.json ~enc:(fun r -> r.chat) 1846 + |> Jsont.Object.opt_mem "feedgens" Jsont.int ~enc:(fun r -> r.feedgens) 1847 + |> Jsont.Object.opt_mem "labeler" Jsont.bool ~enc:(fun r -> r.labeler) 1848 + |> Jsont.Object.opt_mem "lists" Jsont.int ~enc:(fun r -> r.lists) 1849 + |> Jsont.Object.opt_mem "starterPacks" Jsont.int ~enc:(fun r -> r.starter_packs) 1850 + |> Jsont.Object.finish 1851 + 1852 + type saved_feeds_pref_v2 = { 1853 + items : Jsont.json list; 1854 + } 1855 + 1856 + let saved_feeds_pref_v2_jsont = 1857 + Jsont.Object.map ~kind:"Saved_feeds_pref_v2" 1858 + (fun _typ items -> { items }) 1859 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeedsPrefV2" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeedsPrefV2") 1860 + |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 1861 |> Jsont.Object.finish 1862 1863 + type verification_state = { 1864 + trusted_verifier_status : string; 1865 + verifications : Jsont.json list; 1866 + verified_status : string; 1867 } 1868 1869 + let verification_state_jsont = 1870 + Jsont.Object.map ~kind:"Verification_state" 1871 + (fun _typ trusted_verifier_status verifications verified_status -> { trusted_verifier_status; verifications; verified_status }) 1872 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationState" ~enc:(fun _ -> "app.bsky.actor.defs#verificationState") 1873 + |> Jsont.Object.mem "trustedVerifierStatus" Jsont.string ~enc:(fun r -> r.trusted_verifier_status) 1874 + |> Jsont.Object.mem "verifications" (Jsont.list Jsont.json) ~enc:(fun r -> r.verifications) 1875 + |> Jsont.Object.mem "verifiedStatus" Jsont.string ~enc:(fun r -> r.verified_status) 1876 |> Jsont.Object.finish 1877 1878 type muted_words_pref = { ··· 1886 |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 1887 |> Jsont.Object.finish 1888 1889 + type known_followers = { 1890 + count : int; 1891 + followers : Jsont.json list; 1892 } 1893 1894 + let known_followers_jsont = 1895 + Jsont.Object.map ~kind:"Known_followers" 1896 + (fun _typ count followers -> { count; followers }) 1897 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#knownFollowers" ~enc:(fun _ -> "app.bsky.actor.defs#knownFollowers") 1898 + |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 1899 + |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 1900 |> Jsont.Object.finish 1901 1902 + type profile_view = { 1903 associated : Jsont.json option; 1904 avatar : string option; 1905 created_at : string option; 1906 debug : Jsont.json option; 1907 description : string option; 1908 did : string; 1909 display_name : string option; 1910 handle : string; 1911 indexed_at : string option; 1912 labels : Com.Atproto.Label.Defs.label list option; 1913 pronouns : string option; 1914 status : Jsont.json option; 1915 verification : Jsont.json option; 1916 viewer : Jsont.json option; 1917 } 1918 1919 + let profile_view_jsont = 1920 + Jsont.Object.map ~kind:"Profile_view" 1921 + (fun _typ associated avatar created_at debug description did display_name handle indexed_at labels pronouns status verification viewer -> { associated; avatar; created_at; debug; description; did; display_name; handle; indexed_at; labels; pronouns; status; verification; viewer }) 1922 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileView" ~enc:(fun _ -> "app.bsky.actor.defs#profileView") 1923 |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1924 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1925 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1926 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1927 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1928 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1929 |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1930 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1931 |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1932 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1933 |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1934 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 1935 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1936 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1937 |> Jsont.Object.finish 1938 1939 type profile_view_basic = { ··· 1969 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1970 |> Jsont.Object.finish 1971 1972 + type profile_view_detailed = { 1973 associated : Jsont.json option; 1974 avatar : string option; 1975 + banner : string option; 1976 created_at : string option; 1977 debug : Jsont.json option; 1978 description : string option; 1979 did : string; 1980 display_name : string option; 1981 + followers_count : int option; 1982 + follows_count : int option; 1983 handle : string; 1984 indexed_at : string option; 1985 + joined_via_starter_pack : Jsont.json option; 1986 labels : Com.Atproto.Label.Defs.label list option; 1987 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1988 + posts_count : int option; 1989 pronouns : string option; 1990 status : Jsont.json option; 1991 verification : Jsont.json option; 1992 viewer : Jsont.json option; 1993 + website : string option; 1994 } 1995 1996 + let profile_view_detailed_jsont = 1997 + Jsont.Object.map ~kind:"Profile_view_detailed" 1998 + (fun _typ associated avatar banner created_at debug description did display_name followers_count follows_count handle indexed_at joined_via_starter_pack labels pinned_post posts_count pronouns status verification viewer website -> { associated; avatar; banner; created_at; debug; description; did; display_name; followers_count; follows_count; handle; indexed_at; joined_via_starter_pack; labels; pinned_post; posts_count; pronouns; status; verification; viewer; website }) 1999 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileViewDetailed" ~enc:(fun _ -> "app.bsky.actor.defs#profileViewDetailed") 2000 |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 2001 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2002 + |> Jsont.Object.opt_mem "banner" Jsont.string ~enc:(fun r -> r.banner) 2003 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2004 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 2005 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2006 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2007 |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 2008 + |> Jsont.Object.opt_mem "followersCount" Jsont.int ~enc:(fun r -> r.followers_count) 2009 + |> Jsont.Object.opt_mem "followsCount" Jsont.int ~enc:(fun r -> r.follows_count) 2010 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 2011 |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2012 + |> Jsont.Object.opt_mem "joinedViaStarterPack" Jsont.json ~enc:(fun r -> r.joined_via_starter_pack) 2013 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2014 + |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 2015 + |> Jsont.Object.opt_mem "postsCount" Jsont.int ~enc:(fun r -> r.posts_count) 2016 |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 2017 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 2018 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 2019 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2020 + |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 2021 |> Jsont.Object.finish 2022 2023 + type viewer_state = { 2024 + activity_subscription : Jsont.json option; 2025 + blocked_by : bool option; 2026 + blocking : string option; 2027 + blocking_by_list : Jsont.json option; 2028 + followed_by : string option; 2029 + following : string option; 2030 + known_followers : Jsont.json option; 2031 + muted : bool option; 2032 + muted_by_list : Jsont.json option; 2033 } 2034 2035 + let viewer_state_jsont = 2036 + Jsont.Object.map ~kind:"Viewer_state" 2037 + (fun _typ activity_subscription blocked_by blocking blocking_by_list followed_by following known_followers muted muted_by_list -> { activity_subscription; blocked_by; blocking; blocking_by_list; followed_by; following; known_followers; muted; muted_by_list }) 2038 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#viewerState" ~enc:(fun _ -> "app.bsky.actor.defs#viewerState") 2039 + |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 2040 + |> Jsont.Object.opt_mem "blockedBy" Jsont.bool ~enc:(fun r -> r.blocked_by) 2041 + |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 2042 + |> Jsont.Object.opt_mem "blockingByList" Jsont.json ~enc:(fun r -> r.blocking_by_list) 2043 + |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 2044 + |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 2045 + |> Jsont.Object.opt_mem "knownFollowers" Jsont.json ~enc:(fun r -> r.known_followers) 2046 + |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 2047 + |> Jsont.Object.opt_mem "mutedByList" Jsont.json ~enc:(fun r -> r.muted_by_list) 2048 |> Jsont.Object.finish 2049 2050 end ··· 2082 |> Jsont.Object.finish 2083 2084 end 2085 module SearchActors = struct 2086 type params = { 2087 cursor : string option; ··· 2122 |> Jsont.Object.finish 2123 2124 end 2125 + module PutPreferences = struct 2126 + type input = { 2127 + preferences : Jsont.json; 2128 + } 2129 + 2130 + let input_jsont = 2131 + Jsont.Object.map ~kind:"Input" 2132 + (fun _typ preferences -> { preferences }) 2133 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.putPreferences#input" ~enc:(fun _ -> "app.bsky.actor.putPreferences#input") 2134 + |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 2135 + |> Jsont.Object.finish 2136 + 2137 + end 2138 module GetSuggestions = struct 2139 type params = { 2140 cursor : string option; ··· 2195 |> Jsont.Object.finish 2196 2197 end 2198 + module GetProfile = struct 2199 type params = { 2200 + actor : string; 2201 } 2202 2203 let params_jsont = 2204 Jsont.Object.map ~kind:"Params" 2205 + (fun actor -> { 2206 + actor; 2207 }) 2208 + |> Jsont.Object.mem "actor" Jsont.string 2209 + ~enc:(fun r -> r.actor) 2210 |> Jsont.Object.finish 2211 2212 + type output = Jsont.json 2213 2214 + let output_jsont = Jsont.json 2215 2216 end 2217 + module GetPreferences = struct 2218 + type params = unit 2219 2220 + let params_jsont = Jsont.ignore 2221 2222 type output = { 2223 + preferences : Jsont.json; 2224 } 2225 2226 let output_jsont = 2227 Jsont.Object.map ~kind:"Output" 2228 + (fun _typ preferences -> { preferences }) 2229 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getPreferences#output" ~enc:(fun _ -> "app.bsky.actor.getPreferences#output") 2230 + |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 2231 |> Jsont.Object.finish 2232 2233 end 2234 + end 2235 + module Graph = struct 2236 + module Verification = struct 2237 + type main = { 2238 + created_at : string; 2239 + display_name : string; 2240 + handle : string; 2241 + subject : string; 2242 } 2243 2244 + let main_jsont = 2245 + Jsont.Object.map ~kind:"Main" 2246 + (fun _typ created_at display_name handle subject -> { created_at; display_name; handle; subject }) 2247 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.verification" ~enc:(fun _ -> "app.bsky.graph.verification") 2248 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2249 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 2250 + |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 2251 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2252 |> Jsont.Object.finish 2253 2254 end 2255 + module UnmuteThread = struct 2256 type input = { 2257 + root : string; 2258 } 2259 2260 let input_jsont = 2261 Jsont.Object.map ~kind:"Input" 2262 + (fun _typ root -> { root }) 2263 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteThread#input" ~enc:(fun _ -> "app.bsky.graph.unmuteThread#input") 2264 + |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 2265 |> Jsont.Object.finish 2266 2267 end 2268 + module UnmuteActorList = struct 2269 + type input = { 2270 + list_ : string; 2271 } 2272 2273 + let input_jsont = 2274 + Jsont.Object.map ~kind:"Input" 2275 + (fun _typ list_ -> { list_ }) 2276 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActorList#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActorList#input") 2277 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2278 |> Jsont.Object.finish 2279 2280 end 2281 + module UnmuteActor = struct 2282 type input = { 2283 + actor : string; 2284 } 2285 2286 let input_jsont = 2287 Jsont.Object.map ~kind:"Input" 2288 + (fun _typ actor -> { actor }) 2289 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActor#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActor#input") 2290 + |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 2291 |> Jsont.Object.finish 2292 2293 end 2294 module Starterpack = struct 2295 type feed_item = { 2296 uri : string; ··· 2325 |> Jsont.Object.finish 2326 2327 end 2328 + module MuteThread = struct 2329 + type input = { 2330 + root : string; 2331 + } 2332 + 2333 + let input_jsont = 2334 + Jsont.Object.map ~kind:"Input" 2335 + (fun _typ root -> { root }) 2336 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteThread#input" ~enc:(fun _ -> "app.bsky.graph.muteThread#input") 2337 + |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 2338 + |> Jsont.Object.finish 2339 + 2340 + end 2341 + module MuteActorList = struct 2342 + type input = { 2343 + list_ : string; 2344 + } 2345 + 2346 + let input_jsont = 2347 + Jsont.Object.map ~kind:"Input" 2348 + (fun _typ list_ -> { list_ }) 2349 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActorList#input" ~enc:(fun _ -> "app.bsky.graph.muteActorList#input") 2350 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2351 + |> Jsont.Object.finish 2352 + 2353 + end 2354 + module MuteActor = struct 2355 + type input = { 2356 actor : string; 2357 + } 2358 + 2359 + let input_jsont = 2360 + Jsont.Object.map ~kind:"Input" 2361 + (fun _typ actor -> { actor }) 2362 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActor#input" ~enc:(fun _ -> "app.bsky.graph.muteActor#input") 2363 + |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 2364 + |> Jsont.Object.finish 2365 + 2366 + end 2367 + module Listitem = struct 2368 + type main = { 2369 + created_at : string; 2370 + list_ : string; 2371 + subject : string; 2372 } 2373 2374 + let main_jsont = 2375 + Jsont.Object.map ~kind:"Main" 2376 + (fun _typ created_at list_ subject -> { created_at; list_; subject }) 2377 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listitem" ~enc:(fun _ -> "app.bsky.graph.listitem") 2378 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2379 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2380 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2381 |> Jsont.Object.finish 2382 2383 + end 2384 + module Listblock = struct 2385 + type main = { 2386 + created_at : string; 2387 + subject : string; 2388 } 2389 2390 + let main_jsont = 2391 + Jsont.Object.map ~kind:"Main" 2392 + (fun _typ created_at subject -> { created_at; subject }) 2393 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listblock" ~enc:(fun _ -> "app.bsky.graph.listblock") 2394 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2395 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2396 |> Jsont.Object.finish 2397 2398 end ··· 2426 |> Jsont.Object.finish 2427 2428 end 2429 + module GetMutes = struct 2430 + type params = { 2431 + cursor : string option; 2432 + limit : int option; 2433 } 2434 2435 + let params_jsont = 2436 + Jsont.Object.map ~kind:"Params" 2437 + (fun cursor limit -> { 2438 + cursor; 2439 + limit; 2440 + }) 2441 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2442 + ~enc:(fun r -> r.cursor) 2443 + |> Jsont.Object.opt_mem "limit" Jsont.int 2444 + ~enc:(fun r -> r.limit) 2445 |> Jsont.Object.finish 2446 2447 + type output = { 2448 + cursor : string option; 2449 + mutes : Jsont.json list; 2450 } 2451 2452 + let output_jsont = 2453 + Jsont.Object.map ~kind:"Output" 2454 + (fun _typ cursor mutes -> { cursor; mutes }) 2455 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getMutes#output" ~enc:(fun _ -> "app.bsky.graph.getMutes#output") 2456 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2457 + |> Jsont.Object.mem "mutes" (Jsont.list Jsont.json) ~enc:(fun r -> r.mutes) 2458 |> Jsont.Object.finish 2459 2460 end 2461 + module GetKnownFollowers = struct 2462 type params = { 2463 actor : string; 2464 cursor : string option; ··· 2489 let output_jsont = 2490 Jsont.Object.map ~kind:"Output" 2491 (fun _typ cursor followers subject -> { cursor; followers; subject }) 2492 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getKnownFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getKnownFollowers#output") 2493 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2494 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2495 |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2496 |> Jsont.Object.finish 2497 2498 end 2499 + module GetFollows = struct 2500 + type params = { 2501 actor : string; 2502 + cursor : string option; 2503 + limit : int option; 2504 } 2505 2506 + let params_jsont = 2507 + Jsont.Object.map ~kind:"Params" 2508 + (fun actor cursor limit -> { 2509 + actor; 2510 + cursor; 2511 + limit; 2512 + }) 2513 + |> Jsont.Object.mem "actor" Jsont.string 2514 + ~enc:(fun r -> r.actor) 2515 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2516 + ~enc:(fun r -> r.cursor) 2517 + |> Jsont.Object.opt_mem "limit" Jsont.int 2518 + ~enc:(fun r -> r.limit) 2519 |> Jsont.Object.finish 2520 2521 + type output = { 2522 + cursor : string option; 2523 + follows : Jsont.json list; 2524 + subject : Jsont.json; 2525 } 2526 2527 + let output_jsont = 2528 + Jsont.Object.map ~kind:"Output" 2529 + (fun _typ cursor follows subject -> { cursor; follows; subject }) 2530 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollows#output" ~enc:(fun _ -> "app.bsky.graph.getFollows#output") 2531 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2532 + |> Jsont.Object.mem "follows" (Jsont.list Jsont.json) ~enc:(fun r -> r.follows) 2533 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2534 |> Jsont.Object.finish 2535 2536 end 2537 + module GetFollowers = struct 2538 type params = { 2539 actor : string; 2540 cursor : string option; ··· 2565 let output_jsont = 2566 Jsont.Object.map ~kind:"Output" 2567 (fun _typ cursor followers subject -> { cursor; followers; subject }) 2568 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getFollowers#output") 2569 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2570 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2571 |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2572 |> Jsont.Object.finish 2573 2574 end 2575 + module GetBlocks = struct 2576 + type params = { 2577 + cursor : string option; 2578 + limit : int option; 2579 } 2580 2581 + let params_jsont = 2582 + Jsont.Object.map ~kind:"Params" 2583 + (fun cursor limit -> { 2584 + cursor; 2585 + limit; 2586 + }) 2587 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2588 + ~enc:(fun r -> r.cursor) 2589 + |> Jsont.Object.opt_mem "limit" Jsont.int 2590 + ~enc:(fun r -> r.limit) 2591 + |> Jsont.Object.finish 2592 + 2593 + type output = { 2594 + blocks : Jsont.json list; 2595 + cursor : string option; 2596 + } 2597 + 2598 + let output_jsont = 2599 + Jsont.Object.map ~kind:"Output" 2600 + (fun _typ blocks cursor -> { blocks; cursor }) 2601 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getBlocks#output") 2602 + |> Jsont.Object.mem "blocks" (Jsont.list Jsont.json) ~enc:(fun r -> r.blocks) 2603 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2604 |> Jsont.Object.finish 2605 2606 end 2607 + module Follow = struct 2608 type main = { 2609 created_at : string; 2610 subject : string; 2611 + via : Com.Atproto.Repo.StrongRef.main option; 2612 } 2613 2614 let main_jsont = 2615 Jsont.Object.map ~kind:"Main" 2616 + (fun _typ created_at subject via -> { created_at; subject; via }) 2617 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.follow" ~enc:(fun _ -> "app.bsky.graph.follow") 2618 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2619 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2620 + |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 2621 |> Jsont.Object.finish 2622 2623 end 2624 module Defs = struct 2625 + type curatelist = string 2626 + let curatelist_jsont = Jsont.string 2627 + 2628 + type list_item_view = { 2629 + subject : Jsont.json; 2630 uri : string; 2631 } 2632 2633 + let list_item_view_jsont = 2634 + Jsont.Object.map ~kind:"List_item_view" 2635 + (fun _typ subject uri -> { subject; uri }) 2636 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listItemView" ~enc:(fun _ -> "app.bsky.graph.defs#listItemView") 2637 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2638 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2639 |> Jsont.Object.finish 2640 2641 + type list_purpose = string 2642 + let list_purpose_jsont = Jsont.string 2643 + 2644 + type list_viewer_state = { 2645 + blocked : string option; 2646 + muted : bool option; 2647 } 2648 2649 + let list_viewer_state_jsont = 2650 + Jsont.Object.map ~kind:"List_viewer_state" 2651 + (fun _typ blocked muted -> { blocked; muted }) 2652 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewerState" ~enc:(fun _ -> "app.bsky.graph.defs#listViewerState") 2653 + |> Jsont.Object.opt_mem "blocked" Jsont.string ~enc:(fun r -> r.blocked) 2654 + |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 2655 |> Jsont.Object.finish 2656 2657 + type modlist = string 2658 + let modlist_jsont = Jsont.string 2659 2660 type not_found_actor = { 2661 actor : string; ··· 2670 |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 2671 |> Jsont.Object.finish 2672 2673 + type referencelist = string 2674 + let referencelist_jsont = Jsont.string 2675 2676 + type relationship = { 2677 + blocked_by : string option; 2678 + blocked_by_list : string option; 2679 + blocking : string option; 2680 + blocking_by_list : string option; 2681 + did : string; 2682 + followed_by : string option; 2683 + following : string option; 2684 } 2685 2686 + let relationship_jsont = 2687 + Jsont.Object.map ~kind:"Relationship" 2688 + (fun _typ blocked_by blocked_by_list blocking blocking_by_list did followed_by following -> { blocked_by; blocked_by_list; blocking; blocking_by_list; did; followed_by; following }) 2689 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#relationship" ~enc:(fun _ -> "app.bsky.graph.defs#relationship") 2690 + |> Jsont.Object.opt_mem "blockedBy" Jsont.string ~enc:(fun r -> r.blocked_by) 2691 + |> Jsont.Object.opt_mem "blockedByList" Jsont.string ~enc:(fun r -> r.blocked_by_list) 2692 + |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 2693 + |> Jsont.Object.opt_mem "blockingByList" Jsont.string ~enc:(fun r -> r.blocking_by_list) 2694 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2695 + |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 2696 + |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 2697 |> Jsont.Object.finish 2698 2699 + type starter_pack_view_basic = { 2700 + cid : string; 2701 + creator : Jsont.json; 2702 + indexed_at : string; 2703 + joined_all_time_count : int option; 2704 + joined_week_count : int option; 2705 + labels : Com.Atproto.Label.Defs.label list option; 2706 + list_item_count : int option; 2707 + record : Jsont.json; 2708 uri : string; 2709 } 2710 2711 + let starter_pack_view_basic_jsont = 2712 + Jsont.Object.map ~kind:"Starter_pack_view_basic" 2713 + (fun _typ cid creator indexed_at joined_all_time_count joined_week_count labels list_item_count record uri -> { cid; creator; indexed_at; joined_all_time_count; joined_week_count; labels; list_item_count; record; uri }) 2714 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackViewBasic") 2715 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2716 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2717 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2718 + |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 2719 + |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 2720 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2721 + |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2722 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2723 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2724 |> Jsont.Object.finish 2725 2726 + type list_view = { 2727 avatar : string option; 2728 cid : string; 2729 + creator : Jsont.json; 2730 + description : string option; 2731 + description_facets : Richtext.Facet.main list option; 2732 + indexed_at : string; 2733 labels : Com.Atproto.Label.Defs.label list option; 2734 list_item_count : int option; 2735 name : string; ··· 2738 viewer : Jsont.json option; 2739 } 2740 2741 + let list_view_jsont = 2742 + Jsont.Object.map ~kind:"List_view" 2743 + (fun _typ avatar cid creator description description_facets indexed_at labels list_item_count name purpose uri viewer -> { avatar; cid; creator; description; description_facets; indexed_at; labels; list_item_count; name; purpose; uri; viewer }) 2744 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listView" ~enc:(fun _ -> "app.bsky.graph.defs#listView") 2745 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2746 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2747 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2748 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2749 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2750 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2751 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2752 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2753 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) ··· 2756 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2757 |> Jsont.Object.finish 2758 2759 + type list_view_basic = { 2760 avatar : string option; 2761 cid : string; 2762 + indexed_at : string option; 2763 labels : Com.Atproto.Label.Defs.label list option; 2764 list_item_count : int option; 2765 name : string; ··· 2768 viewer : Jsont.json option; 2769 } 2770 2771 + let list_view_basic_jsont = 2772 + Jsont.Object.map ~kind:"List_view_basic" 2773 + (fun _typ avatar cid indexed_at labels list_item_count name purpose uri viewer -> { avatar; cid; indexed_at; labels; list_item_count; name; purpose; uri; viewer }) 2774 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#listViewBasic") 2775 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2776 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2777 + |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2778 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2779 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2780 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) ··· 2815 |> Jsont.Object.finish 2816 2817 end 2818 + module Block = struct 2819 type main = { 2820 created_at : string; 2821 subject : string; 2822 } 2823 2824 let main_jsont = 2825 Jsont.Object.map ~kind:"Main" 2826 + (fun _typ created_at subject -> { created_at; subject }) 2827 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.block" ~enc:(fun _ -> "app.bsky.graph.block") 2828 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2829 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2830 |> Jsont.Object.finish 2831 2832 end 2833 + module SearchStarterPacks = struct 2834 type params = { 2835 cursor : string option; 2836 limit : int option; 2837 + q : string; 2838 } 2839 2840 let params_jsont = 2841 Jsont.Object.map ~kind:"Params" 2842 + (fun cursor limit q -> { 2843 cursor; 2844 limit; 2845 + q; 2846 }) 2847 |> Jsont.Object.opt_mem "cursor" Jsont.string 2848 ~enc:(fun r -> r.cursor) 2849 |> Jsont.Object.opt_mem "limit" Jsont.int 2850 ~enc:(fun r -> r.limit) 2851 + |> Jsont.Object.mem "q" Jsont.string 2852 + ~enc:(fun r -> r.q) 2853 |> Jsont.Object.finish 2854 2855 type output = { 2856 cursor : string option; 2857 + starter_packs : Jsont.json list; 2858 } 2859 2860 let output_jsont = 2861 Jsont.Object.map ~kind:"Output" 2862 + (fun _typ cursor starter_packs -> { cursor; starter_packs }) 2863 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.searchStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.searchStarterPacks#output") 2864 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2865 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 2866 |> Jsont.Object.finish 2867 2868 end 2869 + module List = struct 2870 + type main = { 2871 + avatar : Atp.Blob_ref.t option; 2872 + created_at : string; 2873 + description : string option; 2874 + description_facets : Richtext.Facet.main list option; 2875 + labels : Com.Atproto.Label.Defs.self_labels option; 2876 + name : string; 2877 + purpose : Jsont.json; 2878 } 2879 2880 + let main_jsont = 2881 + Jsont.Object.map ~kind:"Main" 2882 + (fun _typ avatar created_at description description_facets labels name purpose -> { avatar; created_at; description; description_facets; labels; name; purpose }) 2883 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.list" ~enc:(fun _ -> "app.bsky.graph.list") 2884 + |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 2885 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2886 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2887 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2888 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 2889 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2890 + |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 2891 |> Jsont.Object.finish 2892 2893 end ··· 2940 |> Jsont.Object.finish 2941 2942 end 2943 + module GetStarterPacks = struct 2944 type params = { 2945 + uris : string list; 2946 } 2947 2948 let params_jsont = 2949 Jsont.Object.map ~kind:"Params" 2950 + (fun uris -> { 2951 + uris; 2952 }) 2953 + |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 2954 + ~enc:(fun r -> r.uris) 2955 |> Jsont.Object.finish 2956 2957 type output = { 2958 starter_packs : Jsont.json list; 2959 } 2960 2961 let output_jsont = 2962 Jsont.Object.map ~kind:"Output" 2963 + (fun _typ starter_packs -> { starter_packs }) 2964 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPacks#output") 2965 |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 2966 |> Jsont.Object.finish 2967 2968 end 2969 + module GetStarterPack = struct 2970 + type params = { 2971 + starter_pack : string; 2972 + } 2973 + 2974 + let params_jsont = 2975 + Jsont.Object.map ~kind:"Params" 2976 + (fun starter_pack -> { 2977 + starter_pack; 2978 + }) 2979 + |> Jsont.Object.mem "starterPack" Jsont.string 2980 + ~enc:(fun r -> r.starter_pack) 2981 + |> Jsont.Object.finish 2982 + 2983 + type output = { 2984 + starter_pack : Jsont.json; 2985 } 2986 2987 + let output_jsont = 2988 + Jsont.Object.map ~kind:"Output" 2989 + (fun _typ starter_pack -> { starter_pack }) 2990 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPack#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPack#output") 2991 + |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 2992 |> Jsont.Object.finish 2993 2994 end 2995 + module GetRelationships = struct 2996 type params = { 2997 + actor : string; 2998 + others : string list option; 2999 } 3000 3001 let params_jsont = 3002 Jsont.Object.map ~kind:"Params" 3003 + (fun actor others -> { 3004 + actor; 3005 + others; 3006 }) 3007 + |> Jsont.Object.mem "actor" Jsont.string 3008 + ~enc:(fun r -> r.actor) 3009 + |> Jsont.Object.opt_mem "others" (Jsont.list Jsont.string) 3010 + ~enc:(fun r -> r.others) 3011 |> Jsont.Object.finish 3012 3013 type output = { 3014 + actor : string option; 3015 + relationships : Jsont.json list; 3016 } 3017 3018 let output_jsont = 3019 Jsont.Object.map ~kind:"Output" 3020 + (fun _typ actor relationships -> { actor; relationships }) 3021 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getRelationships#output" ~enc:(fun _ -> "app.bsky.graph.getRelationships#output") 3022 + |> Jsont.Object.opt_mem "actor" Jsont.string ~enc:(fun r -> r.actor) 3023 + |> Jsont.Object.mem "relationships" (Jsont.list Jsont.json) ~enc:(fun r -> r.relationships) 3024 |> Jsont.Object.finish 3025 3026 end 3027 + module GetListsWithMembership = struct 3028 + type list_with_membership = { 3029 + list_ : Jsont.json; 3030 + list_item : Jsont.json option; 3031 + } 3032 + 3033 + let list_with_membership_jsont = 3034 + Jsont.Object.map ~kind:"List_with_membership" 3035 + (fun _typ list_ list_item -> { list_; list_item }) 3036 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#listWithMembership" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#listWithMembership") 3037 + |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3038 + |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 3039 + |> Jsont.Object.finish 3040 + 3041 type params = { 3042 + actor : string; 3043 cursor : string option; 3044 limit : int option; 3045 + purposes : string list option; 3046 } 3047 3048 let params_jsont = 3049 Jsont.Object.map ~kind:"Params" 3050 + (fun actor cursor limit purposes -> { 3051 + actor; 3052 cursor; 3053 limit; 3054 + purposes; 3055 }) 3056 + |> Jsont.Object.mem "actor" Jsont.string 3057 + ~enc:(fun r -> r.actor) 3058 |> Jsont.Object.opt_mem "cursor" Jsont.string 3059 ~enc:(fun r -> r.cursor) 3060 |> Jsont.Object.opt_mem "limit" Jsont.int 3061 ~enc:(fun r -> r.limit) 3062 + |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3063 + ~enc:(fun r -> r.purposes) 3064 |> Jsont.Object.finish 3065 3066 type output = { 3067 cursor : string option; 3068 + lists_with_membership : Jsont.json list; 3069 } 3070 3071 let output_jsont = 3072 Jsont.Object.map ~kind:"Output" 3073 + (fun _typ cursor lists_with_membership -> { cursor; lists_with_membership }) 3074 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#output" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#output") 3075 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3076 + |> Jsont.Object.mem "listsWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists_with_membership) 3077 |> Jsont.Object.finish 3078 3079 end 3080 + module GetLists = struct 3081 type params = { 3082 + actor : string; 3083 cursor : string option; 3084 limit : int option; 3085 + purposes : string list option; 3086 } 3087 3088 let params_jsont = 3089 Jsont.Object.map ~kind:"Params" 3090 + (fun actor cursor limit purposes -> { 3091 + actor; 3092 cursor; 3093 limit; 3094 + purposes; 3095 }) 3096 + |> Jsont.Object.mem "actor" Jsont.string 3097 + ~enc:(fun r -> r.actor) 3098 |> Jsont.Object.opt_mem "cursor" Jsont.string 3099 ~enc:(fun r -> r.cursor) 3100 |> Jsont.Object.opt_mem "limit" Jsont.int 3101 ~enc:(fun r -> r.limit) 3102 + |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3103 + ~enc:(fun r -> r.purposes) 3104 |> Jsont.Object.finish 3105 3106 type output = { ··· 3111 let output_jsont = 3112 Jsont.Object.map ~kind:"Output" 3113 (fun _typ cursor lists -> { cursor; lists }) 3114 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getLists#output" ~enc:(fun _ -> "app.bsky.graph.getLists#output") 3115 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3116 |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3117 |> Jsont.Object.finish 3118 3119 end 3120 + module GetListMutes = struct 3121 type params = { 3122 cursor : string option; 3123 limit : int option; 3124 } 3125 3126 let params_jsont = 3127 Jsont.Object.map ~kind:"Params" 3128 + (fun cursor limit -> { 3129 cursor; 3130 limit; 3131 }) 3132 |> Jsont.Object.opt_mem "cursor" Jsont.string 3133 ~enc:(fun r -> r.cursor) 3134 |> Jsont.Object.opt_mem "limit" Jsont.int 3135 ~enc:(fun r -> r.limit) 3136 |> Jsont.Object.finish 3137 3138 type output = { 3139 cursor : string option; 3140 + lists : Jsont.json list; 3141 } 3142 3143 let output_jsont = 3144 Jsont.Object.map ~kind:"Output" 3145 + (fun _typ cursor lists -> { cursor; lists }) 3146 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListMutes#output" ~enc:(fun _ -> "app.bsky.graph.getListMutes#output") 3147 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3148 + |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3149 |> Jsont.Object.finish 3150 3151 end 3152 + module GetListBlocks = struct 3153 type params = { 3154 cursor : string option; 3155 limit : int option; ··· 3175 let output_jsont = 3176 Jsont.Object.map ~kind:"Output" 3177 (fun _typ cursor lists -> { cursor; lists }) 3178 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getListBlocks#output") 3179 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3180 |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3181 |> Jsont.Object.finish 3182 3183 end 3184 + module GetList = struct 3185 type params = { 3186 + cursor : string option; 3187 + limit : int option; 3188 + list_ : string; 3189 } 3190 3191 let params_jsont = 3192 Jsont.Object.map ~kind:"Params" 3193 + (fun cursor limit list_ -> { 3194 + cursor; 3195 + limit; 3196 + list_; 3197 }) 3198 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3199 + ~enc:(fun r -> r.cursor) 3200 + |> Jsont.Object.opt_mem "limit" Jsont.int 3201 + ~enc:(fun r -> r.limit) 3202 + |> Jsont.Object.mem "list" Jsont.string 3203 + ~enc:(fun r -> r.list_) 3204 |> Jsont.Object.finish 3205 3206 type output = { 3207 + cursor : string option; 3208 + items : Jsont.json list; 3209 + list_ : Jsont.json; 3210 } 3211 3212 let output_jsont = 3213 Jsont.Object.map ~kind:"Output" 3214 + (fun _typ cursor items list_ -> { cursor; items; list_ }) 3215 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getList#output" ~enc:(fun _ -> "app.bsky.graph.getList#output") 3216 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3217 + |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 3218 + |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3219 |> Jsont.Object.finish 3220 3221 end 3222 + module GetActorStarterPacks = struct 3223 type params = { 3224 actor : string; 3225 cursor : string option; 3226 limit : int option; 3227 } 3228 3229 let params_jsont = 3230 Jsont.Object.map ~kind:"Params" 3231 + (fun actor cursor limit -> { 3232 actor; 3233 cursor; 3234 limit; 3235 }) 3236 |> Jsont.Object.mem "actor" Jsont.string 3237 ~enc:(fun r -> r.actor) ··· 3239 ~enc:(fun r -> r.cursor) 3240 |> Jsont.Object.opt_mem "limit" Jsont.int 3241 ~enc:(fun r -> r.limit) 3242 |> Jsont.Object.finish 3243 3244 type output = { 3245 cursor : string option; 3246 + starter_packs : Jsont.json list; 3247 } 3248 3249 let output_jsont = 3250 Jsont.Object.map ~kind:"Output" 3251 + (fun _typ cursor starter_packs -> { cursor; starter_packs }) 3252 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getActorStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getActorStarterPacks#output") 3253 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3254 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3255 |> Jsont.Object.finish 3256 3257 end 3258 end 3259 module Feed = struct 3260 + module Threadgate = struct 3261 + type follower_rule = unit 3262 + 3263 + let follower_rule_jsont = Jsont.ignore 3264 + 3265 + type following_rule = unit 3266 + 3267 + let following_rule_jsont = Jsont.ignore 3268 + 3269 + type list_rule = { 3270 + list_ : string; 3271 + } 3272 + 3273 + let list_rule_jsont = 3274 + Jsont.Object.map ~kind:"List_rule" 3275 + (fun _typ list_ -> { list_ }) 3276 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate#listRule" ~enc:(fun _ -> "app.bsky.feed.threadgate#listRule") 3277 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3278 + |> Jsont.Object.finish 3279 + 3280 + type mention_rule = unit 3281 + 3282 + let mention_rule_jsont = Jsont.ignore 3283 + 3284 + type main = { 3285 + allow : Jsont.json list option; 3286 + created_at : string; 3287 + hidden_replies : string list option; 3288 + post : string; 3289 + } 3290 + 3291 + let main_jsont = 3292 + Jsont.Object.map ~kind:"Main" 3293 + (fun _typ allow created_at hidden_replies post -> { allow; created_at; hidden_replies; post }) 3294 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate" ~enc:(fun _ -> "app.bsky.feed.threadgate") 3295 + |> Jsont.Object.opt_mem "allow" (Jsont.list Jsont.json) ~enc:(fun r -> r.allow) 3296 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3297 + |> Jsont.Object.opt_mem "hiddenReplies" (Jsont.list Jsont.string) ~enc:(fun r -> r.hidden_replies) 3298 + |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3299 + |> Jsont.Object.finish 3300 + 3301 + end 3302 + module Repost = struct 3303 + type main = { 3304 + created_at : string; 3305 + subject : Com.Atproto.Repo.StrongRef.main; 3306 + via : Com.Atproto.Repo.StrongRef.main option; 3307 } 3308 3309 + let main_jsont = 3310 + Jsont.Object.map ~kind:"Main" 3311 + (fun _typ created_at subject via -> { created_at; subject; via }) 3312 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.repost" ~enc:(fun _ -> "app.bsky.feed.repost") 3313 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3314 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 3315 + |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3316 + |> Jsont.Object.finish 3317 + 3318 + end 3319 + module Postgate = struct 3320 + type disable_rule = unit 3321 + 3322 + let disable_rule_jsont = Jsont.ignore 3323 + 3324 + type main = { 3325 + created_at : string; 3326 + detached_embedding_uris : string list option; 3327 + embedding_rules : Jsont.json list option; 3328 + post : string; 3329 + } 3330 + 3331 + let main_jsont = 3332 + Jsont.Object.map ~kind:"Main" 3333 + (fun _typ created_at detached_embedding_uris embedding_rules post -> { created_at; detached_embedding_uris; embedding_rules; post }) 3334 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.postgate" ~enc:(fun _ -> "app.bsky.feed.postgate") 3335 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3336 + |> Jsont.Object.opt_mem "detachedEmbeddingUris" (Jsont.list Jsont.string) ~enc:(fun r -> r.detached_embedding_uris) 3337 + |> Jsont.Object.opt_mem "embeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.embedding_rules) 3338 + |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3339 |> Jsont.Object.finish 3340 3341 + end 3342 + module Post = struct 3343 type reply_ref = { 3344 parent : Com.Atproto.Repo.StrongRef.main; 3345 root : Com.Atproto.Repo.StrongRef.main; ··· 3353 |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3354 |> Jsont.Object.finish 3355 3356 + type text_slice = { 3357 + end_ : int; 3358 + start : int; 3359 + } 3360 + 3361 + let text_slice_jsont = 3362 + Jsont.Object.map ~kind:"Text_slice" 3363 + (fun _typ end_ start -> { end_; start }) 3364 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#textSlice" ~enc:(fun _ -> "app.bsky.feed.post#textSlice") 3365 + |> Jsont.Object.mem "end" Jsont.int ~enc:(fun r -> r.end_) 3366 + |> Jsont.Object.mem "start" Jsont.int ~enc:(fun r -> r.start) 3367 + |> Jsont.Object.finish 3368 + 3369 type entity = { 3370 index : Jsont.json; 3371 type_ : string; ··· 3409 |> Jsont.Object.finish 3410 3411 end 3412 + module Like = struct 3413 + type main = { 3414 created_at : string; 3415 + subject : Com.Atproto.Repo.StrongRef.main; 3416 + via : Com.Atproto.Repo.StrongRef.main option; 3417 } 3418 3419 + let main_jsont = 3420 + Jsont.Object.map ~kind:"Main" 3421 + (fun _typ created_at subject via -> { created_at; subject; via }) 3422 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.like" ~enc:(fun _ -> "app.bsky.feed.like") 3423 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3424 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 3425 + |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3426 |> Jsont.Object.finish 3427 3428 + end 3429 + module GetRepostedBy = struct 3430 type params = { 3431 cid : string option; 3432 cursor : string option; ··· 3455 type output = { 3456 cid : string option; 3457 cursor : string option; 3458 + reposted_by : Jsont.json list; 3459 uri : string; 3460 } 3461 3462 let output_jsont = 3463 Jsont.Object.map ~kind:"Output" 3464 + (fun _typ cid cursor reposted_by uri -> { cid; cursor; reposted_by; uri }) 3465 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getRepostedBy#output" ~enc:(fun _ -> "app.bsky.feed.getRepostedBy#output") 3466 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3467 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3468 + |> Jsont.Object.mem "repostedBy" (Jsont.list Jsont.json) ~enc:(fun r -> r.reposted_by) 3469 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3470 |> Jsont.Object.finish 3471 3472 end 3473 + module GetLikes = struct 3474 + type like = { 3475 + actor : Jsont.json; 3476 created_at : string; 3477 + indexed_at : string; 3478 } 3479 3480 + let like_jsont = 3481 + Jsont.Object.map ~kind:"Like" 3482 + (fun _typ actor created_at indexed_at -> { actor; created_at; indexed_at }) 3483 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getLikes#like" ~enc:(fun _ -> "app.bsky.feed.getLikes#like") 3484 + |> Jsont.Object.mem "actor" Jsont.json ~enc:(fun r -> r.actor) 3485 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3486 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3487 |> Jsont.Object.finish 3488 3489 type params = { 3490 cid : string option; 3491 cursor : string option; ··· 3514 type output = { 3515 cid : string option; 3516 cursor : string option; 3517 + likes : Jsont.json list; 3518 uri : string; 3519 } 3520 3521 let output_jsont = 3522 Jsont.Object.map ~kind:"Output" 3523 + (fun _typ cid cursor likes uri -> { cid; cursor; likes; uri }) 3524 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getLikes#output" ~enc:(fun _ -> "app.bsky.feed.getLikes#output") 3525 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3526 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3527 + |> Jsont.Object.mem "likes" (Jsont.list Jsont.json) ~enc:(fun r -> r.likes) 3528 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3529 |> Jsont.Object.finish 3530 3531 end 3532 + module Generator = struct 3533 + type main = { 3534 + accepts_interactions : bool option; 3535 + avatar : Atp.Blob_ref.t option; 3536 + content_mode : string option; 3537 + created_at : string; 3538 + description : string option; 3539 + description_facets : Richtext.Facet.main list option; 3540 + did : string; 3541 + display_name : string; 3542 + labels : Com.Atproto.Label.Defs.self_labels option; 3543 } 3544 3545 + let main_jsont = 3546 + Jsont.Object.map ~kind:"Main" 3547 + (fun _typ accepts_interactions avatar content_mode created_at description description_facets did display_name labels -> { accepts_interactions; avatar; content_mode; created_at; description; description_facets; did; display_name; labels }) 3548 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.generator" ~enc:(fun _ -> "app.bsky.feed.generator") 3549 + |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 3550 + |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 3551 + |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 3552 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3553 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 3554 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 3555 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 3556 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 3557 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3558 |> Jsont.Object.finish 3559 3560 + end 3561 + module DescribeFeedGenerator = struct 3562 type feed = { 3563 uri : string; 3564 } ··· 3570 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3571 |> Jsont.Object.finish 3572 3573 + type links = { 3574 + privacy_policy : string option; 3575 + terms_of_service : string option; 3576 + } 3577 + 3578 + let links_jsont = 3579 + Jsont.Object.map ~kind:"Links" 3580 + (fun _typ privacy_policy terms_of_service -> { privacy_policy; terms_of_service }) 3581 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#links" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#links") 3582 + |> Jsont.Object.opt_mem "privacyPolicy" Jsont.string ~enc:(fun r -> r.privacy_policy) 3583 + |> Jsont.Object.opt_mem "termsOfService" Jsont.string ~enc:(fun r -> r.terms_of_service) 3584 + |> Jsont.Object.finish 3585 + 3586 type output = { 3587 did : string; 3588 feeds : Jsont.json list; ··· 3599 |> Jsont.Object.finish 3600 3601 end 3602 + module Defs = struct 3603 + type blocked_author = { 3604 + did : string; 3605 + viewer : Jsont.json option; 3606 } 3607 3608 + let blocked_author_jsont = 3609 + Jsont.Object.map ~kind:"Blocked_author" 3610 + (fun _typ did viewer -> { did; viewer }) 3611 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedAuthor" ~enc:(fun _ -> "app.bsky.feed.defs#blockedAuthor") 3612 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 3613 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3614 |> Jsont.Object.finish 3615 3616 + type clickthrough_author = string 3617 + let clickthrough_author_jsont = Jsont.string 3618 3619 + type clickthrough_embed = string 3620 + let clickthrough_embed_jsont = Jsont.string 3621 3622 + type clickthrough_item = string 3623 + let clickthrough_item_jsont = Jsont.string 3624 3625 + type clickthrough_reposter = string 3626 + let clickthrough_reposter_jsont = Jsont.string 3627 3628 + type content_mode_unspecified = string 3629 + let content_mode_unspecified_jsont = Jsont.string 3630 3631 + type content_mode_video = string 3632 + let content_mode_video_jsont = Jsont.string 3633 3634 + type generator_viewer_state = { 3635 like : string option; 3636 } 3637 3638 + let generator_viewer_state_jsont = 3639 + Jsont.Object.map ~kind:"Generator_viewer_state" 3640 + (fun _typ like -> { like }) 3641 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#generatorViewerState" ~enc:(fun _ -> "app.bsky.feed.defs#generatorViewerState") 3642 |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3643 |> Jsont.Object.finish 3644 3645 + type interaction = { 3646 + event : string option; 3647 + feed_context : string option; 3648 + item : string option; 3649 + req_id : string option; 3650 } 3651 3652 + let interaction_jsont = 3653 + Jsont.Object.map ~kind:"Interaction" 3654 + (fun _typ event feed_context item req_id -> { event; feed_context; item; req_id }) 3655 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#interaction" ~enc:(fun _ -> "app.bsky.feed.defs#interaction") 3656 + |> Jsont.Object.opt_mem "event" Jsont.string ~enc:(fun r -> r.event) 3657 + |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 3658 + |> Jsont.Object.opt_mem "item" Jsont.string ~enc:(fun r -> r.item) 3659 + |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 3660 |> Jsont.Object.finish 3661 3662 + type interaction_like = string 3663 + let interaction_like_jsont = Jsont.string 3664 3665 + type interaction_quote = string 3666 + let interaction_quote_jsont = Jsont.string 3667 3668 + type interaction_reply = string 3669 + let interaction_reply_jsont = Jsont.string 3670 3671 + type interaction_repost = string 3672 + let interaction_repost_jsont = Jsont.string 3673 3674 + type interaction_seen = string 3675 + let interaction_seen_jsont = Jsont.string 3676 3677 + type interaction_share = string 3678 + let interaction_share_jsont = Jsont.string 3679 3680 + type not_found_post = { 3681 + not_found : bool; 3682 + uri : string; 3683 } 3684 3685 + let not_found_post_jsont = 3686 + Jsont.Object.map ~kind:"Not_found_post" 3687 + (fun _typ not_found uri -> { not_found; uri }) 3688 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#notFoundPost" ~enc:(fun _ -> "app.bsky.feed.defs#notFoundPost") 3689 + |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 3690 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3691 |> Jsont.Object.finish 3692 3693 + type reason_pin = unit 3694 3695 + let reason_pin_jsont = Jsont.ignore 3696 3697 type reason_repost = { 3698 by : Jsont.json; ··· 3711 |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3712 |> Jsont.Object.finish 3713 3714 + type reply_ref = { 3715 + grandparent_author : Jsont.json option; 3716 + parent : Jsont.json; 3717 + root : Jsont.json; 3718 } 3719 3720 + let reply_ref_jsont = 3721 + Jsont.Object.map ~kind:"Reply_ref" 3722 + (fun _typ grandparent_author parent root -> { grandparent_author; parent; root }) 3723 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#replyRef" ~enc:(fun _ -> "app.bsky.feed.defs#replyRef") 3724 + |> Jsont.Object.opt_mem "grandparentAuthor" Jsont.json ~enc:(fun r -> r.grandparent_author) 3725 + |> Jsont.Object.mem "parent" Jsont.json ~enc:(fun r -> r.parent) 3726 + |> Jsont.Object.mem "root" Jsont.json ~enc:(fun r -> r.root) 3727 |> Jsont.Object.finish 3728 3729 + type request_less = string 3730 + let request_less_jsont = Jsont.string 3731 3732 + type request_more = string 3733 + let request_more_jsont = Jsont.string 3734 3735 + type skeleton_feed_post = { 3736 + feed_context : string option; 3737 + post : string; 3738 + reason : Jsont.json option; 3739 + } 3740 3741 + let skeleton_feed_post_jsont = 3742 + Jsont.Object.map ~kind:"Skeleton_feed_post" 3743 + (fun _typ feed_context post reason -> { feed_context; post; reason }) 3744 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonFeedPost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonFeedPost") 3745 + |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 3746 + |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3747 + |> Jsont.Object.opt_mem "reason" Jsont.json ~enc:(fun r -> r.reason) 3748 + |> Jsont.Object.finish 3749 3750 + type skeleton_reason_pin = unit 3751 3752 + let skeleton_reason_pin_jsont = Jsont.ignore 3753 3754 + type skeleton_reason_repost = { 3755 + repost : string; 3756 } 3757 3758 + let skeleton_reason_repost_jsont = 3759 + Jsont.Object.map ~kind:"Skeleton_reason_repost" 3760 + (fun _typ repost -> { repost }) 3761 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonReasonRepost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonReasonRepost") 3762 + |> Jsont.Object.mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3763 |> Jsont.Object.finish 3764 3765 + type thread_context = { 3766 + root_author_like : string option; 3767 } 3768 3769 + let thread_context_jsont = 3770 + Jsont.Object.map ~kind:"Thread_context" 3771 + (fun _typ root_author_like -> { root_author_like }) 3772 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadContext" ~enc:(fun _ -> "app.bsky.feed.defs#threadContext") 3773 + |> Jsont.Object.opt_mem "rootAuthorLike" Jsont.string ~enc:(fun r -> r.root_author_like) 3774 |> Jsont.Object.finish 3775 3776 + type threadgate_view = { 3777 + cid : string option; 3778 + lists : Jsont.json list option; 3779 + record : Jsont.json option; 3780 + uri : string option; 3781 + } 3782 3783 + let threadgate_view_jsont = 3784 + Jsont.Object.map ~kind:"Threadgate_view" 3785 + (fun _typ cid lists record uri -> { cid; lists; record; uri }) 3786 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadgateView" ~enc:(fun _ -> "app.bsky.feed.defs#threadgateView") 3787 + |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3788 + |> Jsont.Object.opt_mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3789 + |> Jsont.Object.opt_mem "record" Jsont.json ~enc:(fun r -> r.record) 3790 + |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3791 + |> Jsont.Object.finish 3792 3793 + type viewer_state = { 3794 + bookmarked : bool option; 3795 + embedding_disabled : bool option; 3796 + like : string option; 3797 + pinned : bool option; 3798 + reply_disabled : bool option; 3799 + repost : string option; 3800 + thread_muted : bool option; 3801 } 3802 3803 + let viewer_state_jsont = 3804 + Jsont.Object.map ~kind:"Viewer_state" 3805 + (fun _typ bookmarked embedding_disabled like pinned reply_disabled repost thread_muted -> { bookmarked; embedding_disabled; like; pinned; reply_disabled; repost; thread_muted }) 3806 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#viewerState" ~enc:(fun _ -> "app.bsky.feed.defs#viewerState") 3807 + |> Jsont.Object.opt_mem "bookmarked" Jsont.bool ~enc:(fun r -> r.bookmarked) 3808 + |> Jsont.Object.opt_mem "embeddingDisabled" Jsont.bool ~enc:(fun r -> r.embedding_disabled) 3809 + |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3810 + |> Jsont.Object.opt_mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 3811 + |> Jsont.Object.opt_mem "replyDisabled" Jsont.bool ~enc:(fun r -> r.reply_disabled) 3812 + |> Jsont.Object.opt_mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3813 + |> Jsont.Object.opt_mem "threadMuted" Jsont.bool ~enc:(fun r -> r.thread_muted) 3814 |> Jsont.Object.finish 3815 3816 + type blocked_post = { 3817 author : Jsont.json; 3818 + blocked : bool; 3819 uri : string; 3820 } 3821 3822 + let blocked_post_jsont = 3823 + Jsont.Object.map ~kind:"Blocked_post" 3824 + (fun _typ author blocked uri -> { author; blocked; uri }) 3825 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedPost" ~enc:(fun _ -> "app.bsky.feed.defs#blockedPost") 3826 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 3827 + |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 3828 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3829 |> Jsont.Object.finish 3830 3831 type generator_view = { ··· 3865 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3866 |> Jsont.Object.finish 3867 3868 + type post_view = { 3869 author : Jsont.json; 3870 + bookmark_count : int option; 3871 + cid : string; 3872 + debug : Jsont.json option; 3873 + embed : Jsont.json option; 3874 + indexed_at : string; 3875 + labels : Com.Atproto.Label.Defs.label list option; 3876 + like_count : int option; 3877 + quote_count : int option; 3878 + record : Jsont.json; 3879 + reply_count : int option; 3880 + repost_count : int option; 3881 + threadgate : Jsont.json option; 3882 uri : string; 3883 + viewer : Jsont.json option; 3884 } 3885 3886 + let post_view_jsont = 3887 + Jsont.Object.map ~kind:"Post_view" 3888 + (fun _typ author bookmark_count cid debug embed indexed_at labels like_count quote_count record reply_count repost_count threadgate uri viewer -> { author; bookmark_count; cid; debug; embed; indexed_at; labels; like_count; quote_count; record; reply_count; repost_count; threadgate; uri; viewer }) 3889 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#postView" ~enc:(fun _ -> "app.bsky.feed.defs#postView") 3890 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 3891 + |> Jsont.Object.opt_mem "bookmarkCount" Jsont.int ~enc:(fun r -> r.bookmark_count) 3892 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3893 + |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 3894 + |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 3895 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3896 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 3897 + |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 3898 + |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 3899 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 3900 + |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 3901 + |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 3902 + |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 3903 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3904 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3905 |> Jsont.Object.finish 3906 3907 type feed_view_post = { ··· 3923 |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 3924 |> Jsont.Object.finish 3925 3926 + type thread_view_post = { 3927 + parent : Jsont.json option; 3928 + post : Jsont.json; 3929 + replies : Jsont.json list option; 3930 + thread_context : Jsont.json option; 3931 } 3932 3933 + let thread_view_post_jsont = 3934 + Jsont.Object.map ~kind:"Thread_view_post" 3935 + (fun _typ parent post replies thread_context -> { parent; post; replies; thread_context }) 3936 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadViewPost" ~enc:(fun _ -> "app.bsky.feed.defs#threadViewPost") 3937 + |> Jsont.Object.opt_mem "parent" Jsont.json ~enc:(fun r -> r.parent) 3938 + |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 3939 + |> Jsont.Object.opt_mem "replies" (Jsont.list Jsont.json) ~enc:(fun r -> r.replies) 3940 + |> Jsont.Object.opt_mem "threadContext" Jsont.json ~enc:(fun r -> r.thread_context) 3941 |> Jsont.Object.finish 3942 3943 end 3944 + module SendInteractions = struct 3945 + type input = { 3946 + interactions : Jsont.json list; 3947 } 3948 3949 + let input_jsont = 3950 + Jsont.Object.map ~kind:"Input" 3951 + (fun _typ interactions -> { interactions }) 3952 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.sendInteractions#input" ~enc:(fun _ -> "app.bsky.feed.sendInteractions#input") 3953 + |> Jsont.Object.mem "interactions" (Jsont.list Jsont.json) ~enc:(fun r -> r.interactions) 3954 |> Jsont.Object.finish 3955 3956 + type output = unit 3957 + 3958 + let output_jsont = Jsont.ignore 3959 + 3960 end 3961 + module SearchPosts = struct 3962 type params = { 3963 + author : string option; 3964 + cursor : string option; 3965 + domain : string option; 3966 + lang : string option; 3967 + limit : int option; 3968 + mentions : string option; 3969 + q : string; 3970 + since : string option; 3971 + sort : string option; 3972 + tag : string list option; 3973 + until : string option; 3974 + url : string option; 3975 } 3976 3977 let params_jsont = 3978 Jsont.Object.map ~kind:"Params" 3979 + (fun author cursor domain lang limit mentions q since sort tag until url -> { 3980 + author; 3981 + cursor; 3982 + domain; 3983 + lang; 3984 + limit; 3985 + mentions; 3986 + q; 3987 + since; 3988 + sort; 3989 + tag; 3990 + until; 3991 + url; 3992 }) 3993 + |> Jsont.Object.opt_mem "author" Jsont.string 3994 + ~enc:(fun r -> r.author) 3995 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3996 + ~enc:(fun r -> r.cursor) 3997 + |> Jsont.Object.opt_mem "domain" Jsont.string 3998 + ~enc:(fun r -> r.domain) 3999 + |> Jsont.Object.opt_mem "lang" Jsont.string 4000 + ~enc:(fun r -> r.lang) 4001 + |> Jsont.Object.opt_mem "limit" Jsont.int 4002 + ~enc:(fun r -> r.limit) 4003 + |> Jsont.Object.opt_mem "mentions" Jsont.string 4004 + ~enc:(fun r -> r.mentions) 4005 + |> Jsont.Object.mem "q" Jsont.string 4006 + ~enc:(fun r -> r.q) 4007 + |> Jsont.Object.opt_mem "since" Jsont.string 4008 + ~enc:(fun r -> r.since) 4009 + |> Jsont.Object.opt_mem "sort" Jsont.string 4010 + ~enc:(fun r -> r.sort) 4011 + |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 4012 + ~enc:(fun r -> r.tag) 4013 + |> Jsont.Object.opt_mem "until" Jsont.string 4014 + ~enc:(fun r -> r.until) 4015 + |> Jsont.Object.opt_mem "url" Jsont.string 4016 + ~enc:(fun r -> r.url) 4017 |> Jsont.Object.finish 4018 4019 type output = { 4020 + cursor : string option; 4021 + hits_total : int option; 4022 + posts : Jsont.json list; 4023 } 4024 4025 let output_jsont = 4026 Jsont.Object.map ~kind:"Output" 4027 + (fun _typ cursor hits_total posts -> { cursor; hits_total; posts }) 4028 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.searchPosts#output" ~enc:(fun _ -> "app.bsky.feed.searchPosts#output") 4029 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4030 + |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 4031 + |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 4032 |> Jsont.Object.finish 4033 4034 end 4035 + module GetTimeline = struct 4036 type params = { 4037 + algorithm : string option; 4038 cursor : string option; 4039 limit : int option; 4040 } 4041 4042 let params_jsont = 4043 Jsont.Object.map ~kind:"Params" 4044 + (fun algorithm cursor limit -> { 4045 + algorithm; 4046 cursor; 4047 limit; 4048 }) 4049 + |> Jsont.Object.opt_mem "algorithm" Jsont.string 4050 + ~enc:(fun r -> r.algorithm) 4051 |> Jsont.Object.opt_mem "cursor" Jsont.string 4052 ~enc:(fun r -> r.cursor) 4053 |> Jsont.Object.opt_mem "limit" Jsont.int 4054 ~enc:(fun r -> r.limit) 4055 |> Jsont.Object.finish ··· 4062 let output_jsont = 4063 Jsont.Object.map ~kind:"Output" 4064 (fun _typ cursor feed -> { cursor; feed }) 4065 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getTimeline#output" ~enc:(fun _ -> "app.bsky.feed.getTimeline#output") 4066 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4067 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4068 |> Jsont.Object.finish 4069 4070 end 4071 + module GetSuggestedFeeds = struct 4072 + type params = { 4073 + cursor : string option; 4074 + limit : int option; 4075 + } 4076 + 4077 + let params_jsont = 4078 + Jsont.Object.map ~kind:"Params" 4079 + (fun cursor limit -> { 4080 + cursor; 4081 + limit; 4082 + }) 4083 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4084 + ~enc:(fun r -> r.cursor) 4085 + |> Jsont.Object.opt_mem "limit" Jsont.int 4086 + ~enc:(fun r -> r.limit) 4087 + |> Jsont.Object.finish 4088 + 4089 + type output = { 4090 + cursor : string option; 4091 + feeds : Jsont.json list; 4092 + } 4093 + 4094 + let output_jsont = 4095 + Jsont.Object.map ~kind:"Output" 4096 + (fun _typ cursor feeds -> { cursor; feeds }) 4097 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getSuggestedFeeds#output" ~enc:(fun _ -> "app.bsky.feed.getSuggestedFeeds#output") 4098 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4099 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4100 + |> Jsont.Object.finish 4101 + 4102 + end 4103 module GetQuotes = struct 4104 type params = { 4105 cid : string option; ··· 4144 |> Jsont.Object.finish 4145 4146 end 4147 + module GetPosts = struct 4148 type params = { 4149 + uris : string list; 4150 } 4151 4152 let params_jsont = 4153 Jsont.Object.map ~kind:"Params" 4154 + (fun uris -> { 4155 + uris; 4156 }) 4157 + |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 4158 + ~enc:(fun r -> r.uris) 4159 |> Jsont.Object.finish 4160 4161 type output = { 4162 + posts : Jsont.json list; 4163 } 4164 4165 let output_jsont = 4166 Jsont.Object.map ~kind:"Output" 4167 + (fun _typ posts -> { posts }) 4168 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPosts#output" ~enc:(fun _ -> "app.bsky.feed.getPosts#output") 4169 + |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 4170 |> Jsont.Object.finish 4171 4172 end 4173 + module GetPostThread = struct 4174 type params = { 4175 + depth : int option; 4176 + parent_height : int option; 4177 + uri : string; 4178 + } 4179 + 4180 + let params_jsont = 4181 + Jsont.Object.map ~kind:"Params" 4182 + (fun depth parent_height uri -> { 4183 + depth; 4184 + parent_height; 4185 + uri; 4186 + }) 4187 + |> Jsont.Object.opt_mem "depth" Jsont.int 4188 + ~enc:(fun r -> r.depth) 4189 + |> Jsont.Object.opt_mem "parentHeight" Jsont.int 4190 + ~enc:(fun r -> r.parent_height) 4191 + |> Jsont.Object.mem "uri" Jsont.string 4192 + ~enc:(fun r -> r.uri) 4193 + |> Jsont.Object.finish 4194 + 4195 + type output = { 4196 + thread : Jsont.json; 4197 + threadgate : Jsont.json option; 4198 + } 4199 + 4200 + let output_jsont = 4201 + Jsont.Object.map ~kind:"Output" 4202 + (fun _typ thread threadgate -> { thread; threadgate }) 4203 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPostThread#output" ~enc:(fun _ -> "app.bsky.feed.getPostThread#output") 4204 + |> Jsont.Object.mem "thread" Jsont.json ~enc:(fun r -> r.thread) 4205 + |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 4206 + |> Jsont.Object.finish 4207 + 4208 + end 4209 + module GetListFeed = struct 4210 + type params = { 4211 cursor : string option; 4212 limit : int option; 4213 + list_ : string; 4214 } 4215 4216 let params_jsont = 4217 Jsont.Object.map ~kind:"Params" 4218 + (fun cursor limit list_ -> { 4219 cursor; 4220 limit; 4221 + list_; 4222 }) 4223 |> Jsont.Object.opt_mem "cursor" Jsont.string 4224 ~enc:(fun r -> r.cursor) 4225 |> Jsont.Object.opt_mem "limit" Jsont.int 4226 ~enc:(fun r -> r.limit) 4227 + |> Jsont.Object.mem "list" Jsont.string 4228 + ~enc:(fun r -> r.list_) 4229 |> Jsont.Object.finish 4230 4231 type output = { ··· 4236 let output_jsont = 4237 Jsont.Object.map ~kind:"Output" 4238 (fun _typ cursor feed -> { cursor; feed }) 4239 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getListFeed#output" ~enc:(fun _ -> "app.bsky.feed.getListFeed#output") 4240 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4241 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4242 |> Jsont.Object.finish ··· 4280 |> Jsont.Object.finish 4281 4282 end 4283 + module GetFeedGenerators = struct 4284 type params = { 4285 + feeds : string list; 4286 } 4287 4288 let params_jsont = 4289 Jsont.Object.map ~kind:"Params" 4290 + (fun feeds -> { 4291 + feeds; 4292 }) 4293 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.string) 4294 + ~enc:(fun r -> r.feeds) 4295 |> Jsont.Object.finish 4296 4297 type output = { 4298 + feeds : Jsont.json list; 4299 } 4300 4301 let output_jsont = 4302 Jsont.Object.map ~kind:"Output" 4303 + (fun _typ feeds -> { feeds }) 4304 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedGenerators#output" ~enc:(fun _ -> "app.bsky.feed.getFeedGenerators#output") 4305 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4306 |> Jsont.Object.finish 4307 4308 end 4309 + module GetFeedGenerator = struct 4310 type params = { 4311 + feed : string; 4312 } 4313 4314 let params_jsont = 4315 Jsont.Object.map ~kind:"Params" 4316 + (fun feed -> { 4317 + feed; 4318 }) 4319 + |> Jsont.Object.mem "feed" Jsont.string 4320 + ~enc:(fun r -> r.feed) 4321 |> Jsont.Object.finish 4322 4323 type output = { 4324 + is_online : bool; 4325 + is_valid : bool; 4326 + view : Jsont.json; 4327 } 4328 4329 let output_jsont = 4330 Jsont.Object.map ~kind:"Output" 4331 + (fun _typ is_online is_valid view -> { is_online; is_valid; view }) 4332 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedGenerator#output" ~enc:(fun _ -> "app.bsky.feed.getFeedGenerator#output") 4333 + |> Jsont.Object.mem "isOnline" Jsont.bool ~enc:(fun r -> r.is_online) 4334 + |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 4335 + |> Jsont.Object.mem "view" Jsont.json ~enc:(fun r -> r.view) 4336 |> Jsont.Object.finish 4337 4338 end 4339 + module GetFeed = struct 4340 + type params = { 4341 + cursor : string option; 4342 + feed : string; 4343 + limit : int option; 4344 } 4345 4346 + let params_jsont = 4347 + Jsont.Object.map ~kind:"Params" 4348 + (fun cursor feed limit -> { 4349 + cursor; 4350 + feed; 4351 + limit; 4352 + }) 4353 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4354 + ~enc:(fun r -> r.cursor) 4355 + |> Jsont.Object.mem "feed" Jsont.string 4356 + ~enc:(fun r -> r.feed) 4357 + |> Jsont.Object.opt_mem "limit" Jsont.int 4358 + ~enc:(fun r -> r.limit) 4359 |> Jsont.Object.finish 4360 4361 + type output = { 4362 + cursor : string option; 4363 + feed : Jsont.json list; 4364 + } 4365 4366 + let output_jsont = 4367 + Jsont.Object.map ~kind:"Output" 4368 + (fun _typ cursor feed -> { cursor; feed }) 4369 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeed#output" ~enc:(fun _ -> "app.bsky.feed.getFeed#output") 4370 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4371 + |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4372 + |> Jsont.Object.finish 4373 4374 end 4375 module GetAuthorFeed = struct ··· 4416 |> Jsont.Object.finish 4417 4418 end 4419 + module GetActorLikes = struct 4420 type params = { 4421 + actor : string; 4422 cursor : string option; 4423 limit : int option; 4424 } 4425 4426 let params_jsont = 4427 Jsont.Object.map ~kind:"Params" 4428 + (fun actor cursor limit -> { 4429 + actor; 4430 cursor; 4431 limit; 4432 }) 4433 + |> Jsont.Object.mem "actor" Jsont.string 4434 + ~enc:(fun r -> r.actor) 4435 |> Jsont.Object.opt_mem "cursor" Jsont.string 4436 ~enc:(fun r -> r.cursor) 4437 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4440 4441 type output = { 4442 cursor : string option; 4443 + feed : Jsont.json list; 4444 } 4445 4446 let output_jsont = 4447 Jsont.Object.map ~kind:"Output" 4448 + (fun _typ cursor feed -> { cursor; feed }) 4449 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getActorLikes#output" ~enc:(fun _ -> "app.bsky.feed.getActorLikes#output") 4450 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4451 + |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4452 |> Jsont.Object.finish 4453 4454 end ··· 4488 |> Jsont.Object.finish 4489 4490 end 4491 + end 4492 + module Contact = struct 4493 + module VerifyPhone = struct 4494 + type input = { 4495 + code : string; 4496 + phone : string; 4497 } 4498 4499 + let input_jsont = 4500 + Jsont.Object.map ~kind:"Input" 4501 + (fun _typ code phone -> { code; phone }) 4502 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#input" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#input") 4503 + |> Jsont.Object.mem "code" Jsont.string ~enc:(fun r -> r.code) 4504 + |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 4505 |> Jsont.Object.finish 4506 4507 type output = { 4508 + token : string; 4509 } 4510 4511 let output_jsont = 4512 Jsont.Object.map ~kind:"Output" 4513 + (fun _typ token -> { token }) 4514 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#output" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#output") 4515 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 4516 + |> Jsont.Object.finish 4517 + 4518 + end 4519 + module StartPhoneVerification = struct 4520 + type input = { 4521 + phone : string; 4522 + } 4523 + 4524 + let input_jsont = 4525 + Jsont.Object.map ~kind:"Input" 4526 + (fun _typ phone -> { phone }) 4527 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.startPhoneVerification#input" ~enc:(fun _ -> "app.bsky.contact.startPhoneVerification#input") 4528 + |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 4529 + |> Jsont.Object.finish 4530 + 4531 + type output = unit 4532 + 4533 + let output_jsont = Jsont.ignore 4534 + 4535 + end 4536 + module SendNotification = struct 4537 + type input = { 4538 + from : string; 4539 + to_ : string; 4540 + } 4541 + 4542 + let input_jsont = 4543 + Jsont.Object.map ~kind:"Input" 4544 + (fun _typ from to_ -> { from; to_ }) 4545 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.sendNotification#input" ~enc:(fun _ -> "app.bsky.contact.sendNotification#input") 4546 + |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 4547 + |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 4548 |> Jsont.Object.finish 4549 4550 + type output = unit 4551 + 4552 + let output_jsont = Jsont.ignore 4553 + 4554 end 4555 + module RemoveData = struct 4556 + type input = unit 4557 + 4558 + let input_jsont = Jsont.ignore 4559 + 4560 + type output = unit 4561 + 4562 + let output_jsont = Jsont.ignore 4563 + 4564 + end 4565 + module GetMatches = struct 4566 type params = { 4567 cursor : string option; 4568 limit : int option; 4569 } 4570 4571 let params_jsont = 4572 Jsont.Object.map ~kind:"Params" 4573 + (fun cursor limit -> { 4574 cursor; 4575 limit; 4576 }) 4577 |> Jsont.Object.opt_mem "cursor" Jsont.string 4578 ~enc:(fun r -> r.cursor) 4579 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4582 4583 type output = { 4584 cursor : string option; 4585 + matches : Jsont.json list; 4586 } 4587 4588 let output_jsont = 4589 Jsont.Object.map ~kind:"Output" 4590 + (fun _typ cursor matches -> { cursor; matches }) 4591 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getMatches#output" ~enc:(fun _ -> "app.bsky.contact.getMatches#output") 4592 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4593 + |> Jsont.Object.mem "matches" (Jsont.list Jsont.json) ~enc:(fun r -> r.matches) 4594 |> Jsont.Object.finish 4595 4596 end 4597 + module DismissMatch = struct 4598 type input = { 4599 + subject : string; 4600 } 4601 4602 let input_jsont = 4603 Jsont.Object.map ~kind:"Input" 4604 + (fun _typ subject -> { subject }) 4605 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.dismissMatch#input" ~enc:(fun _ -> "app.bsky.contact.dismissMatch#input") 4606 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 4607 |> Jsont.Object.finish 4608 4609 + type output = unit 4610 + 4611 + let output_jsont = Jsont.ignore 4612 + 4613 end 4614 + module Defs = struct 4615 + type match_and_contact_index = { 4616 + contact_index : int; 4617 + match_ : Jsont.json; 4618 + } 4619 + 4620 + let match_and_contact_index_jsont = 4621 + Jsont.Object.map ~kind:"Match_and_contact_index" 4622 + (fun _typ contact_index match_ -> { contact_index; match_ }) 4623 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#matchAndContactIndex" ~enc:(fun _ -> "app.bsky.contact.defs#matchAndContactIndex") 4624 + |> Jsont.Object.mem "contactIndex" Jsont.int ~enc:(fun r -> r.contact_index) 4625 + |> Jsont.Object.mem "match" Jsont.json ~enc:(fun r -> r.match_) 4626 + |> Jsont.Object.finish 4627 + 4628 + type notification = { 4629 + from : string; 4630 + to_ : string; 4631 + } 4632 + 4633 + let notification_jsont = 4634 + Jsont.Object.map ~kind:"Notification" 4635 + (fun _typ from to_ -> { from; to_ }) 4636 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#notification" ~enc:(fun _ -> "app.bsky.contact.defs#notification") 4637 + |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 4638 + |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 4639 + |> Jsont.Object.finish 4640 + 4641 + type sync_status = { 4642 + matches_count : int; 4643 + synced_at : string; 4644 + } 4645 + 4646 + let sync_status_jsont = 4647 + Jsont.Object.map ~kind:"Sync_status" 4648 + (fun _typ matches_count synced_at -> { matches_count; synced_at }) 4649 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#syncStatus" ~enc:(fun _ -> "app.bsky.contact.defs#syncStatus") 4650 + |> Jsont.Object.mem "matchesCount" Jsont.int ~enc:(fun r -> r.matches_count) 4651 + |> Jsont.Object.mem "syncedAt" Jsont.string ~enc:(fun r -> r.synced_at) 4652 + |> Jsont.Object.finish 4653 + 4654 + end 4655 + module ImportContacts = struct 4656 type input = { 4657 + contacts : string list; 4658 + token : string; 4659 } 4660 4661 let input_jsont = 4662 Jsont.Object.map ~kind:"Input" 4663 + (fun _typ contacts token -> { contacts; token }) 4664 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#input" ~enc:(fun _ -> "app.bsky.contact.importContacts#input") 4665 + |> Jsont.Object.mem "contacts" (Jsont.list Jsont.string) ~enc:(fun r -> r.contacts) 4666 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 4667 |> Jsont.Object.finish 4668 4669 + type output = { 4670 + matches_and_contact_indexes : Defs.match_and_contact_index list; 4671 } 4672 4673 + let output_jsont = 4674 + Jsont.Object.map ~kind:"Output" 4675 + (fun _typ matches_and_contact_indexes -> { matches_and_contact_indexes }) 4676 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#output" ~enc:(fun _ -> "app.bsky.contact.importContacts#output") 4677 + |> Jsont.Object.mem "matchesAndContactIndexes" (Jsont.list Defs.match_and_contact_index_jsont) ~enc:(fun r -> r.matches_and_contact_indexes) 4678 |> Jsont.Object.finish 4679 4680 + end 4681 + module GetSyncStatus = struct 4682 + type params = unit 4683 + 4684 + let params_jsont = Jsont.ignore 4685 + 4686 + type output = { 4687 + sync_status : Defs.sync_status option; 4688 } 4689 4690 + let output_jsont = 4691 + Jsont.Object.map ~kind:"Output" 4692 + (fun _typ sync_status -> { sync_status }) 4693 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getSyncStatus#output" ~enc:(fun _ -> "app.bsky.contact.getSyncStatus#output") 4694 + |> Jsont.Object.opt_mem "syncStatus" Defs.sync_status_jsont ~enc:(fun r -> r.sync_status) 4695 |> Jsont.Object.finish 4696 4697 end 4698 + end 4699 + module Unspecced = struct 4700 + module GetTaggedSuggestions = struct 4701 + type suggestion = { 4702 + subject : string; 4703 + subject_type : string; 4704 + tag : string; 4705 } 4706 4707 + let suggestion_jsont = 4708 + Jsont.Object.map ~kind:"Suggestion" 4709 + (fun _typ subject subject_type tag -> { subject; subject_type; tag }) 4710 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#suggestion" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#suggestion") 4711 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 4712 + |> Jsont.Object.mem "subjectType" Jsont.string ~enc:(fun r -> r.subject_type) 4713 + |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 4714 |> Jsont.Object.finish 4715 4716 + type params = unit 4717 + 4718 + let params_jsont = Jsont.ignore 4719 + 4720 type output = { 4721 + suggestions : suggestion list; 4722 } 4723 4724 let output_jsont = 4725 Jsont.Object.map ~kind:"Output" 4726 + (fun _typ suggestions -> { suggestions }) 4727 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#output" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#output") 4728 + |> Jsont.Object.mem "suggestions" (Jsont.list suggestion_jsont) ~enc:(fun r -> r.suggestions) 4729 |> Jsont.Object.finish 4730 4731 end 4732 module GetSuggestedUsersSkeleton = struct 4733 type params = { 4734 category : string option; ··· 4765 |> Jsont.Object.finish 4766 4767 end 4768 + module GetSuggestedUsers = struct 4769 type params = { 4770 + category : string option; 4771 limit : int option; 4772 } 4773 4774 let params_jsont = 4775 Jsont.Object.map ~kind:"Params" 4776 + (fun category limit -> { 4777 + category; 4778 limit; 4779 }) 4780 + |> Jsont.Object.opt_mem "category" Jsont.string 4781 + ~enc:(fun r -> r.category) 4782 |> Jsont.Object.opt_mem "limit" Jsont.int 4783 ~enc:(fun r -> r.limit) 4784 |> Jsont.Object.finish 4785 4786 type output = { 4787 + actors : Jsont.json list; 4788 + rec_id : int option; 4789 } 4790 4791 let output_jsont = 4792 Jsont.Object.map ~kind:"Output" 4793 + (fun _typ actors rec_id -> { actors; rec_id }) 4794 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedUsers#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedUsers#output") 4795 + |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 4796 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 4797 |> Jsont.Object.finish 4798 4799 end ··· 4827 |> Jsont.Object.finish 4828 4829 end 4830 + module GetSuggestedStarterPacks = struct 4831 type params = { 4832 limit : int option; 4833 } ··· 4842 |> Jsont.Object.finish 4843 4844 type output = { 4845 + starter_packs : Jsont.json list; 4846 } 4847 4848 let output_jsont = 4849 Jsont.Object.map ~kind:"Output" 4850 + (fun _typ starter_packs -> { starter_packs }) 4851 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedStarterPacks#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedStarterPacks#output") 4852 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 4853 |> Jsont.Object.finish 4854 4855 end ··· 4883 |> Jsont.Object.finish 4884 4885 end 4886 + module GetSuggestedFeeds = struct 4887 + type params = { 4888 + limit : int option; 4889 } 4890 4891 + let params_jsont = 4892 + Jsont.Object.map ~kind:"Params" 4893 + (fun limit -> { 4894 + limit; 4895 + }) 4896 + |> Jsont.Object.opt_mem "limit" Jsont.int 4897 + ~enc:(fun r -> r.limit) 4898 |> Jsont.Object.finish 4899 4900 type output = { 4901 + feeds : Jsont.json list; 4902 } 4903 4904 let output_jsont = 4905 Jsont.Object.map ~kind:"Output" 4906 + (fun _typ feeds -> { feeds }) 4907 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedFeeds#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedFeeds#output") 4908 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4909 |> Jsont.Object.finish 4910 4911 end 4912 + module GetPopularFeedGenerators = struct 4913 type params = { 4914 + cursor : string option; 4915 limit : int option; 4916 + query : string option; 4917 } 4918 4919 let params_jsont = 4920 Jsont.Object.map ~kind:"Params" 4921 + (fun cursor limit query -> { 4922 + cursor; 4923 limit; 4924 + query; 4925 }) 4926 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4927 + ~enc:(fun r -> r.cursor) 4928 |> Jsont.Object.opt_mem "limit" Jsont.int 4929 ~enc:(fun r -> r.limit) 4930 + |> Jsont.Object.opt_mem "query" Jsont.string 4931 + ~enc:(fun r -> r.query) 4932 |> Jsont.Object.finish 4933 4934 type output = { 4935 + cursor : string option; 4936 + feeds : Jsont.json list; 4937 } 4938 4939 let output_jsont = 4940 Jsont.Object.map ~kind:"Output" 4941 + (fun _typ cursor feeds -> { cursor; feeds }) 4942 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPopularFeedGenerators#output" ~enc:(fun _ -> "app.bsky.unspecced.getPopularFeedGenerators#output") 4943 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4944 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4945 |> Jsont.Object.finish 4946 4947 end ··· 4975 |> Jsont.Object.finish 4976 4977 end 4978 + module GetOnboardingSuggestedStarterPacks = struct 4979 + type params = { 4980 + limit : int option; 4981 + } 4982 + 4983 + let params_jsont = 4984 + Jsont.Object.map ~kind:"Params" 4985 + (fun limit -> { 4986 + limit; 4987 + }) 4988 + |> Jsont.Object.opt_mem "limit" Jsont.int 4989 + ~enc:(fun r -> r.limit) 4990 + |> Jsont.Object.finish 4991 + 4992 + type output = { 4993 + starter_packs : Jsont.json list; 4994 + } 4995 + 4996 + let output_jsont = 4997 + Jsont.Object.map ~kind:"Output" 4998 + (fun _typ starter_packs -> { starter_packs }) 4999 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output" ~enc:(fun _ -> "app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output") 5000 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 5001 + |> Jsont.Object.finish 5002 + 5003 + end 5004 + module GetConfig = struct 5005 + type live_now_config = { 5006 + did : string; 5007 + domains : string list; 5008 + } 5009 + 5010 + let live_now_config_jsont = 5011 + Jsont.Object.map ~kind:"Live_now_config" 5012 + (fun _typ did domains -> { did; domains }) 5013 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#liveNowConfig" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#liveNowConfig") 5014 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 5015 + |> Jsont.Object.mem "domains" (Jsont.list Jsont.string) ~enc:(fun r -> r.domains) 5016 + |> Jsont.Object.finish 5017 + 5018 + type output = { 5019 + check_email_confirmed : bool option; 5020 + live_now : live_now_config list option; 5021 + } 5022 + 5023 + let output_jsont = 5024 + Jsont.Object.map ~kind:"Output" 5025 + (fun _typ check_email_confirmed live_now -> { check_email_confirmed; live_now }) 5026 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#output" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#output") 5027 + |> Jsont.Object.opt_mem "checkEmailConfirmed" Jsont.bool ~enc:(fun r -> r.check_email_confirmed) 5028 + |> Jsont.Object.opt_mem "liveNow" (Jsont.list live_now_config_jsont) ~enc:(fun r -> r.live_now) 5029 + |> Jsont.Object.finish 5030 + 5031 + end 5032 module Defs = struct 5033 + type age_assurance_event = { 5034 + attempt_id : string; 5035 + complete_ip : string option; 5036 + complete_ua : string option; 5037 + created_at : string; 5038 + email : string option; 5039 + init_ip : string option; 5040 + init_ua : string option; 5041 + status : string; 5042 + } 5043 + 5044 + let age_assurance_event_jsont = 5045 + Jsont.Object.map ~kind:"Age_assurance_event" 5046 + (fun _typ attempt_id complete_ip complete_ua created_at email init_ip init_ua status -> { attempt_id; complete_ip; complete_ua; created_at; email; init_ip; init_ua; status }) 5047 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#ageAssuranceEvent" ~enc:(fun _ -> "app.bsky.unspecced.defs#ageAssuranceEvent") 5048 + |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 5049 + |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 5050 + |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 5051 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 5052 + |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 5053 + |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 5054 + |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 5055 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 5056 + |> Jsont.Object.finish 5057 + 5058 + type age_assurance_state = { 5059 + last_initiated_at : string option; 5060 + status : string; 5061 } 5062 5063 + let age_assurance_state_jsont = 5064 + Jsont.Object.map ~kind:"Age_assurance_state" 5065 + (fun _typ last_initiated_at status -> { last_initiated_at; status }) 5066 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#ageAssuranceState" ~enc:(fun _ -> "app.bsky.unspecced.defs#ageAssuranceState") 5067 + |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 5068 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 5069 |> Jsont.Object.finish 5070 5071 + type skeleton_search_actor = { 5072 + did : string; 5073 + } 5074 + 5075 + let skeleton_search_actor_jsont = 5076 + Jsont.Object.map ~kind:"Skeleton_search_actor" 5077 + (fun _typ did -> { did }) 5078 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchActor" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchActor") 5079 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 5080 + |> Jsont.Object.finish 5081 + 5082 + type skeleton_search_post = { 5083 + uri : string; 5084 + } 5085 + 5086 + let skeleton_search_post_jsont = 5087 + Jsont.Object.map ~kind:"Skeleton_search_post" 5088 + (fun _typ uri -> { uri }) 5089 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchPost" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchPost") 5090 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5091 + |> Jsont.Object.finish 5092 + 5093 + type skeleton_search_starter_pack = { 5094 + uri : string; 5095 + } 5096 + 5097 + let skeleton_search_starter_pack_jsont = 5098 + Jsont.Object.map ~kind:"Skeleton_search_starter_pack" 5099 + (fun _typ uri -> { uri }) 5100 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchStarterPack" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchStarterPack") 5101 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5102 + |> Jsont.Object.finish 5103 + 5104 + type skeleton_trend = { 5105 category : string option; 5106 + dids : string list; 5107 display_name : string; 5108 link : string; 5109 post_count : int; ··· 5112 topic : string; 5113 } 5114 5115 + let skeleton_trend_jsont = 5116 + Jsont.Object.map ~kind:"Skeleton_trend" 5117 + (fun _typ category dids display_name link post_count started_at status topic -> { category; dids; display_name; link; post_count; started_at; status; topic }) 5118 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonTrend" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonTrend") 5119 |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5120 + |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) ~enc:(fun r -> r.dids) 5121 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5122 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5123 |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) ··· 5126 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5127 |> Jsont.Object.finish 5128 5129 + type thread_item_blocked = { 5130 + author : Jsont.json; 5131 + } 5132 + 5133 + let thread_item_blocked_jsont = 5134 + Jsont.Object.map ~kind:"Thread_item_blocked" 5135 + (fun _typ author -> { author }) 5136 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#threadItemBlocked" ~enc:(fun _ -> "app.bsky.unspecced.defs#threadItemBlocked") 5137 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 5138 + |> Jsont.Object.finish 5139 + 5140 + type thread_item_no_unauthenticated = unit 5141 + 5142 + let thread_item_no_unauthenticated_jsont = Jsont.ignore 5143 + 5144 + type thread_item_not_found = unit 5145 + 5146 + let thread_item_not_found_jsont = Jsont.ignore 5147 + 5148 type thread_item_post = { 5149 hidden_by_threadgate : bool; 5150 more_parents : bool; ··· 5166 |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 5167 |> Jsont.Object.finish 5168 5169 + type trend_view = { 5170 + actors : Jsont.json list; 5171 category : string option; 5172 display_name : string; 5173 link : string; 5174 post_count : int; ··· 5177 topic : string; 5178 } 5179 5180 + let trend_view_jsont = 5181 + Jsont.Object.map ~kind:"Trend_view" 5182 + (fun _typ actors category display_name link post_count started_at status topic -> { actors; category; display_name; link; post_count; started_at; status; topic }) 5183 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#trendView" ~enc:(fun _ -> "app.bsky.unspecced.defs#trendView") 5184 + |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 5185 |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5186 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5187 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5188 |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) ··· 5191 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5192 |> Jsont.Object.finish 5193 5194 + type trending_topic = { 5195 + description : string option; 5196 + display_name : string option; 5197 + link : string; 5198 + topic : string; 5199 } 5200 5201 + let trending_topic_jsont = 5202 + Jsont.Object.map ~kind:"Trending_topic" 5203 + (fun _typ description display_name link topic -> { description; display_name; link; topic }) 5204 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#trendingTopic" ~enc:(fun _ -> "app.bsky.unspecced.defs#trendingTopic") 5205 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 5206 + |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5207 + |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5208 + |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5209 |> Jsont.Object.finish 5210 5211 end 5212 + module SearchStarterPacksSkeleton = struct 5213 + type params = { 5214 + cursor : string option; 5215 + limit : int option; 5216 + q : string; 5217 + viewer : string option; 5218 } 5219 5220 + let params_jsont = 5221 + Jsont.Object.map ~kind:"Params" 5222 + (fun cursor limit q viewer -> { 5223 + cursor; 5224 + limit; 5225 + q; 5226 + viewer; 5227 + }) 5228 + |> Jsont.Object.opt_mem "cursor" Jsont.string 5229 + ~enc:(fun r -> r.cursor) 5230 + |> Jsont.Object.opt_mem "limit" Jsont.int 5231 + ~enc:(fun r -> r.limit) 5232 + |> Jsont.Object.mem "q" Jsont.string 5233 + ~enc:(fun r -> r.q) 5234 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5235 + ~enc:(fun r -> r.viewer) 5236 |> Jsont.Object.finish 5237 5238 type output = { 5239 + cursor : string option; 5240 + hits_total : int option; 5241 + starter_packs : Defs.skeleton_search_starter_pack list; 5242 } 5243 5244 let output_jsont = 5245 Jsont.Object.map ~kind:"Output" 5246 + (fun _typ cursor hits_total starter_packs -> { cursor; hits_total; starter_packs }) 5247 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchStarterPacksSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchStarterPacksSkeleton#output") 5248 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5249 + |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5250 + |> Jsont.Object.mem "starterPacks" (Jsont.list Defs.skeleton_search_starter_pack_jsont) ~enc:(fun r -> r.starter_packs) 5251 |> Jsont.Object.finish 5252 5253 end ··· 5329 |> Jsont.Object.finish 5330 5331 end 5332 + module SearchActorsSkeleton = struct 5333 + type params = { 5334 + cursor : string option; 5335 + limit : int option; 5336 + q : string; 5337 + typeahead : bool option; 5338 + viewer : string option; 5339 + } 5340 + 5341 + let params_jsont = 5342 + Jsont.Object.map ~kind:"Params" 5343 + (fun cursor limit q typeahead viewer -> { 5344 + cursor; 5345 + limit; 5346 + q; 5347 + typeahead; 5348 + viewer; 5349 + }) 5350 + |> Jsont.Object.opt_mem "cursor" Jsont.string 5351 + ~enc:(fun r -> r.cursor) 5352 + |> Jsont.Object.opt_mem "limit" Jsont.int 5353 + ~enc:(fun r -> r.limit) 5354 + |> Jsont.Object.mem "q" Jsont.string 5355 + ~enc:(fun r -> r.q) 5356 + |> Jsont.Object.opt_mem "typeahead" Jsont.bool 5357 + ~enc:(fun r -> r.typeahead) 5358 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5359 + ~enc:(fun r -> r.viewer) 5360 + |> Jsont.Object.finish 5361 + 5362 + type output = { 5363 + actors : Defs.skeleton_search_actor list; 5364 + cursor : string option; 5365 + hits_total : int option; 5366 + } 5367 + 5368 + let output_jsont = 5369 + Jsont.Object.map ~kind:"Output" 5370 + (fun _typ actors cursor hits_total -> { actors; cursor; hits_total }) 5371 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchActorsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchActorsSkeleton#output") 5372 + |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5373 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5374 + |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5375 + |> Jsont.Object.finish 5376 + 5377 + end 5378 + module InitAgeAssurance = struct 5379 + type input = { 5380 + country_code : string; 5381 + email : string; 5382 + language : string; 5383 + } 5384 + 5385 + let input_jsont = 5386 + Jsont.Object.map ~kind:"Input" 5387 + (fun _typ country_code email language -> { country_code; email; language }) 5388 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.initAgeAssurance#input" ~enc:(fun _ -> "app.bsky.unspecced.initAgeAssurance#input") 5389 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 5390 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 5391 + |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 5392 + |> Jsont.Object.finish 5393 + 5394 + type output = Defs.age_assurance_state 5395 + 5396 + let output_jsont = Defs.age_assurance_state_jsont 5397 + 5398 + end 5399 + module GetTrendsSkeleton = struct 5400 + type params = { 5401 + limit : int option; 5402 + viewer : string option; 5403 + } 5404 + 5405 + let params_jsont = 5406 + Jsont.Object.map ~kind:"Params" 5407 + (fun limit viewer -> { 5408 + limit; 5409 + viewer; 5410 + }) 5411 + |> Jsont.Object.opt_mem "limit" Jsont.int 5412 + ~enc:(fun r -> r.limit) 5413 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5414 + ~enc:(fun r -> r.viewer) 5415 + |> Jsont.Object.finish 5416 + 5417 + type output = { 5418 + trends : Defs.skeleton_trend list; 5419 } 5420 5421 + let output_jsont = 5422 + Jsont.Object.map ~kind:"Output" 5423 + (fun _typ trends -> { trends }) 5424 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrendsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrendsSkeleton#output") 5425 + |> Jsont.Object.mem "trends" (Jsont.list Defs.skeleton_trend_jsont) ~enc:(fun r -> r.trends) 5426 |> Jsont.Object.finish 5427 5428 + end 5429 + module GetTrends = struct 5430 type params = { 5431 + limit : int option; 5432 } 5433 5434 let params_jsont = 5435 Jsont.Object.map ~kind:"Params" 5436 + (fun limit -> { 5437 + limit; 5438 }) 5439 + |> Jsont.Object.opt_mem "limit" Jsont.int 5440 + ~enc:(fun r -> r.limit) 5441 |> Jsont.Object.finish 5442 5443 type output = { 5444 + trends : Defs.trend_view list; 5445 } 5446 5447 let output_jsont = 5448 Jsont.Object.map ~kind:"Output" 5449 + (fun _typ trends -> { trends }) 5450 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrends#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrends#output") 5451 + |> Jsont.Object.mem "trends" (Jsont.list Defs.trend_view_jsont) ~enc:(fun r -> r.trends) 5452 |> Jsont.Object.finish 5453 5454 end ··· 5484 |> Jsont.Object.finish 5485 5486 end 5487 + module GetSuggestionsSkeleton = struct 5488 type params = { 5489 + cursor : string option; 5490 limit : int option; 5491 + relative_to_did : string option; 5492 viewer : string option; 5493 } 5494 5495 let params_jsont = 5496 Jsont.Object.map ~kind:"Params" 5497 + (fun cursor limit relative_to_did viewer -> { 5498 + cursor; 5499 limit; 5500 + relative_to_did; 5501 viewer; 5502 }) 5503 + |> Jsont.Object.opt_mem "cursor" Jsont.string 5504 + ~enc:(fun r -> r.cursor) 5505 |> Jsont.Object.opt_mem "limit" Jsont.int 5506 ~enc:(fun r -> r.limit) 5507 + |> Jsont.Object.opt_mem "relativeToDid" Jsont.string 5508 + ~enc:(fun r -> r.relative_to_did) 5509 |> Jsont.Object.opt_mem "viewer" Jsont.string 5510 ~enc:(fun r -> r.viewer) 5511 |> Jsont.Object.finish 5512 5513 type output = { 5514 + actors : Defs.skeleton_search_actor list; 5515 + cursor : string option; 5516 + rec_id : int option; 5517 + relative_to_did : string option; 5518 } 5519 5520 let output_jsont = 5521 Jsont.Object.map ~kind:"Output" 5522 + (fun _typ actors cursor rec_id relative_to_did -> { actors; cursor; rec_id; relative_to_did }) 5523 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestionsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestionsSkeleton#output") 5524 + |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5525 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5526 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5527 + |> Jsont.Object.opt_mem "relativeToDid" Jsont.string ~enc:(fun r -> r.relative_to_did) 5528 |> Jsont.Object.finish 5529 5530 end 5531 + module GetPostThreadV2 = struct 5532 type thread_item = { 5533 depth : int; 5534 uri : string; 5535 + value : Jsont.json; 5536 } 5537 5538 let thread_item_jsont = 5539 Jsont.Object.map ~kind:"Thread_item" 5540 (fun _typ depth uri value -> { depth; uri; value }) 5541 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#threadItem") 5542 |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5543 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5544 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 5545 |> Jsont.Object.finish 5546 5547 type params = { 5548 + above : bool option; 5549 anchor : string; 5550 + below : int option; 5551 + branching_factor : int option; 5552 + sort : string option; 5553 } 5554 5555 let params_jsont = 5556 Jsont.Object.map ~kind:"Params" 5557 + (fun above anchor below branching_factor sort -> { 5558 + above; 5559 anchor; 5560 + below; 5561 + branching_factor; 5562 + sort; 5563 }) 5564 + |> Jsont.Object.opt_mem "above" Jsont.bool 5565 + ~enc:(fun r -> r.above) 5566 |> Jsont.Object.mem "anchor" Jsont.string 5567 ~enc:(fun r -> r.anchor) 5568 + |> Jsont.Object.opt_mem "below" Jsont.int 5569 + ~enc:(fun r -> r.below) 5570 + |> Jsont.Object.opt_mem "branchingFactor" Jsont.int 5571 + ~enc:(fun r -> r.branching_factor) 5572 + |> Jsont.Object.opt_mem "sort" Jsont.string 5573 + ~enc:(fun r -> r.sort) 5574 |> Jsont.Object.finish 5575 5576 type output = { 5577 + has_other_replies : bool; 5578 thread : thread_item list; 5579 + threadgate : Jsont.json option; 5580 } 5581 5582 let output_jsont = 5583 Jsont.Object.map ~kind:"Output" 5584 + (fun _typ has_other_replies thread threadgate -> { has_other_replies; thread; threadgate }) 5585 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#output" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#output") 5586 + |> Jsont.Object.mem "hasOtherReplies" Jsont.bool ~enc:(fun r -> r.has_other_replies) 5587 |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5588 + |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 5589 |> Jsont.Object.finish 5590 5591 end 5592 + module GetPostThreadOtherV2 = struct 5593 + type thread_item = { 5594 + depth : int; 5595 + uri : string; 5596 + value : Defs.thread_item_post; 5597 } 5598 5599 + let thread_item_jsont = 5600 + Jsont.Object.map ~kind:"Thread_item" 5601 + (fun _typ depth uri value -> { depth; uri; value }) 5602 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadOtherV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadOtherV2#threadItem") 5603 + |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5604 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5605 + |> Jsont.Object.mem "value" Defs.thread_item_post_jsont ~enc:(fun r -> r.value) 5606 |> Jsont.Object.finish 5607 5608 type params = { 5609 + anchor : string; 5610 } 5611 5612 let params_jsont = 5613 Jsont.Object.map ~kind:"Params" 5614 + (fun anchor -> { 5615 + anchor; 5616 }) 5617 + |> Jsont.Object.mem "anchor" Jsont.string 5618 + ~enc:(fun r -> r.anchor) 5619 |> Jsont.Object.finish 5620 5621 type output = { 5622 + thread : thread_item list; 5623 } 5624 5625 let output_jsont = 5626 Jsont.Object.map ~kind:"Output" 5627 + (fun _typ thread -> { thread }) 5628 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadOtherV2#output" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadOtherV2#output") 5629 + |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5630 + |> Jsont.Object.finish 5631 + 5632 + end 5633 + module GetAgeAssuranceState = struct 5634 + type output = Defs.age_assurance_state 5635 + 5636 + let output_jsont = Defs.age_assurance_state_jsont 5637 + 5638 + end 5639 + end 5640 + module Bookmark = struct 5641 + module DeleteBookmark = struct 5642 + type input = { 5643 + uri : string; 5644 + } 5645 + 5646 + let input_jsont = 5647 + Jsont.Object.map ~kind:"Input" 5648 + (fun _typ uri -> { uri }) 5649 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.deleteBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.deleteBookmark#input") 5650 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5651 |> Jsont.Object.finish 5652 5653 end 5654 + module Defs = struct 5655 + type bookmark = { 5656 + subject : Com.Atproto.Repo.StrongRef.main; 5657 } 5658 5659 + let bookmark_jsont = 5660 + Jsont.Object.map ~kind:"Bookmark" 5661 + (fun _typ subject -> { subject }) 5662 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmark" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmark") 5663 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 5664 |> Jsont.Object.finish 5665 5666 + type bookmark_view = { 5667 + created_at : string option; 5668 + item : Jsont.json; 5669 + subject : Com.Atproto.Repo.StrongRef.main; 5670 } 5671 5672 + let bookmark_view_jsont = 5673 + Jsont.Object.map ~kind:"Bookmark_view" 5674 + (fun _typ created_at item subject -> { created_at; item; subject }) 5675 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmarkView" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmarkView") 5676 + |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 5677 + |> Jsont.Object.mem "item" Jsont.json ~enc:(fun r -> r.item) 5678 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 5679 |> Jsont.Object.finish 5680 5681 end 5682 + module CreateBookmark = struct 5683 + type input = { 5684 + cid : string; 5685 + uri : string; 5686 + } 5687 5688 + let input_jsont = 5689 + Jsont.Object.map ~kind:"Input" 5690 + (fun _typ cid uri -> { cid; uri }) 5691 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.createBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.createBookmark#input") 5692 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 5693 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5694 + |> Jsont.Object.finish 5695 5696 end 5697 + module GetBookmarks = struct 5698 type params = { 5699 cursor : string option; 5700 limit : int option; 5701 } 5702 5703 let params_jsont = 5704 Jsont.Object.map ~kind:"Params" 5705 + (fun cursor limit -> { 5706 cursor; 5707 limit; 5708 }) 5709 |> Jsont.Object.opt_mem "cursor" Jsont.string 5710 ~enc:(fun r -> r.cursor) 5711 |> Jsont.Object.opt_mem "limit" Jsont.int 5712 ~enc:(fun r -> r.limit) 5713 |> Jsont.Object.finish 5714 5715 type output = { 5716 + bookmarks : Defs.bookmark_view list; 5717 cursor : string option; 5718 } 5719 5720 let output_jsont = 5721 Jsont.Object.map ~kind:"Output" 5722 + (fun _typ bookmarks cursor -> { bookmarks; cursor }) 5723 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.getBookmarks#output" ~enc:(fun _ -> "app.bsky.bookmark.getBookmarks#output") 5724 + |> Jsont.Object.mem "bookmarks" (Jsont.list Defs.bookmark_view_jsont) ~enc:(fun r -> r.bookmarks) 5725 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5726 |> Jsont.Object.finish 5727 5728 end
+1822 -1822
lexicons/bsky/atp_lexicon_bsky.mli
··· 12 13 module Com : sig 14 module Atproto : sig 15 - module Label : sig 16 module Defs : sig 17 - (** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. *) 18 19 - type self_label = { 20 - val_ : string; (** The short string name of the value or type of this label. *) 21 - } 22 23 - (** Jsont codec for {!type:self_label}. *) 24 - val self_label_jsont : self_label Jsont.t 25 26 - (** Strings which describe the label in the UI, localized into a specific language. *) 27 28 - type label_value_definition_strings = { 29 - description : string; (** A longer description of what the label means and why it might be applied. *) 30 - lang : string; (** The code of the language these strings are written in. *) 31 - name : string; (** A short human-readable name for the label. *) 32 - } 33 34 - (** Jsont codec for {!type:label_value_definition_strings}. *) 35 - val label_value_definition_strings_jsont : label_value_definition_strings Jsont.t 36 37 38 - type label_value = string 39 - val label_value_jsont : label_value Jsont.t 40 41 (** Metadata tag on an atproto resource (eg, repo or record). *) 42 43 type label = { ··· 55 (** Jsont codec for {!type:label}. *) 56 val label_jsont : label Jsont.t 57 58 - (** Metadata tags on an atproto record, published by the author within the record. *) 59 60 - type self_labels = { 61 - values : self_label list; 62 } 63 64 - (** Jsont codec for {!type:self_labels}. *) 65 - val self_labels_jsont : self_labels Jsont.t 66 67 (** Declares a label value and its expected interpretations and behaviors. *) 68 ··· 78 (** Jsont codec for {!type:label_value_definition}. *) 79 val label_value_definition_jsont : label_value_definition Jsont.t 80 81 - end 82 - end 83 - module Repo : sig 84 - module StrongRef : sig 85 86 - type main = { 87 - cid : string; 88 - uri : string; 89 } 90 91 - (** Jsont codec for {!type:main}. *) 92 - val main_jsont : main Jsont.t 93 94 end 95 end 96 - module Moderation : sig 97 - module Defs : sig 98 - (** Tag describing a type of subject that might be reported. *) 99 - 100 - type subject_type = string 101 - val subject_type_jsont : subject_type Jsont.t 102 103 - (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 104 105 - type reason_violation = string 106 - val reason_violation_jsont : reason_violation Jsont.t 107 108 109 - type reason_type = string 110 - val reason_type_jsont : reason_type Jsont.t 111 112 - (** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. *) 113 - 114 - type reason_spam = string 115 - val reason_spam_jsont : reason_spam Jsont.t 116 - 117 - (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 118 - 119 - type reason_sexual = string 120 - val reason_sexual_jsont : reason_sexual Jsont.t 121 - 122 - (** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. *) 123 124 - type reason_rude = string 125 - val reason_rude_jsont : reason_rude Jsont.t 126 127 - (** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. *) 128 129 - type reason_other = string 130 - val reason_other_jsont : reason_other Jsont.t 131 132 - (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 133 134 - type reason_misleading = string 135 - val reason_misleading_jsont : reason_misleading Jsont.t 136 137 - (** Appeal a previously taken moderation action *) 138 139 - type reason_appeal = string 140 - val reason_appeal_jsont : reason_appeal Jsont.t 141 142 end 143 - end 144 - end 145 - end 146 - module App : sig 147 - module Bsky : sig 148 - module AuthManageLabelerService : sig 149 150 - type main = unit 151 - val main_jsont : main Jsont.t 152 153 - end 154 - module AuthViewAll : sig 155 156 - type main = unit 157 - val main_jsont : main Jsont.t 158 159 - end 160 - module AuthManageModeration : sig 161 162 - type main = unit 163 - val main_jsont : main Jsont.t 164 165 end 166 module Richtext : sig 167 module Facet : sig 168 - (** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). *) 169 170 - type tag = { 171 - tag : string; 172 } 173 174 - (** Jsont codec for {!type:tag}. *) 175 - val tag_jsont : tag Jsont.t 176 177 (** Facet feature for mention of another account. The text is usually a handle, including a '\@' prefix, but the facet reference is a DID. *) 178 ··· 183 (** Jsont codec for {!type:mention}. *) 184 val mention_jsont : mention Jsont.t 185 186 - (** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. *) 187 188 - type link = { 189 - uri : string; 190 } 191 192 - (** Jsont codec for {!type:link}. *) 193 - val link_jsont : link Jsont.t 194 - 195 - (** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. *) 196 - 197 - type byte_slice = { 198 - byte_end : int; 199 - byte_start : int; 200 - } 201 - 202 - (** Jsont codec for {!type:byte_slice}. *) 203 - val byte_slice_jsont : byte_slice Jsont.t 204 205 (** Annotation of a sub-string within rich text. *) 206 ··· 214 215 end 216 end 217 - module AuthManageFeedDeclarations : sig 218 219 - type main = unit 220 - val main_jsont : main Jsont.t 221 222 - end 223 - module AuthFullApp : sig 224 225 - type main = unit 226 - val main_jsont : main Jsont.t 227 228 - end 229 - module AuthManageNotifications : sig 230 231 - type main = unit 232 - val main_jsont : main Jsont.t 233 234 - end 235 - module AuthManageProfile : sig 236 237 - type main = unit 238 - val main_jsont : main Jsont.t 239 240 - end 241 - module Ageassurance : sig 242 - module Defs : sig 243 - (** The status of the Age Assurance process. *) 244 245 - type status = string 246 - val status_jsont : status Jsont.t 247 248 - (** Additional metadata needed to compute Age Assurance state client-side. *) 249 250 - type state_metadata = { 251 - account_created_at : string option; (** The account creation timestamp. *) 252 } 253 254 - (** Jsont codec for {!type:state_metadata}. *) 255 - val state_metadata_jsont : state_metadata Jsont.t 256 257 - (** Object used to store Age Assurance data in stash. *) 258 259 - type event = { 260 - access : string; (** The access level granted based on Age Assurance data we've processed. *) 261 - attempt_id : string; (** The unique identifier for this instance of the Age Assurance flow, in UUID format. *) 262 - complete_ip : string option; (** The IP address used when completing the Age Assurance flow. *) 263 - complete_ua : string option; (** The user agent used when completing the Age Assurance flow. *) 264 - country_code : string; (** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. *) 265 - created_at : string; (** The date and time of this write operation. *) 266 - email : string option; (** The email used for Age Assurance. *) 267 - init_ip : string option; (** The IP address used when initiating the Age Assurance flow. *) 268 - init_ua : string option; (** The user agent used when initiating the Age Assurance flow. *) 269 - region_code : string option; (** The ISO 3166-2 region code provided when beginning the Age Assurance flow. *) 270 - status : string; (** The status of the Age Assurance process. *) 271 } 272 273 - (** Jsont codec for {!type:event}. *) 274 - val event_jsont : event Jsont.t 275 276 - (** The Age Assurance configuration for a specific region. *) 277 278 - type config_region = { 279 - country_code : string; (** The ISO 3166-1 alpha-2 country code this configuration applies to. *) 280 - min_access_age : int; (** The minimum age (as a whole integer) required to use Bluesky in this region. *) 281 - region_code : string option; (** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. *) 282 - rules : Jsont.json list; (** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. *) 283 } 284 285 - (** Jsont codec for {!type:config_region}. *) 286 - val config_region_jsont : config_region Jsont.t 287 288 - (** The access level granted based on Age Assurance data we've processed. *) 289 290 - type access = string 291 - val access_jsont : access Jsont.t 292 293 - (** The user's computed Age Assurance state. *) 294 295 - type state = { 296 - access : access; 297 - last_initiated_at : string option; (** The timestamp when this state was last updated. *) 298 - status : status; 299 } 300 301 - (** Jsont codec for {!type:state}. *) 302 - val state_jsont : state Jsont.t 303 304 - (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 305 306 - type config_region_rule_if_declared_under_age = { 307 - access : access; 308 - age : int; (** The age threshold as a whole integer. *) 309 } 310 311 - (** Jsont codec for {!type:config_region_rule_if_declared_under_age}. *) 312 - val config_region_rule_if_declared_under_age_jsont : config_region_rule_if_declared_under_age Jsont.t 313 314 - (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 315 316 - type config_region_rule_if_declared_over_age = { 317 - access : access; 318 - age : int; (** The age threshold as a whole integer. *) 319 } 320 321 - (** Jsont codec for {!type:config_region_rule_if_declared_over_age}. *) 322 - val config_region_rule_if_declared_over_age_jsont : config_region_rule_if_declared_over_age Jsont.t 323 324 - (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 325 326 - type config_region_rule_if_assured_under_age = { 327 - access : access; 328 - age : int; (** The age threshold as a whole integer. *) 329 } 330 331 - (** Jsont codec for {!type:config_region_rule_if_assured_under_age}. *) 332 - val config_region_rule_if_assured_under_age_jsont : config_region_rule_if_assured_under_age Jsont.t 333 334 - (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 335 336 - type config_region_rule_if_assured_over_age = { 337 - access : access; 338 - age : int; (** The age threshold as a whole integer. *) 339 } 340 341 - (** Jsont codec for {!type:config_region_rule_if_assured_over_age}. *) 342 - val config_region_rule_if_assured_over_age_jsont : config_region_rule_if_assured_over_age Jsont.t 343 344 - (** Age Assurance rule that applies if the account is older than a certain date. *) 345 346 - type config_region_rule_if_account_older_than = { 347 - access : access; 348 - date : string; (** The date threshold as a datetime string. *) 349 } 350 351 - (** Jsont codec for {!type:config_region_rule_if_account_older_than}. *) 352 - val config_region_rule_if_account_older_than_jsont : config_region_rule_if_account_older_than Jsont.t 353 354 - (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 355 356 - type config_region_rule_if_account_newer_than = { 357 - access : access; 358 - date : string; (** The date threshold as a datetime string. *) 359 } 360 361 - (** Jsont codec for {!type:config_region_rule_if_account_newer_than}. *) 362 - val config_region_rule_if_account_newer_than_jsont : config_region_rule_if_account_newer_than Jsont.t 363 364 - (** Age Assurance rule that applies by default. *) 365 366 - type config_region_rule_default = { 367 - access : access; 368 } 369 370 - (** Jsont codec for {!type:config_region_rule_default}. *) 371 - val config_region_rule_default_jsont : config_region_rule_default Jsont.t 372 373 374 - type config = { 375 - regions : config_region list; (** The per-region Age Assurance configuration. *) 376 } 377 378 - (** Jsont codec for {!type:config}. *) 379 - val config_jsont : config Jsont.t 380 381 end 382 - module Begin : sig 383 - (** Initiate Age Assurance for an account. *) 384 385 386 type input = { 387 - country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 388 - email : string; (** The user's email address to receive Age Assurance instructions. *) 389 - language : string; (** The user's preferred language for communication during the Age Assurance process. *) 390 - region_code : string option; (** An optional ISO 3166-2 code of the user's region or state within the country. *) 391 } 392 393 (** Jsont codec for {!type:input}. *) 394 val input_jsont : input Jsont.t 395 396 397 - type output = Defs.state 398 399 (** Jsont codec for {!type:output}. *) 400 val output_jsont : output Jsont.t 401 402 end 403 - module GetState : sig 404 - (** Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side. *) 405 406 - (** Query/procedure parameters. *) 407 - type params = { 408 - country_code : string; 409 - region_code : string option; 410 } 411 412 - (** Jsont codec for {!type:params}. *) 413 - val params_jsont : params Jsont.t 414 415 416 type output = { 417 - metadata : Defs.state_metadata; 418 - state : Defs.state; 419 } 420 421 (** Jsont codec for {!type:output}. *) 422 val output_jsont : output Jsont.t 423 424 end 425 - module GetConfig : sig 426 - (** Returns Age Assurance configuration for use on the client. *) 427 428 429 - type output = Defs.config 430 431 (** Jsont codec for {!type:output}. *) 432 val output_jsont : output Jsont.t ··· 436 module Labeler : sig 437 module Defs : sig 438 439 - type labeler_viewer_state = { 440 - like : string option; 441 - } 442 - 443 - (** Jsont codec for {!type:labeler_viewer_state}. *) 444 - val labeler_viewer_state_jsont : labeler_viewer_state Jsont.t 445 - 446 - 447 type labeler_policies = { 448 label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; (** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. *) 449 label_values : Com.Atproto.Label.Defs.label_value list; (** The label values which this labeler publishes. May include global or custom labels. *) ··· 453 val labeler_policies_jsont : labeler_policies Jsont.t 454 455 456 type labeler_view_detailed = { 457 cid : string; 458 creator : Jsont.json; ··· 469 470 (** Jsont codec for {!type:labeler_view_detailed}. *) 471 val labeler_view_detailed_jsont : labeler_view_detailed Jsont.t 472 - 473 - 474 - type labeler_view = { 475 - cid : string; 476 - creator : Jsont.json; 477 - indexed_at : string; 478 - labels : Com.Atproto.Label.Defs.label list option; 479 - like_count : int option; 480 - uri : string; 481 - viewer : Jsont.json option; 482 - } 483 - 484 - (** Jsont codec for {!type:labeler_view}. *) 485 - val labeler_view_jsont : labeler_view Jsont.t 486 487 end 488 module Service : sig ··· 523 524 end 525 end 526 - module AuthCreatePosts : sig 527 - 528 - type main = unit 529 - val main_jsont : main Jsont.t 530 - 531 - end 532 - module Video : sig 533 - module GetUploadLimits : sig 534 - (** Get video upload limits for the authenticated user. *) 535 - 536 - 537 - type output = { 538 - can_upload : bool; 539 - error : string option; 540 - message : string option; 541 - remaining_daily_bytes : int option; 542 - remaining_daily_videos : int option; 543 - } 544 - 545 - (** Jsont codec for {!type:output}. *) 546 - val output_jsont : output Jsont.t 547 - 548 - end 549 - module Defs : sig 550 - 551 - type job_status = { 552 - blob : Atp.Blob_ref.t option; 553 - did : string; 554 - error : string option; 555 - job_id : string; 556 - message : string option; 557 - progress : int option; (** Progress within the current processing state. *) 558 - state : string; (** The state of the video processing job. All values not listed as a known value indicate that the job is in process. *) 559 - } 560 - 561 - (** Jsont codec for {!type:job_status}. *) 562 - val job_status_jsont : job_status Jsont.t 563 - 564 - end 565 - module UploadVideo : sig 566 - (** Upload a video to be processed then stored on the PDS. *) 567 - 568 - 569 - type input = unit 570 - val input_jsont : input Jsont.t 571 - 572 - 573 - type output = { 574 - job_status : Defs.job_status; 575 - } 576 - 577 - (** Jsont codec for {!type:output}. *) 578 - val output_jsont : output Jsont.t 579 - 580 - end 581 - module GetJobStatus : sig 582 - (** Get status details for a video processing job. *) 583 - 584 - (** Query/procedure parameters. *) 585 - type params = { 586 - job_id : string; 587 - } 588 - 589 - (** Jsont codec for {!type:params}. *) 590 - val params_jsont : params Jsont.t 591 592 - 593 - type output = { 594 - job_status : Defs.job_status; 595 } 596 597 - (** Jsont codec for {!type:output}. *) 598 - val output_jsont : output Jsont.t 599 600 - end 601 - end 602 - module Embed : sig 603 - module External : sig 604 605 type view_external = { 606 description : string; ··· 612 (** Jsont codec for {!type:view_external}. *) 613 val view_external_jsont : view_external Jsont.t 614 615 616 - type external_ = { 617 - description : string; 618 - thumb : Atp.Blob_ref.t option; 619 - title : string; 620 - uri : string; 621 } 622 623 - (** Jsont codec for {!type:external_}. *) 624 - val external__jsont : external_ Jsont.t 625 626 627 type view = { ··· 631 (** Jsont codec for {!type:view}. *) 632 val view_jsont : view Jsont.t 633 634 - (** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). *) 635 - 636 - type main = { 637 - external_ : Jsont.json; 638 - } 639 - 640 - (** Jsont codec for {!type:main}. *) 641 - val main_jsont : main Jsont.t 642 - 643 end 644 module Defs : sig 645 (** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. *) ··· 653 val aspect_ratio_jsont : aspect_ratio Jsont.t 654 655 end 656 - module Images : sig 657 658 - type view_image = { 659 - alt : string; (** Alt text description of the image, for accessibility. *) 660 aspect_ratio : Jsont.json option; 661 - fullsize : string; (** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. *) 662 - thumb : string; (** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. *) 663 } 664 665 - (** Jsont codec for {!type:view_image}. *) 666 - val view_image_jsont : view_image Jsont.t 667 668 669 type image = { 670 alt : string; (** Alt text description of the image, for accessibility. *) ··· 676 val image_jsont : image Jsont.t 677 678 679 - type view = { 680 - images : Jsont.json list; 681 } 682 683 - (** Jsont codec for {!type:view}. *) 684 - val view_jsont : view Jsont.t 685 686 687 type main = { ··· 691 (** Jsont codec for {!type:main}. *) 692 val main_jsont : main Jsont.t 693 694 - end 695 - module Video : sig 696 697 type view = { 698 - alt : string option; 699 - aspect_ratio : Jsont.json option; 700 - cid : string; 701 - playlist : string; 702 - thumbnail : string option; 703 } 704 705 (** Jsont codec for {!type:view}. *) 706 val view_jsont : view Jsont.t 707 708 - 709 - type caption = { 710 - file : Atp.Blob_ref.t; 711 - lang : string; 712 - } 713 - 714 - (** Jsont codec for {!type:caption}. *) 715 - val caption_jsont : caption Jsont.t 716 - 717 718 type main = { 719 - alt : string option; (** Alt text description of the video, for accessibility. *) 720 - aspect_ratio : Jsont.json option; 721 - captions : Jsont.json list option; 722 - video : Atp.Blob_ref.t; (** The mp4 video file. May be up to 100mb, formerly limited to 50mb. *) 723 } 724 725 (** Jsont codec for {!type:main}. *) 726 val main_jsont : main Jsont.t 727 728 - end 729 - module RecordWithMedia : sig 730 731 type view = { 732 media : Jsont.json; ··· 736 (** Jsont codec for {!type:view}. *) 737 val view_jsont : view Jsont.t 738 739 740 type main = { 741 - media : Jsont.json; 742 - record : Jsont.json; 743 } 744 745 (** Jsont codec for {!type:main}. *) 746 val main_jsont : main Jsont.t 747 748 - end 749 - module Record : sig 750 751 - type view_record = { 752 - author : Jsont.json; 753 - cid : string; 754 - embeds : Jsont.json list option; 755 - indexed_at : string; 756 - labels : Com.Atproto.Label.Defs.label list option; 757 - like_count : int option; 758 - quote_count : int option; 759 - reply_count : int option; 760 - repost_count : int option; 761 - uri : string; 762 - value : Jsont.json; (** The record data itself. *) 763 } 764 765 - (** Jsont codec for {!type:view_record}. *) 766 - val view_record_jsont : view_record Jsont.t 767 768 769 - type view_not_found = { 770 - not_found : bool; 771 uri : string; 772 } 773 774 - (** Jsont codec for {!type:view_not_found}. *) 775 - val view_not_found_jsont : view_not_found Jsont.t 776 777 778 type view_detached = { ··· 784 val view_detached_jsont : view_detached Jsont.t 785 786 787 - type view_blocked = { 788 - author : Jsont.json; 789 - blocked : bool; 790 uri : string; 791 } 792 793 - (** Jsont codec for {!type:view_blocked}. *) 794 - val view_blocked_jsont : view_blocked Jsont.t 795 796 797 - type view = { 798 - record : Jsont.json; 799 } 800 801 - (** Jsont codec for {!type:view}. *) 802 - val view_jsont : view Jsont.t 803 - 804 - 805 - type main = { 806 - record : Com.Atproto.Repo.StrongRef.main; 807 - } 808 - 809 - (** Jsont codec for {!type:main}. *) 810 - val main_jsont : main Jsont.t 811 812 end 813 end 814 - module Notification : sig 815 - module UpdateSeen : sig 816 - (** Notify server that the requesting account has seen notifications. Requires auth. *) 817 - 818 - 819 - type input = { 820 - seen_at : string; 821 - } 822 823 - (** Jsont codec for {!type:input}. *) 824 - val input_jsont : input Jsont.t 825 826 - end 827 - module RegisterPush : sig 828 - (** Register to receive push notifications, via a specified service, for the requesting account. Requires auth. *) 829 830 831 - type input = { 832 - age_restricted : bool option; (** Set to true when the actor is age restricted *) 833 - app_id : string; 834 - platform : string; 835 - service_did : string; 836 - token : string; 837 - } 838 839 - (** Jsont codec for {!type:input}. *) 840 - val input_jsont : input Jsont.t 841 842 - end 843 - module ListNotifications : sig 844 845 - type notification = { 846 - author : Jsont.json; 847 - cid : string; 848 - indexed_at : string; 849 - is_read : bool; 850 - labels : Com.Atproto.Label.Defs.label list option; 851 - reason : string; (** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. *) 852 - reason_subject : string option; 853 - record : Jsont.json; 854 - uri : string; 855 - } 856 857 - (** Jsont codec for {!type:notification}. *) 858 - val notification_jsont : notification Jsont.t 859 860 - (** Enumerate notifications for the requesting account. Requires auth. *) 861 862 - (** Query/procedure parameters. *) 863 - type params = { 864 - cursor : string option; 865 - limit : int option; 866 - priority : bool option; 867 - reasons : string list option; (** Notification reasons to include in response. *) 868 - seen_at : string option; 869 - } 870 871 - (** Jsont codec for {!type:params}. *) 872 - val params_jsont : params Jsont.t 873 874 875 - type output = { 876 - cursor : string option; 877 - notifications : Jsont.json list; 878 - priority : bool option; 879 - seen_at : string option; 880 - } 881 882 - (** Jsont codec for {!type:output}. *) 883 - val output_jsont : output Jsont.t 884 885 - end 886 - module GetUnreadCount : sig 887 - (** Count the number of unread notifications for the requesting account. Requires auth. *) 888 889 - (** Query/procedure parameters. *) 890 - type params = { 891 - priority : bool option; 892 - seen_at : string option; 893 - } 894 895 - (** Jsont codec for {!type:params}. *) 896 - val params_jsont : params Jsont.t 897 898 899 - type output = { 900 - count : int; 901 } 902 903 - (** Jsont codec for {!type:output}. *) 904 - val output_jsont : output Jsont.t 905 906 - end 907 - module UnregisterPush : sig 908 - (** The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. *) 909 910 - 911 - type input = { 912 - app_id : string; 913 - platform : string; 914 - service_did : string; 915 - token : string; 916 } 917 918 - (** Jsont codec for {!type:input}. *) 919 - val input_jsont : input Jsont.t 920 - 921 - end 922 - module PutPreferences : sig 923 - (** Set notification-related preferences for an account. Requires auth. *) 924 925 926 - type input = { 927 - priority : bool; 928 } 929 930 - (** Jsont codec for {!type:input}. *) 931 - val input_jsont : input Jsont.t 932 - 933 - end 934 - module Defs : sig 935 936 - type record_deleted = unit 937 938 - (** Jsont codec for {!type:record_deleted}. *) 939 - val record_deleted_jsont : record_deleted Jsont.t 940 941 942 - type preference = { 943 - list_ : bool; 944 - push : bool; 945 } 946 947 - (** Jsont codec for {!type:preference}. *) 948 - val preference_jsont : preference Jsont.t 949 950 951 - type filterable_preference = { 952 - include_ : string; 953 - list_ : bool; 954 - push : bool; 955 } 956 957 - (** Jsont codec for {!type:filterable_preference}. *) 958 - val filterable_preference_jsont : filterable_preference Jsont.t 959 960 961 - type chat_preference = { 962 - include_ : string; 963 - push : bool; 964 } 965 966 - (** Jsont codec for {!type:chat_preference}. *) 967 - val chat_preference_jsont : chat_preference Jsont.t 968 969 970 - type activity_subscription = { 971 - post : bool; 972 - reply : bool; 973 } 974 975 - (** Jsont codec for {!type:activity_subscription}. *) 976 - val activity_subscription_jsont : activity_subscription Jsont.t 977 978 - (** Object used to store activity subscription data in stash. *) 979 980 - type subject_activity_subscription = { 981 - activity_subscription : Jsont.json; 982 - subject : string; 983 } 984 985 - (** Jsont codec for {!type:subject_activity_subscription}. *) 986 - val subject_activity_subscription_jsont : subject_activity_subscription Jsont.t 987 988 989 - type preferences = { 990 - chat : Jsont.json; 991 - follow : Jsont.json; 992 - like : Jsont.json; 993 - like_via_repost : Jsont.json; 994 - mention : Jsont.json; 995 - quote : Jsont.json; 996 - reply : Jsont.json; 997 - repost : Jsont.json; 998 - repost_via_repost : Jsont.json; 999 - starterpack_joined : Jsont.json; 1000 - subscribed_post : Jsont.json; 1001 - unverified : Jsont.json; 1002 - verified : Jsont.json; 1003 } 1004 1005 - (** Jsont codec for {!type:preferences}. *) 1006 - val preferences_jsont : preferences Jsont.t 1007 1008 - end 1009 - module Declaration : sig 1010 - (** A declaration of the user's choices related to notifications that can be produced by them. *) 1011 1012 - type main = { 1013 - allow_subscriptions : string; (** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. *) 1014 } 1015 1016 - (** Jsont codec for {!type:main}. *) 1017 - val main_jsont : main Jsont.t 1018 1019 - end 1020 - module ListActivitySubscriptions : sig 1021 - (** Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. *) 1022 1023 - (** Query/procedure parameters. *) 1024 - type params = { 1025 - cursor : string option; 1026 - limit : int option; 1027 } 1028 1029 - (** Jsont codec for {!type:params}. *) 1030 - val params_jsont : params Jsont.t 1031 1032 1033 - type output = { 1034 - cursor : string option; 1035 - subscriptions : Jsont.json list; 1036 } 1037 1038 - (** Jsont codec for {!type:output}. *) 1039 - val output_jsont : output Jsont.t 1040 1041 end 1042 - module GetPreferences : sig 1043 - (** Get notification-related preferences for an account. Requires auth. *) 1044 1045 (** Query/procedure parameters. *) 1046 - type params = unit 1047 1048 (** Jsont codec for {!type:params}. *) 1049 val params_jsont : params Jsont.t 1050 1051 1052 type output = { 1053 - preferences : Jsont.json; 1054 } 1055 1056 (** Jsont codec for {!type:output}. *) 1057 val output_jsont : output Jsont.t 1058 1059 end 1060 - module PutActivitySubscription : sig 1061 - (** Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth. *) 1062 1063 1064 - type input = { 1065 - activity_subscription : Jsont.json; 1066 - subject : string; 1067 - } 1068 - 1069 - (** Jsont codec for {!type:input}. *) 1070 - val input_jsont : input Jsont.t 1071 - 1072 - 1073 - type output = { 1074 - activity_subscription : Jsont.json option; 1075 - subject : string; 1076 - } 1077 1078 (** Jsont codec for {!type:output}. *) 1079 val output_jsont : output Jsont.t 1080 1081 end 1082 - module PutPreferencesV2 : sig 1083 - (** Set notification-related preferences for an account. Requires auth. *) 1084 1085 1086 type input = { 1087 - chat : Jsont.json option; 1088 - follow : Jsont.json option; 1089 - like : Jsont.json option; 1090 - like_via_repost : Jsont.json option; 1091 - mention : Jsont.json option; 1092 - quote : Jsont.json option; 1093 - reply : Jsont.json option; 1094 - repost : Jsont.json option; 1095 - repost_via_repost : Jsont.json option; 1096 - starterpack_joined : Jsont.json option; 1097 - subscribed_post : Jsont.json option; 1098 - unverified : Jsont.json option; 1099 - verified : Jsont.json option; 1100 } 1101 1102 (** Jsont codec for {!type:input}. *) 1103 val input_jsont : input Jsont.t 1104 1105 1106 - type output = { 1107 - preferences : Jsont.json; 1108 - } 1109 1110 (** Jsont codec for {!type:output}. *) 1111 val output_jsont : output Jsont.t ··· 1153 1154 end 1155 module Defs : sig 1156 - (** An individual verification for an associated subject. *) 1157 1158 - type verification_view = { 1159 - created_at : string; (** Timestamp when the verification was created. *) 1160 - is_valid : bool; (** True if the verification passes validation, otherwise false. *) 1161 - issuer : string; (** The user who issued this verification. *) 1162 - uri : string; (** The AT-URI of the verification record. *) 1163 } 1164 1165 - (** Jsont codec for {!type:verification_view}. *) 1166 - val verification_view_jsont : verification_view Jsont.t 1167 1168 - (** Preferences for how verified accounts appear in the app. *) 1169 1170 - type verification_prefs = { 1171 - hide_badges : bool option; (** Hide the blue check badges for verified accounts and trusted verifiers. *) 1172 } 1173 1174 - (** Jsont codec for {!type:verification_prefs}. *) 1175 - val verification_prefs_jsont : verification_prefs Jsont.t 1176 1177 1178 - type thread_view_pref = { 1179 - sort : string option; (** Sorting mode for threads. *) 1180 } 1181 1182 - (** Jsont codec for {!type:thread_view_pref}. *) 1183 - val thread_view_pref_jsont : thread_view_pref Jsont.t 1184 1185 1186 - type status_view = { 1187 - cid : string option; 1188 - embed : Jsont.json option; (** An optional embed associated with the status. *) 1189 - expires_at : string option; (** The date when this status will expire. The application might choose to no longer return the status after expiration. *) 1190 - is_active : bool option; (** True if the status is not expired, false if it is expired. Only present if expiration was set. *) 1191 - is_disabled : bool option; (** True if the user's go-live access has been disabled by a moderator, false otherwise. *) 1192 - record : Jsont.json; 1193 - status : string; (** The status for the account. *) 1194 - uri : string option; 1195 } 1196 1197 - (** Jsont codec for {!type:status_view}. *) 1198 - val status_view_jsont : status_view Jsont.t 1199 1200 1201 - type saved_feeds_pref = { 1202 - pinned : string list; 1203 - saved : string list; 1204 - timeline_index : int option; 1205 } 1206 1207 - (** Jsont codec for {!type:saved_feeds_pref}. *) 1208 - val saved_feeds_pref_jsont : saved_feeds_pref Jsont.t 1209 1210 1211 - type saved_feed = { 1212 - id : string; 1213 - pinned : bool; 1214 - type_ : string; 1215 - value : string; 1216 } 1217 1218 - (** Jsont codec for {!type:saved_feed}. *) 1219 - val saved_feed_jsont : saved_feed Jsont.t 1220 1221 1222 - type profile_associated_chat = { 1223 - allow_incoming : string; 1224 } 1225 1226 - (** Jsont codec for {!type:profile_associated_chat}. *) 1227 - val profile_associated_chat_jsont : profile_associated_chat Jsont.t 1228 1229 1230 - type profile_associated_activity_subscription = { 1231 - allow_subscriptions : string; 1232 } 1233 1234 - (** Jsont codec for {!type:profile_associated_activity_subscription}. *) 1235 - val profile_associated_activity_subscription_jsont : profile_associated_activity_subscription Jsont.t 1236 1237 1238 - type preferences = Jsont.json list 1239 - val preferences_jsont : preferences Jsont.t 1240 1241 - (** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. *) 1242 1243 - type post_interaction_settings_pref = { 1244 - postgate_embedding_rules : Jsont.json list option; (** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 1245 - threadgate_allow_rules : Jsont.json list option; (** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. *) 1246 } 1247 1248 - (** Jsont codec for {!type:post_interaction_settings_pref}. *) 1249 - val post_interaction_settings_pref_jsont : post_interaction_settings_pref Jsont.t 1250 1251 1252 type personal_details_pref = { ··· 1256 (** Jsont codec for {!type:personal_details_pref}. *) 1257 val personal_details_pref_jsont : personal_details_pref Jsont.t 1258 1259 - (** A new user experiences (NUX) storage object *) 1260 1261 - type nux = { 1262 - completed : bool; 1263 - data : string option; (** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. *) 1264 - expires_at : string option; (** The date and time at which the NUX will expire and should be considered completed. *) 1265 - id : string; 1266 } 1267 1268 - (** Jsont codec for {!type:nux}. *) 1269 - val nux_jsont : nux Jsont.t 1270 1271 1272 - type muted_word_target = string 1273 - val muted_word_target_jsont : muted_word_target Jsont.t 1274 1275 1276 - type labeler_pref_item = { 1277 - did : string; 1278 } 1279 1280 - (** Jsont codec for {!type:labeler_pref_item}. *) 1281 - val labeler_pref_item_jsont : labeler_pref_item Jsont.t 1282 1283 1284 - type interests_pref = { 1285 - tags : string list; (** A list of tags which describe the account owner's interests gathered during onboarding. *) 1286 } 1287 1288 - (** Jsont codec for {!type:interests_pref}. *) 1289 - val interests_pref_jsont : interests_pref Jsont.t 1290 1291 1292 - type hidden_posts_pref = { 1293 - items : string list; (** A list of URIs of posts the account owner has hidden. *) 1294 } 1295 1296 - (** Jsont codec for {!type:hidden_posts_pref}. *) 1297 - val hidden_posts_pref_jsont : hidden_posts_pref Jsont.t 1298 1299 1300 - type feed_view_pref = { 1301 - feed : string; (** The URI of the feed, or an identifier which describes the feed. *) 1302 - hide_quote_posts : bool option; (** Hide quote posts in the feed. *) 1303 - hide_replies : bool option; (** Hide replies in the feed. *) 1304 - hide_replies_by_like_count : int option; (** Hide replies in the feed if they do not have this number of likes. *) 1305 - hide_replies_by_unfollowed : bool option; (** Hide replies in the feed if they are not by followed users. *) 1306 - hide_reposts : bool option; (** Hide reposts in the feed. *) 1307 } 1308 1309 - (** Jsont codec for {!type:feed_view_pref}. *) 1310 - val feed_view_pref_jsont : feed_view_pref Jsont.t 1311 1312 - (** Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. *) 1313 1314 - type declared_age_pref = { 1315 - is_over_age13 : bool option; (** Indicates if the user has declared that they are over 13 years of age. *) 1316 - is_over_age16 : bool option; (** Indicates if the user has declared that they are over 16 years of age. *) 1317 - is_over_age18 : bool option; (** Indicates if the user has declared that they are over 18 years of age. *) 1318 } 1319 1320 - (** Jsont codec for {!type:declared_age_pref}. *) 1321 - val declared_age_pref_jsont : declared_age_pref Jsont.t 1322 1323 1324 - type content_label_pref = { 1325 - label : string; 1326 - labeler_did : string option; (** Which labeler does this preference apply to? If undefined, applies globally. *) 1327 - visibility : string; 1328 } 1329 1330 - (** Jsont codec for {!type:content_label_pref}. *) 1331 - val content_label_pref_jsont : content_label_pref Jsont.t 1332 1333 - (** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. *) 1334 1335 - type bsky_app_progress_guide = { 1336 - guide : string; 1337 } 1338 1339 - (** Jsont codec for {!type:bsky_app_progress_guide}. *) 1340 - val bsky_app_progress_guide_jsont : bsky_app_progress_guide Jsont.t 1341 1342 1343 - type adult_content_pref = { 1344 - enabled : bool; 1345 } 1346 1347 - (** Jsont codec for {!type:adult_content_pref}. *) 1348 - val adult_content_pref_jsont : adult_content_pref Jsont.t 1349 1350 - (** Represents the verification information about the user this object is attached to. *) 1351 1352 - type verification_state = { 1353 - trusted_verifier_status : string; (** The user's status as a trusted verifier. *) 1354 - verifications : Jsont.json list; (** All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. *) 1355 - verified_status : string; (** The user's status as a verified account. *) 1356 } 1357 1358 - (** Jsont codec for {!type:verification_state}. *) 1359 - val verification_state_jsont : verification_state Jsont.t 1360 1361 1362 - type saved_feeds_pref_v2 = { 1363 - items : Jsont.json list; 1364 } 1365 1366 - (** Jsont codec for {!type:saved_feeds_pref_v2}. *) 1367 - val saved_feeds_pref_v2_jsont : saved_feeds_pref_v2 Jsont.t 1368 1369 1370 type profile_associated = { ··· 1379 (** Jsont codec for {!type:profile_associated}. *) 1380 val profile_associated_jsont : profile_associated Jsont.t 1381 1382 - (** A word that the account owner has muted. *) 1383 1384 - type muted_word = { 1385 - actor_target : string option; (** Groups of users to apply the muted word to. If undefined, applies to all users. *) 1386 - expires_at : string option; (** The date and time at which the muted word will expire and no longer be applied. *) 1387 - id : string option; 1388 - targets : Jsont.json list; (** The intended targets of the muted word. *) 1389 - value : string; (** The muted word itself. *) 1390 } 1391 1392 - (** Jsont codec for {!type:muted_word}. *) 1393 - val muted_word_jsont : muted_word Jsont.t 1394 1395 1396 - type labelers_pref = { 1397 - labelers : Jsont.json list; 1398 } 1399 1400 - (** Jsont codec for {!type:labelers_pref}. *) 1401 - val labelers_pref_jsont : labelers_pref Jsont.t 1402 - 1403 - (** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. *) 1404 - 1405 - type bsky_app_state_pref = { 1406 - active_progress_guide : Jsont.json option; 1407 - nuxs : Jsont.json list option; (** Storage for NUXs the user has encountered. *) 1408 - queued_nudges : string list option; (** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. *) 1409 - } 1410 - 1411 - (** Jsont codec for {!type:bsky_app_state_pref}. *) 1412 - val bsky_app_state_pref_jsont : bsky_app_state_pref Jsont.t 1413 1414 1415 type muted_words_pref = { ··· 1419 (** Jsont codec for {!type:muted_words_pref}. *) 1420 val muted_words_pref_jsont : muted_words_pref Jsont.t 1421 1422 - (** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. *) 1423 1424 - type viewer_state = { 1425 - activity_subscription : Jsont.json option; (** This property is present only in selected cases, as an optimization. *) 1426 - blocked_by : bool option; 1427 - blocking : string option; 1428 - blocking_by_list : Jsont.json option; 1429 - followed_by : string option; 1430 - following : string option; 1431 - known_followers : Jsont.json option; (** This property is present only in selected cases, as an optimization. *) 1432 - muted : bool option; 1433 - muted_by_list : Jsont.json option; 1434 } 1435 1436 - (** Jsont codec for {!type:viewer_state}. *) 1437 - val viewer_state_jsont : viewer_state Jsont.t 1438 1439 1440 - type profile_view_detailed = { 1441 associated : Jsont.json option; 1442 avatar : string option; 1443 - banner : string option; 1444 created_at : string option; 1445 debug : Jsont.json option; (** Debug information for internal development *) 1446 description : string option; 1447 did : string; 1448 display_name : string option; 1449 - followers_count : int option; 1450 - follows_count : int option; 1451 handle : string; 1452 indexed_at : string option; 1453 - joined_via_starter_pack : Jsont.json option; 1454 labels : Com.Atproto.Label.Defs.label list option; 1455 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 1456 - posts_count : int option; 1457 pronouns : string option; 1458 status : Jsont.json option; 1459 verification : Jsont.json option; 1460 viewer : Jsont.json option; 1461 - website : string option; 1462 } 1463 1464 - (** Jsont codec for {!type:profile_view_detailed}. *) 1465 - val profile_view_detailed_jsont : profile_view_detailed Jsont.t 1466 1467 1468 type profile_view_basic = { ··· 1484 val profile_view_basic_jsont : profile_view_basic Jsont.t 1485 1486 1487 - type profile_view = { 1488 associated : Jsont.json option; 1489 avatar : string option; 1490 created_at : string option; 1491 debug : Jsont.json option; (** Debug information for internal development *) 1492 description : string option; 1493 did : string; 1494 display_name : string option; 1495 handle : string; 1496 indexed_at : string option; 1497 labels : Com.Atproto.Label.Defs.label list option; 1498 pronouns : string option; 1499 status : Jsont.json option; 1500 verification : Jsont.json option; 1501 viewer : Jsont.json option; 1502 } 1503 1504 - (** Jsont codec for {!type:profile_view}. *) 1505 - val profile_view_jsont : profile_view Jsont.t 1506 1507 - (** The subject's followers whom you also follow *) 1508 - 1509 - type known_followers = { 1510 - count : int; 1511 - followers : Jsont.json list; 1512 - } 1513 - 1514 - (** Jsont codec for {!type:known_followers}. *) 1515 - val known_followers_jsont : known_followers Jsont.t 1516 - 1517 - end 1518 - module GetPreferences : sig 1519 - (** Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. *) 1520 - 1521 - (** Query/procedure parameters. *) 1522 - type params = unit 1523 - 1524 - (** Jsont codec for {!type:params}. *) 1525 - val params_jsont : params Jsont.t 1526 - 1527 1528 - type output = { 1529 - preferences : Jsont.json; 1530 } 1531 1532 - (** Jsont codec for {!type:output}. *) 1533 - val output_jsont : output Jsont.t 1534 1535 end 1536 module SearchActorsTypeahead : sig ··· 1555 val output_jsont : output Jsont.t 1556 1557 end 1558 - module GetProfile : sig 1559 - (** Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. *) 1560 - 1561 - (** Query/procedure parameters. *) 1562 - type params = { 1563 - actor : string; (** Handle or DID of account to fetch profile of. *) 1564 - } 1565 - 1566 - (** Jsont codec for {!type:params}. *) 1567 - val params_jsont : params Jsont.t 1568 - 1569 - 1570 - type output = Jsont.json 1571 - 1572 - (** Jsont codec for {!type:output}. *) 1573 - val output_jsont : output Jsont.t 1574 - 1575 - end 1576 module SearchActors : sig 1577 (** Find actors (profiles) matching search criteria. Does not require auth. *) 1578 ··· 1597 val output_jsont : output Jsont.t 1598 1599 end 1600 module GetSuggestions : sig 1601 (** Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. *) 1602 ··· 1640 val output_jsont : output Jsont.t 1641 1642 end 1643 - module PutPreferences : sig 1644 - (** Set the private preferences attached to the account. *) 1645 - 1646 - 1647 - type input = { 1648 - preferences : Jsont.json; 1649 - } 1650 - 1651 - (** Jsont codec for {!type:input}. *) 1652 - val input_jsont : input Jsont.t 1653 - 1654 - end 1655 - end 1656 - module Contact : sig 1657 - module Defs : sig 1658 - 1659 - type sync_status = { 1660 - matches_count : int; (** Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match. *) 1661 - synced_at : string; (** Last date when contacts where imported. *) 1662 - } 1663 - 1664 - (** Jsont codec for {!type:sync_status}. *) 1665 - val sync_status_jsont : sync_status Jsont.t 1666 - 1667 - (** A stash object to be sent via bsync representing a notification to be created. *) 1668 - 1669 - type notification = { 1670 - from : string; (** The DID of who this notification comes from. *) 1671 - to_ : string; (** The DID of who this notification should go to. *) 1672 - } 1673 - 1674 - (** Jsont codec for {!type:notification}. *) 1675 - val notification_jsont : notification Jsont.t 1676 - 1677 - (** Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match. *) 1678 - 1679 - type match_and_contact_index = { 1680 - contact_index : int; (** The index of this match in the import contact input. *) 1681 - match_ : Jsont.json; (** Profile of the matched user. *) 1682 - } 1683 - 1684 - (** Jsont codec for {!type:match_and_contact_index}. *) 1685 - val match_and_contact_index_jsont : match_and_contact_index Jsont.t 1686 - 1687 - end 1688 - module RemoveData : sig 1689 - (** Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication. *) 1690 - 1691 1692 - type input = unit 1693 - 1694 - (** Jsont codec for {!type:input}. *) 1695 - val input_jsont : input Jsont.t 1696 - 1697 - 1698 - type output = unit 1699 - 1700 - (** Jsont codec for {!type:output}. *) 1701 - val output_jsont : output Jsont.t 1702 - 1703 - end 1704 - module DismissMatch : sig 1705 - (** Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication. *) 1706 - 1707 - 1708 - type input = { 1709 - subject : string; (** The subject's DID to dismiss the match with. *) 1710 } 1711 1712 - (** Jsont codec for {!type:input}. *) 1713 - val input_jsont : input Jsont.t 1714 1715 1716 - type output = unit 1717 1718 (** Jsont codec for {!type:output}. *) 1719 val output_jsont : output Jsont.t 1720 1721 end 1722 - module GetMatches : sig 1723 - (** Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication. *) 1724 1725 (** Query/procedure parameters. *) 1726 - type params = { 1727 - cursor : string option; 1728 - limit : int option; 1729 - } 1730 1731 (** Jsont codec for {!type:params}. *) 1732 val params_jsont : params Jsont.t 1733 1734 1735 type output = { 1736 - cursor : string option; 1737 - matches : Jsont.json list; 1738 } 1739 1740 (** Jsont codec for {!type:output}. *) 1741 val output_jsont : output Jsont.t 1742 1743 end 1744 - module VerifyPhone : sig 1745 - (** Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. *) 1746 - 1747 1748 - type input = { 1749 - code : string; (** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. *) 1750 - phone : string; (** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. *) 1751 } 1752 1753 - (** Jsont codec for {!type:input}. *) 1754 - val input_jsont : input Jsont.t 1755 - 1756 - 1757 - type output = { 1758 - token : string; (** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. *) 1759 - } 1760 - 1761 - (** Jsont codec for {!type:output}. *) 1762 - val output_jsont : output Jsont.t 1763 1764 end 1765 - module StartPhoneVerification : sig 1766 - (** Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. *) 1767 1768 1769 type input = { 1770 - phone : string; (** The phone number to receive the code via SMS. *) 1771 } 1772 1773 (** Jsont codec for {!type:input}. *) 1774 val input_jsont : input Jsont.t 1775 1776 - 1777 - type output = unit 1778 - 1779 - (** Jsont codec for {!type:output}. *) 1780 - val output_jsont : output Jsont.t 1781 - 1782 end 1783 - module SendNotification : sig 1784 - (** System endpoint to send notifications related to contact imports. Requires role authentication. *) 1785 1786 1787 type input = { 1788 - from : string; (** The DID of who this notification comes from. *) 1789 - to_ : string; (** The DID of who this notification should go to. *) 1790 } 1791 1792 (** Jsont codec for {!type:input}. *) 1793 val input_jsont : input Jsont.t 1794 1795 - 1796 - type output = unit 1797 - 1798 - (** Jsont codec for {!type:output}. *) 1799 - val output_jsont : output Jsont.t 1800 - 1801 end 1802 - module GetSyncStatus : sig 1803 - (** Gets the user's current contact import status. Requires authentication. *) 1804 - 1805 - (** Query/procedure parameters. *) 1806 - type params = unit 1807 - 1808 - (** Jsont codec for {!type:params}. *) 1809 - val params_jsont : params Jsont.t 1810 - 1811 - 1812 - type output = { 1813 - sync_status : Defs.sync_status option; (** If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since. *) 1814 - } 1815 - 1816 - (** Jsont codec for {!type:output}. *) 1817 - val output_jsont : output Jsont.t 1818 - 1819 - end 1820 - module ImportContacts : sig 1821 - (** Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. *) 1822 1823 1824 type input = { 1825 - contacts : string list; (** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. *) 1826 - token : string; (** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. *) 1827 } 1828 1829 (** Jsont codec for {!type:input}. *) 1830 val input_jsont : input Jsont.t 1831 - 1832 - 1833 - type output = { 1834 - matches_and_contact_indexes : Defs.match_and_contact_index list; (** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. *) 1835 - } 1836 - 1837 - (** Jsont codec for {!type:output}. *) 1838 - val output_jsont : output Jsont.t 1839 1840 end 1841 - end 1842 - module Graph : sig 1843 module Starterpack : sig 1844 1845 type feed_item = { ··· 1864 val main_jsont : main Jsont.t 1865 1866 end 1867 - module GetFollows : sig 1868 - (** Enumerates accounts which a specified account (actor) follows. *) 1869 - 1870 - (** Query/procedure parameters. *) 1871 - type params = { 1872 - actor : string; 1873 - cursor : string option; 1874 - limit : int option; 1875 - } 1876 - 1877 - (** Jsont codec for {!type:params}. *) 1878 - val params_jsont : params Jsont.t 1879 1880 1881 - type output = { 1882 - cursor : string option; 1883 - follows : Jsont.json list; 1884 - subject : Jsont.json; 1885 } 1886 1887 - (** Jsont codec for {!type:output}. *) 1888 - val output_jsont : output Jsont.t 1889 1890 end 1891 - module GetSuggestedFollowsByActor : sig 1892 - (** Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. *) 1893 1894 - (** Query/procedure parameters. *) 1895 - type params = { 1896 - actor : string; 1897 } 1898 1899 - (** Jsont codec for {!type:params}. *) 1900 - val params_jsont : params Jsont.t 1901 1902 1903 - type output = { 1904 - is_fallback : bool option; (** If true, response has fallen-back to generic results, and is not scoped using relativeToDid *) 1905 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1906 - suggestions : Jsont.json list; 1907 } 1908 1909 - (** Jsont codec for {!type:output}. *) 1910 - val output_jsont : output Jsont.t 1911 1912 end 1913 - module Block : sig 1914 - (** Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. *) 1915 1916 type main = { 1917 created_at : string; 1918 - subject : string; (** DID of the account to be blocked. *) 1919 } 1920 1921 (** Jsont codec for {!type:main}. *) ··· 1934 val main_jsont : main Jsont.t 1935 1936 end 1937 - module MuteThread : sig 1938 - (** Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. *) 1939 1940 1941 - type input = { 1942 - root : string; 1943 } 1944 1945 - (** Jsont codec for {!type:input}. *) 1946 - val input_jsont : input Jsont.t 1947 1948 end 1949 - module GetFollowers : sig 1950 - (** Enumerates accounts which follow a specified account (actor). *) 1951 1952 (** Query/procedure parameters. *) 1953 type params = { 1954 - actor : string; 1955 cursor : string option; 1956 limit : int option; 1957 } ··· 1962 1963 type output = { 1964 cursor : string option; 1965 - followers : Jsont.json list; 1966 - subject : Jsont.json; 1967 } 1968 1969 (** Jsont codec for {!type:output}. *) 1970 val output_jsont : output Jsont.t 1971 1972 end 1973 - module UnmuteThread : sig 1974 - (** Unmutes the specified thread. Requires auth. *) 1975 1976 - 1977 - type input = { 1978 - root : string; 1979 } 1980 1981 - (** Jsont codec for {!type:input}. *) 1982 - val input_jsont : input Jsont.t 1983 1984 - end 1985 - module Follow : sig 1986 - (** Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. *) 1987 1988 - type main = { 1989 - created_at : string; 1990 - subject : string; 1991 - via : Com.Atproto.Repo.StrongRef.main option; 1992 } 1993 1994 - (** Jsont codec for {!type:main}. *) 1995 - val main_jsont : main Jsont.t 1996 1997 end 1998 - module UnmuteActor : sig 1999 - (** Unmutes the specified account. Requires auth. *) 2000 2001 - 2002 - type input = { 2003 actor : string; 2004 - } 2005 - 2006 - (** Jsont codec for {!type:input}. *) 2007 - val input_jsont : input Jsont.t 2008 - 2009 - end 2010 - module MuteActorList : sig 2011 - (** Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. *) 2012 - 2013 - 2014 - type input = { 2015 - list_ : string; 2016 } 2017 2018 - (** Jsont codec for {!type:input}. *) 2019 - val input_jsont : input Jsont.t 2020 - 2021 - end 2022 - module UnmuteActorList : sig 2023 - (** Unmutes the specified list of accounts. Requires auth. *) 2024 2025 2026 - type input = { 2027 - list_ : string; 2028 } 2029 2030 - (** Jsont codec for {!type:input}. *) 2031 - val input_jsont : input Jsont.t 2032 2033 end 2034 - module GetKnownFollowers : sig 2035 - (** Enumerates accounts which follow a specified account (actor) and are followed by the viewer. *) 2036 2037 (** Query/procedure parameters. *) 2038 type params = { ··· 2055 val output_jsont : output Jsont.t 2056 2057 end 2058 - module MuteActor : sig 2059 - (** Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. *) 2060 2061 2062 - type input = { 2063 - actor : string; 2064 } 2065 2066 - (** Jsont codec for {!type:input}. *) 2067 - val input_jsont : input Jsont.t 2068 2069 end 2070 - module Listitem : sig 2071 - (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 2072 2073 type main = { 2074 created_at : string; 2075 - list_ : string; (** Reference (AT-URI) to the list record (app.bsky.graph.list). *) 2076 - subject : string; (** The account which is included on the list. *) 2077 } 2078 2079 (** Jsont codec for {!type:main}. *) ··· 2081 2082 end 2083 module Defs : sig 2084 2085 - type starter_pack_view_basic = { 2086 - cid : string; 2087 - creator : Jsont.json; 2088 - indexed_at : string; 2089 - joined_all_time_count : int option; 2090 - joined_week_count : int option; 2091 - labels : Com.Atproto.Label.Defs.label list option; 2092 - list_item_count : int option; 2093 - record : Jsont.json; 2094 uri : string; 2095 } 2096 2097 - (** Jsont codec for {!type:starter_pack_view_basic}. *) 2098 - val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 2099 2100 - (** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) *) 2101 2102 - type relationship = { 2103 - blocked_by : string option; (** if the actor is blocked by this DID, contains the AT-URI of the block record *) 2104 - blocked_by_list : string option; (** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record *) 2105 - blocking : string option; (** if the actor blocks this DID, this is the AT-URI of the block record *) 2106 - blocking_by_list : string option; (** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record *) 2107 - did : string; 2108 - followed_by : string option; (** if the actor is followed by this DID, contains the AT-URI of the follow record *) 2109 - following : string option; (** if the actor follows this DID, this is the AT-URI of the follow record *) 2110 } 2111 2112 - (** Jsont codec for {!type:relationship}. *) 2113 - val relationship_jsont : relationship Jsont.t 2114 2115 - (** A list of actors used for only for reference purposes such as within a starter pack. *) 2116 2117 - type referencelist = string 2118 - val referencelist_jsont : referencelist Jsont.t 2119 2120 (** indicates that a handle or DID could not be resolved *) 2121 ··· 2127 (** Jsont codec for {!type:not_found_actor}. *) 2128 val not_found_actor_jsont : not_found_actor Jsont.t 2129 2130 - (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 2131 2132 - type modlist = string 2133 - val modlist_jsont : modlist Jsont.t 2134 2135 2136 - type list_viewer_state = { 2137 - blocked : string option; 2138 - muted : bool option; 2139 } 2140 2141 - (** Jsont codec for {!type:list_viewer_state}. *) 2142 - val list_viewer_state_jsont : list_viewer_state Jsont.t 2143 2144 2145 - type list_purpose = string 2146 - val list_purpose_jsont : list_purpose Jsont.t 2147 - 2148 - 2149 - type list_item_view = { 2150 - subject : Jsont.json; 2151 uri : string; 2152 } 2153 2154 - (** Jsont codec for {!type:list_item_view}. *) 2155 - val list_item_view_jsont : list_item_view Jsont.t 2156 2157 - (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2158 2159 - type curatelist = string 2160 - val curatelist_jsont : curatelist Jsont.t 2161 - 2162 - 2163 - type list_view_basic = { 2164 avatar : string option; 2165 cid : string; 2166 - indexed_at : string option; 2167 labels : Com.Atproto.Label.Defs.label list option; 2168 list_item_count : int option; 2169 name : string; ··· 2172 viewer : Jsont.json option; 2173 } 2174 2175 - (** Jsont codec for {!type:list_view_basic}. *) 2176 - val list_view_basic_jsont : list_view_basic Jsont.t 2177 2178 2179 - type list_view = { 2180 avatar : string option; 2181 cid : string; 2182 - creator : Jsont.json; 2183 - description : string option; 2184 - description_facets : Richtext.Facet.main list option; 2185 - indexed_at : string; 2186 labels : Com.Atproto.Label.Defs.label list option; 2187 list_item_count : int option; 2188 name : string; ··· 2191 viewer : Jsont.json option; 2192 } 2193 2194 - (** Jsont codec for {!type:list_view}. *) 2195 - val list_view_jsont : list_view Jsont.t 2196 2197 2198 type starter_pack_view = { ··· 2213 val starter_pack_view_jsont : starter_pack_view Jsont.t 2214 2215 end 2216 - module GetBlocks : sig 2217 - (** Enumerates which accounts the requesting account is currently blocking. Requires auth. *) 2218 2219 (** Query/procedure parameters. *) 2220 type params = { 2221 cursor : string option; 2222 limit : int option; 2223 } 2224 2225 (** Jsont codec for {!type:params}. *) ··· 2227 2228 2229 type output = { 2230 - blocks : Jsont.json list; 2231 cursor : string option; 2232 } 2233 2234 (** Jsont codec for {!type:output}. *) 2235 val output_jsont : output Jsont.t 2236 2237 end 2238 - module Verification : sig 2239 - (** Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. *) 2240 2241 type main = { 2242 - created_at : string; (** Date of when the verification was created. *) 2243 - display_name : string; (** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. *) 2244 - handle : string; (** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. *) 2245 - subject : string; (** DID of the subject the verification applies to. *) 2246 } 2247 2248 (** Jsont codec for {!type:main}. *) 2249 val main_jsont : main Jsont.t 2250 2251 end 2252 - module GetMutes : sig 2253 - (** Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. *) 2254 2255 (** Query/procedure parameters. *) 2256 type params = { 2257 cursor : string option; 2258 limit : int option; 2259 } ··· 2264 2265 type output = { 2266 cursor : string option; 2267 - mutes : Jsont.json list; 2268 } 2269 2270 (** Jsont codec for {!type:output}. *) 2271 val output_jsont : output Jsont.t 2272 2273 end 2274 - module GetRelationships : sig 2275 - (** Enumerates public relationships between one account, and a list of other accounts. Does not require auth. *) 2276 2277 (** Query/procedure parameters. *) 2278 type params = { 2279 - actor : string; (** Primary account requesting relationships for. *) 2280 - others : string list option; (** List of 'other' accounts to be related back to the primary. *) 2281 } 2282 2283 (** Jsont codec for {!type:params}. *) ··· 2285 2286 2287 type output = { 2288 - actor : string option; 2289 - relationships : Jsont.json list; 2290 } 2291 2292 (** Jsont codec for {!type:output}. *) 2293 val output_jsont : output Jsont.t 2294 2295 end 2296 - module GetStarterPacksWithMembership : sig 2297 - (** A starter pack and an optional list item indicating membership of a target user to that starter pack. *) 2298 - 2299 - type starter_pack_with_membership = { 2300 - list_item : Jsont.json option; 2301 - starter_pack : Jsont.json; 2302 - } 2303 - 2304 - (** Jsont codec for {!type:starter_pack_with_membership}. *) 2305 - val starter_pack_with_membership_jsont : starter_pack_with_membership Jsont.t 2306 - 2307 - (** Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. *) 2308 2309 (** Query/procedure parameters. *) 2310 type params = { 2311 - actor : string; (** The account (actor) to check for membership. *) 2312 - cursor : string option; 2313 - limit : int option; 2314 } 2315 2316 (** Jsont codec for {!type:params}. *) ··· 2318 2319 2320 type output = { 2321 - cursor : string option; 2322 - starter_packs_with_membership : Jsont.json list; 2323 } 2324 2325 (** Jsont codec for {!type:output}. *) 2326 val output_jsont : output Jsont.t 2327 2328 end 2329 - module GetActorStarterPacks : sig 2330 - (** Get a list of starter packs created by the actor. *) 2331 2332 (** Query/procedure parameters. *) 2333 type params = { 2334 - actor : string; 2335 - cursor : string option; 2336 - limit : int option; 2337 } 2338 2339 (** Jsont codec for {!type:params}. *) ··· 2341 2342 2343 type output = { 2344 - cursor : string option; 2345 - starter_packs : Jsont.json list; 2346 } 2347 2348 (** Jsont codec for {!type:output}. *) 2349 val output_jsont : output Jsont.t 2350 2351 end 2352 - module List : sig 2353 - (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 2354 2355 - type main = { 2356 - avatar : Atp.Blob_ref.t option; 2357 - created_at : string; 2358 - description : string option; 2359 - description_facets : Richtext.Facet.main list option; 2360 - labels : Com.Atproto.Label.Defs.self_labels option; 2361 - name : string; (** Display name for list; can not be empty. *) 2362 - purpose : Jsont.json; (** Defines the purpose of the list (aka, moderation-oriented or curration-oriented) *) 2363 } 2364 2365 - (** Jsont codec for {!type:main}. *) 2366 - val main_jsont : main Jsont.t 2367 2368 - end 2369 - module SearchStarterPacks : sig 2370 - (** Find starter packs matching search criteria. Does not require auth. *) 2371 2372 (** Query/procedure parameters. *) 2373 type params = { 2374 cursor : string option; 2375 limit : int option; 2376 - q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2377 } 2378 2379 (** Jsont codec for {!type:params}. *) ··· 2382 2383 type output = { 2384 cursor : string option; 2385 - starter_packs : Jsont.json list; 2386 } 2387 2388 (** Jsont codec for {!type:output}. *) 2389 val output_jsont : output Jsont.t 2390 2391 end 2392 - module GetList : sig 2393 - (** Gets a 'view' (with additional context) of a specified list. *) 2394 2395 (** Query/procedure parameters. *) 2396 type params = { 2397 cursor : string option; 2398 limit : int option; 2399 - list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 2400 } 2401 2402 (** Jsont codec for {!type:params}. *) ··· 2405 2406 type output = { 2407 cursor : string option; 2408 - items : Jsont.json list; 2409 - list_ : Jsont.json; 2410 } 2411 2412 (** Jsont codec for {!type:output}. *) 2413 val output_jsont : output Jsont.t 2414 2415 end 2416 - module GetListBlocks : sig 2417 - (** Get mod lists that the requesting account (actor) is blocking. Requires auth. *) 2418 2419 (** Query/procedure parameters. *) 2420 type params = { ··· 2435 val output_jsont : output Jsont.t 2436 2437 end 2438 - module GetStarterPack : sig 2439 - (** Gets a view of a starter pack. *) 2440 2441 (** Query/procedure parameters. *) 2442 type params = { 2443 - starter_pack : string; (** Reference (AT-URI) of the starter pack record. *) 2444 } 2445 2446 (** Jsont codec for {!type:params}. *) ··· 2448 2449 2450 type output = { 2451 - starter_pack : Jsont.json; 2452 } 2453 2454 (** Jsont codec for {!type:output}. *) 2455 val output_jsont : output Jsont.t 2456 2457 end 2458 - module GetListsWithMembership : sig 2459 - (** A list and an optional list item indicating membership of a target user to that list. *) 2460 - 2461 - type list_with_membership = { 2462 - list_ : Jsont.json; 2463 - list_item : Jsont.json option; 2464 - } 2465 - 2466 - (** Jsont codec for {!type:list_with_membership}. *) 2467 - val list_with_membership_jsont : list_with_membership Jsont.t 2468 - 2469 - (** 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. *) 2470 2471 (** Query/procedure parameters. *) 2472 type params = { 2473 - actor : string; (** The account (actor) to check for membership. *) 2474 cursor : string option; 2475 limit : int option; 2476 - purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2477 } 2478 2479 (** Jsont codec for {!type:params}. *) ··· 2482 2483 type output = { 2484 cursor : string option; 2485 - lists_with_membership : Jsont.json list; 2486 } 2487 2488 (** Jsont codec for {!type:output}. *) 2489 val output_jsont : output Jsont.t 2490 2491 end 2492 - module GetListMutes : sig 2493 - (** Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. *) 2494 2495 (** Query/procedure parameters. *) 2496 type params = { 2497 cursor : string option; 2498 limit : int option; 2499 } ··· 2504 2505 type output = { 2506 cursor : string option; 2507 - lists : Jsont.json list; 2508 } 2509 2510 (** Jsont codec for {!type:output}. *) 2511 val output_jsont : output Jsont.t 2512 2513 end 2514 - module GetStarterPacks : sig 2515 - (** Get views for a list of starter packs. *) 2516 2517 - (** Query/procedure parameters. *) 2518 - type params = { 2519 - uris : string list; 2520 } 2521 2522 - (** Jsont codec for {!type:params}. *) 2523 - val params_jsont : params Jsont.t 2524 2525 2526 - type output = { 2527 - starter_packs : Jsont.json list; 2528 - } 2529 2530 - (** Jsont codec for {!type:output}. *) 2531 - val output_jsont : output Jsont.t 2532 2533 - end 2534 - module GetLists : sig 2535 - (** Enumerates the lists created by a specified account (actor). *) 2536 2537 - (** Query/procedure parameters. *) 2538 - type params = { 2539 - actor : string; (** The account (actor) to enumerate lists from. *) 2540 - cursor : string option; 2541 - limit : int option; 2542 - purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2543 } 2544 2545 - (** Jsont codec for {!type:params}. *) 2546 - val params_jsont : params Jsont.t 2547 2548 2549 - type output = { 2550 - cursor : string option; 2551 - lists : Jsont.json list; 2552 } 2553 2554 - (** Jsont codec for {!type:output}. *) 2555 - val output_jsont : output Jsont.t 2556 2557 end 2558 - end 2559 - module Feed : sig 2560 - module Post : sig 2561 - (** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. *) 2562 2563 - type text_slice = { 2564 - end_ : int; 2565 - start : int; 2566 } 2567 2568 - (** Jsont codec for {!type:text_slice}. *) 2569 - val text_slice_jsont : text_slice Jsont.t 2570 2571 2572 type reply_ref = { 2573 parent : Com.Atproto.Repo.StrongRef.main; ··· 2577 (** Jsont codec for {!type:reply_ref}. *) 2578 val reply_ref_jsont : reply_ref Jsont.t 2579 2580 (** Deprecated: use facets instead. *) 2581 2582 type entity = { ··· 2606 val main_jsont : main Jsont.t 2607 2608 end 2609 - module GetLikes : sig 2610 2611 - type like = { 2612 - actor : Jsont.json; 2613 created_at : string; 2614 - indexed_at : string; 2615 } 2616 2617 - (** Jsont codec for {!type:like}. *) 2618 - val like_jsont : like Jsont.t 2619 2620 - (** Get like records which reference a subject (by AT-URI and CID). *) 2621 2622 (** Query/procedure parameters. *) 2623 type params = { 2624 - cid : string option; (** CID of the subject record (aka, specific version of record), to filter likes. *) 2625 cursor : string option; 2626 limit : int option; 2627 - uri : string; (** AT-URI of the subject (eg, a post record). *) 2628 } 2629 2630 (** Jsont codec for {!type:params}. *) ··· 2634 type output = { 2635 cid : string option; 2636 cursor : string option; 2637 - likes : Jsont.json list; 2638 uri : string; 2639 } 2640 ··· 2642 val output_jsont : output Jsont.t 2643 2644 end 2645 - module Postgate : sig 2646 - (** Disables embedding of this post. *) 2647 2648 - type disable_rule = unit 2649 - 2650 - (** Jsont codec for {!type:disable_rule}. *) 2651 - val disable_rule_jsont : disable_rule Jsont.t 2652 - 2653 - (** Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. *) 2654 - 2655 - type main = { 2656 created_at : string; 2657 - detached_embedding_uris : string list option; (** List of AT-URIs embedding this post that the author has detached from. *) 2658 - embedding_rules : Jsont.json list option; (** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 2659 - post : string; (** Reference (AT-URI) to the post record. *) 2660 } 2661 2662 - (** Jsont codec for {!type:main}. *) 2663 - val main_jsont : main Jsont.t 2664 2665 - end 2666 - module GetRepostedBy : sig 2667 - (** Get a list of reposts for a given post. *) 2668 2669 (** Query/procedure parameters. *) 2670 type params = { 2671 - cid : string option; (** If supplied, filters to reposts of specific version (by CID) of the post record. *) 2672 cursor : string option; 2673 limit : int option; 2674 - uri : string; (** Reference (AT-URI) of post record *) 2675 } 2676 2677 (** Jsont codec for {!type:params}. *) ··· 2681 type output = { 2682 cid : string option; 2683 cursor : string option; 2684 - reposted_by : Jsont.json list; 2685 uri : string; 2686 } 2687 ··· 2689 val output_jsont : output Jsont.t 2690 2691 end 2692 - module DescribeFeedGenerator : sig 2693 2694 - type links = { 2695 - privacy_policy : string option; 2696 - terms_of_service : string option; 2697 } 2698 2699 - (** Jsont codec for {!type:links}. *) 2700 - val links_jsont : links Jsont.t 2701 2702 2703 type feed = { 2704 uri : string; ··· 2707 (** Jsont codec for {!type:feed}. *) 2708 val feed_jsont : feed Jsont.t 2709 2710 (** Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). *) 2711 2712 ··· 2720 val output_jsont : output Jsont.t 2721 2722 end 2723 - module Threadgate : sig 2724 - (** Allow replies from actors mentioned in your post. *) 2725 - 2726 - type mention_rule = unit 2727 - 2728 - (** Jsont codec for {!type:mention_rule}. *) 2729 - val mention_rule_jsont : mention_rule Jsont.t 2730 2731 - (** Allow replies from actors on a list. *) 2732 - 2733 - type list_rule = { 2734 - list_ : string; 2735 } 2736 2737 - (** Jsont codec for {!type:list_rule}. *) 2738 - val list_rule_jsont : list_rule Jsont.t 2739 2740 - (** Allow replies from actors you follow. *) 2741 2742 - type following_rule = unit 2743 2744 - (** Jsont codec for {!type:following_rule}. *) 2745 - val following_rule_jsont : following_rule Jsont.t 2746 2747 - (** Allow replies from actors who follow you. *) 2748 2749 - type follower_rule = unit 2750 2751 - (** Jsont codec for {!type:follower_rule}. *) 2752 - val follower_rule_jsont : follower_rule Jsont.t 2753 2754 - (** Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. *) 2755 2756 - type main = { 2757 - allow : Jsont.json list option; (** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. *) 2758 - created_at : string; 2759 - hidden_replies : string list option; (** List of hidden reply URIs. *) 2760 - post : string; (** Reference (AT-URI) to the post record. *) 2761 - } 2762 2763 - (** Jsont codec for {!type:main}. *) 2764 - val main_jsont : main Jsont.t 2765 2766 - end 2767 - module Like : sig 2768 - (** Record declaring a 'like' of a piece of subject content. *) 2769 2770 - type main = { 2771 - created_at : string; 2772 - subject : Com.Atproto.Repo.StrongRef.main; 2773 - via : Com.Atproto.Repo.StrongRef.main option; 2774 - } 2775 2776 - (** Jsont codec for {!type:main}. *) 2777 - val main_jsont : main Jsont.t 2778 2779 - end 2780 - module Defs : sig 2781 - (** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. *) 2782 2783 - type viewer_state = { 2784 - bookmarked : bool option; 2785 - embedding_disabled : bool option; 2786 like : string option; 2787 - pinned : bool option; 2788 - reply_disabled : bool option; 2789 - repost : string option; 2790 - thread_muted : bool option; 2791 } 2792 2793 - (** Jsont codec for {!type:viewer_state}. *) 2794 - val viewer_state_jsont : viewer_state Jsont.t 2795 2796 2797 - type threadgate_view = { 2798 - cid : string option; 2799 - lists : Jsont.json list option; 2800 - record : Jsont.json option; 2801 - uri : string option; 2802 } 2803 2804 - (** Jsont codec for {!type:threadgate_view}. *) 2805 - val threadgate_view_jsont : threadgate_view Jsont.t 2806 2807 - (** Metadata about this post within the context of the thread it is in. *) 2808 - 2809 - type thread_context = { 2810 - root_author_like : string option; 2811 - } 2812 2813 - (** Jsont codec for {!type:thread_context}. *) 2814 - val thread_context_jsont : thread_context Jsont.t 2815 2816 2817 - type skeleton_reason_repost = { 2818 - repost : string; 2819 - } 2820 2821 - (** Jsont codec for {!type:skeleton_reason_repost}. *) 2822 - val skeleton_reason_repost_jsont : skeleton_reason_repost Jsont.t 2823 2824 2825 - type skeleton_reason_pin = unit 2826 2827 - (** Jsont codec for {!type:skeleton_reason_pin}. *) 2828 - val skeleton_reason_pin_jsont : skeleton_reason_pin Jsont.t 2829 2830 2831 - type skeleton_feed_post = { 2832 - feed_context : string option; (** Context that will be passed through to client and may be passed to feed generator back alongside interactions. *) 2833 - post : string; 2834 - reason : Jsont.json option; 2835 - } 2836 2837 - (** Jsont codec for {!type:skeleton_feed_post}. *) 2838 - val skeleton_feed_post_jsont : skeleton_feed_post Jsont.t 2839 2840 - (** Request that more content like the given feed item be shown in the feed *) 2841 2842 - type request_more = string 2843 - val request_more_jsont : request_more Jsont.t 2844 2845 - (** Request that less content like the given feed item be shown in the feed *) 2846 2847 - type request_less = string 2848 - val request_less_jsont : request_less Jsont.t 2849 2850 2851 - type reply_ref = { 2852 - grandparent_author : Jsont.json option; (** When parent is a reply to another post, this is the author of that post. *) 2853 - parent : Jsont.json; 2854 - root : Jsont.json; 2855 - } 2856 2857 - (** Jsont codec for {!type:reply_ref}. *) 2858 - val reply_ref_jsont : reply_ref Jsont.t 2859 2860 2861 type reason_repost = { ··· 2869 val reason_repost_jsont : reason_repost Jsont.t 2870 2871 2872 - type reason_pin = unit 2873 - 2874 - (** Jsont codec for {!type:reason_pin}. *) 2875 - val reason_pin_jsont : reason_pin Jsont.t 2876 - 2877 - 2878 - type not_found_post = { 2879 - not_found : bool; 2880 - uri : string; 2881 } 2882 2883 - (** Jsont codec for {!type:not_found_post}. *) 2884 - val not_found_post_jsont : not_found_post Jsont.t 2885 2886 - (** User shared the feed item *) 2887 2888 - type interaction_share = string 2889 - val interaction_share_jsont : interaction_share Jsont.t 2890 2891 - (** Feed item was seen by user *) 2892 2893 - type interaction_seen = string 2894 - val interaction_seen_jsont : interaction_seen Jsont.t 2895 2896 - (** User reposted the feed item *) 2897 2898 - type interaction_repost = string 2899 - val interaction_repost_jsont : interaction_repost Jsont.t 2900 - 2901 - (** User replied to the feed item *) 2902 - 2903 - type interaction_reply = string 2904 - val interaction_reply_jsont : interaction_reply Jsont.t 2905 2906 - (** User quoted the feed item *) 2907 2908 - type interaction_quote = string 2909 - val interaction_quote_jsont : interaction_quote Jsont.t 2910 2911 - (** User liked the feed item *) 2912 2913 - type interaction_like = string 2914 - val interaction_like_jsont : interaction_like Jsont.t 2915 2916 2917 - type interaction = { 2918 - event : string option; 2919 - feed_context : string option; (** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. *) 2920 - item : string option; 2921 - req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 2922 } 2923 2924 - (** Jsont codec for {!type:interaction}. *) 2925 - val interaction_jsont : interaction Jsont.t 2926 2927 2928 - type generator_viewer_state = { 2929 - like : string option; 2930 } 2931 2932 - (** Jsont codec for {!type:generator_viewer_state}. *) 2933 - val generator_viewer_state_jsont : generator_viewer_state Jsont.t 2934 - 2935 - (** Declares the feed generator returns posts containing app.bsky.embed.video embeds. *) 2936 - 2937 - type content_mode_video = string 2938 - val content_mode_video_jsont : content_mode_video Jsont.t 2939 - 2940 - (** Declares the feed generator returns any types of posts. *) 2941 2942 - type content_mode_unspecified = string 2943 - val content_mode_unspecified_jsont : content_mode_unspecified Jsont.t 2944 2945 - (** User clicked through to the reposter of the feed item *) 2946 2947 - type clickthrough_reposter = string 2948 - val clickthrough_reposter_jsont : clickthrough_reposter Jsont.t 2949 2950 - (** User clicked through to the feed item *) 2951 2952 - type clickthrough_item = string 2953 - val clickthrough_item_jsont : clickthrough_item Jsont.t 2954 2955 - (** User clicked through to the embedded content of the feed item *) 2956 2957 - type clickthrough_embed = string 2958 - val clickthrough_embed_jsont : clickthrough_embed Jsont.t 2959 2960 - (** User clicked through to the author of the feed item *) 2961 2962 - type clickthrough_author = string 2963 - val clickthrough_author_jsont : clickthrough_author Jsont.t 2964 2965 2966 - type blocked_author = { 2967 did : string; 2968 viewer : Jsont.json option; 2969 } 2970 2971 - (** Jsont codec for {!type:blocked_author}. *) 2972 - val blocked_author_jsont : blocked_author Jsont.t 2973 2974 2975 type post_view = { ··· 2994 val post_view_jsont : post_view Jsont.t 2995 2996 2997 - type generator_view = { 2998 - accepts_interactions : bool option; 2999 - avatar : string option; 3000 - cid : string; 3001 - content_mode : string option; 3002 - creator : Jsont.json; 3003 - description : string option; 3004 - description_facets : Richtext.Facet.main list option; 3005 - did : string; 3006 - display_name : string; 3007 - indexed_at : string; 3008 - labels : Com.Atproto.Label.Defs.label list option; 3009 - like_count : int option; 3010 - uri : string; 3011 - viewer : Jsont.json option; 3012 } 3013 3014 - (** Jsont codec for {!type:generator_view}. *) 3015 - val generator_view_jsont : generator_view Jsont.t 3016 - 3017 - 3018 - type blocked_post = { 3019 - author : Jsont.json; 3020 - blocked : bool; 3021 - uri : string; 3022 - } 3023 - 3024 - (** Jsont codec for {!type:blocked_post}. *) 3025 - val blocked_post_jsont : blocked_post Jsont.t 3026 3027 3028 type thread_view_post = { ··· 3035 (** Jsont codec for {!type:thread_view_post}. *) 3036 val thread_view_post_jsont : thread_view_post Jsont.t 3037 3038 3039 - type feed_view_post = { 3040 - feed_context : string option; (** Context provided by feed generator that may be passed back alongside interactions. *) 3041 - post : Jsont.json; 3042 - reason : Jsont.json option; 3043 - reply : Jsont.json option; 3044 - req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3045 } 3046 3047 - (** Jsont codec for {!type:feed_view_post}. *) 3048 - val feed_view_post_jsont : feed_view_post Jsont.t 3049 3050 end 3051 - module Repost : sig 3052 - (** Record representing a 'repost' of an existing Bluesky post. *) 3053 3054 - type main = { 3055 - created_at : string; 3056 - subject : Com.Atproto.Repo.StrongRef.main; 3057 - via : Com.Atproto.Repo.StrongRef.main option; 3058 } 3059 3060 - (** Jsont codec for {!type:main}. *) 3061 - val main_jsont : main Jsont.t 3062 3063 - end 3064 - module Generator : sig 3065 - (** Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. *) 3066 3067 - type main = { 3068 - accepts_interactions : bool option; (** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions *) 3069 - avatar : Atp.Blob_ref.t option; 3070 - content_mode : string option; 3071 - created_at : string; 3072 - description : string option; 3073 - description_facets : Richtext.Facet.main list option; 3074 - did : string; 3075 - display_name : string; 3076 - labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values *) 3077 } 3078 3079 - (** Jsont codec for {!type:main}. *) 3080 - val main_jsont : main Jsont.t 3081 3082 end 3083 - module GetPostThread : sig 3084 - (** Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. *) 3085 3086 (** Query/procedure parameters. *) 3087 type params = { 3088 - depth : int option; (** How many levels of reply depth should be included in response. *) 3089 - parent_height : int option; (** How many levels of parent (and grandparent, etc) post to include. *) 3090 - uri : string; (** Reference (AT-URI) to post record. *) 3091 } 3092 3093 (** Jsont codec for {!type:params}. *) ··· 3095 3096 3097 type output = { 3098 - thread : Jsont.json; 3099 - threadgate : Jsont.json option; 3100 } 3101 3102 (** Jsont codec for {!type:output}. *) 3103 val output_jsont : output Jsont.t 3104 3105 end 3106 - module GetFeed : sig 3107 - (** Get a hydrated feed from an actor's selected feed generator. Implemented by App View. *) 3108 3109 (** Query/procedure parameters. *) 3110 type params = { 3111 cursor : string option; 3112 - feed : string; 3113 limit : int option; 3114 } 3115 ··· 3119 3120 type output = { 3121 cursor : string option; 3122 - feed : Jsont.json list; 3123 } 3124 3125 (** Jsont codec for {!type:output}. *) ··· 3152 val output_jsont : output Jsont.t 3153 3154 end 3155 - module GetListFeed : sig 3156 - (** Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. *) 3157 3158 (** Query/procedure parameters. *) 3159 type params = { 3160 - cursor : string option; 3161 - limit : int option; 3162 - list_ : string; (** Reference (AT-URI) to the list record. *) 3163 } 3164 3165 (** Jsont codec for {!type:params}. *) ··· 3167 3168 3169 type output = { 3170 - cursor : string option; 3171 - feed : Jsont.json list; 3172 } 3173 3174 (** Jsont codec for {!type:output}. *) 3175 val output_jsont : output Jsont.t 3176 3177 end 3178 - module GetActorLikes : sig 3179 - (** Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. *) 3180 3181 (** Query/procedure parameters. *) 3182 type params = { 3183 - actor : string; 3184 - cursor : string option; 3185 - limit : int option; 3186 } 3187 3188 (** Jsont codec for {!type:params}. *) ··· 3190 3191 3192 type output = { 3193 - cursor : string option; 3194 - feed : Jsont.json list; 3195 } 3196 3197 (** Jsont codec for {!type:output}. *) 3198 val output_jsont : output Jsont.t 3199 3200 end 3201 - module GetFeedSkeleton : sig 3202 - (** Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. *) 3203 3204 (** Query/procedure parameters. *) 3205 type params = { 3206 cursor : string option; 3207 - feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 3208 limit : int option; 3209 } 3210 3211 (** Jsont codec for {!type:params}. *) ··· 3215 type output = { 3216 cursor : string option; 3217 feed : Jsont.json list; 3218 - req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3219 } 3220 3221 (** Jsont codec for {!type:output}. *) 3222 val output_jsont : output Jsont.t 3223 3224 end 3225 - module SearchPosts : sig 3226 - (** Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. *) 3227 3228 (** Query/procedure parameters. *) 3229 type params = { 3230 - author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 3231 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3232 - domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 3233 - lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 3234 limit : int option; 3235 - mentions : string option; (** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. *) 3236 - q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 3237 - since : string option; (** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). *) 3238 - sort : string option; (** Specifies the ranking order of results. *) 3239 - tag : string list option; (** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. *) 3240 - until : string option; (** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). *) 3241 - url : string option; (** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. *) 3242 } 3243 3244 (** Jsont codec for {!type:params}. *) ··· 3247 3248 type output = { 3249 cursor : string option; 3250 - hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 3251 - posts : Jsont.json list; 3252 } 3253 3254 (** Jsont codec for {!type:output}. *) ··· 3275 val output_jsont : output Jsont.t 3276 3277 end 3278 - module SendInteractions : sig 3279 - (** Send information about interactions with feed items back to the feed generator that served them. *) 3280 3281 - 3282 - type input = { 3283 - interactions : Jsont.json list; 3284 } 3285 3286 - (** Jsont codec for {!type:input}. *) 3287 - val input_jsont : input Jsont.t 3288 3289 3290 - type output = unit 3291 3292 (** Jsont codec for {!type:output}. *) 3293 val output_jsont : output Jsont.t 3294 3295 end 3296 - module GetAuthorFeed : sig 3297 - (** Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. *) 3298 3299 (** Query/procedure parameters. *) 3300 type params = { 3301 - actor : string; 3302 cursor : string option; 3303 - filter : string option; (** Combinations of post/repost types to include in response. *) 3304 - include_pins : bool option; 3305 limit : int option; 3306 } 3307 ··· 3318 val output_jsont : output Jsont.t 3319 3320 end 3321 - module GetFeedGenerator : sig 3322 - (** Get information about a feed generator. Implemented by AppView. *) 3323 3324 (** Query/procedure parameters. *) 3325 type params = { 3326 - feed : string; (** AT-URI of the feed generator record. *) 3327 } 3328 3329 (** Jsont codec for {!type:params}. *) ··· 3331 3332 3333 type output = { 3334 - is_online : bool; (** Indicates whether the feed generator service has been online recently, or else seems to be inactive. *) 3335 - is_valid : bool; (** Indicates whether the feed generator service is compatible with the record declaration. *) 3336 - view : Jsont.json; 3337 } 3338 3339 (** Jsont codec for {!type:output}. *) 3340 val output_jsont : output Jsont.t 3341 3342 end 3343 - module GetSuggestedFeeds : sig 3344 - (** Get a list of suggested feeds (feed generators) for the requesting account. *) 3345 3346 (** Query/procedure parameters. *) 3347 type params = { 3348 cursor : string option; 3349 limit : int option; 3350 } ··· 3355 3356 type output = { 3357 cursor : string option; 3358 - feeds : Jsont.json list; 3359 } 3360 3361 (** Jsont codec for {!type:output}. *) ··· 3385 val output_jsont : output Jsont.t 3386 3387 end 3388 - module GetPosts : sig 3389 - (** Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. *) 3390 3391 - (** Query/procedure parameters. *) 3392 - type params = { 3393 - uris : string list; (** List of post AT-URIs to return hydrated views for. *) 3394 } 3395 3396 - (** Jsont codec for {!type:params}. *) 3397 - val params_jsont : params Jsont.t 3398 3399 3400 type output = { 3401 - posts : Jsont.json list; 3402 } 3403 3404 (** Jsont codec for {!type:output}. *) 3405 val output_jsont : output Jsont.t 3406 3407 end 3408 - module GetTimeline : sig 3409 - (** Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. *) 3410 3411 (** Query/procedure parameters. *) 3412 type params = { 3413 - algorithm : string option; (** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. *) 3414 cursor : string option; 3415 limit : int option; 3416 } ··· 3421 3422 type output = { 3423 cursor : string option; 3424 - feed : Jsont.json list; 3425 } 3426 3427 (** Jsont codec for {!type:output}. *) 3428 val output_jsont : output Jsont.t 3429 3430 end 3431 - end 3432 - module Bookmark : sig 3433 - module DeleteBookmark : sig 3434 - (** Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 3435 3436 3437 type input = { 3438 - uri : string; 3439 } 3440 3441 (** Jsont codec for {!type:input}. *) 3442 val input_jsont : input Jsont.t 3443 3444 end 3445 - module CreateBookmark : sig 3446 - (** Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 3447 3448 3449 - type input = { 3450 - cid : string; 3451 - uri : string; 3452 } 3453 3454 - (** Jsont codec for {!type:input}. *) 3455 - val input_jsont : input Jsont.t 3456 3457 end 3458 - module Defs : sig 3459 3460 - type bookmark_view = { 3461 - created_at : string option; 3462 - item : Jsont.json; 3463 - subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the bookmarked record. *) 3464 } 3465 3466 - (** Jsont codec for {!type:bookmark_view}. *) 3467 - val bookmark_view_jsont : bookmark_view Jsont.t 3468 3469 - (** Object used to store bookmark data in stash. *) 3470 3471 - type bookmark = { 3472 - subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. *) 3473 } 3474 3475 - (** Jsont codec for {!type:bookmark}. *) 3476 - val bookmark_jsont : bookmark Jsont.t 3477 3478 end 3479 - module GetBookmarks : sig 3480 - (** Gets views of records bookmarked by the authenticated user. Requires authentication. *) 3481 3482 (** Query/procedure parameters. *) 3483 - type params = { 3484 - cursor : string option; 3485 - limit : int option; 3486 - } 3487 3488 (** Jsont codec for {!type:params}. *) 3489 val params_jsont : params Jsont.t 3490 3491 3492 type output = { 3493 - bookmarks : Defs.bookmark_view list; 3494 - cursor : string option; 3495 } 3496 3497 (** Jsont codec for {!type:output}. *) ··· 3500 end 3501 end 3502 module Unspecced : sig 3503 - module GetSuggestedUsersSkeleton : sig 3504 - (** Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers *) 3505 3506 - (** Query/procedure parameters. *) 3507 - type params = { 3508 - category : string option; (** Category of users to get suggestions for. *) 3509 - limit : int option; 3510 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3511 } 3512 3513 (** Jsont codec for {!type:params}. *) 3514 val params_jsont : params Jsont.t 3515 3516 3517 type output = { 3518 - dids : string list; 3519 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3520 } 3521 3522 (** Jsont codec for {!type:output}. *) 3523 val output_jsont : output Jsont.t 3524 3525 end 3526 - module GetOnboardingSuggestedStarterPacks : sig 3527 - (** Get a list of suggested starterpacks for onboarding *) 3528 3529 (** Query/procedure parameters. *) 3530 type params = { 3531 limit : int option; 3532 } 3533 3534 (** Jsont codec for {!type:params}. *) ··· 3536 3537 3538 type output = { 3539 - starter_packs : Jsont.json list; 3540 } 3541 3542 (** Jsont codec for {!type:output}. *) 3543 val output_jsont : output Jsont.t 3544 3545 end 3546 - module GetPopularFeedGenerators : sig 3547 - (** An unspecced view of globally popular feed generators. *) 3548 3549 (** Query/procedure parameters. *) 3550 type params = { 3551 - cursor : string option; 3552 limit : int option; 3553 - query : string option; 3554 } 3555 3556 (** Jsont codec for {!type:params}. *) ··· 3558 3559 3560 type output = { 3561 - cursor : string option; 3562 - feeds : Jsont.json list; 3563 } 3564 3565 (** Jsont codec for {!type:output}. *) ··· 3587 val output_jsont : output Jsont.t 3588 3589 end 3590 - module GetSuggestedFeeds : sig 3591 - (** Get a list of suggested feeds *) 3592 3593 (** Query/procedure parameters. *) 3594 type params = { ··· 3600 3601 3602 type output = { 3603 - feeds : Jsont.json list; 3604 } 3605 3606 (** Jsont codec for {!type:output}. *) ··· 3628 val output_jsont : output Jsont.t 3629 3630 end 3631 - module GetConfig : sig 3632 3633 - type live_now_config = { 3634 - did : string; 3635 - domains : string list; 3636 } 3637 3638 - (** Jsont codec for {!type:live_now_config}. *) 3639 - val live_now_config_jsont : live_now_config Jsont.t 3640 - 3641 - (** Get miscellaneous runtime configuration. *) 3642 3643 3644 type output = { 3645 - check_email_confirmed : bool option; 3646 - live_now : live_now_config list option; 3647 } 3648 3649 (** Jsont codec for {!type:output}. *) 3650 val output_jsont : output Jsont.t 3651 3652 end 3653 - module GetSuggestedStarterPacks : sig 3654 - (** Get a list of suggested starterpacks *) 3655 3656 (** Query/procedure parameters. *) 3657 type params = { 3658 limit : int option; 3659 } 3660 3661 (** Jsont codec for {!type:params}. *) ··· 3663 3664 3665 type output = { 3666 - starter_packs : Jsont.json list; 3667 } 3668 3669 (** Jsont codec for {!type:output}. *) 3670 val output_jsont : output Jsont.t 3671 3672 end 3673 - module GetSuggestedUsers : sig 3674 - (** Get a list of suggested users *) 3675 3676 (** Query/procedure parameters. *) 3677 type params = { 3678 - category : string option; (** Category of users to get suggestions for. *) 3679 limit : int option; 3680 } 3681 3682 (** Jsont codec for {!type:params}. *) ··· 3684 3685 3686 type output = { 3687 - actors : Jsont.json list; 3688 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3689 } 3690 3691 (** Jsont codec for {!type:output}. *) 3692 val output_jsont : output Jsont.t 3693 3694 end 3695 - module GetOnboardingSuggestedStarterPacksSkeleton : sig 3696 - (** Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks *) 3697 3698 (** Query/procedure parameters. *) 3699 type params = { 3700 limit : int option; 3701 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3702 } 3703 3704 (** Jsont codec for {!type:params}. *) ··· 3706 3707 3708 type output = { 3709 - starter_packs : string list; 3710 } 3711 3712 (** Jsont codec for {!type:output}. *) 3713 val output_jsont : output Jsont.t 3714 3715 end 3716 - module Defs : sig 3717 3718 - type trending_topic = { 3719 - description : string option; 3720 - display_name : string option; 3721 - link : string; 3722 - topic : string; 3723 } 3724 3725 - (** Jsont codec for {!type:trending_topic}. *) 3726 - val trending_topic_jsont : trending_topic Jsont.t 3727 3728 3729 - type trend_view = { 3730 - actors : Jsont.json list; 3731 - category : string option; 3732 - display_name : string; 3733 - link : string; 3734 - post_count : int; 3735 - started_at : string; 3736 - status : string option; 3737 - topic : string; 3738 } 3739 3740 - (** Jsont codec for {!type:trend_view}. *) 3741 - val trend_view_jsont : trend_view Jsont.t 3742 3743 3744 - type thread_item_post = { 3745 - hidden_by_threadgate : bool; (** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. *) 3746 - more_parents : bool; (** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. *) 3747 - more_replies : int; (** This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. *) 3748 - muted_by_viewer : bool; (** This is by an account muted by the viewer requesting it. *) 3749 - op_thread : bool; (** This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. *) 3750 - post : Jsont.json; 3751 } 3752 3753 - (** Jsont codec for {!type:thread_item_post}. *) 3754 - val thread_item_post_jsont : thread_item_post Jsont.t 3755 3756 3757 - type thread_item_not_found = unit 3758 3759 - (** Jsont codec for {!type:thread_item_not_found}. *) 3760 - val thread_item_not_found_jsont : thread_item_not_found Jsont.t 3761 3762 3763 - type thread_item_no_unauthenticated = unit 3764 3765 - (** Jsont codec for {!type:thread_item_no_unauthenticated}. *) 3766 - val thread_item_no_unauthenticated_jsont : thread_item_no_unauthenticated Jsont.t 3767 3768 3769 - type thread_item_blocked = { 3770 - author : Jsont.json; 3771 } 3772 3773 - (** Jsont codec for {!type:thread_item_blocked}. *) 3774 - val thread_item_blocked_jsont : thread_item_blocked Jsont.t 3775 3776 3777 type skeleton_trend = { ··· 3789 val skeleton_trend_jsont : skeleton_trend Jsont.t 3790 3791 3792 - type skeleton_search_starter_pack = { 3793 - uri : string; 3794 } 3795 3796 - (** Jsont codec for {!type:skeleton_search_starter_pack}. *) 3797 - val skeleton_search_starter_pack_jsont : skeleton_search_starter_pack Jsont.t 3798 3799 3800 - type skeleton_search_post = { 3801 - uri : string; 3802 - } 3803 3804 - (** Jsont codec for {!type:skeleton_search_post}. *) 3805 - val skeleton_search_post_jsont : skeleton_search_post Jsont.t 3806 3807 3808 - type skeleton_search_actor = { 3809 - did : string; 3810 - } 3811 3812 - (** Jsont codec for {!type:skeleton_search_actor}. *) 3813 - val skeleton_search_actor_jsont : skeleton_search_actor Jsont.t 3814 3815 - (** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. *) 3816 3817 - type age_assurance_state = { 3818 - last_initiated_at : string option; (** The timestamp when this state was last updated. *) 3819 - status : string; (** The status of the age assurance process. *) 3820 } 3821 3822 - (** Jsont codec for {!type:age_assurance_state}. *) 3823 - val age_assurance_state_jsont : age_assurance_state Jsont.t 3824 3825 - (** Object used to store age assurance data in stash. *) 3826 3827 - type age_assurance_event = { 3828 - attempt_id : string; (** The unique identifier for this instance of the age assurance flow, in UUID format. *) 3829 - complete_ip : string option; (** The IP address used when completing the AA flow. *) 3830 - complete_ua : string option; (** The user agent used when completing the AA flow. *) 3831 - created_at : string; (** The date and time of this write operation. *) 3832 - email : string option; (** The email used for AA. *) 3833 - init_ip : string option; (** The IP address used when initiating the AA flow. *) 3834 - init_ua : string option; (** The user agent used when initiating the AA flow. *) 3835 - status : string; (** The status of the age assurance process. *) 3836 } 3837 3838 - (** Jsont codec for {!type:age_assurance_event}. *) 3839 - val age_assurance_event_jsont : age_assurance_event Jsont.t 3840 3841 - end 3842 - module GetTaggedSuggestions : sig 3843 3844 - type suggestion = { 3845 - subject : string; 3846 - subject_type : string; 3847 - tag : string; 3848 } 3849 3850 - (** Jsont codec for {!type:suggestion}. *) 3851 - val suggestion_jsont : suggestion Jsont.t 3852 3853 - (** Get a list of suggestions (feeds and users) tagged with categories *) 3854 3855 (** Query/procedure parameters. *) 3856 - type params = unit 3857 3858 (** Jsont codec for {!type:params}. *) 3859 val params_jsont : params Jsont.t 3860 3861 3862 type output = { 3863 - suggestions : suggestion list; 3864 } 3865 3866 (** Jsont codec for {!type:output}. *) ··· 3901 val output_jsont : output Jsont.t 3902 3903 end 3904 - module GetPostThreadV2 : sig 3905 - 3906 - type thread_item = { 3907 - depth : int; (** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. *) 3908 - uri : string; 3909 - value : Jsont.json; 3910 - } 3911 - 3912 - (** Jsont codec for {!type:thread_item}. *) 3913 - val thread_item_jsont : thread_item Jsont.t 3914 - 3915 - (** (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. *) 3916 3917 (** Query/procedure parameters. *) 3918 type params = { 3919 - above : bool option; (** Whether to include parents above the anchor. *) 3920 - anchor : string; (** Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post. *) 3921 - below : int option; (** How many levels of replies to include below the anchor. *) 3922 - branching_factor : int option; (** Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). *) 3923 - sort : string option; (** Sorting for the thread replies. *) 3924 } 3925 3926 (** Jsont codec for {!type:params}. *) ··· 3928 3929 3930 type output = { 3931 - has_other_replies : bool; (** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. *) 3932 - thread : thread_item list; (** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. *) 3933 - threadgate : Jsont.json option; 3934 } 3935 3936 (** Jsont codec for {!type:output}. *) 3937 val output_jsont : output Jsont.t 3938 3939 end 3940 - module GetTrendingTopics : sig 3941 - (** Get a list of trending topics *) 3942 3943 - (** Query/procedure parameters. *) 3944 - type params = { 3945 - limit : int option; 3946 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3947 } 3948 3949 - (** Jsont codec for {!type:params}. *) 3950 - val params_jsont : params Jsont.t 3951 3952 3953 - type output = { 3954 - suggested : Defs.trending_topic list; 3955 - topics : Defs.trending_topic list; 3956 - } 3957 3958 (** Jsont codec for {!type:output}. *) 3959 val output_jsont : output Jsont.t ··· 3980 val output_jsont : output Jsont.t 3981 3982 end 3983 - module GetPostThreadOtherV2 : sig 3984 3985 - type thread_item = { 3986 - depth : int; (** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. *) 3987 - uri : string; 3988 - value : Defs.thread_item_post; 3989 } 3990 3991 - (** Jsont codec for {!type:thread_item}. *) 3992 - val thread_item_jsont : thread_item Jsont.t 3993 3994 - (** (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. *) 3995 3996 (** Query/procedure parameters. *) 3997 type params = { 3998 - anchor : string; (** Reference (AT-URI) to post record. This is the anchor post. *) 3999 } 4000 4001 (** Jsont codec for {!type:params}. *) ··· 4003 4004 4005 type output = { 4006 - thread : thread_item list; (** A flat list of other thread items. The depth of each item is indicated by the depth property inside the item. *) 4007 } 4008 4009 (** Jsont codec for {!type:output}. *) 4010 val output_jsont : output Jsont.t 4011 4012 end 4013 - module InitAgeAssurance : sig 4014 - (** Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. *) 4015 4016 - 4017 - type input = { 4018 - country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 4019 - email : string; (** The user's email address to receive assurance instructions. *) 4020 - language : string; (** The user's preferred language for communication during the assurance process. *) 4021 } 4022 4023 - (** Jsont codec for {!type:input}. *) 4024 - val input_jsont : input Jsont.t 4025 4026 4027 - type output = Defs.age_assurance_state 4028 4029 (** Jsont codec for {!type:output}. *) 4030 val output_jsont : output Jsont.t 4031 4032 end 4033 - module SearchStarterPacksSkeleton : sig 4034 - (** Backend Starter Pack search, returns only skeleton. *) 4035 4036 (** Query/procedure parameters. *) 4037 type params = { 4038 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4039 - limit : int option; 4040 - q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 4041 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 4042 } 4043 4044 (** Jsont codec for {!type:params}. *) ··· 4046 4047 4048 type output = { 4049 - cursor : string option; 4050 - hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 4051 - starter_packs : Defs.skeleton_search_starter_pack list; 4052 } 4053 4054 (** Jsont codec for {!type:output}. *) 4055 val output_jsont : output Jsont.t 4056 4057 end 4058 - module SearchActorsSkeleton : sig 4059 - (** Backend Actors (profile) search, returns only skeleton. *) 4060 4061 (** Query/procedure parameters. *) 4062 type params = { 4063 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4064 - limit : int option; 4065 - q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. *) 4066 - typeahead : bool option; (** If true, acts as fast/simple 'typeahead' query. *) 4067 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 4068 } 4069 4070 (** Jsont codec for {!type:params}. *) ··· 4072 4073 4074 type output = { 4075 - actors : Defs.skeleton_search_actor list; 4076 - cursor : string option; 4077 - hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 4078 } 4079 4080 (** Jsont codec for {!type:output}. *) ··· 4091 val output_jsont : output Jsont.t 4092 4093 end 4094 - module GetSuggestionsSkeleton : sig 4095 - (** Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions *) 4096 4097 - (** Query/procedure parameters. *) 4098 - type params = { 4099 - cursor : string option; 4100 - limit : int option; 4101 - relative_to_did : string option; (** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. *) 4102 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 4103 } 4104 4105 - (** Jsont codec for {!type:params}. *) 4106 - val params_jsont : params Jsont.t 4107 4108 4109 - type output = { 4110 - actors : Defs.skeleton_search_actor list; 4111 - cursor : string option; 4112 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 4113 - relative_to_did : string option; (** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. *) 4114 } 4115 4116 - (** Jsont codec for {!type:output}. *) 4117 - val output_jsont : output Jsont.t 4118 4119 end 4120 - module GetTrends : sig 4121 - (** Get the current trends on the network *) 4122 4123 (** Query/procedure parameters. *) 4124 type params = { 4125 limit : int option; 4126 } 4127 ··· 4130 4131 4132 type output = { 4133 - trends : Defs.trend_view list; 4134 } 4135 4136 (** Jsont codec for {!type:output}. *)
··· 12 13 module Com : sig 14 module Atproto : sig 15 + module Repo : sig 16 + module StrongRef : sig 17 + 18 + type main = { 19 + cid : string; 20 + uri : string; 21 + } 22 + 23 + (** Jsont codec for {!type:main}. *) 24 + val main_jsont : main Jsont.t 25 + 26 + end 27 + end 28 + module Moderation : sig 29 module Defs : sig 30 + (** Appeal a previously taken moderation action *) 31 + 32 + type reason_appeal = string 33 + val reason_appeal_jsont : reason_appeal Jsont.t 34 + 35 + (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 36 + 37 + type reason_misleading = string 38 + val reason_misleading_jsont : reason_misleading Jsont.t 39 + 40 + (** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. *) 41 + 42 + type reason_other = string 43 + val reason_other_jsont : reason_other Jsont.t 44 45 + (** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. *) 46 47 + type reason_rude = string 48 + val reason_rude_jsont : reason_rude Jsont.t 49 50 + (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 51 52 + type reason_sexual = string 53 + val reason_sexual_jsont : reason_sexual Jsont.t 54 55 + (** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. *) 56 57 + type reason_spam = string 58 + val reason_spam_jsont : reason_spam Jsont.t 59 60 + 61 + type reason_type = string 62 + val reason_type_jsont : reason_type Jsont.t 63 64 + (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 65 + 66 + type reason_violation = string 67 + val reason_violation_jsont : reason_violation Jsont.t 68 + 69 + (** Tag describing a type of subject that might be reported. *) 70 + 71 + type subject_type = string 72 + val subject_type_jsont : subject_type Jsont.t 73 + 74 + end 75 + end 76 + module Label : sig 77 + module Defs : sig 78 (** Metadata tag on an atproto resource (eg, repo or record). *) 79 80 type label = { ··· 92 (** Jsont codec for {!type:label}. *) 93 val label_jsont : label Jsont.t 94 95 + 96 + type label_value = string 97 + val label_value_jsont : label_value Jsont.t 98 + 99 + (** Strings which describe the label in the UI, localized into a specific language. *) 100 + 101 + type label_value_definition_strings = { 102 + description : string; (** A longer description of what the label means and why it might be applied. *) 103 + lang : string; (** The code of the language these strings are written in. *) 104 + name : string; (** A short human-readable name for the label. *) 105 + } 106 + 107 + (** Jsont codec for {!type:label_value_definition_strings}. *) 108 + val label_value_definition_strings_jsont : label_value_definition_strings Jsont.t 109 + 110 + (** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. *) 111 112 + type self_label = { 113 + val_ : string; (** The short string name of the value or type of this label. *) 114 } 115 116 + (** Jsont codec for {!type:self_label}. *) 117 + val self_label_jsont : self_label Jsont.t 118 119 (** Declares a label value and its expected interpretations and behaviors. *) 120 ··· 130 (** Jsont codec for {!type:label_value_definition}. *) 131 val label_value_definition_jsont : label_value_definition Jsont.t 132 133 + (** Metadata tags on an atproto record, published by the author within the record. *) 134 135 + type self_labels = { 136 + values : self_label list; 137 } 138 139 + (** Jsont codec for {!type:self_labels}. *) 140 + val self_labels_jsont : self_labels Jsont.t 141 142 end 143 end 144 + end 145 + end 146 + module App : sig 147 + module Bsky : sig 148 + module Video : sig 149 + module GetUploadLimits : sig 150 + (** Get video upload limits for the authenticated user. *) 151 152 153 + type output = { 154 + can_upload : bool; 155 + error : string option; 156 + message : string option; 157 + remaining_daily_bytes : int option; 158 + remaining_daily_videos : int option; 159 + } 160 161 + (** Jsont codec for {!type:output}. *) 162 + val output_jsont : output Jsont.t 163 164 + end 165 + module Defs : sig 166 167 + type job_status = { 168 + blob : Atp.Blob_ref.t option; 169 + did : string; 170 + error : string option; 171 + job_id : string; 172 + message : string option; 173 + progress : int option; (** Progress within the current processing state. *) 174 + state : string; (** The state of the video processing job. All values not listed as a known value indicate that the job is in process. *) 175 + } 176 177 + (** Jsont codec for {!type:job_status}. *) 178 + val job_status_jsont : job_status Jsont.t 179 180 + end 181 + module UploadVideo : sig 182 + (** Upload a video to be processed then stored on the PDS. *) 183 184 185 + type input = unit 186 + val input_jsont : input Jsont.t 187 188 189 + type output = { 190 + job_status : Defs.job_status; 191 + } 192 193 + (** Jsont codec for {!type:output}. *) 194 + val output_jsont : output Jsont.t 195 196 end 197 + module GetJobStatus : sig 198 + (** Get status details for a video processing job. *) 199 200 + (** Query/procedure parameters. *) 201 + type params = { 202 + job_id : string; 203 + } 204 205 + (** Jsont codec for {!type:params}. *) 206 + val params_jsont : params Jsont.t 207 208 209 + type output = { 210 + job_status : Defs.job_status; 211 + } 212 213 + (** Jsont codec for {!type:output}. *) 214 + val output_jsont : output Jsont.t 215 216 + end 217 end 218 module Richtext : sig 219 module Facet : sig 220 + (** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. *) 221 222 + type byte_slice = { 223 + byte_end : int; 224 + byte_start : int; 225 + } 226 + 227 + (** Jsont codec for {!type:byte_slice}. *) 228 + val byte_slice_jsont : byte_slice Jsont.t 229 + 230 + (** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. *) 231 + 232 + type link = { 233 + uri : string; 234 } 235 236 + (** Jsont codec for {!type:link}. *) 237 + val link_jsont : link Jsont.t 238 239 (** Facet feature for mention of another account. The text is usually a handle, including a '\@' prefix, but the facet reference is a DID. *) 240 ··· 245 (** Jsont codec for {!type:mention}. *) 246 val mention_jsont : mention Jsont.t 247 248 + (** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). *) 249 250 + type tag = { 251 + tag : string; 252 } 253 254 + (** Jsont codec for {!type:tag}. *) 255 + val tag_jsont : tag Jsont.t 256 257 (** Annotation of a sub-string within rich text. *) 258 ··· 266 267 end 268 end 269 + module Notification : sig 270 + module UpdateSeen : sig 271 + (** Notify server that the requesting account has seen notifications. Requires auth. *) 272 273 274 + type input = { 275 + seen_at : string; 276 + } 277 278 + (** Jsont codec for {!type:input}. *) 279 + val input_jsont : input Jsont.t 280 281 + end 282 + module UnregisterPush : sig 283 + (** The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. *) 284 285 286 + type input = { 287 + app_id : string; 288 + platform : string; 289 + service_did : string; 290 + token : string; 291 + } 292 293 + (** Jsont codec for {!type:input}. *) 294 + val input_jsont : input Jsont.t 295 + 296 + end 297 + module RegisterPush : sig 298 + (** Register to receive push notifications, via a specified service, for the requesting account. Requires auth. *) 299 + 300 + 301 + type input = { 302 + age_restricted : bool option; (** Set to true when the actor is age restricted *) 303 + app_id : string; 304 + platform : string; 305 + service_did : string; 306 + token : string; 307 + } 308 + 309 + (** Jsont codec for {!type:input}. *) 310 + val input_jsont : input Jsont.t 311 + 312 + end 313 + module PutPreferences : sig 314 + (** Set notification-related preferences for an account. Requires auth. *) 315 + 316 + 317 + type input = { 318 + priority : bool; 319 + } 320 + 321 + (** Jsont codec for {!type:input}. *) 322 + val input_jsont : input Jsont.t 323 324 + end 325 + module ListNotifications : sig 326 327 + type notification = { 328 + author : Jsont.json; 329 + cid : string; 330 + indexed_at : string; 331 + is_read : bool; 332 + labels : Com.Atproto.Label.Defs.label list option; 333 + reason : string; (** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. *) 334 + reason_subject : string option; 335 + record : Jsont.json; 336 + uri : string; 337 + } 338 339 + (** Jsont codec for {!type:notification}. *) 340 + val notification_jsont : notification Jsont.t 341 342 + (** Enumerate notifications for the requesting account. Requires auth. *) 343 + 344 + (** Query/procedure parameters. *) 345 + type params = { 346 + cursor : string option; 347 + limit : int option; 348 + priority : bool option; 349 + reasons : string list option; (** Notification reasons to include in response. *) 350 + seen_at : string option; 351 } 352 353 + (** Jsont codec for {!type:params}. *) 354 + val params_jsont : params Jsont.t 355 356 357 + type output = { 358 + cursor : string option; 359 + notifications : Jsont.json list; 360 + priority : bool option; 361 + seen_at : string option; 362 } 363 364 + (** Jsont codec for {!type:output}. *) 365 + val output_jsont : output Jsont.t 366 367 + end 368 + module ListActivitySubscriptions : sig 369 + (** Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. *) 370 371 + (** Query/procedure parameters. *) 372 + type params = { 373 + cursor : string option; 374 + limit : int option; 375 } 376 377 + (** Jsont codec for {!type:params}. *) 378 + val params_jsont : params Jsont.t 379 380 381 + type output = { 382 + cursor : string option; 383 + subscriptions : Jsont.json list; 384 + } 385 + 386 + (** Jsont codec for {!type:output}. *) 387 + val output_jsont : output Jsont.t 388 389 + end 390 + module GetUnreadCount : sig 391 + (** Count the number of unread notifications for the requesting account. Requires auth. *) 392 393 + (** Query/procedure parameters. *) 394 + type params = { 395 + priority : bool option; 396 + seen_at : string option; 397 } 398 399 + (** Jsont codec for {!type:params}. *) 400 + val params_jsont : params Jsont.t 401 402 403 + type output = { 404 + count : int; 405 } 406 407 + (** Jsont codec for {!type:output}. *) 408 + val output_jsont : output Jsont.t 409 410 + end 411 + module Defs : sig 412 413 + type activity_subscription = { 414 + post : bool; 415 + reply : bool; 416 } 417 418 + (** Jsont codec for {!type:activity_subscription}. *) 419 + val activity_subscription_jsont : activity_subscription Jsont.t 420 421 422 + type chat_preference = { 423 + include_ : string; 424 + push : bool; 425 } 426 427 + (** Jsont codec for {!type:chat_preference}. *) 428 + val chat_preference_jsont : chat_preference Jsont.t 429 430 431 + type filterable_preference = { 432 + include_ : string; 433 + list_ : bool; 434 + push : bool; 435 } 436 437 + (** Jsont codec for {!type:filterable_preference}. *) 438 + val filterable_preference_jsont : filterable_preference Jsont.t 439 440 441 + type preference = { 442 + list_ : bool; 443 + push : bool; 444 } 445 446 + (** Jsont codec for {!type:preference}. *) 447 + val preference_jsont : preference Jsont.t 448 + 449 450 + type record_deleted = unit 451 452 + (** Jsont codec for {!type:record_deleted}. *) 453 + val record_deleted_jsont : record_deleted Jsont.t 454 + 455 + 456 + type preferences = { 457 + chat : Jsont.json; 458 + follow : Jsont.json; 459 + like : Jsont.json; 460 + like_via_repost : Jsont.json; 461 + mention : Jsont.json; 462 + quote : Jsont.json; 463 + reply : Jsont.json; 464 + repost : Jsont.json; 465 + repost_via_repost : Jsont.json; 466 + starterpack_joined : Jsont.json; 467 + subscribed_post : Jsont.json; 468 + unverified : Jsont.json; 469 + verified : Jsont.json; 470 } 471 472 + (** Jsont codec for {!type:preferences}. *) 473 + val preferences_jsont : preferences Jsont.t 474 475 + (** Object used to store activity subscription data in stash. *) 476 477 + type subject_activity_subscription = { 478 + activity_subscription : Jsont.json; 479 + subject : string; 480 } 481 482 + (** Jsont codec for {!type:subject_activity_subscription}. *) 483 + val subject_activity_subscription_jsont : subject_activity_subscription Jsont.t 484 485 + end 486 + module Declaration : sig 487 + (** A declaration of the user's choices related to notifications that can be produced by them. *) 488 489 + type main = { 490 + allow_subscriptions : string; (** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. *) 491 } 492 493 + (** Jsont codec for {!type:main}. *) 494 + val main_jsont : main Jsont.t 495 496 end 497 + module PutPreferencesV2 : sig 498 + (** Set notification-related preferences for an account. Requires auth. *) 499 500 501 type input = { 502 + chat : Jsont.json option; 503 + follow : Jsont.json option; 504 + like : Jsont.json option; 505 + like_via_repost : Jsont.json option; 506 + mention : Jsont.json option; 507 + quote : Jsont.json option; 508 + reply : Jsont.json option; 509 + repost : Jsont.json option; 510 + repost_via_repost : Jsont.json option; 511 + starterpack_joined : Jsont.json option; 512 + subscribed_post : Jsont.json option; 513 + unverified : Jsont.json option; 514 + verified : Jsont.json option; 515 } 516 517 (** Jsont codec for {!type:input}. *) 518 val input_jsont : input Jsont.t 519 520 521 + type output = { 522 + preferences : Jsont.json; 523 + } 524 525 (** Jsont codec for {!type:output}. *) 526 val output_jsont : output Jsont.t 527 528 end 529 + module PutActivitySubscription : sig 530 + (** Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth. *) 531 532 + 533 + type input = { 534 + activity_subscription : Jsont.json; 535 + subject : string; 536 } 537 538 + (** Jsont codec for {!type:input}. *) 539 + val input_jsont : input Jsont.t 540 541 542 type output = { 543 + activity_subscription : Jsont.json option; 544 + subject : string; 545 } 546 547 (** Jsont codec for {!type:output}. *) 548 val output_jsont : output Jsont.t 549 550 end 551 + module GetPreferences : sig 552 + (** Get notification-related preferences for an account. Requires auth. *) 553 + 554 + (** Query/procedure parameters. *) 555 + type params = unit 556 + 557 + (** Jsont codec for {!type:params}. *) 558 + val params_jsont : params Jsont.t 559 560 561 + type output = { 562 + preferences : Jsont.json; 563 + } 564 565 (** Jsont codec for {!type:output}. *) 566 val output_jsont : output Jsont.t ··· 570 module Labeler : sig 571 module Defs : sig 572 573 type labeler_policies = { 574 label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; (** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. *) 575 label_values : Com.Atproto.Label.Defs.label_value list; (** The label values which this labeler publishes. May include global or custom labels. *) ··· 579 val labeler_policies_jsont : labeler_policies Jsont.t 580 581 582 + type labeler_viewer_state = { 583 + like : string option; 584 + } 585 + 586 + (** Jsont codec for {!type:labeler_viewer_state}. *) 587 + val labeler_viewer_state_jsont : labeler_viewer_state Jsont.t 588 + 589 + 590 + type labeler_view = { 591 + cid : string; 592 + creator : Jsont.json; 593 + indexed_at : string; 594 + labels : Com.Atproto.Label.Defs.label list option; 595 + like_count : int option; 596 + uri : string; 597 + viewer : Jsont.json option; 598 + } 599 + 600 + (** Jsont codec for {!type:labeler_view}. *) 601 + val labeler_view_jsont : labeler_view Jsont.t 602 + 603 + 604 type labeler_view_detailed = { 605 cid : string; 606 creator : Jsont.json; ··· 617 618 (** Jsont codec for {!type:labeler_view_detailed}. *) 619 val labeler_view_detailed_jsont : labeler_view_detailed Jsont.t 620 621 end 622 module Service : sig ··· 657 658 end 659 end 660 + module Embed : sig 661 + module External : sig 662 663 + type external_ = { 664 + description : string; 665 + thumb : Atp.Blob_ref.t option; 666 + title : string; 667 + uri : string; 668 } 669 670 + (** Jsont codec for {!type:external_}. *) 671 + val external__jsont : external_ Jsont.t 672 673 674 type view_external = { 675 description : string; ··· 681 (** Jsont codec for {!type:view_external}. *) 682 val view_external_jsont : view_external Jsont.t 683 684 + (** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). *) 685 686 + type main = { 687 + external_ : Jsont.json; 688 } 689 690 + (** Jsont codec for {!type:main}. *) 691 + val main_jsont : main Jsont.t 692 693 694 type view = { ··· 698 (** Jsont codec for {!type:view}. *) 699 val view_jsont : view Jsont.t 700 701 end 702 module Defs : sig 703 (** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. *) ··· 711 val aspect_ratio_jsont : aspect_ratio Jsont.t 712 713 end 714 + module Video : sig 715 716 + type caption = { 717 + file : Atp.Blob_ref.t; 718 + lang : string; 719 + } 720 + 721 + (** Jsont codec for {!type:caption}. *) 722 + val caption_jsont : caption Jsont.t 723 + 724 + 725 + type view = { 726 + alt : string option; 727 aspect_ratio : Jsont.json option; 728 + cid : string; 729 + playlist : string; 730 + thumbnail : string option; 731 } 732 733 + (** Jsont codec for {!type:view}. *) 734 + val view_jsont : view Jsont.t 735 + 736 + 737 + type main = { 738 + alt : string option; (** Alt text description of the video, for accessibility. *) 739 + aspect_ratio : Jsont.json option; 740 + captions : Jsont.json list option; 741 + video : Atp.Blob_ref.t; (** The mp4 video file. May be up to 100mb, formerly limited to 50mb. *) 742 + } 743 + 744 + (** Jsont codec for {!type:main}. *) 745 + val main_jsont : main Jsont.t 746 747 + end 748 + module Images : sig 749 750 type image = { 751 alt : string; (** Alt text description of the image, for accessibility. *) ··· 757 val image_jsont : image Jsont.t 758 759 760 + type view_image = { 761 + alt : string; (** Alt text description of the image, for accessibility. *) 762 + aspect_ratio : Jsont.json option; 763 + fullsize : string; (** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. *) 764 + thumb : string; (** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. *) 765 } 766 767 + (** Jsont codec for {!type:view_image}. *) 768 + val view_image_jsont : view_image Jsont.t 769 770 771 type main = { ··· 775 (** Jsont codec for {!type:main}. *) 776 val main_jsont : main Jsont.t 777 778 779 type view = { 780 + images : Jsont.json list; 781 } 782 783 (** Jsont codec for {!type:view}. *) 784 val view_jsont : view Jsont.t 785 786 + end 787 + module RecordWithMedia : sig 788 789 type main = { 790 + media : Jsont.json; 791 + record : Jsont.json; 792 } 793 794 (** Jsont codec for {!type:main}. *) 795 val main_jsont : main Jsont.t 796 797 798 type view = { 799 media : Jsont.json; ··· 803 (** Jsont codec for {!type:view}. *) 804 val view_jsont : view Jsont.t 805 806 + end 807 + module Record : sig 808 809 type main = { 810 + record : Com.Atproto.Repo.StrongRef.main; 811 } 812 813 (** Jsont codec for {!type:main}. *) 814 val main_jsont : main Jsont.t 815 816 817 + type view = { 818 + record : Jsont.json; 819 } 820 821 + (** Jsont codec for {!type:view}. *) 822 + val view_jsont : view Jsont.t 823 824 825 + type view_blocked = { 826 + author : Jsont.json; 827 + blocked : bool; 828 uri : string; 829 } 830 831 + (** Jsont codec for {!type:view_blocked}. *) 832 + val view_blocked_jsont : view_blocked Jsont.t 833 834 835 type view_detached = { ··· 841 val view_detached_jsont : view_detached Jsont.t 842 843 844 + type view_not_found = { 845 + not_found : bool; 846 uri : string; 847 } 848 849 + (** Jsont codec for {!type:view_not_found}. *) 850 + val view_not_found_jsont : view_not_found Jsont.t 851 852 853 + type view_record = { 854 + author : Jsont.json; 855 + cid : string; 856 + embeds : Jsont.json list option; 857 + indexed_at : string; 858 + labels : Com.Atproto.Label.Defs.label list option; 859 + like_count : int option; 860 + quote_count : int option; 861 + reply_count : int option; 862 + repost_count : int option; 863 + uri : string; 864 + value : Jsont.json; (** The record data itself. *) 865 } 866 867 + (** Jsont codec for {!type:view_record}. *) 868 + val view_record_jsont : view_record Jsont.t 869 870 end 871 end 872 + module AuthViewAll : sig 873 874 + type main = unit 875 + val main_jsont : main Jsont.t 876 877 + end 878 + module AuthManageProfile : sig 879 880 + type main = unit 881 + val main_jsont : main Jsont.t 882 883 + end 884 + module AuthManageNotifications : sig 885 886 + type main = unit 887 + val main_jsont : main Jsont.t 888 889 + end 890 + module AuthManageModeration : sig 891 892 + type main = unit 893 + val main_jsont : main Jsont.t 894 895 + end 896 + module AuthManageLabelerService : sig 897 898 + type main = unit 899 + val main_jsont : main Jsont.t 900 901 + end 902 + module AuthManageFeedDeclarations : sig 903 904 + type main = unit 905 + val main_jsont : main Jsont.t 906 907 + end 908 + module AuthFullApp : sig 909 910 + type main = unit 911 + val main_jsont : main Jsont.t 912 913 + end 914 + module AuthCreatePosts : sig 915 916 + type main = unit 917 + val main_jsont : main Jsont.t 918 919 + end 920 + module Ageassurance : sig 921 + module Defs : sig 922 + (** The access level granted based on Age Assurance data we've processed. *) 923 924 + type access = string 925 + val access_jsont : access Jsont.t 926 927 + (** The Age Assurance configuration for a specific region. *) 928 929 + type config_region = { 930 + country_code : string; (** The ISO 3166-1 alpha-2 country code this configuration applies to. *) 931 + min_access_age : int; (** The minimum age (as a whole integer) required to use Bluesky in this region. *) 932 + region_code : string option; (** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. *) 933 + rules : Jsont.json list; (** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. *) 934 } 935 936 + (** Jsont codec for {!type:config_region}. *) 937 + val config_region_jsont : config_region Jsont.t 938 939 + (** Object used to store Age Assurance data in stash. *) 940 941 + type event = { 942 + access : string; (** The access level granted based on Age Assurance data we've processed. *) 943 + attempt_id : string; (** The unique identifier for this instance of the Age Assurance flow, in UUID format. *) 944 + complete_ip : string option; (** The IP address used when completing the Age Assurance flow. *) 945 + complete_ua : string option; (** The user agent used when completing the Age Assurance flow. *) 946 + country_code : string; (** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. *) 947 + created_at : string; (** The date and time of this write operation. *) 948 + email : string option; (** The email used for Age Assurance. *) 949 + init_ip : string option; (** The IP address used when initiating the Age Assurance flow. *) 950 + init_ua : string option; (** The user agent used when initiating the Age Assurance flow. *) 951 + region_code : string option; (** The ISO 3166-2 region code provided when beginning the Age Assurance flow. *) 952 + status : string; (** The status of the Age Assurance process. *) 953 } 954 955 + (** Jsont codec for {!type:event}. *) 956 + val event_jsont : event Jsont.t 957 958 + (** Additional metadata needed to compute Age Assurance state client-side. *) 959 960 + type state_metadata = { 961 + account_created_at : string option; (** The account creation timestamp. *) 962 } 963 964 + (** Jsont codec for {!type:state_metadata}. *) 965 + val state_metadata_jsont : state_metadata Jsont.t 966 967 + (** The status of the Age Assurance process. *) 968 969 + type status = string 970 + val status_jsont : status Jsont.t 971 972 973 + type config = { 974 + regions : config_region list; (** The per-region Age Assurance configuration. *) 975 } 976 977 + (** Jsont codec for {!type:config}. *) 978 + val config_jsont : config Jsont.t 979 980 + (** Age Assurance rule that applies by default. *) 981 982 + type config_region_rule_default = { 983 + access : access; 984 } 985 986 + (** Jsont codec for {!type:config_region_rule_default}. *) 987 + val config_region_rule_default_jsont : config_region_rule_default Jsont.t 988 989 + (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 990 991 + type config_region_rule_if_account_newer_than = { 992 + access : access; 993 + date : string; (** The date threshold as a datetime string. *) 994 } 995 996 + (** Jsont codec for {!type:config_region_rule_if_account_newer_than}. *) 997 + val config_region_rule_if_account_newer_than_jsont : config_region_rule_if_account_newer_than Jsont.t 998 999 + (** Age Assurance rule that applies if the account is older than a certain date. *) 1000 1001 + type config_region_rule_if_account_older_than = { 1002 + access : access; 1003 + date : string; (** The date threshold as a datetime string. *) 1004 } 1005 1006 + (** Jsont codec for {!type:config_region_rule_if_account_older_than}. *) 1007 + val config_region_rule_if_account_older_than_jsont : config_region_rule_if_account_older_than Jsont.t 1008 1009 + (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 1010 1011 + type config_region_rule_if_assured_over_age = { 1012 + access : access; 1013 + age : int; (** The age threshold as a whole integer. *) 1014 } 1015 1016 + (** Jsont codec for {!type:config_region_rule_if_assured_over_age}. *) 1017 + val config_region_rule_if_assured_over_age_jsont : config_region_rule_if_assured_over_age Jsont.t 1018 1019 + (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 1020 1021 + type config_region_rule_if_assured_under_age = { 1022 + access : access; 1023 + age : int; (** The age threshold as a whole integer. *) 1024 } 1025 1026 + (** Jsont codec for {!type:config_region_rule_if_assured_under_age}. *) 1027 + val config_region_rule_if_assured_under_age_jsont : config_region_rule_if_assured_under_age Jsont.t 1028 1029 + (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 1030 1031 + type config_region_rule_if_declared_over_age = { 1032 + access : access; 1033 + age : int; (** The age threshold as a whole integer. *) 1034 } 1035 1036 + (** Jsont codec for {!type:config_region_rule_if_declared_over_age}. *) 1037 + val config_region_rule_if_declared_over_age_jsont : config_region_rule_if_declared_over_age Jsont.t 1038 1039 + (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 1040 1041 + type config_region_rule_if_declared_under_age = { 1042 + access : access; 1043 + age : int; (** The age threshold as a whole integer. *) 1044 } 1045 1046 + (** Jsont codec for {!type:config_region_rule_if_declared_under_age}. *) 1047 + val config_region_rule_if_declared_under_age_jsont : config_region_rule_if_declared_under_age Jsont.t 1048 1049 + (** The user's computed Age Assurance state. *) 1050 1051 + type state = { 1052 + access : access; 1053 + last_initiated_at : string option; (** The timestamp when this state was last updated. *) 1054 + status : status; 1055 } 1056 1057 + (** Jsont codec for {!type:state}. *) 1058 + val state_jsont : state Jsont.t 1059 1060 end 1061 + module GetState : sig 1062 + (** Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side. *) 1063 1064 (** Query/procedure parameters. *) 1065 + type params = { 1066 + country_code : string; 1067 + region_code : string option; 1068 + } 1069 1070 (** Jsont codec for {!type:params}. *) 1071 val params_jsont : params Jsont.t 1072 1073 1074 type output = { 1075 + metadata : Defs.state_metadata; 1076 + state : Defs.state; 1077 } 1078 1079 (** Jsont codec for {!type:output}. *) 1080 val output_jsont : output Jsont.t 1081 1082 end 1083 + module GetConfig : sig 1084 + (** Returns Age Assurance configuration for use on the client. *) 1085 1086 1087 + type output = Defs.config 1088 1089 (** Jsont codec for {!type:output}. *) 1090 val output_jsont : output Jsont.t 1091 1092 end 1093 + module Begin : sig 1094 + (** Initiate Age Assurance for an account. *) 1095 1096 1097 type input = { 1098 + country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 1099 + email : string; (** The user's email address to receive Age Assurance instructions. *) 1100 + language : string; (** The user's preferred language for communication during the Age Assurance process. *) 1101 + region_code : string option; (** An optional ISO 3166-2 code of the user's region or state within the country. *) 1102 } 1103 1104 (** Jsont codec for {!type:input}. *) 1105 val input_jsont : input Jsont.t 1106 1107 1108 + type output = Defs.state 1109 1110 (** Jsont codec for {!type:output}. *) 1111 val output_jsont : output Jsont.t ··· 1153 1154 end 1155 module Defs : sig 1156 1157 + type adult_content_pref = { 1158 + enabled : bool; 1159 } 1160 1161 + (** Jsont codec for {!type:adult_content_pref}. *) 1162 + val adult_content_pref_jsont : adult_content_pref Jsont.t 1163 1164 + (** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. *) 1165 1166 + type bsky_app_progress_guide = { 1167 + guide : string; 1168 } 1169 1170 + (** Jsont codec for {!type:bsky_app_progress_guide}. *) 1171 + val bsky_app_progress_guide_jsont : bsky_app_progress_guide Jsont.t 1172 1173 1174 + type content_label_pref = { 1175 + label : string; 1176 + labeler_did : string option; (** Which labeler does this preference apply to? If undefined, applies globally. *) 1177 + visibility : string; 1178 } 1179 1180 + (** Jsont codec for {!type:content_label_pref}. *) 1181 + val content_label_pref_jsont : content_label_pref Jsont.t 1182 1183 + (** Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. *) 1184 1185 + type declared_age_pref = { 1186 + is_over_age13 : bool option; (** Indicates if the user has declared that they are over 13 years of age. *) 1187 + is_over_age16 : bool option; (** Indicates if the user has declared that they are over 16 years of age. *) 1188 + is_over_age18 : bool option; (** Indicates if the user has declared that they are over 18 years of age. *) 1189 } 1190 1191 + (** Jsont codec for {!type:declared_age_pref}. *) 1192 + val declared_age_pref_jsont : declared_age_pref Jsont.t 1193 1194 1195 + type feed_view_pref = { 1196 + feed : string; (** The URI of the feed, or an identifier which describes the feed. *) 1197 + hide_quote_posts : bool option; (** Hide quote posts in the feed. *) 1198 + hide_replies : bool option; (** Hide replies in the feed. *) 1199 + hide_replies_by_like_count : int option; (** Hide replies in the feed if they do not have this number of likes. *) 1200 + hide_replies_by_unfollowed : bool option; (** Hide replies in the feed if they are not by followed users. *) 1201 + hide_reposts : bool option; (** Hide reposts in the feed. *) 1202 } 1203 1204 + (** Jsont codec for {!type:feed_view_pref}. *) 1205 + val feed_view_pref_jsont : feed_view_pref Jsont.t 1206 1207 1208 + type hidden_posts_pref = { 1209 + items : string list; (** A list of URIs of posts the account owner has hidden. *) 1210 } 1211 1212 + (** Jsont codec for {!type:hidden_posts_pref}. *) 1213 + val hidden_posts_pref_jsont : hidden_posts_pref Jsont.t 1214 1215 1216 + type interests_pref = { 1217 + tags : string list; (** A list of tags which describe the account owner's interests gathered during onboarding. *) 1218 } 1219 1220 + (** Jsont codec for {!type:interests_pref}. *) 1221 + val interests_pref_jsont : interests_pref Jsont.t 1222 1223 1224 + type labeler_pref_item = { 1225 + did : string; 1226 } 1227 1228 + (** Jsont codec for {!type:labeler_pref_item}. *) 1229 + val labeler_pref_item_jsont : labeler_pref_item Jsont.t 1230 1231 1232 + type muted_word_target = string 1233 + val muted_word_target_jsont : muted_word_target Jsont.t 1234 1235 + (** A new user experiences (NUX) storage object *) 1236 1237 + type nux = { 1238 + completed : bool; 1239 + data : string option; (** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. *) 1240 + expires_at : string option; (** The date and time at which the NUX will expire and should be considered completed. *) 1241 + id : string; 1242 } 1243 1244 + (** Jsont codec for {!type:nux}. *) 1245 + val nux_jsont : nux Jsont.t 1246 1247 1248 type personal_details_pref = { ··· 1252 (** Jsont codec for {!type:personal_details_pref}. *) 1253 val personal_details_pref_jsont : personal_details_pref Jsont.t 1254 1255 + (** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. *) 1256 1257 + type post_interaction_settings_pref = { 1258 + postgate_embedding_rules : Jsont.json list option; (** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 1259 + threadgate_allow_rules : Jsont.json list option; (** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. *) 1260 } 1261 1262 + (** Jsont codec for {!type:post_interaction_settings_pref}. *) 1263 + val post_interaction_settings_pref_jsont : post_interaction_settings_pref Jsont.t 1264 1265 1266 + type preferences = Jsont.json list 1267 + val preferences_jsont : preferences Jsont.t 1268 1269 1270 + type profile_associated_activity_subscription = { 1271 + allow_subscriptions : string; 1272 } 1273 1274 + (** Jsont codec for {!type:profile_associated_activity_subscription}. *) 1275 + val profile_associated_activity_subscription_jsont : profile_associated_activity_subscription Jsont.t 1276 1277 1278 + type profile_associated_chat = { 1279 + allow_incoming : string; 1280 } 1281 1282 + (** Jsont codec for {!type:profile_associated_chat}. *) 1283 + val profile_associated_chat_jsont : profile_associated_chat Jsont.t 1284 1285 1286 + type saved_feed = { 1287 + id : string; 1288 + pinned : bool; 1289 + type_ : string; 1290 + value : string; 1291 } 1292 1293 + (** Jsont codec for {!type:saved_feed}. *) 1294 + val saved_feed_jsont : saved_feed Jsont.t 1295 + 1296 + 1297 + type saved_feeds_pref = { 1298 + pinned : string list; 1299 + saved : string list; 1300 + timeline_index : int option; 1301 + } 1302 + 1303 + (** Jsont codec for {!type:saved_feeds_pref}. *) 1304 + val saved_feeds_pref_jsont : saved_feeds_pref Jsont.t 1305 1306 1307 + type status_view = { 1308 + cid : string option; 1309 + embed : Jsont.json option; (** An optional embed associated with the status. *) 1310 + expires_at : string option; (** The date when this status will expire. The application might choose to no longer return the status after expiration. *) 1311 + is_active : bool option; (** True if the status is not expired, false if it is expired. Only present if expiration was set. *) 1312 + is_disabled : bool option; (** True if the user's go-live access has been disabled by a moderator, false otherwise. *) 1313 + record : Jsont.json; 1314 + status : string; (** The status for the account. *) 1315 + uri : string option; 1316 } 1317 1318 + (** Jsont codec for {!type:status_view}. *) 1319 + val status_view_jsont : status_view Jsont.t 1320 1321 1322 + type thread_view_pref = { 1323 + sort : string option; (** Sorting mode for threads. *) 1324 } 1325 1326 + (** Jsont codec for {!type:thread_view_pref}. *) 1327 + val thread_view_pref_jsont : thread_view_pref Jsont.t 1328 1329 + (** Preferences for how verified accounts appear in the app. *) 1330 1331 + type verification_prefs = { 1332 + hide_badges : bool option; (** Hide the blue check badges for verified accounts and trusted verifiers. *) 1333 } 1334 1335 + (** Jsont codec for {!type:verification_prefs}. *) 1336 + val verification_prefs_jsont : verification_prefs Jsont.t 1337 1338 + (** An individual verification for an associated subject. *) 1339 1340 + type verification_view = { 1341 + created_at : string; (** Timestamp when the verification was created. *) 1342 + is_valid : bool; (** True if the verification passes validation, otherwise false. *) 1343 + issuer : string; (** The user who issued this verification. *) 1344 + uri : string; (** The AT-URI of the verification record. *) 1345 } 1346 1347 + (** Jsont codec for {!type:verification_view}. *) 1348 + val verification_view_jsont : verification_view Jsont.t 1349 1350 + (** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. *) 1351 1352 + type bsky_app_state_pref = { 1353 + active_progress_guide : Jsont.json option; 1354 + nuxs : Jsont.json list option; (** Storage for NUXs the user has encountered. *) 1355 + queued_nudges : string list option; (** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. *) 1356 } 1357 1358 + (** Jsont codec for {!type:bsky_app_state_pref}. *) 1359 + val bsky_app_state_pref_jsont : bsky_app_state_pref Jsont.t 1360 1361 1362 + type labelers_pref = { 1363 + labelers : Jsont.json list; 1364 } 1365 1366 + (** Jsont codec for {!type:labelers_pref}. *) 1367 + val labelers_pref_jsont : labelers_pref Jsont.t 1368 1369 + (** A word that the account owner has muted. *) 1370 1371 + type muted_word = { 1372 + actor_target : string option; (** Groups of users to apply the muted word to. If undefined, applies to all users. *) 1373 + expires_at : string option; (** The date and time at which the muted word will expire and no longer be applied. *) 1374 + id : string option; 1375 + targets : Jsont.json list; (** The intended targets of the muted word. *) 1376 + value : string; (** The muted word itself. *) 1377 } 1378 1379 + (** Jsont codec for {!type:muted_word}. *) 1380 + val muted_word_jsont : muted_word Jsont.t 1381 1382 1383 type profile_associated = { ··· 1392 (** Jsont codec for {!type:profile_associated}. *) 1393 val profile_associated_jsont : profile_associated Jsont.t 1394 1395 1396 + type saved_feeds_pref_v2 = { 1397 + items : Jsont.json list; 1398 } 1399 1400 + (** Jsont codec for {!type:saved_feeds_pref_v2}. *) 1401 + val saved_feeds_pref_v2_jsont : saved_feeds_pref_v2 Jsont.t 1402 1403 + (** Represents the verification information about the user this object is attached to. *) 1404 1405 + type verification_state = { 1406 + trusted_verifier_status : string; (** The user's status as a trusted verifier. *) 1407 + verifications : Jsont.json list; (** All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. *) 1408 + verified_status : string; (** The user's status as a verified account. *) 1409 } 1410 1411 + (** Jsont codec for {!type:verification_state}. *) 1412 + val verification_state_jsont : verification_state Jsont.t 1413 1414 1415 type muted_words_pref = { ··· 1419 (** Jsont codec for {!type:muted_words_pref}. *) 1420 val muted_words_pref_jsont : muted_words_pref Jsont.t 1421 1422 + (** The subject's followers whom you also follow *) 1423 1424 + type known_followers = { 1425 + count : int; 1426 + followers : Jsont.json list; 1427 } 1428 1429 + (** Jsont codec for {!type:known_followers}. *) 1430 + val known_followers_jsont : known_followers Jsont.t 1431 1432 1433 + type profile_view = { 1434 associated : Jsont.json option; 1435 avatar : string option; 1436 created_at : string option; 1437 debug : Jsont.json option; (** Debug information for internal development *) 1438 description : string option; 1439 did : string; 1440 display_name : string option; 1441 handle : string; 1442 indexed_at : string option; 1443 labels : Com.Atproto.Label.Defs.label list option; 1444 pronouns : string option; 1445 status : Jsont.json option; 1446 verification : Jsont.json option; 1447 viewer : Jsont.json option; 1448 } 1449 1450 + (** Jsont codec for {!type:profile_view}. *) 1451 + val profile_view_jsont : profile_view Jsont.t 1452 1453 1454 type profile_view_basic = { ··· 1470 val profile_view_basic_jsont : profile_view_basic Jsont.t 1471 1472 1473 + type profile_view_detailed = { 1474 associated : Jsont.json option; 1475 avatar : string option; 1476 + banner : string option; 1477 created_at : string option; 1478 debug : Jsont.json option; (** Debug information for internal development *) 1479 description : string option; 1480 did : string; 1481 display_name : string option; 1482 + followers_count : int option; 1483 + follows_count : int option; 1484 handle : string; 1485 indexed_at : string option; 1486 + joined_via_starter_pack : Jsont.json option; 1487 labels : Com.Atproto.Label.Defs.label list option; 1488 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1489 + posts_count : int option; 1490 pronouns : string option; 1491 status : Jsont.json option; 1492 verification : Jsont.json option; 1493 viewer : Jsont.json option; 1494 + website : string option; 1495 } 1496 1497 + (** Jsont codec for {!type:profile_view_detailed}. *) 1498 + val profile_view_detailed_jsont : profile_view_detailed Jsont.t 1499 1500 + (** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. *) 1501 1502 + type viewer_state = { 1503 + activity_subscription : Jsont.json option; (** This property is present only in selected cases, as an optimization. *) 1504 + blocked_by : bool option; 1505 + blocking : string option; 1506 + blocking_by_list : Jsont.json option; 1507 + followed_by : string option; 1508 + following : string option; 1509 + known_followers : Jsont.json option; (** This property is present only in selected cases, as an optimization. *) 1510 + muted : bool option; 1511 + muted_by_list : Jsont.json option; 1512 } 1513 1514 + (** Jsont codec for {!type:viewer_state}. *) 1515 + val viewer_state_jsont : viewer_state Jsont.t 1516 1517 end 1518 module SearchActorsTypeahead : sig ··· 1537 val output_jsont : output Jsont.t 1538 1539 end 1540 module SearchActors : sig 1541 (** Find actors (profiles) matching search criteria. Does not require auth. *) 1542 ··· 1561 val output_jsont : output Jsont.t 1562 1563 end 1564 + module PutPreferences : sig 1565 + (** Set the private preferences attached to the account. *) 1566 + 1567 + 1568 + type input = { 1569 + preferences : Jsont.json; 1570 + } 1571 + 1572 + (** Jsont codec for {!type:input}. *) 1573 + val input_jsont : input Jsont.t 1574 + 1575 + end 1576 module GetSuggestions : sig 1577 (** Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. *) 1578 ··· 1616 val output_jsont : output Jsont.t 1617 1618 end 1619 + module GetProfile : sig 1620 + (** Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. *) 1621 1622 + (** Query/procedure parameters. *) 1623 + type params = { 1624 + actor : string; (** Handle or DID of account to fetch profile of. *) 1625 } 1626 1627 + (** Jsont codec for {!type:params}. *) 1628 + val params_jsont : params Jsont.t 1629 1630 1631 + type output = Jsont.json 1632 1633 (** Jsont codec for {!type:output}. *) 1634 val output_jsont : output Jsont.t 1635 1636 end 1637 + module GetPreferences : sig 1638 + (** Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. *) 1639 1640 (** Query/procedure parameters. *) 1641 + type params = unit 1642 1643 (** Jsont codec for {!type:params}. *) 1644 val params_jsont : params Jsont.t 1645 1646 1647 type output = { 1648 + preferences : Jsont.json; 1649 } 1650 1651 (** Jsont codec for {!type:output}. *) 1652 val output_jsont : output Jsont.t 1653 1654 end 1655 + end 1656 + module Graph : sig 1657 + module Verification : sig 1658 + (** Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. *) 1659 1660 + type main = { 1661 + created_at : string; (** Date of when the verification was created. *) 1662 + display_name : string; (** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. *) 1663 + handle : string; (** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. *) 1664 + subject : string; (** DID of the subject the verification applies to. *) 1665 } 1666 1667 + (** Jsont codec for {!type:main}. *) 1668 + val main_jsont : main Jsont.t 1669 1670 end 1671 + module UnmuteThread : sig 1672 + (** Unmutes the specified thread. Requires auth. *) 1673 1674 1675 type input = { 1676 + root : string; 1677 } 1678 1679 (** Jsont codec for {!type:input}. *) 1680 val input_jsont : input Jsont.t 1681 1682 end 1683 + module UnmuteActorList : sig 1684 + (** Unmutes the specified list of accounts. Requires auth. *) 1685 1686 1687 type input = { 1688 + list_ : string; 1689 } 1690 1691 (** Jsont codec for {!type:input}. *) 1692 val input_jsont : input Jsont.t 1693 1694 end 1695 + module UnmuteActor : sig 1696 + (** Unmutes the specified account. Requires auth. *) 1697 1698 1699 type input = { 1700 + actor : string; 1701 } 1702 1703 (** Jsont codec for {!type:input}. *) 1704 val input_jsont : input Jsont.t 1705 1706 end 1707 module Starterpack : sig 1708 1709 type feed_item = { ··· 1728 val main_jsont : main Jsont.t 1729 1730 end 1731 + module MuteThread : sig 1732 + (** Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. *) 1733 1734 1735 + type input = { 1736 + root : string; 1737 } 1738 1739 + (** Jsont codec for {!type:input}. *) 1740 + val input_jsont : input Jsont.t 1741 1742 end 1743 + module MuteActorList : sig 1744 + (** Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. *) 1745 1746 + 1747 + type input = { 1748 + list_ : string; 1749 } 1750 1751 + (** Jsont codec for {!type:input}. *) 1752 + val input_jsont : input Jsont.t 1753 1754 + end 1755 + module MuteActor : sig 1756 + (** Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. *) 1757 1758 + 1759 + type input = { 1760 + actor : string; 1761 } 1762 1763 + (** Jsont codec for {!type:input}. *) 1764 + val input_jsont : input Jsont.t 1765 1766 end 1767 + module Listitem : sig 1768 + (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 1769 1770 type main = { 1771 created_at : string; 1772 + list_ : string; (** Reference (AT-URI) to the list record (app.bsky.graph.list). *) 1773 + subject : string; (** The account which is included on the list. *) 1774 } 1775 1776 (** Jsont codec for {!type:main}. *) ··· 1789 val main_jsont : main Jsont.t 1790 1791 end 1792 + module GetSuggestedFollowsByActor : sig 1793 + (** Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. *) 1794 + 1795 + (** Query/procedure parameters. *) 1796 + type params = { 1797 + actor : string; 1798 + } 1799 + 1800 + (** Jsont codec for {!type:params}. *) 1801 + val params_jsont : params Jsont.t 1802 1803 1804 + type output = { 1805 + is_fallback : bool option; (** If true, response has fallen-back to generic results, and is not scoped using relativeToDid *) 1806 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1807 + suggestions : Jsont.json list; 1808 } 1809 1810 + (** Jsont codec for {!type:output}. *) 1811 + val output_jsont : output Jsont.t 1812 1813 end 1814 + module GetMutes : sig 1815 + (** Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. *) 1816 1817 (** Query/procedure parameters. *) 1818 type params = { 1819 cursor : string option; 1820 limit : int option; 1821 } ··· 1826 1827 type output = { 1828 cursor : string option; 1829 + mutes : Jsont.json list; 1830 } 1831 1832 (** Jsont codec for {!type:output}. *) 1833 val output_jsont : output Jsont.t 1834 1835 end 1836 + module GetKnownFollowers : sig 1837 + (** Enumerates accounts which follow a specified account (actor) and are followed by the viewer. *) 1838 1839 + (** Query/procedure parameters. *) 1840 + type params = { 1841 + actor : string; 1842 + cursor : string option; 1843 + limit : int option; 1844 } 1845 1846 + (** Jsont codec for {!type:params}. *) 1847 + val params_jsont : params Jsont.t 1848 1849 1850 + type output = { 1851 + cursor : string option; 1852 + followers : Jsont.json list; 1853 + subject : Jsont.json; 1854 } 1855 1856 + (** Jsont codec for {!type:output}. *) 1857 + val output_jsont : output Jsont.t 1858 1859 end 1860 + module GetFollows : sig 1861 + (** Enumerates accounts which a specified account (actor) follows. *) 1862 1863 + (** Query/procedure parameters. *) 1864 + type params = { 1865 actor : string; 1866 + cursor : string option; 1867 + limit : int option; 1868 } 1869 1870 + (** Jsont codec for {!type:params}. *) 1871 + val params_jsont : params Jsont.t 1872 1873 1874 + type output = { 1875 + cursor : string option; 1876 + follows : Jsont.json list; 1877 + subject : Jsont.json; 1878 } 1879 1880 + (** Jsont codec for {!type:output}. *) 1881 + val output_jsont : output Jsont.t 1882 1883 end 1884 + module GetFollowers : sig 1885 + (** Enumerates accounts which follow a specified account (actor). *) 1886 1887 (** Query/procedure parameters. *) 1888 type params = { ··· 1905 val output_jsont : output Jsont.t 1906 1907 end 1908 + module GetBlocks : sig 1909 + (** Enumerates which accounts the requesting account is currently blocking. Requires auth. *) 1910 + 1911 + (** Query/procedure parameters. *) 1912 + type params = { 1913 + cursor : string option; 1914 + limit : int option; 1915 + } 1916 1917 + (** Jsont codec for {!type:params}. *) 1918 + val params_jsont : params Jsont.t 1919 1920 + 1921 + type output = { 1922 + blocks : Jsont.json list; 1923 + cursor : string option; 1924 } 1925 1926 + (** Jsont codec for {!type:output}. *) 1927 + val output_jsont : output Jsont.t 1928 1929 end 1930 + module Follow : sig 1931 + (** Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. *) 1932 1933 type main = { 1934 created_at : string; 1935 + subject : string; 1936 + via : Com.Atproto.Repo.StrongRef.main option; 1937 } 1938 1939 (** Jsont codec for {!type:main}. *) ··· 1941 1942 end 1943 module Defs : sig 1944 + (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 1945 1946 + type curatelist = string 1947 + val curatelist_jsont : curatelist Jsont.t 1948 + 1949 + 1950 + type list_item_view = { 1951 + subject : Jsont.json; 1952 uri : string; 1953 } 1954 1955 + (** Jsont codec for {!type:list_item_view}. *) 1956 + val list_item_view_jsont : list_item_view Jsont.t 1957 1958 + 1959 + type list_purpose = string 1960 + val list_purpose_jsont : list_purpose Jsont.t 1961 + 1962 1963 + type list_viewer_state = { 1964 + blocked : string option; 1965 + muted : bool option; 1966 } 1967 1968 + (** Jsont codec for {!type:list_viewer_state}. *) 1969 + val list_viewer_state_jsont : list_viewer_state Jsont.t 1970 1971 + (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 1972 1973 + type modlist = string 1974 + val modlist_jsont : modlist Jsont.t 1975 1976 (** indicates that a handle or DID could not be resolved *) 1977 ··· 1983 (** Jsont codec for {!type:not_found_actor}. *) 1984 val not_found_actor_jsont : not_found_actor Jsont.t 1985 1986 + (** A list of actors used for only for reference purposes such as within a starter pack. *) 1987 1988 + type referencelist = string 1989 + val referencelist_jsont : referencelist Jsont.t 1990 1991 + (** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) *) 1992 1993 + type relationship = { 1994 + blocked_by : string option; (** if the actor is blocked by this DID, contains the AT-URI of the block record *) 1995 + blocked_by_list : string option; (** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record *) 1996 + blocking : string option; (** if the actor blocks this DID, this is the AT-URI of the block record *) 1997 + blocking_by_list : string option; (** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record *) 1998 + did : string; 1999 + followed_by : string option; (** if the actor is followed by this DID, contains the AT-URI of the follow record *) 2000 + following : string option; (** if the actor follows this DID, this is the AT-URI of the follow record *) 2001 } 2002 2003 + (** Jsont codec for {!type:relationship}. *) 2004 + val relationship_jsont : relationship Jsont.t 2005 2006 2007 + type starter_pack_view_basic = { 2008 + cid : string; 2009 + creator : Jsont.json; 2010 + indexed_at : string; 2011 + joined_all_time_count : int option; 2012 + joined_week_count : int option; 2013 + labels : Com.Atproto.Label.Defs.label list option; 2014 + list_item_count : int option; 2015 + record : Jsont.json; 2016 uri : string; 2017 } 2018 2019 + (** Jsont codec for {!type:starter_pack_view_basic}. *) 2020 + val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 2021 2022 2023 + type list_view = { 2024 avatar : string option; 2025 cid : string; 2026 + creator : Jsont.json; 2027 + description : string option; 2028 + description_facets : Richtext.Facet.main list option; 2029 + indexed_at : string; 2030 labels : Com.Atproto.Label.Defs.label list option; 2031 list_item_count : int option; 2032 name : string; ··· 2035 viewer : Jsont.json option; 2036 } 2037 2038 + (** Jsont codec for {!type:list_view}. *) 2039 + val list_view_jsont : list_view Jsont.t 2040 2041 2042 + type list_view_basic = { 2043 avatar : string option; 2044 cid : string; 2045 + indexed_at : string option; 2046 labels : Com.Atproto.Label.Defs.label list option; 2047 list_item_count : int option; 2048 name : string; ··· 2051 viewer : Jsont.json option; 2052 } 2053 2054 + (** Jsont codec for {!type:list_view_basic}. *) 2055 + val list_view_basic_jsont : list_view_basic Jsont.t 2056 2057 2058 type starter_pack_view = { ··· 2073 val starter_pack_view_jsont : starter_pack_view Jsont.t 2074 2075 end 2076 + module Block : sig 2077 + (** Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. *) 2078 + 2079 + type main = { 2080 + created_at : string; 2081 + subject : string; (** DID of the account to be blocked. *) 2082 + } 2083 + 2084 + (** Jsont codec for {!type:main}. *) 2085 + val main_jsont : main Jsont.t 2086 + 2087 + end 2088 + module SearchStarterPacks : sig 2089 + (** Find starter packs matching search criteria. Does not require auth. *) 2090 2091 (** Query/procedure parameters. *) 2092 type params = { 2093 cursor : string option; 2094 limit : int option; 2095 + q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2096 } 2097 2098 (** Jsont codec for {!type:params}. *) ··· 2100 2101 2102 type output = { 2103 cursor : string option; 2104 + starter_packs : Jsont.json list; 2105 } 2106 2107 (** Jsont codec for {!type:output}. *) 2108 val output_jsont : output Jsont.t 2109 2110 end 2111 + module List : sig 2112 + (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 2113 2114 type main = { 2115 + avatar : Atp.Blob_ref.t option; 2116 + created_at : string; 2117 + description : string option; 2118 + description_facets : Richtext.Facet.main list option; 2119 + labels : Com.Atproto.Label.Defs.self_labels option; 2120 + name : string; (** Display name for list; can not be empty. *) 2121 + purpose : Jsont.json; (** Defines the purpose of the list (aka, moderation-oriented or curration-oriented) *) 2122 } 2123 2124 (** Jsont codec for {!type:main}. *) 2125 val main_jsont : main Jsont.t 2126 2127 end 2128 + module GetStarterPacksWithMembership : sig 2129 + (** A starter pack and an optional list item indicating membership of a target user to that starter pack. *) 2130 + 2131 + type starter_pack_with_membership = { 2132 + list_item : Jsont.json option; 2133 + starter_pack : Jsont.json; 2134 + } 2135 + 2136 + (** Jsont codec for {!type:starter_pack_with_membership}. *) 2137 + val starter_pack_with_membership_jsont : starter_pack_with_membership Jsont.t 2138 + 2139 + (** Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. *) 2140 2141 (** Query/procedure parameters. *) 2142 type params = { 2143 + actor : string; (** The account (actor) to check for membership. *) 2144 cursor : string option; 2145 limit : int option; 2146 } ··· 2151 2152 type output = { 2153 cursor : string option; 2154 + starter_packs_with_membership : Jsont.json list; 2155 } 2156 2157 (** Jsont codec for {!type:output}. *) 2158 val output_jsont : output Jsont.t 2159 2160 end 2161 + module GetStarterPacks : sig 2162 + (** Get views for a list of starter packs. *) 2163 2164 (** Query/procedure parameters. *) 2165 type params = { 2166 + uris : string list; 2167 } 2168 2169 (** Jsont codec for {!type:params}. *) ··· 2171 2172 2173 type output = { 2174 + starter_packs : Jsont.json list; 2175 } 2176 2177 (** Jsont codec for {!type:output}. *) 2178 val output_jsont : output Jsont.t 2179 2180 end 2181 + module GetStarterPack : sig 2182 + (** Gets a view of a starter pack. *) 2183 2184 (** Query/procedure parameters. *) 2185 type params = { 2186 + starter_pack : string; (** Reference (AT-URI) of the starter pack record. *) 2187 } 2188 2189 (** Jsont codec for {!type:params}. *) ··· 2191 2192 2193 type output = { 2194 + starter_pack : Jsont.json; 2195 } 2196 2197 (** Jsont codec for {!type:output}. *) 2198 val output_jsont : output Jsont.t 2199 2200 end 2201 + module GetRelationships : sig 2202 + (** Enumerates public relationships between one account, and a list of other accounts. Does not require auth. *) 2203 2204 (** Query/procedure parameters. *) 2205 type params = { 2206 + actor : string; (** Primary account requesting relationships for. *) 2207 + others : string list option; (** List of 'other' accounts to be related back to the primary. *) 2208 } 2209 2210 (** Jsont codec for {!type:params}. *) ··· 2212 2213 2214 type output = { 2215 + actor : string option; 2216 + relationships : Jsont.json list; 2217 } 2218 2219 (** Jsont codec for {!type:output}. *) 2220 val output_jsont : output Jsont.t 2221 2222 end 2223 + module GetListsWithMembership : sig 2224 + (** A list and an optional list item indicating membership of a target user to that list. *) 2225 2226 + type list_with_membership = { 2227 + list_ : Jsont.json; 2228 + list_item : Jsont.json option; 2229 } 2230 2231 + (** Jsont codec for {!type:list_with_membership}. *) 2232 + val list_with_membership_jsont : list_with_membership Jsont.t 2233 2234 + (** 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. *) 2235 2236 (** Query/procedure parameters. *) 2237 type params = { 2238 + actor : string; (** The account (actor) to check for membership. *) 2239 cursor : string option; 2240 limit : int option; 2241 + purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2242 } 2243 2244 (** Jsont codec for {!type:params}. *) ··· 2247 2248 type output = { 2249 cursor : string option; 2250 + lists_with_membership : Jsont.json list; 2251 } 2252 2253 (** Jsont codec for {!type:output}. *) 2254 val output_jsont : output Jsont.t 2255 2256 end 2257 + module GetLists : sig 2258 + (** Enumerates the lists created by a specified account (actor). *) 2259 2260 (** Query/procedure parameters. *) 2261 type params = { 2262 + actor : string; (** The account (actor) to enumerate lists from. *) 2263 cursor : string option; 2264 limit : int option; 2265 + purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2266 } 2267 2268 (** Jsont codec for {!type:params}. *) ··· 2271 2272 type output = { 2273 cursor : string option; 2274 + lists : Jsont.json list; 2275 } 2276 2277 (** Jsont codec for {!type:output}. *) 2278 val output_jsont : output Jsont.t 2279 2280 end 2281 + module GetListMutes : sig 2282 + (** Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. *) 2283 2284 (** Query/procedure parameters. *) 2285 type params = { ··· 2300 val output_jsont : output Jsont.t 2301 2302 end 2303 + module GetListBlocks : sig 2304 + (** Get mod lists that the requesting account (actor) is blocking. Requires auth. *) 2305 2306 (** Query/procedure parameters. *) 2307 type params = { 2308 + cursor : string option; 2309 + limit : int option; 2310 } 2311 2312 (** Jsont codec for {!type:params}. *) ··· 2314 2315 2316 type output = { 2317 + cursor : string option; 2318 + lists : Jsont.json list; 2319 } 2320 2321 (** Jsont codec for {!type:output}. *) 2322 val output_jsont : output Jsont.t 2323 2324 end 2325 + module GetList : sig 2326 + (** Gets a 'view' (with additional context) of a specified list. *) 2327 2328 (** Query/procedure parameters. *) 2329 type params = { 2330 cursor : string option; 2331 limit : int option; 2332 + list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 2333 } 2334 2335 (** Jsont codec for {!type:params}. *) ··· 2338 2339 type output = { 2340 cursor : string option; 2341 + items : Jsont.json list; 2342 + list_ : Jsont.json; 2343 } 2344 2345 (** Jsont codec for {!type:output}. *) 2346 val output_jsont : output Jsont.t 2347 2348 end 2349 + module GetActorStarterPacks : sig 2350 + (** Get a list of starter packs created by the actor. *) 2351 2352 (** Query/procedure parameters. *) 2353 type params = { 2354 + actor : string; 2355 cursor : string option; 2356 limit : int option; 2357 } ··· 2362 2363 type output = { 2364 cursor : string option; 2365 + starter_packs : Jsont.json list; 2366 } 2367 2368 (** Jsont codec for {!type:output}. *) 2369 val output_jsont : output Jsont.t 2370 2371 end 2372 + end 2373 + module Feed : sig 2374 + module Threadgate : sig 2375 + (** Allow replies from actors who follow you. *) 2376 + 2377 + type follower_rule = unit 2378 + 2379 + (** Jsont codec for {!type:follower_rule}. *) 2380 + val follower_rule_jsont : follower_rule Jsont.t 2381 + 2382 + (** Allow replies from actors you follow. *) 2383 + 2384 + type following_rule = unit 2385 2386 + (** Jsont codec for {!type:following_rule}. *) 2387 + val following_rule_jsont : following_rule Jsont.t 2388 + 2389 + (** Allow replies from actors on a list. *) 2390 + 2391 + type list_rule = { 2392 + list_ : string; 2393 } 2394 2395 + (** Jsont codec for {!type:list_rule}. *) 2396 + val list_rule_jsont : list_rule Jsont.t 2397 2398 + (** Allow replies from actors mentioned in your post. *) 2399 2400 + type mention_rule = unit 2401 2402 + (** Jsont codec for {!type:mention_rule}. *) 2403 + val mention_rule_jsont : mention_rule Jsont.t 2404 2405 + (** Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. *) 2406 2407 + type main = { 2408 + allow : Jsont.json list option; (** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. *) 2409 + created_at : string; 2410 + hidden_replies : string list option; (** List of hidden reply URIs. *) 2411 + post : string; (** Reference (AT-URI) to the post record. *) 2412 } 2413 2414 + (** Jsont codec for {!type:main}. *) 2415 + val main_jsont : main Jsont.t 2416 2417 + end 2418 + module Repost : sig 2419 + (** Record representing a 'repost' of an existing Bluesky post. *) 2420 2421 + type main = { 2422 + created_at : string; 2423 + subject : Com.Atproto.Repo.StrongRef.main; 2424 + via : Com.Atproto.Repo.StrongRef.main option; 2425 } 2426 2427 + (** Jsont codec for {!type:main}. *) 2428 + val main_jsont : main Jsont.t 2429 2430 end 2431 + module Postgate : sig 2432 + (** Disables embedding of this post. *) 2433 + 2434 + type disable_rule = unit 2435 + 2436 + (** Jsont codec for {!type:disable_rule}. *) 2437 + val disable_rule_jsont : disable_rule Jsont.t 2438 + 2439 + (** Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. *) 2440 2441 + type main = { 2442 + created_at : string; 2443 + detached_embedding_uris : string list option; (** List of AT-URIs embedding this post that the author has detached from. *) 2444 + embedding_rules : Jsont.json list option; (** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 2445 + post : string; (** Reference (AT-URI) to the post record. *) 2446 } 2447 2448 + (** Jsont codec for {!type:main}. *) 2449 + val main_jsont : main Jsont.t 2450 2451 + end 2452 + module Post : sig 2453 2454 type reply_ref = { 2455 parent : Com.Atproto.Repo.StrongRef.main; ··· 2459 (** Jsont codec for {!type:reply_ref}. *) 2460 val reply_ref_jsont : reply_ref Jsont.t 2461 2462 + (** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. *) 2463 + 2464 + type text_slice = { 2465 + end_ : int; 2466 + start : int; 2467 + } 2468 + 2469 + (** Jsont codec for {!type:text_slice}. *) 2470 + val text_slice_jsont : text_slice Jsont.t 2471 + 2472 (** Deprecated: use facets instead. *) 2473 2474 type entity = { ··· 2498 val main_jsont : main Jsont.t 2499 2500 end 2501 + module Like : sig 2502 + (** Record declaring a 'like' of a piece of subject content. *) 2503 2504 + type main = { 2505 created_at : string; 2506 + subject : Com.Atproto.Repo.StrongRef.main; 2507 + via : Com.Atproto.Repo.StrongRef.main option; 2508 } 2509 2510 + (** Jsont codec for {!type:main}. *) 2511 + val main_jsont : main Jsont.t 2512 2513 + end 2514 + module GetRepostedBy : sig 2515 + (** Get a list of reposts for a given post. *) 2516 2517 (** Query/procedure parameters. *) 2518 type params = { 2519 + cid : string option; (** If supplied, filters to reposts of specific version (by CID) of the post record. *) 2520 cursor : string option; 2521 limit : int option; 2522 + uri : string; (** Reference (AT-URI) of post record *) 2523 } 2524 2525 (** Jsont codec for {!type:params}. *) ··· 2529 type output = { 2530 cid : string option; 2531 cursor : string option; 2532 + reposted_by : Jsont.json list; 2533 uri : string; 2534 } 2535 ··· 2537 val output_jsont : output Jsont.t 2538 2539 end 2540 + module GetLikes : sig 2541 2542 + type like = { 2543 + actor : Jsont.json; 2544 created_at : string; 2545 + indexed_at : string; 2546 } 2547 2548 + (** Jsont codec for {!type:like}. *) 2549 + val like_jsont : like Jsont.t 2550 2551 + (** Get like records which reference a subject (by AT-URI and CID). *) 2552 2553 (** Query/procedure parameters. *) 2554 type params = { 2555 + cid : string option; (** CID of the subject record (aka, specific version of record), to filter likes. *) 2556 cursor : string option; 2557 limit : int option; 2558 + uri : string; (** AT-URI of the subject (eg, a post record). *) 2559 } 2560 2561 (** Jsont codec for {!type:params}. *) ··· 2565 type output = { 2566 cid : string option; 2567 cursor : string option; 2568 + likes : Jsont.json list; 2569 uri : string; 2570 } 2571 ··· 2573 val output_jsont : output Jsont.t 2574 2575 end 2576 + module Generator : sig 2577 + (** Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. *) 2578 2579 + type main = { 2580 + accepts_interactions : bool option; (** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions *) 2581 + avatar : Atp.Blob_ref.t option; 2582 + content_mode : string option; 2583 + created_at : string; 2584 + description : string option; 2585 + description_facets : Richtext.Facet.main list option; 2586 + did : string; 2587 + display_name : string; 2588 + labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values *) 2589 } 2590 2591 + (** Jsont codec for {!type:main}. *) 2592 + val main_jsont : main Jsont.t 2593 2594 + end 2595 + module DescribeFeedGenerator : sig 2596 2597 type feed = { 2598 uri : string; ··· 2601 (** Jsont codec for {!type:feed}. *) 2602 val feed_jsont : feed Jsont.t 2603 2604 + 2605 + type links = { 2606 + privacy_policy : string option; 2607 + terms_of_service : string option; 2608 + } 2609 + 2610 + (** Jsont codec for {!type:links}. *) 2611 + val links_jsont : links Jsont.t 2612 + 2613 (** Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). *) 2614 2615 ··· 2623 val output_jsont : output Jsont.t 2624 2625 end 2626 + module Defs : sig 2627 2628 + type blocked_author = { 2629 + did : string; 2630 + viewer : Jsont.json option; 2631 } 2632 2633 + (** Jsont codec for {!type:blocked_author}. *) 2634 + val blocked_author_jsont : blocked_author Jsont.t 2635 2636 + (** User clicked through to the author of the feed item *) 2637 2638 + type clickthrough_author = string 2639 + val clickthrough_author_jsont : clickthrough_author Jsont.t 2640 2641 + (** User clicked through to the embedded content of the feed item *) 2642 2643 + type clickthrough_embed = string 2644 + val clickthrough_embed_jsont : clickthrough_embed Jsont.t 2645 2646 + (** User clicked through to the feed item *) 2647 2648 + type clickthrough_item = string 2649 + val clickthrough_item_jsont : clickthrough_item Jsont.t 2650 2651 + (** User clicked through to the reposter of the feed item *) 2652 2653 + type clickthrough_reposter = string 2654 + val clickthrough_reposter_jsont : clickthrough_reposter Jsont.t 2655 2656 + (** Declares the feed generator returns any types of posts. *) 2657 2658 + type content_mode_unspecified = string 2659 + val content_mode_unspecified_jsont : content_mode_unspecified Jsont.t 2660 2661 + (** Declares the feed generator returns posts containing app.bsky.embed.video embeds. *) 2662 2663 + type content_mode_video = string 2664 + val content_mode_video_jsont : content_mode_video Jsont.t 2665 2666 2667 + type generator_viewer_state = { 2668 like : string option; 2669 } 2670 2671 + (** Jsont codec for {!type:generator_viewer_state}. *) 2672 + val generator_viewer_state_jsont : generator_viewer_state Jsont.t 2673 2674 2675 + type interaction = { 2676 + event : string option; 2677 + feed_context : string option; (** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. *) 2678 + item : string option; 2679 + req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 2680 } 2681 2682 + (** Jsont codec for {!type:interaction}. *) 2683 + val interaction_jsont : interaction Jsont.t 2684 2685 + (** User liked the feed item *) 2686 2687 + type interaction_like = string 2688 + val interaction_like_jsont : interaction_like Jsont.t 2689 2690 + (** User quoted the feed item *) 2691 2692 + type interaction_quote = string 2693 + val interaction_quote_jsont : interaction_quote Jsont.t 2694 2695 + (** User replied to the feed item *) 2696 2697 + type interaction_reply = string 2698 + val interaction_reply_jsont : interaction_reply Jsont.t 2699 2700 + (** User reposted the feed item *) 2701 2702 + type interaction_repost = string 2703 + val interaction_repost_jsont : interaction_repost Jsont.t 2704 2705 + (** Feed item was seen by user *) 2706 2707 + type interaction_seen = string 2708 + val interaction_seen_jsont : interaction_seen Jsont.t 2709 2710 + (** User shared the feed item *) 2711 2712 + type interaction_share = string 2713 + val interaction_share_jsont : interaction_share Jsont.t 2714 2715 2716 + type not_found_post = { 2717 + not_found : bool; 2718 + uri : string; 2719 + } 2720 2721 + (** Jsont codec for {!type:not_found_post}. *) 2722 + val not_found_post_jsont : not_found_post Jsont.t 2723 2724 2725 + type reason_pin = unit 2726 2727 + (** Jsont codec for {!type:reason_pin}. *) 2728 + val reason_pin_jsont : reason_pin Jsont.t 2729 2730 2731 type reason_repost = { ··· 2739 val reason_repost_jsont : reason_repost Jsont.t 2740 2741 2742 + type reply_ref = { 2743 + grandparent_author : Jsont.json option; (** When parent is a reply to another post, this is the author of that post. *) 2744 + parent : Jsont.json; 2745 + root : Jsont.json; 2746 } 2747 2748 + (** Jsont codec for {!type:reply_ref}. *) 2749 + val reply_ref_jsont : reply_ref Jsont.t 2750 2751 + (** Request that less content like the given feed item be shown in the feed *) 2752 2753 + type request_less = string 2754 + val request_less_jsont : request_less Jsont.t 2755 2756 + (** Request that more content like the given feed item be shown in the feed *) 2757 2758 + type request_more = string 2759 + val request_more_jsont : request_more Jsont.t 2760 2761 2762 + type skeleton_feed_post = { 2763 + feed_context : string option; (** Context that will be passed through to client and may be passed to feed generator back alongside interactions. *) 2764 + post : string; 2765 + reason : Jsont.json option; 2766 + } 2767 2768 + (** Jsont codec for {!type:skeleton_feed_post}. *) 2769 + val skeleton_feed_post_jsont : skeleton_feed_post Jsont.t 2770 2771 2772 + type skeleton_reason_pin = unit 2773 2774 + (** Jsont codec for {!type:skeleton_reason_pin}. *) 2775 + val skeleton_reason_pin_jsont : skeleton_reason_pin Jsont.t 2776 2777 2778 + type skeleton_reason_repost = { 2779 + repost : string; 2780 } 2781 2782 + (** Jsont codec for {!type:skeleton_reason_repost}. *) 2783 + val skeleton_reason_repost_jsont : skeleton_reason_repost Jsont.t 2784 2785 + (** Metadata about this post within the context of the thread it is in. *) 2786 2787 + type thread_context = { 2788 + root_author_like : string option; 2789 } 2790 2791 + (** Jsont codec for {!type:thread_context}. *) 2792 + val thread_context_jsont : thread_context Jsont.t 2793 2794 2795 + type threadgate_view = { 2796 + cid : string option; 2797 + lists : Jsont.json list option; 2798 + record : Jsont.json option; 2799 + uri : string option; 2800 + } 2801 2802 + (** Jsont codec for {!type:threadgate_view}. *) 2803 + val threadgate_view_jsont : threadgate_view Jsont.t 2804 2805 + (** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. *) 2806 2807 + type viewer_state = { 2808 + bookmarked : bool option; 2809 + embedding_disabled : bool option; 2810 + like : string option; 2811 + pinned : bool option; 2812 + reply_disabled : bool option; 2813 + repost : string option; 2814 + thread_muted : bool option; 2815 + } 2816 2817 + (** Jsont codec for {!type:viewer_state}. *) 2818 + val viewer_state_jsont : viewer_state Jsont.t 2819 2820 2821 + type blocked_post = { 2822 + author : Jsont.json; 2823 + blocked : bool; 2824 + uri : string; 2825 + } 2826 2827 + (** Jsont codec for {!type:blocked_post}. *) 2828 + val blocked_post_jsont : blocked_post Jsont.t 2829 2830 2831 + type generator_view = { 2832 + accepts_interactions : bool option; 2833 + avatar : string option; 2834 + cid : string; 2835 + content_mode : string option; 2836 + creator : Jsont.json; 2837 + description : string option; 2838 + description_facets : Richtext.Facet.main list option; 2839 did : string; 2840 + display_name : string; 2841 + indexed_at : string; 2842 + labels : Com.Atproto.Label.Defs.label list option; 2843 + like_count : int option; 2844 + uri : string; 2845 viewer : Jsont.json option; 2846 } 2847 2848 + (** Jsont codec for {!type:generator_view}. *) 2849 + val generator_view_jsont : generator_view Jsont.t 2850 2851 2852 type post_view = { ··· 2871 val post_view_jsont : post_view Jsont.t 2872 2873 2874 + type feed_view_post = { 2875 + feed_context : string option; (** Context provided by feed generator that may be passed back alongside interactions. *) 2876 + post : Jsont.json; 2877 + reason : Jsont.json option; 2878 + reply : Jsont.json option; 2879 + req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 2880 } 2881 2882 + (** Jsont codec for {!type:feed_view_post}. *) 2883 + val feed_view_post_jsont : feed_view_post Jsont.t 2884 2885 2886 type thread_view_post = { ··· 2893 (** Jsont codec for {!type:thread_view_post}. *) 2894 val thread_view_post_jsont : thread_view_post Jsont.t 2895 2896 + end 2897 + module SendInteractions : sig 2898 + (** Send information about interactions with feed items back to the feed generator that served them. *) 2899 2900 + 2901 + type input = { 2902 + interactions : Jsont.json list; 2903 } 2904 2905 + (** Jsont codec for {!type:input}. *) 2906 + val input_jsont : input Jsont.t 2907 + 2908 + 2909 + type output = unit 2910 + 2911 + (** Jsont codec for {!type:output}. *) 2912 + val output_jsont : output Jsont.t 2913 2914 end 2915 + module SearchPosts : sig 2916 + (** Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations. *) 2917 2918 + (** Query/procedure parameters. *) 2919 + type params = { 2920 + author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 2921 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 2922 + domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 2923 + lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 2924 + limit : int option; 2925 + mentions : string option; (** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. *) 2926 + q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2927 + since : string option; (** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). *) 2928 + sort : string option; (** Specifies the ranking order of results. *) 2929 + tag : string list option; (** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. *) 2930 + until : string option; (** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). *) 2931 + url : string option; (** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. *) 2932 } 2933 2934 + (** Jsont codec for {!type:params}. *) 2935 + val params_jsont : params Jsont.t 2936 2937 2938 + type output = { 2939 + cursor : string option; 2940 + hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 2941 + posts : Jsont.json list; 2942 } 2943 2944 + (** Jsont codec for {!type:output}. *) 2945 + val output_jsont : output Jsont.t 2946 2947 end 2948 + module GetTimeline : sig 2949 + (** Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. *) 2950 2951 (** Query/procedure parameters. *) 2952 type params = { 2953 + algorithm : string option; (** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. *) 2954 + cursor : string option; 2955 + limit : int option; 2956 } 2957 2958 (** Jsont codec for {!type:params}. *) ··· 2960 2961 2962 type output = { 2963 + cursor : string option; 2964 + feed : Jsont.json list; 2965 } 2966 2967 (** Jsont codec for {!type:output}. *) 2968 val output_jsont : output Jsont.t 2969 2970 end 2971 + module GetSuggestedFeeds : sig 2972 + (** Get a list of suggested feeds (feed generators) for the requesting account. *) 2973 2974 (** Query/procedure parameters. *) 2975 type params = { 2976 cursor : string option; 2977 limit : int option; 2978 } 2979 ··· 2983 2984 type output = { 2985 cursor : string option; 2986 + feeds : Jsont.json list; 2987 } 2988 2989 (** Jsont codec for {!type:output}. *) ··· 3016 val output_jsont : output Jsont.t 3017 3018 end 3019 + module GetPosts : sig 3020 + (** Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. *) 3021 3022 (** Query/procedure parameters. *) 3023 type params = { 3024 + uris : string list; (** List of post AT-URIs to return hydrated views for. *) 3025 } 3026 3027 (** Jsont codec for {!type:params}. *) ··· 3029 3030 3031 type output = { 3032 + posts : Jsont.json list; 3033 } 3034 3035 (** Jsont codec for {!type:output}. *) 3036 val output_jsont : output Jsont.t 3037 3038 end 3039 + module GetPostThread : sig 3040 + (** Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. *) 3041 3042 (** Query/procedure parameters. *) 3043 type params = { 3044 + depth : int option; (** How many levels of reply depth should be included in response. *) 3045 + parent_height : int option; (** How many levels of parent (and grandparent, etc) post to include. *) 3046 + uri : string; (** Reference (AT-URI) to post record. *) 3047 } 3048 3049 (** Jsont codec for {!type:params}. *) ··· 3051 3052 3053 type output = { 3054 + thread : Jsont.json; 3055 + threadgate : Jsont.json option; 3056 } 3057 3058 (** Jsont codec for {!type:output}. *) 3059 val output_jsont : output Jsont.t 3060 3061 end 3062 + module GetListFeed : sig 3063 + (** Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth. *) 3064 3065 (** Query/procedure parameters. *) 3066 type params = { 3067 cursor : string option; 3068 limit : int option; 3069 + list_ : string; (** Reference (AT-URI) to the list record. *) 3070 } 3071 3072 (** Jsont codec for {!type:params}. *) ··· 3076 type output = { 3077 cursor : string option; 3078 feed : Jsont.json list; 3079 } 3080 3081 (** Jsont codec for {!type:output}. *) 3082 val output_jsont : output Jsont.t 3083 3084 end 3085 + module GetFeedSkeleton : sig 3086 + (** Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. *) 3087 3088 (** Query/procedure parameters. *) 3089 type params = { 3090 + cursor : string option; 3091 + feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 3092 limit : int option; 3093 } 3094 3095 (** Jsont codec for {!type:params}. *) ··· 3098 3099 type output = { 3100 cursor : string option; 3101 + feed : Jsont.json list; 3102 + req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3103 } 3104 3105 (** Jsont codec for {!type:output}. *) ··· 3126 val output_jsont : output Jsont.t 3127 3128 end 3129 + module GetFeedGenerator : sig 3130 + (** Get information about a feed generator. Implemented by AppView. *) 3131 3132 + (** Query/procedure parameters. *) 3133 + type params = { 3134 + feed : string; (** AT-URI of the feed generator record. *) 3135 } 3136 3137 + (** Jsont codec for {!type:params}. *) 3138 + val params_jsont : params Jsont.t 3139 3140 3141 + type output = { 3142 + is_online : bool; (** Indicates whether the feed generator service has been online recently, or else seems to be inactive. *) 3143 + is_valid : bool; (** Indicates whether the feed generator service is compatible with the record declaration. *) 3144 + view : Jsont.json; 3145 + } 3146 3147 (** Jsont codec for {!type:output}. *) 3148 val output_jsont : output Jsont.t 3149 3150 end 3151 + module GetFeed : sig 3152 + (** Get a hydrated feed from an actor's selected feed generator. Implemented by App View. *) 3153 3154 (** Query/procedure parameters. *) 3155 type params = { 3156 cursor : string option; 3157 + feed : string; 3158 limit : int option; 3159 } 3160 ··· 3171 val output_jsont : output Jsont.t 3172 3173 end 3174 + module GetAuthorFeed : sig 3175 + (** Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. *) 3176 3177 (** Query/procedure parameters. *) 3178 type params = { 3179 + actor : string; 3180 + cursor : string option; 3181 + filter : string option; (** Combinations of post/repost types to include in response. *) 3182 + include_pins : bool option; 3183 + limit : int option; 3184 } 3185 3186 (** Jsont codec for {!type:params}. *) ··· 3188 3189 3190 type output = { 3191 + cursor : string option; 3192 + feed : Jsont.json list; 3193 } 3194 3195 (** Jsont codec for {!type:output}. *) 3196 val output_jsont : output Jsont.t 3197 3198 end 3199 + module GetActorLikes : sig 3200 + (** Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. *) 3201 3202 (** Query/procedure parameters. *) 3203 type params = { 3204 + actor : string; 3205 cursor : string option; 3206 limit : int option; 3207 } ··· 3212 3213 type output = { 3214 cursor : string option; 3215 + feed : Jsont.json list; 3216 } 3217 3218 (** Jsont codec for {!type:output}. *) ··· 3242 val output_jsont : output Jsont.t 3243 3244 end 3245 + end 3246 + module Contact : sig 3247 + module VerifyPhone : sig 3248 + (** Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. *) 3249 + 3250 3251 + type input = { 3252 + code : string; (** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. *) 3253 + phone : string; (** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. *) 3254 } 3255 3256 + (** Jsont codec for {!type:input}. *) 3257 + val input_jsont : input Jsont.t 3258 3259 3260 type output = { 3261 + token : string; (** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. *) 3262 } 3263 3264 (** Jsont codec for {!type:output}. *) 3265 val output_jsont : output Jsont.t 3266 3267 end 3268 + module StartPhoneVerification : sig 3269 + (** Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. *) 3270 + 3271 + 3272 + type input = { 3273 + phone : string; (** The phone number to receive the code via SMS. *) 3274 + } 3275 + 3276 + (** Jsont codec for {!type:input}. *) 3277 + val input_jsont : input Jsont.t 3278 + 3279 + 3280 + type output = unit 3281 + 3282 + (** Jsont codec for {!type:output}. *) 3283 + val output_jsont : output Jsont.t 3284 + 3285 + end 3286 + module SendNotification : sig 3287 + (** System endpoint to send notifications related to contact imports. Requires role authentication. *) 3288 + 3289 + 3290 + type input = { 3291 + from : string; (** The DID of who this notification comes from. *) 3292 + to_ : string; (** The DID of who this notification should go to. *) 3293 + } 3294 + 3295 + (** Jsont codec for {!type:input}. *) 3296 + val input_jsont : input Jsont.t 3297 + 3298 + 3299 + type output = unit 3300 + 3301 + (** Jsont codec for {!type:output}. *) 3302 + val output_jsont : output Jsont.t 3303 + 3304 + end 3305 + module RemoveData : sig 3306 + (** Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication. *) 3307 + 3308 + 3309 + type input = unit 3310 + 3311 + (** Jsont codec for {!type:input}. *) 3312 + val input_jsont : input Jsont.t 3313 + 3314 + 3315 + type output = unit 3316 + 3317 + (** Jsont codec for {!type:output}. *) 3318 + val output_jsont : output Jsont.t 3319 + 3320 + end 3321 + module GetMatches : sig 3322 + (** Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication. *) 3323 3324 (** Query/procedure parameters. *) 3325 type params = { 3326 cursor : string option; 3327 limit : int option; 3328 } ··· 3333 3334 type output = { 3335 cursor : string option; 3336 + matches : Jsont.json list; 3337 } 3338 3339 (** Jsont codec for {!type:output}. *) 3340 val output_jsont : output Jsont.t 3341 3342 end 3343 + module DismissMatch : sig 3344 + (** Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication. *) 3345 3346 3347 type input = { 3348 + subject : string; (** The subject's DID to dismiss the match with. *) 3349 } 3350 3351 (** Jsont codec for {!type:input}. *) 3352 val input_jsont : input Jsont.t 3353 3354 + 3355 + type output = unit 3356 + 3357 + (** Jsont codec for {!type:output}. *) 3358 + val output_jsont : output Jsont.t 3359 + 3360 end 3361 + module Defs : sig 3362 + (** Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match. *) 3363 + 3364 + type match_and_contact_index = { 3365 + contact_index : int; (** The index of this match in the import contact input. *) 3366 + match_ : Jsont.json; (** Profile of the matched user. *) 3367 + } 3368 + 3369 + (** Jsont codec for {!type:match_and_contact_index}. *) 3370 + val match_and_contact_index_jsont : match_and_contact_index Jsont.t 3371 + 3372 + (** A stash object to be sent via bsync representing a notification to be created. *) 3373 + 3374 + type notification = { 3375 + from : string; (** The DID of who this notification comes from. *) 3376 + to_ : string; (** The DID of who this notification should go to. *) 3377 + } 3378 3379 + (** Jsont codec for {!type:notification}. *) 3380 + val notification_jsont : notification Jsont.t 3381 3382 + 3383 + type sync_status = { 3384 + matches_count : int; (** Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match. *) 3385 + synced_at : string; (** Last date when contacts where imported. *) 3386 } 3387 3388 + (** Jsont codec for {!type:sync_status}. *) 3389 + val sync_status_jsont : sync_status Jsont.t 3390 3391 end 3392 + module ImportContacts : sig 3393 + (** Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. *) 3394 3395 + 3396 + type input = { 3397 + contacts : string list; (** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. *) 3398 + token : string; (** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. *) 3399 } 3400 3401 + (** Jsont codec for {!type:input}. *) 3402 + val input_jsont : input Jsont.t 3403 3404 3405 + type output = { 3406 + matches_and_contact_indexes : Defs.match_and_contact_index list; (** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. *) 3407 } 3408 3409 + (** Jsont codec for {!type:output}. *) 3410 + val output_jsont : output Jsont.t 3411 3412 end 3413 + module GetSyncStatus : sig 3414 + (** Gets the user's current contact import status. Requires authentication. *) 3415 3416 (** Query/procedure parameters. *) 3417 + type params = unit 3418 3419 (** Jsont codec for {!type:params}. *) 3420 val params_jsont : params Jsont.t 3421 3422 3423 type output = { 3424 + sync_status : Defs.sync_status option; (** If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since. *) 3425 } 3426 3427 (** Jsont codec for {!type:output}. *) ··· 3430 end 3431 end 3432 module Unspecced : sig 3433 + module GetTaggedSuggestions : sig 3434 3435 + type suggestion = { 3436 + subject : string; 3437 + subject_type : string; 3438 + tag : string; 3439 } 3440 3441 + (** Jsont codec for {!type:suggestion}. *) 3442 + val suggestion_jsont : suggestion Jsont.t 3443 + 3444 + (** Get a list of suggestions (feeds and users) tagged with categories *) 3445 + 3446 + (** Query/procedure parameters. *) 3447 + type params = unit 3448 + 3449 (** Jsont codec for {!type:params}. *) 3450 val params_jsont : params Jsont.t 3451 3452 3453 type output = { 3454 + suggestions : suggestion list; 3455 } 3456 3457 (** Jsont codec for {!type:output}. *) 3458 val output_jsont : output Jsont.t 3459 3460 end 3461 + module GetSuggestedUsersSkeleton : sig 3462 + (** Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers *) 3463 3464 (** Query/procedure parameters. *) 3465 type params = { 3466 + category : string option; (** Category of users to get suggestions for. *) 3467 limit : int option; 3468 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3469 } 3470 3471 (** Jsont codec for {!type:params}. *) ··· 3473 3474 3475 type output = { 3476 + dids : string list; 3477 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3478 } 3479 3480 (** Jsont codec for {!type:output}. *) 3481 val output_jsont : output Jsont.t 3482 3483 end 3484 + module GetSuggestedUsers : sig 3485 + (** Get a list of suggested users *) 3486 3487 (** Query/procedure parameters. *) 3488 type params = { 3489 + category : string option; (** Category of users to get suggestions for. *) 3490 limit : int option; 3491 } 3492 3493 (** Jsont codec for {!type:params}. *) ··· 3495 3496 3497 type output = { 3498 + actors : Jsont.json list; 3499 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3500 } 3501 3502 (** Jsont codec for {!type:output}. *) ··· 3524 val output_jsont : output Jsont.t 3525 3526 end 3527 + module GetSuggestedStarterPacks : sig 3528 + (** Get a list of suggested starterpacks *) 3529 3530 (** Query/procedure parameters. *) 3531 type params = { ··· 3537 3538 3539 type output = { 3540 + starter_packs : Jsont.json list; 3541 } 3542 3543 (** Jsont codec for {!type:output}. *) ··· 3565 val output_jsont : output Jsont.t 3566 3567 end 3568 + module GetSuggestedFeeds : sig 3569 + (** Get a list of suggested feeds *) 3570 3571 + (** Query/procedure parameters. *) 3572 + type params = { 3573 + limit : int option; 3574 } 3575 3576 + (** Jsont codec for {!type:params}. *) 3577 + val params_jsont : params Jsont.t 3578 3579 3580 type output = { 3581 + feeds : Jsont.json list; 3582 } 3583 3584 (** Jsont codec for {!type:output}. *) 3585 val output_jsont : output Jsont.t 3586 3587 end 3588 + module GetPopularFeedGenerators : sig 3589 + (** An unspecced view of globally popular feed generators. *) 3590 3591 (** Query/procedure parameters. *) 3592 type params = { 3593 + cursor : string option; 3594 limit : int option; 3595 + query : string option; 3596 } 3597 3598 (** Jsont codec for {!type:params}. *) ··· 3600 3601 3602 type output = { 3603 + cursor : string option; 3604 + feeds : Jsont.json list; 3605 } 3606 3607 (** Jsont codec for {!type:output}. *) 3608 val output_jsont : output Jsont.t 3609 3610 end 3611 + module GetOnboardingSuggestedStarterPacksSkeleton : sig 3612 + (** Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks *) 3613 3614 (** Query/procedure parameters. *) 3615 type params = { 3616 limit : int option; 3617 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3618 } 3619 3620 (** Jsont codec for {!type:params}. *) ··· 3622 3623 3624 type output = { 3625 + starter_packs : string list; 3626 } 3627 3628 (** Jsont codec for {!type:output}. *) 3629 val output_jsont : output Jsont.t 3630 3631 end 3632 + module GetOnboardingSuggestedStarterPacks : sig 3633 + (** Get a list of suggested starterpacks for onboarding *) 3634 3635 (** Query/procedure parameters. *) 3636 type params = { 3637 limit : int option; 3638 } 3639 3640 (** Jsont codec for {!type:params}. *) ··· 3642 3643 3644 type output = { 3645 + starter_packs : Jsont.json list; 3646 } 3647 3648 (** Jsont codec for {!type:output}. *) 3649 val output_jsont : output Jsont.t 3650 3651 end 3652 + module GetConfig : sig 3653 3654 + type live_now_config = { 3655 + did : string; 3656 + domains : string list; 3657 } 3658 3659 + (** Jsont codec for {!type:live_now_config}. *) 3660 + val live_now_config_jsont : live_now_config Jsont.t 3661 + 3662 + (** Get miscellaneous runtime configuration. *) 3663 + 3664 + 3665 + type output = { 3666 + check_email_confirmed : bool option; 3667 + live_now : live_now_config list option; 3668 + } 3669 3670 + (** Jsont codec for {!type:output}. *) 3671 + val output_jsont : output Jsont.t 3672 3673 + end 3674 + module Defs : sig 3675 + (** Object used to store age assurance data in stash. *) 3676 + 3677 + type age_assurance_event = { 3678 + attempt_id : string; (** The unique identifier for this instance of the age assurance flow, in UUID format. *) 3679 + complete_ip : string option; (** The IP address used when completing the AA flow. *) 3680 + complete_ua : string option; (** The user agent used when completing the AA flow. *) 3681 + created_at : string; (** The date and time of this write operation. *) 3682 + email : string option; (** The email used for AA. *) 3683 + init_ip : string option; (** The IP address used when initiating the AA flow. *) 3684 + init_ua : string option; (** The user agent used when initiating the AA flow. *) 3685 + status : string; (** The status of the age assurance process. *) 3686 } 3687 3688 + (** Jsont codec for {!type:age_assurance_event}. *) 3689 + val age_assurance_event_jsont : age_assurance_event Jsont.t 3690 3691 + (** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. *) 3692 3693 + type age_assurance_state = { 3694 + last_initiated_at : string option; (** The timestamp when this state was last updated. *) 3695 + status : string; (** The status of the age assurance process. *) 3696 } 3697 3698 + (** Jsont codec for {!type:age_assurance_state}. *) 3699 + val age_assurance_state_jsont : age_assurance_state Jsont.t 3700 3701 3702 + type skeleton_search_actor = { 3703 + did : string; 3704 + } 3705 3706 + (** Jsont codec for {!type:skeleton_search_actor}. *) 3707 + val skeleton_search_actor_jsont : skeleton_search_actor Jsont.t 3708 3709 3710 + type skeleton_search_post = { 3711 + uri : string; 3712 + } 3713 3714 + (** Jsont codec for {!type:skeleton_search_post}. *) 3715 + val skeleton_search_post_jsont : skeleton_search_post Jsont.t 3716 3717 3718 + type skeleton_search_starter_pack = { 3719 + uri : string; 3720 } 3721 3722 + (** Jsont codec for {!type:skeleton_search_starter_pack}. *) 3723 + val skeleton_search_starter_pack_jsont : skeleton_search_starter_pack Jsont.t 3724 3725 3726 type skeleton_trend = { ··· 3738 val skeleton_trend_jsont : skeleton_trend Jsont.t 3739 3740 3741 + type thread_item_blocked = { 3742 + author : Jsont.json; 3743 } 3744 3745 + (** Jsont codec for {!type:thread_item_blocked}. *) 3746 + val thread_item_blocked_jsont : thread_item_blocked Jsont.t 3747 3748 3749 + type thread_item_no_unauthenticated = unit 3750 3751 + (** Jsont codec for {!type:thread_item_no_unauthenticated}. *) 3752 + val thread_item_no_unauthenticated_jsont : thread_item_no_unauthenticated Jsont.t 3753 3754 3755 + type thread_item_not_found = unit 3756 3757 + (** Jsont codec for {!type:thread_item_not_found}. *) 3758 + val thread_item_not_found_jsont : thread_item_not_found Jsont.t 3759 3760 3761 + type thread_item_post = { 3762 + hidden_by_threadgate : bool; (** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. *) 3763 + more_parents : bool; (** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. *) 3764 + more_replies : int; (** This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. *) 3765 + muted_by_viewer : bool; (** This is by an account muted by the viewer requesting it. *) 3766 + op_thread : bool; (** This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. *) 3767 + post : Jsont.json; 3768 } 3769 3770 + (** Jsont codec for {!type:thread_item_post}. *) 3771 + val thread_item_post_jsont : thread_item_post Jsont.t 3772 3773 3774 + type trend_view = { 3775 + actors : Jsont.json list; 3776 + category : string option; 3777 + display_name : string; 3778 + link : string; 3779 + post_count : int; 3780 + started_at : string; 3781 + status : string option; 3782 + topic : string; 3783 } 3784 3785 + (** Jsont codec for {!type:trend_view}. *) 3786 + val trend_view_jsont : trend_view Jsont.t 3787 3788 3789 + type trending_topic = { 3790 + description : string option; 3791 + display_name : string option; 3792 + link : string; 3793 + topic : string; 3794 } 3795 3796 + (** Jsont codec for {!type:trending_topic}. *) 3797 + val trending_topic_jsont : trending_topic Jsont.t 3798 3799 + end 3800 + module SearchStarterPacksSkeleton : sig 3801 + (** Backend Starter Pack search, returns only skeleton. *) 3802 3803 (** Query/procedure parameters. *) 3804 + type params = { 3805 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3806 + limit : int option; 3807 + q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 3808 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3809 + } 3810 3811 (** Jsont codec for {!type:params}. *) 3812 val params_jsont : params Jsont.t 3813 3814 3815 type output = { 3816 + cursor : string option; 3817 + hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 3818 + starter_packs : Defs.skeleton_search_starter_pack list; 3819 } 3820 3821 (** Jsont codec for {!type:output}. *) ··· 3856 val output_jsont : output Jsont.t 3857 3858 end 3859 + module SearchActorsSkeleton : sig 3860 + (** Backend Actors (profile) search, returns only skeleton. *) 3861 3862 (** Query/procedure parameters. *) 3863 type params = { 3864 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3865 + limit : int option; 3866 + q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. *) 3867 + typeahead : bool option; (** If true, acts as fast/simple 'typeahead' query. *) 3868 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3869 } 3870 3871 (** Jsont codec for {!type:params}. *) ··· 3873 3874 3875 type output = { 3876 + actors : Defs.skeleton_search_actor list; 3877 + cursor : string option; 3878 + hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 3879 } 3880 3881 (** Jsont codec for {!type:output}. *) 3882 val output_jsont : output Jsont.t 3883 3884 end 3885 + module InitAgeAssurance : sig 3886 + (** Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. *) 3887 3888 + 3889 + type input = { 3890 + country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 3891 + email : string; (** The user's email address to receive assurance instructions. *) 3892 + language : string; (** The user's preferred language for communication during the assurance process. *) 3893 } 3894 3895 + (** Jsont codec for {!type:input}. *) 3896 + val input_jsont : input Jsont.t 3897 3898 3899 + type output = Defs.age_assurance_state 3900 3901 (** Jsont codec for {!type:output}. *) 3902 val output_jsont : output Jsont.t ··· 3923 val output_jsont : output Jsont.t 3924 3925 end 3926 + module GetTrends : sig 3927 + (** Get the current trends on the network *) 3928 3929 + (** Query/procedure parameters. *) 3930 + type params = { 3931 + limit : int option; 3932 + } 3933 + 3934 + (** Jsont codec for {!type:params}. *) 3935 + val params_jsont : params Jsont.t 3936 + 3937 + 3938 + type output = { 3939 + trends : Defs.trend_view list; 3940 } 3941 3942 + (** Jsont codec for {!type:output}. *) 3943 + val output_jsont : output Jsont.t 3944 3945 + end 3946 + module GetTrendingTopics : sig 3947 + (** Get a list of trending topics *) 3948 3949 (** Query/procedure parameters. *) 3950 type params = { 3951 + limit : int option; 3952 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3953 } 3954 3955 (** Jsont codec for {!type:params}. *) ··· 3957 3958 3959 type output = { 3960 + suggested : Defs.trending_topic list; 3961 + topics : Defs.trending_topic list; 3962 } 3963 3964 (** Jsont codec for {!type:output}. *) 3965 val output_jsont : output Jsont.t 3966 3967 end 3968 + module GetSuggestionsSkeleton : sig 3969 + (** Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions *) 3970 3971 + (** Query/procedure parameters. *) 3972 + type params = { 3973 + cursor : string option; 3974 + limit : int option; 3975 + relative_to_did : string option; (** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. *) 3976 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3977 } 3978 3979 + (** Jsont codec for {!type:params}. *) 3980 + val params_jsont : params Jsont.t 3981 3982 3983 + type output = { 3984 + actors : Defs.skeleton_search_actor list; 3985 + cursor : string option; 3986 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3987 + relative_to_did : string option; (** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. *) 3988 + } 3989 3990 (** Jsont codec for {!type:output}. *) 3991 val output_jsont : output Jsont.t 3992 3993 end 3994 + module GetPostThreadV2 : sig 3995 + 3996 + type thread_item = { 3997 + depth : int; (** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. *) 3998 + uri : string; 3999 + value : Jsont.json; 4000 + } 4001 + 4002 + (** Jsont codec for {!type:thread_item}. *) 4003 + val thread_item_jsont : thread_item Jsont.t 4004 + 4005 + (** (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. *) 4006 4007 (** Query/procedure parameters. *) 4008 type params = { 4009 + above : bool option; (** Whether to include parents above the anchor. *) 4010 + anchor : string; (** Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post. *) 4011 + below : int option; (** How many levels of replies to include below the anchor. *) 4012 + branching_factor : int option; (** Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). *) 4013 + sort : string option; (** Sorting for the thread replies. *) 4014 } 4015 4016 (** Jsont codec for {!type:params}. *) ··· 4018 4019 4020 type output = { 4021 + has_other_replies : bool; (** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. *) 4022 + thread : thread_item list; (** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. *) 4023 + threadgate : Jsont.json option; 4024 } 4025 4026 (** Jsont codec for {!type:output}. *) 4027 val output_jsont : output Jsont.t 4028 4029 end 4030 + module GetPostThreadOtherV2 : sig 4031 + 4032 + type thread_item = { 4033 + depth : int; (** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. *) 4034 + uri : string; 4035 + value : Defs.thread_item_post; 4036 + } 4037 + 4038 + (** Jsont codec for {!type:thread_item}. *) 4039 + val thread_item_jsont : thread_item Jsont.t 4040 + 4041 + (** (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. *) 4042 4043 (** Query/procedure parameters. *) 4044 type params = { 4045 + anchor : string; (** Reference (AT-URI) to post record. This is the anchor post. *) 4046 } 4047 4048 (** Jsont codec for {!type:params}. *) ··· 4050 4051 4052 type output = { 4053 + thread : thread_item list; (** A flat list of other thread items. The depth of each item is indicated by the depth property inside the item. *) 4054 } 4055 4056 (** Jsont codec for {!type:output}. *) ··· 4067 val output_jsont : output Jsont.t 4068 4069 end 4070 + end 4071 + module Bookmark : sig 4072 + module DeleteBookmark : sig 4073 + (** Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 4074 + 4075 + 4076 + type input = { 4077 + uri : string; 4078 + } 4079 4080 + (** Jsont codec for {!type:input}. *) 4081 + val input_jsont : input Jsont.t 4082 + 4083 + end 4084 + module Defs : sig 4085 + (** Object used to store bookmark data in stash. *) 4086 + 4087 + type bookmark = { 4088 + subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. *) 4089 } 4090 4091 + (** Jsont codec for {!type:bookmark}. *) 4092 + val bookmark_jsont : bookmark Jsont.t 4093 4094 4095 + type bookmark_view = { 4096 + created_at : string option; 4097 + item : Jsont.json; 4098 + subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the bookmarked record. *) 4099 } 4100 4101 + (** Jsont codec for {!type:bookmark_view}. *) 4102 + val bookmark_view_jsont : bookmark_view Jsont.t 4103 4104 end 4105 + module CreateBookmark : sig 4106 + (** Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 4107 + 4108 + 4109 + type input = { 4110 + cid : string; 4111 + uri : string; 4112 + } 4113 + 4114 + (** Jsont codec for {!type:input}. *) 4115 + val input_jsont : input Jsont.t 4116 + 4117 + end 4118 + module GetBookmarks : sig 4119 + (** Gets views of records bookmarked by the authenticated user. Requires authentication. *) 4120 4121 (** Query/procedure parameters. *) 4122 type params = { 4123 + cursor : string option; 4124 limit : int option; 4125 } 4126 ··· 4129 4130 4131 type output = { 4132 + bookmarks : Defs.bookmark_view list; 4133 + cursor : string option; 4134 } 4135 4136 (** Jsont codec for {!type:output}. *)
+55 -55
lexicons/standard-site/atp_lexicon_standard_site.ml
··· 36 end 37 module Site = struct 38 module Standard = struct 39 module Graph = struct 40 module Subscription = struct 41 type main = { ··· 83 |> Jsont.Object.opt_mem "updatedAt" Jsont.string ~enc:(fun r -> r.updated_at) 84 |> Jsont.Object.finish 85 86 - end 87 - module Theme = struct 88 - module Color = struct 89 - type rgba = { 90 - a : int; 91 - b : int; 92 - g : int; 93 - r : int; 94 - } 95 - 96 - let rgba_jsont = 97 - Jsont.Object.map ~kind:"Rgba" 98 - (fun _typ a b g r -> { a; b; g; r }) 99 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.color#rgba" ~enc:(fun _ -> "site.standard.theme.color#rgba") 100 - |> Jsont.Object.mem "a" Jsont.int ~enc:(fun r -> r.a) 101 - |> Jsont.Object.mem "b" Jsont.int ~enc:(fun r -> r.b) 102 - |> Jsont.Object.mem "g" Jsont.int ~enc:(fun r -> r.g) 103 - |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 104 - |> Jsont.Object.finish 105 - 106 - type rgb = { 107 - b : int; 108 - g : int; 109 - r : int; 110 - } 111 - 112 - let rgb_jsont = 113 - Jsont.Object.map ~kind:"Rgb" 114 - (fun _typ b g r -> { b; g; r }) 115 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.color#rgb" ~enc:(fun _ -> "site.standard.theme.color#rgb") 116 - |> Jsont.Object.mem "b" Jsont.int ~enc:(fun r -> r.b) 117 - |> Jsont.Object.mem "g" Jsont.int ~enc:(fun r -> r.g) 118 - |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 119 - |> Jsont.Object.finish 120 - 121 - end 122 - module Basic = struct 123 - type main = { 124 - accent : Color.rgb; 125 - accent_foreground : Color.rgb; 126 - background : Color.rgb; 127 - foreground : Color.rgb; 128 - } 129 - 130 - let main_jsont = 131 - Jsont.Object.map ~kind:"Main" 132 - (fun _typ accent accent_foreground background foreground -> { accent; accent_foreground; background; foreground }) 133 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.basic" ~enc:(fun _ -> "site.standard.theme.basic") 134 - |> Jsont.Object.mem "accent" Color.rgb_jsont ~enc:(fun r -> r.accent) 135 - |> Jsont.Object.mem "accentForeground" Color.rgb_jsont ~enc:(fun r -> r.accent_foreground) 136 - |> Jsont.Object.mem "background" Color.rgb_jsont ~enc:(fun r -> r.background) 137 - |> Jsont.Object.mem "foreground" Color.rgb_jsont ~enc:(fun r -> r.foreground) 138 - |> Jsont.Object.finish 139 - 140 - end 141 end 142 module Publication = struct 143 type preferences = {
··· 36 end 37 module Site = struct 38 module Standard = struct 39 + module Theme = struct 40 + module Color = struct 41 + type rgb = { 42 + b : int; 43 + g : int; 44 + r : int; 45 + } 46 + 47 + let rgb_jsont = 48 + Jsont.Object.map ~kind:"Rgb" 49 + (fun _typ b g r -> { b; g; r }) 50 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.color#rgb" ~enc:(fun _ -> "site.standard.theme.color#rgb") 51 + |> Jsont.Object.mem "b" Jsont.int ~enc:(fun r -> r.b) 52 + |> Jsont.Object.mem "g" Jsont.int ~enc:(fun r -> r.g) 53 + |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 54 + |> Jsont.Object.finish 55 + 56 + type rgba = { 57 + a : int; 58 + b : int; 59 + g : int; 60 + r : int; 61 + } 62 + 63 + let rgba_jsont = 64 + Jsont.Object.map ~kind:"Rgba" 65 + (fun _typ a b g r -> { a; b; g; r }) 66 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.color#rgba" ~enc:(fun _ -> "site.standard.theme.color#rgba") 67 + |> Jsont.Object.mem "a" Jsont.int ~enc:(fun r -> r.a) 68 + |> Jsont.Object.mem "b" Jsont.int ~enc:(fun r -> r.b) 69 + |> Jsont.Object.mem "g" Jsont.int ~enc:(fun r -> r.g) 70 + |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 71 + |> Jsont.Object.finish 72 + 73 + end 74 + module Basic = struct 75 + type main = { 76 + accent : Color.rgb; 77 + accent_foreground : Color.rgb; 78 + background : Color.rgb; 79 + foreground : Color.rgb; 80 + } 81 + 82 + let main_jsont = 83 + Jsont.Object.map ~kind:"Main" 84 + (fun _typ accent accent_foreground background foreground -> { accent; accent_foreground; background; foreground }) 85 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.basic" ~enc:(fun _ -> "site.standard.theme.basic") 86 + |> Jsont.Object.mem "accent" Color.rgb_jsont ~enc:(fun r -> r.accent) 87 + |> Jsont.Object.mem "accentForeground" Color.rgb_jsont ~enc:(fun r -> r.accent_foreground) 88 + |> Jsont.Object.mem "background" Color.rgb_jsont ~enc:(fun r -> r.background) 89 + |> Jsont.Object.mem "foreground" Color.rgb_jsont ~enc:(fun r -> r.foreground) 90 + |> Jsont.Object.finish 91 + 92 + end 93 + end 94 module Graph = struct 95 module Subscription = struct 96 type main = { ··· 138 |> Jsont.Object.opt_mem "updatedAt" Jsont.string ~enc:(fun r -> r.updated_at) 139 |> Jsont.Object.finish 140 141 end 142 module Publication = struct 143 type preferences = {
+39 -39
lexicons/standard-site/atp_lexicon_standard_site.mli
··· 30 end 31 module Site : sig 32 module Standard : sig 33 module Graph : sig 34 module Subscription : sig 35 (** Record declaring a subscription to a publication. *) ··· 63 (** Jsont codec for {!type:main}. *) 64 val main_jsont : main Jsont.t 65 66 - end 67 - module Theme : sig 68 - module Color : sig 69 - 70 - type rgba = { 71 - a : int; 72 - b : int; 73 - g : int; 74 - r : int; 75 - } 76 - 77 - (** Jsont codec for {!type:rgba}. *) 78 - val rgba_jsont : rgba Jsont.t 79 - 80 - 81 - type rgb = { 82 - b : int; 83 - g : int; 84 - r : int; 85 - } 86 - 87 - (** Jsont codec for {!type:rgb}. *) 88 - val rgb_jsont : rgb Jsont.t 89 - 90 - end 91 - module Basic : sig 92 - (** A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications. *) 93 - 94 - type main = { 95 - accent : Color.rgb; (** Color used for links and button backgrounds. *) 96 - accent_foreground : Color.rgb; (** Color used for button text. *) 97 - background : Color.rgb; (** Color used for content background. *) 98 - foreground : Color.rgb; (** Color used for content text. *) 99 - } 100 - 101 - (** Jsont codec for {!type:main}. *) 102 - val main_jsont : main Jsont.t 103 - 104 - end 105 end 106 module Publication : sig 107 (** Platform-specific preferences for the publication, including discovery and visibility settings. *)
··· 30 end 31 module Site : sig 32 module Standard : sig 33 + module Theme : sig 34 + module Color : sig 35 + 36 + type rgb = { 37 + b : int; 38 + g : int; 39 + r : int; 40 + } 41 + 42 + (** Jsont codec for {!type:rgb}. *) 43 + val rgb_jsont : rgb Jsont.t 44 + 45 + 46 + type rgba = { 47 + a : int; 48 + b : int; 49 + g : int; 50 + r : int; 51 + } 52 + 53 + (** Jsont codec for {!type:rgba}. *) 54 + val rgba_jsont : rgba Jsont.t 55 + 56 + end 57 + module Basic : sig 58 + (** A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications. *) 59 + 60 + type main = { 61 + accent : Color.rgb; (** Color used for links and button backgrounds. *) 62 + accent_foreground : Color.rgb; (** Color used for button text. *) 63 + background : Color.rgb; (** Color used for content background. *) 64 + foreground : Color.rgb; (** Color used for content text. *) 65 + } 66 + 67 + (** Jsont codec for {!type:main}. *) 68 + val main_jsont : main Jsont.t 69 + 70 + end 71 + end 72 module Graph : sig 73 module Subscription : sig 74 (** Record declaring a subscription to a publication. *) ··· 102 (** Jsont codec for {!type:main}. *) 103 val main_jsont : main Jsont.t 104 105 end 106 module Publication : sig 107 (** Platform-specific preferences for the publication, including discovery and visibility settings. *)
+865 -865
lexicons/tangled/atp_lexicon_tangled.ml
··· 15 16 module Sh = struct 17 module Tangled = struct 18 - module Spindle = struct 19 - type main = { 20 - created_at : string; 21 - } 22 - 23 - let main_jsont = 24 - Jsont.Object.map ~kind:"Main" 25 - (fun _typ created_at -> { created_at }) 26 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.spindle" ~enc:(fun _ -> "sh.tangled.spindle") 27 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 28 - |> Jsont.Object.finish 29 - 30 - module Member = struct 31 - type main = { 32 - created_at : string; 33 - instance : string; 34 - subject : string; 35 - } 36 - 37 - let main_jsont = 38 - Jsont.Object.map ~kind:"Main" 39 - (fun _typ created_at instance subject -> { created_at; instance; subject }) 40 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.spindle.member" ~enc:(fun _ -> "sh.tangled.spindle.member") 41 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 42 - |> Jsont.Object.mem "instance" Jsont.string ~enc:(fun r -> r.instance) 43 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 44 - |> Jsont.Object.finish 45 - 46 - end 47 - end 48 - module Git = struct 49 - module RefUpdate = struct 50 - type individual_language_size = { 51 - lang : string; 52 - size : int; 53 - } 54 - 55 - let individual_language_size_jsont = 56 - Jsont.Object.map ~kind:"Individual_language_size" 57 - (fun _typ lang size -> { lang; size }) 58 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#individualLanguageSize" ~enc:(fun _ -> "sh.tangled.git.refUpdate#individualLanguageSize") 59 - |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 60 - |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 61 - |> Jsont.Object.finish 62 - 63 - type individual_email_commit_count = { 64 - count : int; 65 - email : string; 66 - } 67 - 68 - let individual_email_commit_count_jsont = 69 - Jsont.Object.map ~kind:"Individual_email_commit_count" 70 - (fun _typ count email -> { count; email }) 71 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#individualEmailCommitCount" ~enc:(fun _ -> "sh.tangled.git.refUpdate#individualEmailCommitCount") 72 - |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 73 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 74 - |> Jsont.Object.finish 75 - 76 - type lang_breakdown = { 77 - inputs : individual_language_size list option; 78 - } 79 - 80 - let lang_breakdown_jsont = 81 - Jsont.Object.map ~kind:"Lang_breakdown" 82 - (fun _typ inputs -> { inputs }) 83 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#langBreakdown" ~enc:(fun _ -> "sh.tangled.git.refUpdate#langBreakdown") 84 - |> Jsont.Object.opt_mem "inputs" (Jsont.list individual_language_size_jsont) ~enc:(fun r -> r.inputs) 85 - |> Jsont.Object.finish 86 - 87 - type commit_count_breakdown = { 88 - by_email : individual_email_commit_count list option; 89 - } 90 - 91 - let commit_count_breakdown_jsont = 92 - Jsont.Object.map ~kind:"Commit_count_breakdown" 93 - (fun _typ by_email -> { by_email }) 94 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#commitCountBreakdown" ~enc:(fun _ -> "sh.tangled.git.refUpdate#commitCountBreakdown") 95 - |> Jsont.Object.opt_mem "byEmail" (Jsont.list individual_email_commit_count_jsont) ~enc:(fun r -> r.by_email) 96 - |> Jsont.Object.finish 97 - 98 - type meta = { 99 - commit_count : commit_count_breakdown; 100 - is_default_ref : bool; 101 - lang_breakdown : lang_breakdown option; 102 - } 103 - 104 - let meta_jsont = 105 - Jsont.Object.map ~kind:"Meta" 106 - (fun _typ commit_count is_default_ref lang_breakdown -> { commit_count; is_default_ref; lang_breakdown }) 107 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#meta" ~enc:(fun _ -> "sh.tangled.git.refUpdate#meta") 108 - |> Jsont.Object.mem "commitCount" commit_count_breakdown_jsont ~enc:(fun r -> r.commit_count) 109 - |> Jsont.Object.mem "isDefaultRef" Jsont.bool ~enc:(fun r -> r.is_default_ref) 110 - |> Jsont.Object.opt_mem "langBreakdown" lang_breakdown_jsont ~enc:(fun r -> r.lang_breakdown) 111 - |> Jsont.Object.finish 112 - 113 - type main = { 114 - committer_did : string; 115 - meta : meta; 116 - new_sha : string; 117 - old_sha : string; 118 - ref_ : string; 119 - repo_did : string; 120 - repo_name : string; 121 - } 122 - 123 - let main_jsont = 124 - Jsont.Object.map ~kind:"Main" 125 - (fun _typ committer_did meta new_sha old_sha ref_ repo_did repo_name -> { committer_did; meta; new_sha; old_sha; ref_; repo_did; repo_name }) 126 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate" ~enc:(fun _ -> "sh.tangled.git.refUpdate") 127 - |> Jsont.Object.mem "committerDid" Jsont.string ~enc:(fun r -> r.committer_did) 128 - |> Jsont.Object.mem "meta" meta_jsont ~enc:(fun r -> r.meta) 129 - |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 130 - |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 131 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 132 - |> Jsont.Object.mem "repoDid" Jsont.string ~enc:(fun r -> r.repo_did) 133 - |> Jsont.Object.mem "repoName" Jsont.string ~enc:(fun r -> r.repo_name) 134 - |> Jsont.Object.finish 135 - 136 - end 137 - end 138 - module Actor = struct 139 - module Profile = struct 140 - type main = { 141 - bluesky : bool; 142 - description : string option; 143 - links : string list option; 144 - location : string option; 145 - pinned_repositories : string list option; 146 - pronouns : string option; 147 - stats : string list option; 148 - } 149 - 150 - let main_jsont = 151 - Jsont.Object.map ~kind:"Main" 152 - (fun _typ bluesky description links location pinned_repositories pronouns stats -> { bluesky; description; links; location; pinned_repositories; pronouns; stats }) 153 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.actor.profile" ~enc:(fun _ -> "sh.tangled.actor.profile") 154 - |> Jsont.Object.mem "bluesky" Jsont.bool ~enc:(fun r -> r.bluesky) 155 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 156 - |> Jsont.Object.opt_mem "links" (Jsont.list Jsont.string) ~enc:(fun r -> r.links) 157 - |> Jsont.Object.opt_mem "location" Jsont.string ~enc:(fun r -> r.location) 158 - |> Jsont.Object.opt_mem "pinnedRepositories" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned_repositories) 159 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 160 - |> Jsont.Object.opt_mem "stats" (Jsont.list Jsont.string) ~enc:(fun r -> r.stats) 161 - |> Jsont.Object.finish 162 - 163 - end 164 - end 165 module String = struct 166 type main = { 167 contents : string; ··· 181 |> Jsont.Object.finish 182 183 end 184 - module Feed = struct 185 - module Star = struct 186 type main = { 187 created_at : string; 188 - subject : string; 189 } 190 191 let main_jsont = 192 Jsont.Object.map ~kind:"Main" 193 - (fun _typ created_at subject -> { created_at; subject }) 194 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.star" ~enc:(fun _ -> "sh.tangled.feed.star") 195 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 196 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 197 |> Jsont.Object.finish 198 199 - end 200 - module Reaction = struct 201 type main = { 202 created_at : string; 203 - reaction : string; 204 subject : string; 205 } 206 207 let main_jsont = 208 Jsont.Object.map ~kind:"Main" 209 - (fun _typ created_at reaction subject -> { created_at; reaction; subject }) 210 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.reaction" ~enc:(fun _ -> "sh.tangled.feed.reaction") 211 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 212 - |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 213 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 214 |> Jsont.Object.finish 215 ··· 243 |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 244 |> Jsont.Object.finish 245 246 - module Artifact = struct 247 - type main = { 248 - artifact : Atp.Blob_ref.t; 249 - created_at : string; 250 - name : string; 251 - repo : string; 252 - tag : string; 253 - } 254 - 255 - let main_jsont = 256 - Jsont.Object.map ~kind:"Main" 257 - (fun _typ artifact created_at name repo tag -> { artifact; created_at; name; repo; tag }) 258 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.artifact" ~enc:(fun _ -> "sh.tangled.repo.artifact") 259 - |> Jsont.Object.mem "artifact" Atp.Blob_ref.jsont ~enc:(fun r -> r.artifact) 260 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 261 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 262 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 263 - |> Jsont.Object.mem "tag" Jsont.binary_string ~enc:(fun r -> r.tag) 264 - |> Jsont.Object.finish 265 - 266 - end 267 - module MergeCheck = struct 268 - type conflict_info = { 269 - filename : string; 270 - reason : string; 271 } 272 273 - let conflict_info_jsont = 274 - Jsont.Object.map ~kind:"Conflict_info" 275 - (fun _typ filename reason -> { filename; reason }) 276 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#conflictInfo" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#conflictInfo") 277 - |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 278 - |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 279 |> Jsont.Object.finish 280 281 - type input = { 282 - branch : string; 283 - did : string; 284 - name : string; 285 - patch : string; 286 - } 287 - 288 - let input_jsont = 289 - Jsont.Object.map ~kind:"Input" 290 - (fun _typ branch did name patch -> { branch; did; name; patch }) 291 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#input" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#input") 292 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 293 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 294 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 295 - |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 296 - |> Jsont.Object.finish 297 - 298 - type output = { 299 - conflicts : conflict_info list option; 300 - error : string option; 301 - is_conflicted : bool; 302 - message : string option; 303 - } 304 - 305 - let output_jsont = 306 - Jsont.Object.map ~kind:"Output" 307 - (fun _typ conflicts error is_conflicted message -> { conflicts; error; is_conflicted; message }) 308 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#output" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#output") 309 - |> Jsont.Object.opt_mem "conflicts" (Jsont.list conflict_info_jsont) ~enc:(fun r -> r.conflicts) 310 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 311 - |> Jsont.Object.mem "is_conflicted" Jsont.bool ~enc:(fun r -> r.is_conflicted) 312 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 313 - |> Jsont.Object.finish 314 - 315 - end 316 - module Tree = struct 317 type readme = { 318 contents : string; 319 filename : string; ··· 325 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#readme" ~enc:(fun _ -> "sh.tangled.repo.tree#readme") 326 |> Jsont.Object.mem "contents" Jsont.string ~enc:(fun r -> r.contents) 327 |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 328 - |> Jsont.Object.finish 329 - 330 - type last_commit = { 331 - hash : string; 332 - message : string; 333 - when_ : string; 334 - } 335 - 336 - let last_commit_jsont = 337 - Jsont.Object.map ~kind:"Last_commit" 338 - (fun _typ hash message when_ -> { hash; message; when_ }) 339 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#lastCommit" ~enc:(fun _ -> "sh.tangled.repo.tree#lastCommit") 340 - |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 341 - |> Jsont.Object.mem "message" Jsont.string ~enc:(fun r -> r.message) 342 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 343 |> Jsont.Object.finish 344 345 type tree_entry = { ··· 400 |> Jsont.Object.finish 401 402 end 403 module SetDefaultBranch = struct 404 type input = { 405 default_branch : string; ··· 415 |> Jsont.Object.finish 416 417 end 418 - module Compare = struct 419 - type params = { 420 repo : string; 421 - rev1 : string; 422 - rev2 : string; 423 } 424 425 - let params_jsont = 426 - Jsont.Object.map ~kind:"Params" 427 - (fun repo rev1 rev2 -> { 428 - repo; 429 - rev1; 430 - rev2; 431 - }) 432 - |> Jsont.Object.mem "repo" Jsont.string 433 - ~enc:(fun r -> r.repo) 434 - |> Jsont.Object.mem "rev1" Jsont.string 435 - ~enc:(fun r -> r.rev1) 436 - |> Jsont.Object.mem "rev2" Jsont.string 437 - ~enc:(fun r -> r.rev2) 438 |> Jsont.Object.finish 439 440 - type output = unit 441 - let output_jsont = Jsont.ignore 442 443 end 444 module Merge = struct ··· 468 |> Jsont.Object.finish 469 470 end 471 - module Tags = struct 472 type params = { 473 cursor : string option; 474 limit : int option; 475 repo : string; 476 } 477 478 let params_jsont = 479 Jsont.Object.map ~kind:"Params" 480 - (fun cursor limit repo -> { 481 cursor; 482 limit; 483 repo; 484 }) 485 |> Jsont.Object.opt_mem "cursor" Jsont.string 486 ~enc:(fun r -> r.cursor) 487 |> Jsont.Object.opt_mem "limit" Jsont.int 488 ~enc:(fun r -> r.limit) 489 |> Jsont.Object.mem "repo" Jsont.string 490 ~enc:(fun r -> r.repo) 491 |> Jsont.Object.finish ··· 494 let output_jsont = Jsont.ignore 495 496 end 497 - module Collaborator = struct 498 - type main = { 499 created_at : string; 500 repo : string; 501 - subject : string; 502 } 503 504 - let main_jsont = 505 - Jsont.Object.map ~kind:"Main" 506 - (fun _typ created_at repo subject -> { created_at; repo; subject }) 507 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.collaborator" ~enc:(fun _ -> "sh.tangled.repo.collaborator") 508 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 509 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 510 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 511 |> Jsont.Object.finish 512 513 end 514 - module Branches = struct 515 type params = { 516 - cursor : string option; 517 - limit : int option; 518 repo : string; 519 } 520 521 let params_jsont = 522 Jsont.Object.map ~kind:"Params" 523 - (fun cursor limit repo -> { 524 - cursor; 525 - limit; 526 repo; 527 }) 528 - |> Jsont.Object.opt_mem "cursor" Jsont.string 529 - ~enc:(fun r -> r.cursor) 530 - |> Jsont.Object.opt_mem "limit" Jsont.int 531 - ~enc:(fun r -> r.limit) 532 |> Jsont.Object.mem "repo" Jsont.string 533 ~enc:(fun r -> r.repo) 534 |> Jsont.Object.finish 535 536 - type output = unit 537 - let output_jsont = Jsont.ignore 538 539 end 540 module GetDefaultBranch = struct ··· 588 |> Jsont.Object.finish 589 590 end 591 - module Create = struct 592 type input = { 593 - default_branch : string option; 594 - rkey : string; 595 - source : string option; 596 } 597 598 let input_jsont = 599 Jsont.Object.map ~kind:"Input" 600 - (fun _typ default_branch rkey source -> { default_branch; rkey; source }) 601 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.create#input" ~enc:(fun _ -> "sh.tangled.repo.create#input") 602 - |> Jsont.Object.opt_mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 603 - |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 604 - |> Jsont.Object.opt_mem "source" Jsont.string ~enc:(fun r -> r.source) 605 |> Jsont.Object.finish 606 607 end ··· 637 |> Jsont.Object.finish 638 639 end 640 module Branch = struct 641 type signature = { 642 email : string; ··· 694 |> Jsont.Object.finish 695 696 end 697 - module DeleteBranch = struct 698 - type input = { 699 - branch : string; 700 - repo : string; 701 - } 702 - 703 - let input_jsont = 704 - Jsont.Object.map ~kind:"Input" 705 - (fun _typ branch repo -> { branch; repo }) 706 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.deleteBranch#input" ~enc:(fun _ -> "sh.tangled.repo.deleteBranch#input") 707 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 708 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 709 - |> Jsont.Object.finish 710 - 711 - end 712 - module Log = struct 713 - type params = { 714 - cursor : string option; 715 - limit : int option; 716 - path : string option; 717 - ref_ : string; 718 - repo : string; 719 } 720 721 - let params_jsont = 722 - Jsont.Object.map ~kind:"Params" 723 - (fun cursor limit path ref_ repo -> { 724 - cursor; 725 - limit; 726 - path; 727 - ref_; 728 - repo; 729 - }) 730 - |> Jsont.Object.opt_mem "cursor" Jsont.string 731 - ~enc:(fun r -> r.cursor) 732 - |> Jsont.Object.opt_mem "limit" Jsont.int 733 - ~enc:(fun r -> r.limit) 734 - |> Jsont.Object.opt_mem "path" Jsont.string 735 - ~enc:(fun r -> r.path) 736 - |> Jsont.Object.mem "ref" Jsont.string 737 - ~enc:(fun r -> r.ref_) 738 - |> Jsont.Object.mem "repo" Jsont.string 739 - ~enc:(fun r -> r.repo) 740 |> Jsont.Object.finish 741 742 - type output = unit 743 - let output_jsont = Jsont.ignore 744 - 745 - end 746 - module Blob = struct 747 type submodule = { 748 branch : string option; 749 name : string; ··· 757 |> Jsont.Object.opt_mem "branch" Jsont.string ~enc:(fun r -> r.branch) 758 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 759 |> Jsont.Object.mem "url" Jsont.string ~enc:(fun r -> r.url) 760 - |> Jsont.Object.finish 761 - 762 - type signature = { 763 - email : string; 764 - name : string; 765 - when_ : string; 766 - } 767 - 768 - let signature_jsont = 769 - Jsont.Object.map ~kind:"Signature" 770 - (fun _typ email name when_ -> { email; name; when_ }) 771 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.blob#signature" ~enc:(fun _ -> "sh.tangled.repo.blob#signature") 772 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 773 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 774 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 775 |> Jsont.Object.finish 776 777 type last_commit = { ··· 846 |> Jsont.Object.finish 847 848 end 849 - module RemoveSecret = struct 850 - type input = { 851 - key : string; 852 repo : string; 853 } 854 855 - let input_jsont = 856 - Jsont.Object.map ~kind:"Input" 857 - (fun _typ key repo -> { key; repo }) 858 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.removeSecret#input" ~enc:(fun _ -> "sh.tangled.repo.removeSecret#input") 859 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 860 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 861 |> Jsont.Object.finish 862 863 end 864 - module Languages = struct 865 - type language = { 866 - color : string option; 867 - extensions : string list option; 868 - file_count : int option; 869 - name : string; 870 - percentage : int; 871 - size : int; 872 - } 873 - 874 - let language_jsont = 875 - Jsont.Object.map ~kind:"Language" 876 - (fun _typ color extensions file_count name percentage size -> { color; extensions; file_count; name; percentage; size }) 877 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#language" ~enc:(fun _ -> "sh.tangled.repo.languages#language") 878 - |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 879 - |> Jsont.Object.opt_mem "extensions" (Jsont.list Jsont.string) ~enc:(fun r -> r.extensions) 880 - |> Jsont.Object.opt_mem "fileCount" Jsont.int ~enc:(fun r -> r.file_count) 881 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 882 - |> Jsont.Object.mem "percentage" Jsont.int ~enc:(fun r -> r.percentage) 883 - |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 884 - |> Jsont.Object.finish 885 - 886 type params = { 887 - ref_ : string option; 888 - repo : string; 889 - } 890 - 891 - let params_jsont = 892 - Jsont.Object.map ~kind:"Params" 893 - (fun ref_ repo -> { 894 - ref_; 895 - repo; 896 - }) 897 - |> Jsont.Object.opt_mem "ref" Jsont.string 898 - ~enc:(fun r -> r.ref_) 899 - |> Jsont.Object.mem "repo" Jsont.string 900 - ~enc:(fun r -> r.repo) 901 - |> Jsont.Object.finish 902 - 903 - type output = { 904 - languages : language list; 905 - ref_ : string; 906 - total_files : int option; 907 - total_size : int option; 908 - } 909 - 910 - let output_jsont = 911 - Jsont.Object.map ~kind:"Output" 912 - (fun _typ languages ref_ total_files total_size -> { languages; ref_; total_files; total_size }) 913 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#output" ~enc:(fun _ -> "sh.tangled.repo.languages#output") 914 - |> Jsont.Object.mem "languages" (Jsont.list language_jsont) ~enc:(fun r -> r.languages) 915 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 916 - |> Jsont.Object.opt_mem "totalFiles" Jsont.int ~enc:(fun r -> r.total_files) 917 - |> Jsont.Object.opt_mem "totalSize" Jsont.int ~enc:(fun r -> r.total_size) 918 - |> Jsont.Object.finish 919 - 920 - end 921 - module Diff = struct 922 - type params = { 923 ref_ : string; 924 repo : string; 925 } 926 927 let params_jsont = 928 Jsont.Object.map ~kind:"Params" 929 - (fun ref_ repo -> { 930 ref_; 931 repo; 932 }) 933 |> Jsont.Object.mem "ref" Jsont.string 934 ~enc:(fun r -> r.ref_) 935 |> Jsont.Object.mem "repo" Jsont.string ··· 940 let output_jsont = Jsont.ignore 941 942 end 943 - module ForkSync = struct 944 - type input = { 945 - branch : string; 946 - did : string; 947 - name : string; 948 - source : string; 949 - } 950 - 951 - let input_jsont = 952 - Jsont.Object.map ~kind:"Input" 953 - (fun _typ branch did name source -> { branch; did; name; source }) 954 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkSync#input" ~enc:(fun _ -> "sh.tangled.repo.forkSync#input") 955 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 956 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 957 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 958 - |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 959 - |> Jsont.Object.finish 960 - 961 - end 962 module AddSecret = struct 963 type input = { 964 key : string; ··· 976 |> Jsont.Object.finish 977 978 end 979 - module Delete = struct 980 - type input = { 981 - did : string; 982 name : string; 983 - rkey : string; 984 } 985 986 - let input_jsont = 987 - Jsont.Object.map ~kind:"Input" 988 - (fun _typ did name rkey -> { did; name; rkey }) 989 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.delete#input" ~enc:(fun _ -> "sh.tangled.repo.delete#input") 990 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 991 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 992 - |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 993 |> Jsont.Object.finish 994 995 - end 996 - module ListSecrets = struct 997 - type secret = { 998 - created_at : string; 999 - created_by : string; 1000 - key : string; 1001 - repo : string; 1002 } 1003 1004 - let secret_jsont = 1005 - Jsont.Object.map ~kind:"Secret" 1006 - (fun _typ created_at created_by key repo -> { created_at; created_by; key; repo }) 1007 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#secret" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#secret") 1008 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1009 - |> Jsont.Object.mem "createdBy" Jsont.string ~enc:(fun r -> r.created_by) 1010 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1011 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1012 |> Jsont.Object.finish 1013 1014 - type params = { 1015 - repo : string; 1016 } 1017 1018 - let params_jsont = 1019 - Jsont.Object.map ~kind:"Params" 1020 - (fun repo -> { 1021 - repo; 1022 - }) 1023 - |> Jsont.Object.mem "repo" Jsont.string 1024 - ~enc:(fun r -> r.repo) 1025 |> Jsont.Object.finish 1026 1027 - type output = { 1028 - secrets : secret list; 1029 } 1030 1031 - let output_jsont = 1032 - Jsont.Object.map ~kind:"Output" 1033 - (fun _typ secrets -> { secrets }) 1034 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#output" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#output") 1035 - |> Jsont.Object.mem "secrets" (Jsont.list secret_jsont) ~enc:(fun r -> r.secrets) 1036 |> Jsont.Object.finish 1037 1038 - end 1039 - module Archive = struct 1040 - type params = { 1041 - format : string option; 1042 - prefix : string option; 1043 ref_ : string; 1044 - repo : string; 1045 } 1046 1047 - let params_jsont = 1048 - Jsont.Object.map ~kind:"Params" 1049 - (fun format prefix ref_ repo -> { 1050 - format; 1051 - prefix; 1052 - ref_; 1053 - repo; 1054 - }) 1055 - |> Jsont.Object.opt_mem "format" Jsont.string 1056 - ~enc:(fun r -> r.format) 1057 - |> Jsont.Object.opt_mem "prefix" Jsont.string 1058 - ~enc:(fun r -> r.prefix) 1059 - |> Jsont.Object.mem "ref" Jsont.string 1060 - ~enc:(fun r -> r.ref_) 1061 - |> Jsont.Object.mem "repo" Jsont.string 1062 - ~enc:(fun r -> r.repo) 1063 |> Jsont.Object.finish 1064 1065 - type output = unit 1066 - let output_jsont = Jsont.ignore 1067 - 1068 - end 1069 - module HiddenRef = struct 1070 - type input = { 1071 - fork_ref : string; 1072 - remote_ref : string; 1073 repo : string; 1074 } 1075 1076 - let input_jsont = 1077 - Jsont.Object.map ~kind:"Input" 1078 - (fun _typ fork_ref remote_ref repo -> { fork_ref; remote_ref; repo }) 1079 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#input" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#input") 1080 - |> Jsont.Object.mem "forkRef" Jsont.string ~enc:(fun r -> r.fork_ref) 1081 - |> Jsont.Object.mem "remoteRef" Jsont.string ~enc:(fun r -> r.remote_ref) 1082 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1083 |> Jsont.Object.finish 1084 1085 - type output = { 1086 - error : string option; 1087 - ref_ : string option; 1088 - success : bool; 1089 } 1090 1091 - let output_jsont = 1092 - Jsont.Object.map ~kind:"Output" 1093 - (fun _typ error ref_ success -> { error; ref_; success }) 1094 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#output" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#output") 1095 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1096 - |> Jsont.Object.opt_mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1097 - |> Jsont.Object.mem "success" Jsont.bool ~enc:(fun r -> r.success) 1098 |> Jsont.Object.finish 1099 1100 - end 1101 - module Pull = struct 1102 - type target = { 1103 - branch : string; 1104 - repo : string; 1105 } 1106 1107 - let target_jsont = 1108 - Jsont.Object.map ~kind:"Target" 1109 - (fun _typ branch repo -> { branch; repo }) 1110 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#target" ~enc:(fun _ -> "sh.tangled.repo.pull#target") 1111 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1112 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1113 |> Jsont.Object.finish 1114 1115 - type source = { 1116 - branch : string; 1117 - repo : string option; 1118 - sha : string; 1119 } 1120 1121 - let source_jsont = 1122 - Jsont.Object.map ~kind:"Source" 1123 - (fun _typ branch repo sha -> { branch; repo; sha }) 1124 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#source" ~enc:(fun _ -> "sh.tangled.repo.pull#source") 1125 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1126 - |> Jsont.Object.opt_mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1127 - |> Jsont.Object.mem "sha" Jsont.string ~enc:(fun r -> r.sha) 1128 |> Jsont.Object.finish 1129 1130 type main = { 1131 - body : string option; 1132 - created_at : string; 1133 - mentions : string list option; 1134 - patch : string option; 1135 - patch_blob : Atp.Blob_ref.t; 1136 - references : string list option; 1137 - source : source option; 1138 - target : target; 1139 - title : string; 1140 } 1141 1142 let main_jsont = 1143 Jsont.Object.map ~kind:"Main" 1144 - (fun _typ body created_at mentions patch patch_blob references source target title -> { body; created_at; mentions; patch; patch_blob; references; source; target; title }) 1145 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull" ~enc:(fun _ -> "sh.tangled.repo.pull") 1146 - |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 1147 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1148 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1149 - |> Jsont.Object.opt_mem "patch" Jsont.string ~enc:(fun r -> r.patch) 1150 - |> Jsont.Object.mem "patchBlob" Atp.Blob_ref.jsont ~enc:(fun r -> r.patch_blob) 1151 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1152 - |> Jsont.Object.opt_mem "source" source_jsont ~enc:(fun r -> r.source) 1153 - |> Jsont.Object.mem "target" target_jsont ~enc:(fun r -> r.target) 1154 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1155 |> Jsont.Object.finish 1156 1157 - module Comment = struct 1158 type main = { 1159 - body : string; 1160 created_at : string; 1161 - mentions : string list option; 1162 - pull : string; 1163 - references : string list option; 1164 - } 1165 - 1166 - let main_jsont = 1167 - Jsont.Object.map ~kind:"Main" 1168 - (fun _typ body created_at mentions pull references -> { body; created_at; mentions; pull; references }) 1169 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.comment" ~enc:(fun _ -> "sh.tangled.repo.pull.comment") 1170 - |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 1171 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1172 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1173 - |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 1174 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1175 - |> Jsont.Object.finish 1176 - 1177 - end 1178 - module Status = struct 1179 - type main = { 1180 - pull : string; 1181 status : string; 1182 } 1183 1184 let main_jsont = 1185 Jsont.Object.map ~kind:"Main" 1186 - (fun _typ pull status -> { pull; status }) 1187 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.status" ~enc:(fun _ -> "sh.tangled.repo.pull.status") 1188 - |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 1189 |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1190 |> Jsont.Object.finish 1191 1192 - module Closed = struct 1193 - type main = string 1194 - let main_jsont = Jsont.string 1195 - 1196 - end 1197 - module Open = struct 1198 - type main = string 1199 - let main_jsont = Jsont.string 1200 - 1201 - end 1202 - module Merged = struct 1203 - type main = string 1204 - let main_jsont = Jsont.string 1205 - 1206 - end 1207 - end 1208 end 1209 - module Issue = struct 1210 - type main = { 1211 - body : string option; 1212 - created_at : string; 1213 - mentions : string list option; 1214 - references : string list option; 1215 - repo : string; 1216 - title : string; 1217 } 1218 1219 - let main_jsont = 1220 - Jsont.Object.map ~kind:"Main" 1221 - (fun _typ body created_at mentions references repo title -> { body; created_at; mentions; references; repo; title }) 1222 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue" ~enc:(fun _ -> "sh.tangled.repo.issue") 1223 - |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 1224 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1225 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1226 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1227 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1228 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1229 |> Jsont.Object.finish 1230 1231 - module Comment = struct 1232 - type main = { 1233 - body : string; 1234 - created_at : string; 1235 - issue : string; 1236 - mentions : string list option; 1237 - references : string list option; 1238 - reply_to : string option; 1239 } 1240 1241 - let main_jsont = 1242 - Jsont.Object.map ~kind:"Main" 1243 - (fun _typ body created_at issue mentions references reply_to -> { body; created_at; issue; mentions; references; reply_to }) 1244 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.comment" ~enc:(fun _ -> "sh.tangled.repo.issue.comment") 1245 - |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 1246 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1247 - |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 1248 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1249 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1250 - |> Jsont.Object.opt_mem "replyTo" Jsont.string ~enc:(fun r -> r.reply_to) 1251 |> Jsont.Object.finish 1252 1253 - end 1254 - module State = struct 1255 type main = { 1256 - issue : string; 1257 - state : string; 1258 } 1259 1260 let main_jsont = 1261 Jsont.Object.map ~kind:"Main" 1262 - (fun _typ issue state -> { issue; state }) 1263 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.state" ~enc:(fun _ -> "sh.tangled.repo.issue.state") 1264 - |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 1265 - |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 1266 |> Jsont.Object.finish 1267 1268 - module Closed = struct 1269 - type main = string 1270 - let main_jsont = Jsont.string 1271 - 1272 - end 1273 - module Open = struct 1274 - type main = string 1275 - let main_jsont = Jsont.string 1276 - 1277 - end 1278 - end 1279 end 1280 - end 1281 - module Label = struct 1282 module Definition = struct 1283 type value_type = { 1284 enum : string list option; ··· 1317 |> Jsont.Object.finish 1318 1319 end 1320 - module Op = struct 1321 - type operand = { 1322 - key : string; 1323 - value : string; 1324 - } 1325 - 1326 - let operand_jsont = 1327 - Jsont.Object.map ~kind:"Operand" 1328 - (fun _typ key value -> { key; value }) 1329 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op#operand" ~enc:(fun _ -> "sh.tangled.label.op#operand") 1330 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1331 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1332 - |> Jsont.Object.finish 1333 - 1334 - type main = { 1335 - add : operand list; 1336 - delete : operand list; 1337 - performed_at : string; 1338 - subject : string; 1339 - } 1340 - 1341 - let main_jsont = 1342 - Jsont.Object.map ~kind:"Main" 1343 - (fun _typ add delete performed_at subject -> { add; delete; performed_at; subject }) 1344 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op" ~enc:(fun _ -> "sh.tangled.label.op") 1345 - |> Jsont.Object.mem "add" (Jsont.list operand_jsont) ~enc:(fun r -> r.add) 1346 - |> Jsont.Object.mem "delete" (Jsont.list operand_jsont) ~enc:(fun r -> r.delete) 1347 - |> Jsont.Object.mem "performedAt" Jsont.string ~enc:(fun r -> r.performed_at) 1348 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1349 - |> Jsont.Object.finish 1350 - 1351 - end 1352 end 1353 - module Graph = struct 1354 - module Follow = struct 1355 type main = { 1356 created_at : string; 1357 - subject : string; 1358 } 1359 1360 let main_jsont = 1361 Jsont.Object.map ~kind:"Main" 1362 - (fun _typ created_at subject -> { created_at; subject }) 1363 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.graph.follow" ~enc:(fun _ -> "sh.tangled.graph.follow") 1364 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1365 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1366 |> Jsont.Object.finish 1367 1368 - end 1369 - end 1370 - module Knot = struct 1371 - type main = { 1372 - created_at : string; 1373 } 1374 1375 - let main_jsont = 1376 - Jsont.Object.map ~kind:"Main" 1377 - (fun _typ created_at -> { created_at }) 1378 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot" ~enc:(fun _ -> "sh.tangled.knot") 1379 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1380 |> Jsont.Object.finish 1381 1382 module Member = struct 1383 type main = { 1384 created_at : string; ··· 1443 |> Jsont.Object.finish 1444 1445 end 1446 - module Version = struct 1447 - type output = { 1448 - version : string; 1449 - } 1450 - 1451 - let output_jsont = 1452 - Jsont.Object.map ~kind:"Output" 1453 - (fun _typ version -> { version }) 1454 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.version#output" ~enc:(fun _ -> "sh.tangled.knot.version#output") 1455 - |> Jsont.Object.mem "version" Jsont.string ~enc:(fun r -> r.version) 1456 - |> Jsont.Object.finish 1457 - 1458 - end 1459 end 1460 - module Owner = struct 1461 - type output = { 1462 - owner : string; 1463 - } 1464 - 1465 - let output_jsont = 1466 - Jsont.Object.map ~kind:"Output" 1467 - (fun _typ owner -> { owner }) 1468 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.owner#output" ~enc:(fun _ -> "sh.tangled.owner#output") 1469 - |> Jsont.Object.mem "owner" Jsont.string ~enc:(fun r -> r.owner) 1470 - |> Jsont.Object.finish 1471 - 1472 - end 1473 - module PublicKey = struct 1474 type main = { 1475 created_at : string; 1476 - key : string; 1477 - name : string; 1478 } 1479 1480 let main_jsont = 1481 Jsont.Object.map ~kind:"Main" 1482 - (fun _typ created_at key name -> { created_at; key; name }) 1483 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.publicKey" ~enc:(fun _ -> "sh.tangled.publicKey") 1484 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1485 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1486 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1487 |> Jsont.Object.finish 1488 1489 end 1490 - module Pipeline = struct 1491 - type trigger_repo = { 1492 - default_branch : string; 1493 - did : string; 1494 - knot : string; 1495 - repo : string; 1496 - } 1497 - 1498 - let trigger_repo_jsont = 1499 - Jsont.Object.map ~kind:"Trigger_repo" 1500 - (fun _typ default_branch did knot repo -> { default_branch; did; knot; repo }) 1501 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerRepo" ~enc:(fun _ -> "sh.tangled.pipeline#triggerRepo") 1502 - |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 1503 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1504 - |> Jsont.Object.mem "knot" Jsont.string ~enc:(fun r -> r.knot) 1505 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1506 - |> Jsont.Object.finish 1507 - 1508 - type push_trigger_data = { 1509 - new_sha : string; 1510 - old_sha : string; 1511 - ref_ : string; 1512 } 1513 1514 - let push_trigger_data_jsont = 1515 - Jsont.Object.map ~kind:"Push_trigger_data" 1516 - (fun _typ new_sha old_sha ref_ -> { new_sha; old_sha; ref_ }) 1517 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pushTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pushTriggerData") 1518 - |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 1519 - |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 1520 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1521 |> Jsont.Object.finish 1522 1523 - type pull_request_trigger_data = { 1524 - action : string; 1525 - source_branch : string; 1526 - source_sha : string; 1527 - target_branch : string; 1528 } 1529 1530 - let pull_request_trigger_data_jsont = 1531 - Jsont.Object.map ~kind:"Pull_request_trigger_data" 1532 - (fun _typ action source_branch source_sha target_branch -> { action; source_branch; source_sha; target_branch }) 1533 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pullRequestTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pullRequestTriggerData") 1534 - |> Jsont.Object.mem "action" Jsont.string ~enc:(fun r -> r.action) 1535 - |> Jsont.Object.mem "sourceBranch" Jsont.string ~enc:(fun r -> r.source_branch) 1536 - |> Jsont.Object.mem "sourceSha" Jsont.string ~enc:(fun r -> r.source_sha) 1537 - |> Jsont.Object.mem "targetBranch" Jsont.string ~enc:(fun r -> r.target_branch) 1538 |> Jsont.Object.finish 1539 1540 - type pair = { 1541 - key : string; 1542 - value : string; 1543 } 1544 1545 - let pair_jsont = 1546 - Jsont.Object.map ~kind:"Pair" 1547 - (fun _typ key value -> { key; value }) 1548 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pair" ~enc:(fun _ -> "sh.tangled.pipeline#pair") 1549 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1550 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1551 |> Jsont.Object.finish 1552 1553 - type clone_opts = { 1554 - depth : int; 1555 - skip : bool; 1556 - submodules : bool; 1557 } 1558 1559 - let clone_opts_jsont = 1560 - Jsont.Object.map ~kind:"Clone_opts" 1561 - (fun _typ depth skip submodules -> { depth; skip; submodules }) 1562 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#cloneOpts" ~enc:(fun _ -> "sh.tangled.pipeline#cloneOpts") 1563 - |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 1564 - |> Jsont.Object.mem "skip" Jsont.bool ~enc:(fun r -> r.skip) 1565 - |> Jsont.Object.mem "submodules" Jsont.bool ~enc:(fun r -> r.submodules) 1566 |> Jsont.Object.finish 1567 1568 - type workflow = { 1569 - clone : clone_opts; 1570 - engine : string; 1571 - name : string; 1572 - raw : string; 1573 } 1574 1575 - let workflow_jsont = 1576 - Jsont.Object.map ~kind:"Workflow" 1577 - (fun _typ clone engine name raw -> { clone; engine; name; raw }) 1578 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#workflow" ~enc:(fun _ -> "sh.tangled.pipeline#workflow") 1579 - |> Jsont.Object.mem "clone" clone_opts_jsont ~enc:(fun r -> r.clone) 1580 - |> Jsont.Object.mem "engine" Jsont.string ~enc:(fun r -> r.engine) 1581 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1582 - |> Jsont.Object.mem "raw" Jsont.string ~enc:(fun r -> r.raw) 1583 |> Jsont.Object.finish 1584 1585 - type manual_trigger_data = { 1586 - inputs : pair list option; 1587 } 1588 1589 - let manual_trigger_data_jsont = 1590 - Jsont.Object.map ~kind:"Manual_trigger_data" 1591 - (fun _typ inputs -> { inputs }) 1592 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#manualTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#manualTriggerData") 1593 - |> Jsont.Object.opt_mem "inputs" (Jsont.list pair_jsont) ~enc:(fun r -> r.inputs) 1594 |> Jsont.Object.finish 1595 1596 - type trigger_metadata = { 1597 - kind : string; 1598 - manual : manual_trigger_data option; 1599 - pull_request : pull_request_trigger_data option; 1600 - push : push_trigger_data option; 1601 - repo : trigger_repo; 1602 } 1603 1604 - let trigger_metadata_jsont = 1605 - Jsont.Object.map ~kind:"Trigger_metadata" 1606 - (fun _typ kind manual pull_request push repo -> { kind; manual; pull_request; push; repo }) 1607 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerMetadata" ~enc:(fun _ -> "sh.tangled.pipeline#triggerMetadata") 1608 - |> Jsont.Object.mem "kind" Jsont.string ~enc:(fun r -> r.kind) 1609 - |> Jsont.Object.opt_mem "manual" manual_trigger_data_jsont ~enc:(fun r -> r.manual) 1610 - |> Jsont.Object.opt_mem "pullRequest" pull_request_trigger_data_jsont ~enc:(fun r -> r.pull_request) 1611 - |> Jsont.Object.opt_mem "push" push_trigger_data_jsont ~enc:(fun r -> r.push) 1612 - |> Jsont.Object.mem "repo" trigger_repo_jsont ~enc:(fun r -> r.repo) 1613 |> Jsont.Object.finish 1614 1615 type main = { 1616 - trigger_metadata : trigger_metadata; 1617 - workflows : workflow list; 1618 } 1619 1620 let main_jsont = 1621 Jsont.Object.map ~kind:"Main" 1622 - (fun _typ trigger_metadata workflows -> { trigger_metadata; workflows }) 1623 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline" ~enc:(fun _ -> "sh.tangled.pipeline") 1624 - |> Jsont.Object.mem "triggerMetadata" trigger_metadata_jsont ~enc:(fun r -> r.trigger_metadata) 1625 - |> Jsont.Object.mem "workflows" (Jsont.list workflow_jsont) ~enc:(fun r -> r.workflows) 1626 |> Jsont.Object.finish 1627 1628 - module Status = struct 1629 type main = { 1630 - created_at : string; 1631 - error : string option; 1632 - exit_code : int option; 1633 - pipeline : string; 1634 - status : string; 1635 - workflow : string; 1636 } 1637 1638 let main_jsont = 1639 Jsont.Object.map ~kind:"Main" 1640 - (fun _typ created_at error exit_code pipeline status workflow -> { created_at; error; exit_code; pipeline; status; workflow }) 1641 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline.status" ~enc:(fun _ -> "sh.tangled.pipeline.status") 1642 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1643 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1644 - |> Jsont.Object.opt_mem "exitCode" Jsont.int ~enc:(fun r -> r.exit_code) 1645 - |> Jsont.Object.mem "pipeline" Jsont.string ~enc:(fun r -> r.pipeline) 1646 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1647 - |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 1648 |> Jsont.Object.finish 1649 1650 end
··· 15 16 module Sh = struct 17 module Tangled = struct 18 module String = struct 19 type main = { 20 contents : string; ··· 34 |> Jsont.Object.finish 35 36 end 37 + module Spindle = struct 38 type main = { 39 created_at : string; 40 } 41 42 let main_jsont = 43 Jsont.Object.map ~kind:"Main" 44 + (fun _typ created_at -> { created_at }) 45 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.spindle" ~enc:(fun _ -> "sh.tangled.spindle") 46 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 47 |> Jsont.Object.finish 48 49 + module Member = struct 50 type main = { 51 created_at : string; 52 + instance : string; 53 subject : string; 54 } 55 56 let main_jsont = 57 Jsont.Object.map ~kind:"Main" 58 + (fun _typ created_at instance subject -> { created_at; instance; subject }) 59 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.spindle.member" ~enc:(fun _ -> "sh.tangled.spindle.member") 60 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 61 + |> Jsont.Object.mem "instance" Jsont.string ~enc:(fun r -> r.instance) 62 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 63 |> Jsont.Object.finish 64 ··· 92 |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 93 |> Jsont.Object.finish 94 95 + module Tree = struct 96 + type last_commit = { 97 + hash : string; 98 + message : string; 99 + when_ : string; 100 } 101 102 + let last_commit_jsont = 103 + Jsont.Object.map ~kind:"Last_commit" 104 + (fun _typ hash message when_ -> { hash; message; when_ }) 105 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#lastCommit" ~enc:(fun _ -> "sh.tangled.repo.tree#lastCommit") 106 + |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 107 + |> Jsont.Object.mem "message" Jsont.string ~enc:(fun r -> r.message) 108 + |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 109 |> Jsont.Object.finish 110 111 type readme = { 112 contents : string; 113 filename : string; ··· 119 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#readme" ~enc:(fun _ -> "sh.tangled.repo.tree#readme") 120 |> Jsont.Object.mem "contents" Jsont.string ~enc:(fun r -> r.contents) 121 |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 122 |> Jsont.Object.finish 123 124 type tree_entry = { ··· 179 |> Jsont.Object.finish 180 181 end 182 + module Tags = struct 183 + type params = { 184 + cursor : string option; 185 + limit : int option; 186 + repo : string; 187 + } 188 + 189 + let params_jsont = 190 + Jsont.Object.map ~kind:"Params" 191 + (fun cursor limit repo -> { 192 + cursor; 193 + limit; 194 + repo; 195 + }) 196 + |> Jsont.Object.opt_mem "cursor" Jsont.string 197 + ~enc:(fun r -> r.cursor) 198 + |> Jsont.Object.opt_mem "limit" Jsont.int 199 + ~enc:(fun r -> r.limit) 200 + |> Jsont.Object.mem "repo" Jsont.string 201 + ~enc:(fun r -> r.repo) 202 + |> Jsont.Object.finish 203 + 204 + type output = unit 205 + let output_jsont = Jsont.ignore 206 + 207 + end 208 module SetDefaultBranch = struct 209 type input = { 210 default_branch : string; ··· 220 |> Jsont.Object.finish 221 222 end 223 + module RemoveSecret = struct 224 + type input = { 225 + key : string; 226 repo : string; 227 } 228 229 + let input_jsont = 230 + Jsont.Object.map ~kind:"Input" 231 + (fun _typ key repo -> { key; repo }) 232 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.removeSecret#input" ~enc:(fun _ -> "sh.tangled.repo.removeSecret#input") 233 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 234 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 235 + |> Jsont.Object.finish 236 + 237 + end 238 + module Pull = struct 239 + type source = { 240 + branch : string; 241 + repo : string option; 242 + sha : string; 243 + } 244 + 245 + let source_jsont = 246 + Jsont.Object.map ~kind:"Source" 247 + (fun _typ branch repo sha -> { branch; repo; sha }) 248 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#source" ~enc:(fun _ -> "sh.tangled.repo.pull#source") 249 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 250 + |> Jsont.Object.opt_mem "repo" Jsont.string ~enc:(fun r -> r.repo) 251 + |> Jsont.Object.mem "sha" Jsont.string ~enc:(fun r -> r.sha) 252 + |> Jsont.Object.finish 253 + 254 + type target = { 255 + branch : string; 256 + repo : string; 257 + } 258 + 259 + let target_jsont = 260 + Jsont.Object.map ~kind:"Target" 261 + (fun _typ branch repo -> { branch; repo }) 262 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#target" ~enc:(fun _ -> "sh.tangled.repo.pull#target") 263 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 264 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 265 + |> Jsont.Object.finish 266 + 267 + type main = { 268 + body : string option; 269 + created_at : string; 270 + mentions : string list option; 271 + patch : string option; 272 + patch_blob : Atp.Blob_ref.t; 273 + references : string list option; 274 + source : source option; 275 + target : target; 276 + title : string; 277 + } 278 + 279 + let main_jsont = 280 + Jsont.Object.map ~kind:"Main" 281 + (fun _typ body created_at mentions patch patch_blob references source target title -> { body; created_at; mentions; patch; patch_blob; references; source; target; title }) 282 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull" ~enc:(fun _ -> "sh.tangled.repo.pull") 283 + |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 284 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 285 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 286 + |> Jsont.Object.opt_mem "patch" Jsont.string ~enc:(fun r -> r.patch) 287 + |> Jsont.Object.mem "patchBlob" Atp.Blob_ref.jsont ~enc:(fun r -> r.patch_blob) 288 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 289 + |> Jsont.Object.opt_mem "source" source_jsont ~enc:(fun r -> r.source) 290 + |> Jsont.Object.mem "target" target_jsont ~enc:(fun r -> r.target) 291 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 292 + |> Jsont.Object.finish 293 + 294 + module Status = struct 295 + type main = { 296 + pull : string; 297 + status : string; 298 + } 299 + 300 + let main_jsont = 301 + Jsont.Object.map ~kind:"Main" 302 + (fun _typ pull status -> { pull; status }) 303 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.status" ~enc:(fun _ -> "sh.tangled.repo.pull.status") 304 + |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 305 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 306 + |> Jsont.Object.finish 307 + 308 + module Open = struct 309 + type main = string 310 + let main_jsont = Jsont.string 311 + 312 + end 313 + module Merged = struct 314 + type main = string 315 + let main_jsont = Jsont.string 316 + 317 + end 318 + module Closed = struct 319 + type main = string 320 + let main_jsont = Jsont.string 321 + 322 + end 323 + end 324 + module Comment = struct 325 + type main = { 326 + body : string; 327 + created_at : string; 328 + mentions : string list option; 329 + pull : string; 330 + references : string list option; 331 + } 332 + 333 + let main_jsont = 334 + Jsont.Object.map ~kind:"Main" 335 + (fun _typ body created_at mentions pull references -> { body; created_at; mentions; pull; references }) 336 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.comment" ~enc:(fun _ -> "sh.tangled.repo.pull.comment") 337 + |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 338 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 339 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 340 + |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 341 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 342 + |> Jsont.Object.finish 343 + 344 + end 345 + end 346 + module MergeCheck = struct 347 + type conflict_info = { 348 + filename : string; 349 + reason : string; 350 + } 351 + 352 + let conflict_info_jsont = 353 + Jsont.Object.map ~kind:"Conflict_info" 354 + (fun _typ filename reason -> { filename; reason }) 355 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#conflictInfo" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#conflictInfo") 356 + |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 357 + |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 358 + |> Jsont.Object.finish 359 + 360 + type input = { 361 + branch : string; 362 + did : string; 363 + name : string; 364 + patch : string; 365 + } 366 + 367 + let input_jsont = 368 + Jsont.Object.map ~kind:"Input" 369 + (fun _typ branch did name patch -> { branch; did; name; patch }) 370 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#input" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#input") 371 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 372 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 373 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 374 + |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 375 |> Jsont.Object.finish 376 377 + type output = { 378 + conflicts : conflict_info list option; 379 + error : string option; 380 + is_conflicted : bool; 381 + message : string option; 382 + } 383 + 384 + let output_jsont = 385 + Jsont.Object.map ~kind:"Output" 386 + (fun _typ conflicts error is_conflicted message -> { conflicts; error; is_conflicted; message }) 387 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#output" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#output") 388 + |> Jsont.Object.opt_mem "conflicts" (Jsont.list conflict_info_jsont) ~enc:(fun r -> r.conflicts) 389 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 390 + |> Jsont.Object.mem "is_conflicted" Jsont.bool ~enc:(fun r -> r.is_conflicted) 391 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 392 + |> Jsont.Object.finish 393 394 end 395 module Merge = struct ··· 419 |> Jsont.Object.finish 420 421 end 422 + module Log = struct 423 type params = { 424 cursor : string option; 425 limit : int option; 426 + path : string option; 427 + ref_ : string; 428 repo : string; 429 } 430 431 let params_jsont = 432 Jsont.Object.map ~kind:"Params" 433 + (fun cursor limit path ref_ repo -> { 434 cursor; 435 limit; 436 + path; 437 + ref_; 438 repo; 439 }) 440 |> Jsont.Object.opt_mem "cursor" Jsont.string 441 ~enc:(fun r -> r.cursor) 442 |> Jsont.Object.opt_mem "limit" Jsont.int 443 ~enc:(fun r -> r.limit) 444 + |> Jsont.Object.opt_mem "path" Jsont.string 445 + ~enc:(fun r -> r.path) 446 + |> Jsont.Object.mem "ref" Jsont.string 447 + ~enc:(fun r -> r.ref_) 448 |> Jsont.Object.mem "repo" Jsont.string 449 ~enc:(fun r -> r.repo) 450 |> Jsont.Object.finish ··· 453 let output_jsont = Jsont.ignore 454 455 end 456 + module ListSecrets = struct 457 + type secret = { 458 created_at : string; 459 + created_by : string; 460 + key : string; 461 repo : string; 462 } 463 464 + let secret_jsont = 465 + Jsont.Object.map ~kind:"Secret" 466 + (fun _typ created_at created_by key repo -> { created_at; created_by; key; repo }) 467 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#secret" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#secret") 468 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 469 + |> Jsont.Object.mem "createdBy" Jsont.string ~enc:(fun r -> r.created_by) 470 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 471 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 472 + |> Jsont.Object.finish 473 + 474 + type params = { 475 + repo : string; 476 + } 477 + 478 + let params_jsont = 479 + Jsont.Object.map ~kind:"Params" 480 + (fun repo -> { 481 + repo; 482 + }) 483 + |> Jsont.Object.mem "repo" Jsont.string 484 + ~enc:(fun r -> r.repo) 485 + |> Jsont.Object.finish 486 + 487 + type output = { 488 + secrets : secret list; 489 + } 490 + 491 + let output_jsont = 492 + Jsont.Object.map ~kind:"Output" 493 + (fun _typ secrets -> { secrets }) 494 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#output" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#output") 495 + |> Jsont.Object.mem "secrets" (Jsont.list secret_jsont) ~enc:(fun r -> r.secrets) 496 |> Jsont.Object.finish 497 498 end 499 + module Languages = struct 500 + type language = { 501 + color : string option; 502 + extensions : string list option; 503 + file_count : int option; 504 + name : string; 505 + percentage : int; 506 + size : int; 507 + } 508 + 509 + let language_jsont = 510 + Jsont.Object.map ~kind:"Language" 511 + (fun _typ color extensions file_count name percentage size -> { color; extensions; file_count; name; percentage; size }) 512 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#language" ~enc:(fun _ -> "sh.tangled.repo.languages#language") 513 + |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 514 + |> Jsont.Object.opt_mem "extensions" (Jsont.list Jsont.string) ~enc:(fun r -> r.extensions) 515 + |> Jsont.Object.opt_mem "fileCount" Jsont.int ~enc:(fun r -> r.file_count) 516 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 517 + |> Jsont.Object.mem "percentage" Jsont.int ~enc:(fun r -> r.percentage) 518 + |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 519 + |> Jsont.Object.finish 520 + 521 type params = { 522 + ref_ : string option; 523 repo : string; 524 } 525 526 let params_jsont = 527 Jsont.Object.map ~kind:"Params" 528 + (fun ref_ repo -> { 529 + ref_; 530 repo; 531 }) 532 + |> Jsont.Object.opt_mem "ref" Jsont.string 533 + ~enc:(fun r -> r.ref_) 534 |> Jsont.Object.mem "repo" Jsont.string 535 ~enc:(fun r -> r.repo) 536 |> Jsont.Object.finish 537 538 + type output = { 539 + languages : language list; 540 + ref_ : string; 541 + total_files : int option; 542 + total_size : int option; 543 + } 544 + 545 + let output_jsont = 546 + Jsont.Object.map ~kind:"Output" 547 + (fun _typ languages ref_ total_files total_size -> { languages; ref_; total_files; total_size }) 548 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#output" ~enc:(fun _ -> "sh.tangled.repo.languages#output") 549 + |> Jsont.Object.mem "languages" (Jsont.list language_jsont) ~enc:(fun r -> r.languages) 550 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 551 + |> Jsont.Object.opt_mem "totalFiles" Jsont.int ~enc:(fun r -> r.total_files) 552 + |> Jsont.Object.opt_mem "totalSize" Jsont.int ~enc:(fun r -> r.total_size) 553 + |> Jsont.Object.finish 554 + 555 + end 556 + module Issue = struct 557 + type main = { 558 + body : string option; 559 + created_at : string; 560 + mentions : string list option; 561 + references : string list option; 562 + repo : string; 563 + title : string; 564 + } 565 + 566 + let main_jsont = 567 + Jsont.Object.map ~kind:"Main" 568 + (fun _typ body created_at mentions references repo title -> { body; created_at; mentions; references; repo; title }) 569 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue" ~enc:(fun _ -> "sh.tangled.repo.issue") 570 + |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 571 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 572 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 573 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 574 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 575 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 576 + |> Jsont.Object.finish 577 + 578 + module State = struct 579 + type main = { 580 + issue : string; 581 + state : string; 582 + } 583 + 584 + let main_jsont = 585 + Jsont.Object.map ~kind:"Main" 586 + (fun _typ issue state -> { issue; state }) 587 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.state" ~enc:(fun _ -> "sh.tangled.repo.issue.state") 588 + |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 589 + |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 590 + |> Jsont.Object.finish 591 + 592 + module Open = struct 593 + type main = string 594 + let main_jsont = Jsont.string 595 + 596 + end 597 + module Closed = struct 598 + type main = string 599 + let main_jsont = Jsont.string 600 + 601 + end 602 + end 603 + module Comment = struct 604 + type main = { 605 + body : string; 606 + created_at : string; 607 + issue : string; 608 + mentions : string list option; 609 + references : string list option; 610 + reply_to : string option; 611 + } 612 + 613 + let main_jsont = 614 + Jsont.Object.map ~kind:"Main" 615 + (fun _typ body created_at issue mentions references reply_to -> { body; created_at; issue; mentions; references; reply_to }) 616 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.comment" ~enc:(fun _ -> "sh.tangled.repo.issue.comment") 617 + |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 618 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 619 + |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 620 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 621 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 622 + |> Jsont.Object.opt_mem "replyTo" Jsont.string ~enc:(fun r -> r.reply_to) 623 + |> Jsont.Object.finish 624 + 625 + end 626 + end 627 + module HiddenRef = struct 628 + type input = { 629 + fork_ref : string; 630 + remote_ref : string; 631 + repo : string; 632 + } 633 + 634 + let input_jsont = 635 + Jsont.Object.map ~kind:"Input" 636 + (fun _typ fork_ref remote_ref repo -> { fork_ref; remote_ref; repo }) 637 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#input" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#input") 638 + |> Jsont.Object.mem "forkRef" Jsont.string ~enc:(fun r -> r.fork_ref) 639 + |> Jsont.Object.mem "remoteRef" Jsont.string ~enc:(fun r -> r.remote_ref) 640 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 641 + |> Jsont.Object.finish 642 + 643 + type output = { 644 + error : string option; 645 + ref_ : string option; 646 + success : bool; 647 + } 648 + 649 + let output_jsont = 650 + Jsont.Object.map ~kind:"Output" 651 + (fun _typ error ref_ success -> { error; ref_; success }) 652 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#output" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#output") 653 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 654 + |> Jsont.Object.opt_mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 655 + |> Jsont.Object.mem "success" Jsont.bool ~enc:(fun r -> r.success) 656 + |> Jsont.Object.finish 657 658 end 659 module GetDefaultBranch = struct ··· 707 |> Jsont.Object.finish 708 709 end 710 + module ForkSync = struct 711 type input = { 712 + branch : string; 713 + did : string; 714 + name : string; 715 + source : string; 716 } 717 718 let input_jsont = 719 Jsont.Object.map ~kind:"Input" 720 + (fun _typ branch did name source -> { branch; did; name; source }) 721 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkSync#input" ~enc:(fun _ -> "sh.tangled.repo.forkSync#input") 722 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 723 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 724 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 725 + |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 726 |> Jsont.Object.finish 727 728 end ··· 758 |> Jsont.Object.finish 759 760 end 761 + module Diff = struct 762 + type params = { 763 + ref_ : string; 764 + repo : string; 765 + } 766 + 767 + let params_jsont = 768 + Jsont.Object.map ~kind:"Params" 769 + (fun ref_ repo -> { 770 + ref_; 771 + repo; 772 + }) 773 + |> Jsont.Object.mem "ref" Jsont.string 774 + ~enc:(fun r -> r.ref_) 775 + |> Jsont.Object.mem "repo" Jsont.string 776 + ~enc:(fun r -> r.repo) 777 + |> Jsont.Object.finish 778 + 779 + type output = unit 780 + let output_jsont = Jsont.ignore 781 + 782 + end 783 + module DeleteBranch = struct 784 + type input = { 785 + branch : string; 786 + repo : string; 787 + } 788 + 789 + let input_jsont = 790 + Jsont.Object.map ~kind:"Input" 791 + (fun _typ branch repo -> { branch; repo }) 792 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.deleteBranch#input" ~enc:(fun _ -> "sh.tangled.repo.deleteBranch#input") 793 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 794 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 795 + |> Jsont.Object.finish 796 + 797 + end 798 + module Delete = struct 799 + type input = { 800 + did : string; 801 + name : string; 802 + rkey : string; 803 + } 804 + 805 + let input_jsont = 806 + Jsont.Object.map ~kind:"Input" 807 + (fun _typ did name rkey -> { did; name; rkey }) 808 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.delete#input" ~enc:(fun _ -> "sh.tangled.repo.delete#input") 809 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 810 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 811 + |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 812 + |> Jsont.Object.finish 813 + 814 + end 815 + module Create = struct 816 + type input = { 817 + default_branch : string option; 818 + rkey : string; 819 + source : string option; 820 + } 821 + 822 + let input_jsont = 823 + Jsont.Object.map ~kind:"Input" 824 + (fun _typ default_branch rkey source -> { default_branch; rkey; source }) 825 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.create#input" ~enc:(fun _ -> "sh.tangled.repo.create#input") 826 + |> Jsont.Object.opt_mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 827 + |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 828 + |> Jsont.Object.opt_mem "source" Jsont.string ~enc:(fun r -> r.source) 829 + |> Jsont.Object.finish 830 + 831 + end 832 + module Compare = struct 833 + type params = { 834 + repo : string; 835 + rev1 : string; 836 + rev2 : string; 837 + } 838 + 839 + let params_jsont = 840 + Jsont.Object.map ~kind:"Params" 841 + (fun repo rev1 rev2 -> { 842 + repo; 843 + rev1; 844 + rev2; 845 + }) 846 + |> Jsont.Object.mem "repo" Jsont.string 847 + ~enc:(fun r -> r.repo) 848 + |> Jsont.Object.mem "rev1" Jsont.string 849 + ~enc:(fun r -> r.rev1) 850 + |> Jsont.Object.mem "rev2" Jsont.string 851 + ~enc:(fun r -> r.rev2) 852 + |> Jsont.Object.finish 853 + 854 + type output = unit 855 + let output_jsont = Jsont.ignore 856 + 857 + end 858 + module Collaborator = struct 859 + type main = { 860 + created_at : string; 861 + repo : string; 862 + subject : string; 863 + } 864 + 865 + let main_jsont = 866 + Jsont.Object.map ~kind:"Main" 867 + (fun _typ created_at repo subject -> { created_at; repo; subject }) 868 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.collaborator" ~enc:(fun _ -> "sh.tangled.repo.collaborator") 869 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 870 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 871 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 872 + |> Jsont.Object.finish 873 + 874 + end 875 + module Branches = struct 876 + type params = { 877 + cursor : string option; 878 + limit : int option; 879 + repo : string; 880 + } 881 + 882 + let params_jsont = 883 + Jsont.Object.map ~kind:"Params" 884 + (fun cursor limit repo -> { 885 + cursor; 886 + limit; 887 + repo; 888 + }) 889 + |> Jsont.Object.opt_mem "cursor" Jsont.string 890 + ~enc:(fun r -> r.cursor) 891 + |> Jsont.Object.opt_mem "limit" Jsont.int 892 + ~enc:(fun r -> r.limit) 893 + |> Jsont.Object.mem "repo" Jsont.string 894 + ~enc:(fun r -> r.repo) 895 + |> Jsont.Object.finish 896 + 897 + type output = unit 898 + let output_jsont = Jsont.ignore 899 + 900 + end 901 module Branch = struct 902 type signature = { 903 email : string; ··· 955 |> Jsont.Object.finish 956 957 end 958 + module Blob = struct 959 + type signature = { 960 + email : string; 961 + name : string; 962 + when_ : string; 963 } 964 965 + let signature_jsont = 966 + Jsont.Object.map ~kind:"Signature" 967 + (fun _typ email name when_ -> { email; name; when_ }) 968 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.blob#signature" ~enc:(fun _ -> "sh.tangled.repo.blob#signature") 969 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 970 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 971 + |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 972 |> Jsont.Object.finish 973 974 type submodule = { 975 branch : string option; 976 name : string; ··· 984 |> Jsont.Object.opt_mem "branch" Jsont.string ~enc:(fun r -> r.branch) 985 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 986 |> Jsont.Object.mem "url" Jsont.string ~enc:(fun r -> r.url) 987 |> Jsont.Object.finish 988 989 type last_commit = { ··· 1058 |> Jsont.Object.finish 1059 1060 end 1061 + module Artifact = struct 1062 + type main = { 1063 + artifact : Atp.Blob_ref.t; 1064 + created_at : string; 1065 + name : string; 1066 repo : string; 1067 + tag : string; 1068 } 1069 1070 + let main_jsont = 1071 + Jsont.Object.map ~kind:"Main" 1072 + (fun _typ artifact created_at name repo tag -> { artifact; created_at; name; repo; tag }) 1073 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.artifact" ~enc:(fun _ -> "sh.tangled.repo.artifact") 1074 + |> Jsont.Object.mem "artifact" Atp.Blob_ref.jsont ~enc:(fun r -> r.artifact) 1075 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1076 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1077 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1078 + |> Jsont.Object.mem "tag" Jsont.binary_string ~enc:(fun r -> r.tag) 1079 |> Jsont.Object.finish 1080 1081 end 1082 + module Archive = struct 1083 type params = { 1084 + format : string option; 1085 + prefix : string option; 1086 ref_ : string; 1087 repo : string; 1088 } 1089 1090 let params_jsont = 1091 Jsont.Object.map ~kind:"Params" 1092 + (fun format prefix ref_ repo -> { 1093 + format; 1094 + prefix; 1095 ref_; 1096 repo; 1097 }) 1098 + |> Jsont.Object.opt_mem "format" Jsont.string 1099 + ~enc:(fun r -> r.format) 1100 + |> Jsont.Object.opt_mem "prefix" Jsont.string 1101 + ~enc:(fun r -> r.prefix) 1102 |> Jsont.Object.mem "ref" Jsont.string 1103 ~enc:(fun r -> r.ref_) 1104 |> Jsont.Object.mem "repo" Jsont.string ··· 1109 let output_jsont = Jsont.ignore 1110 1111 end 1112 module AddSecret = struct 1113 type input = { 1114 key : string; ··· 1126 |> Jsont.Object.finish 1127 1128 end 1129 + end 1130 + module PublicKey = struct 1131 + type main = { 1132 + created_at : string; 1133 + key : string; 1134 name : string; 1135 } 1136 1137 + let main_jsont = 1138 + Jsont.Object.map ~kind:"Main" 1139 + (fun _typ created_at key name -> { created_at; key; name }) 1140 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.publicKey" ~enc:(fun _ -> "sh.tangled.publicKey") 1141 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1142 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1143 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1144 |> Jsont.Object.finish 1145 1146 + end 1147 + module Pipeline = struct 1148 + type clone_opts = { 1149 + depth : int; 1150 + skip : bool; 1151 + submodules : bool; 1152 } 1153 1154 + let clone_opts_jsont = 1155 + Jsont.Object.map ~kind:"Clone_opts" 1156 + (fun _typ depth skip submodules -> { depth; skip; submodules }) 1157 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#cloneOpts" ~enc:(fun _ -> "sh.tangled.pipeline#cloneOpts") 1158 + |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 1159 + |> Jsont.Object.mem "skip" Jsont.bool ~enc:(fun r -> r.skip) 1160 + |> Jsont.Object.mem "submodules" Jsont.bool ~enc:(fun r -> r.submodules) 1161 |> Jsont.Object.finish 1162 1163 + type pair = { 1164 + key : string; 1165 + value : string; 1166 } 1167 1168 + let pair_jsont = 1169 + Jsont.Object.map ~kind:"Pair" 1170 + (fun _typ key value -> { key; value }) 1171 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pair" ~enc:(fun _ -> "sh.tangled.pipeline#pair") 1172 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1173 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1174 |> Jsont.Object.finish 1175 1176 + type pull_request_trigger_data = { 1177 + action : string; 1178 + source_branch : string; 1179 + source_sha : string; 1180 + target_branch : string; 1181 } 1182 1183 + let pull_request_trigger_data_jsont = 1184 + Jsont.Object.map ~kind:"Pull_request_trigger_data" 1185 + (fun _typ action source_branch source_sha target_branch -> { action; source_branch; source_sha; target_branch }) 1186 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pullRequestTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pullRequestTriggerData") 1187 + |> Jsont.Object.mem "action" Jsont.string ~enc:(fun r -> r.action) 1188 + |> Jsont.Object.mem "sourceBranch" Jsont.string ~enc:(fun r -> r.source_branch) 1189 + |> Jsont.Object.mem "sourceSha" Jsont.string ~enc:(fun r -> r.source_sha) 1190 + |> Jsont.Object.mem "targetBranch" Jsont.string ~enc:(fun r -> r.target_branch) 1191 |> Jsont.Object.finish 1192 1193 + type push_trigger_data = { 1194 + new_sha : string; 1195 + old_sha : string; 1196 ref_ : string; 1197 } 1198 1199 + let push_trigger_data_jsont = 1200 + Jsont.Object.map ~kind:"Push_trigger_data" 1201 + (fun _typ new_sha old_sha ref_ -> { new_sha; old_sha; ref_ }) 1202 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pushTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pushTriggerData") 1203 + |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 1204 + |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 1205 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1206 |> Jsont.Object.finish 1207 1208 + type trigger_repo = { 1209 + default_branch : string; 1210 + did : string; 1211 + knot : string; 1212 repo : string; 1213 } 1214 1215 + let trigger_repo_jsont = 1216 + Jsont.Object.map ~kind:"Trigger_repo" 1217 + (fun _typ default_branch did knot repo -> { default_branch; did; knot; repo }) 1218 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerRepo" ~enc:(fun _ -> "sh.tangled.pipeline#triggerRepo") 1219 + |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 1220 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1221 + |> Jsont.Object.mem "knot" Jsont.string ~enc:(fun r -> r.knot) 1222 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1223 |> Jsont.Object.finish 1224 1225 + type manual_trigger_data = { 1226 + inputs : pair list option; 1227 } 1228 1229 + let manual_trigger_data_jsont = 1230 + Jsont.Object.map ~kind:"Manual_trigger_data" 1231 + (fun _typ inputs -> { inputs }) 1232 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#manualTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#manualTriggerData") 1233 + |> Jsont.Object.opt_mem "inputs" (Jsont.list pair_jsont) ~enc:(fun r -> r.inputs) 1234 |> Jsont.Object.finish 1235 1236 + type workflow = { 1237 + clone : clone_opts; 1238 + engine : string; 1239 + name : string; 1240 + raw : string; 1241 } 1242 1243 + let workflow_jsont = 1244 + Jsont.Object.map ~kind:"Workflow" 1245 + (fun _typ clone engine name raw -> { clone; engine; name; raw }) 1246 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#workflow" ~enc:(fun _ -> "sh.tangled.pipeline#workflow") 1247 + |> Jsont.Object.mem "clone" clone_opts_jsont ~enc:(fun r -> r.clone) 1248 + |> Jsont.Object.mem "engine" Jsont.string ~enc:(fun r -> r.engine) 1249 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1250 + |> Jsont.Object.mem "raw" Jsont.string ~enc:(fun r -> r.raw) 1251 |> Jsont.Object.finish 1252 1253 + type trigger_metadata = { 1254 + kind : string; 1255 + manual : manual_trigger_data option; 1256 + pull_request : pull_request_trigger_data option; 1257 + push : push_trigger_data option; 1258 + repo : trigger_repo; 1259 } 1260 1261 + let trigger_metadata_jsont = 1262 + Jsont.Object.map ~kind:"Trigger_metadata" 1263 + (fun _typ kind manual pull_request push repo -> { kind; manual; pull_request; push; repo }) 1264 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerMetadata" ~enc:(fun _ -> "sh.tangled.pipeline#triggerMetadata") 1265 + |> Jsont.Object.mem "kind" Jsont.string ~enc:(fun r -> r.kind) 1266 + |> Jsont.Object.opt_mem "manual" manual_trigger_data_jsont ~enc:(fun r -> r.manual) 1267 + |> Jsont.Object.opt_mem "pullRequest" pull_request_trigger_data_jsont ~enc:(fun r -> r.pull_request) 1268 + |> Jsont.Object.opt_mem "push" push_trigger_data_jsont ~enc:(fun r -> r.push) 1269 + |> Jsont.Object.mem "repo" trigger_repo_jsont ~enc:(fun r -> r.repo) 1270 |> Jsont.Object.finish 1271 1272 type main = { 1273 + trigger_metadata : trigger_metadata; 1274 + workflows : workflow list; 1275 } 1276 1277 let main_jsont = 1278 Jsont.Object.map ~kind:"Main" 1279 + (fun _typ trigger_metadata workflows -> { trigger_metadata; workflows }) 1280 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline" ~enc:(fun _ -> "sh.tangled.pipeline") 1281 + |> Jsont.Object.mem "triggerMetadata" trigger_metadata_jsont ~enc:(fun r -> r.trigger_metadata) 1282 + |> Jsont.Object.mem "workflows" (Jsont.list workflow_jsont) ~enc:(fun r -> r.workflows) 1283 |> Jsont.Object.finish 1284 1285 + module Status = struct 1286 type main = { 1287 created_at : string; 1288 + error : string option; 1289 + exit_code : int option; 1290 + pipeline : string; 1291 status : string; 1292 + workflow : string; 1293 } 1294 1295 let main_jsont = 1296 Jsont.Object.map ~kind:"Main" 1297 + (fun _typ created_at error exit_code pipeline status workflow -> { created_at; error; exit_code; pipeline; status; workflow }) 1298 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline.status" ~enc:(fun _ -> "sh.tangled.pipeline.status") 1299 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1300 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1301 + |> Jsont.Object.opt_mem "exitCode" Jsont.int ~enc:(fun r -> r.exit_code) 1302 + |> Jsont.Object.mem "pipeline" Jsont.string ~enc:(fun r -> r.pipeline) 1303 |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1304 + |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 1305 |> Jsont.Object.finish 1306 1307 end 1308 + end 1309 + module Owner = struct 1310 + type output = { 1311 + owner : string; 1312 } 1313 1314 + let output_jsont = 1315 + Jsont.Object.map ~kind:"Output" 1316 + (fun _typ owner -> { owner }) 1317 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.owner#output" ~enc:(fun _ -> "sh.tangled.owner#output") 1318 + |> Jsont.Object.mem "owner" Jsont.string ~enc:(fun r -> r.owner) 1319 |> Jsont.Object.finish 1320 1321 + end 1322 + module Label = struct 1323 + module Op = struct 1324 + type operand = { 1325 + key : string; 1326 + value : string; 1327 } 1328 1329 + let operand_jsont = 1330 + Jsont.Object.map ~kind:"Operand" 1331 + (fun _typ key value -> { key; value }) 1332 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op#operand" ~enc:(fun _ -> "sh.tangled.label.op#operand") 1333 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1334 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1335 |> Jsont.Object.finish 1336 1337 type main = { 1338 + add : operand list; 1339 + delete : operand list; 1340 + performed_at : string; 1341 + subject : string; 1342 } 1343 1344 let main_jsont = 1345 Jsont.Object.map ~kind:"Main" 1346 + (fun _typ add delete performed_at subject -> { add; delete; performed_at; subject }) 1347 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op" ~enc:(fun _ -> "sh.tangled.label.op") 1348 + |> Jsont.Object.mem "add" (Jsont.list operand_jsont) ~enc:(fun r -> r.add) 1349 + |> Jsont.Object.mem "delete" (Jsont.list operand_jsont) ~enc:(fun r -> r.delete) 1350 + |> Jsont.Object.mem "performedAt" Jsont.string ~enc:(fun r -> r.performed_at) 1351 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1352 |> Jsont.Object.finish 1353 1354 end 1355 module Definition = struct 1356 type value_type = { 1357 enum : string list option; ··· 1390 |> Jsont.Object.finish 1391 1392 end 1393 end 1394 + module Knot = struct 1395 type main = { 1396 created_at : string; 1397 } 1398 1399 let main_jsont = 1400 Jsont.Object.map ~kind:"Main" 1401 + (fun _typ created_at -> { created_at }) 1402 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot" ~enc:(fun _ -> "sh.tangled.knot") 1403 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1404 |> Jsont.Object.finish 1405 1406 + module Version = struct 1407 + type output = { 1408 + version : string; 1409 } 1410 1411 + let output_jsont = 1412 + Jsont.Object.map ~kind:"Output" 1413 + (fun _typ version -> { version }) 1414 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.version#output" ~enc:(fun _ -> "sh.tangled.knot.version#output") 1415 + |> Jsont.Object.mem "version" Jsont.string ~enc:(fun r -> r.version) 1416 |> Jsont.Object.finish 1417 1418 + end 1419 module Member = struct 1420 type main = { 1421 created_at : string; ··· 1480 |> Jsont.Object.finish 1481 1482 end 1483 end 1484 + module Graph = struct 1485 + module Follow = struct 1486 type main = { 1487 created_at : string; 1488 + subject : string; 1489 } 1490 1491 let main_jsont = 1492 Jsont.Object.map ~kind:"Main" 1493 + (fun _typ created_at subject -> { created_at; subject }) 1494 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.graph.follow" ~enc:(fun _ -> "sh.tangled.graph.follow") 1495 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1496 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1497 |> Jsont.Object.finish 1498 1499 + end 1500 end 1501 + module Git = struct 1502 + module RefUpdate = struct 1503 + type individual_email_commit_count = { 1504 + count : int; 1505 + email : string; 1506 } 1507 1508 + let individual_email_commit_count_jsont = 1509 + Jsont.Object.map ~kind:"Individual_email_commit_count" 1510 + (fun _typ count email -> { count; email }) 1511 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#individualEmailCommitCount" ~enc:(fun _ -> "sh.tangled.git.refUpdate#individualEmailCommitCount") 1512 + |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 1513 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 1514 |> Jsont.Object.finish 1515 1516 + type individual_language_size = { 1517 + lang : string; 1518 + size : int; 1519 } 1520 1521 + let individual_language_size_jsont = 1522 + Jsont.Object.map ~kind:"Individual_language_size" 1523 + (fun _typ lang size -> { lang; size }) 1524 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#individualLanguageSize" ~enc:(fun _ -> "sh.tangled.git.refUpdate#individualLanguageSize") 1525 + |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 1526 + |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 1527 |> Jsont.Object.finish 1528 1529 + type commit_count_breakdown = { 1530 + by_email : individual_email_commit_count list option; 1531 } 1532 1533 + let commit_count_breakdown_jsont = 1534 + Jsont.Object.map ~kind:"Commit_count_breakdown" 1535 + (fun _typ by_email -> { by_email }) 1536 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#commitCountBreakdown" ~enc:(fun _ -> "sh.tangled.git.refUpdate#commitCountBreakdown") 1537 + |> Jsont.Object.opt_mem "byEmail" (Jsont.list individual_email_commit_count_jsont) ~enc:(fun r -> r.by_email) 1538 |> Jsont.Object.finish 1539 1540 + type lang_breakdown = { 1541 + inputs : individual_language_size list option; 1542 } 1543 1544 + let lang_breakdown_jsont = 1545 + Jsont.Object.map ~kind:"Lang_breakdown" 1546 + (fun _typ inputs -> { inputs }) 1547 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#langBreakdown" ~enc:(fun _ -> "sh.tangled.git.refUpdate#langBreakdown") 1548 + |> Jsont.Object.opt_mem "inputs" (Jsont.list individual_language_size_jsont) ~enc:(fun r -> r.inputs) 1549 |> Jsont.Object.finish 1550 1551 + type meta = { 1552 + commit_count : commit_count_breakdown; 1553 + is_default_ref : bool; 1554 + lang_breakdown : lang_breakdown option; 1555 } 1556 1557 + let meta_jsont = 1558 + Jsont.Object.map ~kind:"Meta" 1559 + (fun _typ commit_count is_default_ref lang_breakdown -> { commit_count; is_default_ref; lang_breakdown }) 1560 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate#meta" ~enc:(fun _ -> "sh.tangled.git.refUpdate#meta") 1561 + |> Jsont.Object.mem "commitCount" commit_count_breakdown_jsont ~enc:(fun r -> r.commit_count) 1562 + |> Jsont.Object.mem "isDefaultRef" Jsont.bool ~enc:(fun r -> r.is_default_ref) 1563 + |> Jsont.Object.opt_mem "langBreakdown" lang_breakdown_jsont ~enc:(fun r -> r.lang_breakdown) 1564 |> Jsont.Object.finish 1565 1566 + type main = { 1567 + committer_did : string; 1568 + meta : meta; 1569 + new_sha : string; 1570 + old_sha : string; 1571 + ref_ : string; 1572 + repo_did : string; 1573 + repo_name : string; 1574 } 1575 1576 + let main_jsont = 1577 + Jsont.Object.map ~kind:"Main" 1578 + (fun _typ committer_did meta new_sha old_sha ref_ repo_did repo_name -> { committer_did; meta; new_sha; old_sha; ref_; repo_did; repo_name }) 1579 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.git.refUpdate" ~enc:(fun _ -> "sh.tangled.git.refUpdate") 1580 + |> Jsont.Object.mem "committerDid" Jsont.string ~enc:(fun r -> r.committer_did) 1581 + |> Jsont.Object.mem "meta" meta_jsont ~enc:(fun r -> r.meta) 1582 + |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 1583 + |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 1584 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1585 + |> Jsont.Object.mem "repoDid" Jsont.string ~enc:(fun r -> r.repo_did) 1586 + |> Jsont.Object.mem "repoName" Jsont.string ~enc:(fun r -> r.repo_name) 1587 |> Jsont.Object.finish 1588 1589 + end 1590 + end 1591 + module Feed = struct 1592 + module Star = struct 1593 + type main = { 1594 + created_at : string; 1595 + subject : string; 1596 } 1597 1598 + let main_jsont = 1599 + Jsont.Object.map ~kind:"Main" 1600 + (fun _typ created_at subject -> { created_at; subject }) 1601 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.star" ~enc:(fun _ -> "sh.tangled.feed.star") 1602 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1603 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1604 |> Jsont.Object.finish 1605 1606 + end 1607 + module Reaction = struct 1608 type main = { 1609 + created_at : string; 1610 + reaction : string; 1611 + subject : string; 1612 } 1613 1614 let main_jsont = 1615 Jsont.Object.map ~kind:"Main" 1616 + (fun _typ created_at reaction subject -> { created_at; reaction; subject }) 1617 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.reaction" ~enc:(fun _ -> "sh.tangled.feed.reaction") 1618 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1619 + |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 1620 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1621 |> Jsont.Object.finish 1622 1623 + end 1624 + end 1625 + module Actor = struct 1626 + module Profile = struct 1627 type main = { 1628 + bluesky : bool; 1629 + description : string option; 1630 + links : string list option; 1631 + location : string option; 1632 + pinned_repositories : string list option; 1633 + pronouns : string option; 1634 + stats : string list option; 1635 } 1636 1637 let main_jsont = 1638 Jsont.Object.map ~kind:"Main" 1639 + (fun _typ bluesky description links location pinned_repositories pronouns stats -> { bluesky; description; links; location; pinned_repositories; pronouns; stats }) 1640 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.actor.profile" ~enc:(fun _ -> "sh.tangled.actor.profile") 1641 + |> Jsont.Object.mem "bluesky" Jsont.bool ~enc:(fun r -> r.bluesky) 1642 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1643 + |> Jsont.Object.opt_mem "links" (Jsont.list Jsont.string) ~enc:(fun r -> r.links) 1644 + |> Jsont.Object.opt_mem "location" Jsont.string ~enc:(fun r -> r.location) 1645 + |> Jsont.Object.opt_mem "pinnedRepositories" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned_repositories) 1646 + |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1647 + |> Jsont.Object.opt_mem "stats" (Jsont.list Jsont.string) ~enc:(fun r -> r.stats) 1648 |> Jsont.Object.finish 1649 1650 end
+552 -552
lexicons/tangled/atp_lexicon_tangled.mli
··· 12 13 module Sh : sig 14 module Tangled : sig 15 module Spindle : sig 16 17 type main = { ··· 34 35 end 36 end 37 - module Git : sig 38 - module RefUpdate : sig 39 40 - type individual_language_size = { 41 - lang : string; 42 - size : int; 43 } 44 45 - (** Jsont codec for {!type:individual_language_size}. *) 46 - val individual_language_size_jsont : individual_language_size Jsont.t 47 48 49 - type individual_email_commit_count = { 50 - count : int; 51 - email : string; 52 } 53 54 - (** Jsont codec for {!type:individual_email_commit_count}. *) 55 - val individual_email_commit_count_jsont : individual_email_commit_count Jsont.t 56 57 58 - type lang_breakdown = { 59 - inputs : individual_language_size list option; 60 } 61 62 - (** Jsont codec for {!type:lang_breakdown}. *) 63 - val lang_breakdown_jsont : lang_breakdown Jsont.t 64 65 66 - type commit_count_breakdown = { 67 - by_email : individual_email_commit_count list option; 68 } 69 70 - (** Jsont codec for {!type:commit_count_breakdown}. *) 71 - val commit_count_breakdown_jsont : commit_count_breakdown Jsont.t 72 73 74 - type meta = { 75 - commit_count : commit_count_breakdown; 76 - is_default_ref : bool; 77 - lang_breakdown : lang_breakdown option; 78 } 79 80 - (** Jsont codec for {!type:meta}. *) 81 - val meta_jsont : meta Jsont.t 82 83 - (** An update to a git repository, emitted by knots. *) 84 85 - type main = { 86 - committer_did : string; (** did of the user that pushed this ref *) 87 - meta : meta; 88 - new_sha : string; (** new SHA of this ref *) 89 - old_sha : string; (** old SHA of this ref *) 90 - ref_ : string; (** Ref being updated *) 91 - repo_did : string; (** did of the owner of the repo *) 92 - repo_name : string; (** name of the repo *) 93 } 94 95 - (** Jsont codec for {!type:main}. *) 96 - val main_jsont : main Jsont.t 97 98 end 99 - end 100 - module Actor : sig 101 - module Profile : sig 102 - (** A declaration of a Tangled account profile. *) 103 104 - type main = { 105 - bluesky : bool; (** Include link to this account on Bluesky. *) 106 - description : string option; (** Free-form profile description text. *) 107 - links : string list option; 108 - location : string option; (** Free-form location text. *) 109 - pinned_repositories : string list option; (** Any ATURI, it is up to appviews to validate these fields. *) 110 - pronouns : string option; (** Preferred gender pronouns. *) 111 - stats : string list option; 112 } 113 114 - (** Jsont codec for {!type:main}. *) 115 - val main_jsont : main Jsont.t 116 117 end 118 - end 119 - module String : sig 120 121 - type main = { 122 - contents : string; 123 - created_at : string; 124 - description : string; 125 - filename : string; 126 } 127 128 - (** Jsont codec for {!type:main}. *) 129 - val main_jsont : main Jsont.t 130 131 - end 132 - module Feed : sig 133 - module Star : sig 134 135 - type main = { 136 - created_at : string; 137 - subject : string; 138 } 139 140 - (** Jsont codec for {!type:main}. *) 141 - val main_jsont : main Jsont.t 142 143 end 144 - module Reaction : sig 145 146 type main = { 147 created_at : string; 148 - reaction : string; 149 - subject : string; 150 } 151 152 (** Jsont codec for {!type:main}. *) 153 val main_jsont : main Jsont.t 154 155 - end 156 - end 157 - module Repo : sig 158 159 type main = { 160 - created_at : string; 161 - description : string option; 162 - knot : string; (** knot where the repo was created *) 163 - labels : string list option; (** List of labels that this repo subscribes to *) 164 - name : string; (** name of the repo *) 165 - source : string option; (** source of the repo *) 166 - spindle : string option; (** CI runner to send jobs to and receive results from *) 167 - topics : string list option; (** Topics related to the repo *) 168 - website : string option; (** Any URI related to the repo *) 169 } 170 171 (** Jsont codec for {!type:main}. *) 172 val main_jsont : main Jsont.t 173 174 - module Artifact : sig 175 176 type main = { 177 - artifact : Atp.Blob_ref.t; (** the artifact *) 178 - created_at : string; (** time of creation of this artifact *) 179 - name : string; (** name of the artifact *) 180 - repo : string; (** repo that this artifact is being uploaded to *) 181 - tag : string; (** hash of the tag object that this artifact is attached to (only annotated tags are supported) *) 182 } 183 184 (** Jsont codec for {!type:main}. *) 185 val main_jsont : main Jsont.t 186 187 end 188 module MergeCheck : sig 189 ··· 220 val output_jsont : output Jsont.t 221 222 end 223 - module Tree : sig 224 225 - type readme = { 226 - contents : string; (** Contents of the readme file *) 227 - filename : string; (** Name of the readme file *) 228 } 229 230 - (** Jsont codec for {!type:readme}. *) 231 - val readme_jsont : readme Jsont.t 232 233 234 - type last_commit = { 235 - hash : string; (** Commit hash *) 236 - message : string; (** Commit message *) 237 - when_ : string; (** Commit timestamp *) 238 } 239 240 - (** Jsont codec for {!type:last_commit}. *) 241 - val last_commit_jsont : last_commit Jsont.t 242 243 244 - type tree_entry = { 245 - last_commit : last_commit option; 246 - mode : string; (** File mode *) 247 - name : string; (** Relative file or directory name *) 248 - size : int; (** File size in bytes *) 249 } 250 251 - (** Jsont codec for {!type:tree_entry}. *) 252 - val tree_entry_jsont : tree_entry Jsont.t 253 254 255 (** Query/procedure parameters. *) 256 type params = { 257 - path : string option; (** Path within the repository tree *) 258 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 259 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 260 } 261 262 (** Jsont codec for {!type:params}. *) ··· 264 265 266 type output = { 267 - dotdot : string option; (** Parent directory path *) 268 - files : tree_entry list; 269 - parent : string option; (** The parent path in the tree *) 270 - readme : readme option; (** Readme for this file tree *) 271 - ref_ : string; (** The git reference used *) 272 } 273 274 (** Jsont codec for {!type:output}. *) 275 val output_jsont : output Jsont.t 276 277 end 278 - module SetDefaultBranch : sig 279 - (** Set the default branch for a repository *) 280 281 - 282 - type input = { 283 - default_branch : string; 284 - repo : string; 285 } 286 287 - (** Jsont codec for {!type:input}. *) 288 - val input_jsont : input Jsont.t 289 290 - end 291 - module Compare : sig 292 293 (** Query/procedure parameters. *) 294 type params = { 295 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 296 - rev1 : string; (** First revision (commit, branch, or tag) *) 297 - rev2 : string; (** Second revision (commit, branch, or tag) *) 298 } 299 300 (** Jsont codec for {!type:params}. *) 301 val params_jsont : params Jsont.t 302 303 - (** Compare output in application/json *) 304 305 - type output = unit 306 val output_jsont : output Jsont.t 307 308 end 309 - module Merge : sig 310 - (** Merge a patch into a repository branch *) 311 - 312 313 - type input = { 314 - author_email : string option; (** Author email for the merge commit *) 315 - author_name : string option; (** Author name for the merge commit *) 316 - branch : string; (** Target branch to merge into *) 317 - commit_body : string option; (** Additional commit message body *) 318 - commit_message : string option; (** Merge commit message *) 319 - did : string; (** DID of the repository owner *) 320 - name : string; (** Name of the repository *) 321 - patch : string; (** Patch content to merge *) 322 } 323 324 - (** Jsont codec for {!type:input}. *) 325 - val input_jsont : input Jsont.t 326 327 - end 328 - module Tags : sig 329 330 - (** Query/procedure parameters. *) 331 - type params = { 332 - cursor : string option; (** Pagination cursor *) 333 - limit : int option; (** Maximum number of tags to return *) 334 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 335 } 336 337 - (** Jsont codec for {!type:params}. *) 338 - val params_jsont : params Jsont.t 339 340 341 - type output = unit 342 - val output_jsont : output Jsont.t 343 344 - end 345 - module Collaborator : sig 346 347 type main = { 348 created_at : string; 349 - repo : string; (** repo to add this user to *) 350 - subject : string; 351 } 352 353 (** Jsont codec for {!type:main}. *) 354 val main_jsont : main Jsont.t 355 356 end 357 - module Branches : sig 358 359 - (** Query/procedure parameters. *) 360 - type params = { 361 - cursor : string option; (** Pagination cursor *) 362 - limit : int option; (** Maximum number of branches to return *) 363 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 364 } 365 366 - (** Jsont codec for {!type:params}. *) 367 - val params_jsont : params Jsont.t 368 369 370 - type output = unit 371 val output_jsont : output Jsont.t 372 373 end ··· 405 val output_jsont : output Jsont.t 406 407 end 408 - module Create : sig 409 - (** Create a new repository *) 410 411 412 type input = { 413 - default_branch : string option; (** Default branch to push to *) 414 - rkey : string; (** Rkey of the repository record *) 415 - source : string option; (** A source URL to clone from, populate this when forking or importing a repository. *) 416 } 417 418 (** Jsont codec for {!type:input}. *) ··· 443 val output_jsont : output Jsont.t 444 445 end 446 - module Branch : sig 447 - 448 - type signature = { 449 - email : string; (** Author email *) 450 - name : string; (** Author name *) 451 - when_ : string; (** Author timestamp *) 452 - } 453 - 454 - (** Jsont codec for {!type:signature}. *) 455 - val signature_jsont : signature Jsont.t 456 - 457 458 (** Query/procedure parameters. *) 459 type params = { 460 - name : string; (** Branch name to get information for *) 461 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 462 } 463 ··· 465 val params_jsont : params Jsont.t 466 467 468 - type output = { 469 - author : signature option; 470 - hash : string; (** Latest commit hash on this branch *) 471 - is_default : bool option; (** Whether this is the default branch *) 472 - message : string option; (** Latest commit message *) 473 - name : string; (** Branch name *) 474 - short_hash : string option; (** Short commit hash *) 475 - when_ : string; (** Timestamp of latest commit *) 476 - } 477 - 478 - (** Jsont codec for {!type:output}. *) 479 val output_jsont : output Jsont.t 480 481 end ··· 492 val input_jsont : input Jsont.t 493 494 end 495 - module Log : sig 496 497 (** Query/procedure parameters. *) 498 type params = { 499 - cursor : string option; (** Pagination cursor (commit SHA) *) 500 - limit : int option; (** Maximum number of commits to return *) 501 - path : string option; (** Path to filter commits by *) 502 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 503 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 504 } 505 506 (** Jsont codec for {!type:params}. *) 507 val params_jsont : params Jsont.t 508 509 510 type output = unit 511 val output_jsont : output Jsont.t 512 513 end 514 - module Blob : sig 515 516 - type submodule = { 517 - branch : string option; (** Branch to track in the submodule *) 518 - name : string; (** Submodule name *) 519 - url : string; (** Submodule repository URL *) 520 } 521 522 - (** Jsont codec for {!type:submodule}. *) 523 - val submodule_jsont : submodule Jsont.t 524 525 526 type signature = { 527 email : string; (** Author email *) ··· 533 val signature_jsont : signature Jsont.t 534 535 536 type last_commit = { 537 author : signature option; 538 hash : string; (** Commit hash *) ··· 573 val output_jsont : output Jsont.t 574 575 end 576 - module RemoveSecret : sig 577 - (** Remove a CI secret *) 578 - 579 - 580 - type input = { 581 - key : string; 582 - repo : string; 583 - } 584 - 585 - (** Jsont codec for {!type:input}. *) 586 - val input_jsont : input Jsont.t 587 - 588 - end 589 - module Languages : sig 590 - 591 - type language = { 592 - color : string option; (** Hex color code for this language *) 593 - extensions : string list option; (** File extensions associated with this language *) 594 - file_count : int option; (** Number of files in this language *) 595 - name : string; (** Programming language name *) 596 - percentage : int; (** Percentage of total codebase (0-100) *) 597 - size : int; (** Total size of files in this language (bytes) *) 598 - } 599 - 600 - (** Jsont codec for {!type:language}. *) 601 - val language_jsont : language Jsont.t 602 - 603 - 604 - (** Query/procedure parameters. *) 605 - type params = { 606 - ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 607 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 608 - } 609 - 610 - (** Jsont codec for {!type:params}. *) 611 - val params_jsont : params Jsont.t 612 - 613 614 - type output = { 615 - languages : language list; 616 - ref_ : string; (** The git reference used *) 617 - total_files : int option; (** Total number of files analyzed *) 618 - total_size : int option; (** Total size of all analyzed files in bytes *) 619 } 620 621 - (** Jsont codec for {!type:output}. *) 622 - val output_jsont : output Jsont.t 623 624 end 625 - module Diff : sig 626 627 (** Query/procedure parameters. *) 628 type params = { 629 ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 630 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 631 } ··· 633 (** Jsont codec for {!type:params}. *) 634 val params_jsont : params Jsont.t 635 636 637 type output = unit 638 val output_jsont : output Jsont.t 639 640 end 641 - module ForkSync : sig 642 - (** Sync a forked repository with its upstream source *) 643 - 644 - 645 - type input = { 646 - branch : string; (** Branch to sync *) 647 - did : string; (** DID of the fork owner *) 648 - name : string; (** Name of the forked repository *) 649 - source : string; (** AT-URI of the source repository *) 650 - } 651 - 652 - (** Jsont codec for {!type:input}. *) 653 - val input_jsont : input Jsont.t 654 - 655 - end 656 module AddSecret : sig 657 (** Add a CI secret *) 658 ··· 667 val input_jsont : input Jsont.t 668 669 end 670 - module Delete : sig 671 - (** Delete a repository *) 672 673 - 674 - type input = { 675 - did : string; (** DID of the repository owner *) 676 - name : string; (** Name of the repository to delete *) 677 - rkey : string; (** Rkey of the repository record *) 678 - } 679 - 680 - (** Jsont codec for {!type:input}. *) 681 - val input_jsont : input Jsont.t 682 - 683 - end 684 - module ListSecrets : sig 685 - 686 - type secret = { 687 - created_at : string; 688 - created_by : string; 689 - key : string; 690 - repo : string; 691 } 692 693 - (** Jsont codec for {!type:secret}. *) 694 - val secret_jsont : secret Jsont.t 695 696 697 - (** Query/procedure parameters. *) 698 - type params = { 699 - repo : string; 700 } 701 702 - (** Jsont codec for {!type:params}. *) 703 - val params_jsont : params Jsont.t 704 705 706 - type output = { 707 - secrets : secret list; 708 } 709 710 - (** Jsont codec for {!type:output}. *) 711 - val output_jsont : output Jsont.t 712 713 - end 714 - module Archive : sig 715 716 - (** Query/procedure parameters. *) 717 - type params = { 718 - format : string option; (** Archive format *) 719 - prefix : string option; (** Prefix for files in the archive *) 720 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 721 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 722 } 723 724 - (** Jsont codec for {!type:params}. *) 725 - val params_jsont : params Jsont.t 726 727 - (** Binary archive data *) 728 729 - type output = unit 730 - val output_jsont : output Jsont.t 731 - 732 - end 733 - module HiddenRef : sig 734 - (** Create a hidden ref in a repository *) 735 - 736 - 737 - type input = { 738 - fork_ref : string; (** Fork reference name *) 739 - remote_ref : string; (** Remote reference name *) 740 - repo : string; (** AT-URI of the repository *) 741 } 742 743 - (** Jsont codec for {!type:input}. *) 744 - val input_jsont : input Jsont.t 745 746 747 - type output = { 748 - error : string option; (** Error message if creation failed *) 749 - ref_ : string option; (** The created hidden ref name *) 750 - success : bool; (** Whether the hidden ref was created successfully *) 751 } 752 753 - (** Jsont codec for {!type:output}. *) 754 - val output_jsont : output Jsont.t 755 756 - end 757 - module Pull : sig 758 759 - type target = { 760 - branch : string; 761 - repo : string; 762 } 763 764 - (** Jsont codec for {!type:target}. *) 765 - val target_jsont : target Jsont.t 766 767 768 - type source = { 769 - branch : string; 770 - repo : string option; 771 - sha : string; 772 } 773 774 - (** Jsont codec for {!type:source}. *) 775 - val source_jsont : source Jsont.t 776 777 778 - type main = { 779 - body : string option; 780 - created_at : string; 781 - mentions : string list option; 782 - patch : string option; (** (deprecated) use patchBlob instead *) 783 - patch_blob : Atp.Blob_ref.t; (** patch content *) 784 - references : string list option; 785 - source : source option; 786 - target : target; 787 - title : string; 788 } 789 790 - (** Jsont codec for {!type:main}. *) 791 - val main_jsont : main Jsont.t 792 793 - module Comment : sig 794 795 type main = { 796 - body : string; 797 - created_at : string; 798 - mentions : string list option; 799 - pull : string; 800 - references : string list option; 801 } 802 803 (** Jsont codec for {!type:main}. *) 804 val main_jsont : main Jsont.t 805 806 - end 807 - module Status : sig 808 809 type main = { 810 - pull : string; 811 - status : string; (** status of the pull request *) 812 } 813 814 (** Jsont codec for {!type:main}. *) 815 val main_jsont : main Jsont.t 816 817 - module Closed : sig 818 - (** closed pull request *) 819 - 820 - type main = string 821 - val main_jsont : main Jsont.t 822 - 823 - end 824 - module Open : sig 825 - (** open pull request *) 826 - 827 - type main = string 828 - val main_jsont : main Jsont.t 829 - 830 - end 831 - module Merged : sig 832 - (** merged pull request *) 833 834 - type main = string 835 - val main_jsont : main Jsont.t 836 837 - end 838 - end 839 - end 840 - module Issue : sig 841 - 842 - type main = { 843 - body : string option; 844 - created_at : string; 845 - mentions : string list option; 846 - references : string list option; 847 - repo : string; 848 - title : string; 849 } 850 851 - (** Jsont codec for {!type:main}. *) 852 - val main_jsont : main Jsont.t 853 854 - module Comment : sig 855 856 - type main = { 857 - body : string; 858 - created_at : string; 859 - issue : string; 860 - mentions : string list option; 861 - references : string list option; 862 - reply_to : string option; 863 } 864 865 - (** Jsont codec for {!type:main}. *) 866 - val main_jsont : main Jsont.t 867 868 - end 869 - module State : sig 870 871 type main = { 872 - issue : string; 873 - state : string; (** state of the issue *) 874 } 875 876 (** Jsont codec for {!type:main}. *) 877 val main_jsont : main Jsont.t 878 879 - module Closed : sig 880 - (** closed issue *) 881 - 882 - type main = string 883 - val main_jsont : main Jsont.t 884 - 885 - end 886 - module Open : sig 887 - (** open issue *) 888 - 889 - type main = string 890 - val main_jsont : main Jsont.t 891 - 892 - end 893 - end 894 end 895 - end 896 - module Label : sig 897 module Definition : sig 898 899 type value_type = { ··· 919 val main_jsont : main Jsont.t 920 921 end 922 - module Op : sig 923 - 924 - type operand = { 925 - key : string; (** ATURI to the label definition *) 926 - value : string; (** Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value. *) 927 - } 928 - 929 - (** Jsont codec for {!type:operand}. *) 930 - val operand_jsont : operand Jsont.t 931 - 932 - 933 - type main = { 934 - add : operand list; 935 - delete : operand list; 936 - performed_at : string; 937 - subject : string; (** The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. *) 938 - } 939 - 940 - (** Jsont codec for {!type:main}. *) 941 - val main_jsont : main Jsont.t 942 - 943 - end 944 end 945 - module Graph : sig 946 - module Follow : sig 947 948 type main = { 949 created_at : string; 950 - subject : string; 951 } 952 953 (** Jsont codec for {!type:main}. *) 954 val main_jsont : main Jsont.t 955 956 - end 957 - end 958 - module Knot : sig 959 960 - type main = { 961 - created_at : string; 962 } 963 964 - (** Jsont codec for {!type:main}. *) 965 - val main_jsont : main Jsont.t 966 967 module Member : sig 968 969 type main = { ··· 1008 val output_jsont : output Jsont.t 1009 1010 end 1011 - module Version : sig 1012 - (** Get the version of a knot *) 1013 - 1014 - 1015 - type output = { 1016 - version : string; 1017 - } 1018 - 1019 - (** Jsont codec for {!type:output}. *) 1020 - val output_jsont : output Jsont.t 1021 - 1022 - end 1023 end 1024 - module Owner : sig 1025 - (** Get the owner of a service *) 1026 - 1027 - 1028 - type output = { 1029 - owner : string; 1030 - } 1031 - 1032 - (** Jsont codec for {!type:output}. *) 1033 - val output_jsont : output Jsont.t 1034 - 1035 - end 1036 - module PublicKey : sig 1037 1038 type main = { 1039 - created_at : string; (** key upload timestamp *) 1040 - key : string; (** public key contents *) 1041 - name : string; (** human-readable name for this key *) 1042 } 1043 1044 (** Jsont codec for {!type:main}. *) 1045 val main_jsont : main Jsont.t 1046 1047 end 1048 - module Pipeline : sig 1049 1050 - type trigger_repo = { 1051 - default_branch : string; 1052 - did : string; 1053 - knot : string; 1054 - repo : string; 1055 } 1056 1057 - (** Jsont codec for {!type:trigger_repo}. *) 1058 - val trigger_repo_jsont : trigger_repo Jsont.t 1059 1060 1061 - type push_trigger_data = { 1062 - new_sha : string; 1063 - old_sha : string; 1064 - ref_ : string; 1065 } 1066 1067 - (** Jsont codec for {!type:push_trigger_data}. *) 1068 - val push_trigger_data_jsont : push_trigger_data Jsont.t 1069 1070 1071 - type pull_request_trigger_data = { 1072 - action : string; 1073 - source_branch : string; 1074 - source_sha : string; 1075 - target_branch : string; 1076 - } 1077 - 1078 - (** Jsont codec for {!type:pull_request_trigger_data}. *) 1079 - val pull_request_trigger_data_jsont : pull_request_trigger_data Jsont.t 1080 - 1081 - 1082 - type pair = { 1083 - key : string; 1084 - value : string; 1085 } 1086 1087 - (** Jsont codec for {!type:pair}. *) 1088 - val pair_jsont : pair Jsont.t 1089 1090 1091 - type clone_opts = { 1092 - depth : int; 1093 - skip : bool; 1094 - submodules : bool; 1095 } 1096 1097 - (** Jsont codec for {!type:clone_opts}. *) 1098 - val clone_opts_jsont : clone_opts Jsont.t 1099 1100 1101 - type workflow = { 1102 - clone : clone_opts; 1103 - engine : string; 1104 - name : string; 1105 - raw : string; 1106 } 1107 1108 - (** Jsont codec for {!type:workflow}. *) 1109 - val workflow_jsont : workflow Jsont.t 1110 1111 1112 - type manual_trigger_data = { 1113 - inputs : pair list option; 1114 } 1115 1116 - (** Jsont codec for {!type:manual_trigger_data}. *) 1117 - val manual_trigger_data_jsont : manual_trigger_data Jsont.t 1118 1119 1120 - type trigger_metadata = { 1121 - kind : string; 1122 - manual : manual_trigger_data option; 1123 - pull_request : pull_request_trigger_data option; 1124 - push : push_trigger_data option; 1125 - repo : trigger_repo; 1126 } 1127 1128 - (** Jsont codec for {!type:trigger_metadata}. *) 1129 - val trigger_metadata_jsont : trigger_metadata Jsont.t 1130 1131 1132 type main = { 1133 - trigger_metadata : trigger_metadata; 1134 - workflows : workflow list; 1135 } 1136 1137 (** Jsont codec for {!type:main}. *) 1138 val main_jsont : main Jsont.t 1139 1140 - module Status : sig 1141 1142 type main = { 1143 - created_at : string; (** time of creation of this status update *) 1144 - error : string option; (** error message if failed *) 1145 - exit_code : int option; (** exit code if failed *) 1146 - pipeline : string; (** ATURI of the pipeline *) 1147 - status : string; (** status of the workflow *) 1148 - workflow : string; (** name of the workflow within this pipeline *) 1149 } 1150 1151 (** Jsont codec for {!type:main}. *)
··· 12 13 module Sh : sig 14 module Tangled : sig 15 + module String : sig 16 + 17 + type main = { 18 + contents : string; 19 + created_at : string; 20 + description : string; 21 + filename : string; 22 + } 23 + 24 + (** Jsont codec for {!type:main}. *) 25 + val main_jsont : main Jsont.t 26 + 27 + end 28 module Spindle : sig 29 30 type main = { ··· 47 48 end 49 end 50 + module Repo : sig 51 52 + type main = { 53 + created_at : string; 54 + description : string option; 55 + knot : string; (** knot where the repo was created *) 56 + labels : string list option; (** List of labels that this repo subscribes to *) 57 + name : string; (** name of the repo *) 58 + source : string option; (** source of the repo *) 59 + spindle : string option; (** CI runner to send jobs to and receive results from *) 60 + topics : string list option; (** Topics related to the repo *) 61 + website : string option; (** Any URI related to the repo *) 62 } 63 64 + (** Jsont codec for {!type:main}. *) 65 + val main_jsont : main Jsont.t 66 67 + module Tree : sig 68 69 + type last_commit = { 70 + hash : string; (** Commit hash *) 71 + message : string; (** Commit message *) 72 + when_ : string; (** Commit timestamp *) 73 } 74 75 + (** Jsont codec for {!type:last_commit}. *) 76 + val last_commit_jsont : last_commit Jsont.t 77 78 79 + type readme = { 80 + contents : string; (** Contents of the readme file *) 81 + filename : string; (** Name of the readme file *) 82 } 83 84 + (** Jsont codec for {!type:readme}. *) 85 + val readme_jsont : readme Jsont.t 86 87 88 + type tree_entry = { 89 + last_commit : last_commit option; 90 + mode : string; (** File mode *) 91 + name : string; (** Relative file or directory name *) 92 + size : int; (** File size in bytes *) 93 } 94 95 + (** Jsont codec for {!type:tree_entry}. *) 96 + val tree_entry_jsont : tree_entry Jsont.t 97 98 99 + (** Query/procedure parameters. *) 100 + type params = { 101 + path : string option; (** Path within the repository tree *) 102 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 103 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 104 } 105 106 + (** Jsont codec for {!type:params}. *) 107 + val params_jsont : params Jsont.t 108 109 110 + type output = { 111 + dotdot : string option; (** Parent directory path *) 112 + files : tree_entry list; 113 + parent : string option; (** The parent path in the tree *) 114 + readme : readme option; (** Readme for this file tree *) 115 + ref_ : string; (** The git reference used *) 116 } 117 118 + (** Jsont codec for {!type:output}. *) 119 + val output_jsont : output Jsont.t 120 121 end 122 + module Tags : sig 123 124 + (** Query/procedure parameters. *) 125 + type params = { 126 + cursor : string option; (** Pagination cursor *) 127 + limit : int option; (** Maximum number of tags to return *) 128 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 129 } 130 131 + (** Jsont codec for {!type:params}. *) 132 + val params_jsont : params Jsont.t 133 + 134 + 135 + type output = unit 136 + val output_jsont : output Jsont.t 137 138 end 139 + module SetDefaultBranch : sig 140 + (** Set the default branch for a repository *) 141 + 142 143 + type input = { 144 + default_branch : string; 145 + repo : string; 146 } 147 148 + (** Jsont codec for {!type:input}. *) 149 + val input_jsont : input Jsont.t 150 151 + end 152 + module RemoveSecret : sig 153 + (** Remove a CI secret *) 154 155 + 156 + type input = { 157 + key : string; 158 + repo : string; 159 } 160 161 + (** Jsont codec for {!type:input}. *) 162 + val input_jsont : input Jsont.t 163 164 end 165 + module Pull : sig 166 + 167 + type source = { 168 + branch : string; 169 + repo : string option; 170 + sha : string; 171 + } 172 + 173 + (** Jsont codec for {!type:source}. *) 174 + val source_jsont : source Jsont.t 175 + 176 + 177 + type target = { 178 + branch : string; 179 + repo : string; 180 + } 181 + 182 + (** Jsont codec for {!type:target}. *) 183 + val target_jsont : target Jsont.t 184 + 185 186 type main = { 187 + body : string option; 188 created_at : string; 189 + mentions : string list option; 190 + patch : string option; (** (deprecated) use patchBlob instead *) 191 + patch_blob : Atp.Blob_ref.t; (** patch content *) 192 + references : string list option; 193 + source : source option; 194 + target : target; 195 + title : string; 196 } 197 198 (** Jsont codec for {!type:main}. *) 199 val main_jsont : main Jsont.t 200 201 + module Status : sig 202 203 type main = { 204 + pull : string; 205 + status : string; (** status of the pull request *) 206 } 207 208 (** Jsont codec for {!type:main}. *) 209 val main_jsont : main Jsont.t 210 211 + module Open : sig 212 + (** open pull request *) 213 + 214 + type main = string 215 + val main_jsont : main Jsont.t 216 + 217 + end 218 + module Merged : sig 219 + (** merged pull request *) 220 + 221 + type main = string 222 + val main_jsont : main Jsont.t 223 + 224 + end 225 + module Closed : sig 226 + (** closed pull request *) 227 + 228 + type main = string 229 + val main_jsont : main Jsont.t 230 + 231 + end 232 + end 233 + module Comment : sig 234 235 type main = { 236 + body : string; 237 + created_at : string; 238 + mentions : string list option; 239 + pull : string; 240 + references : string list option; 241 } 242 243 (** Jsont codec for {!type:main}. *) 244 val main_jsont : main Jsont.t 245 246 + end 247 end 248 module MergeCheck : sig 249 ··· 280 val output_jsont : output Jsont.t 281 282 end 283 + module Merge : sig 284 + (** Merge a patch into a repository branch *) 285 + 286 287 + type input = { 288 + author_email : string option; (** Author email for the merge commit *) 289 + author_name : string option; (** Author name for the merge commit *) 290 + branch : string; (** Target branch to merge into *) 291 + commit_body : string option; (** Additional commit message body *) 292 + commit_message : string option; (** Merge commit message *) 293 + did : string; (** DID of the repository owner *) 294 + name : string; (** Name of the repository *) 295 + patch : string; (** Patch content to merge *) 296 } 297 298 + (** Jsont codec for {!type:input}. *) 299 + val input_jsont : input Jsont.t 300 301 + end 302 + module Log : sig 303 304 + (** Query/procedure parameters. *) 305 + type params = { 306 + cursor : string option; (** Pagination cursor (commit SHA) *) 307 + limit : int option; (** Maximum number of commits to return *) 308 + path : string option; (** Path to filter commits by *) 309 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 310 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 311 } 312 313 + (** Jsont codec for {!type:params}. *) 314 + val params_jsont : params Jsont.t 315 316 317 + type output = unit 318 + val output_jsont : output Jsont.t 319 + 320 + end 321 + module ListSecrets : sig 322 + 323 + type secret = { 324 + created_at : string; 325 + created_by : string; 326 + key : string; 327 + repo : string; 328 } 329 330 + (** Jsont codec for {!type:secret}. *) 331 + val secret_jsont : secret Jsont.t 332 333 334 (** Query/procedure parameters. *) 335 type params = { 336 + repo : string; 337 } 338 339 (** Jsont codec for {!type:params}. *) ··· 341 342 343 type output = { 344 + secrets : secret list; 345 } 346 347 (** Jsont codec for {!type:output}. *) 348 val output_jsont : output Jsont.t 349 350 end 351 + module Languages : sig 352 353 + type language = { 354 + color : string option; (** Hex color code for this language *) 355 + extensions : string list option; (** File extensions associated with this language *) 356 + file_count : int option; (** Number of files in this language *) 357 + name : string; (** Programming language name *) 358 + percentage : int; (** Percentage of total codebase (0-100) *) 359 + size : int; (** Total size of files in this language (bytes) *) 360 } 361 362 + (** Jsont codec for {!type:language}. *) 363 + val language_jsont : language Jsont.t 364 365 366 (** Query/procedure parameters. *) 367 type params = { 368 + ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 369 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 370 } 371 372 (** Jsont codec for {!type:params}. *) 373 val params_jsont : params Jsont.t 374 375 + 376 + type output = { 377 + languages : language list; 378 + ref_ : string; (** The git reference used *) 379 + total_files : int option; (** Total number of files analyzed *) 380 + total_size : int option; (** Total size of all analyzed files in bytes *) 381 + } 382 383 + (** Jsont codec for {!type:output}. *) 384 val output_jsont : output Jsont.t 385 386 end 387 + module Issue : sig 388 389 + type main = { 390 + body : string option; 391 + created_at : string; 392 + mentions : string list option; 393 + references : string list option; 394 + repo : string; 395 + title : string; 396 } 397 398 + (** Jsont codec for {!type:main}. *) 399 + val main_jsont : main Jsont.t 400 401 + module State : sig 402 403 + type main = { 404 + issue : string; 405 + state : string; (** state of the issue *) 406 } 407 408 + (** Jsont codec for {!type:main}. *) 409 + val main_jsont : main Jsont.t 410 + 411 + module Open : sig 412 + (** open issue *) 413 + 414 + type main = string 415 + val main_jsont : main Jsont.t 416 417 + end 418 + module Closed : sig 419 + (** closed issue *) 420 421 + type main = string 422 + val main_jsont : main Jsont.t 423 424 + end 425 + end 426 + module Comment : sig 427 428 type main = { 429 + body : string; 430 created_at : string; 431 + issue : string; 432 + mentions : string list option; 433 + references : string list option; 434 + reply_to : string option; 435 } 436 437 (** Jsont codec for {!type:main}. *) 438 val main_jsont : main Jsont.t 439 440 + end 441 end 442 + module HiddenRef : sig 443 + (** Create a hidden ref in a repository *) 444 + 445 446 + type input = { 447 + fork_ref : string; (** Fork reference name *) 448 + remote_ref : string; (** Remote reference name *) 449 + repo : string; (** AT-URI of the repository *) 450 } 451 452 + (** Jsont codec for {!type:input}. *) 453 + val input_jsont : input Jsont.t 454 455 456 + type output = { 457 + error : string option; (** Error message if creation failed *) 458 + ref_ : string option; (** The created hidden ref name *) 459 + success : bool; (** Whether the hidden ref was created successfully *) 460 + } 461 + 462 + (** Jsont codec for {!type:output}. *) 463 val output_jsont : output Jsont.t 464 465 end ··· 497 val output_jsont : output Jsont.t 498 499 end 500 + module ForkSync : sig 501 + (** Sync a forked repository with its upstream source *) 502 503 504 type input = { 505 + branch : string; (** Branch to sync *) 506 + did : string; (** DID of the fork owner *) 507 + name : string; (** Name of the forked repository *) 508 + source : string; (** AT-URI of the source repository *) 509 } 510 511 (** Jsont codec for {!type:input}. *) ··· 536 val output_jsont : output Jsont.t 537 538 end 539 + module Diff : sig 540 541 (** Query/procedure parameters. *) 542 type params = { 543 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 544 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 545 } 546 ··· 548 val params_jsont : params Jsont.t 549 550 551 + type output = unit 552 val output_jsont : output Jsont.t 553 554 end ··· 565 val input_jsont : input Jsont.t 566 567 end 568 + module Delete : sig 569 + (** Delete a repository *) 570 + 571 + 572 + type input = { 573 + did : string; (** DID of the repository owner *) 574 + name : string; (** Name of the repository to delete *) 575 + rkey : string; (** Rkey of the repository record *) 576 + } 577 + 578 + (** Jsont codec for {!type:input}. *) 579 + val input_jsont : input Jsont.t 580 + 581 + end 582 + module Create : sig 583 + (** Create a new repository *) 584 + 585 + 586 + type input = { 587 + default_branch : string option; (** Default branch to push to *) 588 + rkey : string; (** Rkey of the repository record *) 589 + source : string option; (** A source URL to clone from, populate this when forking or importing a repository. *) 590 + } 591 + 592 + (** Jsont codec for {!type:input}. *) 593 + val input_jsont : input Jsont.t 594 + 595 + end 596 + module Compare : sig 597 598 (** Query/procedure parameters. *) 599 type params = { 600 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 601 + rev1 : string; (** First revision (commit, branch, or tag) *) 602 + rev2 : string; (** Second revision (commit, branch, or tag) *) 603 } 604 605 (** Jsont codec for {!type:params}. *) 606 val params_jsont : params Jsont.t 607 608 + (** Compare output in application/json *) 609 610 type output = unit 611 val output_jsont : output Jsont.t 612 613 end 614 + module Collaborator : sig 615 + 616 + type main = { 617 + created_at : string; 618 + repo : string; (** repo to add this user to *) 619 + subject : string; 620 + } 621 + 622 + (** Jsont codec for {!type:main}. *) 623 + val main_jsont : main Jsont.t 624 625 + end 626 + module Branches : sig 627 + 628 + (** Query/procedure parameters. *) 629 + type params = { 630 + cursor : string option; (** Pagination cursor *) 631 + limit : int option; (** Maximum number of branches to return *) 632 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 633 } 634 635 + (** Jsont codec for {!type:params}. *) 636 + val params_jsont : params Jsont.t 637 638 + 639 + type output = unit 640 + val output_jsont : output Jsont.t 641 + 642 + end 643 + module Branch : sig 644 645 type signature = { 646 email : string; (** Author email *) ··· 652 val signature_jsont : signature Jsont.t 653 654 655 + (** Query/procedure parameters. *) 656 + type params = { 657 + name : string; (** Branch name to get information for *) 658 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 659 + } 660 + 661 + (** Jsont codec for {!type:params}. *) 662 + val params_jsont : params Jsont.t 663 + 664 + 665 + type output = { 666 + author : signature option; 667 + hash : string; (** Latest commit hash on this branch *) 668 + is_default : bool option; (** Whether this is the default branch *) 669 + message : string option; (** Latest commit message *) 670 + name : string; (** Branch name *) 671 + short_hash : string option; (** Short commit hash *) 672 + when_ : string; (** Timestamp of latest commit *) 673 + } 674 + 675 + (** Jsont codec for {!type:output}. *) 676 + val output_jsont : output Jsont.t 677 + 678 + end 679 + module Blob : sig 680 + 681 + type signature = { 682 + email : string; (** Author email *) 683 + name : string; (** Author name *) 684 + when_ : string; (** Author timestamp *) 685 + } 686 + 687 + (** Jsont codec for {!type:signature}. *) 688 + val signature_jsont : signature Jsont.t 689 + 690 + 691 + type submodule = { 692 + branch : string option; (** Branch to track in the submodule *) 693 + name : string; (** Submodule name *) 694 + url : string; (** Submodule repository URL *) 695 + } 696 + 697 + (** Jsont codec for {!type:submodule}. *) 698 + val submodule_jsont : submodule Jsont.t 699 + 700 + 701 type last_commit = { 702 author : signature option; 703 hash : string; (** Commit hash *) ··· 738 val output_jsont : output Jsont.t 739 740 end 741 + module Artifact : sig 742 743 + type main = { 744 + artifact : Atp.Blob_ref.t; (** the artifact *) 745 + created_at : string; (** time of creation of this artifact *) 746 + name : string; (** name of the artifact *) 747 + repo : string; (** repo that this artifact is being uploaded to *) 748 + tag : string; (** hash of the tag object that this artifact is attached to (only annotated tags are supported) *) 749 } 750 751 + (** Jsont codec for {!type:main}. *) 752 + val main_jsont : main Jsont.t 753 754 end 755 + module Archive : sig 756 757 (** Query/procedure parameters. *) 758 type params = { 759 + format : string option; (** Archive format *) 760 + prefix : string option; (** Prefix for files in the archive *) 761 ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 762 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 763 } ··· 765 (** Jsont codec for {!type:params}. *) 766 val params_jsont : params Jsont.t 767 768 + (** Binary archive data *) 769 770 type output = unit 771 val output_jsont : output Jsont.t 772 773 end 774 module AddSecret : sig 775 (** Add a CI secret *) 776 ··· 785 val input_jsont : input Jsont.t 786 787 end 788 + end 789 + module PublicKey : sig 790 791 + type main = { 792 + created_at : string; (** key upload timestamp *) 793 + key : string; (** public key contents *) 794 + name : string; (** human-readable name for this key *) 795 } 796 797 + (** Jsont codec for {!type:main}. *) 798 + val main_jsont : main Jsont.t 799 800 + end 801 + module Pipeline : sig 802 803 + type clone_opts = { 804 + depth : int; 805 + skip : bool; 806 + submodules : bool; 807 } 808 809 + (** Jsont codec for {!type:clone_opts}. *) 810 + val clone_opts_jsont : clone_opts Jsont.t 811 812 813 + type pair = { 814 + key : string; 815 + value : string; 816 } 817 818 + (** Jsont codec for {!type:pair}. *) 819 + val pair_jsont : pair Jsont.t 820 821 822 + type pull_request_trigger_data = { 823 + action : string; 824 + source_branch : string; 825 + source_sha : string; 826 + target_branch : string; 827 } 828 829 + (** Jsont codec for {!type:pull_request_trigger_data}. *) 830 + val pull_request_trigger_data_jsont : pull_request_trigger_data Jsont.t 831 832 833 + type push_trigger_data = { 834 + new_sha : string; 835 + old_sha : string; 836 + ref_ : string; 837 } 838 839 + (** Jsont codec for {!type:push_trigger_data}. *) 840 + val push_trigger_data_jsont : push_trigger_data Jsont.t 841 842 843 + type trigger_repo = { 844 + default_branch : string; 845 + did : string; 846 + knot : string; 847 + repo : string; 848 } 849 850 + (** Jsont codec for {!type:trigger_repo}. *) 851 + val trigger_repo_jsont : trigger_repo Jsont.t 852 853 854 + type manual_trigger_data = { 855 + inputs : pair list option; 856 } 857 858 + (** Jsont codec for {!type:manual_trigger_data}. *) 859 + val manual_trigger_data_jsont : manual_trigger_data Jsont.t 860 861 862 + type workflow = { 863 + clone : clone_opts; 864 + engine : string; 865 + name : string; 866 + raw : string; 867 } 868 869 + (** Jsont codec for {!type:workflow}. *) 870 + val workflow_jsont : workflow Jsont.t 871 872 873 + type trigger_metadata = { 874 + kind : string; 875 + manual : manual_trigger_data option; 876 + pull_request : pull_request_trigger_data option; 877 + push : push_trigger_data option; 878 + repo : trigger_repo; 879 } 880 881 + (** Jsont codec for {!type:trigger_metadata}. *) 882 + val trigger_metadata_jsont : trigger_metadata Jsont.t 883 884 885 type main = { 886 + trigger_metadata : trigger_metadata; 887 + workflows : workflow list; 888 } 889 890 (** Jsont codec for {!type:main}. *) 891 val main_jsont : main Jsont.t 892 893 + module Status : sig 894 895 type main = { 896 + created_at : string; (** time of creation of this status update *) 897 + error : string option; (** error message if failed *) 898 + exit_code : int option; (** exit code if failed *) 899 + pipeline : string; (** ATURI of the pipeline *) 900 + status : string; (** status of the workflow *) 901 + workflow : string; (** name of the workflow within this pipeline *) 902 } 903 904 (** Jsont codec for {!type:main}. *) 905 val main_jsont : main Jsont.t 906 907 + end 908 + end 909 + module Owner : sig 910 + (** Get the owner of a service *) 911 912 913 + type output = { 914 + owner : string; 915 } 916 917 + (** Jsont codec for {!type:output}. *) 918 + val output_jsont : output Jsont.t 919 920 + end 921 + module Label : sig 922 + module Op : sig 923 924 + type operand = { 925 + key : string; (** ATURI to the label definition *) 926 + value : string; (** Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value. *) 927 } 928 929 + (** Jsont codec for {!type:operand}. *) 930 + val operand_jsont : operand Jsont.t 931 932 933 type main = { 934 + add : operand list; 935 + delete : operand list; 936 + performed_at : string; 937 + subject : string; (** The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. *) 938 } 939 940 (** Jsont codec for {!type:main}. *) 941 val main_jsont : main Jsont.t 942 943 end 944 module Definition : sig 945 946 type value_type = { ··· 966 val main_jsont : main Jsont.t 967 968 end 969 end 970 + module Knot : sig 971 972 type main = { 973 created_at : string; 974 } 975 976 (** Jsont codec for {!type:main}. *) 977 val main_jsont : main Jsont.t 978 979 + module Version : sig 980 + (** Get the version of a knot *) 981 + 982 983 + type output = { 984 + version : string; 985 } 986 987 + (** Jsont codec for {!type:output}. *) 988 + val output_jsont : output Jsont.t 989 990 + end 991 module Member : sig 992 993 type main = { ··· 1032 val output_jsont : output Jsont.t 1033 1034 end 1035 end 1036 + module Graph : sig 1037 + module Follow : sig 1038 1039 type main = { 1040 + created_at : string; 1041 + subject : string; 1042 } 1043 1044 (** Jsont codec for {!type:main}. *) 1045 val main_jsont : main Jsont.t 1046 1047 + end 1048 end 1049 + module Git : sig 1050 + module RefUpdate : sig 1051 1052 + type individual_email_commit_count = { 1053 + count : int; 1054 + email : string; 1055 } 1056 1057 + (** Jsont codec for {!type:individual_email_commit_count}. *) 1058 + val individual_email_commit_count_jsont : individual_email_commit_count Jsont.t 1059 1060 1061 + type individual_language_size = { 1062 + lang : string; 1063 + size : int; 1064 } 1065 1066 + (** Jsont codec for {!type:individual_language_size}. *) 1067 + val individual_language_size_jsont : individual_language_size Jsont.t 1068 1069 1070 + type commit_count_breakdown = { 1071 + by_email : individual_email_commit_count list option; 1072 } 1073 1074 + (** Jsont codec for {!type:commit_count_breakdown}. *) 1075 + val commit_count_breakdown_jsont : commit_count_breakdown Jsont.t 1076 1077 1078 + type lang_breakdown = { 1079 + inputs : individual_language_size list option; 1080 } 1081 1082 + (** Jsont codec for {!type:lang_breakdown}. *) 1083 + val lang_breakdown_jsont : lang_breakdown Jsont.t 1084 1085 1086 + type meta = { 1087 + commit_count : commit_count_breakdown; 1088 + is_default_ref : bool; 1089 + lang_breakdown : lang_breakdown option; 1090 } 1091 1092 + (** Jsont codec for {!type:meta}. *) 1093 + val meta_jsont : meta Jsont.t 1094 1095 + (** An update to a git repository, emitted by knots. *) 1096 1097 + type main = { 1098 + committer_did : string; (** did of the user that pushed this ref *) 1099 + meta : meta; 1100 + new_sha : string; (** new SHA of this ref *) 1101 + old_sha : string; (** old SHA of this ref *) 1102 + ref_ : string; (** Ref being updated *) 1103 + repo_did : string; (** did of the owner of the repo *) 1104 + repo_name : string; (** name of the repo *) 1105 } 1106 1107 + (** Jsont codec for {!type:main}. *) 1108 + val main_jsont : main Jsont.t 1109 1110 + end 1111 + end 1112 + module Feed : sig 1113 + module Star : sig 1114 1115 + type main = { 1116 + created_at : string; 1117 + subject : string; 1118 } 1119 1120 + (** Jsont codec for {!type:main}. *) 1121 + val main_jsont : main Jsont.t 1122 1123 + end 1124 + module Reaction : sig 1125 1126 type main = { 1127 + created_at : string; 1128 + reaction : string; 1129 + subject : string; 1130 } 1131 1132 (** Jsont codec for {!type:main}. *) 1133 val main_jsont : main Jsont.t 1134 1135 + end 1136 + end 1137 + module Actor : sig 1138 + module Profile : sig 1139 + (** A declaration of a Tangled account profile. *) 1140 1141 type main = { 1142 + bluesky : bool; (** Include link to this account on Bluesky. *) 1143 + description : string option; (** Free-form profile description text. *) 1144 + links : string list option; 1145 + location : string option; (** Free-form location text. *) 1146 + pinned_repositories : string list option; (** Any ATURI, it is up to appviews to validate these fields. *) 1147 + pronouns : string option; (** Preferred gender pronouns. *) 1148 + stats : string list option; 1149 } 1150 1151 (** Jsont codec for {!type:main}. *)