My aggregated monorepo of OCaml code, automaintained

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 37 let rec aux acc p = 38 38 if Sys.is_directory p then 39 39 Sys.readdir p |> Array.to_list 40 + (* Sort directory entries for deterministic ordering *) 41 + |> List.sort String.compare 40 42 |> List.map (Filename.concat p) 41 43 |> List.fold_left aux acc 42 44 else if Filename.check_suffix p ".json" then p :: acc 43 45 else acc 44 46 in 45 - aux [] path 47 + (* Sort final result for deterministic ordering *) 48 + aux [] path |> List.sort String.compare 46 49 47 50 (* generate module structure from lexicons - unified mode *) 48 51 let generate ~inputs ~output_dir ~module_name ~public_name =
+23 -4
hermest/lib/codegen_jsont.ml
··· 532 532 in 533 533 match ready with 534 534 | [] -> 535 - (* Cycle detected or external deps - just append remaining *) 536 - sorted @ remaining 537 - | _ -> sort (sorted @ ready) not_ready 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 538 552 in 539 553 (* Sort support defs first, then append primary defs *) 540 554 sort [] support_defs @ primary_defs ··· 1461 1475 (* Shouldn't happen after removing cyclic deps, but fall back to alphabetical *) 1462 1476 List.rev sorted 1463 1477 @ List.sort (fun (a, _) (b, _) -> String.compare a b) not_ready 1464 - | _ -> topo_sort (ready @ sorted) 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 1465 1484 in 1466 1485 (topo_sort [] children, cyclic_nodes) 1467 1486
+16
hermest/lib/naming.ml
··· 323 323 | Some ns -> ModuleWithChildren (ns, new_children) 324 324 | None -> Node new_children) 325 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 326 341 match 327 342 List.fold_left 328 343 (fun trie nsid -> 329 344 let segments = String.split_on_char '.' nsid in 330 345 insert_segments trie nsid segments) 331 346 (Node []) nsids 347 + |> sort_trie 332 348 with 333 349 | Node result -> result 334 350 | ModuleWithChildren (_, result) -> result
+15 -15
lexicons/atproto/atp_lexicon_atproto.ml
··· 31 31 |> Jsont.Object.finish 32 32 33 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 34 module ListRecords = struct 50 35 type record = { 51 36 cid : string; ··· 144 129 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 145 130 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 146 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 147 |> Jsont.Object.finish 148 148 149 149 end
+11 -11
lexicons/atproto/atp_lexicon_atproto.mli
··· 24 24 val main_jsont : main Jsont.t 25 25 26 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 27 module ListRecords : sig 39 28 40 29 type record = { ··· 93 82 94 83 (** Jsont codec for {!type:output}. *) 95 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 96 97 97 end 98 98 module PutRecord : sig
+2856 -2856
lexicons/bsky/atp_lexicon_bsky.ml
··· 15 15 16 16 module Com = struct 17 17 module Atproto = struct 18 - module Label = struct 19 - module Defs = struct 20 - type self_label = { 21 - val_ : string; 18 + module Repo = struct 19 + module StrongRef = struct 20 + type main = { 21 + cid : string; 22 + uri : string; 22 23 } 23 24 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_) 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) 29 31 |> Jsont.Object.finish 30 32 31 - type label_value_definition_strings = { 32 - description : string; 33 - lang : string; 34 - name : string; 35 - } 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 36 57 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 58 + type reason_violation = string 59 + let reason_violation_jsont = Jsont.string 45 60 46 - type label_value = string 47 - let label_value_jsont = Jsont.string 61 + type subject_type = string 62 + let subject_type_jsont = Jsont.string 48 63 64 + end 65 + end 66 + module Label = struct 67 + module Defs = struct 49 68 type label = { 50 69 cid : string option; 51 70 cts : string; ··· 73 92 |> Jsont.Object.opt_mem "ver" Jsont.int ~enc:(fun r -> r.ver) 74 93 |> Jsont.Object.finish 75 94 76 - type self_labels = { 77 - values : self_label list; 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; 78 102 } 79 103 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) 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_) 85 122 |> Jsont.Object.finish 86 123 87 124 type label_value_definition = { ··· 105 142 |> Jsont.Object.mem "severity" Jsont.string ~enc:(fun r -> r.severity) 106 143 |> Jsont.Object.finish 107 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 + 108 156 end 109 157 end 110 - module Repo = struct 111 - module StrongRef = struct 112 - type main = { 113 - cid : string; 114 - uri : string; 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; 115 170 } 116 171 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) 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) 123 181 |> Jsont.Object.finish 124 182 125 183 end 126 - end 127 - module Moderation = struct 128 184 module Defs = struct 129 - type subject_type = string 130 - let subject_type_jsont = Jsont.string 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 + } 131 194 132 - type reason_violation = string 133 - let reason_violation_jsont = Jsont.string 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 134 207 135 - type reason_type = string 136 - let reason_type_jsont = Jsont.string 208 + end 209 + module UploadVideo = struct 210 + type input = unit 211 + let input_jsont = Jsont.ignore 137 212 138 - type reason_spam = string 139 - let reason_spam_jsont = Jsont.string 213 + type output = { 214 + job_status : Defs.job_status; 215 + } 140 216 141 - type reason_sexual = string 142 - let reason_sexual_jsont = Jsont.string 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 143 223 144 - type reason_rude = string 145 - let reason_rude_jsont = Jsont.string 224 + end 225 + module GetJobStatus = struct 226 + type params = { 227 + job_id : string; 228 + } 146 229 147 - type reason_other = string 148 - let reason_other_jsont = Jsont.string 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 149 238 150 - type reason_misleading = string 151 - let reason_misleading_jsont = Jsont.string 239 + type output = { 240 + job_status : Defs.job_status; 241 + } 152 242 153 - type reason_appeal = string 154 - let reason_appeal_jsont = Jsont.string 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 155 249 156 250 end 157 251 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 252 module Richtext = struct 178 253 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; 254 + type byte_slice = { 255 + byte_end : int; 256 + byte_start : int; 192 257 } 193 258 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) 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) 199 265 |> Jsont.Object.finish 200 266 201 267 type link = { ··· 209 275 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 210 276 |> Jsont.Object.finish 211 277 212 - type byte_slice = { 213 - byte_end : int; 214 - byte_start : int; 278 + type mention = { 279 + did : string; 215 280 } 216 281 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) 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) 223 298 |> Jsont.Object.finish 224 299 225 300 type main = { ··· 237 312 238 313 end 239 314 end 240 - module AuthManageFeedDeclarations = struct 241 - type main = unit 242 - let main_jsont = Jsont.ignore 315 + module Notification = struct 316 + module UpdateSeen = struct 317 + type input = { 318 + seen_at : string; 319 + } 243 320 244 - end 245 - module AuthFullApp = struct 246 - type main = unit 247 - let main_jsont = Jsont.ignore 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 248 327 249 - end 250 - module AuthManageNotifications = struct 251 - type main = unit 252 - let main_jsont = Jsont.ignore 328 + end 329 + module UnregisterPush = struct 330 + type input = { 331 + app_id : string; 332 + platform : string; 333 + service_did : string; 334 + token : string; 335 + } 253 336 254 - end 255 - module AuthManageProfile = struct 256 - type main = unit 257 - let main_jsont = Jsont.ignore 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 258 346 259 - end 260 - module Ageassurance = struct 261 - module Defs = struct 262 - type status = string 263 - let status_jsont = Jsont.string 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 + } 264 356 265 - type state_metadata = { 266 - account_created_at : string option; 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; 267 372 } 268 373 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) 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) 274 379 |> Jsont.Object.finish 275 380 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; 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; 288 393 } 289 394 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) 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) 305 408 |> Jsont.Object.finish 306 409 307 - type config_region = { 308 - country_code : string; 309 - min_access_age : int; 310 - region_code : string option; 311 - rules : Jsont.json list; 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; 312 416 } 313 417 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) 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) 322 437 |> Jsont.Object.finish 323 438 324 - type access = string 325 - let access_jsont = Jsont.string 439 + type output = { 440 + cursor : string option; 441 + notifications : Jsont.json list; 442 + priority : bool option; 443 + seen_at : string option; 444 + } 326 445 327 - type state = { 328 - access : access; 329 - last_initiated_at : string option; 330 - status : status; 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; 331 461 } 332 462 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) 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) 340 473 |> Jsont.Object.finish 341 474 342 - type config_region_rule_if_declared_under_age = { 343 - access : access; 344 - age : int; 475 + type output = { 476 + cursor : string option; 477 + subscriptions : Jsont.json list; 345 478 } 346 479 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) 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) 353 486 |> Jsont.Object.finish 354 487 355 - type config_region_rule_if_declared_over_age = { 356 - access : access; 357 - age : int; 488 + end 489 + module GetUnreadCount = struct 490 + type params = { 491 + priority : bool option; 492 + seen_at : string option; 358 493 } 359 494 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) 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) 366 505 |> Jsont.Object.finish 367 506 368 - type config_region_rule_if_assured_under_age = { 369 - access : access; 370 - age : int; 507 + type output = { 508 + count : int; 371 509 } 372 510 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) 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) 379 516 |> Jsont.Object.finish 380 517 381 - type config_region_rule_if_assured_over_age = { 382 - access : access; 383 - age : int; 518 + end 519 + module Defs = struct 520 + type activity_subscription = { 521 + post : bool; 522 + reply : bool; 384 523 } 385 524 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) 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) 392 531 |> Jsont.Object.finish 393 532 394 - type config_region_rule_if_account_older_than = { 395 - access : access; 396 - date : string; 533 + type chat_preference = { 534 + include_ : string; 535 + push : bool; 397 536 } 398 537 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) 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) 405 544 |> Jsont.Object.finish 406 545 407 - type config_region_rule_if_account_newer_than = { 408 - access : access; 409 - date : string; 546 + type filterable_preference = { 547 + include_ : string; 548 + list_ : bool; 549 + push : bool; 410 550 } 411 551 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) 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) 418 559 |> Jsont.Object.finish 419 560 420 - type config_region_rule_default = { 421 - access : access; 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; 422 616 } 423 617 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) 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) 429 624 |> Jsont.Object.finish 430 625 431 - type config = { 432 - regions : config_region list; 626 + end 627 + module Declaration = struct 628 + type main = { 629 + allow_subscriptions : string; 433 630 } 434 631 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) 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) 440 637 |> Jsont.Object.finish 441 638 442 639 end 443 - module Begin = struct 640 + module PutPreferencesV2 = struct 444 641 type input = { 445 - country_code : string; 446 - email : string; 447 - language : string; 448 - region_code : string option; 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; 449 655 } 450 656 451 657 let input_jsont = 452 658 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) 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) 459 674 |> Jsont.Object.finish 460 675 461 - type output = Defs.state 676 + type output = { 677 + preferences : Jsont.json; 678 + } 462 679 463 - let output_jsont = Defs.state_jsont 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 464 686 465 687 end 466 - module GetState = struct 467 - type params = { 468 - country_code : string; 469 - region_code : string option; 688 + module PutActivitySubscription = struct 689 + type input = { 690 + activity_subscription : Jsont.json; 691 + subject : string; 470 692 } 471 693 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) 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) 482 700 |> Jsont.Object.finish 483 701 484 702 type output = { 485 - metadata : Defs.state_metadata; 486 - state : Defs.state; 703 + activity_subscription : Jsont.json option; 704 + subject : string; 487 705 } 488 706 489 707 let output_jsont = 490 708 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) 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) 495 713 |> Jsont.Object.finish 496 714 497 715 end 498 - module GetConfig = struct 499 - type output = Defs.config 716 + module GetPreferences = struct 717 + type params = unit 500 718 501 - let output_jsont = Defs.config_jsont 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 502 731 503 732 end 504 733 end 505 734 module Labeler = struct 506 735 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 736 type labeler_policies = { 519 737 label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; 520 738 label_values : Com.Atproto.Label.Defs.label_value list; ··· 528 746 |> Jsont.Object.mem "labelValues" (Jsont.list Com.Atproto.Label.Defs.label_value_jsont) ~enc:(fun r -> r.label_values) 529 747 |> Jsont.Object.finish 530 748 531 - type labeler_view_detailed = { 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 = { 532 761 cid : string; 533 762 creator : Jsont.json; 534 763 indexed_at : string; 535 764 labels : Com.Atproto.Label.Defs.label list option; 536 765 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 766 uri : string; 542 767 viewer : Jsont.json option; 543 768 } 544 769 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") 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") 549 774 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 550 775 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 551 776 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 552 777 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 553 778 |> 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 779 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 559 780 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 560 781 |> Jsont.Object.finish 561 782 562 - type labeler_view = { 783 + type labeler_view_detailed = { 563 784 cid : string; 564 785 creator : Jsont.json; 565 786 indexed_at : string; 566 787 labels : Com.Atproto.Label.Defs.label list option; 567 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; 568 793 uri : string; 569 794 viewer : Jsont.json option; 570 795 } 571 796 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") 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") 576 801 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 577 802 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 578 803 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 579 804 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 580 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) 581 810 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 582 811 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 583 812 |> Jsont.Object.finish ··· 637 866 638 867 end 639 868 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 869 module Embed = struct 736 870 module External = struct 737 - type view_external = { 871 + type external_ = { 738 872 description : string; 739 - thumb : string option; 873 + thumb : Atp.Blob_ref.t option; 740 874 title : string; 741 875 uri : string; 742 876 } 743 877 744 - let view_external_jsont = 745 - Jsont.Object.map ~kind:"View_external" 878 + let external__jsont = 879 + Jsont.Object.map ~kind:"External_" 746 880 (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") 881 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 748 882 |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 749 - |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 883 + |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 750 884 |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 751 885 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 752 886 |> Jsont.Object.finish 753 887 754 - type external_ = { 888 + type view_external = { 755 889 description : string; 756 - thumb : Atp.Blob_ref.t option; 890 + thumb : string option; 757 891 title : string; 758 892 uri : string; 759 893 } 760 894 761 - let external__jsont = 762 - Jsont.Object.map ~kind:"External_" 895 + let view_external_jsont = 896 + Jsont.Object.map ~kind:"View_external" 763 897 (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") 898 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#viewExternal" ~enc:(fun _ -> "app.bsky.embed.external#viewExternal") 765 899 |> 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) 900 + |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 767 901 |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 768 902 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 769 903 |> Jsont.Object.finish 770 904 771 - type view = { 905 + type main = { 772 906 external_ : Jsont.json; 773 907 } 774 908 775 - let view_jsont = 776 - Jsont.Object.map ~kind:"View" 909 + let main_jsont = 910 + Jsont.Object.map ~kind:"Main" 777 911 (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") 912 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 779 913 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 780 914 |> Jsont.Object.finish 781 915 782 - type main = { 916 + type view = { 783 917 external_ : Jsont.json; 784 918 } 785 919 786 - let main_jsont = 787 - Jsont.Object.map ~kind:"Main" 920 + let view_jsont = 921 + Jsont.Object.map ~kind:"View" 788 922 (fun _typ external_ -> { external_ }) 789 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 923 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#view" ~enc:(fun _ -> "app.bsky.embed.external#view") 790 924 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 791 925 |> Jsont.Object.finish 792 926 ··· 806 940 |> Jsont.Object.finish 807 941 808 942 end 809 - module Images = struct 810 - type view_image = { 811 - alt : string; 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; 812 978 aspect_ratio : Jsont.json option; 813 - fullsize : string; 814 - thumb : string; 979 + captions : Jsont.json list option; 980 + video : Atp.Blob_ref.t; 815 981 } 816 982 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) 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) 822 988 |> 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) 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) 825 991 |> Jsont.Object.finish 826 992 993 + end 994 + module Images = struct 827 995 type image = { 828 996 alt : string; 829 997 aspect_ratio : Jsont.json option; ··· 839 1007 |> Jsont.Object.mem "image" Atp.Blob_ref.jsont ~enc:(fun r -> r.image) 840 1008 |> Jsont.Object.finish 841 1009 842 - type view = { 843 - images : Jsont.json list; 1010 + type view_image = { 1011 + alt : string; 1012 + aspect_ratio : Jsont.json option; 1013 + fullsize : string; 1014 + thumb : string; 844 1015 } 845 1016 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) 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) 851 1025 |> Jsont.Object.finish 852 1026 853 1027 type main = { ··· 861 1035 |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 862 1036 |> Jsont.Object.finish 863 1037 864 - end 865 - module Video = struct 866 1038 type view = { 867 - alt : string option; 868 - aspect_ratio : Jsont.json option; 869 - cid : string; 870 - playlist : string; 871 - thumbnail : string option; 1039 + images : Jsont.json list; 872 1040 } 873 1041 874 1042 let view_jsont = 875 1043 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) 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) 883 1047 |> Jsont.Object.finish 884 1048 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 - 1049 + end 1050 + module RecordWithMedia = struct 898 1051 type main = { 899 - alt : string option; 900 - aspect_ratio : Jsont.json option; 901 - captions : Jsont.json list option; 902 - video : Atp.Blob_ref.t; 1052 + media : Jsont.json; 1053 + record : Jsont.json; 903 1054 } 904 1055 905 1056 let main_jsont = 906 1057 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) 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) 913 1062 |> Jsont.Object.finish 914 1063 915 - end 916 - module RecordWithMedia = struct 917 1064 type view = { 918 1065 media : Jsont.json; 919 1066 record : Jsont.json; ··· 927 1074 |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 928 1075 |> Jsont.Object.finish 929 1076 1077 + end 1078 + module Record = struct 930 1079 type main = { 931 - media : Jsont.json; 932 - record : Jsont.json; 1080 + record : Com.Atproto.Repo.StrongRef.main; 933 1081 } 934 1082 935 1083 let main_jsont = 936 1084 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) 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) 941 1088 |> Jsont.Object.finish 942 1089 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; 1090 + type view = { 1091 + record : Jsont.json; 957 1092 } 958 1093 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) 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) 974 1099 |> Jsont.Object.finish 975 1100 976 - type view_not_found = { 977 - not_found : bool; 1101 + type view_blocked = { 1102 + author : Jsont.json; 1103 + blocked : bool; 978 1104 uri : string; 979 1105 } 980 1106 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) 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) 986 1113 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 987 1114 |> Jsont.Object.finish 988 1115 ··· 999 1126 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1000 1127 |> Jsont.Object.finish 1001 1128 1002 - type view_blocked = { 1003 - author : Jsont.json; 1004 - blocked : bool; 1129 + type view_not_found = { 1130 + not_found : bool; 1005 1131 uri : string; 1006 1132 } 1007 1133 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) 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) 1014 1139 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1015 1140 |> Jsont.Object.finish 1016 1141 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 = { 1142 + type view_record = { 1078 1143 author : Jsont.json; 1079 1144 cid : string; 1145 + embeds : Jsont.json list option; 1080 1146 indexed_at : string; 1081 - is_read : bool; 1082 1147 labels : Com.Atproto.Label.Defs.label list option; 1083 - reason : string; 1084 - reason_subject : string option; 1085 - record : Jsont.json; 1148 + like_count : int option; 1149 + quote_count : int option; 1150 + reply_count : int option; 1151 + repost_count : int option; 1086 1152 uri : string; 1153 + value : Jsont.json; 1087 1154 } 1088 1155 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") 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") 1093 1160 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1094 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) 1095 1163 |> 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 1164 |> 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) 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) 1101 1169 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1170 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 1102 1171 |> Jsont.Object.finish 1103 1172 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 - } 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 1111 1203 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 1204 + end 1205 + module AuthFullApp = struct 1206 + type main = unit 1207 + let main_jsont = Jsont.ignore 1132 1208 1133 - type output = { 1134 - cursor : string option; 1135 - notifications : Jsont.json list; 1136 - priority : bool option; 1137 - seen_at : string option; 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; 1138 1225 } 1139 1226 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) 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) 1148 1235 |> Jsont.Object.finish 1149 1236 1150 - end 1151 - module GetUnreadCount = struct 1152 - type params = { 1153 - priority : bool option; 1154 - seen_at : string option; 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; 1155 1249 } 1156 1250 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) 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) 1167 1266 |> Jsont.Object.finish 1168 1267 1169 - type output = { 1170 - count : int; 1268 + type state_metadata = { 1269 + account_created_at : string option; 1171 1270 } 1172 1271 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) 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) 1178 1277 |> Jsont.Object.finish 1179 1278 1180 - end 1181 - module UnregisterPush = struct 1182 - type input = { 1183 - app_id : string; 1184 - platform : string; 1185 - service_did : string; 1186 - token : string; 1279 + type status = string 1280 + let status_jsont = Jsont.string 1281 + 1282 + type config = { 1283 + regions : config_region list; 1187 1284 } 1188 1285 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) 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) 1197 1291 |> Jsont.Object.finish 1198 1292 1199 - end 1200 - module PutPreferences = struct 1201 - type input = { 1202 - priority : bool; 1293 + type config_region_rule_default = { 1294 + access : access; 1203 1295 } 1204 1296 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) 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) 1210 1302 |> Jsont.Object.finish 1211 1303 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; 1304 + type config_region_rule_if_account_newer_than = { 1305 + access : access; 1306 + date : string; 1221 1307 } 1222 1308 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) 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) 1229 1315 |> Jsont.Object.finish 1230 1316 1231 - type filterable_preference = { 1232 - include_ : string; 1233 - list_ : bool; 1234 - push : bool; 1317 + type config_region_rule_if_account_older_than = { 1318 + access : access; 1319 + date : string; 1235 1320 } 1236 1321 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) 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) 1244 1328 |> Jsont.Object.finish 1245 1329 1246 - type chat_preference = { 1247 - include_ : string; 1248 - push : bool; 1330 + type config_region_rule_if_assured_over_age = { 1331 + access : access; 1332 + age : int; 1249 1333 } 1250 1334 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) 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) 1257 1341 |> Jsont.Object.finish 1258 1342 1259 - type activity_subscription = { 1260 - post : bool; 1261 - reply : bool; 1343 + type config_region_rule_if_assured_under_age = { 1344 + access : access; 1345 + age : int; 1262 1346 } 1263 1347 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) 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) 1270 1354 |> Jsont.Object.finish 1271 1355 1272 - type subject_activity_subscription = { 1273 - activity_subscription : Jsont.json; 1274 - subject : string; 1356 + type config_region_rule_if_declared_over_age = { 1357 + access : access; 1358 + age : int; 1275 1359 } 1276 1360 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) 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) 1283 1367 |> Jsont.Object.finish 1284 1368 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; 1369 + type config_region_rule_if_declared_under_age = { 1370 + access : access; 1371 + age : int; 1299 1372 } 1300 1373 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) 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) 1318 1380 |> Jsont.Object.finish 1319 1381 1320 - end 1321 - module Declaration = struct 1322 - type main = { 1323 - allow_subscriptions : string; 1382 + type state = { 1383 + access : access; 1384 + last_initiated_at : string option; 1385 + status : status; 1324 1386 } 1325 1387 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) 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) 1331 1395 |> Jsont.Object.finish 1332 1396 1333 1397 end 1334 - module ListActivitySubscriptions = struct 1398 + module GetState = struct 1335 1399 type params = { 1336 - cursor : string option; 1337 - limit : int option; 1400 + country_code : string; 1401 + region_code : string option; 1338 1402 } 1339 1403 1340 1404 let params_jsont = 1341 1405 Jsont.Object.map ~kind:"Params" 1342 - (fun cursor limit -> { 1343 - cursor; 1344 - limit; 1406 + (fun country_code region_code -> { 1407 + country_code; 1408 + region_code; 1345 1409 }) 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) 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) 1350 1414 |> Jsont.Object.finish 1351 1415 1352 1416 type output = { 1353 - cursor : string option; 1354 - subscriptions : Jsont.json list; 1417 + metadata : Defs.state_metadata; 1418 + state : Defs.state; 1355 1419 } 1356 1420 1357 1421 let output_jsont = 1358 1422 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) 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) 1363 1427 |> Jsont.Object.finish 1364 1428 1365 1429 end 1366 - module GetPreferences = struct 1367 - type params = unit 1368 - 1369 - let params_jsont = Jsont.ignore 1430 + module GetConfig = struct 1431 + type output = Defs.config 1370 1432 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 1433 + let output_jsont = Defs.config_jsont 1381 1434 1382 1435 end 1383 - module PutActivitySubscription = struct 1436 + module Begin = struct 1384 1437 type input = { 1385 - activity_subscription : Jsont.json; 1386 - subject : string; 1438 + country_code : string; 1439 + email : string; 1440 + language : string; 1441 + region_code : string option; 1387 1442 } 1388 1443 1389 1444 let input_jsont = 1390 1445 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) 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) 1395 1452 |> Jsont.Object.finish 1396 1453 1397 - type output = { 1398 - activity_subscription : Jsont.json option; 1399 - subject : string; 1400 - } 1454 + type output = Defs.state 1401 1455 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 1456 + let output_jsont = Defs.state_jsont 1457 1457 1458 1458 end 1459 1459 end ··· 1512 1512 1513 1513 end 1514 1514 module Defs = struct 1515 - type verification_view = { 1516 - created_at : string; 1517 - is_valid : bool; 1518 - issuer : string; 1519 - uri : string; 1515 + type adult_content_pref = { 1516 + enabled : bool; 1520 1517 } 1521 1518 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) 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) 1530 1524 |> Jsont.Object.finish 1531 1525 1532 - type verification_prefs = { 1533 - hide_badges : bool option; 1526 + type bsky_app_progress_guide = { 1527 + guide : string; 1534 1528 } 1535 1529 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) 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) 1541 1535 |> Jsont.Object.finish 1542 1536 1543 - type thread_view_pref = { 1544 - sort : string option; 1537 + type content_label_pref = { 1538 + label : string; 1539 + labeler_did : string option; 1540 + visibility : string; 1545 1541 } 1546 1542 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) 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) 1552 1550 |> Jsont.Object.finish 1553 1551 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; 1552 + type declared_age_pref = { 1553 + is_over_age13 : bool option; 1554 + is_over_age16 : bool option; 1555 + is_over_age18 : bool option; 1563 1556 } 1564 1557 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) 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) 1577 1565 |> Jsont.Object.finish 1578 1566 1579 - type saved_feeds_pref = { 1580 - pinned : string list; 1581 - saved : string list; 1582 - timeline_index : int option; 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; 1583 1574 } 1584 1575 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) 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) 1592 1586 |> Jsont.Object.finish 1593 1587 1594 - type saved_feed = { 1595 - id : string; 1596 - pinned : bool; 1597 - type_ : string; 1598 - value : string; 1588 + type hidden_posts_pref = { 1589 + items : string list; 1599 1590 } 1600 1591 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) 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) 1609 1597 |> Jsont.Object.finish 1610 1598 1611 - type profile_associated_chat = { 1612 - allow_incoming : string; 1599 + type interests_pref = { 1600 + tags : string list; 1613 1601 } 1614 1602 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) 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) 1620 1608 |> Jsont.Object.finish 1621 1609 1622 - type profile_associated_activity_subscription = { 1623 - allow_subscriptions : string; 1610 + type labeler_pref_item = { 1611 + did : string; 1624 1612 } 1625 1613 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) 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) 1631 1619 |> Jsont.Object.finish 1632 1620 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 1621 + type muted_word_target = string 1622 + let muted_word_target_jsont = Jsont.string 1659 1623 1660 1624 type nux = { 1661 1625 completed : bool; ··· 1674 1638 |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1675 1639 |> Jsont.Object.finish 1676 1640 1677 - type muted_word_target = string 1678 - let muted_word_target_jsont = Jsont.string 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 1679 1651 1680 - type labeler_pref_item = { 1681 - did : string; 1652 + type post_interaction_settings_pref = { 1653 + postgate_embedding_rules : Jsont.json list option; 1654 + threadgate_allow_rules : Jsont.json list option; 1682 1655 } 1683 1656 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) 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) 1689 1663 |> Jsont.Object.finish 1690 1664 1691 - type interests_pref = { 1692 - tags : string list; 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; 1693 1670 } 1694 1671 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) 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) 1700 1677 |> Jsont.Object.finish 1701 1678 1702 - type hidden_posts_pref = { 1703 - items : string list; 1679 + type profile_associated_chat = { 1680 + allow_incoming : string; 1704 1681 } 1705 1682 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) 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) 1711 1688 |> Jsont.Object.finish 1712 1689 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; 1690 + type saved_feed = { 1691 + id : string; 1692 + pinned : bool; 1693 + type_ : string; 1694 + value : string; 1720 1695 } 1721 1696 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) 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) 1732 1705 |> Jsont.Object.finish 1733 1706 1734 - type declared_age_pref = { 1735 - is_over_age13 : bool option; 1736 - is_over_age16 : bool option; 1737 - is_over_age18 : bool option; 1707 + type saved_feeds_pref = { 1708 + pinned : string list; 1709 + saved : string list; 1710 + timeline_index : int option; 1738 1711 } 1739 1712 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) 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) 1747 1720 |> Jsont.Object.finish 1748 1721 1749 - type content_label_pref = { 1750 - label : string; 1751 - labeler_did : string option; 1752 - visibility : string; 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; 1753 1731 } 1754 1732 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) 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) 1762 1745 |> Jsont.Object.finish 1763 1746 1764 - type bsky_app_progress_guide = { 1765 - guide : string; 1747 + type thread_view_pref = { 1748 + sort : string option; 1766 1749 } 1767 1750 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) 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) 1773 1756 |> Jsont.Object.finish 1774 1757 1775 - type adult_content_pref = { 1776 - enabled : bool; 1758 + type verification_prefs = { 1759 + hide_badges : bool option; 1777 1760 } 1778 1761 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) 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) 1784 1767 |> Jsont.Object.finish 1785 1768 1786 - type verification_state = { 1787 - trusted_verifier_status : string; 1788 - verifications : Jsont.json list; 1789 - verified_status : string; 1769 + type verification_view = { 1770 + created_at : string; 1771 + is_valid : bool; 1772 + issuer : string; 1773 + uri : string; 1790 1774 } 1791 1775 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) 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) 1799 1784 |> Jsont.Object.finish 1800 1785 1801 - type saved_feeds_pref_v2 = { 1802 - items : Jsont.json list; 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; 1803 1790 } 1804 1791 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) 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) 1810 1799 |> Jsont.Object.finish 1811 1800 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; 1801 + type labelers_pref = { 1802 + labelers : Jsont.json list; 1819 1803 } 1820 1804 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) 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) 1831 1810 |> Jsont.Object.finish 1832 1811 1833 1812 type muted_word = { ··· 1849 1828 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1850 1829 |> Jsont.Object.finish 1851 1830 1852 - type labelers_pref = { 1853 - labelers : Jsont.json list; 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; 1854 1838 } 1855 1839 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) 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 1861 |> Jsont.Object.finish 1862 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; 1863 + type verification_state = { 1864 + trusted_verifier_status : string; 1865 + verifications : Jsont.json list; 1866 + verified_status : string; 1867 1867 } 1868 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) 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 1876 |> Jsont.Object.finish 1877 1877 1878 1878 type muted_words_pref = { ··· 1886 1886 |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 1887 1887 |> Jsont.Object.finish 1888 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; 1889 + type known_followers = { 1890 + count : int; 1891 + followers : Jsont.json list; 1899 1892 } 1900 1893 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) 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) 1914 1900 |> Jsont.Object.finish 1915 1901 1916 - type profile_view_detailed = { 1902 + type profile_view = { 1917 1903 associated : Jsont.json option; 1918 1904 avatar : string option; 1919 - banner : string option; 1920 1905 created_at : string option; 1921 1906 debug : Jsont.json option; 1922 1907 description : string option; 1923 1908 did : string; 1924 1909 display_name : string option; 1925 - followers_count : int option; 1926 - follows_count : int option; 1927 1910 handle : string; 1928 1911 indexed_at : string option; 1929 - joined_via_starter_pack : Jsont.json option; 1930 1912 labels : Com.Atproto.Label.Defs.label list option; 1931 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 1932 - posts_count : int option; 1933 1913 pronouns : string option; 1934 1914 status : Jsont.json option; 1935 1915 verification : Jsont.json option; 1936 1916 viewer : Jsont.json option; 1937 - website : string option; 1938 1917 } 1939 1918 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") 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") 1944 1923 |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1945 1924 |> 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 1925 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1948 1926 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1949 1927 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1950 1928 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1951 1929 |> 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 1930 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1955 1931 |> 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 1932 |> 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 1933 |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1961 1934 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 1962 1935 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1963 1936 |> 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 1937 |> Jsont.Object.finish 1966 1938 1967 1939 type profile_view_basic = { ··· 1997 1969 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1998 1970 |> Jsont.Object.finish 1999 1971 2000 - type profile_view = { 1972 + type profile_view_detailed = { 2001 1973 associated : Jsont.json option; 2002 1974 avatar : string option; 1975 + banner : string option; 2003 1976 created_at : string option; 2004 1977 debug : Jsont.json option; 2005 1978 description : string option; 2006 1979 did : string; 2007 1980 display_name : string option; 1981 + followers_count : int option; 1982 + follows_count : int option; 2008 1983 handle : string; 2009 1984 indexed_at : string option; 1985 + joined_via_starter_pack : Jsont.json option; 2010 1986 labels : Com.Atproto.Label.Defs.label list option; 1987 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1988 + posts_count : int option; 2011 1989 pronouns : string option; 2012 1990 status : Jsont.json option; 2013 1991 verification : Jsont.json option; 2014 1992 viewer : Jsont.json option; 1993 + website : string option; 2015 1994 } 2016 1995 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") 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") 2021 2000 |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 2022 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) 2023 2003 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2024 2004 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 2025 2005 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2026 2006 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2027 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) 2028 2010 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 2029 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) 2030 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) 2031 2016 |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 2032 2017 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 2033 2018 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 2034 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) 2035 2021 |> Jsont.Object.finish 2036 2022 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; 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; 2058 2033 } 2059 2034 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) 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) 2065 2048 |> Jsont.Object.finish 2066 2049 2067 2050 end ··· 2099 2082 |> Jsont.Object.finish 2100 2083 2101 2084 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 2085 module SearchActors = struct 2122 2086 type params = { 2123 2087 cursor : string option; ··· 2158 2122 |> Jsont.Object.finish 2159 2123 2160 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 2161 2138 module GetSuggestions = struct 2162 2139 type params = { 2163 2140 cursor : string option; ··· 2218 2195 |> Jsont.Object.finish 2219 2196 2220 2197 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 2198 + module GetProfile = struct 2305 2199 type params = { 2306 - cursor : string option; 2307 - limit : int option; 2200 + actor : string; 2308 2201 } 2309 2202 2310 2203 let params_jsont = 2311 2204 Jsont.Object.map ~kind:"Params" 2312 - (fun cursor limit -> { 2313 - cursor; 2314 - limit; 2205 + (fun actor -> { 2206 + actor; 2315 2207 }) 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) 2208 + |> Jsont.Object.mem "actor" Jsont.string 2209 + ~enc:(fun r -> r.actor) 2320 2210 |> Jsont.Object.finish 2321 2211 2322 - type output = { 2323 - cursor : string option; 2324 - matches : Jsont.json list; 2325 - } 2212 + type output = Jsont.json 2326 2213 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 2214 + let output_jsont = Jsont.json 2334 2215 2335 2216 end 2336 - module VerifyPhone = struct 2337 - type input = { 2338 - code : string; 2339 - phone : string; 2340 - } 2217 + module GetPreferences = struct 2218 + type params = unit 2341 2219 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 2220 + let params_jsont = Jsont.ignore 2349 2221 2350 2222 type output = { 2351 - token : string; 2223 + preferences : Jsont.json; 2352 2224 } 2353 2225 2354 2226 let output_jsont = 2355 2227 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) 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) 2359 2231 |> Jsont.Object.finish 2360 2232 2361 2233 end 2362 - module StartPhoneVerification = struct 2363 - type input = { 2364 - phone : string; 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; 2365 2242 } 2366 2243 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) 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) 2372 2252 |> Jsont.Object.finish 2373 2253 2374 - type output = unit 2375 - 2376 - let output_jsont = Jsont.ignore 2377 - 2378 2254 end 2379 - module SendNotification = struct 2255 + module UnmuteThread = struct 2380 2256 type input = { 2381 - from : string; 2382 - to_ : string; 2257 + root : string; 2383 2258 } 2384 2259 2385 2260 let input_jsont = 2386 2261 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_) 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) 2391 2265 |> Jsont.Object.finish 2392 - 2393 - type output = unit 2394 - 2395 - let output_jsont = Jsont.ignore 2396 2266 2397 2267 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; 2268 + module UnmuteActorList = struct 2269 + type input = { 2270 + list_ : string; 2405 2271 } 2406 2272 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) 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_) 2412 2278 |> Jsont.Object.finish 2413 2279 2414 2280 end 2415 - module ImportContacts = struct 2281 + module UnmuteActor = struct 2416 2282 type input = { 2417 - contacts : string list; 2418 - token : string; 2283 + actor : string; 2419 2284 } 2420 2285 2421 2286 let input_jsont = 2422 2287 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) 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) 2438 2291 |> Jsont.Object.finish 2439 2292 2440 2293 end 2441 - end 2442 - module Graph = struct 2443 2294 module Starterpack = struct 2444 2295 type feed_item = { 2445 2296 uri : string; ··· 2474 2325 |> Jsont.Object.finish 2475 2326 2476 2327 end 2477 - module GetFollows = struct 2478 - type params = { 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 = { 2479 2356 actor : string; 2480 - cursor : string option; 2481 - limit : int option; 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; 2482 2372 } 2483 2373 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) 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) 2497 2381 |> Jsont.Object.finish 2498 2382 2499 - type output = { 2500 - cursor : string option; 2501 - follows : Jsont.json list; 2502 - subject : Jsont.json; 2383 + end 2384 + module Listblock = struct 2385 + type main = { 2386 + created_at : string; 2387 + subject : string; 2503 2388 } 2504 2389 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) 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) 2512 2396 |> Jsont.Object.finish 2513 2397 2514 2398 end ··· 2542 2426 |> Jsont.Object.finish 2543 2427 2544 2428 end 2545 - module Block = struct 2546 - type main = { 2547 - created_at : string; 2548 - subject : string; 2429 + module GetMutes = struct 2430 + type params = { 2431 + cursor : string option; 2432 + limit : int option; 2549 2433 } 2550 2434 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) 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) 2572 2445 |> Jsont.Object.finish 2573 2446 2574 - end 2575 - module MuteThread = struct 2576 - type input = { 2577 - root : string; 2447 + type output = { 2448 + cursor : string option; 2449 + mutes : Jsont.json list; 2578 2450 } 2579 2451 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) 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) 2585 2458 |> Jsont.Object.finish 2586 2459 2587 2460 end 2588 - module GetFollowers = struct 2461 + module GetKnownFollowers = struct 2589 2462 type params = { 2590 2463 actor : string; 2591 2464 cursor : string option; ··· 2616 2489 let output_jsont = 2617 2490 Jsont.Object.map ~kind:"Output" 2618 2491 (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") 2492 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getKnownFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getKnownFollowers#output") 2620 2493 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2621 2494 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2622 2495 |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2623 2496 |> Jsont.Object.finish 2624 2497 2625 2498 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 = { 2499 + module GetFollows = struct 2500 + type params = { 2658 2501 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; 2502 + cursor : string option; 2503 + limit : int option; 2672 2504 } 2673 2505 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_) 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) 2679 2519 |> Jsont.Object.finish 2680 2520 2681 - end 2682 - module UnmuteActorList = struct 2683 - type input = { 2684 - list_ : string; 2521 + type output = { 2522 + cursor : string option; 2523 + follows : Jsont.json list; 2524 + subject : Jsont.json; 2685 2525 } 2686 2526 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_) 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) 2692 2534 |> Jsont.Object.finish 2693 2535 2694 2536 end 2695 - module GetKnownFollowers = struct 2537 + module GetFollowers = struct 2696 2538 type params = { 2697 2539 actor : string; 2698 2540 cursor : string option; ··· 2723 2565 let output_jsont = 2724 2566 Jsont.Object.map ~kind:"Output" 2725 2567 (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") 2568 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getFollowers#output") 2727 2569 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2728 2570 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2729 2571 |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2730 2572 |> Jsont.Object.finish 2731 2573 2732 2574 end 2733 - module MuteActor = struct 2734 - type input = { 2735 - actor : string; 2575 + module GetBlocks = struct 2576 + type params = { 2577 + cursor : string option; 2578 + limit : int option; 2736 2579 } 2737 2580 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) 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) 2743 2604 |> Jsont.Object.finish 2744 2605 2745 2606 end 2746 - module Listitem = struct 2607 + module Follow = struct 2747 2608 type main = { 2748 2609 created_at : string; 2749 - list_ : string; 2750 2610 subject : string; 2611 + via : Com.Atproto.Repo.StrongRef.main option; 2751 2612 } 2752 2613 2753 2614 let main_jsont = 2754 2615 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") 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") 2757 2618 |> 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 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) 2760 2621 |> Jsont.Object.finish 2761 2622 2762 2623 end 2763 2624 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; 2625 + type curatelist = string 2626 + let curatelist_jsont = Jsont.string 2627 + 2628 + type list_item_view = { 2629 + subject : Jsont.json; 2773 2630 uri : string; 2774 2631 } 2775 2632 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) 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) 2788 2638 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2789 2639 |> Jsont.Object.finish 2790 2640 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; 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; 2799 2647 } 2800 2648 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) 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) 2812 2655 |> Jsont.Object.finish 2813 2656 2814 - type referencelist = string 2815 - let referencelist_jsont = Jsont.string 2657 + type modlist = string 2658 + let modlist_jsont = Jsont.string 2816 2659 2817 2660 type not_found_actor = { 2818 2661 actor : string; ··· 2827 2670 |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 2828 2671 |> Jsont.Object.finish 2829 2672 2830 - type modlist = string 2831 - let modlist_jsont = Jsont.string 2673 + type referencelist = string 2674 + let referencelist_jsont = Jsont.string 2832 2675 2833 - type list_viewer_state = { 2834 - blocked : string option; 2835 - muted : bool option; 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; 2836 2684 } 2837 2685 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) 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) 2844 2697 |> Jsont.Object.finish 2845 2698 2846 - type list_purpose = string 2847 - let list_purpose_jsont = Jsont.string 2848 - 2849 - type list_item_view = { 2850 - subject : Jsont.json; 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; 2851 2708 uri : string; 2852 2709 } 2853 2710 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) 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) 2859 2723 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2860 2724 |> Jsont.Object.finish 2861 2725 2862 - type curatelist = string 2863 - let curatelist_jsont = Jsont.string 2864 - 2865 - type list_view_basic = { 2726 + type list_view = { 2866 2727 avatar : string option; 2867 2728 cid : string; 2868 - indexed_at : string option; 2729 + creator : Jsont.json; 2730 + description : string option; 2731 + description_facets : Richtext.Facet.main list option; 2732 + indexed_at : string; 2869 2733 labels : Com.Atproto.Label.Defs.label list option; 2870 2734 list_item_count : int option; 2871 2735 name : string; ··· 2874 2738 viewer : Jsont.json option; 2875 2739 } 2876 2740 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") 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") 2881 2745 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2882 2746 |> 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) 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) 2884 2751 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2885 2752 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2886 2753 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) ··· 2889 2756 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2890 2757 |> Jsont.Object.finish 2891 2758 2892 - type list_view = { 2759 + type list_view_basic = { 2893 2760 avatar : string option; 2894 2761 cid : string; 2895 - creator : Jsont.json; 2896 - description : string option; 2897 - description_facets : Richtext.Facet.main list option; 2898 - indexed_at : string; 2762 + indexed_at : string option; 2899 2763 labels : Com.Atproto.Label.Defs.label list option; 2900 2764 list_item_count : int option; 2901 2765 name : string; ··· 2904 2768 viewer : Jsont.json option; 2905 2769 } 2906 2770 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") 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") 2911 2775 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2912 2776 |> 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) 2777 + |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2917 2778 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2918 2779 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2919 2780 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) ··· 2954 2815 |> Jsont.Object.finish 2955 2816 2956 2817 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 2818 + module Block = struct 2990 2819 type main = { 2991 2820 created_at : string; 2992 - display_name : string; 2993 - handle : string; 2994 2821 subject : string; 2995 2822 } 2996 2823 2997 2824 let main_jsont = 2998 2825 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") 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") 3001 2828 |> 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 2829 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 3005 2830 |> Jsont.Object.finish 3006 2831 3007 2832 end 3008 - module GetMutes = struct 2833 + module SearchStarterPacks = struct 3009 2834 type params = { 3010 2835 cursor : string option; 3011 2836 limit : int option; 2837 + q : string; 3012 2838 } 3013 2839 3014 2840 let params_jsont = 3015 2841 Jsont.Object.map ~kind:"Params" 3016 - (fun cursor limit -> { 2842 + (fun cursor limit q -> { 3017 2843 cursor; 3018 2844 limit; 2845 + q; 3019 2846 }) 3020 2847 |> Jsont.Object.opt_mem "cursor" Jsont.string 3021 2848 ~enc:(fun r -> r.cursor) 3022 2849 |> Jsont.Object.opt_mem "limit" Jsont.int 3023 2850 ~enc:(fun r -> r.limit) 2851 + |> Jsont.Object.mem "q" Jsont.string 2852 + ~enc:(fun r -> r.q) 3024 2853 |> Jsont.Object.finish 3025 2854 3026 2855 type output = { 3027 2856 cursor : string option; 3028 - mutes : Jsont.json list; 2857 + starter_packs : Jsont.json list; 3029 2858 } 3030 2859 3031 2860 let output_jsont = 3032 2861 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") 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") 3035 2864 |> 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) 2865 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3037 2866 |> Jsont.Object.finish 3038 2867 3039 2868 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; 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; 3061 2878 } 3062 2879 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) 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) 3069 2891 |> Jsont.Object.finish 3070 2892 3071 2893 end ··· 3118 2940 |> Jsont.Object.finish 3119 2941 3120 2942 end 3121 - module GetActorStarterPacks = struct 2943 + module GetStarterPacks = struct 3122 2944 type params = { 3123 - actor : string; 3124 - cursor : string option; 3125 - limit : int option; 2945 + uris : string list; 3126 2946 } 3127 2947 3128 2948 let params_jsont = 3129 2949 Jsont.Object.map ~kind:"Params" 3130 - (fun actor cursor limit -> { 3131 - actor; 3132 - cursor; 3133 - limit; 2950 + (fun uris -> { 2951 + uris; 3134 2952 }) 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) 2953 + |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 2954 + ~enc:(fun r -> r.uris) 3141 2955 |> Jsont.Object.finish 3142 2956 3143 2957 type output = { 3144 - cursor : string option; 3145 2958 starter_packs : Jsont.json list; 3146 2959 } 3147 2960 3148 2961 let output_jsont = 3149 2962 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) 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") 3153 2965 |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3154 2966 |> Jsont.Object.finish 3155 2967 3156 2968 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; 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; 3166 2985 } 3167 2986 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) 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) 3179 2992 |> Jsont.Object.finish 3180 2993 3181 2994 end 3182 - module SearchStarterPacks = struct 2995 + module GetRelationships = struct 3183 2996 type params = { 3184 - cursor : string option; 3185 - limit : int option; 3186 - q : string; 2997 + actor : string; 2998 + others : string list option; 3187 2999 } 3188 3000 3189 3001 let params_jsont = 3190 3002 Jsont.Object.map ~kind:"Params" 3191 - (fun cursor limit q -> { 3192 - cursor; 3193 - limit; 3194 - q; 3003 + (fun actor others -> { 3004 + actor; 3005 + others; 3195 3006 }) 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) 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) 3202 3011 |> Jsont.Object.finish 3203 3012 3204 3013 type output = { 3205 - cursor : string option; 3206 - starter_packs : Jsont.json list; 3014 + actor : string option; 3015 + relationships : Jsont.json list; 3207 3016 } 3208 3017 3209 3018 let output_jsont = 3210 3019 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) 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) 3215 3024 |> Jsont.Object.finish 3216 3025 3217 3026 end 3218 - module GetList = struct 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 + 3219 3041 type params = { 3042 + actor : string; 3220 3043 cursor : string option; 3221 3044 limit : int option; 3222 - list_ : string; 3045 + purposes : string list option; 3223 3046 } 3224 3047 3225 3048 let params_jsont = 3226 3049 Jsont.Object.map ~kind:"Params" 3227 - (fun cursor limit list_ -> { 3050 + (fun actor cursor limit purposes -> { 3051 + actor; 3228 3052 cursor; 3229 3053 limit; 3230 - list_; 3054 + purposes; 3231 3055 }) 3056 + |> Jsont.Object.mem "actor" Jsont.string 3057 + ~enc:(fun r -> r.actor) 3232 3058 |> Jsont.Object.opt_mem "cursor" Jsont.string 3233 3059 ~enc:(fun r -> r.cursor) 3234 3060 |> Jsont.Object.opt_mem "limit" Jsont.int 3235 3061 ~enc:(fun r -> r.limit) 3236 - |> Jsont.Object.mem "list" Jsont.string 3237 - ~enc:(fun r -> r.list_) 3062 + |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3063 + ~enc:(fun r -> r.purposes) 3238 3064 |> Jsont.Object.finish 3239 3065 3240 3066 type output = { 3241 3067 cursor : string option; 3242 - items : Jsont.json list; 3243 - list_ : Jsont.json; 3068 + lists_with_membership : Jsont.json list; 3244 3069 } 3245 3070 3246 3071 let output_jsont = 3247 3072 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") 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") 3250 3075 |> 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_) 3076 + |> Jsont.Object.mem "listsWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists_with_membership) 3253 3077 |> Jsont.Object.finish 3254 3078 3255 3079 end 3256 - module GetListBlocks = struct 3080 + module GetLists = struct 3257 3081 type params = { 3082 + actor : string; 3258 3083 cursor : string option; 3259 3084 limit : int option; 3085 + purposes : string list option; 3260 3086 } 3261 3087 3262 3088 let params_jsont = 3263 3089 Jsont.Object.map ~kind:"Params" 3264 - (fun cursor limit -> { 3090 + (fun actor cursor limit purposes -> { 3091 + actor; 3265 3092 cursor; 3266 3093 limit; 3094 + purposes; 3267 3095 }) 3096 + |> Jsont.Object.mem "actor" Jsont.string 3097 + ~enc:(fun r -> r.actor) 3268 3098 |> Jsont.Object.opt_mem "cursor" Jsont.string 3269 3099 ~enc:(fun r -> r.cursor) 3270 3100 |> Jsont.Object.opt_mem "limit" Jsont.int 3271 3101 ~enc:(fun r -> r.limit) 3102 + |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3103 + ~enc:(fun r -> r.purposes) 3272 3104 |> Jsont.Object.finish 3273 3105 3274 3106 type output = { ··· 3279 3111 let output_jsont = 3280 3112 Jsont.Object.map ~kind:"Output" 3281 3113 (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") 3114 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getLists#output" ~enc:(fun _ -> "app.bsky.graph.getLists#output") 3283 3115 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3284 3116 |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3285 3117 |> Jsont.Object.finish 3286 3118 3287 3119 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 - 3120 + module GetListMutes = struct 3328 3121 type params = { 3329 - actor : string; 3330 3122 cursor : string option; 3331 3123 limit : int option; 3332 - purposes : string list option; 3333 3124 } 3334 3125 3335 3126 let params_jsont = 3336 3127 Jsont.Object.map ~kind:"Params" 3337 - (fun actor cursor limit purposes -> { 3338 - actor; 3128 + (fun cursor limit -> { 3339 3129 cursor; 3340 3130 limit; 3341 - purposes; 3342 3131 }) 3343 - |> Jsont.Object.mem "actor" Jsont.string 3344 - ~enc:(fun r -> r.actor) 3345 3132 |> Jsont.Object.opt_mem "cursor" Jsont.string 3346 3133 ~enc:(fun r -> r.cursor) 3347 3134 |> Jsont.Object.opt_mem "limit" Jsont.int 3348 3135 ~enc:(fun r -> r.limit) 3349 - |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3350 - ~enc:(fun r -> r.purposes) 3351 3136 |> Jsont.Object.finish 3352 3137 3353 3138 type output = { 3354 3139 cursor : string option; 3355 - lists_with_membership : Jsont.json list; 3140 + lists : Jsont.json list; 3356 3141 } 3357 3142 3358 3143 let output_jsont = 3359 3144 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") 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") 3362 3147 |> 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) 3148 + |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3364 3149 |> Jsont.Object.finish 3365 3150 3366 3151 end 3367 - module GetListMutes = struct 3152 + module GetListBlocks = struct 3368 3153 type params = { 3369 3154 cursor : string option; 3370 3155 limit : int option; ··· 3390 3175 let output_jsont = 3391 3176 Jsont.Object.map ~kind:"Output" 3392 3177 (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") 3178 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getListBlocks#output") 3394 3179 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3395 3180 |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3396 3181 |> Jsont.Object.finish 3397 3182 3398 3183 end 3399 - module GetStarterPacks = struct 3184 + module GetList = struct 3400 3185 type params = { 3401 - uris : string list; 3186 + cursor : string option; 3187 + limit : int option; 3188 + list_ : string; 3402 3189 } 3403 3190 3404 3191 let params_jsont = 3405 3192 Jsont.Object.map ~kind:"Params" 3406 - (fun uris -> { 3407 - uris; 3193 + (fun cursor limit list_ -> { 3194 + cursor; 3195 + limit; 3196 + list_; 3408 3197 }) 3409 - |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 3410 - ~enc:(fun r -> r.uris) 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_) 3411 3204 |> Jsont.Object.finish 3412 3205 3413 3206 type output = { 3414 - starter_packs : Jsont.json list; 3207 + cursor : string option; 3208 + items : Jsont.json list; 3209 + list_ : Jsont.json; 3415 3210 } 3416 3211 3417 3212 let output_jsont = 3418 3213 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) 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_) 3422 3219 |> Jsont.Object.finish 3423 3220 3424 3221 end 3425 - module GetLists = struct 3222 + module GetActorStarterPacks = struct 3426 3223 type params = { 3427 3224 actor : string; 3428 3225 cursor : string option; 3429 3226 limit : int option; 3430 - purposes : string list option; 3431 3227 } 3432 3228 3433 3229 let params_jsont = 3434 3230 Jsont.Object.map ~kind:"Params" 3435 - (fun actor cursor limit purposes -> { 3231 + (fun actor cursor limit -> { 3436 3232 actor; 3437 3233 cursor; 3438 3234 limit; 3439 - purposes; 3440 3235 }) 3441 3236 |> Jsont.Object.mem "actor" Jsont.string 3442 3237 ~enc:(fun r -> r.actor) ··· 3444 3239 ~enc:(fun r -> r.cursor) 3445 3240 |> Jsont.Object.opt_mem "limit" Jsont.int 3446 3241 ~enc:(fun r -> r.limit) 3447 - |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3448 - ~enc:(fun r -> r.purposes) 3449 3242 |> Jsont.Object.finish 3450 3243 3451 3244 type output = { 3452 3245 cursor : string option; 3453 - lists : Jsont.json list; 3246 + starter_packs : Jsont.json list; 3454 3247 } 3455 3248 3456 3249 let output_jsont = 3457 3250 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") 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") 3460 3253 |> 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) 3254 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 3462 3255 |> Jsont.Object.finish 3463 3256 3464 3257 end 3465 3258 end 3466 3259 module Feed = struct 3467 - module Post = struct 3468 - type text_slice = { 3469 - end_ : int; 3470 - start : int; 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; 3471 3307 } 3472 3308 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) 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) 3479 3339 |> Jsont.Object.finish 3480 3340 3341 + end 3342 + module Post = struct 3481 3343 type reply_ref = { 3482 3344 parent : Com.Atproto.Repo.StrongRef.main; 3483 3345 root : Com.Atproto.Repo.StrongRef.main; ··· 3491 3353 |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3492 3354 |> Jsont.Object.finish 3493 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 + 3494 3369 type entity = { 3495 3370 index : Jsont.json; 3496 3371 type_ : string; ··· 3534 3409 |> Jsont.Object.finish 3535 3410 3536 3411 end 3537 - module GetLikes = struct 3538 - type like = { 3539 - actor : Jsont.json; 3412 + module Like = struct 3413 + type main = { 3540 3414 created_at : string; 3541 - indexed_at : string; 3415 + subject : Com.Atproto.Repo.StrongRef.main; 3416 + via : Com.Atproto.Repo.StrongRef.main option; 3542 3417 } 3543 3418 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) 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") 3549 3423 |> 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) 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) 3551 3426 |> Jsont.Object.finish 3552 3427 3428 + end 3429 + module GetRepostedBy = struct 3553 3430 type params = { 3554 3431 cid : string option; 3555 3432 cursor : string option; ··· 3578 3455 type output = { 3579 3456 cid : string option; 3580 3457 cursor : string option; 3581 - likes : Jsont.json list; 3458 + reposted_by : Jsont.json list; 3582 3459 uri : string; 3583 3460 } 3584 3461 3585 3462 let output_jsont = 3586 3463 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") 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") 3589 3466 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3590 3467 |> 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) 3468 + |> Jsont.Object.mem "repostedBy" (Jsont.list Jsont.json) ~enc:(fun r -> r.reposted_by) 3592 3469 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3593 3470 |> Jsont.Object.finish 3594 3471 3595 3472 end 3596 - module Postgate = struct 3597 - type disable_rule = unit 3598 - 3599 - let disable_rule_jsont = Jsont.ignore 3600 - 3601 - type main = { 3473 + module GetLikes = struct 3474 + type like = { 3475 + actor : Jsont.json; 3602 3476 created_at : string; 3603 - detached_embedding_uris : string list option; 3604 - embedding_rules : Jsont.json list option; 3605 - post : string; 3477 + indexed_at : string; 3606 3478 } 3607 3479 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") 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) 3612 3485 |> 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) 3486 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3616 3487 |> Jsont.Object.finish 3617 3488 3618 - end 3619 - module GetRepostedBy = struct 3620 3489 type params = { 3621 3490 cid : string option; 3622 3491 cursor : string option; ··· 3645 3514 type output = { 3646 3515 cid : string option; 3647 3516 cursor : string option; 3648 - reposted_by : Jsont.json list; 3517 + likes : Jsont.json list; 3649 3518 uri : string; 3650 3519 } 3651 3520 3652 3521 let output_jsont = 3653 3522 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") 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") 3656 3525 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3657 3526 |> 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) 3527 + |> Jsont.Object.mem "likes" (Jsont.list Jsont.json) ~enc:(fun r -> r.likes) 3659 3528 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3660 3529 |> Jsont.Object.finish 3661 3530 3662 3531 end 3663 - module DescribeFeedGenerator = struct 3664 - type links = { 3665 - privacy_policy : string option; 3666 - terms_of_service : string option; 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; 3667 3543 } 3668 3544 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) 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) 3675 3558 |> Jsont.Object.finish 3676 3559 3560 + end 3561 + module DescribeFeedGenerator = struct 3677 3562 type feed = { 3678 3563 uri : string; 3679 3564 } ··· 3685 3570 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3686 3571 |> Jsont.Object.finish 3687 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 + 3688 3586 type output = { 3689 3587 did : string; 3690 3588 feeds : Jsont.json list; ··· 3701 3599 |> Jsont.Object.finish 3702 3600 3703 3601 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; 3602 + module Defs = struct 3603 + type blocked_author = { 3604 + did : string; 3605 + viewer : Jsont.json option; 3711 3606 } 3712 3607 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_) 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) 3718 3614 |> Jsont.Object.finish 3719 3615 3720 - type following_rule = unit 3721 - 3722 - let following_rule_jsont = Jsont.ignore 3616 + type clickthrough_author = string 3617 + let clickthrough_author_jsont = Jsont.string 3723 3618 3724 - type follower_rule = unit 3619 + type clickthrough_embed = string 3620 + let clickthrough_embed_jsont = Jsont.string 3725 3621 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 - } 3622 + type clickthrough_item = string 3623 + let clickthrough_item_jsont = Jsont.string 3734 3624 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 3625 + type clickthrough_reposter = string 3626 + let clickthrough_reposter_jsont = Jsont.string 3744 3627 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 - } 3628 + type content_mode_unspecified = string 3629 + let content_mode_unspecified_jsont = Jsont.string 3752 3630 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 3631 + type content_mode_video = string 3632 + let content_mode_video_jsont = Jsont.string 3761 3633 3762 - end 3763 - module Defs = struct 3764 - type viewer_state = { 3765 - bookmarked : bool option; 3766 - embedding_disabled : bool option; 3634 + type generator_viewer_state = { 3767 3635 like : string option; 3768 - pinned : bool option; 3769 - reply_disabled : bool option; 3770 - repost : string option; 3771 - thread_muted : bool option; 3772 3636 } 3773 3637 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) 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") 3780 3642 |> 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 3643 |> Jsont.Object.finish 3786 3644 3787 - type threadgate_view = { 3788 - cid : string option; 3789 - lists : Jsont.json list option; 3790 - record : Jsont.json option; 3791 - uri : string option; 3645 + type interaction = { 3646 + event : string option; 3647 + feed_context : string option; 3648 + item : string option; 3649 + req_id : string option; 3792 3650 } 3793 3651 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) 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) 3802 3660 |> Jsont.Object.finish 3803 3661 3804 - type thread_context = { 3805 - root_author_like : string option; 3806 - } 3662 + type interaction_like = string 3663 + let interaction_like_jsont = Jsont.string 3807 3664 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 3665 + type interaction_quote = string 3666 + let interaction_quote_jsont = Jsont.string 3814 3667 3815 - type skeleton_reason_repost = { 3816 - repost : string; 3817 - } 3668 + type interaction_reply = string 3669 + let interaction_reply_jsont = Jsont.string 3818 3670 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 3671 + type interaction_repost = string 3672 + let interaction_repost_jsont = Jsont.string 3825 3673 3826 - type skeleton_reason_pin = unit 3674 + type interaction_seen = string 3675 + let interaction_seen_jsont = Jsont.string 3827 3676 3828 - let skeleton_reason_pin_jsont = Jsont.ignore 3677 + type interaction_share = string 3678 + let interaction_share_jsont = Jsont.string 3829 3679 3830 - type skeleton_feed_post = { 3831 - feed_context : string option; 3832 - post : string; 3833 - reason : Jsont.json option; 3680 + type not_found_post = { 3681 + not_found : bool; 3682 + uri : string; 3834 3683 } 3835 3684 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) 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) 3843 3691 |> Jsont.Object.finish 3844 3692 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 - } 3693 + type reason_pin = unit 3856 3694 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 3695 + let reason_pin_jsont = Jsont.ignore 3865 3696 3866 3697 type reason_repost = { 3867 3698 by : Jsont.json; ··· 3880 3711 |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3881 3712 |> Jsont.Object.finish 3882 3713 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; 3714 + type reply_ref = { 3715 + grandparent_author : Jsont.json option; 3716 + parent : Jsont.json; 3717 + root : Jsont.json; 3890 3718 } 3891 3719 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) 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) 3898 3727 |> Jsont.Object.finish 3899 3728 3900 - type interaction_share = string 3901 - let interaction_share_jsont = Jsont.string 3729 + type request_less = string 3730 + let request_less_jsont = Jsont.string 3902 3731 3903 - type interaction_seen = string 3904 - let interaction_seen_jsont = Jsont.string 3732 + type request_more = string 3733 + let request_more_jsont = Jsont.string 3905 3734 3906 - type interaction_repost = string 3907 - let interaction_repost_jsont = Jsont.string 3735 + type skeleton_feed_post = { 3736 + feed_context : string option; 3737 + post : string; 3738 + reason : Jsont.json option; 3739 + } 3908 3740 3909 - type interaction_reply = string 3910 - let interaction_reply_jsont = Jsont.string 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 3911 3749 3912 - type interaction_quote = string 3913 - let interaction_quote_jsont = Jsont.string 3750 + type skeleton_reason_pin = unit 3914 3751 3915 - type interaction_like = string 3916 - let interaction_like_jsont = Jsont.string 3752 + let skeleton_reason_pin_jsont = Jsont.ignore 3917 3753 3918 - type interaction = { 3919 - event : string option; 3920 - feed_context : string option; 3921 - item : string option; 3922 - req_id : string option; 3754 + type skeleton_reason_repost = { 3755 + repost : string; 3923 3756 } 3924 3757 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) 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) 3933 3763 |> Jsont.Object.finish 3934 3764 3935 - type generator_viewer_state = { 3936 - like : string option; 3765 + type thread_context = { 3766 + root_author_like : string option; 3937 3767 } 3938 3768 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) 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) 3944 3774 |> Jsont.Object.finish 3945 3775 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 3776 + type threadgate_view = { 3777 + cid : string option; 3778 + lists : Jsont.json list option; 3779 + record : Jsont.json option; 3780 + uri : string option; 3781 + } 3960 3782 3961 - type clickthrough_author = string 3962 - let clickthrough_author_jsont = Jsont.string 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 3963 3792 3964 - type blocked_author = { 3965 - did : string; 3966 - viewer : Jsont.json option; 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; 3967 3801 } 3968 3802 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) 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) 3975 3814 |> Jsont.Object.finish 3976 3815 3977 - type post_view = { 3816 + type blocked_post = { 3978 3817 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; 3818 + blocked : bool; 3991 3819 uri : string; 3992 - viewer : Jsont.json option; 3993 3820 } 3994 3821 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") 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") 3999 3826 |> 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) 3827 + |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 4012 3828 |> 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 3829 |> Jsont.Object.finish 4015 3830 4016 3831 type generator_view = { ··· 4050 3865 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4051 3866 |> Jsont.Object.finish 4052 3867 4053 - type blocked_post = { 3868 + type post_view = { 4054 3869 author : Jsont.json; 4055 - blocked : bool; 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; 4056 3882 uri : string; 3883 + viewer : Jsont.json option; 4057 3884 } 4058 3885 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") 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") 4063 3890 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 4064 - |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 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) 4065 3903 |> 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) 3904 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4083 3905 |> Jsont.Object.finish 4084 3906 4085 3907 type feed_view_post = { ··· 4101 3923 |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 4102 3924 |> Jsont.Object.finish 4103 3925 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; 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; 4110 3931 } 4111 3932 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) 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) 4119 3941 |> Jsont.Object.finish 4120 3942 4121 3943 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; 3944 + module SendInteractions = struct 3945 + type input = { 3946 + interactions : Jsont.json list; 4133 3947 } 4134 3948 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) 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) 4148 3954 |> Jsont.Object.finish 4149 3955 3956 + type output = unit 3957 + 3958 + let output_jsont = Jsont.ignore 3959 + 4150 3960 end 4151 - module GetPostThread = struct 3961 + module SearchPosts = struct 4152 3962 type params = { 4153 - depth : int option; 4154 - parent_height : int option; 4155 - uri : string; 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; 4156 3975 } 4157 3976 4158 3977 let params_jsont = 4159 3978 Jsont.Object.map ~kind:"Params" 4160 - (fun depth parent_height uri -> { 4161 - depth; 4162 - parent_height; 4163 - uri; 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; 4164 3992 }) 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) 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) 4171 4017 |> Jsont.Object.finish 4172 4018 4173 4019 type output = { 4174 - thread : Jsont.json; 4175 - threadgate : Jsont.json option; 4020 + cursor : string option; 4021 + hits_total : int option; 4022 + posts : Jsont.json list; 4176 4023 } 4177 4024 4178 4025 let output_jsont = 4179 4026 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) 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) 4184 4032 |> Jsont.Object.finish 4185 4033 4186 4034 end 4187 - module GetFeed = struct 4035 + module GetTimeline = struct 4188 4036 type params = { 4037 + algorithm : string option; 4189 4038 cursor : string option; 4190 - feed : string; 4191 4039 limit : int option; 4192 4040 } 4193 4041 4194 4042 let params_jsont = 4195 4043 Jsont.Object.map ~kind:"Params" 4196 - (fun cursor feed limit -> { 4044 + (fun algorithm cursor limit -> { 4045 + algorithm; 4197 4046 cursor; 4198 - feed; 4199 4047 limit; 4200 4048 }) 4049 + |> Jsont.Object.opt_mem "algorithm" Jsont.string 4050 + ~enc:(fun r -> r.algorithm) 4201 4051 |> Jsont.Object.opt_mem "cursor" Jsont.string 4202 4052 ~enc:(fun r -> r.cursor) 4203 - |> Jsont.Object.mem "feed" Jsont.string 4204 - ~enc:(fun r -> r.feed) 4205 4053 |> Jsont.Object.opt_mem "limit" Jsont.int 4206 4054 ~enc:(fun r -> r.limit) 4207 4055 |> Jsont.Object.finish ··· 4214 4062 let output_jsont = 4215 4063 Jsont.Object.map ~kind:"Output" 4216 4064 (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") 4065 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getTimeline#output" ~enc:(fun _ -> "app.bsky.feed.getTimeline#output") 4218 4066 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4219 4067 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4220 4068 |> Jsont.Object.finish 4221 4069 4222 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 4223 4103 module GetQuotes = struct 4224 4104 type params = { 4225 4105 cid : string option; ··· 4264 4144 |> Jsont.Object.finish 4265 4145 4266 4146 end 4267 - module GetListFeed = struct 4147 + module GetPosts = struct 4268 4148 type params = { 4269 - cursor : string option; 4270 - limit : int option; 4271 - list_ : string; 4149 + uris : string list; 4272 4150 } 4273 4151 4274 4152 let params_jsont = 4275 4153 Jsont.Object.map ~kind:"Params" 4276 - (fun cursor limit list_ -> { 4277 - cursor; 4278 - limit; 4279 - list_; 4154 + (fun uris -> { 4155 + uris; 4280 4156 }) 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_) 4157 + |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 4158 + ~enc:(fun r -> r.uris) 4287 4159 |> Jsont.Object.finish 4288 4160 4289 4161 type output = { 4290 - cursor : string option; 4291 - feed : Jsont.json list; 4162 + posts : Jsont.json list; 4292 4163 } 4293 4164 4294 4165 let output_jsont = 4295 4166 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) 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) 4300 4170 |> Jsont.Object.finish 4301 4171 4302 4172 end 4303 - module GetActorLikes = struct 4173 + module GetPostThread = struct 4304 4174 type params = { 4305 - actor : string; 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 = { 4306 4211 cursor : string option; 4307 4212 limit : int option; 4213 + list_ : string; 4308 4214 } 4309 4215 4310 4216 let params_jsont = 4311 4217 Jsont.Object.map ~kind:"Params" 4312 - (fun actor cursor limit -> { 4313 - actor; 4218 + (fun cursor limit list_ -> { 4314 4219 cursor; 4315 4220 limit; 4221 + list_; 4316 4222 }) 4317 - |> Jsont.Object.mem "actor" Jsont.string 4318 - ~enc:(fun r -> r.actor) 4319 4223 |> Jsont.Object.opt_mem "cursor" Jsont.string 4320 4224 ~enc:(fun r -> r.cursor) 4321 4225 |> Jsont.Object.opt_mem "limit" Jsont.int 4322 4226 ~enc:(fun r -> r.limit) 4227 + |> Jsont.Object.mem "list" Jsont.string 4228 + ~enc:(fun r -> r.list_) 4323 4229 |> Jsont.Object.finish 4324 4230 4325 4231 type output = { ··· 4330 4236 let output_jsont = 4331 4237 Jsont.Object.map ~kind:"Output" 4332 4238 (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") 4239 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getListFeed#output" ~enc:(fun _ -> "app.bsky.feed.getListFeed#output") 4334 4240 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4335 4241 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4336 4242 |> Jsont.Object.finish ··· 4374 4280 |> Jsont.Object.finish 4375 4281 4376 4282 end 4377 - module SearchPosts = struct 4283 + module GetFeedGenerators = struct 4378 4284 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; 4285 + feeds : string list; 4391 4286 } 4392 4287 4393 4288 let params_jsont = 4394 4289 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; 4290 + (fun feeds -> { 4291 + feeds; 4408 4292 }) 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) 4293 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.string) 4294 + ~enc:(fun r -> r.feeds) 4433 4295 |> Jsont.Object.finish 4434 4296 4435 4297 type output = { 4436 - cursor : string option; 4437 - hits_total : int option; 4438 - posts : Jsont.json list; 4298 + feeds : Jsont.json list; 4439 4299 } 4440 4300 4441 4301 let output_jsont = 4442 4302 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) 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) 4448 4306 |> Jsont.Object.finish 4449 4307 4450 4308 end 4451 - module GetFeedGenerators = struct 4309 + module GetFeedGenerator = struct 4452 4310 type params = { 4453 - feeds : string list; 4311 + feed : string; 4454 4312 } 4455 4313 4456 4314 let params_jsont = 4457 4315 Jsont.Object.map ~kind:"Params" 4458 - (fun feeds -> { 4459 - feeds; 4316 + (fun feed -> { 4317 + feed; 4460 4318 }) 4461 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.string) 4462 - ~enc:(fun r -> r.feeds) 4319 + |> Jsont.Object.mem "feed" Jsont.string 4320 + ~enc:(fun r -> r.feed) 4463 4321 |> Jsont.Object.finish 4464 4322 4465 4323 type output = { 4466 - feeds : Jsont.json list; 4324 + is_online : bool; 4325 + is_valid : bool; 4326 + view : Jsont.json; 4467 4327 } 4468 4328 4469 4329 let output_jsont = 4470 4330 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) 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) 4474 4336 |> Jsont.Object.finish 4475 4337 4476 4338 end 4477 - module SendInteractions = struct 4478 - type input = { 4479 - interactions : Jsont.json list; 4339 + module GetFeed = struct 4340 + type params = { 4341 + cursor : string option; 4342 + feed : string; 4343 + limit : int option; 4480 4344 } 4481 4345 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) 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) 4487 4359 |> Jsont.Object.finish 4488 4360 4489 - type output = unit 4361 + type output = { 4362 + cursor : string option; 4363 + feed : Jsont.json list; 4364 + } 4490 4365 4491 - let output_jsont = Jsont.ignore 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 4492 4373 4493 4374 end 4494 4375 module GetAuthorFeed = struct ··· 4535 4416 |> Jsont.Object.finish 4536 4417 4537 4418 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 4419 + module GetActorLikes = struct 4569 4420 type params = { 4421 + actor : string; 4570 4422 cursor : string option; 4571 4423 limit : int option; 4572 4424 } 4573 4425 4574 4426 let params_jsont = 4575 4427 Jsont.Object.map ~kind:"Params" 4576 - (fun cursor limit -> { 4428 + (fun actor cursor limit -> { 4429 + actor; 4577 4430 cursor; 4578 4431 limit; 4579 4432 }) 4433 + |> Jsont.Object.mem "actor" Jsont.string 4434 + ~enc:(fun r -> r.actor) 4580 4435 |> Jsont.Object.opt_mem "cursor" Jsont.string 4581 4436 ~enc:(fun r -> r.cursor) 4582 4437 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4585 4440 4586 4441 type output = { 4587 4442 cursor : string option; 4588 - feeds : Jsont.json list; 4443 + feed : Jsont.json list; 4589 4444 } 4590 4445 4591 4446 let output_jsont = 4592 4447 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") 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") 4595 4450 |> 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) 4451 + |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4597 4452 |> Jsont.Object.finish 4598 4453 4599 4454 end ··· 4633 4488 |> Jsont.Object.finish 4634 4489 4635 4490 end 4636 - module GetPosts = struct 4637 - type params = { 4638 - uris : string list; 4491 + end 4492 + module Contact = struct 4493 + module VerifyPhone = struct 4494 + type input = { 4495 + code : string; 4496 + phone : string; 4639 4497 } 4640 4498 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) 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) 4648 4505 |> Jsont.Object.finish 4649 4506 4650 4507 type output = { 4651 - posts : Jsont.json list; 4508 + token : string; 4652 4509 } 4653 4510 4654 4511 let output_jsont = 4655 4512 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) 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_) 4659 4548 |> Jsont.Object.finish 4660 4549 4550 + type output = unit 4551 + 4552 + let output_jsont = Jsont.ignore 4553 + 4661 4554 end 4662 - module GetTimeline = struct 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 4663 4566 type params = { 4664 - algorithm : string option; 4665 4567 cursor : string option; 4666 4568 limit : int option; 4667 4569 } 4668 4570 4669 4571 let params_jsont = 4670 4572 Jsont.Object.map ~kind:"Params" 4671 - (fun algorithm cursor limit -> { 4672 - algorithm; 4573 + (fun cursor limit -> { 4673 4574 cursor; 4674 4575 limit; 4675 4576 }) 4676 - |> Jsont.Object.opt_mem "algorithm" Jsont.string 4677 - ~enc:(fun r -> r.algorithm) 4678 4577 |> Jsont.Object.opt_mem "cursor" Jsont.string 4679 4578 ~enc:(fun r -> r.cursor) 4680 4579 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4683 4582 4684 4583 type output = { 4685 4584 cursor : string option; 4686 - feed : Jsont.json list; 4585 + matches : Jsont.json list; 4687 4586 } 4688 4587 4689 4588 let output_jsont = 4690 4589 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") 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") 4693 4592 |> 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) 4593 + |> Jsont.Object.mem "matches" (Jsont.list Jsont.json) ~enc:(fun r -> r.matches) 4695 4594 |> Jsont.Object.finish 4696 4595 4697 4596 end 4698 - end 4699 - module Bookmark = struct 4700 - module DeleteBookmark = struct 4597 + module DismissMatch = struct 4701 4598 type input = { 4702 - uri : string; 4599 + subject : string; 4703 4600 } 4704 4601 4705 4602 let input_jsont = 4706 4603 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) 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) 4710 4607 |> Jsont.Object.finish 4711 4608 4609 + type output = unit 4610 + 4611 + let output_jsont = Jsont.ignore 4612 + 4712 4613 end 4713 - module CreateBookmark = struct 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 4714 4656 type input = { 4715 - cid : string; 4716 - uri : string; 4657 + contacts : string list; 4658 + token : string; 4717 4659 } 4718 4660 4719 4661 let input_jsont = 4720 4662 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) 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) 4725 4667 |> Jsont.Object.finish 4726 4668 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; 4669 + type output = { 4670 + matches_and_contact_indexes : Defs.match_and_contact_index list; 4733 4671 } 4734 4672 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) 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) 4742 4678 |> Jsont.Object.finish 4743 4679 4744 - type bookmark = { 4745 - subject : Com.Atproto.Repo.StrongRef.main; 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; 4746 4688 } 4747 4689 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) 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) 4753 4695 |> Jsont.Object.finish 4754 4696 4755 4697 end 4756 - module GetBookmarks = struct 4757 - type params = { 4758 - cursor : string option; 4759 - limit : int option; 4698 + end 4699 + module Unspecced = struct 4700 + module GetTaggedSuggestions = struct 4701 + type suggestion = { 4702 + subject : string; 4703 + subject_type : string; 4704 + tag : string; 4760 4705 } 4761 4706 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) 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) 4772 4714 |> Jsont.Object.finish 4773 4715 4716 + type params = unit 4717 + 4718 + let params_jsont = Jsont.ignore 4719 + 4774 4720 type output = { 4775 - bookmarks : Defs.bookmark_view list; 4776 - cursor : string option; 4721 + suggestions : suggestion list; 4777 4722 } 4778 4723 4779 4724 let output_jsont = 4780 4725 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) 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) 4785 4729 |> Jsont.Object.finish 4786 4730 4787 4731 end 4788 - end 4789 - module Unspecced = struct 4790 4732 module GetSuggestedUsersSkeleton = struct 4791 4733 type params = { 4792 4734 category : string option; ··· 4823 4765 |> Jsont.Object.finish 4824 4766 4825 4767 end 4826 - module GetOnboardingSuggestedStarterPacks = struct 4768 + module GetSuggestedUsers = struct 4827 4769 type params = { 4770 + category : string option; 4828 4771 limit : int option; 4829 4772 } 4830 4773 4831 4774 let params_jsont = 4832 4775 Jsont.Object.map ~kind:"Params" 4833 - (fun limit -> { 4776 + (fun category limit -> { 4777 + category; 4834 4778 limit; 4835 4779 }) 4780 + |> Jsont.Object.opt_mem "category" Jsont.string 4781 + ~enc:(fun r -> r.category) 4836 4782 |> Jsont.Object.opt_mem "limit" Jsont.int 4837 4783 ~enc:(fun r -> r.limit) 4838 4784 |> Jsont.Object.finish 4839 4785 4840 4786 type output = { 4841 - starter_packs : Jsont.json list; 4787 + actors : Jsont.json list; 4788 + rec_id : int option; 4842 4789 } 4843 4790 4844 4791 let output_jsont = 4845 4792 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) 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) 4885 4797 |> Jsont.Object.finish 4886 4798 4887 4799 end ··· 4915 4827 |> Jsont.Object.finish 4916 4828 4917 4829 end 4918 - module GetSuggestedFeeds = struct 4830 + module GetSuggestedStarterPacks = struct 4919 4831 type params = { 4920 4832 limit : int option; 4921 4833 } ··· 4930 4842 |> Jsont.Object.finish 4931 4843 4932 4844 type output = { 4933 - feeds : Jsont.json list; 4845 + starter_packs : Jsont.json list; 4934 4846 } 4935 4847 4936 4848 let output_jsont = 4937 4849 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) 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) 4941 4853 |> Jsont.Object.finish 4942 4854 4943 4855 end ··· 4971 4883 |> Jsont.Object.finish 4972 4884 4973 4885 end 4974 - module GetConfig = struct 4975 - type live_now_config = { 4976 - did : string; 4977 - domains : string list; 4886 + module GetSuggestedFeeds = struct 4887 + type params = { 4888 + limit : int option; 4978 4889 } 4979 4890 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) 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) 4986 4898 |> Jsont.Object.finish 4987 4899 4988 4900 type output = { 4989 - check_email_confirmed : bool option; 4990 - live_now : live_now_config list option; 4901 + feeds : Jsont.json list; 4991 4902 } 4992 4903 4993 4904 let output_jsont = 4994 4905 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) 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) 4999 4909 |> Jsont.Object.finish 5000 4910 5001 4911 end 5002 - module GetSuggestedStarterPacks = struct 4912 + module GetPopularFeedGenerators = struct 5003 4913 type params = { 4914 + cursor : string option; 5004 4915 limit : int option; 4916 + query : string option; 5005 4917 } 5006 4918 5007 4919 let params_jsont = 5008 4920 Jsont.Object.map ~kind:"Params" 5009 - (fun limit -> { 4921 + (fun cursor limit query -> { 4922 + cursor; 5010 4923 limit; 4924 + query; 5011 4925 }) 4926 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4927 + ~enc:(fun r -> r.cursor) 5012 4928 |> Jsont.Object.opt_mem "limit" Jsont.int 5013 4929 ~enc:(fun r -> r.limit) 4930 + |> Jsont.Object.opt_mem "query" Jsont.string 4931 + ~enc:(fun r -> r.query) 5014 4932 |> Jsont.Object.finish 5015 4933 5016 4934 type output = { 5017 - starter_packs : Jsont.json list; 4935 + cursor : string option; 4936 + feeds : Jsont.json list; 5018 4937 } 5019 4938 5020 4939 let output_jsont = 5021 4940 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) 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) 5057 4945 |> Jsont.Object.finish 5058 4946 5059 4947 end ··· 5087 4975 |> Jsont.Object.finish 5088 4976 5089 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 5090 5032 module Defs = struct 5091 - type trending_topic = { 5092 - description : string option; 5093 - display_name : string option; 5094 - link : string; 5095 - topic : string; 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; 5096 5061 } 5097 5062 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) 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) 5106 5069 |> Jsont.Object.finish 5107 5070 5108 - type trend_view = { 5109 - actors : Jsont.json list; 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 = { 5110 5105 category : string option; 5106 + dids : string list; 5111 5107 display_name : string; 5112 5108 link : string; 5113 5109 post_count : int; ··· 5116 5112 topic : string; 5117 5113 } 5118 5114 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) 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") 5124 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) 5125 5121 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5126 5122 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5127 5123 |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) ··· 5130 5126 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5131 5127 |> Jsont.Object.finish 5132 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 + 5133 5148 type thread_item_post = { 5134 5149 hidden_by_threadgate : bool; 5135 5150 more_parents : bool; ··· 5151 5166 |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 5152 5167 |> Jsont.Object.finish 5153 5168 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 = { 5169 + type trend_view = { 5170 + actors : Jsont.json list; 5174 5171 category : string option; 5175 - dids : string list; 5176 5172 display_name : string; 5177 5173 link : string; 5178 5174 post_count : int; ··· 5181 5177 topic : string; 5182 5178 } 5183 5179 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") 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) 5188 5185 |> 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 5186 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5191 5187 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5192 5188 |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) ··· 5195 5191 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5196 5192 |> Jsont.Object.finish 5197 5193 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; 5194 + type trending_topic = { 5195 + description : string option; 5196 + display_name : string option; 5197 + link : string; 5198 + topic : string; 5211 5199 } 5212 5200 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) 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) 5267 5209 |> Jsont.Object.finish 5268 5210 5269 5211 end 5270 - module GetTaggedSuggestions = struct 5271 - type suggestion = { 5272 - subject : string; 5273 - subject_type : string; 5274 - tag : string; 5212 + module SearchStarterPacksSkeleton = struct 5213 + type params = { 5214 + cursor : string option; 5215 + limit : int option; 5216 + q : string; 5217 + viewer : string option; 5275 5218 } 5276 5219 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) 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) 5284 5236 |> Jsont.Object.finish 5285 - 5286 - type params = unit 5287 - 5288 - let params_jsont = Jsont.ignore 5289 5237 5290 5238 type output = { 5291 - suggestions : suggestion list; 5239 + cursor : string option; 5240 + hits_total : int option; 5241 + starter_packs : Defs.skeleton_search_starter_pack list; 5292 5242 } 5293 5243 5294 5244 let output_jsont = 5295 5245 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) 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) 5299 5251 |> Jsont.Object.finish 5300 5252 5301 5253 end ··· 5377 5329 |> Jsont.Object.finish 5378 5330 5379 5331 end 5380 - module GetPostThreadV2 = struct 5381 - type thread_item = { 5382 - depth : int; 5383 - uri : string; 5384 - value : Jsont.json; 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; 5385 5419 } 5386 5420 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) 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) 5394 5426 |> Jsont.Object.finish 5395 5427 5428 + end 5429 + module GetTrends = struct 5396 5430 type params = { 5397 - above : bool option; 5398 - anchor : string; 5399 - below : int option; 5400 - branching_factor : int option; 5401 - sort : string option; 5431 + limit : int option; 5402 5432 } 5403 5433 5404 5434 let params_jsont = 5405 5435 Jsont.Object.map ~kind:"Params" 5406 - (fun above anchor below branching_factor sort -> { 5407 - above; 5408 - anchor; 5409 - below; 5410 - branching_factor; 5411 - sort; 5436 + (fun limit -> { 5437 + limit; 5412 5438 }) 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) 5439 + |> Jsont.Object.opt_mem "limit" Jsont.int 5440 + ~enc:(fun r -> r.limit) 5423 5441 |> Jsont.Object.finish 5424 5442 5425 5443 type output = { 5426 - has_other_replies : bool; 5427 - thread : thread_item list; 5428 - threadgate : Jsont.json option; 5444 + trends : Defs.trend_view list; 5429 5445 } 5430 5446 5431 5447 let output_jsont = 5432 5448 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) 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) 5438 5452 |> Jsont.Object.finish 5439 5453 5440 5454 end ··· 5470 5484 |> Jsont.Object.finish 5471 5485 5472 5486 end 5473 - module GetTrendsSkeleton = struct 5487 + module GetSuggestionsSkeleton = struct 5474 5488 type params = { 5489 + cursor : string option; 5475 5490 limit : int option; 5491 + relative_to_did : string option; 5476 5492 viewer : string option; 5477 5493 } 5478 5494 5479 5495 let params_jsont = 5480 5496 Jsont.Object.map ~kind:"Params" 5481 - (fun limit viewer -> { 5497 + (fun cursor limit relative_to_did viewer -> { 5498 + cursor; 5482 5499 limit; 5500 + relative_to_did; 5483 5501 viewer; 5484 5502 }) 5503 + |> Jsont.Object.opt_mem "cursor" Jsont.string 5504 + ~enc:(fun r -> r.cursor) 5485 5505 |> Jsont.Object.opt_mem "limit" Jsont.int 5486 5506 ~enc:(fun r -> r.limit) 5507 + |> Jsont.Object.opt_mem "relativeToDid" Jsont.string 5508 + ~enc:(fun r -> r.relative_to_did) 5487 5509 |> Jsont.Object.opt_mem "viewer" Jsont.string 5488 5510 ~enc:(fun r -> r.viewer) 5489 5511 |> Jsont.Object.finish 5490 5512 5491 5513 type output = { 5492 - trends : Defs.skeleton_trend list; 5514 + actors : Defs.skeleton_search_actor list; 5515 + cursor : string option; 5516 + rec_id : int option; 5517 + relative_to_did : string option; 5493 5518 } 5494 5519 5495 5520 let output_jsont = 5496 5521 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) 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) 5500 5528 |> Jsont.Object.finish 5501 5529 5502 5530 end 5503 - module GetPostThreadOtherV2 = struct 5531 + module GetPostThreadV2 = struct 5504 5532 type thread_item = { 5505 5533 depth : int; 5506 5534 uri : string; 5507 - value : Defs.thread_item_post; 5535 + value : Jsont.json; 5508 5536 } 5509 5537 5510 5538 let thread_item_jsont = 5511 5539 Jsont.Object.map ~kind:"Thread_item" 5512 5540 (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") 5541 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#threadItem") 5514 5542 |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5515 5543 |> 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) 5544 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 5517 5545 |> Jsont.Object.finish 5518 5546 5519 5547 type params = { 5548 + above : bool option; 5520 5549 anchor : string; 5550 + below : int option; 5551 + branching_factor : int option; 5552 + sort : string option; 5521 5553 } 5522 5554 5523 5555 let params_jsont = 5524 5556 Jsont.Object.map ~kind:"Params" 5525 - (fun anchor -> { 5557 + (fun above anchor below branching_factor sort -> { 5558 + above; 5526 5559 anchor; 5560 + below; 5561 + branching_factor; 5562 + sort; 5527 5563 }) 5564 + |> Jsont.Object.opt_mem "above" Jsont.bool 5565 + ~enc:(fun r -> r.above) 5528 5566 |> Jsont.Object.mem "anchor" Jsont.string 5529 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) 5530 5574 |> Jsont.Object.finish 5531 5575 5532 5576 type output = { 5577 + has_other_replies : bool; 5533 5578 thread : thread_item list; 5579 + threadgate : Jsont.json option; 5534 5580 } 5535 5581 5536 5582 let output_jsont = 5537 5583 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") 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) 5540 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) 5541 5589 |> Jsont.Object.finish 5542 5590 5543 5591 end 5544 - module InitAgeAssurance = struct 5545 - type input = { 5546 - country_code : string; 5547 - email : string; 5548 - language : string; 5592 + module GetPostThreadOtherV2 = struct 5593 + type thread_item = { 5594 + depth : int; 5595 + uri : string; 5596 + value : Defs.thread_item_post; 5549 5597 } 5550 5598 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) 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) 5558 5606 |> Jsont.Object.finish 5559 5607 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 5608 type params = { 5567 - cursor : string option; 5568 - limit : int option; 5569 - q : string; 5570 - viewer : string option; 5609 + anchor : string; 5571 5610 } 5572 5611 5573 5612 let params_jsont = 5574 5613 Jsont.Object.map ~kind:"Params" 5575 - (fun cursor limit q viewer -> { 5576 - cursor; 5577 - limit; 5578 - q; 5579 - viewer; 5614 + (fun anchor -> { 5615 + anchor; 5580 5616 }) 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) 5617 + |> Jsont.Object.mem "anchor" Jsont.string 5618 + ~enc:(fun r -> r.anchor) 5589 5619 |> Jsont.Object.finish 5590 5620 5591 5621 type output = { 5592 - cursor : string option; 5593 - hits_total : int option; 5594 - starter_packs : Defs.skeleton_search_starter_pack list; 5622 + thread : thread_item list; 5595 5623 } 5596 5624 5597 5625 let output_jsont = 5598 5626 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) 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) 5604 5651 |> Jsont.Object.finish 5605 5652 5606 5653 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; 5654 + module Defs = struct 5655 + type bookmark = { 5656 + subject : Com.Atproto.Repo.StrongRef.main; 5614 5657 } 5615 5658 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) 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) 5635 5664 |> Jsont.Object.finish 5636 5665 5637 - type output = { 5638 - actors : Defs.skeleton_search_actor list; 5639 - cursor : string option; 5640 - hits_total : int option; 5666 + type bookmark_view = { 5667 + created_at : string option; 5668 + item : Jsont.json; 5669 + subject : Com.Atproto.Repo.StrongRef.main; 5641 5670 } 5642 5671 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) 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) 5650 5679 |> Jsont.Object.finish 5651 5680 5652 5681 end 5653 - module GetAgeAssuranceState = struct 5654 - type output = Defs.age_assurance_state 5682 + module CreateBookmark = struct 5683 + type input = { 5684 + cid : string; 5685 + uri : string; 5686 + } 5655 5687 5656 - let output_jsont = Defs.age_assurance_state_jsont 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 5657 5695 5658 5696 end 5659 - module GetSuggestionsSkeleton = struct 5697 + module GetBookmarks = struct 5660 5698 type params = { 5661 5699 cursor : string option; 5662 5700 limit : int option; 5663 - relative_to_did : string option; 5664 - viewer : string option; 5665 5701 } 5666 5702 5667 5703 let params_jsont = 5668 5704 Jsont.Object.map ~kind:"Params" 5669 - (fun cursor limit relative_to_did viewer -> { 5705 + (fun cursor limit -> { 5670 5706 cursor; 5671 5707 limit; 5672 - relative_to_did; 5673 - viewer; 5674 5708 }) 5675 5709 |> Jsont.Object.opt_mem "cursor" Jsont.string 5676 5710 ~enc:(fun r -> r.cursor) 5677 5711 |> Jsont.Object.opt_mem "limit" Jsont.int 5678 5712 ~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 5713 |> Jsont.Object.finish 5684 5714 5685 5715 type output = { 5686 - actors : Defs.skeleton_search_actor list; 5716 + bookmarks : Defs.bookmark_view list; 5687 5717 cursor : string option; 5688 - rec_id : int option; 5689 - relative_to_did : string option; 5690 5718 } 5691 5719 5692 5720 let output_jsont = 5693 5721 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) 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) 5697 5725 |> 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 5726 |> Jsont.Object.finish 5727 5727 5728 5728 end
+1822 -1822
lexicons/bsky/atp_lexicon_bsky.mli
··· 12 12 13 13 module Com : sig 14 14 module Atproto : sig 15 - module Label : 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 16 29 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. *) 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 18 44 19 - type self_label = { 20 - val_ : string; (** The short string name of the value or type of this label. *) 21 - } 45 + (** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. *) 22 46 23 - (** Jsont codec for {!type:self_label}. *) 24 - val self_label_jsont : self_label Jsont.t 47 + type reason_rude = string 48 + val reason_rude_jsont : reason_rude Jsont.t 25 49 26 - (** Strings which describe the label in the UI, localized into a specific language. *) 50 + (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 27 51 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 - } 52 + type reason_sexual = string 53 + val reason_sexual_jsont : reason_sexual Jsont.t 33 54 34 - (** Jsont codec for {!type:label_value_definition_strings}. *) 35 - val label_value_definition_strings_jsont : label_value_definition_strings Jsont.t 55 + (** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. *) 36 56 57 + type reason_spam = string 58 + val reason_spam_jsont : reason_spam Jsont.t 37 59 38 - type label_value = string 39 - val label_value_jsont : label_value Jsont.t 60 + 61 + type reason_type = string 62 + val reason_type_jsont : reason_type Jsont.t 40 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 41 78 (** Metadata tag on an atproto resource (eg, repo or record). *) 42 79 43 80 type label = { ··· 55 92 (** Jsont codec for {!type:label}. *) 56 93 val label_jsont : label Jsont.t 57 94 58 - (** Metadata tags on an atproto record, published by the author within the record. *) 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. *) 59 111 60 - type self_labels = { 61 - values : self_label list; 112 + type self_label = { 113 + val_ : string; (** The short string name of the value or type of this label. *) 62 114 } 63 115 64 - (** Jsont codec for {!type:self_labels}. *) 65 - val self_labels_jsont : self_labels Jsont.t 116 + (** Jsont codec for {!type:self_label}. *) 117 + val self_label_jsont : self_label Jsont.t 66 118 67 119 (** Declares a label value and its expected interpretations and behaviors. *) 68 120 ··· 78 130 (** Jsont codec for {!type:label_value_definition}. *) 79 131 val label_value_definition_jsont : label_value_definition Jsont.t 80 132 81 - end 82 - end 83 - module Repo : sig 84 - module StrongRef : sig 133 + (** Metadata tags on an atproto record, published by the author within the record. *) 85 134 86 - type main = { 87 - cid : string; 88 - uri : string; 135 + type self_labels = { 136 + values : self_label list; 89 137 } 90 138 91 - (** Jsont codec for {!type:main}. *) 92 - val main_jsont : main Jsont.t 139 + (** Jsont codec for {!type:self_labels}. *) 140 + val self_labels_jsont : self_labels Jsont.t 93 141 94 142 end 95 143 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 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. *) 102 151 103 - (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 104 152 105 - type reason_violation = string 106 - val reason_violation_jsont : reason_violation Jsont.t 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 + } 107 160 161 + (** Jsont codec for {!type:output}. *) 162 + val output_jsont : output Jsont.t 108 163 109 - type reason_type = string 110 - val reason_type_jsont : reason_type Jsont.t 164 + end 165 + module Defs : sig 111 166 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`. *) 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 + } 123 176 124 - type reason_rude = string 125 - val reason_rude_jsont : reason_rude Jsont.t 177 + (** Jsont codec for {!type:job_status}. *) 178 + val job_status_jsont : job_status Jsont.t 126 179 127 - (** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. *) 180 + end 181 + module UploadVideo : sig 182 + (** Upload a video to be processed then stored on the PDS. *) 128 183 129 - type reason_other = string 130 - val reason_other_jsont : reason_other Jsont.t 131 184 132 - (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 185 + type input = unit 186 + val input_jsont : input Jsont.t 133 187 134 - type reason_misleading = string 135 - val reason_misleading_jsont : reason_misleading Jsont.t 136 188 137 - (** Appeal a previously taken moderation action *) 189 + type output = { 190 + job_status : Defs.job_status; 191 + } 138 192 139 - type reason_appeal = string 140 - val reason_appeal_jsont : reason_appeal Jsont.t 193 + (** Jsont codec for {!type:output}. *) 194 + val output_jsont : output Jsont.t 141 195 142 196 end 143 - end 144 - end 145 - end 146 - module App : sig 147 - module Bsky : sig 148 - module AuthManageLabelerService : sig 197 + module GetJobStatus : sig 198 + (** Get status details for a video processing job. *) 149 199 150 - type main = unit 151 - val main_jsont : main Jsont.t 200 + (** Query/procedure parameters. *) 201 + type params = { 202 + job_id : string; 203 + } 152 204 153 - end 154 - module AuthViewAll : sig 205 + (** Jsont codec for {!type:params}. *) 206 + val params_jsont : params Jsont.t 155 207 156 - type main = unit 157 - val main_jsont : main Jsont.t 158 208 159 - end 160 - module AuthManageModeration : sig 209 + type output = { 210 + job_status : Defs.job_status; 211 + } 161 212 162 - type main = unit 163 - val main_jsont : main Jsont.t 213 + (** Jsont codec for {!type:output}. *) 214 + val output_jsont : output Jsont.t 164 215 216 + end 165 217 end 166 218 module Richtext : sig 167 219 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'). *) 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. *) 169 221 170 - type tag = { 171 - tag : string; 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; 172 234 } 173 235 174 - (** Jsont codec for {!type:tag}. *) 175 - val tag_jsont : tag Jsont.t 236 + (** Jsont codec for {!type:link}. *) 237 + val link_jsont : link Jsont.t 176 238 177 239 (** Facet feature for mention of another account. The text is usually a handle, including a '\@' prefix, but the facet reference is a DID. *) 178 240 ··· 183 245 (** Jsont codec for {!type:mention}. *) 184 246 val mention_jsont : mention Jsont.t 185 247 186 - (** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. *) 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'). *) 187 249 188 - type link = { 189 - uri : string; 250 + type tag = { 251 + tag : string; 190 252 } 191 253 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 254 + (** Jsont codec for {!type:tag}. *) 255 + val tag_jsont : tag Jsont.t 204 256 205 257 (** Annotation of a sub-string within rich text. *) 206 258 ··· 214 266 215 267 end 216 268 end 217 - module AuthManageFeedDeclarations : sig 269 + module Notification : sig 270 + module UpdateSeen : sig 271 + (** Notify server that the requesting account has seen notifications. Requires auth. *) 218 272 219 - type main = unit 220 - val main_jsont : main Jsont.t 221 273 222 - end 223 - module AuthFullApp : sig 274 + type input = { 275 + seen_at : string; 276 + } 224 277 225 - type main = unit 226 - val main_jsont : main Jsont.t 278 + (** Jsont codec for {!type:input}. *) 279 + val input_jsont : input Jsont.t 227 280 228 - end 229 - module AuthManageNotifications : sig 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. *) 230 284 231 - type main = unit 232 - val main_jsont : main Jsont.t 233 285 234 - end 235 - module AuthManageProfile : sig 286 + type input = { 287 + app_id : string; 288 + platform : string; 289 + service_did : string; 290 + token : string; 291 + } 236 292 237 - type main = unit 238 - val main_jsont : main Jsont.t 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 239 323 240 - end 241 - module Ageassurance : sig 242 - module Defs : sig 243 - (** The status of the Age Assurance process. *) 324 + end 325 + module ListNotifications : sig 244 326 245 - type status = string 246 - val status_jsont : status Jsont.t 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 + } 247 338 248 - (** Additional metadata needed to compute Age Assurance state client-side. *) 339 + (** Jsont codec for {!type:notification}. *) 340 + val notification_jsont : notification Jsont.t 249 341 250 - type state_metadata = { 251 - account_created_at : string option; (** The account creation timestamp. *) 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; 252 351 } 253 352 254 - (** Jsont codec for {!type:state_metadata}. *) 255 - val state_metadata_jsont : state_metadata Jsont.t 353 + (** Jsont codec for {!type:params}. *) 354 + val params_jsont : params Jsont.t 256 355 257 - (** Object used to store Age Assurance data in stash. *) 258 356 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. *) 357 + type output = { 358 + cursor : string option; 359 + notifications : Jsont.json list; 360 + priority : bool option; 361 + seen_at : string option; 271 362 } 272 363 273 - (** Jsont codec for {!type:event}. *) 274 - val event_jsont : event Jsont.t 364 + (** Jsont codec for {!type:output}. *) 365 + val output_jsont : output Jsont.t 275 366 276 - (** The Age Assurance configuration for a specific region. *) 367 + end 368 + module ListActivitySubscriptions : sig 369 + (** Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. *) 277 370 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. *) 371 + (** Query/procedure parameters. *) 372 + type params = { 373 + cursor : string option; 374 + limit : int option; 283 375 } 284 376 285 - (** Jsont codec for {!type:config_region}. *) 286 - val config_region_jsont : config_region Jsont.t 377 + (** Jsont codec for {!type:params}. *) 378 + val params_jsont : params Jsont.t 287 379 288 - (** The access level granted based on Age Assurance data we've processed. *) 289 380 290 - type access = string 291 - val access_jsont : access Jsont.t 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 292 388 293 - (** The user's computed Age Assurance state. *) 389 + end 390 + module GetUnreadCount : sig 391 + (** Count the number of unread notifications for the requesting account. Requires auth. *) 294 392 295 - type state = { 296 - access : access; 297 - last_initiated_at : string option; (** The timestamp when this state was last updated. *) 298 - status : status; 393 + (** Query/procedure parameters. *) 394 + type params = { 395 + priority : bool option; 396 + seen_at : string option; 299 397 } 300 398 301 - (** Jsont codec for {!type:state}. *) 302 - val state_jsont : state Jsont.t 399 + (** Jsont codec for {!type:params}. *) 400 + val params_jsont : params Jsont.t 303 401 304 - (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 305 402 306 - type config_region_rule_if_declared_under_age = { 307 - access : access; 308 - age : int; (** The age threshold as a whole integer. *) 403 + type output = { 404 + count : int; 309 405 } 310 406 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 407 + (** Jsont codec for {!type:output}. *) 408 + val output_jsont : output Jsont.t 313 409 314 - (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 410 + end 411 + module Defs : sig 315 412 316 - type config_region_rule_if_declared_over_age = { 317 - access : access; 318 - age : int; (** The age threshold as a whole integer. *) 413 + type activity_subscription = { 414 + post : bool; 415 + reply : bool; 319 416 } 320 417 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 418 + (** Jsont codec for {!type:activity_subscription}. *) 419 + val activity_subscription_jsont : activity_subscription Jsont.t 323 420 324 - (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 325 421 326 - type config_region_rule_if_assured_under_age = { 327 - access : access; 328 - age : int; (** The age threshold as a whole integer. *) 422 + type chat_preference = { 423 + include_ : string; 424 + push : bool; 329 425 } 330 426 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 427 + (** Jsont codec for {!type:chat_preference}. *) 428 + val chat_preference_jsont : chat_preference Jsont.t 333 429 334 - (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 335 430 336 - type config_region_rule_if_assured_over_age = { 337 - access : access; 338 - age : int; (** The age threshold as a whole integer. *) 431 + type filterable_preference = { 432 + include_ : string; 433 + list_ : bool; 434 + push : bool; 339 435 } 340 436 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 437 + (** Jsont codec for {!type:filterable_preference}. *) 438 + val filterable_preference_jsont : filterable_preference Jsont.t 343 439 344 - (** Age Assurance rule that applies if the account is older than a certain date. *) 345 440 346 - type config_region_rule_if_account_older_than = { 347 - access : access; 348 - date : string; (** The date threshold as a datetime string. *) 441 + type preference = { 442 + list_ : bool; 443 + push : bool; 349 444 } 350 445 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 446 + (** Jsont codec for {!type:preference}. *) 447 + val preference_jsont : preference Jsont.t 448 + 353 449 354 - (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 450 + type record_deleted = unit 355 451 356 - type config_region_rule_if_account_newer_than = { 357 - access : access; 358 - date : string; (** The date threshold as a datetime string. *) 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; 359 470 } 360 471 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 472 + (** Jsont codec for {!type:preferences}. *) 473 + val preferences_jsont : preferences Jsont.t 363 474 364 - (** Age Assurance rule that applies by default. *) 475 + (** Object used to store activity subscription data in stash. *) 365 476 366 - type config_region_rule_default = { 367 - access : access; 477 + type subject_activity_subscription = { 478 + activity_subscription : Jsont.json; 479 + subject : string; 368 480 } 369 481 370 - (** Jsont codec for {!type:config_region_rule_default}. *) 371 - val config_region_rule_default_jsont : config_region_rule_default Jsont.t 482 + (** Jsont codec for {!type:subject_activity_subscription}. *) 483 + val subject_activity_subscription_jsont : subject_activity_subscription Jsont.t 372 484 485 + end 486 + module Declaration : sig 487 + (** A declaration of the user's choices related to notifications that can be produced by them. *) 373 488 374 - type config = { 375 - regions : config_region list; (** The per-region Age Assurance configuration. *) 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'. *) 376 491 } 377 492 378 - (** Jsont codec for {!type:config}. *) 379 - val config_jsont : config Jsont.t 493 + (** Jsont codec for {!type:main}. *) 494 + val main_jsont : main Jsont.t 380 495 381 496 end 382 - module Begin : sig 383 - (** Initiate Age Assurance for an account. *) 497 + module PutPreferencesV2 : sig 498 + (** Set notification-related preferences for an account. Requires auth. *) 384 499 385 500 386 501 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. *) 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; 391 515 } 392 516 393 517 (** Jsont codec for {!type:input}. *) 394 518 val input_jsont : input Jsont.t 395 519 396 520 397 - type output = Defs.state 521 + type output = { 522 + preferences : Jsont.json; 523 + } 398 524 399 525 (** Jsont codec for {!type:output}. *) 400 526 val output_jsont : output Jsont.t 401 527 402 528 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. *) 529 + module PutActivitySubscription : sig 530 + (** Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth. *) 405 531 406 - (** Query/procedure parameters. *) 407 - type params = { 408 - country_code : string; 409 - region_code : string option; 532 + 533 + type input = { 534 + activity_subscription : Jsont.json; 535 + subject : string; 410 536 } 411 537 412 - (** Jsont codec for {!type:params}. *) 413 - val params_jsont : params Jsont.t 538 + (** Jsont codec for {!type:input}. *) 539 + val input_jsont : input Jsont.t 414 540 415 541 416 542 type output = { 417 - metadata : Defs.state_metadata; 418 - state : Defs.state; 543 + activity_subscription : Jsont.json option; 544 + subject : string; 419 545 } 420 546 421 547 (** Jsont codec for {!type:output}. *) 422 548 val output_jsont : output Jsont.t 423 549 424 550 end 425 - module GetConfig : sig 426 - (** Returns Age Assurance configuration for use on the client. *) 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 427 559 428 560 429 - type output = Defs.config 561 + type output = { 562 + preferences : Jsont.json; 563 + } 430 564 431 565 (** Jsont codec for {!type:output}. *) 432 566 val output_jsont : output Jsont.t ··· 436 570 module Labeler : sig 437 571 module Defs : sig 438 572 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 573 type labeler_policies = { 448 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. *) 449 575 label_values : Com.Atproto.Label.Defs.label_value list; (** The label values which this labeler publishes. May include global or custom labels. *) ··· 453 579 val labeler_policies_jsont : labeler_policies Jsont.t 454 580 455 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 + 456 604 type labeler_view_detailed = { 457 605 cid : string; 458 606 creator : Jsont.json; ··· 469 617 470 618 (** Jsont codec for {!type:labeler_view_detailed}. *) 471 619 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 620 487 621 end 488 622 module Service : sig ··· 523 657 524 658 end 525 659 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 660 + module Embed : sig 661 + module External : sig 591 662 592 - 593 - type output = { 594 - job_status : Defs.job_status; 663 + type external_ = { 664 + description : string; 665 + thumb : Atp.Blob_ref.t option; 666 + title : string; 667 + uri : string; 595 668 } 596 669 597 - (** Jsont codec for {!type:output}. *) 598 - val output_jsont : output Jsont.t 670 + (** Jsont codec for {!type:external_}. *) 671 + val external__jsont : external_ Jsont.t 599 672 600 - end 601 - end 602 - module Embed : sig 603 - module External : sig 604 673 605 674 type view_external = { 606 675 description : string; ··· 612 681 (** Jsont codec for {!type:view_external}. *) 613 682 val view_external_jsont : view_external Jsont.t 614 683 684 + (** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). *) 615 685 616 - type external_ = { 617 - description : string; 618 - thumb : Atp.Blob_ref.t option; 619 - title : string; 620 - uri : string; 686 + type main = { 687 + external_ : Jsont.json; 621 688 } 622 689 623 - (** Jsont codec for {!type:external_}. *) 624 - val external__jsont : external_ Jsont.t 690 + (** Jsont codec for {!type:main}. *) 691 + val main_jsont : main Jsont.t 625 692 626 693 627 694 type view = { ··· 631 698 (** Jsont codec for {!type:view}. *) 632 699 val view_jsont : view Jsont.t 633 700 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 701 end 644 702 module Defs : sig 645 703 (** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. *) ··· 653 711 val aspect_ratio_jsont : aspect_ratio Jsont.t 654 712 655 713 end 656 - module Images : sig 714 + module Video : sig 657 715 658 - type view_image = { 659 - alt : string; (** Alt text description of the image, for accessibility. *) 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; 660 727 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. *) 728 + cid : string; 729 + playlist : string; 730 + thumbnail : string option; 663 731 } 664 732 665 - (** Jsont codec for {!type:view_image}. *) 666 - val view_image_jsont : view_image Jsont.t 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 667 746 747 + end 748 + module Images : sig 668 749 669 750 type image = { 670 751 alt : string; (** Alt text description of the image, for accessibility. *) ··· 676 757 val image_jsont : image Jsont.t 677 758 678 759 679 - type view = { 680 - images : Jsont.json list; 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. *) 681 765 } 682 766 683 - (** Jsont codec for {!type:view}. *) 684 - val view_jsont : view Jsont.t 767 + (** Jsont codec for {!type:view_image}. *) 768 + val view_image_jsont : view_image Jsont.t 685 769 686 770 687 771 type main = { ··· 691 775 (** Jsont codec for {!type:main}. *) 692 776 val main_jsont : main Jsont.t 693 777 694 - end 695 - module Video : sig 696 778 697 779 type view = { 698 - alt : string option; 699 - aspect_ratio : Jsont.json option; 700 - cid : string; 701 - playlist : string; 702 - thumbnail : string option; 780 + images : Jsont.json list; 703 781 } 704 782 705 783 (** Jsont codec for {!type:view}. *) 706 784 val view_jsont : view Jsont.t 707 785 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 - 786 + end 787 + module RecordWithMedia : sig 717 788 718 789 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. *) 790 + media : Jsont.json; 791 + record : Jsont.json; 723 792 } 724 793 725 794 (** Jsont codec for {!type:main}. *) 726 795 val main_jsont : main Jsont.t 727 796 728 - end 729 - module RecordWithMedia : sig 730 797 731 798 type view = { 732 799 media : Jsont.json; ··· 736 803 (** Jsont codec for {!type:view}. *) 737 804 val view_jsont : view Jsont.t 738 805 806 + end 807 + module Record : sig 739 808 740 809 type main = { 741 - media : Jsont.json; 742 - record : Jsont.json; 810 + record : Com.Atproto.Repo.StrongRef.main; 743 811 } 744 812 745 813 (** Jsont codec for {!type:main}. *) 746 814 val main_jsont : main Jsont.t 747 815 748 - end 749 - module Record : sig 750 816 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. *) 817 + type view = { 818 + record : Jsont.json; 763 819 } 764 820 765 - (** Jsont codec for {!type:view_record}. *) 766 - val view_record_jsont : view_record Jsont.t 821 + (** Jsont codec for {!type:view}. *) 822 + val view_jsont : view Jsont.t 767 823 768 824 769 - type view_not_found = { 770 - not_found : bool; 825 + type view_blocked = { 826 + author : Jsont.json; 827 + blocked : bool; 771 828 uri : string; 772 829 } 773 830 774 - (** Jsont codec for {!type:view_not_found}. *) 775 - val view_not_found_jsont : view_not_found Jsont.t 831 + (** Jsont codec for {!type:view_blocked}. *) 832 + val view_blocked_jsont : view_blocked Jsont.t 776 833 777 834 778 835 type view_detached = { ··· 784 841 val view_detached_jsont : view_detached Jsont.t 785 842 786 843 787 - type view_blocked = { 788 - author : Jsont.json; 789 - blocked : bool; 844 + type view_not_found = { 845 + not_found : bool; 790 846 uri : string; 791 847 } 792 848 793 - (** Jsont codec for {!type:view_blocked}. *) 794 - val view_blocked_jsont : view_blocked Jsont.t 849 + (** Jsont codec for {!type:view_not_found}. *) 850 + val view_not_found_jsont : view_not_found Jsont.t 795 851 796 852 797 - type view = { 798 - record : Jsont.json; 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. *) 799 865 } 800 866 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 867 + (** Jsont codec for {!type:view_record}. *) 868 + val view_record_jsont : view_record Jsont.t 811 869 812 870 end 813 871 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 - } 872 + module AuthViewAll : sig 822 873 823 - (** Jsont codec for {!type:input}. *) 824 - val input_jsont : input Jsont.t 874 + type main = unit 875 + val main_jsont : main Jsont.t 825 876 826 - end 827 - module RegisterPush : sig 828 - (** Register to receive push notifications, via a specified service, for the requesting account. Requires auth. *) 877 + end 878 + module AuthManageProfile : sig 829 879 880 + type main = unit 881 + val main_jsont : main Jsont.t 830 882 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 - } 883 + end 884 + module AuthManageNotifications : sig 838 885 839 - (** Jsont codec for {!type:input}. *) 840 - val input_jsont : input Jsont.t 886 + type main = unit 887 + val main_jsont : main Jsont.t 841 888 842 - end 843 - module ListNotifications : sig 889 + end 890 + module AuthManageModeration : sig 844 891 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 - } 892 + type main = unit 893 + val main_jsont : main Jsont.t 856 894 857 - (** Jsont codec for {!type:notification}. *) 858 - val notification_jsont : notification Jsont.t 895 + end 896 + module AuthManageLabelerService : sig 859 897 860 - (** Enumerate notifications for the requesting account. Requires auth. *) 898 + type main = unit 899 + val main_jsont : main Jsont.t 861 900 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 - } 901 + end 902 + module AuthManageFeedDeclarations : sig 870 903 871 - (** Jsont codec for {!type:params}. *) 872 - val params_jsont : params Jsont.t 904 + type main = unit 905 + val main_jsont : main Jsont.t 873 906 907 + end 908 + module AuthFullApp : sig 874 909 875 - type output = { 876 - cursor : string option; 877 - notifications : Jsont.json list; 878 - priority : bool option; 879 - seen_at : string option; 880 - } 910 + type main = unit 911 + val main_jsont : main Jsont.t 881 912 882 - (** Jsont codec for {!type:output}. *) 883 - val output_jsont : output Jsont.t 913 + end 914 + module AuthCreatePosts : sig 884 915 885 - end 886 - module GetUnreadCount : sig 887 - (** Count the number of unread notifications for the requesting account. Requires auth. *) 916 + type main = unit 917 + val main_jsont : main Jsont.t 888 918 889 - (** Query/procedure parameters. *) 890 - type params = { 891 - priority : bool option; 892 - seen_at : string option; 893 - } 919 + end 920 + module Ageassurance : sig 921 + module Defs : sig 922 + (** The access level granted based on Age Assurance data we've processed. *) 894 923 895 - (** Jsont codec for {!type:params}. *) 896 - val params_jsont : params Jsont.t 924 + type access = string 925 + val access_jsont : access Jsont.t 897 926 927 + (** The Age Assurance configuration for a specific region. *) 898 928 899 - type output = { 900 - count : int; 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. *) 901 934 } 902 935 903 - (** Jsont codec for {!type:output}. *) 904 - val output_jsont : output Jsont.t 936 + (** Jsont codec for {!type:config_region}. *) 937 + val config_region_jsont : config_region Jsont.t 905 938 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. *) 939 + (** Object used to store Age Assurance data in stash. *) 909 940 910 - 911 - type input = { 912 - app_id : string; 913 - platform : string; 914 - service_did : string; 915 - token : string; 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. *) 916 953 } 917 954 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. *) 955 + (** Jsont codec for {!type:event}. *) 956 + val event_jsont : event Jsont.t 924 957 958 + (** Additional metadata needed to compute Age Assurance state client-side. *) 925 959 926 - type input = { 927 - priority : bool; 960 + type state_metadata = { 961 + account_created_at : string option; (** The account creation timestamp. *) 928 962 } 929 963 930 - (** Jsont codec for {!type:input}. *) 931 - val input_jsont : input Jsont.t 932 - 933 - end 934 - module Defs : sig 964 + (** Jsont codec for {!type:state_metadata}. *) 965 + val state_metadata_jsont : state_metadata Jsont.t 935 966 936 - type record_deleted = unit 967 + (** The status of the Age Assurance process. *) 937 968 938 - (** Jsont codec for {!type:record_deleted}. *) 939 - val record_deleted_jsont : record_deleted Jsont.t 969 + type status = string 970 + val status_jsont : status Jsont.t 940 971 941 972 942 - type preference = { 943 - list_ : bool; 944 - push : bool; 973 + type config = { 974 + regions : config_region list; (** The per-region Age Assurance configuration. *) 945 975 } 946 976 947 - (** Jsont codec for {!type:preference}. *) 948 - val preference_jsont : preference Jsont.t 977 + (** Jsont codec for {!type:config}. *) 978 + val config_jsont : config Jsont.t 949 979 980 + (** Age Assurance rule that applies by default. *) 950 981 951 - type filterable_preference = { 952 - include_ : string; 953 - list_ : bool; 954 - push : bool; 982 + type config_region_rule_default = { 983 + access : access; 955 984 } 956 985 957 - (** Jsont codec for {!type:filterable_preference}. *) 958 - val filterable_preference_jsont : filterable_preference Jsont.t 986 + (** Jsont codec for {!type:config_region_rule_default}. *) 987 + val config_region_rule_default_jsont : config_region_rule_default Jsont.t 959 988 989 + (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 960 990 961 - type chat_preference = { 962 - include_ : string; 963 - push : bool; 991 + type config_region_rule_if_account_newer_than = { 992 + access : access; 993 + date : string; (** The date threshold as a datetime string. *) 964 994 } 965 995 966 - (** Jsont codec for {!type:chat_preference}. *) 967 - val chat_preference_jsont : chat_preference Jsont.t 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 968 998 999 + (** Age Assurance rule that applies if the account is older than a certain date. *) 969 1000 970 - type activity_subscription = { 971 - post : bool; 972 - reply : bool; 1001 + type config_region_rule_if_account_older_than = { 1002 + access : access; 1003 + date : string; (** The date threshold as a datetime string. *) 973 1004 } 974 1005 975 - (** Jsont codec for {!type:activity_subscription}. *) 976 - val activity_subscription_jsont : activity_subscription Jsont.t 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 977 1008 978 - (** Object used to store activity subscription data in stash. *) 1009 + (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 979 1010 980 - type subject_activity_subscription = { 981 - activity_subscription : Jsont.json; 982 - subject : string; 1011 + type config_region_rule_if_assured_over_age = { 1012 + access : access; 1013 + age : int; (** The age threshold as a whole integer. *) 983 1014 } 984 1015 985 - (** Jsont codec for {!type:subject_activity_subscription}. *) 986 - val subject_activity_subscription_jsont : subject_activity_subscription Jsont.t 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 987 1018 1019 + (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 988 1020 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; 1021 + type config_region_rule_if_assured_under_age = { 1022 + access : access; 1023 + age : int; (** The age threshold as a whole integer. *) 1003 1024 } 1004 1025 1005 - (** Jsont codec for {!type:preferences}. *) 1006 - val preferences_jsont : preferences Jsont.t 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 1007 1028 1008 - end 1009 - module Declaration : sig 1010 - (** A declaration of the user's choices related to notifications that can be produced by them. *) 1029 + (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 1011 1030 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'. *) 1031 + type config_region_rule_if_declared_over_age = { 1032 + access : access; 1033 + age : int; (** The age threshold as a whole integer. *) 1014 1034 } 1015 1035 1016 - (** Jsont codec for {!type:main}. *) 1017 - val main_jsont : main Jsont.t 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 1018 1038 1019 - end 1020 - module ListActivitySubscriptions : sig 1021 - (** Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth. *) 1039 + (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 1022 1040 1023 - (** Query/procedure parameters. *) 1024 - type params = { 1025 - cursor : string option; 1026 - limit : int option; 1041 + type config_region_rule_if_declared_under_age = { 1042 + access : access; 1043 + age : int; (** The age threshold as a whole integer. *) 1027 1044 } 1028 1045 1029 - (** Jsont codec for {!type:params}. *) 1030 - val params_jsont : params Jsont.t 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 1031 1048 1049 + (** The user's computed Age Assurance state. *) 1032 1050 1033 - type output = { 1034 - cursor : string option; 1035 - subscriptions : Jsont.json list; 1051 + type state = { 1052 + access : access; 1053 + last_initiated_at : string option; (** The timestamp when this state was last updated. *) 1054 + status : status; 1036 1055 } 1037 1056 1038 - (** Jsont codec for {!type:output}. *) 1039 - val output_jsont : output Jsont.t 1057 + (** Jsont codec for {!type:state}. *) 1058 + val state_jsont : state Jsont.t 1040 1059 1041 1060 end 1042 - module GetPreferences : sig 1043 - (** Get notification-related preferences for an account. Requires auth. *) 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. *) 1044 1063 1045 1064 (** Query/procedure parameters. *) 1046 - type params = unit 1065 + type params = { 1066 + country_code : string; 1067 + region_code : string option; 1068 + } 1047 1069 1048 1070 (** Jsont codec for {!type:params}. *) 1049 1071 val params_jsont : params Jsont.t 1050 1072 1051 1073 1052 1074 type output = { 1053 - preferences : Jsont.json; 1075 + metadata : Defs.state_metadata; 1076 + state : Defs.state; 1054 1077 } 1055 1078 1056 1079 (** Jsont codec for {!type:output}. *) 1057 1080 val output_jsont : output Jsont.t 1058 1081 1059 1082 end 1060 - module PutActivitySubscription : sig 1061 - (** Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth. *) 1083 + module GetConfig : sig 1084 + (** Returns Age Assurance configuration for use on the client. *) 1062 1085 1063 1086 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 - } 1087 + type output = Defs.config 1077 1088 1078 1089 (** Jsont codec for {!type:output}. *) 1079 1090 val output_jsont : output Jsont.t 1080 1091 1081 1092 end 1082 - module PutPreferencesV2 : sig 1083 - (** Set notification-related preferences for an account. Requires auth. *) 1093 + module Begin : sig 1094 + (** Initiate Age Assurance for an account. *) 1084 1095 1085 1096 1086 1097 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; 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. *) 1100 1102 } 1101 1103 1102 1104 (** Jsont codec for {!type:input}. *) 1103 1105 val input_jsont : input Jsont.t 1104 1106 1105 1107 1106 - type output = { 1107 - preferences : Jsont.json; 1108 - } 1108 + type output = Defs.state 1109 1109 1110 1110 (** Jsont codec for {!type:output}. *) 1111 1111 val output_jsont : output Jsont.t ··· 1153 1153 1154 1154 end 1155 1155 module Defs : sig 1156 - (** An individual verification for an associated subject. *) 1157 1156 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. *) 1157 + type adult_content_pref = { 1158 + enabled : bool; 1163 1159 } 1164 1160 1165 - (** Jsont codec for {!type:verification_view}. *) 1166 - val verification_view_jsont : verification_view Jsont.t 1161 + (** Jsont codec for {!type:adult_content_pref}. *) 1162 + val adult_content_pref_jsont : adult_content_pref Jsont.t 1167 1163 1168 - (** Preferences for how verified accounts appear in the app. *) 1164 + (** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. *) 1169 1165 1170 - type verification_prefs = { 1171 - hide_badges : bool option; (** Hide the blue check badges for verified accounts and trusted verifiers. *) 1166 + type bsky_app_progress_guide = { 1167 + guide : string; 1172 1168 } 1173 1169 1174 - (** Jsont codec for {!type:verification_prefs}. *) 1175 - val verification_prefs_jsont : verification_prefs Jsont.t 1170 + (** Jsont codec for {!type:bsky_app_progress_guide}. *) 1171 + val bsky_app_progress_guide_jsont : bsky_app_progress_guide Jsont.t 1176 1172 1177 1173 1178 - type thread_view_pref = { 1179 - sort : string option; (** Sorting mode for threads. *) 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; 1180 1178 } 1181 1179 1182 - (** Jsont codec for {!type:thread_view_pref}. *) 1183 - val thread_view_pref_jsont : thread_view_pref Jsont.t 1180 + (** Jsont codec for {!type:content_label_pref}. *) 1181 + val content_label_pref_jsont : content_label_pref Jsont.t 1184 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. *) 1185 1184 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; 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. *) 1195 1189 } 1196 1190 1197 - (** Jsont codec for {!type:status_view}. *) 1198 - val status_view_jsont : status_view Jsont.t 1191 + (** Jsont codec for {!type:declared_age_pref}. *) 1192 + val declared_age_pref_jsont : declared_age_pref Jsont.t 1199 1193 1200 1194 1201 - type saved_feeds_pref = { 1202 - pinned : string list; 1203 - saved : string list; 1204 - timeline_index : int option; 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. *) 1205 1202 } 1206 1203 1207 - (** Jsont codec for {!type:saved_feeds_pref}. *) 1208 - val saved_feeds_pref_jsont : saved_feeds_pref Jsont.t 1204 + (** Jsont codec for {!type:feed_view_pref}. *) 1205 + val feed_view_pref_jsont : feed_view_pref Jsont.t 1209 1206 1210 1207 1211 - type saved_feed = { 1212 - id : string; 1213 - pinned : bool; 1214 - type_ : string; 1215 - value : string; 1208 + type hidden_posts_pref = { 1209 + items : string list; (** A list of URIs of posts the account owner has hidden. *) 1216 1210 } 1217 1211 1218 - (** Jsont codec for {!type:saved_feed}. *) 1219 - val saved_feed_jsont : saved_feed Jsont.t 1212 + (** Jsont codec for {!type:hidden_posts_pref}. *) 1213 + val hidden_posts_pref_jsont : hidden_posts_pref Jsont.t 1220 1214 1221 1215 1222 - type profile_associated_chat = { 1223 - allow_incoming : string; 1216 + type interests_pref = { 1217 + tags : string list; (** A list of tags which describe the account owner's interests gathered during onboarding. *) 1224 1218 } 1225 1219 1226 - (** Jsont codec for {!type:profile_associated_chat}. *) 1227 - val profile_associated_chat_jsont : profile_associated_chat Jsont.t 1220 + (** Jsont codec for {!type:interests_pref}. *) 1221 + val interests_pref_jsont : interests_pref Jsont.t 1228 1222 1229 1223 1230 - type profile_associated_activity_subscription = { 1231 - allow_subscriptions : string; 1224 + type labeler_pref_item = { 1225 + did : string; 1232 1226 } 1233 1227 1234 - (** Jsont codec for {!type:profile_associated_activity_subscription}. *) 1235 - val profile_associated_activity_subscription_jsont : profile_associated_activity_subscription Jsont.t 1228 + (** Jsont codec for {!type:labeler_pref_item}. *) 1229 + val labeler_pref_item_jsont : labeler_pref_item Jsont.t 1236 1230 1237 1231 1238 - type preferences = Jsont.json list 1239 - val preferences_jsont : preferences Jsont.t 1232 + type muted_word_target = string 1233 + val muted_word_target_jsont : muted_word_target Jsont.t 1240 1234 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. *) 1235 + (** A new user experiences (NUX) storage object *) 1242 1236 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. *) 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; 1246 1242 } 1247 1243 1248 - (** Jsont codec for {!type:post_interaction_settings_pref}. *) 1249 - val post_interaction_settings_pref_jsont : post_interaction_settings_pref Jsont.t 1244 + (** Jsont codec for {!type:nux}. *) 1245 + val nux_jsont : nux Jsont.t 1250 1246 1251 1247 1252 1248 type personal_details_pref = { ··· 1256 1252 (** Jsont codec for {!type:personal_details_pref}. *) 1257 1253 val personal_details_pref_jsont : personal_details_pref Jsont.t 1258 1254 1259 - (** A new user experiences (NUX) storage object *) 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. *) 1260 1256 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; 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. *) 1266 1260 } 1267 1261 1268 - (** Jsont codec for {!type:nux}. *) 1269 - val nux_jsont : nux Jsont.t 1262 + (** Jsont codec for {!type:post_interaction_settings_pref}. *) 1263 + val post_interaction_settings_pref_jsont : post_interaction_settings_pref Jsont.t 1270 1264 1271 1265 1272 - type muted_word_target = string 1273 - val muted_word_target_jsont : muted_word_target Jsont.t 1266 + type preferences = Jsont.json list 1267 + val preferences_jsont : preferences Jsont.t 1274 1268 1275 1269 1276 - type labeler_pref_item = { 1277 - did : string; 1270 + type profile_associated_activity_subscription = { 1271 + allow_subscriptions : string; 1278 1272 } 1279 1273 1280 - (** Jsont codec for {!type:labeler_pref_item}. *) 1281 - val labeler_pref_item_jsont : labeler_pref_item Jsont.t 1274 + (** Jsont codec for {!type:profile_associated_activity_subscription}. *) 1275 + val profile_associated_activity_subscription_jsont : profile_associated_activity_subscription Jsont.t 1282 1276 1283 1277 1284 - type interests_pref = { 1285 - tags : string list; (** A list of tags which describe the account owner's interests gathered during onboarding. *) 1278 + type profile_associated_chat = { 1279 + allow_incoming : string; 1286 1280 } 1287 1281 1288 - (** Jsont codec for {!type:interests_pref}. *) 1289 - val interests_pref_jsont : interests_pref Jsont.t 1282 + (** Jsont codec for {!type:profile_associated_chat}. *) 1283 + val profile_associated_chat_jsont : profile_associated_chat Jsont.t 1290 1284 1291 1285 1292 - type hidden_posts_pref = { 1293 - items : string list; (** A list of URIs of posts the account owner has hidden. *) 1286 + type saved_feed = { 1287 + id : string; 1288 + pinned : bool; 1289 + type_ : string; 1290 + value : string; 1294 1291 } 1295 1292 1296 - (** Jsont codec for {!type:hidden_posts_pref}. *) 1297 - val hidden_posts_pref_jsont : hidden_posts_pref Jsont.t 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 1298 1305 1299 1306 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 + 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; 1307 1316 } 1308 1317 1309 - (** Jsont codec for {!type:feed_view_pref}. *) 1310 - val feed_view_pref_jsont : feed_view_pref Jsont.t 1318 + (** Jsont codec for {!type:status_view}. *) 1319 + val status_view_jsont : status_view Jsont.t 1311 1320 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 1321 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. *) 1322 + type thread_view_pref = { 1323 + sort : string option; (** Sorting mode for threads. *) 1318 1324 } 1319 1325 1320 - (** Jsont codec for {!type:declared_age_pref}. *) 1321 - val declared_age_pref_jsont : declared_age_pref Jsont.t 1326 + (** Jsont codec for {!type:thread_view_pref}. *) 1327 + val thread_view_pref_jsont : thread_view_pref Jsont.t 1322 1328 1329 + (** Preferences for how verified accounts appear in the app. *) 1323 1330 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; 1331 + type verification_prefs = { 1332 + hide_badges : bool option; (** Hide the blue check badges for verified accounts and trusted verifiers. *) 1328 1333 } 1329 1334 1330 - (** Jsont codec for {!type:content_label_pref}. *) 1331 - val content_label_pref_jsont : content_label_pref Jsont.t 1335 + (** Jsont codec for {!type:verification_prefs}. *) 1336 + val verification_prefs_jsont : verification_prefs Jsont.t 1332 1337 1333 - (** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. *) 1338 + (** An individual verification for an associated subject. *) 1334 1339 1335 - type bsky_app_progress_guide = { 1336 - guide : string; 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. *) 1337 1345 } 1338 1346 1339 - (** Jsont codec for {!type:bsky_app_progress_guide}. *) 1340 - val bsky_app_progress_guide_jsont : bsky_app_progress_guide Jsont.t 1347 + (** Jsont codec for {!type:verification_view}. *) 1348 + val verification_view_jsont : verification_view Jsont.t 1341 1349 1350 + (** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. *) 1342 1351 1343 - type adult_content_pref = { 1344 - enabled : bool; 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. *) 1345 1356 } 1346 1357 1347 - (** Jsont codec for {!type:adult_content_pref}. *) 1348 - val adult_content_pref_jsont : adult_content_pref Jsont.t 1358 + (** Jsont codec for {!type:bsky_app_state_pref}. *) 1359 + val bsky_app_state_pref_jsont : bsky_app_state_pref Jsont.t 1349 1360 1350 - (** Represents the verification information about the user this object is attached to. *) 1351 1361 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. *) 1362 + type labelers_pref = { 1363 + labelers : Jsont.json list; 1356 1364 } 1357 1365 1358 - (** Jsont codec for {!type:verification_state}. *) 1359 - val verification_state_jsont : verification_state Jsont.t 1366 + (** Jsont codec for {!type:labelers_pref}. *) 1367 + val labelers_pref_jsont : labelers_pref Jsont.t 1360 1368 1369 + (** A word that the account owner has muted. *) 1361 1370 1362 - type saved_feeds_pref_v2 = { 1363 - items : Jsont.json list; 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. *) 1364 1377 } 1365 1378 1366 - (** Jsont codec for {!type:saved_feeds_pref_v2}. *) 1367 - val saved_feeds_pref_v2_jsont : saved_feeds_pref_v2 Jsont.t 1379 + (** Jsont codec for {!type:muted_word}. *) 1380 + val muted_word_jsont : muted_word Jsont.t 1368 1381 1369 1382 1370 1383 type profile_associated = { ··· 1379 1392 (** Jsont codec for {!type:profile_associated}. *) 1380 1393 val profile_associated_jsont : profile_associated Jsont.t 1381 1394 1382 - (** A word that the account owner has muted. *) 1383 1395 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. *) 1396 + type saved_feeds_pref_v2 = { 1397 + items : Jsont.json list; 1390 1398 } 1391 1399 1392 - (** Jsont codec for {!type:muted_word}. *) 1393 - val muted_word_jsont : muted_word Jsont.t 1400 + (** Jsont codec for {!type:saved_feeds_pref_v2}. *) 1401 + val saved_feeds_pref_v2_jsont : saved_feeds_pref_v2 Jsont.t 1394 1402 1403 + (** Represents the verification information about the user this object is attached to. *) 1395 1404 1396 - type labelers_pref = { 1397 - labelers : Jsont.json list; 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. *) 1398 1409 } 1399 1410 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 1411 + (** Jsont codec for {!type:verification_state}. *) 1412 + val verification_state_jsont : verification_state Jsont.t 1413 1413 1414 1414 1415 1415 type muted_words_pref = { ··· 1419 1419 (** Jsont codec for {!type:muted_words_pref}. *) 1420 1420 val muted_words_pref_jsont : muted_words_pref Jsont.t 1421 1421 1422 - (** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. *) 1422 + (** The subject's followers whom you also follow *) 1423 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; 1424 + type known_followers = { 1425 + count : int; 1426 + followers : Jsont.json list; 1434 1427 } 1435 1428 1436 - (** Jsont codec for {!type:viewer_state}. *) 1437 - val viewer_state_jsont : viewer_state Jsont.t 1429 + (** Jsont codec for {!type:known_followers}. *) 1430 + val known_followers_jsont : known_followers Jsont.t 1438 1431 1439 1432 1440 - type profile_view_detailed = { 1433 + type profile_view = { 1441 1434 associated : Jsont.json option; 1442 1435 avatar : string option; 1443 - banner : string option; 1444 1436 created_at : string option; 1445 1437 debug : Jsont.json option; (** Debug information for internal development *) 1446 1438 description : string option; 1447 1439 did : string; 1448 1440 display_name : string option; 1449 - followers_count : int option; 1450 - follows_count : int option; 1451 1441 handle : string; 1452 1442 indexed_at : string option; 1453 - joined_via_starter_pack : Jsont.json option; 1454 1443 labels : Com.Atproto.Label.Defs.label list option; 1455 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 1456 - posts_count : int option; 1457 1444 pronouns : string option; 1458 1445 status : Jsont.json option; 1459 1446 verification : Jsont.json option; 1460 1447 viewer : Jsont.json option; 1461 - website : string option; 1462 1448 } 1463 1449 1464 - (** Jsont codec for {!type:profile_view_detailed}. *) 1465 - val profile_view_detailed_jsont : profile_view_detailed Jsont.t 1450 + (** Jsont codec for {!type:profile_view}. *) 1451 + val profile_view_jsont : profile_view Jsont.t 1466 1452 1467 1453 1468 1454 type profile_view_basic = { ··· 1484 1470 val profile_view_basic_jsont : profile_view_basic Jsont.t 1485 1471 1486 1472 1487 - type profile_view = { 1473 + type profile_view_detailed = { 1488 1474 associated : Jsont.json option; 1489 1475 avatar : string option; 1476 + banner : string option; 1490 1477 created_at : string option; 1491 1478 debug : Jsont.json option; (** Debug information for internal development *) 1492 1479 description : string option; 1493 1480 did : string; 1494 1481 display_name : string option; 1482 + followers_count : int option; 1483 + follows_count : int option; 1495 1484 handle : string; 1496 1485 indexed_at : string option; 1486 + joined_via_starter_pack : Jsont.json option; 1497 1487 labels : Com.Atproto.Label.Defs.label list option; 1488 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1489 + posts_count : int option; 1498 1490 pronouns : string option; 1499 1491 status : Jsont.json option; 1500 1492 verification : Jsont.json option; 1501 1493 viewer : Jsont.json option; 1494 + website : string option; 1502 1495 } 1503 1496 1504 - (** Jsont codec for {!type:profile_view}. *) 1505 - val profile_view_jsont : profile_view Jsont.t 1497 + (** Jsont codec for {!type:profile_view_detailed}. *) 1498 + val profile_view_detailed_jsont : profile_view_detailed Jsont.t 1506 1499 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 - 1500 + (** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. *) 1527 1501 1528 - type output = { 1529 - preferences : Jsont.json; 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; 1530 1512 } 1531 1513 1532 - (** Jsont codec for {!type:output}. *) 1533 - val output_jsont : output Jsont.t 1514 + (** Jsont codec for {!type:viewer_state}. *) 1515 + val viewer_state_jsont : viewer_state Jsont.t 1534 1516 1535 1517 end 1536 1518 module SearchActorsTypeahead : sig ··· 1555 1537 val output_jsont : output Jsont.t 1556 1538 1557 1539 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 1540 module SearchActors : sig 1577 1541 (** Find actors (profiles) matching search criteria. Does not require auth. *) 1578 1542 ··· 1597 1561 val output_jsont : output Jsont.t 1598 1562 1599 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 1600 1576 module GetSuggestions : sig 1601 1577 (** Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. *) 1602 1578 ··· 1640 1616 val output_jsont : output Jsont.t 1641 1617 1642 1618 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 - 1619 + module GetProfile : sig 1620 + (** Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. *) 1691 1621 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. *) 1622 + (** Query/procedure parameters. *) 1623 + type params = { 1624 + actor : string; (** Handle or DID of account to fetch profile of. *) 1710 1625 } 1711 1626 1712 - (** Jsont codec for {!type:input}. *) 1713 - val input_jsont : input Jsont.t 1627 + (** Jsont codec for {!type:params}. *) 1628 + val params_jsont : params Jsont.t 1714 1629 1715 1630 1716 - type output = unit 1631 + type output = Jsont.json 1717 1632 1718 1633 (** Jsont codec for {!type:output}. *) 1719 1634 val output_jsont : output Jsont.t 1720 1635 1721 1636 end 1722 - module GetMatches : sig 1723 - (** Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication. *) 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. *) 1724 1639 1725 1640 (** Query/procedure parameters. *) 1726 - type params = { 1727 - cursor : string option; 1728 - limit : int option; 1729 - } 1641 + type params = unit 1730 1642 1731 1643 (** Jsont codec for {!type:params}. *) 1732 1644 val params_jsont : params Jsont.t 1733 1645 1734 1646 1735 1647 type output = { 1736 - cursor : string option; 1737 - matches : Jsont.json list; 1648 + preferences : Jsont.json; 1738 1649 } 1739 1650 1740 1651 (** Jsont codec for {!type:output}. *) 1741 1652 val output_jsont : output Jsont.t 1742 1653 1743 1654 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 - 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. *) 1747 1659 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`. *) 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. *) 1751 1665 } 1752 1666 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 1667 + (** Jsont codec for {!type:main}. *) 1668 + val main_jsont : main Jsont.t 1763 1669 1764 1670 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. *) 1671 + module UnmuteThread : sig 1672 + (** Unmutes the specified thread. Requires auth. *) 1767 1673 1768 1674 1769 1675 type input = { 1770 - phone : string; (** The phone number to receive the code via SMS. *) 1676 + root : string; 1771 1677 } 1772 1678 1773 1679 (** Jsont codec for {!type:input}. *) 1774 1680 val input_jsont : input Jsont.t 1775 1681 1776 - 1777 - type output = unit 1778 - 1779 - (** Jsont codec for {!type:output}. *) 1780 - val output_jsont : output Jsont.t 1781 - 1782 1682 end 1783 - module SendNotification : sig 1784 - (** System endpoint to send notifications related to contact imports. Requires role authentication. *) 1683 + module UnmuteActorList : sig 1684 + (** Unmutes the specified list of accounts. Requires auth. *) 1785 1685 1786 1686 1787 1687 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. *) 1688 + list_ : string; 1790 1689 } 1791 1690 1792 1691 (** Jsont codec for {!type:input}. *) 1793 1692 val input_jsont : input Jsont.t 1794 1693 1795 - 1796 - type output = unit 1797 - 1798 - (** Jsont codec for {!type:output}. *) 1799 - val output_jsont : output Jsont.t 1800 - 1801 1694 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. *) 1695 + module UnmuteActor : sig 1696 + (** Unmutes the specified account. Requires auth. *) 1822 1697 1823 1698 1824 1699 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`. *) 1700 + actor : string; 1827 1701 } 1828 1702 1829 1703 (** Jsont codec for {!type:input}. *) 1830 1704 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 1705 1840 1706 end 1841 - end 1842 - module Graph : sig 1843 1707 module Starterpack : sig 1844 1708 1845 1709 type feed_item = { ··· 1864 1728 val main_jsont : main Jsont.t 1865 1729 1866 1730 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 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. *) 1879 1733 1880 1734 1881 - type output = { 1882 - cursor : string option; 1883 - follows : Jsont.json list; 1884 - subject : Jsont.json; 1735 + type input = { 1736 + root : string; 1885 1737 } 1886 1738 1887 - (** Jsont codec for {!type:output}. *) 1888 - val output_jsont : output Jsont.t 1739 + (** Jsont codec for {!type:input}. *) 1740 + val input_jsont : input Jsont.t 1889 1741 1890 1742 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. *) 1743 + module MuteActorList : sig 1744 + (** Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. *) 1893 1745 1894 - (** Query/procedure parameters. *) 1895 - type params = { 1896 - actor : string; 1746 + 1747 + type input = { 1748 + list_ : string; 1897 1749 } 1898 1750 1899 - (** Jsont codec for {!type:params}. *) 1900 - val params_jsont : params Jsont.t 1751 + (** Jsont codec for {!type:input}. *) 1752 + val input_jsont : input Jsont.t 1901 1753 1754 + end 1755 + module MuteActor : sig 1756 + (** Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. *) 1902 1757 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; 1758 + 1759 + type input = { 1760 + actor : string; 1907 1761 } 1908 1762 1909 - (** Jsont codec for {!type:output}. *) 1910 - val output_jsont : output Jsont.t 1763 + (** Jsont codec for {!type:input}. *) 1764 + val input_jsont : input Jsont.t 1911 1765 1912 1766 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. *) 1767 + module Listitem : sig 1768 + (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 1915 1769 1916 1770 type main = { 1917 1771 created_at : string; 1918 - subject : string; (** DID of the account to be blocked. *) 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. *) 1919 1774 } 1920 1775 1921 1776 (** Jsont codec for {!type:main}. *) ··· 1934 1789 val main_jsont : main Jsont.t 1935 1790 1936 1791 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. *) 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 1939 1802 1940 1803 1941 - type input = { 1942 - root : string; 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; 1943 1808 } 1944 1809 1945 - (** Jsont codec for {!type:input}. *) 1946 - val input_jsont : input Jsont.t 1810 + (** Jsont codec for {!type:output}. *) 1811 + val output_jsont : output Jsont.t 1947 1812 1948 1813 end 1949 - module GetFollowers : sig 1950 - (** Enumerates accounts which follow a specified account (actor). *) 1814 + module GetMutes : sig 1815 + (** Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. *) 1951 1816 1952 1817 (** Query/procedure parameters. *) 1953 1818 type params = { 1954 - actor : string; 1955 1819 cursor : string option; 1956 1820 limit : int option; 1957 1821 } ··· 1962 1826 1963 1827 type output = { 1964 1828 cursor : string option; 1965 - followers : Jsont.json list; 1966 - subject : Jsont.json; 1829 + mutes : Jsont.json list; 1967 1830 } 1968 1831 1969 1832 (** Jsont codec for {!type:output}. *) 1970 1833 val output_jsont : output Jsont.t 1971 1834 1972 1835 end 1973 - module UnmuteThread : sig 1974 - (** Unmutes the specified thread. Requires auth. *) 1836 + module GetKnownFollowers : sig 1837 + (** Enumerates accounts which follow a specified account (actor) and are followed by the viewer. *) 1975 1838 1976 - 1977 - type input = { 1978 - root : string; 1839 + (** Query/procedure parameters. *) 1840 + type params = { 1841 + actor : string; 1842 + cursor : string option; 1843 + limit : int option; 1979 1844 } 1980 1845 1981 - (** Jsont codec for {!type:input}. *) 1982 - val input_jsont : input Jsont.t 1846 + (** Jsont codec for {!type:params}. *) 1847 + val params_jsont : params Jsont.t 1983 1848 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 1849 1988 - type main = { 1989 - created_at : string; 1990 - subject : string; 1991 - via : Com.Atproto.Repo.StrongRef.main option; 1850 + type output = { 1851 + cursor : string option; 1852 + followers : Jsont.json list; 1853 + subject : Jsont.json; 1992 1854 } 1993 1855 1994 - (** Jsont codec for {!type:main}. *) 1995 - val main_jsont : main Jsont.t 1856 + (** Jsont codec for {!type:output}. *) 1857 + val output_jsont : output Jsont.t 1996 1858 1997 1859 end 1998 - module UnmuteActor : sig 1999 - (** Unmutes the specified account. Requires auth. *) 1860 + module GetFollows : sig 1861 + (** Enumerates accounts which a specified account (actor) follows. *) 2000 1862 2001 - 2002 - type input = { 1863 + (** Query/procedure parameters. *) 1864 + type params = { 2003 1865 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; 1866 + cursor : string option; 1867 + limit : int option; 2016 1868 } 2017 1869 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. *) 1870 + (** Jsont codec for {!type:params}. *) 1871 + val params_jsont : params Jsont.t 2024 1872 2025 1873 2026 - type input = { 2027 - list_ : string; 1874 + type output = { 1875 + cursor : string option; 1876 + follows : Jsont.json list; 1877 + subject : Jsont.json; 2028 1878 } 2029 1879 2030 - (** Jsont codec for {!type:input}. *) 2031 - val input_jsont : input Jsont.t 1880 + (** Jsont codec for {!type:output}. *) 1881 + val output_jsont : output Jsont.t 2032 1882 2033 1883 end 2034 - module GetKnownFollowers : sig 2035 - (** Enumerates accounts which follow a specified account (actor) and are followed by the viewer. *) 1884 + module GetFollowers : sig 1885 + (** Enumerates accounts which follow a specified account (actor). *) 2036 1886 2037 1887 (** Query/procedure parameters. *) 2038 1888 type params = { ··· 2055 1905 val output_jsont : output Jsont.t 2056 1906 2057 1907 end 2058 - module MuteActor : sig 2059 - (** Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. *) 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 + } 2060 1916 1917 + (** Jsont codec for {!type:params}. *) 1918 + val params_jsont : params Jsont.t 2061 1919 2062 - type input = { 2063 - actor : string; 1920 + 1921 + type output = { 1922 + blocks : Jsont.json list; 1923 + cursor : string option; 2064 1924 } 2065 1925 2066 - (** Jsont codec for {!type:input}. *) 2067 - val input_jsont : input Jsont.t 1926 + (** Jsont codec for {!type:output}. *) 1927 + val output_jsont : output Jsont.t 2068 1928 2069 1929 end 2070 - module Listitem : sig 2071 - (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 1930 + module Follow : sig 1931 + (** Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. *) 2072 1932 2073 1933 type main = { 2074 1934 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. *) 1935 + subject : string; 1936 + via : Com.Atproto.Repo.StrongRef.main option; 2077 1937 } 2078 1938 2079 1939 (** Jsont codec for {!type:main}. *) ··· 2081 1941 2082 1942 end 2083 1943 module Defs : sig 1944 + (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2084 1945 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; 1946 + type curatelist = string 1947 + val curatelist_jsont : curatelist Jsont.t 1948 + 1949 + 1950 + type list_item_view = { 1951 + subject : Jsont.json; 2094 1952 uri : string; 2095 1953 } 2096 1954 2097 - (** Jsont codec for {!type:starter_pack_view_basic}. *) 2098 - val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 1955 + (** Jsont codec for {!type:list_item_view}. *) 1956 + val list_item_view_jsont : list_item_view Jsont.t 2099 1957 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) *) 1958 + 1959 + type list_purpose = string 1960 + val list_purpose_jsont : list_purpose Jsont.t 1961 + 2101 1962 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 *) 1963 + type list_viewer_state = { 1964 + blocked : string option; 1965 + muted : bool option; 2110 1966 } 2111 1967 2112 - (** Jsont codec for {!type:relationship}. *) 2113 - val relationship_jsont : relationship Jsont.t 1968 + (** Jsont codec for {!type:list_viewer_state}. *) 1969 + val list_viewer_state_jsont : list_viewer_state Jsont.t 2114 1970 2115 - (** A list of actors used for only for reference purposes such as within a starter pack. *) 1971 + (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 2116 1972 2117 - type referencelist = string 2118 - val referencelist_jsont : referencelist Jsont.t 1973 + type modlist = string 1974 + val modlist_jsont : modlist Jsont.t 2119 1975 2120 1976 (** indicates that a handle or DID could not be resolved *) 2121 1977 ··· 2127 1983 (** Jsont codec for {!type:not_found_actor}. *) 2128 1984 val not_found_actor_jsont : not_found_actor Jsont.t 2129 1985 2130 - (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 1986 + (** A list of actors used for only for reference purposes such as within a starter pack. *) 2131 1987 2132 - type modlist = string 2133 - val modlist_jsont : modlist Jsont.t 1988 + type referencelist = string 1989 + val referencelist_jsont : referencelist Jsont.t 2134 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) *) 2135 1992 2136 - type list_viewer_state = { 2137 - blocked : string option; 2138 - muted : bool option; 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 *) 2139 2001 } 2140 2002 2141 - (** Jsont codec for {!type:list_viewer_state}. *) 2142 - val list_viewer_state_jsont : list_viewer_state Jsont.t 2003 + (** Jsont codec for {!type:relationship}. *) 2004 + val relationship_jsont : relationship Jsont.t 2143 2005 2144 2006 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; 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; 2151 2016 uri : string; 2152 2017 } 2153 2018 2154 - (** Jsont codec for {!type:list_item_view}. *) 2155 - val list_item_view_jsont : list_item_view Jsont.t 2019 + (** Jsont codec for {!type:starter_pack_view_basic}. *) 2020 + val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 2156 2021 2157 - (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2158 2022 2159 - type curatelist = string 2160 - val curatelist_jsont : curatelist Jsont.t 2161 - 2162 - 2163 - type list_view_basic = { 2023 + type list_view = { 2164 2024 avatar : string option; 2165 2025 cid : string; 2166 - indexed_at : string option; 2026 + creator : Jsont.json; 2027 + description : string option; 2028 + description_facets : Richtext.Facet.main list option; 2029 + indexed_at : string; 2167 2030 labels : Com.Atproto.Label.Defs.label list option; 2168 2031 list_item_count : int option; 2169 2032 name : string; ··· 2172 2035 viewer : Jsont.json option; 2173 2036 } 2174 2037 2175 - (** Jsont codec for {!type:list_view_basic}. *) 2176 - val list_view_basic_jsont : list_view_basic Jsont.t 2038 + (** Jsont codec for {!type:list_view}. *) 2039 + val list_view_jsont : list_view Jsont.t 2177 2040 2178 2041 2179 - type list_view = { 2042 + type list_view_basic = { 2180 2043 avatar : string option; 2181 2044 cid : string; 2182 - creator : Jsont.json; 2183 - description : string option; 2184 - description_facets : Richtext.Facet.main list option; 2185 - indexed_at : string; 2045 + indexed_at : string option; 2186 2046 labels : Com.Atproto.Label.Defs.label list option; 2187 2047 list_item_count : int option; 2188 2048 name : string; ··· 2191 2051 viewer : Jsont.json option; 2192 2052 } 2193 2053 2194 - (** Jsont codec for {!type:list_view}. *) 2195 - val list_view_jsont : list_view Jsont.t 2054 + (** Jsont codec for {!type:list_view_basic}. *) 2055 + val list_view_basic_jsont : list_view_basic Jsont.t 2196 2056 2197 2057 2198 2058 type starter_pack_view = { ··· 2213 2073 val starter_pack_view_jsont : starter_pack_view Jsont.t 2214 2074 2215 2075 end 2216 - module GetBlocks : sig 2217 - (** Enumerates which accounts the requesting account is currently blocking. Requires auth. *) 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. *) 2218 2090 2219 2091 (** Query/procedure parameters. *) 2220 2092 type params = { 2221 2093 cursor : string option; 2222 2094 limit : int option; 2095 + q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2223 2096 } 2224 2097 2225 2098 (** Jsont codec for {!type:params}. *) ··· 2227 2100 2228 2101 2229 2102 type output = { 2230 - blocks : Jsont.json list; 2231 2103 cursor : string option; 2104 + starter_packs : Jsont.json list; 2232 2105 } 2233 2106 2234 2107 (** Jsont codec for {!type:output}. *) 2235 2108 val output_jsont : output Jsont.t 2236 2109 2237 2110 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. *) 2111 + module List : sig 2112 + (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 2240 2113 2241 2114 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. *) 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) *) 2246 2122 } 2247 2123 2248 2124 (** Jsont codec for {!type:main}. *) 2249 2125 val main_jsont : main Jsont.t 2250 2126 2251 2127 end 2252 - module GetMutes : sig 2253 - (** Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. *) 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. *) 2254 2140 2255 2141 (** Query/procedure parameters. *) 2256 2142 type params = { 2143 + actor : string; (** The account (actor) to check for membership. *) 2257 2144 cursor : string option; 2258 2145 limit : int option; 2259 2146 } ··· 2264 2151 2265 2152 type output = { 2266 2153 cursor : string option; 2267 - mutes : Jsont.json list; 2154 + starter_packs_with_membership : Jsont.json list; 2268 2155 } 2269 2156 2270 2157 (** Jsont codec for {!type:output}. *) 2271 2158 val output_jsont : output Jsont.t 2272 2159 2273 2160 end 2274 - module GetRelationships : sig 2275 - (** Enumerates public relationships between one account, and a list of other accounts. Does not require auth. *) 2161 + module GetStarterPacks : sig 2162 + (** Get views for a list of starter packs. *) 2276 2163 2277 2164 (** Query/procedure parameters. *) 2278 2165 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. *) 2166 + uris : string list; 2281 2167 } 2282 2168 2283 2169 (** Jsont codec for {!type:params}. *) ··· 2285 2171 2286 2172 2287 2173 type output = { 2288 - actor : string option; 2289 - relationships : Jsont.json list; 2174 + starter_packs : Jsont.json list; 2290 2175 } 2291 2176 2292 2177 (** Jsont codec for {!type:output}. *) 2293 2178 val output_jsont : output Jsont.t 2294 2179 2295 2180 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. *) 2181 + module GetStarterPack : sig 2182 + (** Gets a view of a starter pack. *) 2308 2183 2309 2184 (** Query/procedure parameters. *) 2310 2185 type params = { 2311 - actor : string; (** The account (actor) to check for membership. *) 2312 - cursor : string option; 2313 - limit : int option; 2186 + starter_pack : string; (** Reference (AT-URI) of the starter pack record. *) 2314 2187 } 2315 2188 2316 2189 (** Jsont codec for {!type:params}. *) ··· 2318 2191 2319 2192 2320 2193 type output = { 2321 - cursor : string option; 2322 - starter_packs_with_membership : Jsont.json list; 2194 + starter_pack : Jsont.json; 2323 2195 } 2324 2196 2325 2197 (** Jsont codec for {!type:output}. *) 2326 2198 val output_jsont : output Jsont.t 2327 2199 2328 2200 end 2329 - module GetActorStarterPacks : sig 2330 - (** Get a list of starter packs created by the actor. *) 2201 + module GetRelationships : sig 2202 + (** Enumerates public relationships between one account, and a list of other accounts. Does not require auth. *) 2331 2203 2332 2204 (** Query/procedure parameters. *) 2333 2205 type params = { 2334 - actor : string; 2335 - cursor : string option; 2336 - limit : int option; 2206 + actor : string; (** Primary account requesting relationships for. *) 2207 + others : string list option; (** List of 'other' accounts to be related back to the primary. *) 2337 2208 } 2338 2209 2339 2210 (** Jsont codec for {!type:params}. *) ··· 2341 2212 2342 2213 2343 2214 type output = { 2344 - cursor : string option; 2345 - starter_packs : Jsont.json list; 2215 + actor : string option; 2216 + relationships : Jsont.json list; 2346 2217 } 2347 2218 2348 2219 (** Jsont codec for {!type:output}. *) 2349 2220 val output_jsont : output Jsont.t 2350 2221 2351 2222 end 2352 - module List : sig 2353 - (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 2223 + module GetListsWithMembership : sig 2224 + (** A list and an optional list item indicating membership of a target user to that list. *) 2354 2225 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) *) 2226 + type list_with_membership = { 2227 + list_ : Jsont.json; 2228 + list_item : Jsont.json option; 2363 2229 } 2364 2230 2365 - (** Jsont codec for {!type:main}. *) 2366 - val main_jsont : main Jsont.t 2231 + (** Jsont codec for {!type:list_with_membership}. *) 2232 + val list_with_membership_jsont : list_with_membership Jsont.t 2367 2233 2368 - end 2369 - module SearchStarterPacks : sig 2370 - (** Find starter packs matching search criteria. Does not require auth. *) 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. *) 2371 2235 2372 2236 (** Query/procedure parameters. *) 2373 2237 type params = { 2238 + actor : string; (** The account (actor) to check for membership. *) 2374 2239 cursor : string option; 2375 2240 limit : int option; 2376 - q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2241 + purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2377 2242 } 2378 2243 2379 2244 (** Jsont codec for {!type:params}. *) ··· 2382 2247 2383 2248 type output = { 2384 2249 cursor : string option; 2385 - starter_packs : Jsont.json list; 2250 + lists_with_membership : Jsont.json list; 2386 2251 } 2387 2252 2388 2253 (** Jsont codec for {!type:output}. *) 2389 2254 val output_jsont : output Jsont.t 2390 2255 2391 2256 end 2392 - module GetList : sig 2393 - (** Gets a 'view' (with additional context) of a specified list. *) 2257 + module GetLists : sig 2258 + (** Enumerates the lists created by a specified account (actor). *) 2394 2259 2395 2260 (** Query/procedure parameters. *) 2396 2261 type params = { 2262 + actor : string; (** The account (actor) to enumerate lists from. *) 2397 2263 cursor : string option; 2398 2264 limit : int option; 2399 - list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 2265 + purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2400 2266 } 2401 2267 2402 2268 (** Jsont codec for {!type:params}. *) ··· 2405 2271 2406 2272 type output = { 2407 2273 cursor : string option; 2408 - items : Jsont.json list; 2409 - list_ : Jsont.json; 2274 + lists : Jsont.json list; 2410 2275 } 2411 2276 2412 2277 (** Jsont codec for {!type:output}. *) 2413 2278 val output_jsont : output Jsont.t 2414 2279 2415 2280 end 2416 - module GetListBlocks : sig 2417 - (** Get mod lists that the requesting account (actor) is blocking. Requires auth. *) 2281 + module GetListMutes : sig 2282 + (** Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. *) 2418 2283 2419 2284 (** Query/procedure parameters. *) 2420 2285 type params = { ··· 2435 2300 val output_jsont : output Jsont.t 2436 2301 2437 2302 end 2438 - module GetStarterPack : sig 2439 - (** Gets a view of a starter pack. *) 2303 + module GetListBlocks : sig 2304 + (** Get mod lists that the requesting account (actor) is blocking. Requires auth. *) 2440 2305 2441 2306 (** Query/procedure parameters. *) 2442 2307 type params = { 2443 - starter_pack : string; (** Reference (AT-URI) of the starter pack record. *) 2308 + cursor : string option; 2309 + limit : int option; 2444 2310 } 2445 2311 2446 2312 (** Jsont codec for {!type:params}. *) ··· 2448 2314 2449 2315 2450 2316 type output = { 2451 - starter_pack : Jsont.json; 2317 + cursor : string option; 2318 + lists : Jsont.json list; 2452 2319 } 2453 2320 2454 2321 (** Jsont codec for {!type:output}. *) 2455 2322 val output_jsont : output Jsont.t 2456 2323 2457 2324 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. *) 2325 + module GetList : sig 2326 + (** Gets a 'view' (with additional context) of a specified list. *) 2470 2327 2471 2328 (** Query/procedure parameters. *) 2472 2329 type params = { 2473 - actor : string; (** The account (actor) to check for membership. *) 2474 2330 cursor : string option; 2475 2331 limit : int option; 2476 - purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2332 + list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 2477 2333 } 2478 2334 2479 2335 (** Jsont codec for {!type:params}. *) ··· 2482 2338 2483 2339 type output = { 2484 2340 cursor : string option; 2485 - lists_with_membership : Jsont.json list; 2341 + items : Jsont.json list; 2342 + list_ : Jsont.json; 2486 2343 } 2487 2344 2488 2345 (** Jsont codec for {!type:output}. *) 2489 2346 val output_jsont : output Jsont.t 2490 2347 2491 2348 end 2492 - module GetListMutes : sig 2493 - (** Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. *) 2349 + module GetActorStarterPacks : sig 2350 + (** Get a list of starter packs created by the actor. *) 2494 2351 2495 2352 (** Query/procedure parameters. *) 2496 2353 type params = { 2354 + actor : string; 2497 2355 cursor : string option; 2498 2356 limit : int option; 2499 2357 } ··· 2504 2362 2505 2363 type output = { 2506 2364 cursor : string option; 2507 - lists : Jsont.json list; 2365 + starter_packs : Jsont.json list; 2508 2366 } 2509 2367 2510 2368 (** Jsont codec for {!type:output}. *) 2511 2369 val output_jsont : output Jsont.t 2512 2370 2513 2371 end 2514 - module GetStarterPacks : sig 2515 - (** Get views for a list of starter packs. *) 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 2516 2385 2517 - (** Query/procedure parameters. *) 2518 - type params = { 2519 - uris : string list; 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; 2520 2393 } 2521 2394 2522 - (** Jsont codec for {!type:params}. *) 2523 - val params_jsont : params Jsont.t 2395 + (** Jsont codec for {!type:list_rule}. *) 2396 + val list_rule_jsont : list_rule Jsont.t 2524 2397 2398 + (** Allow replies from actors mentioned in your post. *) 2525 2399 2526 - type output = { 2527 - starter_packs : Jsont.json list; 2528 - } 2400 + type mention_rule = unit 2529 2401 2530 - (** Jsont codec for {!type:output}. *) 2531 - val output_jsont : output Jsont.t 2402 + (** Jsont codec for {!type:mention_rule}. *) 2403 + val mention_rule_jsont : mention_rule Jsont.t 2532 2404 2533 - end 2534 - module GetLists : sig 2535 - (** Enumerates the lists created by a specified account (actor). *) 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. *) 2536 2406 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. *) 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. *) 2543 2412 } 2544 2413 2545 - (** Jsont codec for {!type:params}. *) 2546 - val params_jsont : params Jsont.t 2414 + (** Jsont codec for {!type:main}. *) 2415 + val main_jsont : main Jsont.t 2547 2416 2417 + end 2418 + module Repost : sig 2419 + (** Record representing a 'repost' of an existing Bluesky post. *) 2548 2420 2549 - type output = { 2550 - cursor : string option; 2551 - lists : Jsont.json list; 2421 + type main = { 2422 + created_at : string; 2423 + subject : Com.Atproto.Repo.StrongRef.main; 2424 + via : Com.Atproto.Repo.StrongRef.main option; 2552 2425 } 2553 2426 2554 - (** Jsont codec for {!type:output}. *) 2555 - val output_jsont : output Jsont.t 2427 + (** Jsont codec for {!type:main}. *) 2428 + val main_jsont : main Jsont.t 2556 2429 2557 2430 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. *) 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. *) 2562 2440 2563 - type text_slice = { 2564 - end_ : int; 2565 - start : int; 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. *) 2566 2446 } 2567 2447 2568 - (** Jsont codec for {!type:text_slice}. *) 2569 - val text_slice_jsont : text_slice Jsont.t 2448 + (** Jsont codec for {!type:main}. *) 2449 + val main_jsont : main Jsont.t 2570 2450 2451 + end 2452 + module Post : sig 2571 2453 2572 2454 type reply_ref = { 2573 2455 parent : Com.Atproto.Repo.StrongRef.main; ··· 2577 2459 (** Jsont codec for {!type:reply_ref}. *) 2578 2460 val reply_ref_jsont : reply_ref Jsont.t 2579 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 + 2580 2472 (** Deprecated: use facets instead. *) 2581 2473 2582 2474 type entity = { ··· 2606 2498 val main_jsont : main Jsont.t 2607 2499 2608 2500 end 2609 - module GetLikes : sig 2501 + module Like : sig 2502 + (** Record declaring a 'like' of a piece of subject content. *) 2610 2503 2611 - type like = { 2612 - actor : Jsont.json; 2504 + type main = { 2613 2505 created_at : string; 2614 - indexed_at : string; 2506 + subject : Com.Atproto.Repo.StrongRef.main; 2507 + via : Com.Atproto.Repo.StrongRef.main option; 2615 2508 } 2616 2509 2617 - (** Jsont codec for {!type:like}. *) 2618 - val like_jsont : like Jsont.t 2510 + (** Jsont codec for {!type:main}. *) 2511 + val main_jsont : main Jsont.t 2619 2512 2620 - (** Get like records which reference a subject (by AT-URI and CID). *) 2513 + end 2514 + module GetRepostedBy : sig 2515 + (** Get a list of reposts for a given post. *) 2621 2516 2622 2517 (** Query/procedure parameters. *) 2623 2518 type params = { 2624 - cid : string option; (** CID of the subject record (aka, specific version of record), to filter likes. *) 2519 + cid : string option; (** If supplied, filters to reposts of specific version (by CID) of the post record. *) 2625 2520 cursor : string option; 2626 2521 limit : int option; 2627 - uri : string; (** AT-URI of the subject (eg, a post record). *) 2522 + uri : string; (** Reference (AT-URI) of post record *) 2628 2523 } 2629 2524 2630 2525 (** Jsont codec for {!type:params}. *) ··· 2634 2529 type output = { 2635 2530 cid : string option; 2636 2531 cursor : string option; 2637 - likes : Jsont.json list; 2532 + reposted_by : Jsont.json list; 2638 2533 uri : string; 2639 2534 } 2640 2535 ··· 2642 2537 val output_jsont : output Jsont.t 2643 2538 2644 2539 end 2645 - module Postgate : sig 2646 - (** Disables embedding of this post. *) 2540 + module GetLikes : sig 2647 2541 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 = { 2542 + type like = { 2543 + actor : Jsont.json; 2656 2544 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. *) 2545 + indexed_at : string; 2660 2546 } 2661 2547 2662 - (** Jsont codec for {!type:main}. *) 2663 - val main_jsont : main Jsont.t 2548 + (** Jsont codec for {!type:like}. *) 2549 + val like_jsont : like Jsont.t 2664 2550 2665 - end 2666 - module GetRepostedBy : sig 2667 - (** Get a list of reposts for a given post. *) 2551 + (** Get like records which reference a subject (by AT-URI and CID). *) 2668 2552 2669 2553 (** Query/procedure parameters. *) 2670 2554 type params = { 2671 - cid : string option; (** If supplied, filters to reposts of specific version (by CID) of the post record. *) 2555 + cid : string option; (** CID of the subject record (aka, specific version of record), to filter likes. *) 2672 2556 cursor : string option; 2673 2557 limit : int option; 2674 - uri : string; (** Reference (AT-URI) of post record *) 2558 + uri : string; (** AT-URI of the subject (eg, a post record). *) 2675 2559 } 2676 2560 2677 2561 (** Jsont codec for {!type:params}. *) ··· 2681 2565 type output = { 2682 2566 cid : string option; 2683 2567 cursor : string option; 2684 - reposted_by : Jsont.json list; 2568 + likes : Jsont.json list; 2685 2569 uri : string; 2686 2570 } 2687 2571 ··· 2689 2573 val output_jsont : output Jsont.t 2690 2574 2691 2575 end 2692 - module DescribeFeedGenerator : sig 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. *) 2693 2578 2694 - type links = { 2695 - privacy_policy : string option; 2696 - terms_of_service : string option; 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 *) 2697 2589 } 2698 2590 2699 - (** Jsont codec for {!type:links}. *) 2700 - val links_jsont : links Jsont.t 2591 + (** Jsont codec for {!type:main}. *) 2592 + val main_jsont : main Jsont.t 2701 2593 2594 + end 2595 + module DescribeFeedGenerator : sig 2702 2596 2703 2597 type feed = { 2704 2598 uri : string; ··· 2707 2601 (** Jsont codec for {!type:feed}. *) 2708 2602 val feed_jsont : feed Jsont.t 2709 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 + 2710 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). *) 2711 2614 2712 2615 ··· 2720 2623 val output_jsont : output Jsont.t 2721 2624 2722 2625 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 2626 + module Defs : sig 2730 2627 2731 - (** Allow replies from actors on a list. *) 2732 - 2733 - type list_rule = { 2734 - list_ : string; 2628 + type blocked_author = { 2629 + did : string; 2630 + viewer : Jsont.json option; 2735 2631 } 2736 2632 2737 - (** Jsont codec for {!type:list_rule}. *) 2738 - val list_rule_jsont : list_rule Jsont.t 2633 + (** Jsont codec for {!type:blocked_author}. *) 2634 + val blocked_author_jsont : blocked_author Jsont.t 2739 2635 2740 - (** Allow replies from actors you follow. *) 2636 + (** User clicked through to the author of the feed item *) 2741 2637 2742 - type following_rule = unit 2638 + type clickthrough_author = string 2639 + val clickthrough_author_jsont : clickthrough_author Jsont.t 2743 2640 2744 - (** Jsont codec for {!type:following_rule}. *) 2745 - val following_rule_jsont : following_rule Jsont.t 2641 + (** User clicked through to the embedded content of the feed item *) 2746 2642 2747 - (** Allow replies from actors who follow you. *) 2643 + type clickthrough_embed = string 2644 + val clickthrough_embed_jsont : clickthrough_embed Jsont.t 2748 2645 2749 - type follower_rule = unit 2646 + (** User clicked through to the feed item *) 2750 2647 2751 - (** Jsont codec for {!type:follower_rule}. *) 2752 - val follower_rule_jsont : follower_rule Jsont.t 2648 + type clickthrough_item = string 2649 + val clickthrough_item_jsont : clickthrough_item Jsont.t 2753 2650 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. *) 2651 + (** User clicked through to the reposter of the feed item *) 2755 2652 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 - } 2653 + type clickthrough_reposter = string 2654 + val clickthrough_reposter_jsont : clickthrough_reposter Jsont.t 2762 2655 2763 - (** Jsont codec for {!type:main}. *) 2764 - val main_jsont : main Jsont.t 2656 + (** Declares the feed generator returns any types of posts. *) 2765 2657 2766 - end 2767 - module Like : sig 2768 - (** Record declaring a 'like' of a piece of subject content. *) 2658 + type content_mode_unspecified = string 2659 + val content_mode_unspecified_jsont : content_mode_unspecified Jsont.t 2769 2660 2770 - type main = { 2771 - created_at : string; 2772 - subject : Com.Atproto.Repo.StrongRef.main; 2773 - via : Com.Atproto.Repo.StrongRef.main option; 2774 - } 2661 + (** Declares the feed generator returns posts containing app.bsky.embed.video embeds. *) 2775 2662 2776 - (** Jsont codec for {!type:main}. *) 2777 - val main_jsont : main Jsont.t 2663 + type content_mode_video = string 2664 + val content_mode_video_jsont : content_mode_video Jsont.t 2778 2665 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 2666 2783 - type viewer_state = { 2784 - bookmarked : bool option; 2785 - embedding_disabled : bool option; 2667 + type generator_viewer_state = { 2786 2668 like : string option; 2787 - pinned : bool option; 2788 - reply_disabled : bool option; 2789 - repost : string option; 2790 - thread_muted : bool option; 2791 2669 } 2792 2670 2793 - (** Jsont codec for {!type:viewer_state}. *) 2794 - val viewer_state_jsont : viewer_state Jsont.t 2671 + (** Jsont codec for {!type:generator_viewer_state}. *) 2672 + val generator_viewer_state_jsont : generator_viewer_state Jsont.t 2795 2673 2796 2674 2797 - type threadgate_view = { 2798 - cid : string option; 2799 - lists : Jsont.json list option; 2800 - record : Jsont.json option; 2801 - uri : string option; 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. *) 2802 2680 } 2803 2681 2804 - (** Jsont codec for {!type:threadgate_view}. *) 2805 - val threadgate_view_jsont : threadgate_view Jsont.t 2682 + (** Jsont codec for {!type:interaction}. *) 2683 + val interaction_jsont : interaction Jsont.t 2806 2684 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 - } 2685 + (** User liked the feed item *) 2812 2686 2813 - (** Jsont codec for {!type:thread_context}. *) 2814 - val thread_context_jsont : thread_context Jsont.t 2687 + type interaction_like = string 2688 + val interaction_like_jsont : interaction_like Jsont.t 2815 2689 2690 + (** User quoted the feed item *) 2816 2691 2817 - type skeleton_reason_repost = { 2818 - repost : string; 2819 - } 2692 + type interaction_quote = string 2693 + val interaction_quote_jsont : interaction_quote Jsont.t 2820 2694 2821 - (** Jsont codec for {!type:skeleton_reason_repost}. *) 2822 - val skeleton_reason_repost_jsont : skeleton_reason_repost Jsont.t 2695 + (** User replied to the feed item *) 2823 2696 2697 + type interaction_reply = string 2698 + val interaction_reply_jsont : interaction_reply Jsont.t 2824 2699 2825 - type skeleton_reason_pin = unit 2700 + (** User reposted the feed item *) 2826 2701 2827 - (** Jsont codec for {!type:skeleton_reason_pin}. *) 2828 - val skeleton_reason_pin_jsont : skeleton_reason_pin Jsont.t 2702 + type interaction_repost = string 2703 + val interaction_repost_jsont : interaction_repost Jsont.t 2829 2704 2705 + (** Feed item was seen by user *) 2830 2706 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 - } 2707 + type interaction_seen = string 2708 + val interaction_seen_jsont : interaction_seen Jsont.t 2836 2709 2837 - (** Jsont codec for {!type:skeleton_feed_post}. *) 2838 - val skeleton_feed_post_jsont : skeleton_feed_post Jsont.t 2710 + (** User shared the feed item *) 2839 2711 2840 - (** Request that more content like the given feed item be shown in the feed *) 2712 + type interaction_share = string 2713 + val interaction_share_jsont : interaction_share Jsont.t 2841 2714 2842 - type request_more = string 2843 - val request_more_jsont : request_more Jsont.t 2844 2715 2845 - (** Request that less content like the given feed item be shown in the feed *) 2716 + type not_found_post = { 2717 + not_found : bool; 2718 + uri : string; 2719 + } 2846 2720 2847 - type request_less = string 2848 - val request_less_jsont : request_less Jsont.t 2721 + (** Jsont codec for {!type:not_found_post}. *) 2722 + val not_found_post_jsont : not_found_post Jsont.t 2849 2723 2850 2724 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 - } 2725 + type reason_pin = unit 2856 2726 2857 - (** Jsont codec for {!type:reply_ref}. *) 2858 - val reply_ref_jsont : reply_ref Jsont.t 2727 + (** Jsont codec for {!type:reason_pin}. *) 2728 + val reason_pin_jsont : reason_pin Jsont.t 2859 2729 2860 2730 2861 2731 type reason_repost = { ··· 2869 2739 val reason_repost_jsont : reason_repost Jsont.t 2870 2740 2871 2741 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; 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; 2881 2746 } 2882 2747 2883 - (** Jsont codec for {!type:not_found_post}. *) 2884 - val not_found_post_jsont : not_found_post Jsont.t 2748 + (** Jsont codec for {!type:reply_ref}. *) 2749 + val reply_ref_jsont : reply_ref Jsont.t 2885 2750 2886 - (** User shared the feed item *) 2751 + (** Request that less content like the given feed item be shown in the feed *) 2887 2752 2888 - type interaction_share = string 2889 - val interaction_share_jsont : interaction_share Jsont.t 2753 + type request_less = string 2754 + val request_less_jsont : request_less Jsont.t 2890 2755 2891 - (** Feed item was seen by user *) 2756 + (** Request that more content like the given feed item be shown in the feed *) 2892 2757 2893 - type interaction_seen = string 2894 - val interaction_seen_jsont : interaction_seen Jsont.t 2758 + type request_more = string 2759 + val request_more_jsont : request_more Jsont.t 2895 2760 2896 - (** User reposted the feed item *) 2897 2761 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 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 + } 2905 2767 2906 - (** User quoted the feed item *) 2768 + (** Jsont codec for {!type:skeleton_feed_post}. *) 2769 + val skeleton_feed_post_jsont : skeleton_feed_post Jsont.t 2907 2770 2908 - type interaction_quote = string 2909 - val interaction_quote_jsont : interaction_quote Jsont.t 2910 2771 2911 - (** User liked the feed item *) 2772 + type skeleton_reason_pin = unit 2912 2773 2913 - type interaction_like = string 2914 - val interaction_like_jsont : interaction_like Jsont.t 2774 + (** Jsont codec for {!type:skeleton_reason_pin}. *) 2775 + val skeleton_reason_pin_jsont : skeleton_reason_pin Jsont.t 2915 2776 2916 2777 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. *) 2778 + type skeleton_reason_repost = { 2779 + repost : string; 2922 2780 } 2923 2781 2924 - (** Jsont codec for {!type:interaction}. *) 2925 - val interaction_jsont : interaction Jsont.t 2782 + (** Jsont codec for {!type:skeleton_reason_repost}. *) 2783 + val skeleton_reason_repost_jsont : skeleton_reason_repost Jsont.t 2926 2784 2785 + (** Metadata about this post within the context of the thread it is in. *) 2927 2786 2928 - type generator_viewer_state = { 2929 - like : string option; 2787 + type thread_context = { 2788 + root_author_like : string option; 2930 2789 } 2931 2790 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. *) 2791 + (** Jsont codec for {!type:thread_context}. *) 2792 + val thread_context_jsont : thread_context Jsont.t 2941 2793 2942 - type content_mode_unspecified = string 2943 - val content_mode_unspecified_jsont : content_mode_unspecified Jsont.t 2944 2794 2945 - (** User clicked through to the reposter of the feed item *) 2795 + type threadgate_view = { 2796 + cid : string option; 2797 + lists : Jsont.json list option; 2798 + record : Jsont.json option; 2799 + uri : string option; 2800 + } 2946 2801 2947 - type clickthrough_reposter = string 2948 - val clickthrough_reposter_jsont : clickthrough_reposter Jsont.t 2802 + (** Jsont codec for {!type:threadgate_view}. *) 2803 + val threadgate_view_jsont : threadgate_view Jsont.t 2949 2804 2950 - (** User clicked through to the feed item *) 2805 + (** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. *) 2951 2806 2952 - type clickthrough_item = string 2953 - val clickthrough_item_jsont : clickthrough_item Jsont.t 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 + } 2954 2816 2955 - (** User clicked through to the embedded content of the feed item *) 2817 + (** Jsont codec for {!type:viewer_state}. *) 2818 + val viewer_state_jsont : viewer_state Jsont.t 2956 2819 2957 - type clickthrough_embed = string 2958 - val clickthrough_embed_jsont : clickthrough_embed Jsont.t 2959 2820 2960 - (** User clicked through to the author of the feed item *) 2821 + type blocked_post = { 2822 + author : Jsont.json; 2823 + blocked : bool; 2824 + uri : string; 2825 + } 2961 2826 2962 - type clickthrough_author = string 2963 - val clickthrough_author_jsont : clickthrough_author Jsont.t 2827 + (** Jsont codec for {!type:blocked_post}. *) 2828 + val blocked_post_jsont : blocked_post Jsont.t 2964 2829 2965 2830 2966 - type blocked_author = { 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; 2967 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; 2968 2845 viewer : Jsont.json option; 2969 2846 } 2970 2847 2971 - (** Jsont codec for {!type:blocked_author}. *) 2972 - val blocked_author_jsont : blocked_author Jsont.t 2848 + (** Jsont codec for {!type:generator_view}. *) 2849 + val generator_view_jsont : generator_view Jsont.t 2973 2850 2974 2851 2975 2852 type post_view = { ··· 2994 2871 val post_view_jsont : post_view Jsont.t 2995 2872 2996 2873 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; 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. *) 3012 2880 } 3013 2881 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 2882 + (** Jsont codec for {!type:feed_view_post}. *) 2883 + val feed_view_post_jsont : feed_view_post Jsont.t 3026 2884 3027 2885 3028 2886 type thread_view_post = { ··· 3035 2893 (** Jsont codec for {!type:thread_view_post}. *) 3036 2894 val thread_view_post_jsont : thread_view_post Jsont.t 3037 2895 2896 + end 2897 + module SendInteractions : sig 2898 + (** Send information about interactions with feed items back to the feed generator that served them. *) 3038 2899 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. *) 2900 + 2901 + type input = { 2902 + interactions : Jsont.json list; 3045 2903 } 3046 2904 3047 - (** Jsont codec for {!type:feed_view_post}. *) 3048 - val feed_view_post_jsont : feed_view_post Jsont.t 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 3049 2913 3050 2914 end 3051 - module Repost : sig 3052 - (** Record representing a 'repost' of an existing Bluesky post. *) 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. *) 3053 2917 3054 - type main = { 3055 - created_at : string; 3056 - subject : Com.Atproto.Repo.StrongRef.main; 3057 - via : Com.Atproto.Repo.StrongRef.main option; 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. *) 3058 2932 } 3059 2933 3060 - (** Jsont codec for {!type:main}. *) 3061 - val main_jsont : main Jsont.t 2934 + (** Jsont codec for {!type:params}. *) 2935 + val params_jsont : params Jsont.t 3062 2936 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 2937 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 *) 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; 3077 2942 } 3078 2943 3079 - (** Jsont codec for {!type:main}. *) 3080 - val main_jsont : main Jsont.t 2944 + (** Jsont codec for {!type:output}. *) 2945 + val output_jsont : output Jsont.t 3081 2946 3082 2947 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. *) 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. *) 3085 2950 3086 2951 (** Query/procedure parameters. *) 3087 2952 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. *) 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; 3091 2956 } 3092 2957 3093 2958 (** Jsont codec for {!type:params}. *) ··· 3095 2960 3096 2961 3097 2962 type output = { 3098 - thread : Jsont.json; 3099 - threadgate : Jsont.json option; 2963 + cursor : string option; 2964 + feed : Jsont.json list; 3100 2965 } 3101 2966 3102 2967 (** Jsont codec for {!type:output}. *) 3103 2968 val output_jsont : output Jsont.t 3104 2969 3105 2970 end 3106 - module GetFeed : sig 3107 - (** Get a hydrated feed from an actor's selected feed generator. Implemented by App View. *) 2971 + module GetSuggestedFeeds : sig 2972 + (** Get a list of suggested feeds (feed generators) for the requesting account. *) 3108 2973 3109 2974 (** Query/procedure parameters. *) 3110 2975 type params = { 3111 2976 cursor : string option; 3112 - feed : string; 3113 2977 limit : int option; 3114 2978 } 3115 2979 ··· 3119 2983 3120 2984 type output = { 3121 2985 cursor : string option; 3122 - feed : Jsont.json list; 2986 + feeds : Jsont.json list; 3123 2987 } 3124 2988 3125 2989 (** Jsont codec for {!type:output}. *) ··· 3152 3016 val output_jsont : output Jsont.t 3153 3017 3154 3018 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. *) 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'. *) 3157 3021 3158 3022 (** Query/procedure parameters. *) 3159 3023 type params = { 3160 - cursor : string option; 3161 - limit : int option; 3162 - list_ : string; (** Reference (AT-URI) to the list record. *) 3024 + uris : string list; (** List of post AT-URIs to return hydrated views for. *) 3163 3025 } 3164 3026 3165 3027 (** Jsont codec for {!type:params}. *) ··· 3167 3029 3168 3030 3169 3031 type output = { 3170 - cursor : string option; 3171 - feed : Jsont.json list; 3032 + posts : Jsont.json list; 3172 3033 } 3173 3034 3174 3035 (** Jsont codec for {!type:output}. *) 3175 3036 val output_jsont : output Jsont.t 3176 3037 3177 3038 end 3178 - module GetActorLikes : sig 3179 - (** Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. *) 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. *) 3180 3041 3181 3042 (** Query/procedure parameters. *) 3182 3043 type params = { 3183 - actor : string; 3184 - cursor : string option; 3185 - limit : int option; 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. *) 3186 3047 } 3187 3048 3188 3049 (** Jsont codec for {!type:params}. *) ··· 3190 3051 3191 3052 3192 3053 type output = { 3193 - cursor : string option; 3194 - feed : Jsont.json list; 3054 + thread : Jsont.json; 3055 + threadgate : Jsont.json option; 3195 3056 } 3196 3057 3197 3058 (** Jsont codec for {!type:output}. *) 3198 3059 val output_jsont : output Jsont.t 3199 3060 3200 3061 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. *) 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. *) 3203 3064 3204 3065 (** Query/procedure parameters. *) 3205 3066 type params = { 3206 3067 cursor : string option; 3207 - feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 3208 3068 limit : int option; 3069 + list_ : string; (** Reference (AT-URI) to the list record. *) 3209 3070 } 3210 3071 3211 3072 (** Jsont codec for {!type:params}. *) ··· 3215 3076 type output = { 3216 3077 cursor : string option; 3217 3078 feed : Jsont.json list; 3218 - req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3219 3079 } 3220 3080 3221 3081 (** Jsont codec for {!type:output}. *) 3222 3082 val output_jsont : output Jsont.t 3223 3083 3224 3084 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. *) 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. *) 3227 3087 3228 3088 (** Query/procedure parameters. *) 3229 3089 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. *) 3090 + cursor : string option; 3091 + feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 3234 3092 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 3093 } 3243 3094 3244 3095 (** Jsont codec for {!type:params}. *) ··· 3247 3098 3248 3099 type output = { 3249 3100 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; 3101 + feed : Jsont.json list; 3102 + req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3252 3103 } 3253 3104 3254 3105 (** Jsont codec for {!type:output}. *) ··· 3275 3126 val output_jsont : output Jsont.t 3276 3127 3277 3128 end 3278 - module SendInteractions : sig 3279 - (** Send information about interactions with feed items back to the feed generator that served them. *) 3129 + module GetFeedGenerator : sig 3130 + (** Get information about a feed generator. Implemented by AppView. *) 3280 3131 3281 - 3282 - type input = { 3283 - interactions : Jsont.json list; 3132 + (** Query/procedure parameters. *) 3133 + type params = { 3134 + feed : string; (** AT-URI of the feed generator record. *) 3284 3135 } 3285 3136 3286 - (** Jsont codec for {!type:input}. *) 3287 - val input_jsont : input Jsont.t 3137 + (** Jsont codec for {!type:params}. *) 3138 + val params_jsont : params Jsont.t 3288 3139 3289 3140 3290 - type output = unit 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 + } 3291 3146 3292 3147 (** Jsont codec for {!type:output}. *) 3293 3148 val output_jsont : output Jsont.t 3294 3149 3295 3150 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. *) 3151 + module GetFeed : sig 3152 + (** Get a hydrated feed from an actor's selected feed generator. Implemented by App View. *) 3298 3153 3299 3154 (** Query/procedure parameters. *) 3300 3155 type params = { 3301 - actor : string; 3302 3156 cursor : string option; 3303 - filter : string option; (** Combinations of post/repost types to include in response. *) 3304 - include_pins : bool option; 3157 + feed : string; 3305 3158 limit : int option; 3306 3159 } 3307 3160 ··· 3318 3171 val output_jsont : output Jsont.t 3319 3172 3320 3173 end 3321 - module GetFeedGenerator : sig 3322 - (** Get information about a feed generator. Implemented by AppView. *) 3174 + module GetAuthorFeed : sig 3175 + (** Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. *) 3323 3176 3324 3177 (** Query/procedure parameters. *) 3325 3178 type params = { 3326 - feed : string; (** AT-URI of the feed generator record. *) 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; 3327 3184 } 3328 3185 3329 3186 (** Jsont codec for {!type:params}. *) ··· 3331 3188 3332 3189 3333 3190 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; 3191 + cursor : string option; 3192 + feed : Jsont.json list; 3337 3193 } 3338 3194 3339 3195 (** Jsont codec for {!type:output}. *) 3340 3196 val output_jsont : output Jsont.t 3341 3197 3342 3198 end 3343 - module GetSuggestedFeeds : sig 3344 - (** Get a list of suggested feeds (feed generators) for the requesting account. *) 3199 + module GetActorLikes : sig 3200 + (** Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. *) 3345 3201 3346 3202 (** Query/procedure parameters. *) 3347 3203 type params = { 3204 + actor : string; 3348 3205 cursor : string option; 3349 3206 limit : int option; 3350 3207 } ··· 3355 3212 3356 3213 type output = { 3357 3214 cursor : string option; 3358 - feeds : Jsont.json list; 3215 + feed : Jsont.json list; 3359 3216 } 3360 3217 3361 3218 (** Jsont codec for {!type:output}. *) ··· 3385 3242 val output_jsont : output Jsont.t 3386 3243 3387 3244 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'. *) 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 + 3390 3250 3391 - (** Query/procedure parameters. *) 3392 - type params = { 3393 - uris : string list; (** List of post AT-URIs to return hydrated views for. *) 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`. *) 3394 3254 } 3395 3255 3396 - (** Jsont codec for {!type:params}. *) 3397 - val params_jsont : params Jsont.t 3256 + (** Jsont codec for {!type:input}. *) 3257 + val input_jsont : input Jsont.t 3398 3258 3399 3259 3400 3260 type output = { 3401 - posts : Jsont.json list; 3261 + token : string; (** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. *) 3402 3262 } 3403 3263 3404 3264 (** Jsont codec for {!type:output}. *) 3405 3265 val output_jsont : output Jsont.t 3406 3266 3407 3267 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. *) 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. *) 3410 3323 3411 3324 (** Query/procedure parameters. *) 3412 3325 type params = { 3413 - algorithm : string option; (** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. *) 3414 3326 cursor : string option; 3415 3327 limit : int option; 3416 3328 } ··· 3421 3333 3422 3334 type output = { 3423 3335 cursor : string option; 3424 - feed : Jsont.json list; 3336 + matches : Jsont.json list; 3425 3337 } 3426 3338 3427 3339 (** Jsont codec for {!type:output}. *) 3428 3340 val output_jsont : output Jsont.t 3429 3341 3430 3342 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. *) 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. *) 3435 3345 3436 3346 3437 3347 type input = { 3438 - uri : string; 3348 + subject : string; (** The subject's DID to dismiss the match with. *) 3439 3349 } 3440 3350 3441 3351 (** Jsont codec for {!type:input}. *) 3442 3352 val input_jsont : input Jsont.t 3443 3353 3354 + 3355 + type output = unit 3356 + 3357 + (** Jsont codec for {!type:output}. *) 3358 + val output_jsont : output Jsont.t 3359 + 3444 3360 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. *) 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 + } 3447 3378 3379 + (** Jsont codec for {!type:notification}. *) 3380 + val notification_jsont : notification Jsont.t 3448 3381 3449 - type input = { 3450 - cid : string; 3451 - uri : string; 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. *) 3452 3386 } 3453 3387 3454 - (** Jsont codec for {!type:input}. *) 3455 - val input_jsont : input Jsont.t 3388 + (** Jsont codec for {!type:sync_status}. *) 3389 + val sync_status_jsont : sync_status Jsont.t 3456 3390 3457 3391 end 3458 - module Defs : sig 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. *) 3459 3394 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. *) 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`. *) 3464 3399 } 3465 3400 3466 - (** Jsont codec for {!type:bookmark_view}. *) 3467 - val bookmark_view_jsont : bookmark_view Jsont.t 3401 + (** Jsont codec for {!type:input}. *) 3402 + val input_jsont : input Jsont.t 3468 3403 3469 - (** Object used to store bookmark data in stash. *) 3470 3404 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. *) 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. *) 3473 3407 } 3474 3408 3475 - (** Jsont codec for {!type:bookmark}. *) 3476 - val bookmark_jsont : bookmark Jsont.t 3409 + (** Jsont codec for {!type:output}. *) 3410 + val output_jsont : output Jsont.t 3477 3411 3478 3412 end 3479 - module GetBookmarks : sig 3480 - (** Gets views of records bookmarked by the authenticated user. Requires authentication. *) 3413 + module GetSyncStatus : sig 3414 + (** Gets the user's current contact import status. Requires authentication. *) 3481 3415 3482 3416 (** Query/procedure parameters. *) 3483 - type params = { 3484 - cursor : string option; 3485 - limit : int option; 3486 - } 3417 + type params = unit 3487 3418 3488 3419 (** Jsont codec for {!type:params}. *) 3489 3420 val params_jsont : params Jsont.t 3490 3421 3491 3422 3492 3423 type output = { 3493 - bookmarks : Defs.bookmark_view list; 3494 - cursor : string option; 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. *) 3495 3425 } 3496 3426 3497 3427 (** Jsont codec for {!type:output}. *) ··· 3500 3430 end 3501 3431 end 3502 3432 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 *) 3433 + module GetTaggedSuggestions : sig 3505 3434 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). *) 3435 + type suggestion = { 3436 + subject : string; 3437 + subject_type : string; 3438 + tag : string; 3511 3439 } 3512 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 + 3513 3449 (** Jsont codec for {!type:params}. *) 3514 3450 val params_jsont : params Jsont.t 3515 3451 3516 3452 3517 3453 type output = { 3518 - dids : string list; 3519 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3454 + suggestions : suggestion list; 3520 3455 } 3521 3456 3522 3457 (** Jsont codec for {!type:output}. *) 3523 3458 val output_jsont : output Jsont.t 3524 3459 3525 3460 end 3526 - module GetOnboardingSuggestedStarterPacks : sig 3527 - (** Get a list of suggested starterpacks for onboarding *) 3461 + module GetSuggestedUsersSkeleton : sig 3462 + (** Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers *) 3528 3463 3529 3464 (** Query/procedure parameters. *) 3530 3465 type params = { 3466 + category : string option; (** Category of users to get suggestions for. *) 3531 3467 limit : int option; 3468 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3532 3469 } 3533 3470 3534 3471 (** Jsont codec for {!type:params}. *) ··· 3536 3473 3537 3474 3538 3475 type output = { 3539 - starter_packs : Jsont.json list; 3476 + dids : string list; 3477 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3540 3478 } 3541 3479 3542 3480 (** Jsont codec for {!type:output}. *) 3543 3481 val output_jsont : output Jsont.t 3544 3482 3545 3483 end 3546 - module GetPopularFeedGenerators : sig 3547 - (** An unspecced view of globally popular feed generators. *) 3484 + module GetSuggestedUsers : sig 3485 + (** Get a list of suggested users *) 3548 3486 3549 3487 (** Query/procedure parameters. *) 3550 3488 type params = { 3551 - cursor : string option; 3489 + category : string option; (** Category of users to get suggestions for. *) 3552 3490 limit : int option; 3553 - query : string option; 3554 3491 } 3555 3492 3556 3493 (** Jsont codec for {!type:params}. *) ··· 3558 3495 3559 3496 3560 3497 type output = { 3561 - cursor : string option; 3562 - feeds : Jsont.json list; 3498 + actors : Jsont.json list; 3499 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3563 3500 } 3564 3501 3565 3502 (** Jsont codec for {!type:output}. *) ··· 3587 3524 val output_jsont : output Jsont.t 3588 3525 3589 3526 end 3590 - module GetSuggestedFeeds : sig 3591 - (** Get a list of suggested feeds *) 3527 + module GetSuggestedStarterPacks : sig 3528 + (** Get a list of suggested starterpacks *) 3592 3529 3593 3530 (** Query/procedure parameters. *) 3594 3531 type params = { ··· 3600 3537 3601 3538 3602 3539 type output = { 3603 - feeds : Jsont.json list; 3540 + starter_packs : Jsont.json list; 3604 3541 } 3605 3542 3606 3543 (** Jsont codec for {!type:output}. *) ··· 3628 3565 val output_jsont : output Jsont.t 3629 3566 3630 3567 end 3631 - module GetConfig : sig 3568 + module GetSuggestedFeeds : sig 3569 + (** Get a list of suggested feeds *) 3632 3570 3633 - type live_now_config = { 3634 - did : string; 3635 - domains : string list; 3571 + (** Query/procedure parameters. *) 3572 + type params = { 3573 + limit : int option; 3636 3574 } 3637 3575 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. *) 3576 + (** Jsont codec for {!type:params}. *) 3577 + val params_jsont : params Jsont.t 3642 3578 3643 3579 3644 3580 type output = { 3645 - check_email_confirmed : bool option; 3646 - live_now : live_now_config list option; 3581 + feeds : Jsont.json list; 3647 3582 } 3648 3583 3649 3584 (** Jsont codec for {!type:output}. *) 3650 3585 val output_jsont : output Jsont.t 3651 3586 3652 3587 end 3653 - module GetSuggestedStarterPacks : sig 3654 - (** Get a list of suggested starterpacks *) 3588 + module GetPopularFeedGenerators : sig 3589 + (** An unspecced view of globally popular feed generators. *) 3655 3590 3656 3591 (** Query/procedure parameters. *) 3657 3592 type params = { 3593 + cursor : string option; 3658 3594 limit : int option; 3595 + query : string option; 3659 3596 } 3660 3597 3661 3598 (** Jsont codec for {!type:params}. *) ··· 3663 3600 3664 3601 3665 3602 type output = { 3666 - starter_packs : Jsont.json list; 3603 + cursor : string option; 3604 + feeds : Jsont.json list; 3667 3605 } 3668 3606 3669 3607 (** Jsont codec for {!type:output}. *) 3670 3608 val output_jsont : output Jsont.t 3671 3609 3672 3610 end 3673 - module GetSuggestedUsers : sig 3674 - (** Get a list of suggested users *) 3611 + module GetOnboardingSuggestedStarterPacksSkeleton : sig 3612 + (** Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks *) 3675 3613 3676 3614 (** Query/procedure parameters. *) 3677 3615 type params = { 3678 - category : string option; (** Category of users to get suggestions for. *) 3679 3616 limit : int option; 3617 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3680 3618 } 3681 3619 3682 3620 (** Jsont codec for {!type:params}. *) ··· 3684 3622 3685 3623 3686 3624 type output = { 3687 - actors : Jsont.json list; 3688 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3625 + starter_packs : string list; 3689 3626 } 3690 3627 3691 3628 (** Jsont codec for {!type:output}. *) 3692 3629 val output_jsont : output Jsont.t 3693 3630 3694 3631 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 *) 3632 + module GetOnboardingSuggestedStarterPacks : sig 3633 + (** Get a list of suggested starterpacks for onboarding *) 3697 3634 3698 3635 (** Query/procedure parameters. *) 3699 3636 type params = { 3700 3637 limit : int option; 3701 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3702 3638 } 3703 3639 3704 3640 (** Jsont codec for {!type:params}. *) ··· 3706 3642 3707 3643 3708 3644 type output = { 3709 - starter_packs : string list; 3645 + starter_packs : Jsont.json list; 3710 3646 } 3711 3647 3712 3648 (** Jsont codec for {!type:output}. *) 3713 3649 val output_jsont : output Jsont.t 3714 3650 3715 3651 end 3716 - module Defs : sig 3652 + module GetConfig : sig 3717 3653 3718 - type trending_topic = { 3719 - description : string option; 3720 - display_name : string option; 3721 - link : string; 3722 - topic : string; 3654 + type live_now_config = { 3655 + did : string; 3656 + domains : string list; 3723 3657 } 3724 3658 3725 - (** Jsont codec for {!type:trending_topic}. *) 3726 - val trending_topic_jsont : trending_topic Jsont.t 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 + } 3727 3669 3670 + (** Jsont codec for {!type:output}. *) 3671 + val output_jsont : output Jsont.t 3728 3672 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; 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. *) 3738 3686 } 3739 3687 3740 - (** Jsont codec for {!type:trend_view}. *) 3741 - val trend_view_jsont : trend_view Jsont.t 3688 + (** Jsont codec for {!type:age_assurance_event}. *) 3689 + val age_assurance_event_jsont : age_assurance_event Jsont.t 3742 3690 3691 + (** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. *) 3743 3692 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; 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. *) 3751 3696 } 3752 3697 3753 - (** Jsont codec for {!type:thread_item_post}. *) 3754 - val thread_item_post_jsont : thread_item_post Jsont.t 3698 + (** Jsont codec for {!type:age_assurance_state}. *) 3699 + val age_assurance_state_jsont : age_assurance_state Jsont.t 3755 3700 3756 3701 3757 - type thread_item_not_found = unit 3702 + type skeleton_search_actor = { 3703 + did : string; 3704 + } 3758 3705 3759 - (** Jsont codec for {!type:thread_item_not_found}. *) 3760 - val thread_item_not_found_jsont : thread_item_not_found Jsont.t 3706 + (** Jsont codec for {!type:skeleton_search_actor}. *) 3707 + val skeleton_search_actor_jsont : skeleton_search_actor Jsont.t 3761 3708 3762 3709 3763 - type thread_item_no_unauthenticated = unit 3710 + type skeleton_search_post = { 3711 + uri : string; 3712 + } 3764 3713 3765 - (** Jsont codec for {!type:thread_item_no_unauthenticated}. *) 3766 - val thread_item_no_unauthenticated_jsont : thread_item_no_unauthenticated Jsont.t 3714 + (** Jsont codec for {!type:skeleton_search_post}. *) 3715 + val skeleton_search_post_jsont : skeleton_search_post Jsont.t 3767 3716 3768 3717 3769 - type thread_item_blocked = { 3770 - author : Jsont.json; 3718 + type skeleton_search_starter_pack = { 3719 + uri : string; 3771 3720 } 3772 3721 3773 - (** Jsont codec for {!type:thread_item_blocked}. *) 3774 - val thread_item_blocked_jsont : thread_item_blocked Jsont.t 3722 + (** Jsont codec for {!type:skeleton_search_starter_pack}. *) 3723 + val skeleton_search_starter_pack_jsont : skeleton_search_starter_pack Jsont.t 3775 3724 3776 3725 3777 3726 type skeleton_trend = { ··· 3789 3738 val skeleton_trend_jsont : skeleton_trend Jsont.t 3790 3739 3791 3740 3792 - type skeleton_search_starter_pack = { 3793 - uri : string; 3741 + type thread_item_blocked = { 3742 + author : Jsont.json; 3794 3743 } 3795 3744 3796 - (** Jsont codec for {!type:skeleton_search_starter_pack}. *) 3797 - val skeleton_search_starter_pack_jsont : skeleton_search_starter_pack Jsont.t 3745 + (** Jsont codec for {!type:thread_item_blocked}. *) 3746 + val thread_item_blocked_jsont : thread_item_blocked Jsont.t 3798 3747 3799 3748 3800 - type skeleton_search_post = { 3801 - uri : string; 3802 - } 3749 + type thread_item_no_unauthenticated = unit 3803 3750 3804 - (** Jsont codec for {!type:skeleton_search_post}. *) 3805 - val skeleton_search_post_jsont : skeleton_search_post Jsont.t 3751 + (** Jsont codec for {!type:thread_item_no_unauthenticated}. *) 3752 + val thread_item_no_unauthenticated_jsont : thread_item_no_unauthenticated Jsont.t 3806 3753 3807 3754 3808 - type skeleton_search_actor = { 3809 - did : string; 3810 - } 3755 + type thread_item_not_found = unit 3811 3756 3812 - (** Jsont codec for {!type:skeleton_search_actor}. *) 3813 - val skeleton_search_actor_jsont : skeleton_search_actor Jsont.t 3757 + (** Jsont codec for {!type:thread_item_not_found}. *) 3758 + val thread_item_not_found_jsont : thread_item_not_found Jsont.t 3814 3759 3815 - (** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. *) 3816 3760 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. *) 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; 3820 3768 } 3821 3769 3822 - (** Jsont codec for {!type:age_assurance_state}. *) 3823 - val age_assurance_state_jsont : age_assurance_state Jsont.t 3770 + (** Jsont codec for {!type:thread_item_post}. *) 3771 + val thread_item_post_jsont : thread_item_post Jsont.t 3824 3772 3825 - (** Object used to store age assurance data in stash. *) 3826 3773 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. *) 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; 3836 3783 } 3837 3784 3838 - (** Jsont codec for {!type:age_assurance_event}. *) 3839 - val age_assurance_event_jsont : age_assurance_event Jsont.t 3785 + (** Jsont codec for {!type:trend_view}. *) 3786 + val trend_view_jsont : trend_view Jsont.t 3840 3787 3841 - end 3842 - module GetTaggedSuggestions : sig 3843 3788 3844 - type suggestion = { 3845 - subject : string; 3846 - subject_type : string; 3847 - tag : string; 3789 + type trending_topic = { 3790 + description : string option; 3791 + display_name : string option; 3792 + link : string; 3793 + topic : string; 3848 3794 } 3849 3795 3850 - (** Jsont codec for {!type:suggestion}. *) 3851 - val suggestion_jsont : suggestion Jsont.t 3796 + (** Jsont codec for {!type:trending_topic}. *) 3797 + val trending_topic_jsont : trending_topic Jsont.t 3852 3798 3853 - (** Get a list of suggestions (feeds and users) tagged with categories *) 3799 + end 3800 + module SearchStarterPacksSkeleton : sig 3801 + (** Backend Starter Pack search, returns only skeleton. *) 3854 3802 3855 3803 (** Query/procedure parameters. *) 3856 - type params = unit 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 + } 3857 3810 3858 3811 (** Jsont codec for {!type:params}. *) 3859 3812 val params_jsont : params Jsont.t 3860 3813 3861 3814 3862 3815 type output = { 3863 - suggestions : suggestion list; 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; 3864 3819 } 3865 3820 3866 3821 (** Jsont codec for {!type:output}. *) ··· 3901 3856 val output_jsont : output Jsont.t 3902 3857 3903 3858 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. *) 3859 + module SearchActorsSkeleton : sig 3860 + (** Backend Actors (profile) search, returns only skeleton. *) 3916 3861 3917 3862 (** Query/procedure parameters. *) 3918 3863 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. *) 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. *) 3924 3869 } 3925 3870 3926 3871 (** Jsont codec for {!type:params}. *) ··· 3928 3873 3929 3874 3930 3875 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; 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. *) 3934 3879 } 3935 3880 3936 3881 (** Jsont codec for {!type:output}. *) 3937 3882 val output_jsont : output Jsont.t 3938 3883 3939 3884 end 3940 - module GetTrendingTopics : sig 3941 - (** Get a list of trending topics *) 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. *) 3942 3887 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. *) 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. *) 3947 3893 } 3948 3894 3949 - (** Jsont codec for {!type:params}. *) 3950 - val params_jsont : params Jsont.t 3895 + (** Jsont codec for {!type:input}. *) 3896 + val input_jsont : input Jsont.t 3951 3897 3952 3898 3953 - type output = { 3954 - suggested : Defs.trending_topic list; 3955 - topics : Defs.trending_topic list; 3956 - } 3899 + type output = Defs.age_assurance_state 3957 3900 3958 3901 (** Jsont codec for {!type:output}. *) 3959 3902 val output_jsont : output Jsont.t ··· 3980 3923 val output_jsont : output Jsont.t 3981 3924 3982 3925 end 3983 - module GetPostThreadOtherV2 : sig 3926 + module GetTrends : sig 3927 + (** Get the current trends on the network *) 3984 3928 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; 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; 3989 3940 } 3990 3941 3991 - (** Jsont codec for {!type:thread_item}. *) 3992 - val thread_item_jsont : thread_item Jsont.t 3942 + (** Jsont codec for {!type:output}. *) 3943 + val output_jsont : output Jsont.t 3993 3944 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. *) 3945 + end 3946 + module GetTrendingTopics : sig 3947 + (** Get a list of trending topics *) 3995 3948 3996 3949 (** Query/procedure parameters. *) 3997 3950 type params = { 3998 - anchor : string; (** Reference (AT-URI) to post record. This is the anchor post. *) 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. *) 3999 3953 } 4000 3954 4001 3955 (** Jsont codec for {!type:params}. *) ··· 4003 3957 4004 3958 4005 3959 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. *) 3960 + suggested : Defs.trending_topic list; 3961 + topics : Defs.trending_topic list; 4007 3962 } 4008 3963 4009 3964 (** Jsont codec for {!type:output}. *) 4010 3965 val output_jsont : output Jsont.t 4011 3966 4012 3967 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. *) 3968 + module GetSuggestionsSkeleton : sig 3969 + (** Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions *) 4015 3970 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. *) 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. *) 4021 3977 } 4022 3978 4023 - (** Jsont codec for {!type:input}. *) 4024 - val input_jsont : input Jsont.t 3979 + (** Jsont codec for {!type:params}. *) 3980 + val params_jsont : params Jsont.t 4025 3981 4026 3982 4027 - type output = Defs.age_assurance_state 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 + } 4028 3989 4029 3990 (** Jsont codec for {!type:output}. *) 4030 3991 val output_jsont : output Jsont.t 4031 3992 4032 3993 end 4033 - module SearchStarterPacksSkeleton : sig 4034 - (** Backend Starter Pack search, returns only skeleton. *) 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. *) 4035 4006 4036 4007 (** Query/procedure parameters. *) 4037 4008 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). *) 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. *) 4042 4014 } 4043 4015 4044 4016 (** Jsont codec for {!type:params}. *) ··· 4046 4018 4047 4019 4048 4020 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; 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; 4052 4024 } 4053 4025 4054 4026 (** Jsont codec for {!type:output}. *) 4055 4027 val output_jsont : output Jsont.t 4056 4028 4057 4029 end 4058 - module SearchActorsSkeleton : sig 4059 - (** Backend Actors (profile) search, returns only skeleton. *) 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. *) 4060 4042 4061 4043 (** Query/procedure parameters. *) 4062 4044 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. *) 4045 + anchor : string; (** Reference (AT-URI) to post record. This is the anchor post. *) 4068 4046 } 4069 4047 4070 4048 (** Jsont codec for {!type:params}. *) ··· 4072 4050 4073 4051 4074 4052 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. *) 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. *) 4078 4054 } 4079 4055 4080 4056 (** Jsont codec for {!type:output}. *) ··· 4091 4067 val output_jsont : output Jsont.t 4092 4068 4093 4069 end 4094 - module GetSuggestionsSkeleton : sig 4095 - (** Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions *) 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 + } 4096 4079 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. *) 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. *) 4103 4089 } 4104 4090 4105 - (** Jsont codec for {!type:params}. *) 4106 - val params_jsont : params Jsont.t 4091 + (** Jsont codec for {!type:bookmark}. *) 4092 + val bookmark_jsont : bookmark Jsont.t 4107 4093 4108 4094 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. *) 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. *) 4114 4099 } 4115 4100 4116 - (** Jsont codec for {!type:output}. *) 4117 - val output_jsont : output Jsont.t 4101 + (** Jsont codec for {!type:bookmark_view}. *) 4102 + val bookmark_view_jsont : bookmark_view Jsont.t 4118 4103 4119 4104 end 4120 - module GetTrends : sig 4121 - (** Get the current trends on the network *) 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. *) 4122 4120 4123 4121 (** Query/procedure parameters. *) 4124 4122 type params = { 4123 + cursor : string option; 4125 4124 limit : int option; 4126 4125 } 4127 4126 ··· 4130 4129 4131 4130 4132 4131 type output = { 4133 - trends : Defs.trend_view list; 4132 + bookmarks : Defs.bookmark_view list; 4133 + cursor : string option; 4134 4134 } 4135 4135 4136 4136 (** Jsont codec for {!type:output}. *)
+55 -55
lexicons/standard-site/atp_lexicon_standard_site.ml
··· 36 36 end 37 37 module Site = struct 38 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 39 94 module Graph = struct 40 95 module Subscription = struct 41 96 type main = { ··· 83 138 |> Jsont.Object.opt_mem "updatedAt" Jsont.string ~enc:(fun r -> r.updated_at) 84 139 |> Jsont.Object.finish 85 140 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 141 end 142 142 module Publication = struct 143 143 type preferences = {
+39 -39
lexicons/standard-site/atp_lexicon_standard_site.mli
··· 30 30 end 31 31 module Site : sig 32 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 33 72 module Graph : sig 34 73 module Subscription : sig 35 74 (** Record declaring a subscription to a publication. *) ··· 63 102 (** Jsont codec for {!type:main}. *) 64 103 val main_jsont : main Jsont.t 65 104 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 105 end 106 106 module Publication : sig 107 107 (** Platform-specific preferences for the publication, including discovery and visibility settings. *)
+865 -865
lexicons/tangled/atp_lexicon_tangled.ml
··· 15 15 16 16 module Sh = struct 17 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 18 module String = struct 166 19 type main = { 167 20 contents : string; ··· 181 34 |> Jsont.Object.finish 182 35 183 36 end 184 - module Feed = struct 185 - module Star = struct 37 + module Spindle = struct 186 38 type main = { 187 39 created_at : string; 188 - subject : string; 189 40 } 190 41 191 42 let main_jsont = 192 43 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") 44 + (fun _typ created_at -> { created_at }) 45 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.spindle" ~enc:(fun _ -> "sh.tangled.spindle") 195 46 |> 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 47 |> Jsont.Object.finish 198 48 199 - end 200 - module Reaction = struct 49 + module Member = struct 201 50 type main = { 202 51 created_at : string; 203 - reaction : string; 52 + instance : string; 204 53 subject : string; 205 54 } 206 55 207 56 let main_jsont = 208 57 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") 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") 211 60 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 212 - |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 61 + |> Jsont.Object.mem "instance" Jsont.string ~enc:(fun r -> r.instance) 213 62 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 214 63 |> Jsont.Object.finish 215 64 ··· 243 92 |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 244 93 |> Jsont.Object.finish 245 94 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; 95 + module Tree = struct 96 + type last_commit = { 97 + hash : string; 98 + message : string; 99 + when_ : string; 271 100 } 272 101 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) 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_) 279 109 |> Jsont.Object.finish 280 110 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 111 type readme = { 318 112 contents : string; 319 113 filename : string; ··· 325 119 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#readme" ~enc:(fun _ -> "sh.tangled.repo.tree#readme") 326 120 |> Jsont.Object.mem "contents" Jsont.string ~enc:(fun r -> r.contents) 327 121 |> 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 122 |> Jsont.Object.finish 344 123 345 124 type tree_entry = { ··· 400 179 |> Jsont.Object.finish 401 180 402 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 403 208 module SetDefaultBranch = struct 404 209 type input = { 405 210 default_branch : string; ··· 415 220 |> Jsont.Object.finish 416 221 417 222 end 418 - module Compare = struct 419 - type params = { 223 + module RemoveSecret = struct 224 + type input = { 225 + key : string; 420 226 repo : string; 421 - rev1 : string; 422 - rev2 : string; 423 227 } 424 228 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) 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) 438 375 |> Jsont.Object.finish 439 376 440 - type output = unit 441 - let output_jsont = Jsont.ignore 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 442 393 443 394 end 444 395 module Merge = struct ··· 468 419 |> Jsont.Object.finish 469 420 470 421 end 471 - module Tags = struct 422 + module Log = struct 472 423 type params = { 473 424 cursor : string option; 474 425 limit : int option; 426 + path : string option; 427 + ref_ : string; 475 428 repo : string; 476 429 } 477 430 478 431 let params_jsont = 479 432 Jsont.Object.map ~kind:"Params" 480 - (fun cursor limit repo -> { 433 + (fun cursor limit path ref_ repo -> { 481 434 cursor; 482 435 limit; 436 + path; 437 + ref_; 483 438 repo; 484 439 }) 485 440 |> Jsont.Object.opt_mem "cursor" Jsont.string 486 441 ~enc:(fun r -> r.cursor) 487 442 |> Jsont.Object.opt_mem "limit" Jsont.int 488 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_) 489 448 |> Jsont.Object.mem "repo" Jsont.string 490 449 ~enc:(fun r -> r.repo) 491 450 |> Jsont.Object.finish ··· 494 453 let output_jsont = Jsont.ignore 495 454 496 455 end 497 - module Collaborator = struct 498 - type main = { 456 + module ListSecrets = struct 457 + type secret = { 499 458 created_at : string; 459 + created_by : string; 460 + key : string; 500 461 repo : string; 501 - subject : string; 502 462 } 503 463 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") 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") 508 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) 509 471 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 510 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 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) 511 496 |> Jsont.Object.finish 512 497 513 498 end 514 - module Branches = struct 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 + 515 521 type params = { 516 - cursor : string option; 517 - limit : int option; 522 + ref_ : string option; 518 523 repo : string; 519 524 } 520 525 521 526 let params_jsont = 522 527 Jsont.Object.map ~kind:"Params" 523 - (fun cursor limit repo -> { 524 - cursor; 525 - limit; 528 + (fun ref_ repo -> { 529 + ref_; 526 530 repo; 527 531 }) 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.opt_mem "ref" Jsont.string 533 + ~enc:(fun r -> r.ref_) 532 534 |> Jsont.Object.mem "repo" Jsont.string 533 535 ~enc:(fun r -> r.repo) 534 536 |> Jsont.Object.finish 535 537 536 - type output = unit 537 - let output_jsont = Jsont.ignore 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 538 657 539 658 end 540 659 module GetDefaultBranch = struct ··· 588 707 |> Jsont.Object.finish 589 708 590 709 end 591 - module Create = struct 710 + module ForkSync = struct 592 711 type input = { 593 - default_branch : string option; 594 - rkey : string; 595 - source : string option; 712 + branch : string; 713 + did : string; 714 + name : string; 715 + source : string; 596 716 } 597 717 598 718 let input_jsont = 599 719 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) 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) 605 726 |> Jsont.Object.finish 606 727 607 728 end ··· 637 758 |> Jsont.Object.finish 638 759 639 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 640 901 module Branch = struct 641 902 type signature = { 642 903 email : string; ··· 694 955 |> Jsont.Object.finish 695 956 696 957 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; 958 + module Blob = struct 959 + type signature = { 960 + email : string; 961 + name : string; 962 + when_ : string; 719 963 } 720 964 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) 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_) 740 972 |> Jsont.Object.finish 741 973 742 - type output = unit 743 - let output_jsont = Jsont.ignore 744 - 745 - end 746 - module Blob = struct 747 974 type submodule = { 748 975 branch : string option; 749 976 name : string; ··· 757 984 |> Jsont.Object.opt_mem "branch" Jsont.string ~enc:(fun r -> r.branch) 758 985 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 759 986 |> 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 987 |> Jsont.Object.finish 776 988 777 989 type last_commit = { ··· 846 1058 |> Jsont.Object.finish 847 1059 848 1060 end 849 - module RemoveSecret = struct 850 - type input = { 851 - key : string; 1061 + module Artifact = struct 1062 + type main = { 1063 + artifact : Atp.Blob_ref.t; 1064 + created_at : string; 1065 + name : string; 852 1066 repo : string; 1067 + tag : string; 853 1068 } 854 1069 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) 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) 860 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) 861 1079 |> Jsont.Object.finish 862 1080 863 1081 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 - 1082 + module Archive = struct 886 1083 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 = { 1084 + format : string option; 1085 + prefix : string option; 923 1086 ref_ : string; 924 1087 repo : string; 925 1088 } 926 1089 927 1090 let params_jsont = 928 1091 Jsont.Object.map ~kind:"Params" 929 - (fun ref_ repo -> { 1092 + (fun format prefix ref_ repo -> { 1093 + format; 1094 + prefix; 930 1095 ref_; 931 1096 repo; 932 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) 933 1102 |> Jsont.Object.mem "ref" Jsont.string 934 1103 ~enc:(fun r -> r.ref_) 935 1104 |> Jsont.Object.mem "repo" Jsont.string ··· 940 1109 let output_jsont = Jsont.ignore 941 1110 942 1111 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 1112 module AddSecret = struct 963 1113 type input = { 964 1114 key : string; ··· 976 1126 |> Jsont.Object.finish 977 1127 978 1128 end 979 - module Delete = struct 980 - type input = { 981 - did : string; 1129 + end 1130 + module PublicKey = struct 1131 + type main = { 1132 + created_at : string; 1133 + key : string; 982 1134 name : string; 983 - rkey : string; 984 1135 } 985 1136 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) 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) 991 1143 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 992 - |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 993 1144 |> Jsont.Object.finish 994 1145 995 - end 996 - module ListSecrets = struct 997 - type secret = { 998 - created_at : string; 999 - created_by : string; 1000 - key : string; 1001 - repo : string; 1146 + end 1147 + module Pipeline = struct 1148 + type clone_opts = { 1149 + depth : int; 1150 + skip : bool; 1151 + submodules : bool; 1002 1152 } 1003 1153 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) 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) 1012 1161 |> Jsont.Object.finish 1013 1162 1014 - type params = { 1015 - repo : string; 1163 + type pair = { 1164 + key : string; 1165 + value : string; 1016 1166 } 1017 1167 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) 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) 1025 1174 |> Jsont.Object.finish 1026 1175 1027 - type output = { 1028 - secrets : secret list; 1176 + type pull_request_trigger_data = { 1177 + action : string; 1178 + source_branch : string; 1179 + source_sha : string; 1180 + target_branch : string; 1029 1181 } 1030 1182 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) 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) 1036 1191 |> Jsont.Object.finish 1037 1192 1038 - end 1039 - module Archive = struct 1040 - type params = { 1041 - format : string option; 1042 - prefix : string option; 1193 + type push_trigger_data = { 1194 + new_sha : string; 1195 + old_sha : string; 1043 1196 ref_ : string; 1044 - repo : string; 1045 1197 } 1046 1198 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) 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_) 1063 1206 |> Jsont.Object.finish 1064 1207 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; 1208 + type trigger_repo = { 1209 + default_branch : string; 1210 + did : string; 1211 + knot : string; 1073 1212 repo : string; 1074 1213 } 1075 1214 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) 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) 1082 1222 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1083 1223 |> Jsont.Object.finish 1084 1224 1085 - type output = { 1086 - error : string option; 1087 - ref_ : string option; 1088 - success : bool; 1225 + type manual_trigger_data = { 1226 + inputs : pair list option; 1089 1227 } 1090 1228 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) 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) 1098 1234 |> Jsont.Object.finish 1099 1235 1100 - end 1101 - module Pull = struct 1102 - type target = { 1103 - branch : string; 1104 - repo : string; 1236 + type workflow = { 1237 + clone : clone_opts; 1238 + engine : string; 1239 + name : string; 1240 + raw : string; 1105 1241 } 1106 1242 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) 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) 1113 1251 |> Jsont.Object.finish 1114 1252 1115 - type source = { 1116 - branch : string; 1117 - repo : string option; 1118 - sha : string; 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; 1119 1259 } 1120 1260 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) 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) 1128 1270 |> Jsont.Object.finish 1129 1271 1130 1272 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; 1273 + trigger_metadata : trigger_metadata; 1274 + workflows : workflow list; 1140 1275 } 1141 1276 1142 1277 let main_jsont = 1143 1278 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) 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) 1155 1283 |> Jsont.Object.finish 1156 1284 1157 - module Comment = struct 1285 + module Status = struct 1158 1286 type main = { 1159 - body : string; 1160 1287 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; 1288 + error : string option; 1289 + exit_code : int option; 1290 + pipeline : string; 1181 1291 status : string; 1292 + workflow : string; 1182 1293 } 1183 1294 1184 1295 let main_jsont = 1185 1296 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) 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) 1189 1303 |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1304 + |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 1190 1305 |> Jsont.Object.finish 1191 1306 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 1307 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; 1308 + end 1309 + module Owner = struct 1310 + type output = { 1311 + owner : string; 1217 1312 } 1218 1313 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) 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) 1229 1319 |> Jsont.Object.finish 1230 1320 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; 1321 + end 1322 + module Label = struct 1323 + module Op = struct 1324 + type operand = { 1325 + key : string; 1326 + value : string; 1239 1327 } 1240 1328 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) 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) 1251 1335 |> Jsont.Object.finish 1252 1336 1253 - end 1254 - module State = struct 1255 1337 type main = { 1256 - issue : string; 1257 - state : string; 1338 + add : operand list; 1339 + delete : operand list; 1340 + performed_at : string; 1341 + subject : string; 1258 1342 } 1259 1343 1260 1344 let main_jsont = 1261 1345 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) 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) 1266 1352 |> Jsont.Object.finish 1267 1353 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 1354 end 1280 - end 1281 - module Label = struct 1282 1355 module Definition = struct 1283 1356 type value_type = { 1284 1357 enum : string list option; ··· 1317 1390 |> Jsont.Object.finish 1318 1391 1319 1392 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 1393 end 1353 - module Graph = struct 1354 - module Follow = struct 1394 + module Knot = struct 1355 1395 type main = { 1356 1396 created_at : string; 1357 - subject : string; 1358 1397 } 1359 1398 1360 1399 let main_jsont = 1361 1400 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") 1401 + (fun _typ created_at -> { created_at }) 1402 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot" ~enc:(fun _ -> "sh.tangled.knot") 1364 1403 |> 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 1404 |> Jsont.Object.finish 1367 1405 1368 - end 1369 - end 1370 - module Knot = struct 1371 - type main = { 1372 - created_at : string; 1406 + module Version = struct 1407 + type output = { 1408 + version : string; 1373 1409 } 1374 1410 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) 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) 1380 1416 |> Jsont.Object.finish 1381 1417 1418 + end 1382 1419 module Member = struct 1383 1420 type main = { 1384 1421 created_at : string; ··· 1443 1480 |> Jsont.Object.finish 1444 1481 1445 1482 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 1483 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 1484 + module Graph = struct 1485 + module Follow = struct 1474 1486 type main = { 1475 1487 created_at : string; 1476 - key : string; 1477 - name : string; 1488 + subject : string; 1478 1489 } 1479 1490 1480 1491 let main_jsont = 1481 1492 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") 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") 1484 1495 |> 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) 1496 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1487 1497 |> Jsont.Object.finish 1488 1498 1499 + end 1489 1500 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; 1501 + module Git = struct 1502 + module RefUpdate = struct 1503 + type individual_email_commit_count = { 1504 + count : int; 1505 + email : string; 1512 1506 } 1513 1507 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_) 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) 1521 1514 |> Jsont.Object.finish 1522 1515 1523 - type pull_request_trigger_data = { 1524 - action : string; 1525 - source_branch : string; 1526 - source_sha : string; 1527 - target_branch : string; 1516 + type individual_language_size = { 1517 + lang : string; 1518 + size : int; 1528 1519 } 1529 1520 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) 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) 1538 1527 |> Jsont.Object.finish 1539 1528 1540 - type pair = { 1541 - key : string; 1542 - value : string; 1529 + type commit_count_breakdown = { 1530 + by_email : individual_email_commit_count list option; 1543 1531 } 1544 1532 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) 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) 1551 1538 |> Jsont.Object.finish 1552 1539 1553 - type clone_opts = { 1554 - depth : int; 1555 - skip : bool; 1556 - submodules : bool; 1540 + type lang_breakdown = { 1541 + inputs : individual_language_size list option; 1557 1542 } 1558 1543 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) 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) 1566 1549 |> Jsont.Object.finish 1567 1550 1568 - type workflow = { 1569 - clone : clone_opts; 1570 - engine : string; 1571 - name : string; 1572 - raw : string; 1551 + type meta = { 1552 + commit_count : commit_count_breakdown; 1553 + is_default_ref : bool; 1554 + lang_breakdown : lang_breakdown option; 1573 1555 } 1574 1556 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) 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) 1583 1564 |> Jsont.Object.finish 1584 1565 1585 - type manual_trigger_data = { 1586 - inputs : pair list option; 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; 1587 1574 } 1588 1575 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) 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) 1594 1587 |> Jsont.Object.finish 1595 1588 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; 1589 + end 1590 + end 1591 + module Feed = struct 1592 + module Star = struct 1593 + type main = { 1594 + created_at : string; 1595 + subject : string; 1602 1596 } 1603 1597 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) 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) 1613 1604 |> Jsont.Object.finish 1614 1605 1606 + end 1607 + module Reaction = struct 1615 1608 type main = { 1616 - trigger_metadata : trigger_metadata; 1617 - workflows : workflow list; 1609 + created_at : string; 1610 + reaction : string; 1611 + subject : string; 1618 1612 } 1619 1613 1620 1614 let main_jsont = 1621 1615 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) 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) 1626 1621 |> Jsont.Object.finish 1627 1622 1628 - module Status = struct 1623 + end 1624 + end 1625 + module Actor = struct 1626 + module Profile = struct 1629 1627 type main = { 1630 - created_at : string; 1631 - error : string option; 1632 - exit_code : int option; 1633 - pipeline : string; 1634 - status : string; 1635 - workflow : string; 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; 1636 1635 } 1637 1636 1638 1637 let main_jsont = 1639 1638 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) 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 1648 |> Jsont.Object.finish 1649 1649 1650 1650 end
+552 -552
lexicons/tangled/atp_lexicon_tangled.mli
··· 12 12 13 13 module Sh : sig 14 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 15 28 module Spindle : sig 16 29 17 30 type main = { ··· 34 47 35 48 end 36 49 end 37 - module Git : sig 38 - module RefUpdate : sig 50 + module Repo : sig 39 51 40 - type individual_language_size = { 41 - lang : string; 42 - size : int; 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 *) 43 62 } 44 63 45 - (** Jsont codec for {!type:individual_language_size}. *) 46 - val individual_language_size_jsont : individual_language_size Jsont.t 64 + (** Jsont codec for {!type:main}. *) 65 + val main_jsont : main Jsont.t 47 66 67 + module Tree : sig 48 68 49 - type individual_email_commit_count = { 50 - count : int; 51 - email : string; 69 + type last_commit = { 70 + hash : string; (** Commit hash *) 71 + message : string; (** Commit message *) 72 + when_ : string; (** Commit timestamp *) 52 73 } 53 74 54 - (** Jsont codec for {!type:individual_email_commit_count}. *) 55 - val individual_email_commit_count_jsont : individual_email_commit_count Jsont.t 75 + (** Jsont codec for {!type:last_commit}. *) 76 + val last_commit_jsont : last_commit Jsont.t 56 77 57 78 58 - type lang_breakdown = { 59 - inputs : individual_language_size list option; 79 + type readme = { 80 + contents : string; (** Contents of the readme file *) 81 + filename : string; (** Name of the readme file *) 60 82 } 61 83 62 - (** Jsont codec for {!type:lang_breakdown}. *) 63 - val lang_breakdown_jsont : lang_breakdown Jsont.t 84 + (** Jsont codec for {!type:readme}. *) 85 + val readme_jsont : readme Jsont.t 64 86 65 87 66 - type commit_count_breakdown = { 67 - by_email : individual_email_commit_count list option; 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 *) 68 93 } 69 94 70 - (** Jsont codec for {!type:commit_count_breakdown}. *) 71 - val commit_count_breakdown_jsont : commit_count_breakdown Jsont.t 95 + (** Jsont codec for {!type:tree_entry}. *) 96 + val tree_entry_jsont : tree_entry Jsont.t 72 97 73 98 74 - type meta = { 75 - commit_count : commit_count_breakdown; 76 - is_default_ref : bool; 77 - lang_breakdown : lang_breakdown option; 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' *) 78 104 } 79 105 80 - (** Jsont codec for {!type:meta}. *) 81 - val meta_jsont : meta Jsont.t 106 + (** Jsont codec for {!type:params}. *) 107 + val params_jsont : params Jsont.t 82 108 83 - (** An update to a git repository, emitted by knots. *) 84 109 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 *) 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 *) 93 116 } 94 117 95 - (** Jsont codec for {!type:main}. *) 96 - val main_jsont : main Jsont.t 118 + (** Jsont codec for {!type:output}. *) 119 + val output_jsont : output Jsont.t 97 120 98 121 end 99 - end 100 - module Actor : sig 101 - module Profile : sig 102 - (** A declaration of a Tangled account profile. *) 122 + module Tags : sig 103 123 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; 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' *) 112 129 } 113 130 114 - (** Jsont codec for {!type:main}. *) 115 - val main_jsont : main Jsont.t 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 116 137 117 138 end 118 - end 119 - module String : sig 139 + module SetDefaultBranch : sig 140 + (** Set the default branch for a repository *) 141 + 120 142 121 - type main = { 122 - contents : string; 123 - created_at : string; 124 - description : string; 125 - filename : string; 143 + type input = { 144 + default_branch : string; 145 + repo : string; 126 146 } 127 147 128 - (** Jsont codec for {!type:main}. *) 129 - val main_jsont : main Jsont.t 148 + (** Jsont codec for {!type:input}. *) 149 + val input_jsont : input Jsont.t 130 150 131 - end 132 - module Feed : sig 133 - module Star : sig 151 + end 152 + module RemoveSecret : sig 153 + (** Remove a CI secret *) 134 154 135 - type main = { 136 - created_at : string; 137 - subject : string; 155 + 156 + type input = { 157 + key : string; 158 + repo : string; 138 159 } 139 160 140 - (** Jsont codec for {!type:main}. *) 141 - val main_jsont : main Jsont.t 161 + (** Jsont codec for {!type:input}. *) 162 + val input_jsont : input Jsont.t 142 163 143 164 end 144 - module Reaction : sig 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 + 145 185 146 186 type main = { 187 + body : string option; 147 188 created_at : string; 148 - reaction : string; 149 - subject : 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; 150 196 } 151 197 152 198 (** Jsont codec for {!type:main}. *) 153 199 val main_jsont : main Jsont.t 154 200 155 - end 156 - end 157 - module Repo : sig 201 + module Status : sig 158 202 159 203 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 *) 204 + pull : string; 205 + status : string; (** status of the pull request *) 169 206 } 170 207 171 208 (** Jsont codec for {!type:main}. *) 172 209 val main_jsont : main Jsont.t 173 210 174 - module Artifact : sig 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 175 234 176 235 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) *) 236 + body : string; 237 + created_at : string; 238 + mentions : string list option; 239 + pull : string; 240 + references : string list option; 182 241 } 183 242 184 243 (** Jsont codec for {!type:main}. *) 185 244 val main_jsont : main Jsont.t 186 245 246 + end 187 247 end 188 248 module MergeCheck : sig 189 249 ··· 220 280 val output_jsont : output Jsont.t 221 281 222 282 end 223 - module Tree : sig 283 + module Merge : sig 284 + (** Merge a patch into a repository branch *) 285 + 224 286 225 - type readme = { 226 - contents : string; (** Contents of the readme file *) 227 - filename : string; (** Name of the readme file *) 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 *) 228 296 } 229 297 230 - (** Jsont codec for {!type:readme}. *) 231 - val readme_jsont : readme Jsont.t 298 + (** Jsont codec for {!type:input}. *) 299 + val input_jsont : input Jsont.t 232 300 301 + end 302 + module Log : sig 233 303 234 - type last_commit = { 235 - hash : string; (** Commit hash *) 236 - message : string; (** Commit message *) 237 - when_ : string; (** Commit timestamp *) 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' *) 238 311 } 239 312 240 - (** Jsont codec for {!type:last_commit}. *) 241 - val last_commit_jsont : last_commit Jsont.t 313 + (** Jsont codec for {!type:params}. *) 314 + val params_jsont : params Jsont.t 242 315 243 316 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 *) 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; 249 328 } 250 329 251 - (** Jsont codec for {!type:tree_entry}. *) 252 - val tree_entry_jsont : tree_entry Jsont.t 330 + (** Jsont codec for {!type:secret}. *) 331 + val secret_jsont : secret Jsont.t 253 332 254 333 255 334 (** Query/procedure parameters. *) 256 335 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' *) 336 + repo : string; 260 337 } 261 338 262 339 (** Jsont codec for {!type:params}. *) ··· 264 341 265 342 266 343 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 *) 344 + secrets : secret list; 272 345 } 273 346 274 347 (** Jsont codec for {!type:output}. *) 275 348 val output_jsont : output Jsont.t 276 349 277 350 end 278 - module SetDefaultBranch : sig 279 - (** Set the default branch for a repository *) 351 + module Languages : sig 280 352 281 - 282 - type input = { 283 - default_branch : string; 284 - repo : string; 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) *) 285 360 } 286 361 287 - (** Jsont codec for {!type:input}. *) 288 - val input_jsont : input Jsont.t 362 + (** Jsont codec for {!type:language}. *) 363 + val language_jsont : language Jsont.t 289 364 290 - end 291 - module Compare : sig 292 365 293 366 (** Query/procedure parameters. *) 294 367 type params = { 368 + ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 295 369 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 370 } 299 371 300 372 (** Jsont codec for {!type:params}. *) 301 373 val params_jsont : params Jsont.t 302 374 303 - (** Compare output in application/json *) 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 + } 304 382 305 - type output = unit 383 + (** Jsont codec for {!type:output}. *) 306 384 val output_jsont : output Jsont.t 307 385 308 386 end 309 - module Merge : sig 310 - (** Merge a patch into a repository branch *) 311 - 387 + module Issue : sig 312 388 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 *) 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; 322 396 } 323 397 324 - (** Jsont codec for {!type:input}. *) 325 - val input_jsont : input Jsont.t 398 + (** Jsont codec for {!type:main}. *) 399 + val main_jsont : main Jsont.t 326 400 327 - end 328 - module Tags : sig 401 + module State : sig 329 402 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' *) 403 + type main = { 404 + issue : string; 405 + state : string; (** state of the issue *) 335 406 } 336 407 337 - (** Jsont codec for {!type:params}. *) 338 - val params_jsont : params Jsont.t 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 339 416 417 + end 418 + module Closed : sig 419 + (** closed issue *) 340 420 341 - type output = unit 342 - val output_jsont : output Jsont.t 421 + type main = string 422 + val main_jsont : main Jsont.t 343 423 344 - end 345 - module Collaborator : sig 424 + end 425 + end 426 + module Comment : sig 346 427 347 428 type main = { 429 + body : string; 348 430 created_at : string; 349 - repo : string; (** repo to add this user to *) 350 - subject : string; 431 + issue : string; 432 + mentions : string list option; 433 + references : string list option; 434 + reply_to : string option; 351 435 } 352 436 353 437 (** Jsont codec for {!type:main}. *) 354 438 val main_jsont : main Jsont.t 355 439 440 + end 356 441 end 357 - module Branches : sig 442 + module HiddenRef : sig 443 + (** Create a hidden ref in a repository *) 444 + 358 445 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' *) 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 *) 364 450 } 365 451 366 - (** Jsont codec for {!type:params}. *) 367 - val params_jsont : params Jsont.t 452 + (** Jsont codec for {!type:input}. *) 453 + val input_jsont : input Jsont.t 368 454 369 455 370 - type output = unit 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}. *) 371 463 val output_jsont : output Jsont.t 372 464 373 465 end ··· 405 497 val output_jsont : output Jsont.t 406 498 407 499 end 408 - module Create : sig 409 - (** Create a new repository *) 500 + module ForkSync : sig 501 + (** Sync a forked repository with its upstream source *) 410 502 411 503 412 504 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. *) 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 *) 416 509 } 417 510 418 511 (** Jsont codec for {!type:input}. *) ··· 443 536 val output_jsont : output Jsont.t 444 537 445 538 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 - 539 + module Diff : sig 457 540 458 541 (** Query/procedure parameters. *) 459 542 type params = { 460 - name : string; (** Branch name to get information for *) 543 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 461 544 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 462 545 } 463 546 ··· 465 548 val params_jsont : params Jsont.t 466 549 467 550 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}. *) 551 + type output = unit 479 552 val output_jsont : output Jsont.t 480 553 481 554 end ··· 492 565 val input_jsont : input Jsont.t 493 566 494 567 end 495 - module Log : sig 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 496 597 497 598 (** Query/procedure parameters. *) 498 599 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 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) *) 504 603 } 505 604 506 605 (** Jsont codec for {!type:params}. *) 507 606 val params_jsont : params Jsont.t 508 607 608 + (** Compare output in application/json *) 509 609 510 610 type output = unit 511 611 val output_jsont : output Jsont.t 512 612 513 613 end 514 - module Blob : sig 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 515 624 516 - type submodule = { 517 - branch : string option; (** Branch to track in the submodule *) 518 - name : string; (** Submodule name *) 519 - url : string; (** Submodule repository URL *) 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' *) 520 633 } 521 634 522 - (** Jsont codec for {!type:submodule}. *) 523 - val submodule_jsont : submodule Jsont.t 635 + (** Jsont codec for {!type:params}. *) 636 + val params_jsont : params Jsont.t 524 637 638 + 639 + type output = unit 640 + val output_jsont : output Jsont.t 641 + 642 + end 643 + module Branch : sig 525 644 526 645 type signature = { 527 646 email : string; (** Author email *) ··· 533 652 val signature_jsont : signature Jsont.t 534 653 535 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 + 536 701 type last_commit = { 537 702 author : signature option; 538 703 hash : string; (** Commit hash *) ··· 573 738 val output_jsont : output Jsont.t 574 739 575 740 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 - 741 + module Artifact : sig 613 742 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 *) 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) *) 619 749 } 620 750 621 - (** Jsont codec for {!type:output}. *) 622 - val output_jsont : output Jsont.t 751 + (** Jsont codec for {!type:main}. *) 752 + val main_jsont : main Jsont.t 623 753 624 754 end 625 - module Diff : sig 755 + module Archive : sig 626 756 627 757 (** Query/procedure parameters. *) 628 758 type params = { 759 + format : string option; (** Archive format *) 760 + prefix : string option; (** Prefix for files in the archive *) 629 761 ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 630 762 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 631 763 } ··· 633 765 (** Jsont codec for {!type:params}. *) 634 766 val params_jsont : params Jsont.t 635 767 768 + (** Binary archive data *) 636 769 637 770 type output = unit 638 771 val output_jsont : output Jsont.t 639 772 640 773 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 774 module AddSecret : sig 657 775 (** Add a CI secret *) 658 776 ··· 667 785 val input_jsont : input Jsont.t 668 786 669 787 end 670 - module Delete : sig 671 - (** Delete a repository *) 788 + end 789 + module PublicKey : sig 672 790 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; 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 *) 691 795 } 692 796 693 - (** Jsont codec for {!type:secret}. *) 694 - val secret_jsont : secret Jsont.t 797 + (** Jsont codec for {!type:main}. *) 798 + val main_jsont : main Jsont.t 695 799 800 + end 801 + module Pipeline : sig 696 802 697 - (** Query/procedure parameters. *) 698 - type params = { 699 - repo : string; 803 + type clone_opts = { 804 + depth : int; 805 + skip : bool; 806 + submodules : bool; 700 807 } 701 808 702 - (** Jsont codec for {!type:params}. *) 703 - val params_jsont : params Jsont.t 809 + (** Jsont codec for {!type:clone_opts}. *) 810 + val clone_opts_jsont : clone_opts Jsont.t 704 811 705 812 706 - type output = { 707 - secrets : secret list; 813 + type pair = { 814 + key : string; 815 + value : string; 708 816 } 709 817 710 - (** Jsont codec for {!type:output}. *) 711 - val output_jsont : output Jsont.t 818 + (** Jsont codec for {!type:pair}. *) 819 + val pair_jsont : pair Jsont.t 712 820 713 - end 714 - module Archive : sig 715 821 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' *) 822 + type pull_request_trigger_data = { 823 + action : string; 824 + source_branch : string; 825 + source_sha : string; 826 + target_branch : string; 722 827 } 723 828 724 - (** Jsont codec for {!type:params}. *) 725 - val params_jsont : params Jsont.t 829 + (** Jsont codec for {!type:pull_request_trigger_data}. *) 830 + val pull_request_trigger_data_jsont : pull_request_trigger_data Jsont.t 726 831 727 - (** Binary archive data *) 728 832 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 *) 833 + type push_trigger_data = { 834 + new_sha : string; 835 + old_sha : string; 836 + ref_ : string; 741 837 } 742 838 743 - (** Jsont codec for {!type:input}. *) 744 - val input_jsont : input Jsont.t 839 + (** Jsont codec for {!type:push_trigger_data}. *) 840 + val push_trigger_data_jsont : push_trigger_data Jsont.t 745 841 746 842 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 *) 843 + type trigger_repo = { 844 + default_branch : string; 845 + did : string; 846 + knot : string; 847 + repo : string; 751 848 } 752 849 753 - (** Jsont codec for {!type:output}. *) 754 - val output_jsont : output Jsont.t 850 + (** Jsont codec for {!type:trigger_repo}. *) 851 + val trigger_repo_jsont : trigger_repo Jsont.t 755 852 756 - end 757 - module Pull : sig 758 853 759 - type target = { 760 - branch : string; 761 - repo : string; 854 + type manual_trigger_data = { 855 + inputs : pair list option; 762 856 } 763 857 764 - (** Jsont codec for {!type:target}. *) 765 - val target_jsont : target Jsont.t 858 + (** Jsont codec for {!type:manual_trigger_data}. *) 859 + val manual_trigger_data_jsont : manual_trigger_data Jsont.t 766 860 767 861 768 - type source = { 769 - branch : string; 770 - repo : string option; 771 - sha : string; 862 + type workflow = { 863 + clone : clone_opts; 864 + engine : string; 865 + name : string; 866 + raw : string; 772 867 } 773 868 774 - (** Jsont codec for {!type:source}. *) 775 - val source_jsont : source Jsont.t 869 + (** Jsont codec for {!type:workflow}. *) 870 + val workflow_jsont : workflow Jsont.t 776 871 777 872 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; 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; 788 879 } 789 880 790 - (** Jsont codec for {!type:main}. *) 791 - val main_jsont : main Jsont.t 881 + (** Jsont codec for {!type:trigger_metadata}. *) 882 + val trigger_metadata_jsont : trigger_metadata Jsont.t 792 883 793 - module Comment : sig 794 884 795 885 type main = { 796 - body : string; 797 - created_at : string; 798 - mentions : string list option; 799 - pull : string; 800 - references : string list option; 886 + trigger_metadata : trigger_metadata; 887 + workflows : workflow list; 801 888 } 802 889 803 890 (** Jsont codec for {!type:main}. *) 804 891 val main_jsont : main Jsont.t 805 892 806 - end 807 - module Status : sig 893 + module Status : sig 808 894 809 895 type main = { 810 - pull : string; 811 - status : string; (** status of the pull request *) 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 *) 812 902 } 813 903 814 904 (** Jsont codec for {!type:main}. *) 815 905 val main_jsont : main Jsont.t 816 906 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 *) 907 + end 908 + end 909 + module Owner : sig 910 + (** Get the owner of a service *) 833 911 834 - type main = string 835 - val main_jsont : main Jsont.t 836 912 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; 913 + type output = { 914 + owner : string; 849 915 } 850 916 851 - (** Jsont codec for {!type:main}. *) 852 - val main_jsont : main Jsont.t 917 + (** Jsont codec for {!type:output}. *) 918 + val output_jsont : output Jsont.t 853 919 854 - module Comment : sig 920 + end 921 + module Label : sig 922 + module Op : sig 855 923 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; 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. *) 863 927 } 864 928 865 - (** Jsont codec for {!type:main}. *) 866 - val main_jsont : main Jsont.t 929 + (** Jsont codec for {!type:operand}. *) 930 + val operand_jsont : operand Jsont.t 867 931 868 - end 869 - module State : sig 870 932 871 933 type main = { 872 - issue : string; 873 - state : string; (** state of the issue *) 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. *) 874 938 } 875 939 876 940 (** Jsont codec for {!type:main}. *) 877 941 val main_jsont : main Jsont.t 878 942 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 943 end 895 - end 896 - module Label : sig 897 944 module Definition : sig 898 945 899 946 type value_type = { ··· 919 966 val main_jsont : main Jsont.t 920 967 921 968 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 969 end 945 - module Graph : sig 946 - module Follow : sig 970 + module Knot : sig 947 971 948 972 type main = { 949 973 created_at : string; 950 - subject : string; 951 974 } 952 975 953 976 (** Jsont codec for {!type:main}. *) 954 977 val main_jsont : main Jsont.t 955 978 956 - end 957 - end 958 - module Knot : sig 979 + module Version : sig 980 + (** Get the version of a knot *) 981 + 959 982 960 - type main = { 961 - created_at : string; 983 + type output = { 984 + version : string; 962 985 } 963 986 964 - (** Jsont codec for {!type:main}. *) 965 - val main_jsont : main Jsont.t 987 + (** Jsont codec for {!type:output}. *) 988 + val output_jsont : output Jsont.t 966 989 990 + end 967 991 module Member : sig 968 992 969 993 type main = { ··· 1008 1032 val output_jsont : output Jsont.t 1009 1033 1010 1034 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 1035 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 1036 + module Graph : sig 1037 + module Follow : sig 1037 1038 1038 1039 type main = { 1039 - created_at : string; (** key upload timestamp *) 1040 - key : string; (** public key contents *) 1041 - name : string; (** human-readable name for this key *) 1040 + created_at : string; 1041 + subject : string; 1042 1042 } 1043 1043 1044 1044 (** Jsont codec for {!type:main}. *) 1045 1045 val main_jsont : main Jsont.t 1046 1046 1047 + end 1047 1048 end 1048 - module Pipeline : sig 1049 + module Git : sig 1050 + module RefUpdate : sig 1049 1051 1050 - type trigger_repo = { 1051 - default_branch : string; 1052 - did : string; 1053 - knot : string; 1054 - repo : string; 1052 + type individual_email_commit_count = { 1053 + count : int; 1054 + email : string; 1055 1055 } 1056 1056 1057 - (** Jsont codec for {!type:trigger_repo}. *) 1058 - val trigger_repo_jsont : trigger_repo Jsont.t 1057 + (** Jsont codec for {!type:individual_email_commit_count}. *) 1058 + val individual_email_commit_count_jsont : individual_email_commit_count Jsont.t 1059 1059 1060 1060 1061 - type push_trigger_data = { 1062 - new_sha : string; 1063 - old_sha : string; 1064 - ref_ : string; 1061 + type individual_language_size = { 1062 + lang : string; 1063 + size : int; 1065 1064 } 1066 1065 1067 - (** Jsont codec for {!type:push_trigger_data}. *) 1068 - val push_trigger_data_jsont : push_trigger_data Jsont.t 1066 + (** Jsont codec for {!type:individual_language_size}. *) 1067 + val individual_language_size_jsont : individual_language_size Jsont.t 1069 1068 1070 1069 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; 1070 + type commit_count_breakdown = { 1071 + by_email : individual_email_commit_count list option; 1085 1072 } 1086 1073 1087 - (** Jsont codec for {!type:pair}. *) 1088 - val pair_jsont : pair Jsont.t 1074 + (** Jsont codec for {!type:commit_count_breakdown}. *) 1075 + val commit_count_breakdown_jsont : commit_count_breakdown Jsont.t 1089 1076 1090 1077 1091 - type clone_opts = { 1092 - depth : int; 1093 - skip : bool; 1094 - submodules : bool; 1078 + type lang_breakdown = { 1079 + inputs : individual_language_size list option; 1095 1080 } 1096 1081 1097 - (** Jsont codec for {!type:clone_opts}. *) 1098 - val clone_opts_jsont : clone_opts Jsont.t 1082 + (** Jsont codec for {!type:lang_breakdown}. *) 1083 + val lang_breakdown_jsont : lang_breakdown Jsont.t 1099 1084 1100 1085 1101 - type workflow = { 1102 - clone : clone_opts; 1103 - engine : string; 1104 - name : string; 1105 - raw : string; 1086 + type meta = { 1087 + commit_count : commit_count_breakdown; 1088 + is_default_ref : bool; 1089 + lang_breakdown : lang_breakdown option; 1106 1090 } 1107 1091 1108 - (** Jsont codec for {!type:workflow}. *) 1109 - val workflow_jsont : workflow Jsont.t 1092 + (** Jsont codec for {!type:meta}. *) 1093 + val meta_jsont : meta Jsont.t 1110 1094 1095 + (** An update to a git repository, emitted by knots. *) 1111 1096 1112 - type manual_trigger_data = { 1113 - inputs : pair list option; 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 *) 1114 1105 } 1115 1106 1116 - (** Jsont codec for {!type:manual_trigger_data}. *) 1117 - val manual_trigger_data_jsont : manual_trigger_data Jsont.t 1107 + (** Jsont codec for {!type:main}. *) 1108 + val main_jsont : main Jsont.t 1118 1109 1110 + end 1111 + end 1112 + module Feed : sig 1113 + module Star : sig 1119 1114 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; 1115 + type main = { 1116 + created_at : string; 1117 + subject : string; 1126 1118 } 1127 1119 1128 - (** Jsont codec for {!type:trigger_metadata}. *) 1129 - val trigger_metadata_jsont : trigger_metadata Jsont.t 1120 + (** Jsont codec for {!type:main}. *) 1121 + val main_jsont : main Jsont.t 1130 1122 1123 + end 1124 + module Reaction : sig 1131 1125 1132 1126 type main = { 1133 - trigger_metadata : trigger_metadata; 1134 - workflows : workflow list; 1127 + created_at : string; 1128 + reaction : string; 1129 + subject : string; 1135 1130 } 1136 1131 1137 1132 (** Jsont codec for {!type:main}. *) 1138 1133 val main_jsont : main Jsont.t 1139 1134 1140 - module Status : sig 1135 + end 1136 + end 1137 + module Actor : sig 1138 + module Profile : sig 1139 + (** A declaration of a Tangled account profile. *) 1141 1140 1142 1141 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 *) 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 1149 } 1150 1150 1151 1151 (** Jsont codec for {!type:main}. *)