ATProto bits and pieces in OCaml with CLIs for Bluesky, Tangled, Standard.Site
6
fork

Configure Feed

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

switch to jsont for lexicon schema parsing for better errors

+3904 -3629
+2 -2
atp/lib/blob_ref.mli
··· 59 59 (** Jsont codec for blob references. 60 60 61 61 Encodes as: 62 - {v 62 + {v 63 63 {"$type": "blob", "ref": {"$link": "..."}, "mimeType": "...", "size": ...} 64 - v} *) 64 + v} *)
+1 -1
atp/lib/tid.mli
··· 45 45 (** [of_timestamp_us ?clockid us] creates a TID from microsecond timestamp. 46 46 47 47 @param clockid Clock ID 0-1023 (default: random). 48 - @raise Eio.Io if timestamp out of range [0, 2^53) or clockid invalid. *) 48 + @raise Eio.Io if timestamp out of range (0 to 2{^53}-1) or clockid invalid. *) 49 49 50 50 val of_timestamp_ms : ?clockid:int -> int64 -> t 51 51 (** [of_timestamp_ms ?clockid ms] creates a TID from millisecond timestamp.
+1 -1
hermest/bin/dune
··· 2 2 (name main) 3 3 (public_name hermest) 4 4 (package hermest-cli) 5 - (libraries hermest cmdliner)) 5 + (libraries hermest jsont.bytesrw cmdliner))
+12 -1
hermest/bin/main.ml
··· 15 15 (libraries atp jsont jsont.bytesrw))|} 16 16 name public_name_line 17 17 18 + (* Parse a lexicon file using jsont *) 19 + let parse_file path = 20 + try 21 + let content = In_channel.with_open_bin path In_channel.input_all in 22 + match Jsont_bytesrw.decode_string Lexicon_types.lexicon_doc_jsont content with 23 + | Ok doc -> Ok doc 24 + | Error e -> Error ("JSON decode error: " ^ e) 25 + with 26 + | Sys_error e -> Error ("File error: " ^ e) 27 + | e -> Error ("Unexpected error: " ^ Printexc.to_string e) 28 + 18 29 (* recursively find all json files in a path (file or directory) *) 19 30 let find_json_files path = 20 31 let rec aux acc p = ··· 38 49 let lexicons = 39 50 List.filter_map 40 51 (fun path -> 41 - match Parser.parse_file path with 52 + match parse_file path with 42 53 | Ok doc -> 43 54 Printf.printf " Parsed: %s\n" doc.Lexicon_types.id; 44 55 Some doc
+539
hermest/lib/lexicon_types.ml
··· 162 162 } 163 163 164 164 type parse_result = (lexicon_doc, string) result 165 + 166 + (* Jsont codecs for all lexicon types *) 167 + 168 + let string_spec_jsont : string_spec Jsont.t = 169 + let make format min_length max_length min_graphemes max_graphemes known_values 170 + enum const default description : string_spec = 171 + { 172 + format; 173 + min_length; 174 + max_length; 175 + min_graphemes; 176 + max_graphemes; 177 + known_values; 178 + enum; 179 + const; 180 + default; 181 + description; 182 + } 183 + in 184 + let map = 185 + Jsont.Object.map ~kind:"string_spec" make 186 + |> Jsont.Object.opt_mem "format" Jsont.string 187 + ~enc:(fun (s : string_spec) -> s.format) 188 + |> Jsont.Object.opt_mem "minLength" Jsont.int 189 + ~enc:(fun (s : string_spec) -> s.min_length) 190 + |> Jsont.Object.opt_mem "maxLength" Jsont.int 191 + ~enc:(fun (s : string_spec) -> s.max_length) 192 + |> Jsont.Object.opt_mem "minGraphemes" Jsont.int 193 + ~enc:(fun (s : string_spec) -> s.min_graphemes) 194 + |> Jsont.Object.opt_mem "maxGraphemes" Jsont.int 195 + ~enc:(fun (s : string_spec) -> s.max_graphemes) 196 + |> Jsont.Object.opt_mem "knownValues" Jsont.(list string) 197 + ~enc:(fun (s : string_spec) -> s.known_values) 198 + |> Jsont.Object.opt_mem "enum" Jsont.(list string) 199 + ~enc:(fun (s : string_spec) -> s.enum) 200 + |> Jsont.Object.opt_mem "const" Jsont.string 201 + ~enc:(fun (s : string_spec) -> s.const) 202 + |> Jsont.Object.opt_mem "default" Jsont.string 203 + ~enc:(fun (s : string_spec) -> s.default) 204 + |> Jsont.Object.opt_mem "description" Jsont.string 205 + ~enc:(fun (s : string_spec) -> s.description) 206 + |> Jsont.Object.skip_unknown 207 + in 208 + Jsont.Object.finish map 209 + 210 + let integer_spec_jsont : integer_spec Jsont.t = 211 + let make minimum maximum enum const default description : integer_spec = 212 + { minimum; maximum; enum; const; default; description } 213 + in 214 + let map = 215 + Jsont.Object.map ~kind:"integer_spec" make 216 + |> Jsont.Object.opt_mem "minimum" Jsont.int 217 + ~enc:(fun (s : integer_spec) -> s.minimum) 218 + |> Jsont.Object.opt_mem "maximum" Jsont.int 219 + ~enc:(fun (s : integer_spec) -> s.maximum) 220 + |> Jsont.Object.opt_mem "enum" Jsont.(list int) 221 + ~enc:(fun (s : integer_spec) -> s.enum) 222 + |> Jsont.Object.opt_mem "const" Jsont.int 223 + ~enc:(fun (s : integer_spec) -> s.const) 224 + |> Jsont.Object.opt_mem "default" Jsont.int 225 + ~enc:(fun (s : integer_spec) -> s.default) 226 + |> Jsont.Object.opt_mem "description" Jsont.string 227 + ~enc:(fun (s : integer_spec) -> s.description) 228 + |> Jsont.Object.skip_unknown 229 + in 230 + Jsont.Object.finish map 231 + 232 + let boolean_spec_jsont : boolean_spec Jsont.t = 233 + let make const default description : boolean_spec = 234 + { const; default; description } 235 + in 236 + let map = 237 + Jsont.Object.map ~kind:"boolean_spec" make 238 + |> Jsont.Object.opt_mem "const" Jsont.bool 239 + ~enc:(fun (s : boolean_spec) -> s.const) 240 + |> Jsont.Object.opt_mem "default" Jsont.bool 241 + ~enc:(fun (s : boolean_spec) -> s.default) 242 + |> Jsont.Object.opt_mem "description" Jsont.string 243 + ~enc:(fun (s : boolean_spec) -> s.description) 244 + |> Jsont.Object.skip_unknown 245 + in 246 + Jsont.Object.finish map 247 + 248 + let bytes_spec_jsont : bytes_spec Jsont.t = 249 + let make min_length max_length description : bytes_spec = 250 + { min_length; max_length; description } 251 + in 252 + let map = 253 + Jsont.Object.map ~kind:"bytes_spec" make 254 + |> Jsont.Object.opt_mem "minLength" Jsont.int 255 + ~enc:(fun (s : bytes_spec) -> s.min_length) 256 + |> Jsont.Object.opt_mem "maxLength" Jsont.int 257 + ~enc:(fun (s : bytes_spec) -> s.max_length) 258 + |> Jsont.Object.opt_mem "description" Jsont.string 259 + ~enc:(fun (s : bytes_spec) -> s.description) 260 + |> Jsont.Object.skip_unknown 261 + in 262 + Jsont.Object.finish map 263 + 264 + let blob_spec_jsont : blob_spec Jsont.t = 265 + let make accept max_size description : blob_spec = 266 + { accept; max_size; description } 267 + in 268 + let map = 269 + Jsont.Object.map ~kind:"blob_spec" make 270 + |> Jsont.Object.opt_mem "accept" Jsont.(list string) 271 + ~enc:(fun (s : blob_spec) -> s.accept) 272 + |> Jsont.Object.opt_mem "maxSize" Jsont.int 273 + ~enc:(fun (s : blob_spec) -> s.max_size) 274 + |> Jsont.Object.opt_mem "description" Jsont.string 275 + ~enc:(fun (s : blob_spec) -> s.description) 276 + |> Jsont.Object.skip_unknown 277 + in 278 + Jsont.Object.finish map 279 + 280 + let cid_link_spec_jsont : cid_link_spec Jsont.t = 281 + let make description : cid_link_spec = { description } in 282 + let map = 283 + Jsont.Object.map ~kind:"cid_link_spec" make 284 + |> Jsont.Object.opt_mem "description" Jsont.string 285 + ~enc:(fun (s : cid_link_spec) -> s.description) 286 + |> Jsont.Object.skip_unknown 287 + in 288 + Jsont.Object.finish map 289 + 290 + let ref_spec_jsont : ref_spec Jsont.t = 291 + let make ref_ description : ref_spec = { ref_; description } in 292 + let map = 293 + Jsont.Object.map ~kind:"ref_spec" make 294 + |> Jsont.Object.mem "ref" Jsont.string 295 + ~enc:(fun (s : ref_spec) -> s.ref_) 296 + |> Jsont.Object.opt_mem "description" Jsont.string 297 + ~enc:(fun (s : ref_spec) -> s.description) 298 + |> Jsont.Object.skip_unknown 299 + in 300 + Jsont.Object.finish map 301 + 302 + let union_spec_jsont : union_spec Jsont.t = 303 + let make refs closed description : union_spec = { refs; closed; description } in 304 + let map = 305 + Jsont.Object.map ~kind:"union_spec" make 306 + |> Jsont.Object.mem "refs" Jsont.(list string) 307 + ~enc:(fun (s : union_spec) -> s.refs) 308 + |> Jsont.Object.opt_mem "closed" Jsont.bool 309 + ~enc:(fun (s : union_spec) -> s.closed) 310 + |> Jsont.Object.opt_mem "description" Jsont.string 311 + ~enc:(fun (s : union_spec) -> s.description) 312 + |> Jsont.Object.skip_unknown 313 + in 314 + Jsont.Object.finish map 315 + 316 + let token_spec_jsont : token_spec Jsont.t = 317 + let make description : token_spec = { description } in 318 + let map = 319 + Jsont.Object.map ~kind:"token_spec" make 320 + |> Jsont.Object.opt_mem "description" Jsont.string 321 + ~enc:(fun (s : token_spec) -> s.description) 322 + |> Jsont.Object.skip_unknown 323 + in 324 + Jsont.Object.finish map 325 + 326 + let unknown_spec_jsont : unknown_spec Jsont.t = 327 + let make description : unknown_spec = { description } in 328 + let map = 329 + Jsont.Object.map ~kind:"unknown_spec" make 330 + |> Jsont.Object.opt_mem "description" Jsont.string 331 + ~enc:(fun (s : unknown_spec) -> s.description) 332 + |> Jsont.Object.skip_unknown 333 + in 334 + Jsont.Object.finish map 335 + 336 + let error_def_jsont : error_def Jsont.t = 337 + let make name description : error_def = { name; description } in 338 + let map = 339 + Jsont.Object.map ~kind:"error_def" make 340 + |> Jsont.Object.mem "name" Jsont.string 341 + ~enc:(fun (s : error_def) -> s.name) 342 + |> Jsont.Object.opt_mem "description" Jsont.string 343 + ~enc:(fun (s : error_def) -> s.description) 344 + |> Jsont.Object.skip_unknown 345 + in 346 + Jsont.Object.finish map 347 + 348 + (* Recursive types using Jsont.rec' with lazy values *) 349 + 350 + module StringMap = Map.Make(String) 351 + 352 + (* Forward declarations for mutually recursive types *) 353 + let rec type_def_jsont_lazy : type_def Jsont.t Lazy.t = lazy ( 354 + (* Create case maps for each variant *) 355 + let string_case = Jsont.Object.Case.map "string" string_spec_jsont 356 + ~dec:(fun s -> String s) in 357 + let integer_case = Jsont.Object.Case.map "integer" integer_spec_jsont 358 + ~dec:(fun s -> Integer s) in 359 + let boolean_case = Jsont.Object.Case.map "boolean" boolean_spec_jsont 360 + ~dec:(fun s -> Boolean s) in 361 + let bytes_case = Jsont.Object.Case.map "bytes" bytes_spec_jsont 362 + ~dec:(fun s -> Bytes s) in 363 + let blob_case = Jsont.Object.Case.map "blob" blob_spec_jsont 364 + ~dec:(fun s -> Blob s) in 365 + let cid_link_case = Jsont.Object.Case.map "cid-link" cid_link_spec_jsont 366 + ~dec:(fun s -> CidLink s) in 367 + let array_case = Jsont.Object.Case.map "array" (Lazy.force array_spec_jsont_lazy) 368 + ~dec:(fun s -> Array s) in 369 + let object_case = Jsont.Object.Case.map "object" (Lazy.force object_spec_jsont_lazy) 370 + ~dec:(fun s -> Object s) in 371 + let ref_case = Jsont.Object.Case.map "ref" ref_spec_jsont 372 + ~dec:(fun s -> Ref s) in 373 + let union_case = Jsont.Object.Case.map "union" union_spec_jsont 374 + ~dec:(fun s -> Union s) in 375 + let token_case = Jsont.Object.Case.map "token" token_spec_jsont 376 + ~dec:(fun s -> Token s) in 377 + let unknown_case = Jsont.Object.Case.map "unknown" unknown_spec_jsont 378 + ~dec:(fun s -> Unknown s) in 379 + let query_case = Jsont.Object.Case.map "query" (Lazy.force query_spec_jsont_lazy) 380 + ~dec:(fun s -> Query s) in 381 + let procedure_case = Jsont.Object.Case.map "procedure" (Lazy.force procedure_spec_jsont_lazy) 382 + ~dec:(fun s -> Procedure s) in 383 + let subscription_case = Jsont.Object.Case.map "subscription" (Lazy.force subscription_spec_jsont_lazy) 384 + ~dec:(fun s -> Subscription s) in 385 + let record_case = Jsont.Object.Case.map "record" (Lazy.force record_spec_jsont_lazy) 386 + ~dec:(fun s -> Record s) in 387 + let permission_set_case = Jsont.Object.Case.map "permission-set" (Lazy.force permission_set_spec_jsont_lazy) 388 + ~dec:(fun s -> PermissionSet s) in 389 + (* Create enc_case function for encoding *) 390 + let enc_case = function 391 + | String s -> Jsont.Object.Case.value string_case s 392 + | Integer s -> Jsont.Object.Case.value integer_case s 393 + | Boolean s -> Jsont.Object.Case.value boolean_case s 394 + | Bytes s -> Jsont.Object.Case.value bytes_case s 395 + | Blob s -> Jsont.Object.Case.value blob_case s 396 + | CidLink s -> Jsont.Object.Case.value cid_link_case s 397 + | Array s -> Jsont.Object.Case.value array_case s 398 + | Object s -> Jsont.Object.Case.value object_case s 399 + | Ref s -> Jsont.Object.Case.value ref_case s 400 + | Union s -> Jsont.Object.Case.value union_case s 401 + | Token s -> Jsont.Object.Case.value token_case s 402 + | Unknown s -> Jsont.Object.Case.value unknown_case s 403 + | Query s -> Jsont.Object.Case.value query_case s 404 + | Procedure s -> Jsont.Object.Case.value procedure_case s 405 + | Subscription s -> Jsont.Object.Case.value subscription_case s 406 + | Record s -> Jsont.Object.Case.value record_case s 407 + | PermissionSet s -> Jsont.Object.Case.value permission_set_case s 408 + in 409 + (* List of all cases *) 410 + let cases = Jsont.Object.Case.[ 411 + make string_case; make integer_case; make boolean_case; make bytes_case; 412 + make blob_case; make cid_link_case; make array_case; make object_case; 413 + make ref_case; make union_case; make token_case; make unknown_case; 414 + make query_case; make procedure_case; make subscription_case; 415 + make record_case; make permission_set_case 416 + ] in 417 + (* Build the type_def codec *) 418 + Jsont.Object.map ~kind:"type_def" Fun.id 419 + |> Jsont.Object.case_mem "type" Jsont.string ~enc:Fun.id ~enc_case cases 420 + |> Jsont.Object.finish 421 + ) 422 + 423 + and property_jsont_lazy : property Jsont.t Lazy.t = lazy ( 424 + let make type_def description : property = { type_def; description } in 425 + let map = 426 + Jsont.Object.map ~kind:"property" make 427 + |> Jsont.Object.mem "type_def" (Jsont.rec' type_def_jsont_lazy) 428 + ~enc:(fun (p : property) -> p.type_def) 429 + |> Jsont.Object.opt_mem "description" Jsont.string 430 + ~enc:(fun (p : property) -> p.description) 431 + |> Jsont.Object.skip_unknown 432 + in 433 + Jsont.Object.finish map 434 + ) 435 + 436 + (* Extract description from a type_def. Each variant's spec contains the description. *) 437 + and get_type_def_description (td : type_def) : string option = 438 + match td with 439 + | String s -> s.description 440 + | Integer s -> s.description 441 + | Boolean s -> s.description 442 + | Bytes s -> s.description 443 + | Blob s -> s.description 444 + | CidLink s -> s.description 445 + | Array s -> s.description 446 + | Object s -> s.description 447 + | Ref s -> s.description 448 + | Union s -> s.description 449 + | Token s -> s.description 450 + | Unknown s -> s.description 451 + | Query s -> s.description 452 + | Procedure s -> s.description 453 + | Subscription s -> s.description 454 + | Record s -> s.description 455 + | PermissionSet s -> s.description 456 + 457 + (* Helper to decode properties object as (string * property) list. 458 + Each property value contains type_def fields including description. 459 + We decode as type_def and extract the description from it. 460 + Note: Field order is alphabetical since JSON object keys have no defined order. *) 461 + and properties_jsont_lazy : (string * property) list Jsont.t Lazy.t = lazy ( 462 + let map_jsont = Jsont.Object.as_string_map (Jsont.rec' type_def_jsont_lazy) in 463 + Jsont.map 464 + ~kind:"properties" 465 + ~dec:(fun m -> 466 + StringMap.bindings m |> List.map (fun (name, type_def) -> 467 + let description = get_type_def_description type_def in 468 + (name, { type_def; description }))) 469 + ~enc:(fun (props : (string * property) list) -> 470 + List.fold_left (fun m (name, (prop : property)) -> 471 + StringMap.add name prop.type_def m) StringMap.empty props) 472 + map_jsont 473 + ) 474 + 475 + and object_spec_jsont_lazy : object_spec Jsont.t Lazy.t = lazy ( 476 + let make properties required nullable description : object_spec = 477 + { properties; required; nullable; description } 478 + in 479 + let map = 480 + Jsont.Object.map ~kind:"object_spec" make 481 + |> Jsont.Object.mem "properties" (Jsont.rec' properties_jsont_lazy) 482 + ~dec_absent:[] ~enc:(fun (s : object_spec) -> s.properties) 483 + |> Jsont.Object.opt_mem "required" Jsont.(list string) 484 + ~enc:(fun (s : object_spec) -> s.required) 485 + |> Jsont.Object.opt_mem "nullable" Jsont.(list string) 486 + ~enc:(fun (s : object_spec) -> s.nullable) 487 + |> Jsont.Object.opt_mem "description" Jsont.string 488 + ~enc:(fun (s : object_spec) -> s.description) 489 + |> Jsont.Object.skip_unknown 490 + in 491 + Jsont.Object.finish map 492 + ) 493 + 494 + and array_spec_jsont_lazy : array_spec Jsont.t Lazy.t = lazy ( 495 + let make items min_length max_length description : array_spec = 496 + { items; min_length; max_length; description } 497 + in 498 + let map = 499 + Jsont.Object.map ~kind:"array_spec" make 500 + |> Jsont.Object.mem "items" (Jsont.rec' type_def_jsont_lazy) 501 + ~enc:(fun (s : array_spec) -> s.items) 502 + |> Jsont.Object.opt_mem "minLength" Jsont.int 503 + ~enc:(fun (s : array_spec) -> s.min_length) 504 + |> Jsont.Object.opt_mem "maxLength" Jsont.int 505 + ~enc:(fun (s : array_spec) -> s.max_length) 506 + |> Jsont.Object.opt_mem "description" Jsont.string 507 + ~enc:(fun (s : array_spec) -> s.description) 508 + |> Jsont.Object.skip_unknown 509 + in 510 + Jsont.Object.finish map 511 + ) 512 + 513 + and params_spec_jsont_lazy : params_spec Jsont.t Lazy.t = lazy ( 514 + let make properties required description : params_spec = 515 + { properties; required; description } 516 + in 517 + let map = 518 + Jsont.Object.map ~kind:"params_spec" make 519 + |> Jsont.Object.mem "properties" (Jsont.rec' properties_jsont_lazy) 520 + ~dec_absent:[] ~enc:(fun (s : params_spec) -> s.properties) 521 + |> Jsont.Object.opt_mem "required" Jsont.(list string) 522 + ~enc:(fun (s : params_spec) -> s.required) 523 + |> Jsont.Object.opt_mem "description" Jsont.string 524 + ~enc:(fun (s : params_spec) -> s.description) 525 + |> Jsont.Object.skip_unknown 526 + in 527 + Jsont.Object.finish map 528 + ) 529 + 530 + and body_def_jsont_lazy : body_def Jsont.t Lazy.t = lazy ( 531 + let make encoding schema description : body_def = 532 + { encoding; schema; description } 533 + in 534 + let map = 535 + Jsont.Object.map ~kind:"body_def" make 536 + |> Jsont.Object.mem "encoding" Jsont.string 537 + ~enc:(fun (s : body_def) -> s.encoding) 538 + |> Jsont.Object.opt_mem "schema" (Jsont.rec' type_def_jsont_lazy) 539 + ~enc:(fun (s : body_def) -> s.schema) 540 + |> Jsont.Object.opt_mem "description" Jsont.string 541 + ~enc:(fun (s : body_def) -> s.description) 542 + |> Jsont.Object.skip_unknown 543 + in 544 + Jsont.Object.finish map 545 + ) 546 + 547 + and query_spec_jsont_lazy : query_spec Jsont.t Lazy.t = lazy ( 548 + let make parameters output errors description : query_spec = 549 + { parameters; output; errors; description } 550 + in 551 + let map = 552 + Jsont.Object.map ~kind:"query_spec" make 553 + |> Jsont.Object.opt_mem "parameters" (Jsont.rec' params_spec_jsont_lazy) 554 + ~enc:(fun (s : query_spec) -> s.parameters) 555 + |> Jsont.Object.opt_mem "output" (Jsont.rec' body_def_jsont_lazy) 556 + ~enc:(fun (s : query_spec) -> s.output) 557 + |> Jsont.Object.opt_mem "errors" Jsont.(list error_def_jsont) 558 + ~enc:(fun (s : query_spec) -> s.errors) 559 + |> Jsont.Object.opt_mem "description" Jsont.string 560 + ~enc:(fun (s : query_spec) -> s.description) 561 + |> Jsont.Object.skip_unknown 562 + in 563 + Jsont.Object.finish map 564 + ) 565 + 566 + and procedure_spec_jsont_lazy : procedure_spec Jsont.t Lazy.t = lazy ( 567 + let make parameters input output errors description : procedure_spec = 568 + { parameters; input; output; errors; description } 569 + in 570 + let map = 571 + Jsont.Object.map ~kind:"procedure_spec" make 572 + |> Jsont.Object.opt_mem "parameters" (Jsont.rec' params_spec_jsont_lazy) 573 + ~enc:(fun (s : procedure_spec) -> s.parameters) 574 + |> Jsont.Object.opt_mem "input" (Jsont.rec' body_def_jsont_lazy) 575 + ~enc:(fun (s : procedure_spec) -> s.input) 576 + |> Jsont.Object.opt_mem "output" (Jsont.rec' body_def_jsont_lazy) 577 + ~enc:(fun (s : procedure_spec) -> s.output) 578 + |> Jsont.Object.opt_mem "errors" Jsont.(list error_def_jsont) 579 + ~enc:(fun (s : procedure_spec) -> s.errors) 580 + |> Jsont.Object.opt_mem "description" Jsont.string 581 + ~enc:(fun (s : procedure_spec) -> s.description) 582 + |> Jsont.Object.skip_unknown 583 + in 584 + Jsont.Object.finish map 585 + ) 586 + 587 + and subscription_spec_jsont_lazy : subscription_spec Jsont.t Lazy.t = lazy ( 588 + let make parameters message errors description : subscription_spec = 589 + { parameters; message; errors; description } 590 + in 591 + let map = 592 + Jsont.Object.map ~kind:"subscription_spec" make 593 + |> Jsont.Object.opt_mem "parameters" (Jsont.rec' params_spec_jsont_lazy) 594 + ~enc:(fun (s : subscription_spec) -> s.parameters) 595 + |> Jsont.Object.opt_mem "message" (Jsont.rec' body_def_jsont_lazy) 596 + ~enc:(fun (s : subscription_spec) -> s.message) 597 + |> Jsont.Object.opt_mem "errors" Jsont.(list error_def_jsont) 598 + ~enc:(fun (s : subscription_spec) -> s.errors) 599 + |> Jsont.Object.opt_mem "description" Jsont.string 600 + ~enc:(fun (s : subscription_spec) -> s.description) 601 + |> Jsont.Object.skip_unknown 602 + in 603 + Jsont.Object.finish map 604 + ) 605 + 606 + and record_spec_jsont_lazy : record_spec Jsont.t Lazy.t = lazy ( 607 + let make key record description : record_spec = { key; record; description } in 608 + let map = 609 + Jsont.Object.map ~kind:"record_spec" make 610 + |> Jsont.Object.mem "key" Jsont.string 611 + ~enc:(fun (s : record_spec) -> s.key) 612 + |> Jsont.Object.mem "record" (Jsont.rec' object_spec_jsont_lazy) 613 + ~enc:(fun (s : record_spec) -> s.record) 614 + |> Jsont.Object.opt_mem "description" Jsont.string 615 + ~enc:(fun (s : record_spec) -> s.description) 616 + |> Jsont.Object.skip_unknown 617 + in 618 + Jsont.Object.finish map 619 + ) 620 + 621 + and permission_spec_jsont_lazy : permission_spec Jsont.t Lazy.t = lazy ( 622 + let make resource inherit_aud lxm action collection : permission_spec = 623 + { resource; inherit_aud; lxm; action; collection } 624 + in 625 + let map = 626 + Jsont.Object.map ~kind:"permission_spec" make 627 + |> Jsont.Object.mem "resource" Jsont.string 628 + ~enc:(fun (s : permission_spec) -> s.resource) 629 + |> Jsont.Object.opt_mem "inherit_aud" Jsont.bool 630 + ~enc:(fun (s : permission_spec) -> s.inherit_aud) 631 + |> Jsont.Object.opt_mem "lxm" Jsont.(list string) 632 + ~enc:(fun (s : permission_spec) -> s.lxm) 633 + |> Jsont.Object.opt_mem "action" Jsont.(list string) 634 + ~enc:(fun (s : permission_spec) -> s.action) 635 + |> Jsont.Object.opt_mem "collection" Jsont.(list string) 636 + ~enc:(fun (s : permission_spec) -> s.collection) 637 + |> Jsont.Object.skip_unknown 638 + in 639 + Jsont.Object.finish map 640 + ) 641 + 642 + and permission_set_spec_jsont_lazy : permission_set_spec Jsont.t Lazy.t = lazy ( 643 + let make title detail permissions description : permission_set_spec = 644 + { title; detail; permissions; description } 645 + in 646 + let map = 647 + Jsont.Object.map ~kind:"permission_set_spec" make 648 + |> Jsont.Object.mem "title" Jsont.string 649 + ~enc:(fun (s : permission_set_spec) -> s.title) 650 + |> Jsont.Object.opt_mem "detail" Jsont.string 651 + ~enc:(fun (s : permission_set_spec) -> s.detail) 652 + |> Jsont.Object.mem "permissions" Jsont.(list (Jsont.rec' permission_spec_jsont_lazy)) 653 + ~enc:(fun (s : permission_set_spec) -> s.permissions) 654 + |> Jsont.Object.opt_mem "description" Jsont.string 655 + ~enc:(fun (s : permission_set_spec) -> s.description) 656 + |> Jsont.Object.skip_unknown 657 + in 658 + Jsont.Object.finish map 659 + ) 660 + 661 + (* Force lazy values to get the actual codecs *) 662 + let type_def_jsont = Lazy.force type_def_jsont_lazy 663 + let property_jsont = Lazy.force property_jsont_lazy 664 + let object_spec_jsont = Lazy.force object_spec_jsont_lazy 665 + let array_spec_jsont = Lazy.force array_spec_jsont_lazy 666 + let params_spec_jsont = Lazy.force params_spec_jsont_lazy 667 + let body_def_jsont = Lazy.force body_def_jsont_lazy 668 + let query_spec_jsont = Lazy.force query_spec_jsont_lazy 669 + let procedure_spec_jsont = Lazy.force procedure_spec_jsont_lazy 670 + let subscription_spec_jsont = Lazy.force subscription_spec_jsont_lazy 671 + let record_spec_jsont = Lazy.force record_spec_jsont_lazy 672 + 673 + (* defs_jsont decodes an object {"name": type_def, ...} as a def_entry list *) 674 + let defs_jsont : def_entry list Jsont.t = 675 + (* Decode as a string map of type_def values *) 676 + let map_jsont = Jsont.Object.as_string_map type_def_jsont in 677 + (* Wrap with conversion functions *) 678 + Jsont.map 679 + ~kind:"defs" 680 + ~dec:(fun m -> StringMap.fold (fun name type_def acc -> { name; type_def } :: acc) m []) 681 + ~enc:(fun defs -> List.fold_left (fun m d -> StringMap.add d.name d.type_def m) StringMap.empty defs) 682 + map_jsont 683 + 684 + let def_entry_jsont : def_entry Jsont.t = 685 + let make name type_def = { name; type_def } in 686 + Jsont.Object.map ~kind:"def_entry" make 687 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun s -> s.name) 688 + |> Jsont.Object.mem "type_def" type_def_jsont ~enc:(fun s -> s.type_def) 689 + |> Jsont.Object.skip_unknown 690 + |> Jsont.Object.finish 691 + 692 + let lexicon_doc_jsont : lexicon_doc Jsont.t = 693 + let make lexicon id revision description defs = 694 + { lexicon; id; revision; description; defs } 695 + in 696 + Jsont.Object.map ~kind:"lexicon_doc" make 697 + |> Jsont.Object.mem "lexicon" Jsont.int ~enc:(fun s -> s.lexicon) 698 + |> Jsont.Object.mem "id" Jsont.string ~enc:(fun s -> s.id) 699 + |> Jsont.Object.opt_mem "revision" Jsont.int ~enc:(fun s -> s.revision) 700 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun s -> s.description) 701 + |> Jsont.Object.mem "defs" defs_jsont ~enc:(fun s -> s.defs) 702 + |> Jsont.Object.skip_unknown 703 + |> Jsont.Object.finish
+74
hermest/lib/lexicon_types.mli
··· 282 282 283 283 type parse_result = (lexicon_doc, string) result 284 284 (** Result of parsing a lexicon JSON file. *) 285 + 286 + (** {1 Jsont Codecs} 287 + 288 + These codecs can be used to parse and serialize lexicon documents using the 289 + jsont library. *) 290 + 291 + val string_spec_jsont : string_spec Jsont.t 292 + (** JSON codec for string specifications. *) 293 + 294 + val integer_spec_jsont : integer_spec Jsont.t 295 + (** JSON codec for integer specifications. *) 296 + 297 + val boolean_spec_jsont : boolean_spec Jsont.t 298 + (** JSON codec for boolean specifications. *) 299 + 300 + val bytes_spec_jsont : bytes_spec Jsont.t 301 + (** JSON codec for bytes specifications. *) 302 + 303 + val blob_spec_jsont : blob_spec Jsont.t 304 + (** JSON codec for blob specifications. *) 305 + 306 + val cid_link_spec_jsont : cid_link_spec Jsont.t 307 + (** JSON codec for CID link specifications. *) 308 + 309 + val ref_spec_jsont : ref_spec Jsont.t 310 + (** JSON codec for reference specifications. *) 311 + 312 + val union_spec_jsont : union_spec Jsont.t 313 + (** JSON codec for union specifications. *) 314 + 315 + val token_spec_jsont : token_spec Jsont.t 316 + (** JSON codec for token specifications. *) 317 + 318 + val unknown_spec_jsont : unknown_spec Jsont.t 319 + (** JSON codec for unknown type specifications. *) 320 + 321 + val error_def_jsont : error_def Jsont.t 322 + (** JSON codec for error definitions. *) 323 + 324 + val type_def_jsont : type_def Jsont.t 325 + (** JSON codec for type definitions (discriminated union). *) 326 + 327 + val property_jsont : property Jsont.t 328 + (** JSON codec for object properties. *) 329 + 330 + val object_spec_jsont : object_spec Jsont.t 331 + (** JSON codec for object specifications. *) 332 + 333 + val array_spec_jsont : array_spec Jsont.t 334 + (** JSON codec for array specifications. *) 335 + 336 + val params_spec_jsont : params_spec Jsont.t 337 + (** JSON codec for parameter specifications. *) 338 + 339 + val body_def_jsont : body_def Jsont.t 340 + (** JSON codec for body definitions. *) 341 + 342 + val query_spec_jsont : query_spec Jsont.t 343 + (** JSON codec for query specifications. *) 344 + 345 + val procedure_spec_jsont : procedure_spec Jsont.t 346 + (** JSON codec for procedure specifications. *) 347 + 348 + val subscription_spec_jsont : subscription_spec Jsont.t 349 + (** JSON codec for subscription specifications. *) 350 + 351 + val record_spec_jsont : record_spec Jsont.t 352 + (** JSON codec for record specifications. *) 353 + 354 + val def_entry_jsont : def_entry Jsont.t 355 + (** JSON codec for definition entries. *) 356 + 357 + val lexicon_doc_jsont : lexicon_doc Jsont.t 358 + (** JSON codec for lexicon documents. *)
-320
hermest/lib/parser.ml
··· 1 - (* This Source Code Form is subject to the terms of the Mozilla Public 2 - License, v. 2.0. If a copy of the MPL was not distributed with this 3 - file, You can obtain one at http://mozilla.org/MPL/2.0/. *) 4 - 5 - (* parse lexicon json files into lexicon_types using jsont *) 6 - 7 - open Lexicon_types 8 - 9 - (* Helper to get object members as association list *) 10 - let get_members = function 11 - | Jsont.Object (mems, _) -> 12 - Some (List.map (fun ((name, _), value) -> (name, value)) mems) 13 - | _ -> None 14 - 15 - (* Generic field extractor using Option.bind *) 16 - let get_field extract key json = 17 - Option.bind (get_members json) (fun pairs -> 18 - Option.bind (List.assoc_opt key pairs) extract) 19 - 20 - let get_string_opt key = 21 - get_field (function Jsont.String (s, _) -> Some s | _ -> None) key 22 - 23 - let get_int_opt key = 24 - get_field 25 - (function Jsont.Number (f, _) -> Some (int_of_float f) | _ -> None) 26 - key 27 - 28 - let get_bool_opt key = 29 - get_field (function Jsont.Bool (b, _) -> Some b | _ -> None) key 30 - 31 - let get_list_opt key = 32 - get_field (function Jsont.Array (l, _) -> Some l | _ -> None) key 33 - 34 - let get_string key json = 35 - match get_string_opt key json with 36 - | Some s -> s 37 - | None -> failwith ("missing required string field: " ^ key) 38 - 39 - let get_int key json = 40 - match get_int_opt key json with 41 - | Some i -> i 42 - | None -> failwith ("missing required int field: " ^ key) 43 - 44 - let get_string_list_opt key json = 45 - Option.map 46 - (List.filter_map (function Jsont.String (s, _) -> Some s | _ -> None)) 47 - (get_list_opt key json) 48 - 49 - let get_int_list_opt key json = 50 - Option.map 51 - (List.filter_map (function 52 - | Jsont.Number (f, _) -> Some (int_of_float f) 53 - | _ -> None)) 54 - (get_list_opt key json) 55 - 56 - let get_assoc key json = 57 - match get_members json with 58 - | Some pairs -> ( 59 - match List.assoc_opt key pairs with 60 - | Some (Jsont.Object _ as a) -> Some a 61 - | _ -> None) 62 - | None -> None 63 - 64 - (* parse type definition from json *) 65 - let rec parse_type_def json : type_def = 66 - let type_str = get_string "type" json in 67 - match type_str with 68 - | "string" -> 69 - String 70 - { 71 - format = get_string_opt "format" json; 72 - min_length = get_int_opt "minLength" json; 73 - max_length = get_int_opt "maxLength" json; 74 - min_graphemes = get_int_opt "minGraphemes" json; 75 - max_graphemes = get_int_opt "maxGraphemes" json; 76 - known_values = get_string_list_opt "knownValues" json; 77 - enum = get_string_list_opt "enum" json; 78 - const = get_string_opt "const" json; 79 - default = get_string_opt "default" json; 80 - description = get_string_opt "description" json; 81 - } 82 - | "integer" -> 83 - Integer 84 - { 85 - minimum = get_int_opt "minimum" json; 86 - maximum = get_int_opt "maximum" json; 87 - enum = get_int_list_opt "enum" json; 88 - const = get_int_opt "const" json; 89 - default = get_int_opt "default" json; 90 - description = get_string_opt "description" json; 91 - } 92 - | "boolean" -> 93 - Boolean 94 - { 95 - const = get_bool_opt "const" json; 96 - default = get_bool_opt "default" json; 97 - description = get_string_opt "description" json; 98 - } 99 - | "bytes" -> 100 - Bytes 101 - { 102 - min_length = get_int_opt "minLength" json; 103 - max_length = get_int_opt "maxLength" json; 104 - description = get_string_opt "description" json; 105 - } 106 - | "blob" -> 107 - Blob 108 - { 109 - accept = get_string_list_opt "accept" json; 110 - max_size = get_int_opt "maxSize" json; 111 - description = get_string_opt "description" json; 112 - } 113 - | "cid-link" -> CidLink { description = get_string_opt "description" json } 114 - | "array" -> 115 - let items_json = 116 - match get_assoc "items" json with 117 - | Some j -> j 118 - | None -> failwith "array type missing items" 119 - in 120 - Array 121 - { 122 - items = parse_type_def items_json; 123 - min_length = get_int_opt "minLength" json; 124 - max_length = get_int_opt "maxLength" json; 125 - description = get_string_opt "description" json; 126 - } 127 - | "object" -> Object (parse_object_spec json) 128 - | "ref" -> 129 - Ref 130 - { 131 - ref_ = get_string "ref" json; 132 - description = get_string_opt "description" json; 133 - } 134 - | "union" -> 135 - Union 136 - { 137 - refs = 138 - (match get_string_list_opt "refs" json with 139 - | Some l -> l 140 - | None -> []); 141 - closed = get_bool_opt "closed" json; 142 - description = get_string_opt "description" json; 143 - } 144 - | "token" -> Token { description = get_string_opt "description" json } 145 - | "unknown" -> Unknown { description = get_string_opt "description" json } 146 - | "query" -> Query (parse_query_spec json) 147 - | "procedure" -> Procedure (parse_procedure_spec json) 148 - | "subscription" -> Subscription (parse_subscription_spec json) 149 - | "record" -> Record (parse_record_spec json) 150 - | "permission-set" -> PermissionSet (parse_permission_set_spec json) 151 - | "params" -> 152 - (* params type used in query/procedure parameters *) 153 - Object (parse_object_spec json) 154 - | t -> failwith ("unknown type: " ^ t) 155 - 156 - and parse_object_spec json : object_spec = 157 - let properties = 158 - match get_assoc "properties" json with 159 - | Some obj -> ( 160 - match get_members obj with 161 - | Some pairs -> 162 - List.map 163 - (fun (name, prop_json) -> 164 - let type_def = parse_type_def prop_json in 165 - let description = get_string_opt "description" prop_json in 166 - (name, { type_def; description })) 167 - pairs 168 - | None -> []) 169 - | _ -> [] 170 - in 171 - { 172 - properties; 173 - required = get_string_list_opt "required" json; 174 - nullable = get_string_list_opt "nullable" json; 175 - description = get_string_opt "description" json; 176 - } 177 - 178 - and parse_params_spec json : params_spec = 179 - let properties = 180 - match get_assoc "properties" json with 181 - | Some obj -> ( 182 - match get_members obj with 183 - | Some pairs -> 184 - List.map 185 - (fun (name, prop_json) -> 186 - let type_def = parse_type_def prop_json in 187 - let description = get_string_opt "description" prop_json in 188 - (name, { type_def; description })) 189 - pairs 190 - | None -> []) 191 - | _ -> [] 192 - in 193 - { 194 - properties; 195 - required = get_string_list_opt "required" json; 196 - description = get_string_opt "description" json; 197 - } 198 - 199 - and parse_body_def json : body_def = 200 - { 201 - encoding = get_string "encoding" json; 202 - schema = Option.map parse_type_def (get_assoc "schema" json); 203 - description = get_string_opt "description" json; 204 - } 205 - 206 - and parse_error_def json : error_def = 207 - { 208 - name = get_string "name" json; 209 - description = get_string_opt "description" json; 210 - } 211 - 212 - and parse_errors_opt json = 213 - Option.map 214 - (List.map (function 215 - | Jsont.Object _ as j -> parse_error_def j 216 - | _ -> failwith "invalid error def")) 217 - (get_list_opt "errors" json) 218 - 219 - and parse_query_spec json : query_spec = 220 - { 221 - parameters = Option.map parse_params_spec (get_assoc "parameters" json); 222 - output = Option.map parse_body_def (get_assoc "output" json); 223 - errors = parse_errors_opt json; 224 - description = get_string_opt "description" json; 225 - } 226 - 227 - and parse_procedure_spec json : procedure_spec = 228 - { 229 - parameters = Option.map parse_params_spec (get_assoc "parameters" json); 230 - input = Option.map parse_body_def (get_assoc "input" json); 231 - output = Option.map parse_body_def (get_assoc "output" json); 232 - errors = parse_errors_opt json; 233 - description = get_string_opt "description" json; 234 - } 235 - 236 - and parse_subscription_spec json : subscription_spec = 237 - { 238 - parameters = Option.map parse_params_spec (get_assoc "parameters" json); 239 - message = Option.map parse_body_def (get_assoc "message" json); 240 - errors = parse_errors_opt json; 241 - description = get_string_opt "description" json; 242 - } 243 - 244 - and parse_record_spec json : record_spec = 245 - let key = get_string "key" json in 246 - let record_json = 247 - match get_assoc "record" json with 248 - | Some j -> j 249 - | None -> failwith "record type missing record field" 250 - in 251 - { 252 - key; 253 - record = parse_object_spec record_json; 254 - description = get_string_opt "description" json; 255 - } 256 - 257 - and parse_permission_spec json : permission_spec = 258 - { 259 - resource = get_string "resource" json; 260 - inherit_aud = get_bool_opt "inheritAud" json; 261 - lxm = get_string_list_opt "lxm" json; 262 - action = get_string_list_opt "action" json; 263 - collection = get_string_list_opt "collection" json; 264 - } 265 - 266 - and parse_permission_set_spec json : permission_set_spec = 267 - let permissions = 268 - match get_list_opt "permissions" json with 269 - | Some perms -> 270 - List.filter_map 271 - (function Jsont.Object _ as j -> Some (parse_permission_spec j) | _ -> None) 272 - perms 273 - | None -> [] 274 - in 275 - { 276 - title = get_string "title" json; 277 - detail = get_string_opt "detail" json; 278 - permissions; 279 - description = get_string_opt "description" json; 280 - } 281 - 282 - (* parse complete lexicon document *) 283 - let parse_lexicon_doc json : lexicon_doc = 284 - let lexicon = get_int "lexicon" json in 285 - let id = get_string "id" json in 286 - let revision = get_int_opt "revision" json in 287 - let description = get_string_opt "description" json in 288 - let defs = 289 - match get_assoc "defs" json with 290 - | Some obj -> ( 291 - match get_members obj with 292 - | Some pairs -> 293 - List.map 294 - (fun (name, def_json) -> { name; type_def = parse_type_def def_json }) 295 - pairs 296 - | None -> []) 297 - | _ -> [] 298 - in 299 - { lexicon; id; revision; description; defs } 300 - 301 - (* parse lexicon file *) 302 - let parse_file path : parse_result = 303 - try 304 - let content = In_channel.with_open_bin path In_channel.input_all in 305 - match Jsont_bytesrw.decode_string Jsont.json content with 306 - | Ok json -> Ok (parse_lexicon_doc json) 307 - | Error e -> Error ("JSON parse error: " ^ e) 308 - with 309 - | Failure e -> Error ("Parse error: " ^ e) 310 - | e -> Error ("Unexpected error: " ^ Printexc.to_string e) 311 - 312 - (* parse json string *) 313 - let parse_string content : parse_result = 314 - try 315 - match Jsont_bytesrw.decode_string Jsont.json content with 316 - | Ok json -> Ok (parse_lexicon_doc json) 317 - | Error e -> Error ("JSON parse error: " ^ e) 318 - with 319 - | Failure e -> Error ("Parse error: " ^ e) 320 - | e -> Error ("Unexpected error: " ^ Printexc.to_string e)
-29
hermest/lib/parser.mli
··· 1 - (* This Source Code Form is subject to the terms of the Mozilla Public 2 - License, v. 2.0. If a copy of the MPL was not distributed with this 3 - file, You can obtain one at http://mozilla.org/MPL/2.0/. *) 4 - 5 - (** AT Protocol Lexicon JSON parser. 6 - 7 - This module parses lexicon JSON files into {!Lexicon_types.lexicon_doc} 8 - structures. Lexicons are typically stored as JSON files with the [.json] 9 - extension. 10 - 11 - {2 Usage} 12 - 13 - {[ 14 - match Parser.parse_file "app.bsky.feed.post.json" with 15 - | Ok doc -> Printf.printf "Parsed lexicon: %s\n" doc.id 16 - | Error msg -> Printf.eprintf "Error: %s\n" msg 17 - ]} *) 18 - 19 - val parse_file : string -> Lexicon_types.parse_result 20 - (** [parse_file path] parses a lexicon JSON file at [path]. 21 - 22 - Returns [Ok doc] on success or [Error msg] with a descriptive error message 23 - on failure. *) 24 - 25 - val parse_string : string -> Lexicon_types.parse_result 26 - (** [parse_string content] parses lexicon JSON from a string. 27 - 28 - Returns [Ok doc] on success or [Error msg] with a descriptive error message 29 - on failure. *)
+54 -54
lexicons/atproto/atp_lexicon_atproto.ml
··· 18 18 module Repo = struct 19 19 module StrongRef = struct 20 20 type main = { 21 - uri : string; 22 21 cid : string; 22 + uri : string; 23 23 } 24 24 25 25 let main_jsont = 26 26 Jsont.Object.map ~kind:"Main" 27 - (fun _typ uri cid -> { uri; cid }) 27 + (fun _typ cid uri -> { cid; uri }) 28 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) 29 30 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 30 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 31 31 |> Jsont.Object.finish 32 32 33 33 end ··· 48 48 end 49 49 module ListRecords = struct 50 50 type record = { 51 - uri : string; 52 51 cid : string; 52 + uri : string; 53 53 value : Jsont.json; 54 54 } 55 55 56 56 let record_jsont = 57 57 Jsont.Object.map ~kind:"Record" 58 - (fun _typ uri cid value -> { uri; cid; value }) 58 + (fun _typ cid uri value -> { cid; uri; value }) 59 59 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.listRecords#record" ~enc:(fun _ -> "com.atproto.repo.listRecords#record") 60 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 60 61 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 61 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 62 62 |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 63 63 |> Jsont.Object.finish 64 64 65 65 type params = { 66 - repo : string; 67 66 collection : string; 67 + cursor : string option; 68 68 limit : int option; 69 - cursor : string option; 69 + repo : string; 70 70 reverse : bool option; 71 71 } 72 72 73 73 let params_jsont = 74 74 Jsont.Object.map ~kind:"Params" 75 - (fun repo collection limit cursor reverse -> { 76 - repo; 75 + (fun collection cursor limit repo reverse -> { 77 76 collection; 77 + cursor; 78 78 limit; 79 - cursor; 79 + repo; 80 80 reverse; 81 81 }) 82 - |> Jsont.Object.mem "repo" Jsont.string 83 - ~enc:(fun r -> r.repo) 84 82 |> Jsont.Object.mem "collection" Jsont.string 85 83 ~enc:(fun r -> r.collection) 86 - |> Jsont.Object.opt_mem "limit" Jsont.int 87 - ~enc:(fun r -> r.limit) 88 84 |> Jsont.Object.opt_mem "cursor" Jsont.string 89 85 ~enc:(fun r -> r.cursor) 86 + |> Jsont.Object.opt_mem "limit" Jsont.int 87 + ~enc:(fun r -> r.limit) 88 + |> Jsont.Object.mem "repo" Jsont.string 89 + ~enc:(fun r -> r.repo) 90 90 |> Jsont.Object.opt_mem "reverse" Jsont.bool 91 91 ~enc:(fun r -> r.reverse) 92 92 |> Jsont.Object.finish ··· 107 107 end 108 108 module GetRecord = struct 109 109 type params = { 110 + cid : string option; 111 + collection : string; 110 112 repo : string; 111 - collection : string; 112 113 rkey : string; 113 - cid : string option; 114 114 } 115 115 116 116 let params_jsont = 117 117 Jsont.Object.map ~kind:"Params" 118 - (fun repo collection rkey cid -> { 118 + (fun cid collection repo rkey -> { 119 + cid; 120 + collection; 119 121 repo; 120 - collection; 121 122 rkey; 122 - cid; 123 123 }) 124 + |> Jsont.Object.opt_mem "cid" Jsont.string 125 + ~enc:(fun r -> r.cid) 126 + |> Jsont.Object.mem "collection" Jsont.string 127 + ~enc:(fun r -> r.collection) 124 128 |> Jsont.Object.mem "repo" Jsont.string 125 129 ~enc:(fun r -> r.repo) 126 - |> Jsont.Object.mem "collection" Jsont.string 127 - ~enc:(fun r -> r.collection) 128 130 |> Jsont.Object.mem "rkey" Jsont.string 129 131 ~enc:(fun r -> r.rkey) 130 - |> Jsont.Object.opt_mem "cid" Jsont.string 131 - ~enc:(fun r -> r.cid) 132 132 |> Jsont.Object.finish 133 133 134 134 type output = { 135 - uri : string; 136 135 cid : string option; 136 + uri : string; 137 137 value : Jsont.json; 138 138 } 139 139 140 140 let output_jsont = 141 141 Jsont.Object.map ~kind:"Output" 142 - (fun _typ uri cid value -> { uri; cid; value }) 142 + (fun _typ cid uri value -> { cid; uri; value }) 143 143 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.getRecord#output" ~enc:(fun _ -> "com.atproto.repo.getRecord#output") 144 + |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 144 145 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 145 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 146 146 |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 147 147 |> Jsont.Object.finish 148 148 149 149 end 150 150 module PutRecord = struct 151 151 type input = { 152 - repo : string; 153 152 collection : string; 153 + record : Jsont.json; 154 + repo : string; 154 155 rkey : string; 155 - validate : bool option; 156 - record : Jsont.json; 156 + swap_commit : string option; 157 157 swap_record : string option; 158 - swap_commit : string option; 158 + validate : bool option; 159 159 } 160 160 161 161 let input_jsont = 162 162 Jsont.Object.map ~kind:"Input" 163 - (fun _typ repo collection rkey validate record swap_record swap_commit -> { repo; collection; rkey; validate; record; swap_record; swap_commit }) 163 + (fun _typ collection record repo rkey swap_commit swap_record validate -> { collection; record; repo; rkey; swap_commit; swap_record; validate }) 164 164 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.putRecord#input" ~enc:(fun _ -> "com.atproto.repo.putRecord#input") 165 + |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 166 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 165 167 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 166 - |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 167 168 |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 168 - |> Jsont.Object.opt_mem "validate" Jsont.bool ~enc:(fun r -> r.validate) 169 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 169 + |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 170 170 |> Jsont.Object.opt_mem "swapRecord" Jsont.string ~enc:(fun r -> r.swap_record) 171 - |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 171 + |> Jsont.Object.opt_mem "validate" Jsont.bool ~enc:(fun r -> r.validate) 172 172 |> Jsont.Object.finish 173 173 174 174 type output = { 175 - uri : string; 176 175 cid : string; 177 176 commit : Defs.commit_meta option; 177 + uri : string; 178 178 validation_status : string option; 179 179 } 180 180 181 181 let output_jsont = 182 182 Jsont.Object.map ~kind:"Output" 183 - (fun _typ uri cid commit validation_status -> { uri; cid; commit; validation_status }) 183 + (fun _typ cid commit uri validation_status -> { cid; commit; uri; validation_status }) 184 184 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.putRecord#output" ~enc:(fun _ -> "com.atproto.repo.putRecord#output") 185 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 186 185 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 187 186 |> Jsont.Object.opt_mem "commit" Defs.commit_meta_jsont ~enc:(fun r -> r.commit) 187 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 188 188 |> Jsont.Object.opt_mem "validationStatus" Jsont.string ~enc:(fun r -> r.validation_status) 189 189 |> Jsont.Object.finish 190 190 191 191 end 192 192 module DeleteRecord = struct 193 193 type input = { 194 - repo : string; 195 194 collection : string; 195 + repo : string; 196 196 rkey : string; 197 - swap_record : string option; 198 197 swap_commit : string option; 198 + swap_record : string option; 199 199 } 200 200 201 201 let input_jsont = 202 202 Jsont.Object.map ~kind:"Input" 203 - (fun _typ repo collection rkey swap_record swap_commit -> { repo; collection; rkey; swap_record; swap_commit }) 203 + (fun _typ collection repo rkey swap_commit swap_record -> { collection; repo; rkey; swap_commit; swap_record }) 204 204 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.deleteRecord#input" ~enc:(fun _ -> "com.atproto.repo.deleteRecord#input") 205 + |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 205 206 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 206 - |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 207 207 |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 208 + |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 208 209 |> Jsont.Object.opt_mem "swapRecord" Jsont.string ~enc:(fun r -> r.swap_record) 209 - |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 210 210 |> Jsont.Object.finish 211 211 212 212 type output = { ··· 223 223 end 224 224 module CreateRecord = struct 225 225 type input = { 226 - repo : string; 227 226 collection : string; 227 + record : Jsont.json; 228 + repo : string; 228 229 rkey : string option; 230 + swap_commit : string option; 229 231 validate : bool option; 230 - record : Jsont.json; 231 - swap_commit : string option; 232 232 } 233 233 234 234 let input_jsont = 235 235 Jsont.Object.map ~kind:"Input" 236 - (fun _typ repo collection rkey validate record swap_commit -> { repo; collection; rkey; validate; record; swap_commit }) 236 + (fun _typ collection record repo rkey swap_commit validate -> { collection; record; repo; rkey; swap_commit; validate }) 237 237 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.createRecord#input" ~enc:(fun _ -> "com.atproto.repo.createRecord#input") 238 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 239 238 |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 239 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 240 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 240 241 |> Jsont.Object.opt_mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 242 + |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 241 243 |> Jsont.Object.opt_mem "validate" Jsont.bool ~enc:(fun r -> r.validate) 242 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 243 - |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 244 244 |> Jsont.Object.finish 245 245 246 246 type output = { 247 - uri : string; 248 247 cid : string; 249 248 commit : Defs.commit_meta option; 249 + uri : string; 250 250 validation_status : string option; 251 251 } 252 252 253 253 let output_jsont = 254 254 Jsont.Object.map ~kind:"Output" 255 - (fun _typ uri cid commit validation_status -> { uri; cid; commit; validation_status }) 255 + (fun _typ cid commit uri validation_status -> { cid; commit; uri; validation_status }) 256 256 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.createRecord#output" ~enc:(fun _ -> "com.atproto.repo.createRecord#output") 257 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 258 257 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 259 258 |> Jsont.Object.opt_mem "commit" Defs.commit_meta_jsont ~enc:(fun r -> r.commit) 259 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 260 260 |> Jsont.Object.opt_mem "validationStatus" Jsont.string ~enc:(fun r -> r.validation_status) 261 261 |> Jsont.Object.finish 262 262
+18 -18
lexicons/atproto/atp_lexicon_atproto.mli
··· 16 16 module StrongRef : sig 17 17 18 18 type main = { 19 - uri : string; 20 19 cid : string; 20 + uri : string; 21 21 } 22 22 23 23 (** Jsont codec for {!type:main}. *) ··· 38 38 module ListRecords : sig 39 39 40 40 type record = { 41 - uri : string; 42 41 cid : string; 42 + uri : string; 43 43 value : Jsont.json; 44 44 } 45 45 ··· 50 50 51 51 (** Query/procedure parameters. *) 52 52 type params = { 53 - repo : string; (** The handle or DID of the repo. *) 54 53 collection : string; (** The NSID of the record type. *) 54 + cursor : string option; 55 55 limit : int option; (** The number of records to return. *) 56 - cursor : string option; 56 + repo : string; (** The handle or DID of the repo. *) 57 57 reverse : bool option; (** Flag to reverse the order of the returned records. *) 58 58 } 59 59 ··· 75 75 76 76 (** Query/procedure parameters. *) 77 77 type params = { 78 - repo : string; (** The handle or DID of the repo. *) 78 + cid : string option; (** The CID of the version of the record. If not specified, then return the most recent version. *) 79 79 collection : string; (** The NSID of the record collection. *) 80 + repo : string; (** The handle or DID of the repo. *) 80 81 rkey : string; (** The Record Key. *) 81 - cid : string option; (** The CID of the version of the record. If not specified, then return the most recent version. *) 82 82 } 83 83 84 84 (** Jsont codec for {!type:params}. *) ··· 86 86 87 87 88 88 type output = { 89 - uri : string; 90 89 cid : string option; 90 + uri : string; 91 91 value : Jsont.json; 92 92 } 93 93 ··· 100 100 101 101 102 102 type input = { 103 - repo : string; (** The handle or DID of the repo (aka, current account). *) 104 103 collection : string; (** The NSID of the record collection. *) 105 - rkey : string; (** The Record Key. *) 106 - validate : bool option; (** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. *) 107 104 record : Jsont.json; (** The record to write. *) 108 - swap_record : string option; (** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation *) 105 + repo : string; (** The handle or DID of the repo (aka, current account). *) 106 + rkey : string; (** The Record Key. *) 109 107 swap_commit : string option; (** Compare and swap with the previous commit by CID. *) 108 + swap_record : string option; (** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation *) 109 + validate : bool option; (** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. *) 110 110 } 111 111 112 112 (** Jsont codec for {!type:input}. *) ··· 114 114 115 115 116 116 type output = { 117 - uri : string; 118 117 cid : string; 119 118 commit : Defs.commit_meta option; 119 + uri : string; 120 120 validation_status : string option; 121 121 } 122 122 ··· 129 129 130 130 131 131 type input = { 132 - repo : string; (** The handle or DID of the repo (aka, current account). *) 133 132 collection : string; (** The NSID of the record collection. *) 133 + repo : string; (** The handle or DID of the repo (aka, current account). *) 134 134 rkey : string; (** The Record Key. *) 135 - swap_record : string option; (** Compare and swap with the previous record by CID. *) 136 135 swap_commit : string option; (** Compare and swap with the previous commit by CID. *) 136 + swap_record : string option; (** Compare and swap with the previous record by CID. *) 137 137 } 138 138 139 139 (** Jsont codec for {!type:input}. *) ··· 153 153 154 154 155 155 type input = { 156 - repo : string; (** The handle or DID of the repo (aka, current account). *) 157 156 collection : string; (** The NSID of the record collection. *) 158 - rkey : string option; (** The Record Key. *) 159 - validate : bool option; (** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. *) 160 157 record : Jsont.json; (** The record itself. Must contain a $type field. *) 158 + repo : string; (** The handle or DID of the repo (aka, current account). *) 159 + rkey : string option; (** The Record Key. *) 161 160 swap_commit : string option; (** Compare and swap with the previous commit by CID. *) 161 + validate : bool option; (** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. *) 162 162 } 163 163 164 164 (** Jsont codec for {!type:input}. *) ··· 166 166 167 167 168 168 type output = { 169 - uri : string; 170 169 cid : string; 171 170 commit : Defs.commit_meta option; 171 + uri : string; 172 172 validation_status : string option; 173 173 } 174 174
+1685 -1685
lexicons/bsky/atp_lexicon_bsky.ml
··· 17 17 module Atproto = struct 18 18 module Label = struct 19 19 module Defs = struct 20 - type label = { 21 - ver : int option; 22 - src : string; 23 - uri : string; 24 - cid : string option; 25 - val_ : string; 26 - neg : bool option; 27 - cts : string; 28 - exp : string option; 29 - sig_ : string option; 30 - } 31 - 32 - let label_jsont = 33 - Jsont.Object.map ~kind:"Label" 34 - (fun _typ ver src uri cid val_ neg cts exp sig_ -> { ver; src; uri; cid; val_; neg; cts; exp; sig_ }) 35 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#label" ~enc:(fun _ -> "com.atproto.label.defs#label") 36 - |> Jsont.Object.opt_mem "ver" Jsont.int ~enc:(fun r -> r.ver) 37 - |> Jsont.Object.mem "src" Jsont.string ~enc:(fun r -> r.src) 38 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 39 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 40 - |> Jsont.Object.mem "val" Jsont.string ~enc:(fun r -> r.val_) 41 - |> Jsont.Object.opt_mem "neg" Jsont.bool ~enc:(fun r -> r.neg) 42 - |> Jsont.Object.mem "cts" Jsont.string ~enc:(fun r -> r.cts) 43 - |> Jsont.Object.opt_mem "exp" Jsont.string ~enc:(fun r -> r.exp) 44 - |> Jsont.Object.opt_mem "sig" Jsont.binary_string ~enc:(fun r -> r.sig_) 45 - |> Jsont.Object.finish 46 - 47 20 type self_label = { 48 21 val_ : string; 49 22 } ··· 56 29 |> Jsont.Object.finish 57 30 58 31 type label_value_definition_strings = { 32 + description : string; 59 33 lang : string; 60 34 name : string; 61 - description : string; 62 35 } 63 36 64 37 let label_value_definition_strings_jsont = 65 38 Jsont.Object.map ~kind:"Label_value_definition_strings" 66 - (fun _typ lang name description -> { lang; name; description }) 39 + (fun _typ description lang name -> { description; lang; name }) 67 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) 68 42 |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 69 43 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 70 - |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 71 44 |> Jsont.Object.finish 72 45 73 46 type label_value = string 74 47 let label_value_jsont = Jsont.string 75 48 49 + type label = { 50 + cid : string option; 51 + cts : string; 52 + exp : string option; 53 + neg : bool option; 54 + sig_ : string option; 55 + src : string; 56 + uri : string; 57 + val_ : string; 58 + ver : int option; 59 + } 60 + 61 + let label_jsont = 62 + Jsont.Object.map ~kind:"Label" 63 + (fun _typ cid cts exp neg sig_ src uri val_ ver -> { cid; cts; exp; neg; sig_; src; uri; val_; ver }) 64 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#label" ~enc:(fun _ -> "com.atproto.label.defs#label") 65 + |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 66 + |> Jsont.Object.mem "cts" Jsont.string ~enc:(fun r -> r.cts) 67 + |> Jsont.Object.opt_mem "exp" Jsont.string ~enc:(fun r -> r.exp) 68 + |> Jsont.Object.opt_mem "neg" Jsont.bool ~enc:(fun r -> r.neg) 69 + |> Jsont.Object.opt_mem "sig" Jsont.binary_string ~enc:(fun r -> r.sig_) 70 + |> Jsont.Object.mem "src" Jsont.string ~enc:(fun r -> r.src) 71 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 72 + |> Jsont.Object.mem "val" Jsont.string ~enc:(fun r -> r.val_) 73 + |> Jsont.Object.opt_mem "ver" Jsont.int ~enc:(fun r -> r.ver) 74 + |> Jsont.Object.finish 75 + 76 76 type self_labels = { 77 77 values : self_label list; 78 78 } ··· 85 85 |> Jsont.Object.finish 86 86 87 87 type label_value_definition = { 88 - identifier : string; 89 - severity : string; 88 + adult_only : bool option; 90 89 blurs : string; 91 90 default_setting : string option; 92 - adult_only : bool option; 91 + identifier : string; 93 92 locales : label_value_definition_strings list; 93 + severity : string; 94 94 } 95 95 96 96 let label_value_definition_jsont = 97 97 Jsont.Object.map ~kind:"Label_value_definition" 98 - (fun _typ identifier severity blurs default_setting adult_only locales -> { identifier; severity; blurs; default_setting; adult_only; locales }) 98 + (fun _typ adult_only blurs default_setting identifier locales severity -> { adult_only; blurs; default_setting; identifier; locales; severity }) 99 99 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.label.defs#labelValueDefinition" ~enc:(fun _ -> "com.atproto.label.defs#labelValueDefinition") 100 - |> Jsont.Object.mem "identifier" Jsont.string ~enc:(fun r -> r.identifier) 101 - |> Jsont.Object.mem "severity" Jsont.string ~enc:(fun r -> r.severity) 100 + |> Jsont.Object.opt_mem "adultOnly" Jsont.bool ~enc:(fun r -> r.adult_only) 102 101 |> Jsont.Object.mem "blurs" Jsont.string ~enc:(fun r -> r.blurs) 103 102 |> Jsont.Object.opt_mem "defaultSetting" Jsont.string ~enc:(fun r -> r.default_setting) 104 - |> Jsont.Object.opt_mem "adultOnly" Jsont.bool ~enc:(fun r -> r.adult_only) 103 + |> Jsont.Object.mem "identifier" Jsont.string ~enc:(fun r -> r.identifier) 105 104 |> Jsont.Object.mem "locales" (Jsont.list label_value_definition_strings_jsont) ~enc:(fun r -> r.locales) 105 + |> Jsont.Object.mem "severity" Jsont.string ~enc:(fun r -> r.severity) 106 106 |> Jsont.Object.finish 107 107 108 108 end ··· 110 110 module Repo = struct 111 111 module StrongRef = struct 112 112 type main = { 113 - uri : string; 114 113 cid : string; 114 + uri : string; 115 115 } 116 116 117 117 let main_jsont = 118 118 Jsont.Object.map ~kind:"Main" 119 - (fun _typ uri cid -> { uri; cid }) 119 + (fun _typ cid uri -> { cid; uri }) 120 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) 121 122 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 122 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 123 123 |> Jsont.Object.finish 124 124 125 125 end 126 126 end 127 127 module Moderation = struct 128 128 module Defs = struct 129 + type subject_type = string 130 + let subject_type_jsont = Jsont.string 131 + 132 + type reason_violation = string 133 + let reason_violation_jsont = Jsont.string 134 + 129 135 type reason_type = string 130 136 let reason_type_jsont = Jsont.string 131 137 132 138 type reason_spam = string 133 139 let reason_spam_jsont = Jsont.string 134 140 135 - type reason_violation = string 136 - let reason_violation_jsont = Jsont.string 137 - 138 - type reason_misleading = string 139 - let reason_misleading_jsont = Jsont.string 140 - 141 141 type reason_sexual = string 142 142 let reason_sexual_jsont = Jsont.string 143 143 ··· 147 147 type reason_other = string 148 148 let reason_other_jsont = Jsont.string 149 149 150 + type reason_misleading = string 151 + let reason_misleading_jsont = Jsont.string 152 + 150 153 type reason_appeal = string 151 154 let reason_appeal_jsont = Jsont.string 152 - 153 - type subject_type = string 154 - let subject_type_jsont = Jsont.string 155 155 156 156 end 157 157 end ··· 176 176 end 177 177 module Richtext = struct 178 178 module Facet = struct 179 + type tag = { 180 + tag : string; 181 + } 182 + 183 + let tag_jsont = 184 + Jsont.Object.map ~kind:"Tag" 185 + (fun _typ tag -> { tag }) 186 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#tag" ~enc:(fun _ -> "app.bsky.richtext.facet#tag") 187 + |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 188 + |> Jsont.Object.finish 189 + 179 190 type mention = { 180 191 did : string; 181 192 } ··· 196 207 (fun _typ uri -> { uri }) 197 208 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#link" ~enc:(fun _ -> "app.bsky.richtext.facet#link") 198 209 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 199 - |> Jsont.Object.finish 200 - 201 - type tag = { 202 - tag : string; 203 - } 204 - 205 - let tag_jsont = 206 - Jsont.Object.map ~kind:"Tag" 207 - (fun _typ tag -> { tag }) 208 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#tag" ~enc:(fun _ -> "app.bsky.richtext.facet#tag") 209 - |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 210 210 |> Jsont.Object.finish 211 211 212 212 type byte_slice = { 213 - byte_start : int; 214 213 byte_end : int; 214 + byte_start : int; 215 215 } 216 216 217 217 let byte_slice_jsont = 218 218 Jsont.Object.map ~kind:"Byte_slice" 219 - (fun _typ byte_start byte_end -> { byte_start; byte_end }) 219 + (fun _typ byte_end byte_start -> { byte_end; byte_start }) 220 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) 221 222 |> Jsont.Object.mem "byteStart" Jsont.int ~enc:(fun r -> r.byte_start) 222 - |> Jsont.Object.mem "byteEnd" Jsont.int ~enc:(fun r -> r.byte_end) 223 223 |> Jsont.Object.finish 224 224 225 225 type main = { 226 - index : byte_slice; 227 226 features : Jsont.json list; 227 + index : byte_slice; 228 228 } 229 229 230 230 let main_jsont = 231 231 Jsont.Object.map ~kind:"Main" 232 - (fun _typ index features -> { index; features }) 232 + (fun _typ features index -> { features; index }) 233 233 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet" ~enc:(fun _ -> "app.bsky.richtext.facet") 234 + |> Jsont.Object.mem "features" (Jsont.list Jsont.json) ~enc:(fun r -> r.features) 234 235 |> Jsont.Object.mem "index" byte_slice_jsont ~enc:(fun r -> r.index) 235 - |> Jsont.Object.mem "features" (Jsont.list Jsont.json) ~enc:(fun r -> r.features) 236 236 |> Jsont.Object.finish 237 237 238 238 end ··· 259 259 end 260 260 module Ageassurance = struct 261 261 module Defs = struct 262 - type access = string 263 - let access_jsont = Jsont.string 264 - 265 262 type status = string 266 263 let status_jsont = Jsont.string 267 264 ··· 276 273 |> Jsont.Object.opt_mem "accountCreatedAt" Jsont.string ~enc:(fun r -> r.account_created_at) 277 274 |> Jsont.Object.finish 278 275 279 - type config_region = { 280 - country_code : string; 281 - region_code : string option; 282 - min_access_age : int; 283 - rules : Jsont.json list; 284 - } 285 - 286 - let config_region_jsont = 287 - Jsont.Object.map ~kind:"Config_region" 288 - (fun _typ country_code region_code min_access_age rules -> { country_code; region_code; min_access_age; rules }) 289 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegion" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegion") 290 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 291 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 292 - |> Jsont.Object.mem "minAccessAge" Jsont.int ~enc:(fun r -> r.min_access_age) 293 - |> Jsont.Object.mem "rules" (Jsont.list Jsont.json) ~enc:(fun r -> r.rules) 294 - |> Jsont.Object.finish 295 - 296 276 type event = { 297 - created_at : string; 277 + access : string; 298 278 attempt_id : string; 299 - status : string; 300 - access : string; 279 + complete_ip : string option; 280 + complete_ua : string option; 301 281 country_code : string; 302 - region_code : string option; 282 + created_at : string; 303 283 email : string option; 304 284 init_ip : string option; 305 285 init_ua : string option; 306 - complete_ip : string option; 307 - complete_ua : string option; 286 + region_code : string option; 287 + status : string; 308 288 } 309 289 310 290 let event_jsont = 311 291 Jsont.Object.map ~kind:"Event" 312 - (fun _typ created_at attempt_id status access country_code region_code email init_ip init_ua complete_ip complete_ua -> { created_at; attempt_id; status; access; country_code; region_code; email; init_ip; init_ua; complete_ip; complete_ua }) 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 }) 313 293 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#event" ~enc:(fun _ -> "app.bsky.ageassurance.defs#event") 314 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 315 - |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 316 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 317 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) 318 298 |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 319 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 299 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 320 300 |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 321 301 |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 322 302 |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 323 - |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 324 - |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_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) 325 305 |> Jsont.Object.finish 326 306 307 + type config_region = { 308 + country_code : string; 309 + min_access_age : int; 310 + region_code : string option; 311 + rules : Jsont.json list; 312 + } 313 + 314 + let config_region_jsont = 315 + Jsont.Object.map ~kind:"Config_region" 316 + (fun _typ country_code min_access_age region_code rules -> { country_code; min_access_age; region_code; rules }) 317 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegion" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegion") 318 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 319 + |> Jsont.Object.mem "minAccessAge" Jsont.int ~enc:(fun r -> r.min_access_age) 320 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 321 + |> Jsont.Object.mem "rules" (Jsont.list Jsont.json) ~enc:(fun r -> r.rules) 322 + |> Jsont.Object.finish 323 + 324 + type access = string 325 + let access_jsont = Jsont.string 326 + 327 327 type state = { 328 + access : access; 328 329 last_initiated_at : string option; 329 330 status : status; 330 - access : access; 331 331 } 332 332 333 333 let state_jsont = 334 334 Jsont.Object.map ~kind:"State" 335 - (fun _typ last_initiated_at status access -> { last_initiated_at; status; access }) 335 + (fun _typ access last_initiated_at status -> { access; last_initiated_at; status }) 336 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) 337 338 |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 338 339 |> Jsont.Object.mem "status" status_jsont ~enc:(fun r -> r.status) 339 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 340 340 |> Jsont.Object.finish 341 341 342 - type config = { 343 - regions : config_region list; 344 - } 345 - 346 - let config_jsont = 347 - Jsont.Object.map ~kind:"Config" 348 - (fun _typ regions -> { regions }) 349 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#config" ~enc:(fun _ -> "app.bsky.ageassurance.defs#config") 350 - |> Jsont.Object.mem "regions" (Jsont.list config_region_jsont) ~enc:(fun r -> r.regions) 351 - |> Jsont.Object.finish 352 - 353 - type config_region_rule_default = { 342 + type config_region_rule_if_declared_under_age = { 354 343 access : access; 344 + age : int; 355 345 } 356 346 357 - let config_region_rule_default_jsont = 358 - Jsont.Object.map ~kind:"Config_region_rule_default" 359 - (fun _typ access -> { access }) 360 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleDefault" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleDefault") 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") 361 351 |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 352 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 362 353 |> Jsont.Object.finish 363 354 364 355 type config_region_rule_if_declared_over_age = { 365 - age : int; 366 356 access : access; 357 + age : int; 367 358 } 368 359 369 360 let config_region_rule_if_declared_over_age_jsont = 370 361 Jsont.Object.map ~kind:"Config_region_rule_if_declared_over_age" 371 - (fun _typ age access -> { age; access }) 362 + (fun _typ access age -> { access; age }) 372 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) 373 365 |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 374 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 375 366 |> Jsont.Object.finish 376 367 377 - type config_region_rule_if_declared_under_age = { 378 - age : int; 368 + type config_region_rule_if_assured_under_age = { 379 369 access : access; 370 + age : int; 380 371 } 381 372 382 - let config_region_rule_if_declared_under_age_jsont = 383 - Jsont.Object.map ~kind:"Config_region_rule_if_declared_under_age" 384 - (fun _typ age access -> { age; access }) 385 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge") 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) 386 378 |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 387 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 388 379 |> Jsont.Object.finish 389 380 390 381 type config_region_rule_if_assured_over_age = { 391 - age : int; 392 382 access : access; 383 + age : int; 393 384 } 394 385 395 386 let config_region_rule_if_assured_over_age_jsont = 396 387 Jsont.Object.map ~kind:"Config_region_rule_if_assured_over_age" 397 - (fun _typ age access -> { age; access }) 388 + (fun _typ access age -> { access; age }) 398 389 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge") 399 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 400 390 |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 391 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 401 392 |> Jsont.Object.finish 402 393 403 - type config_region_rule_if_assured_under_age = { 404 - age : int; 394 + type config_region_rule_if_account_older_than = { 405 395 access : access; 396 + date : string; 406 397 } 407 398 408 - let config_region_rule_if_assured_under_age_jsont = 409 - Jsont.Object.map ~kind:"Config_region_rule_if_assured_under_age" 410 - (fun _typ age access -> { age; access }) 411 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge") 412 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 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") 413 403 |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 404 + |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 414 405 |> Jsont.Object.finish 415 406 416 407 type config_region_rule_if_account_newer_than = { 408 + access : access; 417 409 date : string; 418 - access : access; 419 410 } 420 411 421 412 let config_region_rule_if_account_newer_than_jsont = 422 413 Jsont.Object.map ~kind:"Config_region_rule_if_account_newer_than" 423 - (fun _typ date access -> { date; access }) 414 + (fun _typ access date -> { access; date }) 424 415 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan") 425 - |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 426 416 |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 417 + |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 427 418 |> Jsont.Object.finish 428 419 429 - type config_region_rule_if_account_older_than = { 430 - date : string; 420 + type config_region_rule_default = { 431 421 access : access; 432 422 } 433 423 434 - let config_region_rule_if_account_older_than_jsont = 435 - Jsont.Object.map ~kind:"Config_region_rule_if_account_older_than" 436 - (fun _typ date access -> { date; access }) 437 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan") 438 - |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 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") 439 428 |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 440 429 |> Jsont.Object.finish 441 430 431 + type config = { 432 + regions : config_region list; 433 + } 434 + 435 + let config_jsont = 436 + Jsont.Object.map ~kind:"Config" 437 + (fun _typ regions -> { regions }) 438 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#config" ~enc:(fun _ -> "app.bsky.ageassurance.defs#config") 439 + |> Jsont.Object.mem "regions" (Jsont.list config_region_jsont) ~enc:(fun r -> r.regions) 440 + |> Jsont.Object.finish 441 + 442 442 end 443 443 module Begin = struct 444 444 type input = { 445 + country_code : string; 445 446 email : string; 446 447 language : string; 447 - country_code : string; 448 448 region_code : string option; 449 449 } 450 450 451 451 let input_jsont = 452 452 Jsont.Object.map ~kind:"Input" 453 - (fun _typ email language country_code region_code -> { email; language; country_code; region_code }) 453 + (fun _typ country_code email language region_code -> { country_code; email; language; region_code }) 454 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) 455 456 |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 456 457 |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 457 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 458 458 |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 459 459 |> Jsont.Object.finish 460 460 ··· 482 482 |> Jsont.Object.finish 483 483 484 484 type output = { 485 - state : Defs.state; 486 485 metadata : Defs.state_metadata; 486 + state : Defs.state; 487 487 } 488 488 489 489 let output_jsont = 490 490 Jsont.Object.map ~kind:"Output" 491 - (fun _typ state metadata -> { state; metadata }) 491 + (fun _typ metadata state -> { metadata; state }) 492 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 "state" Defs.state_jsont ~enc:(fun r -> r.state) 494 493 |> Jsont.Object.mem "metadata" Defs.state_metadata_jsont ~enc:(fun r -> r.metadata) 494 + |> Jsont.Object.mem "state" Defs.state_jsont ~enc:(fun r -> r.state) 495 495 |> Jsont.Object.finish 496 496 497 497 end ··· 516 516 |> Jsont.Object.finish 517 517 518 518 type labeler_policies = { 519 - label_values : Com.Atproto.Label.Defs.label_value list; 520 519 label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; 520 + label_values : Com.Atproto.Label.Defs.label_value list; 521 521 } 522 522 523 523 let labeler_policies_jsont = 524 524 Jsont.Object.map ~kind:"Labeler_policies" 525 - (fun _typ label_values label_value_definitions -> { label_values; label_value_definitions }) 525 + (fun _typ label_value_definitions label_values -> { label_value_definitions; label_values }) 526 526 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerPolicies" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerPolicies") 527 + |> Jsont.Object.opt_mem "labelValueDefinitions" (Jsont.list Com.Atproto.Label.Defs.label_value_definition_jsont) ~enc:(fun r -> r.label_value_definitions) 527 528 |> Jsont.Object.mem "labelValues" (Jsont.list Com.Atproto.Label.Defs.label_value_jsont) ~enc:(fun r -> r.label_values) 528 - |> Jsont.Object.opt_mem "labelValueDefinitions" (Jsont.list Com.Atproto.Label.Defs.label_value_definition_jsont) ~enc:(fun r -> r.label_value_definitions) 529 529 |> Jsont.Object.finish 530 530 531 - type labeler_view = { 532 - uri : string; 531 + type labeler_view_detailed = { 533 532 cid : string; 534 533 creator : Jsont.json; 535 - like_count : int option; 536 - viewer : Jsont.json option; 537 534 indexed_at : string; 538 535 labels : Com.Atproto.Label.Defs.label list option; 536 + like_count : int option; 537 + policies : Jsont.json; 538 + reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 539 + subject_collections : string list option; 540 + subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 541 + uri : string; 542 + viewer : Jsont.json option; 539 543 } 540 544 541 - let labeler_view_jsont = 542 - Jsont.Object.map ~kind:"Labeler_view" 543 - (fun _typ uri cid creator like_count viewer indexed_at labels -> { uri; cid; creator; like_count; viewer; indexed_at; labels }) 544 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerView" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerView") 545 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 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") 546 549 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 547 550 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 551 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 552 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 548 553 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 554 + |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 555 + |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 556 + |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 557 + |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 558 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 549 559 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 550 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 551 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 552 560 |> Jsont.Object.finish 553 561 554 - type labeler_view_detailed = { 555 - uri : string; 562 + type labeler_view = { 556 563 cid : string; 557 564 creator : Jsont.json; 558 - policies : Jsont.json; 565 + indexed_at : string; 566 + labels : Com.Atproto.Label.Defs.label list option; 559 567 like_count : int option; 568 + uri : string; 560 569 viewer : Jsont.json option; 561 - indexed_at : string; 562 - labels : Com.Atproto.Label.Defs.label list option; 563 - reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 564 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 565 - subject_collections : string list option; 566 570 } 567 571 568 - let labeler_view_detailed_jsont = 569 - Jsont.Object.map ~kind:"Labeler_view_detailed" 570 - (fun _typ uri cid creator policies like_count viewer indexed_at labels reason_types subject_types subject_collections -> { uri; cid; creator; policies; like_count; viewer; indexed_at; labels; reason_types; subject_types; subject_collections }) 571 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewDetailed" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewDetailed") 572 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 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") 573 576 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 574 577 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 575 - |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 578 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 579 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 576 580 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 581 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 577 582 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 578 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 579 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 580 - |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 581 - |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 582 - |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 583 583 |> Jsont.Object.finish 584 584 585 585 end 586 586 module Service = struct 587 587 type main = { 588 + created_at : string; 589 + labels : Com.Atproto.Label.Defs.self_labels option; 588 590 policies : Jsont.json; 589 - labels : Com.Atproto.Label.Defs.self_labels option; 590 - created_at : string; 591 591 reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 592 + subject_collections : string list option; 592 593 subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 593 - subject_collections : string list option; 594 594 } 595 595 596 596 let main_jsont = 597 597 Jsont.Object.map ~kind:"Main" 598 - (fun _typ policies labels created_at reason_types subject_types subject_collections -> { policies; labels; created_at; reason_types; subject_types; subject_collections }) 598 + (fun _typ created_at labels policies reason_types subject_collections subject_types -> { created_at; labels; policies; reason_types; subject_collections; subject_types }) 599 599 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.service" ~enc:(fun _ -> "app.bsky.labeler.service") 600 - |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 601 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 602 600 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 601 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 602 + |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 603 603 |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 604 + |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 604 605 |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 605 - |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 606 606 |> Jsont.Object.finish 607 607 608 608 end 609 609 module GetServices = struct 610 610 type params = { 611 - dids : string list; 612 611 detailed : bool option; 612 + dids : string list; 613 613 } 614 614 615 615 let params_jsont = 616 616 Jsont.Object.map ~kind:"Params" 617 - (fun dids detailed -> { 618 - dids; 617 + (fun detailed dids -> { 619 618 detailed; 619 + dids; 620 620 }) 621 - |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) 622 - ~enc:(fun r -> r.dids) 623 621 |> Jsont.Object.opt_mem "detailed" Jsont.bool 624 622 ~enc:(fun r -> r.detailed) 623 + |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) 624 + ~enc:(fun r -> r.dids) 625 625 |> Jsont.Object.finish 626 626 627 627 type output = { ··· 646 646 module GetUploadLimits = struct 647 647 type output = { 648 648 can_upload : bool; 649 - remaining_daily_videos : int option; 650 - remaining_daily_bytes : int option; 651 - message : string option; 652 649 error : string option; 650 + message : string option; 651 + remaining_daily_bytes : int option; 652 + remaining_daily_videos : int option; 653 653 } 654 654 655 655 let output_jsont = 656 656 Jsont.Object.map ~kind:"Output" 657 - (fun _typ can_upload remaining_daily_videos remaining_daily_bytes message error -> { can_upload; remaining_daily_videos; remaining_daily_bytes; message; error }) 657 + (fun _typ can_upload error message remaining_daily_bytes remaining_daily_videos -> { can_upload; error; message; remaining_daily_bytes; remaining_daily_videos }) 658 658 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getUploadLimits#output" ~enc:(fun _ -> "app.bsky.video.getUploadLimits#output") 659 659 |> Jsont.Object.mem "canUpload" Jsont.bool ~enc:(fun r -> r.can_upload) 660 - |> Jsont.Object.opt_mem "remainingDailyVideos" Jsont.int ~enc:(fun r -> r.remaining_daily_videos) 661 - |> Jsont.Object.opt_mem "remainingDailyBytes" Jsont.int ~enc:(fun r -> r.remaining_daily_bytes) 662 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 663 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 664 |> Jsont.Object.finish 665 665 666 666 end 667 667 module Defs = struct 668 668 type job_status = { 669 - job_id : string; 669 + blob : Atp.Blob_ref.t option; 670 670 did : string; 671 - state : string; 672 - progress : int option; 673 - blob : Atp.Blob_ref.t option; 674 671 error : string option; 672 + job_id : string; 675 673 message : string option; 674 + progress : int option; 675 + state : string; 676 676 } 677 677 678 678 let job_status_jsont = 679 679 Jsont.Object.map ~kind:"Job_status" 680 - (fun _typ job_id did state progress blob error message -> { job_id; did; state; progress; blob; error; message }) 680 + (fun _typ blob did error job_id message progress state -> { blob; did; error; job_id; message; progress; state }) 681 681 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.defs#jobStatus" ~enc:(fun _ -> "app.bsky.video.defs#jobStatus") 682 - |> Jsont.Object.mem "jobId" Jsont.string ~enc:(fun r -> r.job_id) 683 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 684 - |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 685 - |> Jsont.Object.opt_mem "progress" Jsont.int ~enc:(fun r -> r.progress) 686 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) 687 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) 688 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 689 |> Jsont.Object.finish 690 690 691 691 end ··· 734 734 end 735 735 module Embed = struct 736 736 module External = struct 737 - type external_ = { 738 - uri : string; 739 - title : string; 740 - description : string; 741 - thumb : Atp.Blob_ref.t option; 742 - } 743 - 744 - let external__jsont = 745 - Jsont.Object.map ~kind:"External_" 746 - (fun _typ uri title description thumb -> { uri; title; description; thumb }) 747 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 748 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 749 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 750 - |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 751 - |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 752 - |> Jsont.Object.finish 753 - 754 737 type view_external = { 755 - uri : string; 756 - title : string; 757 738 description : string; 758 739 thumb : string option; 740 + title : string; 741 + uri : string; 759 742 } 760 743 761 744 let view_external_jsont = 762 745 Jsont.Object.map ~kind:"View_external" 763 - (fun _typ uri title description thumb -> { uri; title; description; thumb }) 746 + (fun _typ description thumb title uri -> { description; thumb; title; uri }) 764 747 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#viewExternal" ~enc:(fun _ -> "app.bsky.embed.external#viewExternal") 765 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 766 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 767 748 |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 768 749 |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 750 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 751 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 769 752 |> Jsont.Object.finish 770 753 771 - type main = { 772 - external_ : Jsont.json; 754 + type external_ = { 755 + description : string; 756 + thumb : Atp.Blob_ref.t option; 757 + title : string; 758 + uri : string; 773 759 } 774 760 775 - let main_jsont = 776 - Jsont.Object.map ~kind:"Main" 777 - (fun _typ external_ -> { external_ }) 778 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 779 - |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 761 + let external__jsont = 762 + Jsont.Object.map ~kind:"External_" 763 + (fun _typ description thumb title uri -> { description; thumb; title; uri }) 764 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 765 + |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 766 + |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 767 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 768 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 780 769 |> Jsont.Object.finish 781 770 782 771 type view = { ··· 790 779 |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 791 780 |> Jsont.Object.finish 792 781 782 + type main = { 783 + external_ : Jsont.json; 784 + } 785 + 786 + let main_jsont = 787 + Jsont.Object.map ~kind:"Main" 788 + (fun _typ external_ -> { external_ }) 789 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 790 + |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 791 + |> Jsont.Object.finish 792 + 793 793 end 794 794 module Defs = struct 795 795 type aspect_ratio = { 796 + height : int; 796 797 width : int; 797 - height : int; 798 798 } 799 799 800 800 let aspect_ratio_jsont = 801 801 Jsont.Object.map ~kind:"Aspect_ratio" 802 - (fun _typ width height -> { width; height }) 802 + (fun _typ height width -> { height; width }) 803 803 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.defs#aspectRatio" ~enc:(fun _ -> "app.bsky.embed.defs#aspectRatio") 804 + |> Jsont.Object.mem "height" Jsont.int ~enc:(fun r -> r.height) 804 805 |> Jsont.Object.mem "width" Jsont.int ~enc:(fun r -> r.width) 805 - |> Jsont.Object.mem "height" Jsont.int ~enc:(fun r -> r.height) 806 806 |> Jsont.Object.finish 807 807 808 808 end 809 809 module Images = struct 810 - type image = { 811 - image : Atp.Blob_ref.t; 810 + type view_image = { 812 811 alt : string; 813 812 aspect_ratio : Jsont.json option; 813 + fullsize : string; 814 + thumb : string; 814 815 } 815 816 816 - let image_jsont = 817 - Jsont.Object.map ~kind:"Image" 818 - (fun _typ image alt aspect_ratio -> { image; alt; aspect_ratio }) 819 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#image" ~enc:(fun _ -> "app.bsky.embed.images#image") 820 - |> Jsont.Object.mem "image" Atp.Blob_ref.jsont ~enc:(fun r -> r.image) 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 821 |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 822 822 |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 823 + |> Jsont.Object.mem "fullsize" Jsont.string ~enc:(fun r -> r.fullsize) 824 + |> Jsont.Object.mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 823 825 |> Jsont.Object.finish 824 826 825 - type view_image = { 826 - thumb : string; 827 - fullsize : string; 827 + type image = { 828 828 alt : string; 829 829 aspect_ratio : Jsont.json option; 830 + image : Atp.Blob_ref.t; 830 831 } 831 832 832 - let view_image_jsont = 833 - Jsont.Object.map ~kind:"View_image" 834 - (fun _typ thumb fullsize alt aspect_ratio -> { thumb; fullsize; alt; aspect_ratio }) 835 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#viewImage" ~enc:(fun _ -> "app.bsky.embed.images#viewImage") 836 - |> Jsont.Object.mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 837 - |> Jsont.Object.mem "fullsize" Jsont.string ~enc:(fun r -> r.fullsize) 833 + let image_jsont = 834 + Jsont.Object.map ~kind:"Image" 835 + (fun _typ alt aspect_ratio image -> { alt; aspect_ratio; image }) 836 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#image" ~enc:(fun _ -> "app.bsky.embed.images#image") 838 837 |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 839 838 |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 839 + |> Jsont.Object.mem "image" Atp.Blob_ref.jsont ~enc:(fun r -> r.image) 840 840 |> Jsont.Object.finish 841 841 842 - type main = { 842 + type view = { 843 843 images : Jsont.json list; 844 844 } 845 845 846 - let main_jsont = 847 - Jsont.Object.map ~kind:"Main" 846 + let view_jsont = 847 + Jsont.Object.map ~kind:"View" 848 848 (fun _typ images -> { images }) 849 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images" ~enc:(fun _ -> "app.bsky.embed.images") 849 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#view" ~enc:(fun _ -> "app.bsky.embed.images#view") 850 850 |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 851 851 |> Jsont.Object.finish 852 852 853 - type view = { 853 + type main = { 854 854 images : Jsont.json list; 855 855 } 856 856 857 - let view_jsont = 858 - Jsont.Object.map ~kind:"View" 857 + let main_jsont = 858 + Jsont.Object.map ~kind:"Main" 859 859 (fun _typ images -> { images }) 860 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#view" ~enc:(fun _ -> "app.bsky.embed.images#view") 860 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images" ~enc:(fun _ -> "app.bsky.embed.images") 861 861 |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 862 862 |> Jsont.Object.finish 863 863 864 864 end 865 865 module Video = struct 866 - type caption = { 867 - lang : string; 868 - file : Atp.Blob_ref.t; 869 - } 870 - 871 - let caption_jsont = 872 - Jsont.Object.map ~kind:"Caption" 873 - (fun _typ lang file -> { lang; file }) 874 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#caption" ~enc:(fun _ -> "app.bsky.embed.video#caption") 875 - |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 876 - |> Jsont.Object.mem "file" Atp.Blob_ref.jsont ~enc:(fun r -> r.file) 877 - |> Jsont.Object.finish 878 - 879 866 type view = { 867 + alt : string option; 868 + aspect_ratio : Jsont.json option; 880 869 cid : string; 881 870 playlist : string; 882 871 thumbnail : string option; 883 - alt : string option; 884 - aspect_ratio : Jsont.json option; 885 872 } 886 873 887 874 let view_jsont = 888 875 Jsont.Object.map ~kind:"View" 889 - (fun _typ cid playlist thumbnail alt aspect_ratio -> { cid; playlist; thumbnail; alt; aspect_ratio }) 876 + (fun _typ alt aspect_ratio cid playlist thumbnail -> { alt; aspect_ratio; cid; playlist; thumbnail }) 890 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) 891 880 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 892 881 |> Jsont.Object.mem "playlist" Jsont.string ~enc:(fun r -> r.playlist) 893 882 |> Jsont.Object.opt_mem "thumbnail" Jsont.string ~enc:(fun r -> r.thumbnail) 894 - |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 895 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 883 + |> Jsont.Object.finish 884 + 885 + type caption = { 886 + file : Atp.Blob_ref.t; 887 + lang : string; 888 + } 889 + 890 + let caption_jsont = 891 + Jsont.Object.map ~kind:"Caption" 892 + (fun _typ file lang -> { file; lang }) 893 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#caption" ~enc:(fun _ -> "app.bsky.embed.video#caption") 894 + |> Jsont.Object.mem "file" Atp.Blob_ref.jsont ~enc:(fun r -> r.file) 895 + |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 896 896 |> Jsont.Object.finish 897 897 898 898 type main = { 899 - video : Atp.Blob_ref.t; 900 - captions : Jsont.json list option; 901 899 alt : string option; 902 900 aspect_ratio : Jsont.json option; 901 + captions : Jsont.json list option; 902 + video : Atp.Blob_ref.t; 903 903 } 904 904 905 905 let main_jsont = 906 906 Jsont.Object.map ~kind:"Main" 907 - (fun _typ video captions alt aspect_ratio -> { video; captions; alt; aspect_ratio }) 907 + (fun _typ alt aspect_ratio captions video -> { alt; aspect_ratio; captions; video }) 908 908 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video" ~enc:(fun _ -> "app.bsky.embed.video") 909 - |> Jsont.Object.mem "video" Atp.Blob_ref.jsont ~enc:(fun r -> r.video) 910 - |> Jsont.Object.opt_mem "captions" (Jsont.list Jsont.json) ~enc:(fun r -> r.captions) 911 909 |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 912 910 |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 911 + |> Jsont.Object.opt_mem "captions" (Jsont.list Jsont.json) ~enc:(fun r -> r.captions) 912 + |> Jsont.Object.mem "video" Atp.Blob_ref.jsont ~enc:(fun r -> r.video) 913 913 |> Jsont.Object.finish 914 914 915 915 end 916 916 module RecordWithMedia = struct 917 - type main = { 918 - record : Jsont.json; 919 - media : Jsont.json; 920 - } 921 - 922 - let main_jsont = 923 - Jsont.Object.map ~kind:"Main" 924 - (fun _typ record media -> { record; media }) 925 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia") 926 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 927 - |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 928 - |> Jsont.Object.finish 929 - 930 917 type view = { 931 - record : Jsont.json; 932 918 media : Jsont.json; 919 + record : Jsont.json; 933 920 } 934 921 935 922 let view_jsont = 936 923 Jsont.Object.map ~kind:"View" 937 - (fun _typ record media -> { record; media }) 924 + (fun _typ media record -> { media; record }) 938 925 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia#view" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia#view") 926 + |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 939 927 |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 940 - |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 941 928 |> Jsont.Object.finish 942 929 943 - end 944 - module Record = struct 945 930 type main = { 946 - record : Com.Atproto.Repo.StrongRef.main; 931 + media : Jsont.json; 932 + record : Jsont.json; 947 933 } 948 934 949 935 let main_jsont = 950 936 Jsont.Object.map ~kind:"Main" 951 - (fun _typ record -> { record }) 952 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record" ~enc:(fun _ -> "app.bsky.embed.record") 953 - |> Jsont.Object.mem "record" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.record) 954 - |> Jsont.Object.finish 955 - 956 - type view = { 957 - record : Jsont.json; 958 - } 959 - 960 - let view_jsont = 961 - Jsont.Object.map ~kind:"View" 962 - (fun _typ record -> { record }) 963 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#view" ~enc:(fun _ -> "app.bsky.embed.record#view") 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) 964 940 |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 965 941 |> Jsont.Object.finish 966 942 943 + end 944 + module Record = struct 967 945 type view_record = { 968 - uri : string; 946 + author : Jsont.json; 969 947 cid : string; 970 - author : Jsont.json; 971 - value : Jsont.json; 948 + embeds : Jsont.json list option; 949 + indexed_at : string; 972 950 labels : Com.Atproto.Label.Defs.label list option; 973 - reply_count : int option; 974 - repost_count : int option; 975 951 like_count : int option; 976 952 quote_count : int option; 977 - embeds : Jsont.json list option; 978 - indexed_at : string; 953 + reply_count : int option; 954 + repost_count : int option; 955 + uri : string; 956 + value : Jsont.json; 979 957 } 980 958 981 959 let view_record_jsont = 982 960 Jsont.Object.map ~kind:"View_record" 983 - (fun _typ uri cid author value labels reply_count repost_count like_count quote_count embeds indexed_at -> { uri; cid; author; value; labels; reply_count; repost_count; like_count; quote_count; embeds; indexed_at }) 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 }) 984 962 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewRecord" ~enc:(fun _ -> "app.bsky.embed.record#viewRecord") 985 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 963 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 986 964 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 987 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 988 - |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 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) 989 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) 990 970 |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 991 971 |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 992 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 993 - |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 994 - |> Jsont.Object.opt_mem "embeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.embeds) 995 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 972 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 973 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 996 974 |> Jsont.Object.finish 997 975 998 976 type view_not_found = { 999 - uri : string; 1000 977 not_found : bool; 978 + uri : string; 1001 979 } 1002 980 1003 981 let view_not_found_jsont = 1004 982 Jsont.Object.map ~kind:"View_not_found" 1005 - (fun _typ uri not_found -> { uri; not_found }) 983 + (fun _typ not_found uri -> { not_found; uri }) 1006 984 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewNotFound" ~enc:(fun _ -> "app.bsky.embed.record#viewNotFound") 1007 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1008 985 |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 986 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1009 987 |> Jsont.Object.finish 1010 988 1011 - type view_blocked = { 989 + type view_detached = { 990 + detached : bool; 1012 991 uri : string; 1013 - blocked : bool; 992 + } 993 + 994 + let view_detached_jsont = 995 + Jsont.Object.map ~kind:"View_detached" 996 + (fun _typ detached uri -> { detached; uri }) 997 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewDetached" ~enc:(fun _ -> "app.bsky.embed.record#viewDetached") 998 + |> Jsont.Object.mem "detached" Jsont.bool ~enc:(fun r -> r.detached) 999 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1000 + |> Jsont.Object.finish 1001 + 1002 + type view_blocked = { 1014 1003 author : Jsont.json; 1004 + blocked : bool; 1005 + uri : string; 1015 1006 } 1016 1007 1017 1008 let view_blocked_jsont = 1018 1009 Jsont.Object.map ~kind:"View_blocked" 1019 - (fun _typ uri blocked author -> { uri; blocked; author }) 1010 + (fun _typ author blocked uri -> { author; blocked; uri }) 1020 1011 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewBlocked" ~enc:(fun _ -> "app.bsky.embed.record#viewBlocked") 1021 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1012 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1022 1013 |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 1023 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1014 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1024 1015 |> Jsont.Object.finish 1025 1016 1026 - type view_detached = { 1027 - uri : string; 1028 - detached : bool; 1017 + type view = { 1018 + record : Jsont.json; 1029 1019 } 1030 1020 1031 - let view_detached_jsont = 1032 - Jsont.Object.map ~kind:"View_detached" 1033 - (fun _typ uri detached -> { uri; detached }) 1034 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewDetached" ~enc:(fun _ -> "app.bsky.embed.record#viewDetached") 1035 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1036 - |> Jsont.Object.mem "detached" Jsont.bool ~enc:(fun r -> r.detached) 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 1037 |> Jsont.Object.finish 1038 1038 1039 1039 end ··· 1054 1054 end 1055 1055 module RegisterPush = struct 1056 1056 type input = { 1057 + age_restricted : bool option; 1058 + app_id : string; 1059 + platform : string; 1057 1060 service_did : string; 1058 1061 token : string; 1059 - platform : string; 1060 - app_id : string; 1061 - age_restricted : bool option; 1062 1062 } 1063 1063 1064 1064 let input_jsont = 1065 1065 Jsont.Object.map ~kind:"Input" 1066 - (fun _typ service_did token platform app_id age_restricted -> { service_did; token; platform; app_id; age_restricted }) 1066 + (fun _typ age_restricted app_id platform service_did token -> { age_restricted; app_id; platform; service_did; token }) 1067 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) 1068 1071 |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 1069 1072 |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1070 - |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 1071 - |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 1072 - |> Jsont.Object.opt_mem "ageRestricted" Jsont.bool ~enc:(fun r -> r.age_restricted) 1073 1073 |> Jsont.Object.finish 1074 1074 1075 1075 end 1076 1076 module ListNotifications = struct 1077 1077 type notification = { 1078 - uri : string; 1078 + author : Jsont.json; 1079 1079 cid : string; 1080 - author : Jsont.json; 1080 + indexed_at : string; 1081 + is_read : bool; 1082 + labels : Com.Atproto.Label.Defs.label list option; 1081 1083 reason : string; 1082 1084 reason_subject : string option; 1083 1085 record : Jsont.json; 1084 - is_read : bool; 1085 - indexed_at : string; 1086 - labels : Com.Atproto.Label.Defs.label list option; 1086 + uri : string; 1087 1087 } 1088 1088 1089 1089 let notification_jsont = 1090 1090 Jsont.Object.map ~kind:"Notification" 1091 - (fun _typ uri cid author reason reason_subject record is_read indexed_at labels -> { uri; cid; author; reason; reason_subject; record; is_read; indexed_at; labels }) 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 1092 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.listNotifications#notification" ~enc:(fun _ -> "app.bsky.notification.listNotifications#notification") 1093 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1093 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1094 1094 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 1095 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1095 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1096 + |> Jsont.Object.mem "isRead" Jsont.bool ~enc:(fun r -> r.is_read) 1097 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1096 1098 |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 1097 1099 |> Jsont.Object.opt_mem "reasonSubject" Jsont.string ~enc:(fun r -> r.reason_subject) 1098 1100 |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1099 - |> Jsont.Object.mem "isRead" Jsont.bool ~enc:(fun r -> r.is_read) 1100 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1101 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1101 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1102 1102 |> Jsont.Object.finish 1103 1103 1104 1104 type params = { 1105 - reasons : string list option; 1105 + cursor : string option; 1106 1106 limit : int option; 1107 1107 priority : bool option; 1108 - cursor : string option; 1108 + reasons : string list option; 1109 1109 seen_at : string option; 1110 1110 } 1111 1111 1112 1112 let params_jsont = 1113 1113 Jsont.Object.map ~kind:"Params" 1114 - (fun reasons limit priority cursor seen_at -> { 1115 - reasons; 1114 + (fun cursor limit priority reasons seen_at -> { 1115 + cursor; 1116 1116 limit; 1117 1117 priority; 1118 - cursor; 1118 + reasons; 1119 1119 seen_at; 1120 1120 }) 1121 - |> Jsont.Object.opt_mem "reasons" (Jsont.list Jsont.string) 1122 - ~enc:(fun r -> r.reasons) 1121 + |> Jsont.Object.opt_mem "cursor" Jsont.string 1122 + ~enc:(fun r -> r.cursor) 1123 1123 |> Jsont.Object.opt_mem "limit" Jsont.int 1124 1124 ~enc:(fun r -> r.limit) 1125 1125 |> Jsont.Object.opt_mem "priority" Jsont.bool 1126 1126 ~enc:(fun r -> r.priority) 1127 - |> Jsont.Object.opt_mem "cursor" Jsont.string 1128 - ~enc:(fun r -> r.cursor) 1127 + |> Jsont.Object.opt_mem "reasons" (Jsont.list Jsont.string) 1128 + ~enc:(fun r -> r.reasons) 1129 1129 |> Jsont.Object.opt_mem "seenAt" Jsont.string 1130 1130 ~enc:(fun r -> r.seen_at) 1131 1131 |> Jsont.Object.finish ··· 1180 1180 end 1181 1181 module UnregisterPush = struct 1182 1182 type input = { 1183 + app_id : string; 1184 + platform : string; 1183 1185 service_did : string; 1184 1186 token : string; 1185 - platform : string; 1186 - app_id : string; 1187 1187 } 1188 1188 1189 1189 let input_jsont = 1190 1190 Jsont.Object.map ~kind:"Input" 1191 - (fun _typ service_did token platform app_id -> { service_did; token; platform; app_id }) 1191 + (fun _typ app_id platform service_did token -> { app_id; platform; service_did; token }) 1192 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) 1193 1195 |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 1194 1196 |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1195 - |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 1196 - |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 1197 1197 |> Jsont.Object.finish 1198 1198 1199 1199 end ··· 1215 1215 1216 1216 let record_deleted_jsont = Jsont.ignore 1217 1217 1218 - type chat_preference = { 1219 - include_ : string; 1218 + type preference = { 1219 + list_ : bool; 1220 1220 push : bool; 1221 1221 } 1222 1222 1223 - let chat_preference_jsont = 1224 - Jsont.Object.map ~kind:"Chat_preference" 1225 - (fun _typ include_ push -> { include_; push }) 1226 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#chatPreference" ~enc:(fun _ -> "app.bsky.notification.defs#chatPreference") 1227 - |> Jsont.Object.mem "include" Jsont.string ~enc:(fun r -> r.include_) 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 1228 |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 1229 1229 |> Jsont.Object.finish 1230 1230 ··· 1243 1243 |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 1244 1244 |> Jsont.Object.finish 1245 1245 1246 - type preference = { 1247 - list_ : bool; 1246 + type chat_preference = { 1247 + include_ : string; 1248 1248 push : bool; 1249 1249 } 1250 1250 1251 - let preference_jsont = 1252 - Jsont.Object.map ~kind:"Preference" 1253 - (fun _typ list_ push -> { list_; push }) 1254 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#preference" ~enc:(fun _ -> "app.bsky.notification.defs#preference") 1255 - |> Jsont.Object.mem "list" Jsont.bool ~enc:(fun r -> r.list_) 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 1256 |> Jsont.Object.mem "push" Jsont.bool ~enc:(fun r -> r.push) 1257 1257 |> Jsont.Object.finish 1258 1258 ··· 1269 1269 |> Jsont.Object.mem "reply" Jsont.bool ~enc:(fun r -> r.reply) 1270 1270 |> Jsont.Object.finish 1271 1271 1272 + type subject_activity_subscription = { 1273 + activity_subscription : Jsont.json; 1274 + subject : string; 1275 + } 1276 + 1277 + let subject_activity_subscription_jsont = 1278 + Jsont.Object.map ~kind:"Subject_activity_subscription" 1279 + (fun _typ activity_subscription subject -> { activity_subscription; subject }) 1280 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#subjectActivitySubscription" ~enc:(fun _ -> "app.bsky.notification.defs#subjectActivitySubscription") 1281 + |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1282 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1283 + |> Jsont.Object.finish 1284 + 1272 1285 type preferences = { 1273 1286 chat : Jsont.json; 1274 1287 follow : Jsont.json; ··· 1304 1317 |> Jsont.Object.mem "verified" Jsont.json ~enc:(fun r -> r.verified) 1305 1318 |> Jsont.Object.finish 1306 1319 1307 - type subject_activity_subscription = { 1308 - subject : string; 1309 - activity_subscription : Jsont.json; 1310 - } 1311 - 1312 - let subject_activity_subscription_jsont = 1313 - Jsont.Object.map ~kind:"Subject_activity_subscription" 1314 - (fun _typ subject activity_subscription -> { subject; activity_subscription }) 1315 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.defs#subjectActivitySubscription" ~enc:(fun _ -> "app.bsky.notification.defs#subjectActivitySubscription") 1316 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1317 - |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1318 - |> Jsont.Object.finish 1319 - 1320 1320 end 1321 1321 module Declaration = struct 1322 1322 type main = { ··· 1333 1333 end 1334 1334 module ListActivitySubscriptions = struct 1335 1335 type params = { 1336 - limit : int option; 1337 1336 cursor : string option; 1337 + limit : int option; 1338 1338 } 1339 1339 1340 1340 let params_jsont = 1341 1341 Jsont.Object.map ~kind:"Params" 1342 - (fun limit cursor -> { 1342 + (fun cursor limit -> { 1343 + cursor; 1343 1344 limit; 1344 - cursor; 1345 1345 }) 1346 + |> Jsont.Object.opt_mem "cursor" Jsont.string 1347 + ~enc:(fun r -> r.cursor) 1346 1348 |> Jsont.Object.opt_mem "limit" Jsont.int 1347 1349 ~enc:(fun r -> r.limit) 1348 - |> Jsont.Object.opt_mem "cursor" Jsont.string 1349 - ~enc:(fun r -> r.cursor) 1350 1350 |> Jsont.Object.finish 1351 1351 1352 1352 type output = { ··· 1382 1382 end 1383 1383 module PutActivitySubscription = struct 1384 1384 type input = { 1385 - subject : string; 1386 1385 activity_subscription : Jsont.json; 1386 + subject : string; 1387 1387 } 1388 1388 1389 1389 let input_jsont = 1390 1390 Jsont.Object.map ~kind:"Input" 1391 - (fun _typ subject activity_subscription -> { subject; activity_subscription }) 1391 + (fun _typ activity_subscription subject -> { activity_subscription; subject }) 1392 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) 1393 1394 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1394 - |> Jsont.Object.mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1395 1395 |> Jsont.Object.finish 1396 1396 1397 1397 type output = { 1398 - subject : string; 1399 1398 activity_subscription : Jsont.json option; 1399 + subject : string; 1400 1400 } 1401 1401 1402 1402 let output_jsont = 1403 1403 Jsont.Object.map ~kind:"Output" 1404 - (fun _typ subject activity_subscription -> { subject; activity_subscription }) 1404 + (fun _typ activity_subscription subject -> { activity_subscription; subject }) 1405 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) 1406 1407 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1407 - |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1408 1408 |> Jsont.Object.finish 1409 1409 1410 1410 end ··· 1463 1463 let live_jsont = Jsont.string 1464 1464 1465 1465 type main = { 1466 - status : string; 1467 - embed : Jsont.json option; 1466 + created_at : string; 1468 1467 duration_minutes : int option; 1469 - created_at : string; 1468 + embed : Jsont.json option; 1469 + status : string; 1470 1470 } 1471 1471 1472 1472 let main_jsont = 1473 1473 Jsont.Object.map ~kind:"Main" 1474 - (fun _typ status embed duration_minutes created_at -> { status; embed; duration_minutes; created_at }) 1474 + (fun _typ created_at duration_minutes embed status -> { created_at; duration_minutes; embed; status }) 1475 1475 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.status" ~enc:(fun _ -> "app.bsky.actor.status") 1476 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1477 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 1478 - |> Jsont.Object.opt_mem "durationMinutes" Jsont.int ~enc:(fun r -> r.duration_minutes) 1479 1476 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1477 + |> Jsont.Object.opt_mem "durationMinutes" Jsont.int ~enc:(fun r -> r.duration_minutes) 1478 + |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 1479 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1480 1480 |> Jsont.Object.finish 1481 1481 1482 1482 end 1483 1483 module Profile = struct 1484 1484 type main = { 1485 - display_name : string option; 1486 - description : string option; 1487 - pronouns : string option; 1488 - website : string option; 1489 1485 avatar : Atp.Blob_ref.t option; 1490 1486 banner : Atp.Blob_ref.t option; 1491 - labels : Com.Atproto.Label.Defs.self_labels option; 1487 + created_at : string option; 1488 + description : string option; 1489 + display_name : string option; 1492 1490 joined_via_starter_pack : Com.Atproto.Repo.StrongRef.main option; 1491 + labels : Com.Atproto.Label.Defs.self_labels option; 1493 1492 pinned_post : Com.Atproto.Repo.StrongRef.main option; 1494 - created_at : string option; 1493 + pronouns : string option; 1494 + website : string option; 1495 1495 } 1496 1496 1497 1497 let main_jsont = 1498 1498 Jsont.Object.map ~kind:"Main" 1499 - (fun _typ display_name description pronouns website avatar banner labels joined_via_starter_pack pinned_post created_at -> { display_name; description; pronouns; website; avatar; banner; labels; joined_via_starter_pack; pinned_post; created_at }) 1499 + (fun _typ avatar banner created_at description display_name joined_via_starter_pack labels pinned_post pronouns website -> { avatar; banner; created_at; description; display_name; joined_via_starter_pack; labels; pinned_post; pronouns; website }) 1500 1500 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.profile" ~enc:(fun _ -> "app.bsky.actor.profile") 1501 - |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1502 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1503 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1504 - |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 1505 1501 |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 1506 1502 |> Jsont.Object.opt_mem "banner" Atp.Blob_ref.jsont ~enc:(fun r -> r.banner) 1503 + |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1504 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1505 + |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1506 + |> Jsont.Object.opt_mem "joinedViaStarterPack" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.joined_via_starter_pack) 1507 1507 |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 1508 - |> Jsont.Object.opt_mem "joinedViaStarterPack" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.joined_via_starter_pack) 1509 1508 |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 1510 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1509 + |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1510 + |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 1511 1511 |> Jsont.Object.finish 1512 1512 1513 1513 end 1514 1514 module Defs = struct 1515 - type profile_associated_chat = { 1516 - allow_incoming : string; 1517 - } 1518 - 1519 - let profile_associated_chat_jsont = 1520 - Jsont.Object.map ~kind:"Profile_associated_chat" 1521 - (fun _typ allow_incoming -> { allow_incoming }) 1522 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedChat" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedChat") 1523 - |> Jsont.Object.mem "allowIncoming" Jsont.string ~enc:(fun r -> r.allow_incoming) 1524 - |> Jsont.Object.finish 1525 - 1526 - type profile_associated_activity_subscription = { 1527 - allow_subscriptions : string; 1528 - } 1529 - 1530 - let profile_associated_activity_subscription_jsont = 1531 - Jsont.Object.map ~kind:"Profile_associated_activity_subscription" 1532 - (fun _typ allow_subscriptions -> { allow_subscriptions }) 1533 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedActivitySubscription" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedActivitySubscription") 1534 - |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1535 - |> Jsont.Object.finish 1536 - 1537 1515 type verification_view = { 1516 + created_at : string; 1517 + is_valid : bool; 1538 1518 issuer : string; 1539 1519 uri : string; 1540 - is_valid : bool; 1541 - created_at : string; 1542 1520 } 1543 1521 1544 1522 let verification_view_jsont = 1545 1523 Jsont.Object.map ~kind:"Verification_view" 1546 - (fun _typ issuer uri is_valid created_at -> { issuer; uri; is_valid; created_at }) 1524 + (fun _typ created_at is_valid issuer uri -> { created_at; is_valid; issuer; uri }) 1547 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) 1548 1528 |> Jsont.Object.mem "issuer" Jsont.string ~enc:(fun r -> r.issuer) 1549 1529 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1550 - |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 1551 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1552 1530 |> Jsont.Object.finish 1553 1531 1554 - type preferences = Jsont.json list 1555 - let preferences_jsont = (Jsont.list Jsont.json) 1532 + type verification_prefs = { 1533 + hide_badges : bool option; 1534 + } 1535 + 1536 + let verification_prefs_jsont = 1537 + Jsont.Object.map ~kind:"Verification_prefs" 1538 + (fun _typ hide_badges -> { hide_badges }) 1539 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationPrefs" ~enc:(fun _ -> "app.bsky.actor.defs#verificationPrefs") 1540 + |> Jsont.Object.opt_mem "hideBadges" Jsont.bool ~enc:(fun r -> r.hide_badges) 1541 + |> Jsont.Object.finish 1542 + 1543 + type thread_view_pref = { 1544 + sort : string option; 1545 + } 1546 + 1547 + let thread_view_pref_jsont = 1548 + Jsont.Object.map ~kind:"Thread_view_pref" 1549 + (fun _typ sort -> { sort }) 1550 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#threadViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#threadViewPref") 1551 + |> Jsont.Object.opt_mem "sort" Jsont.string ~enc:(fun r -> r.sort) 1552 + |> Jsont.Object.finish 1556 1553 1557 - type adult_content_pref = { 1558 - enabled : bool; 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; 1559 1563 } 1560 1564 1561 - let adult_content_pref_jsont = 1562 - Jsont.Object.map ~kind:"Adult_content_pref" 1563 - (fun _typ enabled -> { enabled }) 1564 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#adultContentPref" ~enc:(fun _ -> "app.bsky.actor.defs#adultContentPref") 1565 - |> Jsont.Object.mem "enabled" Jsont.bool ~enc:(fun r -> r.enabled) 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) 1566 1577 |> Jsont.Object.finish 1567 1578 1568 - type content_label_pref = { 1569 - labeler_did : string option; 1570 - label : string; 1571 - visibility : string; 1579 + type saved_feeds_pref = { 1580 + pinned : string list; 1581 + saved : string list; 1582 + timeline_index : int option; 1572 1583 } 1573 1584 1574 - let content_label_pref_jsont = 1575 - Jsont.Object.map ~kind:"Content_label_pref" 1576 - (fun _typ labeler_did label visibility -> { labeler_did; label; visibility }) 1577 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#contentLabelPref" ~enc:(fun _ -> "app.bsky.actor.defs#contentLabelPref") 1578 - |> Jsont.Object.opt_mem "labelerDid" Jsont.string ~enc:(fun r -> r.labeler_did) 1579 - |> Jsont.Object.mem "label" Jsont.string ~enc:(fun r -> r.label) 1580 - |> Jsont.Object.mem "visibility" Jsont.string ~enc:(fun r -> r.visibility) 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) 1581 1592 |> Jsont.Object.finish 1582 1593 1583 1594 type saved_feed = { 1584 1595 id : string; 1596 + pinned : bool; 1585 1597 type_ : string; 1586 1598 value : string; 1587 - pinned : bool; 1588 1599 } 1589 1600 1590 1601 let saved_feed_jsont = 1591 1602 Jsont.Object.map ~kind:"Saved_feed" 1592 - (fun _typ id type_ value pinned -> { id; type_; value; pinned }) 1603 + (fun _typ id pinned type_ value -> { id; pinned; type_; value }) 1593 1604 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeed" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeed") 1594 1605 |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1606 + |> Jsont.Object.mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 1595 1607 |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 1596 1608 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1597 - |> Jsont.Object.mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 1598 1609 |> Jsont.Object.finish 1599 1610 1600 - type saved_feeds_pref = { 1601 - pinned : string list; 1602 - saved : string list; 1603 - timeline_index : int option; 1611 + type profile_associated_chat = { 1612 + allow_incoming : string; 1604 1613 } 1605 1614 1606 - let saved_feeds_pref_jsont = 1607 - Jsont.Object.map ~kind:"Saved_feeds_pref" 1608 - (fun _typ pinned saved timeline_index -> { pinned; saved; timeline_index }) 1609 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#savedFeedsPref" ~enc:(fun _ -> "app.bsky.actor.defs#savedFeedsPref") 1610 - |> Jsont.Object.mem "pinned" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned) 1611 - |> Jsont.Object.mem "saved" (Jsont.list Jsont.string) ~enc:(fun r -> r.saved) 1612 - |> Jsont.Object.opt_mem "timelineIndex" Jsont.int ~enc:(fun r -> r.timeline_index) 1615 + let profile_associated_chat_jsont = 1616 + Jsont.Object.map ~kind:"Profile_associated_chat" 1617 + (fun _typ allow_incoming -> { allow_incoming }) 1618 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedChat" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedChat") 1619 + |> Jsont.Object.mem "allowIncoming" Jsont.string ~enc:(fun r -> r.allow_incoming) 1620 + |> Jsont.Object.finish 1621 + 1622 + type profile_associated_activity_subscription = { 1623 + allow_subscriptions : string; 1624 + } 1625 + 1626 + let profile_associated_activity_subscription_jsont = 1627 + Jsont.Object.map ~kind:"Profile_associated_activity_subscription" 1628 + (fun _typ allow_subscriptions -> { allow_subscriptions }) 1629 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociatedActivitySubscription" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociatedActivitySubscription") 1630 + |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1631 + |> Jsont.Object.finish 1632 + 1633 + type preferences = Jsont.json list 1634 + let preferences_jsont = (Jsont.list Jsont.json) 1635 + 1636 + type post_interaction_settings_pref = { 1637 + postgate_embedding_rules : Jsont.json list option; 1638 + threadgate_allow_rules : Jsont.json list option; 1639 + } 1640 + 1641 + let post_interaction_settings_pref_jsont = 1642 + Jsont.Object.map ~kind:"Post_interaction_settings_pref" 1643 + (fun _typ postgate_embedding_rules threadgate_allow_rules -> { postgate_embedding_rules; threadgate_allow_rules }) 1644 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#postInteractionSettingsPref" ~enc:(fun _ -> "app.bsky.actor.defs#postInteractionSettingsPref") 1645 + |> Jsont.Object.opt_mem "postgateEmbeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.postgate_embedding_rules) 1646 + |> Jsont.Object.opt_mem "threadgateAllowRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.threadgate_allow_rules) 1613 1647 |> Jsont.Object.finish 1614 1648 1615 1649 type personal_details_pref = { ··· 1623 1657 |> Jsont.Object.opt_mem "birthDate" Jsont.string ~enc:(fun r -> r.birth_date) 1624 1658 |> Jsont.Object.finish 1625 1659 1626 - type declared_age_pref = { 1627 - is_over_age13 : bool option; 1628 - is_over_age16 : bool option; 1629 - is_over_age18 : bool option; 1660 + type nux = { 1661 + completed : bool; 1662 + data : string option; 1663 + expires_at : string option; 1664 + id : string; 1630 1665 } 1631 1666 1632 - let declared_age_pref_jsont = 1633 - Jsont.Object.map ~kind:"Declared_age_pref" 1634 - (fun _typ is_over_age13 is_over_age16 is_over_age18 -> { is_over_age13; is_over_age16; is_over_age18 }) 1635 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#declaredAgePref" ~enc:(fun _ -> "app.bsky.actor.defs#declaredAgePref") 1636 - |> Jsont.Object.opt_mem "isOverAge13" Jsont.bool ~enc:(fun r -> r.is_over_age13) 1637 - |> Jsont.Object.opt_mem "isOverAge16" Jsont.bool ~enc:(fun r -> r.is_over_age16) 1638 - |> Jsont.Object.opt_mem "isOverAge18" Jsont.bool ~enc:(fun r -> r.is_over_age18) 1667 + let nux_jsont = 1668 + Jsont.Object.map ~kind:"Nux" 1669 + (fun _typ completed data expires_at id -> { completed; data; expires_at; id }) 1670 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#nux" ~enc:(fun _ -> "app.bsky.actor.defs#nux") 1671 + |> Jsont.Object.mem "completed" Jsont.bool ~enc:(fun r -> r.completed) 1672 + |> Jsont.Object.opt_mem "data" Jsont.string ~enc:(fun r -> r.data) 1673 + |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 1674 + |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1639 1675 |> Jsont.Object.finish 1640 1676 1641 - type feed_view_pref = { 1642 - feed : string; 1643 - hide_replies : bool option; 1644 - hide_replies_by_unfollowed : bool option; 1645 - hide_replies_by_like_count : int option; 1646 - hide_reposts : bool option; 1647 - hide_quote_posts : bool option; 1648 - } 1677 + type muted_word_target = string 1678 + let muted_word_target_jsont = Jsont.string 1649 1679 1650 - let feed_view_pref_jsont = 1651 - Jsont.Object.map ~kind:"Feed_view_pref" 1652 - (fun _typ feed hide_replies hide_replies_by_unfollowed hide_replies_by_like_count hide_reposts hide_quote_posts -> { feed; hide_replies; hide_replies_by_unfollowed; hide_replies_by_like_count; hide_reposts; hide_quote_posts }) 1653 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#feedViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#feedViewPref") 1654 - |> Jsont.Object.mem "feed" Jsont.string ~enc:(fun r -> r.feed) 1655 - |> Jsont.Object.opt_mem "hideReplies" Jsont.bool ~enc:(fun r -> r.hide_replies) 1656 - |> Jsont.Object.opt_mem "hideRepliesByUnfollowed" Jsont.bool ~enc:(fun r -> r.hide_replies_by_unfollowed) 1657 - |> Jsont.Object.opt_mem "hideRepliesByLikeCount" Jsont.int ~enc:(fun r -> r.hide_replies_by_like_count) 1658 - |> Jsont.Object.opt_mem "hideReposts" Jsont.bool ~enc:(fun r -> r.hide_reposts) 1659 - |> Jsont.Object.opt_mem "hideQuotePosts" Jsont.bool ~enc:(fun r -> r.hide_quote_posts) 1660 - |> Jsont.Object.finish 1661 - 1662 - type thread_view_pref = { 1663 - sort : string option; 1680 + type labeler_pref_item = { 1681 + did : string; 1664 1682 } 1665 1683 1666 - let thread_view_pref_jsont = 1667 - Jsont.Object.map ~kind:"Thread_view_pref" 1668 - (fun _typ sort -> { sort }) 1669 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#threadViewPref" ~enc:(fun _ -> "app.bsky.actor.defs#threadViewPref") 1670 - |> Jsont.Object.opt_mem "sort" Jsont.string ~enc:(fun r -> r.sort) 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) 1671 1689 |> Jsont.Object.finish 1672 1690 1673 1691 type interests_pref = { ··· 1681 1699 |> Jsont.Object.mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 1682 1700 |> Jsont.Object.finish 1683 1701 1684 - type muted_word_target = string 1685 - let muted_word_target_jsont = Jsont.string 1686 - 1687 1702 type hidden_posts_pref = { 1688 1703 items : string list; 1689 1704 } ··· 1695 1710 |> Jsont.Object.mem "items" (Jsont.list Jsont.string) ~enc:(fun r -> r.items) 1696 1711 |> Jsont.Object.finish 1697 1712 1698 - type labeler_pref_item = { 1699 - did : string; 1700 - } 1701 - 1702 - let labeler_pref_item_jsont = 1703 - Jsont.Object.map ~kind:"Labeler_pref_item" 1704 - (fun _typ did -> { did }) 1705 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#labelerPrefItem" ~enc:(fun _ -> "app.bsky.actor.defs#labelerPrefItem") 1706 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1707 - |> Jsont.Object.finish 1708 - 1709 - type bsky_app_progress_guide = { 1710 - guide : string; 1711 - } 1712 - 1713 - let bsky_app_progress_guide_jsont = 1714 - Jsont.Object.map ~kind:"Bsky_app_progress_guide" 1715 - (fun _typ guide -> { guide }) 1716 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#bskyAppProgressGuide" ~enc:(fun _ -> "app.bsky.actor.defs#bskyAppProgressGuide") 1717 - |> Jsont.Object.mem "guide" Jsont.string ~enc:(fun r -> r.guide) 1718 - |> Jsont.Object.finish 1719 - 1720 - type nux = { 1721 - id : string; 1722 - completed : bool; 1723 - data : string option; 1724 - expires_at : string option; 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; 1725 1720 } 1726 1721 1727 - let nux_jsont = 1728 - Jsont.Object.map ~kind:"Nux" 1729 - (fun _typ id completed data expires_at -> { id; completed; data; expires_at }) 1730 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#nux" ~enc:(fun _ -> "app.bsky.actor.defs#nux") 1731 - |> Jsont.Object.mem "id" Jsont.string ~enc:(fun r -> r.id) 1732 - |> Jsont.Object.mem "completed" Jsont.bool ~enc:(fun r -> r.completed) 1733 - |> Jsont.Object.opt_mem "data" Jsont.string ~enc:(fun r -> r.data) 1734 - |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 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) 1735 1732 |> Jsont.Object.finish 1736 1733 1737 - type verification_prefs = { 1738 - hide_badges : bool option; 1734 + type declared_age_pref = { 1735 + is_over_age13 : bool option; 1736 + is_over_age16 : bool option; 1737 + is_over_age18 : bool option; 1739 1738 } 1740 1739 1741 - let verification_prefs_jsont = 1742 - Jsont.Object.map ~kind:"Verification_prefs" 1743 - (fun _typ hide_badges -> { hide_badges }) 1744 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#verificationPrefs" ~enc:(fun _ -> "app.bsky.actor.defs#verificationPrefs") 1745 - |> Jsont.Object.opt_mem "hideBadges" Jsont.bool ~enc:(fun r -> r.hide_badges) 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) 1746 1747 |> Jsont.Object.finish 1747 1748 1748 - type post_interaction_settings_pref = { 1749 - threadgate_allow_rules : Jsont.json list option; 1750 - postgate_embedding_rules : Jsont.json list option; 1749 + type content_label_pref = { 1750 + label : string; 1751 + labeler_did : string option; 1752 + visibility : string; 1751 1753 } 1752 1754 1753 - let post_interaction_settings_pref_jsont = 1754 - Jsont.Object.map ~kind:"Post_interaction_settings_pref" 1755 - (fun _typ threadgate_allow_rules postgate_embedding_rules -> { threadgate_allow_rules; postgate_embedding_rules }) 1756 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#postInteractionSettingsPref" ~enc:(fun _ -> "app.bsky.actor.defs#postInteractionSettingsPref") 1757 - |> Jsont.Object.opt_mem "threadgateAllowRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.threadgate_allow_rules) 1758 - |> Jsont.Object.opt_mem "postgateEmbeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.postgate_embedding_rules) 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) 1759 1762 |> Jsont.Object.finish 1760 1763 1761 - type status_view = { 1762 - uri : string option; 1763 - cid : string option; 1764 - status : string; 1765 - record : Jsont.json; 1766 - embed : Jsont.json option; 1767 - expires_at : string option; 1768 - is_active : bool option; 1769 - is_disabled : bool option; 1764 + type bsky_app_progress_guide = { 1765 + guide : string; 1770 1766 } 1771 1767 1772 - let status_view_jsont = 1773 - Jsont.Object.map ~kind:"Status_view" 1774 - (fun _typ uri cid status record embed expires_at is_active is_disabled -> { uri; cid; status; record; embed; expires_at; is_active; is_disabled }) 1775 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#statusView" ~enc:(fun _ -> "app.bsky.actor.defs#statusView") 1776 - |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1777 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 1778 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1779 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1780 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 1781 - |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 1782 - |> Jsont.Object.opt_mem "isActive" Jsont.bool ~enc:(fun r -> r.is_active) 1783 - |> Jsont.Object.opt_mem "isDisabled" Jsont.bool ~enc:(fun r -> r.is_disabled) 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) 1784 1773 |> Jsont.Object.finish 1785 1774 1786 - type profile_associated = { 1787 - lists : int option; 1788 - feedgens : int option; 1789 - starter_packs : int option; 1790 - labeler : bool option; 1791 - chat : Jsont.json option; 1792 - activity_subscription : Jsont.json option; 1775 + type adult_content_pref = { 1776 + enabled : bool; 1793 1777 } 1794 1778 1795 - let profile_associated_jsont = 1796 - Jsont.Object.map ~kind:"Profile_associated" 1797 - (fun _typ lists feedgens starter_packs labeler chat activity_subscription -> { lists; feedgens; starter_packs; labeler; chat; activity_subscription }) 1798 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociated" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociated") 1799 - |> Jsont.Object.opt_mem "lists" Jsont.int ~enc:(fun r -> r.lists) 1800 - |> Jsont.Object.opt_mem "feedgens" Jsont.int ~enc:(fun r -> r.feedgens) 1801 - |> Jsont.Object.opt_mem "starterPacks" Jsont.int ~enc:(fun r -> r.starter_packs) 1802 - |> Jsont.Object.opt_mem "labeler" Jsont.bool ~enc:(fun r -> r.labeler) 1803 - |> Jsont.Object.opt_mem "chat" Jsont.json ~enc:(fun r -> r.chat) 1804 - |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 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) 1805 1784 |> Jsont.Object.finish 1806 1785 1807 1786 type verification_state = { 1787 + trusted_verifier_status : string; 1808 1788 verifications : Jsont.json list; 1809 1789 verified_status : string; 1810 - trusted_verifier_status : string; 1811 1790 } 1812 1791 1813 1792 let verification_state_jsont = 1814 1793 Jsont.Object.map ~kind:"Verification_state" 1815 - (fun _typ verifications verified_status trusted_verifier_status -> { verifications; verified_status; trusted_verifier_status }) 1794 + (fun _typ trusted_verifier_status verifications verified_status -> { trusted_verifier_status; verifications; verified_status }) 1816 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) 1817 1797 |> Jsont.Object.mem "verifications" (Jsont.list Jsont.json) ~enc:(fun r -> r.verifications) 1818 1798 |> Jsont.Object.mem "verifiedStatus" Jsont.string ~enc:(fun r -> r.verified_status) 1819 - |> Jsont.Object.mem "trustedVerifierStatus" Jsont.string ~enc:(fun r -> r.trusted_verifier_status) 1820 1799 |> Jsont.Object.finish 1821 1800 1822 1801 type saved_feeds_pref_v2 = { ··· 1830 1809 |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 1831 1810 |> Jsont.Object.finish 1832 1811 1812 + type profile_associated = { 1813 + activity_subscription : Jsont.json option; 1814 + chat : Jsont.json option; 1815 + feedgens : int option; 1816 + labeler : bool option; 1817 + lists : int option; 1818 + starter_packs : int option; 1819 + } 1820 + 1821 + let profile_associated_jsont = 1822 + Jsont.Object.map ~kind:"Profile_associated" 1823 + (fun _typ activity_subscription chat feedgens labeler lists starter_packs -> { activity_subscription; chat; feedgens; labeler; lists; starter_packs }) 1824 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileAssociated" ~enc:(fun _ -> "app.bsky.actor.defs#profileAssociated") 1825 + |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1826 + |> Jsont.Object.opt_mem "chat" Jsont.json ~enc:(fun r -> r.chat) 1827 + |> Jsont.Object.opt_mem "feedgens" Jsont.int ~enc:(fun r -> r.feedgens) 1828 + |> Jsont.Object.opt_mem "labeler" Jsont.bool ~enc:(fun r -> r.labeler) 1829 + |> Jsont.Object.opt_mem "lists" Jsont.int ~enc:(fun r -> r.lists) 1830 + |> Jsont.Object.opt_mem "starterPacks" Jsont.int ~enc:(fun r -> r.starter_packs) 1831 + |> Jsont.Object.finish 1832 + 1833 1833 type muted_word = { 1834 + actor_target : string option; 1835 + expires_at : string option; 1834 1836 id : string option; 1835 - value : string; 1836 1837 targets : Jsont.json list; 1837 - actor_target : string option; 1838 - expires_at : string option; 1838 + value : string; 1839 1839 } 1840 1840 1841 1841 let muted_word_jsont = 1842 1842 Jsont.Object.map ~kind:"Muted_word" 1843 - (fun _typ id value targets actor_target expires_at -> { id; value; targets; actor_target; expires_at }) 1843 + (fun _typ actor_target expires_at id targets value -> { actor_target; expires_at; id; targets; value }) 1844 1844 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#mutedWord" ~enc:(fun _ -> "app.bsky.actor.defs#mutedWord") 1845 + |> Jsont.Object.opt_mem "actorTarget" Jsont.string ~enc:(fun r -> r.actor_target) 1846 + |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 1845 1847 |> Jsont.Object.opt_mem "id" Jsont.string ~enc:(fun r -> r.id) 1848 + |> Jsont.Object.mem "targets" (Jsont.list Jsont.json) ~enc:(fun r -> r.targets) 1846 1849 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1847 - |> Jsont.Object.mem "targets" (Jsont.list Jsont.json) ~enc:(fun r -> r.targets) 1848 - |> Jsont.Object.opt_mem "actorTarget" Jsont.string ~enc:(fun r -> r.actor_target) 1849 - |> Jsont.Object.opt_mem "expiresAt" Jsont.string ~enc:(fun r -> r.expires_at) 1850 1850 |> Jsont.Object.finish 1851 1851 1852 1852 type labelers_pref = { ··· 1862 1862 1863 1863 type bsky_app_state_pref = { 1864 1864 active_progress_guide : Jsont.json option; 1865 - queued_nudges : string list option; 1866 1865 nuxs : Jsont.json list option; 1866 + queued_nudges : string list option; 1867 1867 } 1868 1868 1869 1869 let bsky_app_state_pref_jsont = 1870 1870 Jsont.Object.map ~kind:"Bsky_app_state_pref" 1871 - (fun _typ active_progress_guide queued_nudges nuxs -> { active_progress_guide; queued_nudges; nuxs }) 1871 + (fun _typ active_progress_guide nuxs queued_nudges -> { active_progress_guide; nuxs; queued_nudges }) 1872 1872 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#bskyAppStatePref" ~enc:(fun _ -> "app.bsky.actor.defs#bskyAppStatePref") 1873 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) 1874 1875 |> Jsont.Object.opt_mem "queuedNudges" (Jsont.list Jsont.string) ~enc:(fun r -> r.queued_nudges) 1875 - |> Jsont.Object.opt_mem "nuxs" (Jsont.list Jsont.json) ~enc:(fun r -> r.nuxs) 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 profile_view_basic = { 1889 + type viewer_state = { 1890 + activity_subscription : Jsont.json option; 1891 + blocked_by : bool option; 1892 + blocking : string option; 1893 + blocking_by_list : Jsont.json option; 1894 + followed_by : string option; 1895 + following : string option; 1896 + known_followers : Jsont.json option; 1897 + muted : bool option; 1898 + muted_by_list : Jsont.json option; 1899 + } 1900 + 1901 + let viewer_state_jsont = 1902 + Jsont.Object.map ~kind:"Viewer_state" 1903 + (fun _typ activity_subscription blocked_by blocking blocking_by_list followed_by following known_followers muted muted_by_list -> { activity_subscription; blocked_by; blocking; blocking_by_list; followed_by; following; known_followers; muted; muted_by_list }) 1904 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#viewerState" ~enc:(fun _ -> "app.bsky.actor.defs#viewerState") 1905 + |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 1906 + |> Jsont.Object.opt_mem "blockedBy" Jsont.bool ~enc:(fun r -> r.blocked_by) 1907 + |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 1908 + |> Jsont.Object.opt_mem "blockingByList" Jsont.json ~enc:(fun r -> r.blocking_by_list) 1909 + |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 1910 + |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 1911 + |> Jsont.Object.opt_mem "knownFollowers" Jsont.json ~enc:(fun r -> r.known_followers) 1912 + |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 1913 + |> Jsont.Object.opt_mem "mutedByList" Jsont.json ~enc:(fun r -> r.muted_by_list) 1914 + |> Jsont.Object.finish 1915 + 1916 + type profile_view_detailed = { 1917 + associated : Jsont.json option; 1918 + avatar : string option; 1919 + banner : string option; 1920 + created_at : string option; 1921 + debug : Jsont.json option; 1922 + description : string option; 1890 1923 did : string; 1924 + display_name : string option; 1925 + followers_count : int option; 1926 + follows_count : int option; 1891 1927 handle : string; 1892 - display_name : string option; 1928 + indexed_at : string option; 1929 + joined_via_starter_pack : Jsont.json option; 1930 + labels : Com.Atproto.Label.Defs.label list option; 1931 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1932 + posts_count : int option; 1893 1933 pronouns : string option; 1934 + status : Jsont.json option; 1935 + verification : Jsont.json option; 1936 + viewer : Jsont.json option; 1937 + website : string option; 1938 + } 1939 + 1940 + let profile_view_detailed_jsont = 1941 + Jsont.Object.map ~kind:"Profile_view_detailed" 1942 + (fun _typ associated avatar banner created_at debug description did display_name followers_count follows_count handle indexed_at joined_via_starter_pack labels pinned_post posts_count pronouns status verification viewer website -> { associated; avatar; banner; created_at; debug; description; did; display_name; followers_count; follows_count; handle; indexed_at; joined_via_starter_pack; labels; pinned_post; posts_count; pronouns; status; verification; viewer; website }) 1943 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileViewDetailed" ~enc:(fun _ -> "app.bsky.actor.defs#profileViewDetailed") 1944 + |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1945 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1946 + |> Jsont.Object.opt_mem "banner" Jsont.string ~enc:(fun r -> r.banner) 1947 + |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1948 + |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1949 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1950 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1951 + |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1952 + |> Jsont.Object.opt_mem "followersCount" Jsont.int ~enc:(fun r -> r.followers_count) 1953 + |> Jsont.Object.opt_mem "followsCount" Jsont.int ~enc:(fun r -> r.follows_count) 1954 + |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1955 + |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1956 + |> Jsont.Object.opt_mem "joinedViaStarterPack" Jsont.json ~enc:(fun r -> r.joined_via_starter_pack) 1957 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1958 + |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 1959 + |> Jsont.Object.opt_mem "postsCount" Jsont.int ~enc:(fun r -> r.posts_count) 1960 + |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1961 + |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 1962 + |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1963 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1964 + |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 1965 + |> Jsont.Object.finish 1966 + 1967 + type profile_view_basic = { 1968 + associated : Jsont.json option; 1894 1969 avatar : string option; 1895 - associated : Jsont.json option; 1896 - viewer : Jsont.json option; 1970 + created_at : string option; 1971 + debug : Jsont.json option; 1972 + did : string; 1973 + display_name : string option; 1974 + handle : string; 1897 1975 labels : Com.Atproto.Label.Defs.label list option; 1898 - created_at : string option; 1976 + pronouns : string option; 1977 + status : Jsont.json option; 1899 1978 verification : Jsont.json option; 1900 - status : Jsont.json option; 1901 - debug : Jsont.json option; 1979 + viewer : Jsont.json option; 1902 1980 } 1903 1981 1904 1982 let profile_view_basic_jsont = 1905 1983 Jsont.Object.map ~kind:"Profile_view_basic" 1906 - (fun _typ did handle display_name pronouns avatar associated viewer labels created_at verification status debug -> { did; handle; display_name; pronouns; avatar; associated; viewer; labels; created_at; verification; status; debug }) 1984 + (fun _typ associated avatar created_at debug did display_name handle labels pronouns status verification viewer -> { associated; avatar; created_at; debug; did; display_name; handle; labels; pronouns; status; verification; viewer }) 1907 1985 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileViewBasic" ~enc:(fun _ -> "app.bsky.actor.defs#profileViewBasic") 1986 + |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1987 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1988 + |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1989 + |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1908 1990 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1991 + |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1909 1992 |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1910 - |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1911 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1912 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1913 - |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1914 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1915 1993 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1916 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1917 - |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1994 + |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1918 1995 |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 1919 - |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1996 + |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1997 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1920 1998 |> Jsont.Object.finish 1921 1999 1922 2000 type profile_view = { 2001 + associated : Jsont.json option; 2002 + avatar : string option; 2003 + created_at : string option; 2004 + debug : Jsont.json option; 2005 + description : string option; 1923 2006 did : string; 1924 - handle : string; 1925 2007 display_name : string option; 1926 - pronouns : string option; 1927 - description : string option; 1928 - avatar : string option; 1929 - associated : Jsont.json option; 2008 + handle : string; 1930 2009 indexed_at : string option; 1931 - created_at : string option; 1932 - viewer : Jsont.json option; 1933 2010 labels : Com.Atproto.Label.Defs.label list option; 2011 + pronouns : string option; 2012 + status : Jsont.json option; 1934 2013 verification : Jsont.json option; 1935 - status : Jsont.json option; 1936 - debug : Jsont.json option; 2014 + viewer : Jsont.json option; 1937 2015 } 1938 2016 1939 2017 let profile_view_jsont = 1940 2018 Jsont.Object.map ~kind:"Profile_view" 1941 - (fun _typ did handle display_name pronouns description avatar associated indexed_at created_at viewer labels verification status debug -> { did; handle; display_name; pronouns; description; avatar; associated; indexed_at; created_at; viewer; labels; verification; status; debug }) 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 }) 1942 2020 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileView" ~enc:(fun _ -> "app.bsky.actor.defs#profileView") 1943 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1944 - |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1945 - |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1946 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1947 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2021 + |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1948 2022 |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1949 - |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1950 - |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 1951 2023 |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1952 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 1953 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 1954 - |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 1955 - |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 1956 2024 |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 1957 - |> Jsont.Object.finish 1958 - 1959 - type profile_view_detailed = { 1960 - did : string; 1961 - handle : string; 1962 - display_name : string option; 1963 - description : string option; 1964 - pronouns : string option; 1965 - website : string option; 1966 - avatar : string option; 1967 - banner : string option; 1968 - followers_count : int option; 1969 - follows_count : int option; 1970 - posts_count : int option; 1971 - associated : Jsont.json option; 1972 - joined_via_starter_pack : Jsont.json option; 1973 - indexed_at : string option; 1974 - created_at : string option; 1975 - viewer : Jsont.json option; 1976 - labels : Com.Atproto.Label.Defs.label list option; 1977 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 1978 - verification : Jsont.json option; 1979 - status : Jsont.json option; 1980 - debug : Jsont.json option; 1981 - } 1982 - 1983 - let profile_view_detailed_jsont = 1984 - Jsont.Object.map ~kind:"Profile_view_detailed" 1985 - (fun _typ did handle display_name description pronouns website avatar banner followers_count follows_count posts_count associated joined_via_starter_pack indexed_at created_at viewer labels pinned_post verification status debug -> { did; handle; display_name; description; pronouns; website; avatar; banner; followers_count; follows_count; posts_count; associated; joined_via_starter_pack; indexed_at; created_at; viewer; labels; pinned_post; verification; status; debug }) 1986 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#profileViewDetailed" ~enc:(fun _ -> "app.bsky.actor.defs#profileViewDetailed") 2025 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1987 2026 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1988 - |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 1989 2027 |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1990 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1991 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1992 - |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 1993 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 1994 - |> Jsont.Object.opt_mem "banner" Jsont.string ~enc:(fun r -> r.banner) 1995 - |> Jsont.Object.opt_mem "followersCount" Jsont.int ~enc:(fun r -> r.followers_count) 1996 - |> Jsont.Object.opt_mem "followsCount" Jsont.int ~enc:(fun r -> r.follows_count) 1997 - |> Jsont.Object.opt_mem "postsCount" Jsont.int ~enc:(fun r -> r.posts_count) 1998 - |> Jsont.Object.opt_mem "associated" Jsont.json ~enc:(fun r -> r.associated) 1999 - |> Jsont.Object.opt_mem "joinedViaStarterPack" Jsont.json ~enc:(fun r -> r.joined_via_starter_pack) 2028 + |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 2000 2029 |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2001 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2002 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2003 2030 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2004 - |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 2031 + |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 2032 + |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 2005 2033 |> Jsont.Object.opt_mem "verification" Jsont.json ~enc:(fun r -> r.verification) 2006 - |> Jsont.Object.opt_mem "status" Jsont.json ~enc:(fun r -> r.status) 2007 - |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 2008 - |> Jsont.Object.finish 2009 - 2010 - type viewer_state = { 2011 - muted : bool option; 2012 - muted_by_list : Jsont.json option; 2013 - blocked_by : bool option; 2014 - blocking : string option; 2015 - blocking_by_list : Jsont.json option; 2016 - following : string option; 2017 - followed_by : string option; 2018 - known_followers : Jsont.json option; 2019 - activity_subscription : Jsont.json option; 2020 - } 2021 - 2022 - let viewer_state_jsont = 2023 - Jsont.Object.map ~kind:"Viewer_state" 2024 - (fun _typ muted muted_by_list blocked_by blocking blocking_by_list following followed_by known_followers activity_subscription -> { muted; muted_by_list; blocked_by; blocking; blocking_by_list; following; followed_by; known_followers; activity_subscription }) 2025 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.defs#viewerState" ~enc:(fun _ -> "app.bsky.actor.defs#viewerState") 2026 - |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 2027 - |> Jsont.Object.opt_mem "mutedByList" Jsont.json ~enc:(fun r -> r.muted_by_list) 2028 - |> Jsont.Object.opt_mem "blockedBy" Jsont.bool ~enc:(fun r -> r.blocked_by) 2029 - |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 2030 - |> Jsont.Object.opt_mem "blockingByList" Jsont.json ~enc:(fun r -> r.blocking_by_list) 2031 - |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 2032 - |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 2033 - |> Jsont.Object.opt_mem "knownFollowers" Jsont.json ~enc:(fun r -> r.known_followers) 2034 - |> Jsont.Object.opt_mem "activitySubscription" Jsont.json ~enc:(fun r -> r.activity_subscription) 2034 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2035 2035 |> Jsont.Object.finish 2036 2036 2037 2037 type known_followers = { ··· 2067 2067 end 2068 2068 module SearchActorsTypeahead = struct 2069 2069 type params = { 2070 - term : string option; 2071 - q : string option; 2072 2070 limit : int option; 2071 + q : string option; 2072 + term : string option; 2073 2073 } 2074 2074 2075 2075 let params_jsont = 2076 2076 Jsont.Object.map ~kind:"Params" 2077 - (fun term q limit -> { 2077 + (fun limit q term -> { 2078 + limit; 2079 + q; 2078 2080 term; 2079 - q; 2080 - limit; 2081 2081 }) 2082 - |> Jsont.Object.opt_mem "term" Jsont.string 2083 - ~enc:(fun r -> r.term) 2082 + |> Jsont.Object.opt_mem "limit" Jsont.int 2083 + ~enc:(fun r -> r.limit) 2084 2084 |> Jsont.Object.opt_mem "q" Jsont.string 2085 2085 ~enc:(fun r -> r.q) 2086 - |> Jsont.Object.opt_mem "limit" Jsont.int 2087 - ~enc:(fun r -> r.limit) 2086 + |> Jsont.Object.opt_mem "term" Jsont.string 2087 + ~enc:(fun r -> r.term) 2088 2088 |> Jsont.Object.finish 2089 2089 2090 2090 type output = { ··· 2120 2120 end 2121 2121 module SearchActors = struct 2122 2122 type params = { 2123 - term : string option; 2124 - q : string option; 2125 - limit : int option; 2126 2123 cursor : string option; 2124 + limit : int option; 2125 + q : string option; 2126 + term : string option; 2127 2127 } 2128 2128 2129 2129 let params_jsont = 2130 2130 Jsont.Object.map ~kind:"Params" 2131 - (fun term q limit cursor -> { 2132 - term; 2133 - q; 2131 + (fun cursor limit q term -> { 2132 + cursor; 2134 2133 limit; 2135 - cursor; 2134 + q; 2135 + term; 2136 2136 }) 2137 - |> Jsont.Object.opt_mem "term" Jsont.string 2138 - ~enc:(fun r -> r.term) 2137 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2138 + ~enc:(fun r -> r.cursor) 2139 + |> Jsont.Object.opt_mem "limit" Jsont.int 2140 + ~enc:(fun r -> r.limit) 2139 2141 |> Jsont.Object.opt_mem "q" Jsont.string 2140 2142 ~enc:(fun r -> r.q) 2141 - |> Jsont.Object.opt_mem "limit" Jsont.int 2142 - ~enc:(fun r -> r.limit) 2143 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2144 - ~enc:(fun r -> r.cursor) 2143 + |> Jsont.Object.opt_mem "term" Jsont.string 2144 + ~enc:(fun r -> r.term) 2145 2145 |> Jsont.Object.finish 2146 2146 2147 2147 type output = { 2148 - cursor : string option; 2149 2148 actors : Jsont.json list; 2149 + cursor : string option; 2150 2150 } 2151 2151 2152 2152 let output_jsont = 2153 2153 Jsont.Object.map ~kind:"Output" 2154 - (fun _typ cursor actors -> { cursor; actors }) 2154 + (fun _typ actors cursor -> { actors; cursor }) 2155 2155 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.searchActors#output" ~enc:(fun _ -> "app.bsky.actor.searchActors#output") 2156 + |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 2156 2157 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2157 - |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 2158 2158 |> Jsont.Object.finish 2159 2159 2160 2160 end 2161 2161 module GetSuggestions = struct 2162 2162 type params = { 2163 - limit : int option; 2164 2163 cursor : string option; 2164 + limit : int option; 2165 2165 } 2166 2166 2167 2167 let params_jsont = 2168 2168 Jsont.Object.map ~kind:"Params" 2169 - (fun limit cursor -> { 2169 + (fun cursor limit -> { 2170 + cursor; 2170 2171 limit; 2171 - cursor; 2172 2172 }) 2173 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2174 + ~enc:(fun r -> r.cursor) 2173 2175 |> Jsont.Object.opt_mem "limit" Jsont.int 2174 2176 ~enc:(fun r -> r.limit) 2175 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2176 - ~enc:(fun r -> r.cursor) 2177 2177 |> Jsont.Object.finish 2178 2178 2179 2179 type output = { 2180 - cursor : string option; 2181 2180 actors : Jsont.json list; 2181 + cursor : string option; 2182 2182 rec_id : int option; 2183 2183 } 2184 2184 2185 2185 let output_jsont = 2186 2186 Jsont.Object.map ~kind:"Output" 2187 - (fun _typ cursor actors rec_id -> { cursor; actors; rec_id }) 2187 + (fun _typ actors cursor rec_id -> { actors; cursor; rec_id }) 2188 2188 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getSuggestions#output" ~enc:(fun _ -> "app.bsky.actor.getSuggestions#output") 2189 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2190 2189 |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 2190 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2191 2191 |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 2192 2192 |> Jsont.Object.finish 2193 2193 ··· 2234 2234 end 2235 2235 module Contact = struct 2236 2236 module Defs = struct 2237 - type match_and_contact_index = { 2238 - match_ : Jsont.json; 2239 - contact_index : int; 2240 - } 2241 - 2242 - let match_and_contact_index_jsont = 2243 - Jsont.Object.map ~kind:"Match_and_contact_index" 2244 - (fun _typ match_ contact_index -> { match_; contact_index }) 2245 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#matchAndContactIndex" ~enc:(fun _ -> "app.bsky.contact.defs#matchAndContactIndex") 2246 - |> Jsont.Object.mem "match" Jsont.json ~enc:(fun r -> r.match_) 2247 - |> Jsont.Object.mem "contactIndex" Jsont.int ~enc:(fun r -> r.contact_index) 2248 - |> Jsont.Object.finish 2249 - 2250 2237 type sync_status = { 2251 - synced_at : string; 2252 2238 matches_count : int; 2239 + synced_at : string; 2253 2240 } 2254 2241 2255 2242 let sync_status_jsont = 2256 2243 Jsont.Object.map ~kind:"Sync_status" 2257 - (fun _typ synced_at matches_count -> { synced_at; matches_count }) 2244 + (fun _typ matches_count synced_at -> { matches_count; synced_at }) 2258 2245 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#syncStatus" ~enc:(fun _ -> "app.bsky.contact.defs#syncStatus") 2259 - |> Jsont.Object.mem "syncedAt" Jsont.string ~enc:(fun r -> r.synced_at) 2260 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) 2261 2248 |> Jsont.Object.finish 2262 2249 2263 2250 type notification = { ··· 2273 2260 |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 2274 2261 |> Jsont.Object.finish 2275 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 2276 end 2277 2277 module RemoveData = struct 2278 2278 type input = unit ··· 2303 2303 end 2304 2304 module GetMatches = struct 2305 2305 type params = { 2306 - limit : int option; 2307 2306 cursor : string option; 2307 + limit : int option; 2308 2308 } 2309 2309 2310 2310 let params_jsont = 2311 2311 Jsont.Object.map ~kind:"Params" 2312 - (fun limit cursor -> { 2312 + (fun cursor limit -> { 2313 + cursor; 2313 2314 limit; 2314 - cursor; 2315 2315 }) 2316 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2317 + ~enc:(fun r -> r.cursor) 2316 2318 |> Jsont.Object.opt_mem "limit" Jsont.int 2317 2319 ~enc:(fun r -> r.limit) 2318 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2319 - ~enc:(fun r -> r.cursor) 2320 2320 |> Jsont.Object.finish 2321 2321 2322 2322 type output = { ··· 2335 2335 end 2336 2336 module VerifyPhone = struct 2337 2337 type input = { 2338 + code : string; 2338 2339 phone : string; 2339 - code : string; 2340 2340 } 2341 2341 2342 2342 let input_jsont = 2343 2343 Jsont.Object.map ~kind:"Input" 2344 - (fun _typ phone code -> { phone; code }) 2344 + (fun _typ code phone -> { code; phone }) 2345 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 "phone" Jsont.string ~enc:(fun r -> r.phone) 2347 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 2348 |> Jsont.Object.finish 2349 2349 2350 2350 type output = { ··· 2414 2414 end 2415 2415 module ImportContacts = struct 2416 2416 type input = { 2417 - token : string; 2418 2417 contacts : string list; 2418 + token : string; 2419 2419 } 2420 2420 2421 2421 let input_jsont = 2422 2422 Jsont.Object.map ~kind:"Input" 2423 - (fun _typ token contacts -> { token; contacts }) 2423 + (fun _typ contacts token -> { contacts; token }) 2424 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) 2425 2426 |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 2426 - |> Jsont.Object.mem "contacts" (Jsont.list Jsont.string) ~enc:(fun r -> r.contacts) 2427 2427 |> Jsont.Object.finish 2428 2428 2429 2429 type output = { ··· 2453 2453 |> Jsont.Object.finish 2454 2454 2455 2455 type main = { 2456 - name : string; 2456 + created_at : string; 2457 2457 description : string option; 2458 2458 description_facets : Richtext.Facet.main list option; 2459 - list_ : string; 2460 2459 feeds : Jsont.json list option; 2461 - created_at : string; 2460 + list_ : string; 2461 + name : string; 2462 2462 } 2463 2463 2464 2464 let main_jsont = 2465 2465 Jsont.Object.map ~kind:"Main" 2466 - (fun _typ name description description_facets list_ feeds created_at -> { name; description; description_facets; list_; feeds; created_at }) 2466 + (fun _typ created_at description description_facets feeds list_ name -> { created_at; description; description_facets; feeds; list_; name }) 2467 2467 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.starterpack" ~enc:(fun _ -> "app.bsky.graph.starterpack") 2468 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2468 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2469 2469 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2470 2470 |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2471 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2472 2471 |> Jsont.Object.opt_mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 2473 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2472 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2473 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2474 2474 |> Jsont.Object.finish 2475 2475 2476 2476 end 2477 2477 module GetFollows = struct 2478 2478 type params = { 2479 2479 actor : string; 2480 - limit : int option; 2481 2480 cursor : string option; 2481 + limit : int option; 2482 2482 } 2483 2483 2484 2484 let params_jsont = 2485 2485 Jsont.Object.map ~kind:"Params" 2486 - (fun actor limit cursor -> { 2486 + (fun actor cursor limit -> { 2487 2487 actor; 2488 + cursor; 2488 2489 limit; 2489 - cursor; 2490 2490 }) 2491 2491 |> Jsont.Object.mem "actor" Jsont.string 2492 2492 ~enc:(fun r -> r.actor) 2493 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2494 + ~enc:(fun r -> r.cursor) 2493 2495 |> Jsont.Object.opt_mem "limit" Jsont.int 2494 2496 ~enc:(fun r -> r.limit) 2495 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2496 - ~enc:(fun r -> r.cursor) 2497 2497 |> Jsont.Object.finish 2498 2498 2499 2499 type output = { 2500 - subject : Jsont.json; 2501 2500 cursor : string option; 2502 2501 follows : Jsont.json list; 2502 + subject : Jsont.json; 2503 2503 } 2504 2504 2505 2505 let output_jsont = 2506 2506 Jsont.Object.map ~kind:"Output" 2507 - (fun _typ subject cursor follows -> { subject; cursor; follows }) 2507 + (fun _typ cursor follows subject -> { cursor; follows; subject }) 2508 2508 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollows#output" ~enc:(fun _ -> "app.bsky.graph.getFollows#output") 2509 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2510 2509 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2511 2510 |> Jsont.Object.mem "follows" (Jsont.list Jsont.json) ~enc:(fun r -> r.follows) 2511 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2512 2512 |> Jsont.Object.finish 2513 2513 2514 2514 end ··· 2527 2527 |> Jsont.Object.finish 2528 2528 2529 2529 type output = { 2530 - suggestions : Jsont.json list; 2531 2530 is_fallback : bool option; 2532 2531 rec_id : int option; 2532 + suggestions : Jsont.json list; 2533 2533 } 2534 2534 2535 2535 let output_jsont = 2536 2536 Jsont.Object.map ~kind:"Output" 2537 - (fun _typ suggestions is_fallback rec_id -> { suggestions; is_fallback; rec_id }) 2537 + (fun _typ is_fallback rec_id suggestions -> { is_fallback; rec_id; suggestions }) 2538 2538 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getSuggestedFollowsByActor#output" ~enc:(fun _ -> "app.bsky.graph.getSuggestedFollowsByActor#output") 2539 - |> Jsont.Object.mem "suggestions" (Jsont.list Jsont.json) ~enc:(fun r -> r.suggestions) 2540 2539 |> Jsont.Object.opt_mem "isFallback" Jsont.bool ~enc:(fun r -> r.is_fallback) 2541 2540 |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 2541 + |> Jsont.Object.mem "suggestions" (Jsont.list Jsont.json) ~enc:(fun r -> r.suggestions) 2542 2542 |> Jsont.Object.finish 2543 2543 2544 2544 end 2545 2545 module Block = struct 2546 2546 type main = { 2547 - subject : string; 2548 2547 created_at : string; 2548 + subject : string; 2549 2549 } 2550 2550 2551 2551 let main_jsont = 2552 2552 Jsont.Object.map ~kind:"Main" 2553 - (fun _typ subject created_at -> { subject; created_at }) 2553 + (fun _typ created_at subject -> { created_at; subject }) 2554 2554 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.block" ~enc:(fun _ -> "app.bsky.graph.block") 2555 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2556 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 2557 |> Jsont.Object.finish 2558 2558 2559 2559 end 2560 2560 module Listblock = struct 2561 2561 type main = { 2562 - subject : string; 2563 2562 created_at : string; 2563 + subject : string; 2564 2564 } 2565 2565 2566 2566 let main_jsont = 2567 2567 Jsont.Object.map ~kind:"Main" 2568 - (fun _typ subject created_at -> { subject; created_at }) 2568 + (fun _typ created_at subject -> { created_at; subject }) 2569 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) 2570 2571 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2571 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2572 2572 |> Jsont.Object.finish 2573 2573 2574 2574 end ··· 2588 2588 module GetFollowers = struct 2589 2589 type params = { 2590 2590 actor : string; 2591 - limit : int option; 2592 2591 cursor : string option; 2592 + limit : int option; 2593 2593 } 2594 2594 2595 2595 let params_jsont = 2596 2596 Jsont.Object.map ~kind:"Params" 2597 - (fun actor limit cursor -> { 2597 + (fun actor cursor limit -> { 2598 2598 actor; 2599 - limit; 2600 2599 cursor; 2600 + limit; 2601 2601 }) 2602 2602 |> Jsont.Object.mem "actor" Jsont.string 2603 2603 ~enc:(fun r -> r.actor) 2604 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2605 + ~enc:(fun r -> r.cursor) 2604 2606 |> Jsont.Object.opt_mem "limit" Jsont.int 2605 2607 ~enc:(fun r -> r.limit) 2606 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2607 - ~enc:(fun r -> r.cursor) 2608 2608 |> Jsont.Object.finish 2609 2609 2610 2610 type output = { 2611 - subject : Jsont.json; 2612 2611 cursor : string option; 2613 2612 followers : Jsont.json list; 2613 + subject : Jsont.json; 2614 2614 } 2615 2615 2616 2616 let output_jsont = 2617 2617 Jsont.Object.map ~kind:"Output" 2618 - (fun _typ subject cursor followers -> { subject; cursor; followers }) 2618 + (fun _typ cursor followers subject -> { cursor; followers; subject }) 2619 2619 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getFollowers#output") 2620 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2621 2620 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2622 2621 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2622 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2623 2623 |> Jsont.Object.finish 2624 2624 2625 2625 end ··· 2638 2638 end 2639 2639 module Follow = struct 2640 2640 type main = { 2641 - subject : string; 2642 2641 created_at : string; 2642 + subject : string; 2643 2643 via : Com.Atproto.Repo.StrongRef.main option; 2644 2644 } 2645 2645 2646 2646 let main_jsont = 2647 2647 Jsont.Object.map ~kind:"Main" 2648 - (fun _typ subject created_at via -> { subject; created_at; via }) 2648 + (fun _typ created_at subject via -> { created_at; subject; via }) 2649 2649 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.follow" ~enc:(fun _ -> "app.bsky.graph.follow") 2650 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2651 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 2652 |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 2653 2653 |> Jsont.Object.finish 2654 2654 ··· 2695 2695 module GetKnownFollowers = struct 2696 2696 type params = { 2697 2697 actor : string; 2698 - limit : int option; 2699 2698 cursor : string option; 2699 + limit : int option; 2700 2700 } 2701 2701 2702 2702 let params_jsont = 2703 2703 Jsont.Object.map ~kind:"Params" 2704 - (fun actor limit cursor -> { 2704 + (fun actor cursor limit -> { 2705 2705 actor; 2706 + cursor; 2706 2707 limit; 2707 - cursor; 2708 2708 }) 2709 2709 |> Jsont.Object.mem "actor" Jsont.string 2710 2710 ~enc:(fun r -> r.actor) 2711 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2712 + ~enc:(fun r -> r.cursor) 2711 2713 |> Jsont.Object.opt_mem "limit" Jsont.int 2712 2714 ~enc:(fun r -> r.limit) 2713 - |> Jsont.Object.opt_mem "cursor" Jsont.string 2714 - ~enc:(fun r -> r.cursor) 2715 2715 |> Jsont.Object.finish 2716 2716 2717 2717 type output = { 2718 - subject : Jsont.json; 2719 2718 cursor : string option; 2720 2719 followers : Jsont.json list; 2720 + subject : Jsont.json; 2721 2721 } 2722 2722 2723 2723 let output_jsont = 2724 2724 Jsont.Object.map ~kind:"Output" 2725 - (fun _typ subject cursor followers -> { subject; cursor; followers }) 2725 + (fun _typ cursor followers subject -> { cursor; followers; subject }) 2726 2726 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getKnownFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getKnownFollowers#output") 2727 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2728 2727 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2729 2728 |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2729 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2730 2730 |> Jsont.Object.finish 2731 2731 2732 2732 end ··· 2745 2745 end 2746 2746 module Listitem = struct 2747 2747 type main = { 2748 + created_at : string; 2749 + list_ : string; 2748 2750 subject : string; 2749 - list_ : string; 2750 - created_at : string; 2751 2751 } 2752 2752 2753 2753 let main_jsont = 2754 2754 Jsont.Object.map ~kind:"Main" 2755 - (fun _typ subject list_ created_at -> { subject; list_; created_at }) 2755 + (fun _typ created_at list_ subject -> { created_at; list_; subject }) 2756 2756 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listitem" ~enc:(fun _ -> "app.bsky.graph.listitem") 2757 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2758 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2759 2757 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2758 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2759 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2760 2760 |> Jsont.Object.finish 2761 2761 2762 2762 end 2763 2763 module Defs = struct 2764 - type list_item_view = { 2765 - uri : string; 2766 - subject : Jsont.json; 2767 - } 2768 - 2769 - let list_item_view_jsont = 2770 - Jsont.Object.map ~kind:"List_item_view" 2771 - (fun _typ uri subject -> { uri; subject }) 2772 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listItemView" ~enc:(fun _ -> "app.bsky.graph.defs#listItemView") 2773 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2774 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2775 - |> Jsont.Object.finish 2776 - 2777 2764 type starter_pack_view_basic = { 2778 - uri : string; 2779 2765 cid : string; 2780 - record : Jsont.json; 2781 2766 creator : Jsont.json; 2782 - list_item_count : int option; 2767 + indexed_at : string; 2768 + joined_all_time_count : int option; 2783 2769 joined_week_count : int option; 2784 - joined_all_time_count : int option; 2785 2770 labels : Com.Atproto.Label.Defs.label list option; 2786 - indexed_at : string; 2771 + list_item_count : int option; 2772 + record : Jsont.json; 2773 + uri : string; 2787 2774 } 2788 2775 2789 2776 let starter_pack_view_basic_jsont = 2790 2777 Jsont.Object.map ~kind:"Starter_pack_view_basic" 2791 - (fun _typ uri cid record creator list_item_count joined_week_count joined_all_time_count labels indexed_at -> { uri; cid; record; creator; list_item_count; joined_week_count; joined_all_time_count; labels; indexed_at }) 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 }) 2792 2779 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackViewBasic") 2793 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2794 2780 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2795 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2796 2781 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2797 - |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 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) 2798 2784 |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 2799 - |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 2800 2785 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2801 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2786 + |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2787 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2788 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2802 2789 |> Jsont.Object.finish 2803 2790 2804 - type list_purpose = string 2805 - let list_purpose_jsont = Jsont.string 2791 + type relationship = { 2792 + blocked_by : string option; 2793 + blocked_by_list : string option; 2794 + blocking : string option; 2795 + blocking_by_list : string option; 2796 + did : string; 2797 + followed_by : string option; 2798 + following : string option; 2799 + } 2806 2800 2807 - type modlist = string 2808 - let modlist_jsont = Jsont.string 2809 - 2810 - type curatelist = string 2811 - let curatelist_jsont = Jsont.string 2801 + let relationship_jsont = 2802 + Jsont.Object.map ~kind:"Relationship" 2803 + (fun _typ blocked_by blocked_by_list blocking blocking_by_list did followed_by following -> { blocked_by; blocked_by_list; blocking; blocking_by_list; did; followed_by; following }) 2804 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#relationship" ~enc:(fun _ -> "app.bsky.graph.defs#relationship") 2805 + |> Jsont.Object.opt_mem "blockedBy" Jsont.string ~enc:(fun r -> r.blocked_by) 2806 + |> Jsont.Object.opt_mem "blockedByList" Jsont.string ~enc:(fun r -> r.blocked_by_list) 2807 + |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 2808 + |> Jsont.Object.opt_mem "blockingByList" Jsont.string ~enc:(fun r -> r.blocking_by_list) 2809 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2810 + |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 2811 + |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 2812 + |> Jsont.Object.finish 2812 2813 2813 2814 type referencelist = string 2814 2815 let referencelist_jsont = Jsont.string 2815 2816 2816 - type list_viewer_state = { 2817 - muted : bool option; 2818 - blocked : string option; 2819 - } 2820 - 2821 - let list_viewer_state_jsont = 2822 - Jsont.Object.map ~kind:"List_viewer_state" 2823 - (fun _typ muted blocked -> { muted; blocked }) 2824 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewerState" ~enc:(fun _ -> "app.bsky.graph.defs#listViewerState") 2825 - |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 2826 - |> Jsont.Object.opt_mem "blocked" Jsont.string ~enc:(fun r -> r.blocked) 2827 - |> Jsont.Object.finish 2828 - 2829 2817 type not_found_actor = { 2830 2818 actor : string; 2831 2819 not_found : bool; ··· 2839 2827 |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 2840 2828 |> Jsont.Object.finish 2841 2829 2842 - type relationship = { 2843 - did : string; 2844 - following : string option; 2845 - followed_by : string option; 2846 - blocking : string option; 2847 - blocked_by : string option; 2848 - blocking_by_list : string option; 2849 - blocked_by_list : string option; 2830 + type modlist = string 2831 + let modlist_jsont = Jsont.string 2832 + 2833 + type list_viewer_state = { 2834 + blocked : string option; 2835 + muted : bool option; 2836 + } 2837 + 2838 + let list_viewer_state_jsont = 2839 + Jsont.Object.map ~kind:"List_viewer_state" 2840 + (fun _typ blocked muted -> { blocked; muted }) 2841 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewerState" ~enc:(fun _ -> "app.bsky.graph.defs#listViewerState") 2842 + |> Jsont.Object.opt_mem "blocked" Jsont.string ~enc:(fun r -> r.blocked) 2843 + |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 2844 + |> Jsont.Object.finish 2845 + 2846 + type list_purpose = string 2847 + let list_purpose_jsont = Jsont.string 2848 + 2849 + type list_item_view = { 2850 + subject : Jsont.json; 2851 + uri : string; 2850 2852 } 2851 2853 2852 - let relationship_jsont = 2853 - Jsont.Object.map ~kind:"Relationship" 2854 - (fun _typ did following followed_by blocking blocked_by blocking_by_list blocked_by_list -> { did; following; followed_by; blocking; blocked_by; blocking_by_list; blocked_by_list }) 2855 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#relationship" ~enc:(fun _ -> "app.bsky.graph.defs#relationship") 2856 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2857 - |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 2858 - |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 2859 - |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 2860 - |> Jsont.Object.opt_mem "blockedBy" Jsont.string ~enc:(fun r -> r.blocked_by) 2861 - |> Jsont.Object.opt_mem "blockingByList" Jsont.string ~enc:(fun r -> r.blocking_by_list) 2862 - |> Jsont.Object.opt_mem "blockedByList" Jsont.string ~enc:(fun r -> r.blocked_by_list) 2854 + let list_item_view_jsont = 2855 + Jsont.Object.map ~kind:"List_item_view" 2856 + (fun _typ subject uri -> { subject; uri }) 2857 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listItemView" ~enc:(fun _ -> "app.bsky.graph.defs#listItemView") 2858 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2859 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2863 2860 |> Jsont.Object.finish 2864 2861 2862 + type curatelist = string 2863 + let curatelist_jsont = Jsont.string 2864 + 2865 2865 type list_view_basic = { 2866 - uri : string; 2866 + avatar : string option; 2867 2867 cid : string; 2868 + indexed_at : string option; 2869 + labels : Com.Atproto.Label.Defs.label list option; 2870 + list_item_count : int option; 2868 2871 name : string; 2869 2872 purpose : Jsont.json; 2870 - avatar : string option; 2871 - list_item_count : int option; 2872 - labels : Com.Atproto.Label.Defs.label list option; 2873 + uri : string; 2873 2874 viewer : Jsont.json option; 2874 - indexed_at : string option; 2875 2875 } 2876 2876 2877 2877 let list_view_basic_jsont = 2878 2878 Jsont.Object.map ~kind:"List_view_basic" 2879 - (fun _typ uri cid name purpose avatar list_item_count labels viewer indexed_at -> { uri; cid; name; purpose; avatar; list_item_count; labels; viewer; indexed_at }) 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 2880 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#listViewBasic") 2881 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2881 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2882 2882 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2883 + |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2884 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2885 + |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2883 2886 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2884 2887 |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 2885 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2886 - |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2887 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2888 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2888 2889 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2889 - |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2890 2890 |> Jsont.Object.finish 2891 2891 2892 2892 type list_view = { 2893 - uri : string; 2893 + avatar : string option; 2894 2894 cid : string; 2895 2895 creator : Jsont.json; 2896 - name : string; 2897 - purpose : Jsont.json; 2898 2896 description : string option; 2899 2897 description_facets : Richtext.Facet.main list option; 2900 - avatar : string option; 2898 + indexed_at : string; 2899 + labels : Com.Atproto.Label.Defs.label list option; 2901 2900 list_item_count : int option; 2902 - labels : Com.Atproto.Label.Defs.label list option; 2901 + name : string; 2902 + purpose : Jsont.json; 2903 + uri : string; 2903 2904 viewer : Jsont.json option; 2904 - indexed_at : string; 2905 2905 } 2906 2906 2907 2907 let list_view_jsont = 2908 2908 Jsont.Object.map ~kind:"List_view" 2909 - (fun _typ uri cid creator name purpose description description_facets avatar list_item_count labels viewer indexed_at -> { uri; cid; creator; name; purpose; description; description_facets; avatar; list_item_count; labels; viewer; indexed_at }) 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 2910 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listView" ~enc:(fun _ -> "app.bsky.graph.defs#listView") 2911 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2911 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2912 2912 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2913 2913 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2914 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2915 - |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 2916 2914 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2917 2915 |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2918 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2916 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2917 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2919 2918 |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2920 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2919 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2920 + |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 2921 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2921 2922 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2922 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2923 2923 |> Jsont.Object.finish 2924 2924 2925 2925 type starter_pack_view = { 2926 - uri : string; 2927 2926 cid : string; 2928 - record : Jsont.json; 2929 2927 creator : Jsont.json; 2930 - list_ : Jsont.json option; 2931 - list_items_sample : Jsont.json list option; 2932 2928 feeds : Jsont.json list option; 2933 - joined_week_count : int option; 2929 + indexed_at : string; 2934 2930 joined_all_time_count : int option; 2931 + joined_week_count : int option; 2935 2932 labels : Com.Atproto.Label.Defs.label list option; 2936 - indexed_at : string; 2933 + list_ : Jsont.json option; 2934 + list_items_sample : Jsont.json list option; 2935 + record : Jsont.json; 2936 + uri : string; 2937 2937 } 2938 2938 2939 2939 let starter_pack_view_jsont = 2940 2940 Jsont.Object.map ~kind:"Starter_pack_view" 2941 - (fun _typ uri cid record creator list_ list_items_sample feeds joined_week_count joined_all_time_count labels indexed_at -> { uri; cid; record; creator; list_; list_items_sample; feeds; joined_week_count; joined_all_time_count; labels; indexed_at }) 2941 + (fun _typ cid creator feeds indexed_at joined_all_time_count joined_week_count labels list_ list_items_sample record uri -> { cid; creator; feeds; indexed_at; joined_all_time_count; joined_week_count; labels; list_; list_items_sample; record; uri }) 2942 2942 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackView" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackView") 2943 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2944 2943 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2945 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2946 2944 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2947 - |> Jsont.Object.opt_mem "list" Jsont.json ~enc:(fun r -> r.list_) 2948 - |> Jsont.Object.opt_mem "listItemsSample" (Jsont.list Jsont.json) ~enc:(fun r -> r.list_items_sample) 2949 2945 |> Jsont.Object.opt_mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 2950 - |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 2946 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2951 2947 |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 2948 + |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 2952 2949 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2953 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2950 + |> Jsont.Object.opt_mem "list" Jsont.json ~enc:(fun r -> r.list_) 2951 + |> Jsont.Object.opt_mem "listItemsSample" (Jsont.list Jsont.json) ~enc:(fun r -> r.list_items_sample) 2952 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2953 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2954 2954 |> Jsont.Object.finish 2955 2955 2956 2956 end 2957 2957 module GetBlocks = struct 2958 2958 type params = { 2959 - limit : int option; 2960 2959 cursor : string option; 2960 + limit : int option; 2961 2961 } 2962 2962 2963 2963 let params_jsont = 2964 2964 Jsont.Object.map ~kind:"Params" 2965 - (fun limit cursor -> { 2965 + (fun cursor limit -> { 2966 + cursor; 2966 2967 limit; 2967 - cursor; 2968 2968 }) 2969 - |> Jsont.Object.opt_mem "limit" Jsont.int 2970 - ~enc:(fun r -> r.limit) 2971 2969 |> Jsont.Object.opt_mem "cursor" Jsont.string 2972 2970 ~enc:(fun r -> r.cursor) 2971 + |> Jsont.Object.opt_mem "limit" Jsont.int 2972 + ~enc:(fun r -> r.limit) 2973 2973 |> Jsont.Object.finish 2974 2974 2975 2975 type output = { 2976 - cursor : string option; 2977 2976 blocks : Jsont.json list; 2977 + cursor : string option; 2978 2978 } 2979 2979 2980 2980 let output_jsont = 2981 2981 Jsont.Object.map ~kind:"Output" 2982 - (fun _typ cursor blocks -> { cursor; blocks }) 2982 + (fun _typ blocks cursor -> { blocks; cursor }) 2983 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) 2984 2985 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2985 - |> Jsont.Object.mem "blocks" (Jsont.list Jsont.json) ~enc:(fun r -> r.blocks) 2986 2986 |> Jsont.Object.finish 2987 2987 2988 2988 end 2989 2989 module Verification = struct 2990 2990 type main = { 2991 - subject : string; 2991 + created_at : string; 2992 + display_name : string; 2992 2993 handle : string; 2993 - display_name : string; 2994 - created_at : string; 2994 + subject : string; 2995 2995 } 2996 2996 2997 2997 let main_jsont = 2998 2998 Jsont.Object.map ~kind:"Main" 2999 - (fun _typ subject handle display_name created_at -> { subject; handle; display_name; created_at }) 2999 + (fun _typ created_at display_name handle subject -> { created_at; display_name; handle; subject }) 3000 3000 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.verification" ~enc:(fun _ -> "app.bsky.graph.verification") 3001 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3002 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 3003 + |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 3001 3004 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 3002 - |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 3003 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 3004 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3005 3005 |> Jsont.Object.finish 3006 3006 3007 3007 end 3008 3008 module GetMutes = struct 3009 3009 type params = { 3010 - limit : int option; 3011 3010 cursor : string option; 3011 + limit : int option; 3012 3012 } 3013 3013 3014 3014 let params_jsont = 3015 3015 Jsont.Object.map ~kind:"Params" 3016 - (fun limit cursor -> { 3016 + (fun cursor limit -> { 3017 + cursor; 3017 3018 limit; 3018 - cursor; 3019 3019 }) 3020 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3021 + ~enc:(fun r -> r.cursor) 3020 3022 |> Jsont.Object.opt_mem "limit" Jsont.int 3021 3023 ~enc:(fun r -> r.limit) 3022 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3023 - ~enc:(fun r -> r.cursor) 3024 3024 |> Jsont.Object.finish 3025 3025 3026 3026 type output = { ··· 3071 3071 end 3072 3072 module GetStarterPacksWithMembership = struct 3073 3073 type starter_pack_with_membership = { 3074 - starter_pack : Jsont.json; 3075 3074 list_item : Jsont.json option; 3075 + starter_pack : Jsont.json; 3076 3076 } 3077 3077 3078 3078 let starter_pack_with_membership_jsont = 3079 3079 Jsont.Object.map ~kind:"Starter_pack_with_membership" 3080 - (fun _typ starter_pack list_item -> { starter_pack; list_item }) 3080 + (fun _typ list_item starter_pack -> { list_item; starter_pack }) 3081 3081 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership" ~enc:(fun _ -> "app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership") 3082 + |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 3082 3083 |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 3083 - |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 3084 3084 |> Jsont.Object.finish 3085 3085 3086 3086 type params = { 3087 3087 actor : string; 3088 - limit : int option; 3089 3088 cursor : string option; 3089 + limit : int option; 3090 3090 } 3091 3091 3092 3092 let params_jsont = 3093 3093 Jsont.Object.map ~kind:"Params" 3094 - (fun actor limit cursor -> { 3094 + (fun actor cursor limit -> { 3095 3095 actor; 3096 - limit; 3097 3096 cursor; 3097 + limit; 3098 3098 }) 3099 3099 |> Jsont.Object.mem "actor" Jsont.string 3100 3100 ~enc:(fun r -> r.actor) 3101 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3102 + ~enc:(fun r -> r.cursor) 3101 3103 |> Jsont.Object.opt_mem "limit" Jsont.int 3102 3104 ~enc:(fun r -> r.limit) 3103 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3104 - ~enc:(fun r -> r.cursor) 3105 3105 |> Jsont.Object.finish 3106 3106 3107 3107 type output = { ··· 3121 3121 module GetActorStarterPacks = struct 3122 3122 type params = { 3123 3123 actor : string; 3124 - limit : int option; 3125 3124 cursor : string option; 3125 + limit : int option; 3126 3126 } 3127 3127 3128 3128 let params_jsont = 3129 3129 Jsont.Object.map ~kind:"Params" 3130 - (fun actor limit cursor -> { 3130 + (fun actor cursor limit -> { 3131 3131 actor; 3132 + cursor; 3132 3133 limit; 3133 - cursor; 3134 3134 }) 3135 3135 |> Jsont.Object.mem "actor" Jsont.string 3136 3136 ~enc:(fun r -> r.actor) 3137 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3138 + ~enc:(fun r -> r.cursor) 3137 3139 |> Jsont.Object.opt_mem "limit" Jsont.int 3138 3140 ~enc:(fun r -> r.limit) 3139 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3140 - ~enc:(fun r -> r.cursor) 3141 3141 |> Jsont.Object.finish 3142 3142 3143 3143 type output = { ··· 3156 3156 end 3157 3157 module List = struct 3158 3158 type main = { 3159 - purpose : Jsont.json; 3160 - name : string; 3159 + avatar : Atp.Blob_ref.t option; 3160 + created_at : string; 3161 3161 description : string option; 3162 3162 description_facets : Richtext.Facet.main list option; 3163 - avatar : Atp.Blob_ref.t option; 3164 3163 labels : Com.Atproto.Label.Defs.self_labels option; 3165 - created_at : string; 3164 + name : string; 3165 + purpose : Jsont.json; 3166 3166 } 3167 3167 3168 3168 let main_jsont = 3169 3169 Jsont.Object.map ~kind:"Main" 3170 - (fun _typ purpose name description description_facets avatar labels created_at -> { purpose; name; description; description_facets; avatar; labels; created_at }) 3170 + (fun _typ avatar created_at description description_facets labels name purpose -> { avatar; created_at; description; description_facets; labels; name; purpose }) 3171 3171 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.list" ~enc:(fun _ -> "app.bsky.graph.list") 3172 - |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 3173 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 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 3174 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 3175 3175 |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 3176 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 3177 3176 |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3178 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3177 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 3178 + |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 3179 3179 |> Jsont.Object.finish 3180 3180 3181 3181 end 3182 3182 module SearchStarterPacks = struct 3183 3183 type params = { 3184 - q : string; 3185 - limit : int option; 3186 3184 cursor : string option; 3185 + limit : int option; 3186 + q : string; 3187 3187 } 3188 3188 3189 3189 let params_jsont = 3190 3190 Jsont.Object.map ~kind:"Params" 3191 - (fun q limit cursor -> { 3192 - q; 3191 + (fun cursor limit q -> { 3192 + cursor; 3193 3193 limit; 3194 - cursor; 3194 + q; 3195 3195 }) 3196 - |> Jsont.Object.mem "q" Jsont.string 3197 - ~enc:(fun r -> r.q) 3196 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3197 + ~enc:(fun r -> r.cursor) 3198 3198 |> Jsont.Object.opt_mem "limit" Jsont.int 3199 3199 ~enc:(fun r -> r.limit) 3200 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3201 - ~enc:(fun r -> r.cursor) 3200 + |> Jsont.Object.mem "q" Jsont.string 3201 + ~enc:(fun r -> r.q) 3202 3202 |> Jsont.Object.finish 3203 3203 3204 3204 type output = { ··· 3217 3217 end 3218 3218 module GetList = struct 3219 3219 type params = { 3220 - list_ : string; 3221 - limit : int option; 3222 3220 cursor : string option; 3221 + limit : int option; 3222 + list_ : string; 3223 3223 } 3224 3224 3225 3225 let params_jsont = 3226 3226 Jsont.Object.map ~kind:"Params" 3227 - (fun list_ limit cursor -> { 3227 + (fun cursor limit list_ -> { 3228 + cursor; 3229 + limit; 3228 3230 list_; 3229 - limit; 3230 - cursor; 3231 3231 }) 3232 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3233 + ~enc:(fun r -> r.cursor) 3234 + |> Jsont.Object.opt_mem "limit" Jsont.int 3235 + ~enc:(fun r -> r.limit) 3232 3236 |> Jsont.Object.mem "list" Jsont.string 3233 3237 ~enc:(fun r -> r.list_) 3234 - |> Jsont.Object.opt_mem "limit" Jsont.int 3235 - ~enc:(fun r -> r.limit) 3236 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3237 - ~enc:(fun r -> r.cursor) 3238 3238 |> Jsont.Object.finish 3239 3239 3240 3240 type output = { 3241 3241 cursor : string option; 3242 + items : Jsont.json list; 3242 3243 list_ : Jsont.json; 3243 - items : Jsont.json list; 3244 3244 } 3245 3245 3246 3246 let output_jsont = 3247 3247 Jsont.Object.map ~kind:"Output" 3248 - (fun _typ cursor list_ items -> { cursor; list_; items }) 3248 + (fun _typ cursor items list_ -> { cursor; items; list_ }) 3249 3249 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getList#output" ~enc:(fun _ -> "app.bsky.graph.getList#output") 3250 3250 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3251 - |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3252 3251 |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 3252 + |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3253 3253 |> Jsont.Object.finish 3254 3254 3255 3255 end 3256 3256 module GetListBlocks = struct 3257 3257 type params = { 3258 - limit : int option; 3259 3258 cursor : string option; 3259 + limit : int option; 3260 3260 } 3261 3261 3262 3262 let params_jsont = 3263 3263 Jsont.Object.map ~kind:"Params" 3264 - (fun limit cursor -> { 3265 - limit; 3264 + (fun cursor limit -> { 3266 3265 cursor; 3266 + limit; 3267 3267 }) 3268 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3269 + ~enc:(fun r -> r.cursor) 3268 3270 |> Jsont.Object.opt_mem "limit" Jsont.int 3269 3271 ~enc:(fun r -> r.limit) 3270 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3271 - ~enc:(fun r -> r.cursor) 3272 3272 |> Jsont.Object.finish 3273 3273 3274 3274 type output = { ··· 3327 3327 3328 3328 type params = { 3329 3329 actor : string; 3330 - limit : int option; 3331 3330 cursor : string option; 3331 + limit : int option; 3332 3332 purposes : string list option; 3333 3333 } 3334 3334 3335 3335 let params_jsont = 3336 3336 Jsont.Object.map ~kind:"Params" 3337 - (fun actor limit cursor purposes -> { 3337 + (fun actor cursor limit purposes -> { 3338 3338 actor; 3339 - limit; 3340 3339 cursor; 3340 + limit; 3341 3341 purposes; 3342 3342 }) 3343 3343 |> Jsont.Object.mem "actor" Jsont.string 3344 3344 ~enc:(fun r -> r.actor) 3345 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3346 + ~enc:(fun r -> r.cursor) 3345 3347 |> Jsont.Object.opt_mem "limit" Jsont.int 3346 3348 ~enc:(fun r -> r.limit) 3347 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3348 - ~enc:(fun r -> r.cursor) 3349 3349 |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3350 3350 ~enc:(fun r -> r.purposes) 3351 3351 |> Jsont.Object.finish ··· 3366 3366 end 3367 3367 module GetListMutes = struct 3368 3368 type params = { 3369 - limit : int option; 3370 3369 cursor : string option; 3370 + limit : int option; 3371 3371 } 3372 3372 3373 3373 let params_jsont = 3374 3374 Jsont.Object.map ~kind:"Params" 3375 - (fun limit cursor -> { 3376 - limit; 3375 + (fun cursor limit -> { 3377 3376 cursor; 3377 + limit; 3378 3378 }) 3379 - |> Jsont.Object.opt_mem "limit" Jsont.int 3380 - ~enc:(fun r -> r.limit) 3381 3379 |> Jsont.Object.opt_mem "cursor" Jsont.string 3382 3380 ~enc:(fun r -> r.cursor) 3381 + |> Jsont.Object.opt_mem "limit" Jsont.int 3382 + ~enc:(fun r -> r.limit) 3383 3383 |> Jsont.Object.finish 3384 3384 3385 3385 type output = { ··· 3425 3425 module GetLists = struct 3426 3426 type params = { 3427 3427 actor : string; 3428 - limit : int option; 3429 3428 cursor : string option; 3429 + limit : int option; 3430 3430 purposes : string list option; 3431 3431 } 3432 3432 3433 3433 let params_jsont = 3434 3434 Jsont.Object.map ~kind:"Params" 3435 - (fun actor limit cursor purposes -> { 3435 + (fun actor cursor limit purposes -> { 3436 3436 actor; 3437 - limit; 3438 3437 cursor; 3438 + limit; 3439 3439 purposes; 3440 3440 }) 3441 3441 |> Jsont.Object.mem "actor" Jsont.string 3442 3442 ~enc:(fun r -> r.actor) 3443 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3444 + ~enc:(fun r -> r.cursor) 3443 3445 |> Jsont.Object.opt_mem "limit" Jsont.int 3444 3446 ~enc:(fun r -> r.limit) 3445 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3446 - ~enc:(fun r -> r.cursor) 3447 3447 |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3448 3448 ~enc:(fun r -> r.purposes) 3449 3449 |> Jsont.Object.finish ··· 3465 3465 end 3466 3466 module Feed = struct 3467 3467 module Post = struct 3468 + type text_slice = { 3469 + end_ : int; 3470 + start : int; 3471 + } 3472 + 3473 + let text_slice_jsont = 3474 + Jsont.Object.map ~kind:"Text_slice" 3475 + (fun _typ end_ start -> { end_; start }) 3476 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#textSlice" ~enc:(fun _ -> "app.bsky.feed.post#textSlice") 3477 + |> Jsont.Object.mem "end" Jsont.int ~enc:(fun r -> r.end_) 3478 + |> Jsont.Object.mem "start" Jsont.int ~enc:(fun r -> r.start) 3479 + |> Jsont.Object.finish 3480 + 3468 3481 type reply_ref = { 3482 + parent : Com.Atproto.Repo.StrongRef.main; 3469 3483 root : Com.Atproto.Repo.StrongRef.main; 3470 - parent : Com.Atproto.Repo.StrongRef.main; 3471 3484 } 3472 3485 3473 3486 let reply_ref_jsont = 3474 3487 Jsont.Object.map ~kind:"Reply_ref" 3475 - (fun _typ root parent -> { root; parent }) 3488 + (fun _typ parent root -> { parent; root }) 3476 3489 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#replyRef" ~enc:(fun _ -> "app.bsky.feed.post#replyRef") 3477 - |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3478 3490 |> Jsont.Object.mem "parent" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.parent) 3479 - |> Jsont.Object.finish 3480 - 3481 - type text_slice = { 3482 - start : int; 3483 - end_ : int; 3484 - } 3485 - 3486 - let text_slice_jsont = 3487 - Jsont.Object.map ~kind:"Text_slice" 3488 - (fun _typ start end_ -> { start; end_ }) 3489 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#textSlice" ~enc:(fun _ -> "app.bsky.feed.post#textSlice") 3490 - |> Jsont.Object.mem "start" Jsont.int ~enc:(fun r -> r.start) 3491 - |> Jsont.Object.mem "end" Jsont.int ~enc:(fun r -> r.end_) 3491 + |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3492 3492 |> Jsont.Object.finish 3493 3493 3494 3494 type entity = { ··· 3507 3507 |> Jsont.Object.finish 3508 3508 3509 3509 type main = { 3510 - text : string; 3510 + created_at : string; 3511 + embed : Jsont.json option; 3511 3512 entities : Jsont.json list option; 3512 3513 facets : Richtext.Facet.main list option; 3514 + labels : Com.Atproto.Label.Defs.self_labels option; 3515 + langs : string list option; 3513 3516 reply : Jsont.json option; 3514 - embed : Jsont.json option; 3515 - langs : string list option; 3516 - labels : Com.Atproto.Label.Defs.self_labels option; 3517 3517 tags : string list option; 3518 - created_at : string; 3518 + text : string; 3519 3519 } 3520 3520 3521 3521 let main_jsont = 3522 3522 Jsont.Object.map ~kind:"Main" 3523 - (fun _typ text entities facets reply embed langs labels tags created_at -> { text; entities; facets; reply; embed; langs; labels; tags; created_at }) 3523 + (fun _typ created_at embed entities facets labels langs reply tags text -> { created_at; embed; entities; facets; labels; langs; reply; tags; text }) 3524 3524 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post" ~enc:(fun _ -> "app.bsky.feed.post") 3525 - |> Jsont.Object.mem "text" Jsont.string ~enc:(fun r -> r.text) 3525 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3526 + |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 3526 3527 |> Jsont.Object.opt_mem "entities" (Jsont.list Jsont.json) ~enc:(fun r -> r.entities) 3527 3528 |> Jsont.Object.opt_mem "facets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.facets) 3528 - |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 3529 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 3529 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3530 3530 |> Jsont.Object.opt_mem "langs" (Jsont.list Jsont.string) ~enc:(fun r -> r.langs) 3531 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3531 + |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 3532 3532 |> Jsont.Object.opt_mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 3533 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3533 + |> Jsont.Object.mem "text" Jsont.string ~enc:(fun r -> r.text) 3534 3534 |> Jsont.Object.finish 3535 3535 3536 3536 end 3537 3537 module GetLikes = struct 3538 3538 type like = { 3539 - indexed_at : string; 3540 - created_at : string; 3541 3539 actor : Jsont.json; 3540 + created_at : string; 3541 + indexed_at : string; 3542 3542 } 3543 3543 3544 3544 let like_jsont = 3545 3545 Jsont.Object.map ~kind:"Like" 3546 - (fun _typ indexed_at created_at actor -> { indexed_at; created_at; actor }) 3546 + (fun _typ actor created_at indexed_at -> { actor; created_at; indexed_at }) 3547 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 "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3548 + |> Jsont.Object.mem "actor" Jsont.json ~enc:(fun r -> r.actor) 3549 3549 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3550 - |> Jsont.Object.mem "actor" Jsont.json ~enc:(fun r -> r.actor) 3550 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3551 3551 |> Jsont.Object.finish 3552 3552 3553 3553 type params = { 3554 - uri : string; 3555 3554 cid : string option; 3555 + cursor : string option; 3556 3556 limit : int option; 3557 - cursor : string option; 3557 + uri : string; 3558 3558 } 3559 3559 3560 3560 let params_jsont = 3561 3561 Jsont.Object.map ~kind:"Params" 3562 - (fun uri cid limit cursor -> { 3563 - uri; 3562 + (fun cid cursor limit uri -> { 3564 3563 cid; 3564 + cursor; 3565 3565 limit; 3566 - cursor; 3566 + uri; 3567 3567 }) 3568 - |> Jsont.Object.mem "uri" Jsont.string 3569 - ~enc:(fun r -> r.uri) 3570 3568 |> Jsont.Object.opt_mem "cid" Jsont.string 3571 3569 ~enc:(fun r -> r.cid) 3570 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3571 + ~enc:(fun r -> r.cursor) 3572 3572 |> Jsont.Object.opt_mem "limit" Jsont.int 3573 3573 ~enc:(fun r -> r.limit) 3574 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3575 - ~enc:(fun r -> r.cursor) 3574 + |> Jsont.Object.mem "uri" Jsont.string 3575 + ~enc:(fun r -> r.uri) 3576 3576 |> Jsont.Object.finish 3577 3577 3578 3578 type output = { 3579 - uri : string; 3580 3579 cid : string option; 3581 3580 cursor : string option; 3582 3581 likes : Jsont.json list; 3582 + uri : string; 3583 3583 } 3584 3584 3585 3585 let output_jsont = 3586 3586 Jsont.Object.map ~kind:"Output" 3587 - (fun _typ uri cid cursor likes -> { uri; cid; cursor; likes }) 3587 + (fun _typ cid cursor likes uri -> { cid; cursor; likes; uri }) 3588 3588 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getLikes#output" ~enc:(fun _ -> "app.bsky.feed.getLikes#output") 3589 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3590 3589 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3591 3590 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3592 3591 |> Jsont.Object.mem "likes" (Jsont.list Jsont.json) ~enc:(fun r -> r.likes) 3592 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3593 3593 |> Jsont.Object.finish 3594 3594 3595 3595 end ··· 3600 3600 3601 3601 type main = { 3602 3602 created_at : string; 3603 - post : string; 3604 3603 detached_embedding_uris : string list option; 3605 3604 embedding_rules : Jsont.json list option; 3605 + post : string; 3606 3606 } 3607 3607 3608 3608 let main_jsont = 3609 3609 Jsont.Object.map ~kind:"Main" 3610 - (fun _typ created_at post detached_embedding_uris embedding_rules -> { created_at; post; detached_embedding_uris; embedding_rules }) 3610 + (fun _typ created_at detached_embedding_uris embedding_rules post -> { created_at; detached_embedding_uris; embedding_rules; post }) 3611 3611 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.postgate" ~enc:(fun _ -> "app.bsky.feed.postgate") 3612 3612 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3613 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3614 3613 |> Jsont.Object.opt_mem "detachedEmbeddingUris" (Jsont.list Jsont.string) ~enc:(fun r -> r.detached_embedding_uris) 3615 3614 |> Jsont.Object.opt_mem "embeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.embedding_rules) 3615 + |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3616 3616 |> Jsont.Object.finish 3617 3617 3618 3618 end 3619 3619 module GetRepostedBy = struct 3620 3620 type params = { 3621 - uri : string; 3622 3621 cid : string option; 3623 - limit : int option; 3624 3622 cursor : string option; 3623 + limit : int option; 3624 + uri : string; 3625 3625 } 3626 3626 3627 3627 let params_jsont = 3628 3628 Jsont.Object.map ~kind:"Params" 3629 - (fun uri cid limit cursor -> { 3630 - uri; 3629 + (fun cid cursor limit uri -> { 3631 3630 cid; 3631 + cursor; 3632 3632 limit; 3633 - cursor; 3633 + uri; 3634 3634 }) 3635 - |> Jsont.Object.mem "uri" Jsont.string 3636 - ~enc:(fun r -> r.uri) 3637 3635 |> Jsont.Object.opt_mem "cid" Jsont.string 3638 3636 ~enc:(fun r -> r.cid) 3637 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3638 + ~enc:(fun r -> r.cursor) 3639 3639 |> Jsont.Object.opt_mem "limit" Jsont.int 3640 3640 ~enc:(fun r -> r.limit) 3641 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3642 - ~enc:(fun r -> r.cursor) 3641 + |> Jsont.Object.mem "uri" Jsont.string 3642 + ~enc:(fun r -> r.uri) 3643 3643 |> Jsont.Object.finish 3644 3644 3645 3645 type output = { 3646 - uri : string; 3647 3646 cid : string option; 3648 3647 cursor : string option; 3649 3648 reposted_by : Jsont.json list; 3649 + uri : string; 3650 3650 } 3651 3651 3652 3652 let output_jsont = 3653 3653 Jsont.Object.map ~kind:"Output" 3654 - (fun _typ uri cid cursor reposted_by -> { uri; cid; cursor; reposted_by }) 3654 + (fun _typ cid cursor reposted_by uri -> { cid; cursor; reposted_by; uri }) 3655 3655 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getRepostedBy#output" ~enc:(fun _ -> "app.bsky.feed.getRepostedBy#output") 3656 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3657 3656 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3658 3657 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3659 3658 |> Jsont.Object.mem "repostedBy" (Jsont.list Jsont.json) ~enc:(fun r -> r.reposted_by) 3659 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3660 3660 |> Jsont.Object.finish 3661 3661 3662 3662 end 3663 3663 module DescribeFeedGenerator = struct 3664 - type feed = { 3665 - uri : string; 3666 - } 3667 - 3668 - let feed_jsont = 3669 - Jsont.Object.map ~kind:"Feed" 3670 - (fun _typ uri -> { uri }) 3671 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#feed" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#feed") 3672 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3673 - |> Jsont.Object.finish 3674 - 3675 3664 type links = { 3676 3665 privacy_policy : string option; 3677 3666 terms_of_service : string option; ··· 3685 3674 |> Jsont.Object.opt_mem "termsOfService" Jsont.string ~enc:(fun r -> r.terms_of_service) 3686 3675 |> Jsont.Object.finish 3687 3676 3677 + type feed = { 3678 + uri : string; 3679 + } 3680 + 3681 + let feed_jsont = 3682 + Jsont.Object.map ~kind:"Feed" 3683 + (fun _typ uri -> { uri }) 3684 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#feed" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#feed") 3685 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3686 + |> Jsont.Object.finish 3687 + 3688 3688 type output = { 3689 3689 did : string; 3690 3690 feeds : Jsont.json list; ··· 3706 3706 3707 3707 let mention_rule_jsont = Jsont.ignore 3708 3708 3709 - type follower_rule = unit 3710 - 3711 - let follower_rule_jsont = Jsont.ignore 3712 - 3713 - type following_rule = unit 3714 - 3715 - let following_rule_jsont = Jsont.ignore 3716 - 3717 3709 type list_rule = { 3718 3710 list_ : string; 3719 3711 } ··· 3725 3717 |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3726 3718 |> Jsont.Object.finish 3727 3719 3720 + type following_rule = unit 3721 + 3722 + let following_rule_jsont = Jsont.ignore 3723 + 3724 + type follower_rule = unit 3725 + 3726 + let follower_rule_jsont = Jsont.ignore 3727 + 3728 3728 type main = { 3729 - post : string; 3730 3729 allow : Jsont.json list option; 3731 3730 created_at : string; 3732 3731 hidden_replies : string list option; 3732 + post : string; 3733 3733 } 3734 3734 3735 3735 let main_jsont = 3736 3736 Jsont.Object.map ~kind:"Main" 3737 - (fun _typ post allow created_at hidden_replies -> { post; allow; created_at; hidden_replies }) 3737 + (fun _typ allow created_at hidden_replies post -> { allow; created_at; hidden_replies; post }) 3738 3738 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate" ~enc:(fun _ -> "app.bsky.feed.threadgate") 3739 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3740 3739 |> Jsont.Object.opt_mem "allow" (Jsont.list Jsont.json) ~enc:(fun r -> r.allow) 3741 3740 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3742 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 3743 |> Jsont.Object.finish 3744 3744 3745 3745 end 3746 3746 module Like = struct 3747 3747 type main = { 3748 - subject : Com.Atproto.Repo.StrongRef.main; 3749 3748 created_at : string; 3749 + subject : Com.Atproto.Repo.StrongRef.main; 3750 3750 via : Com.Atproto.Repo.StrongRef.main option; 3751 3751 } 3752 3752 3753 3753 let main_jsont = 3754 3754 Jsont.Object.map ~kind:"Main" 3755 - (fun _typ subject created_at via -> { subject; created_at; via }) 3755 + (fun _typ created_at subject via -> { created_at; subject; via }) 3756 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) 3757 3758 |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 3758 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3759 3759 |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3760 3760 |> Jsont.Object.finish 3761 3761 3762 3762 end 3763 3763 module Defs = struct 3764 3764 type viewer_state = { 3765 - repost : string option; 3766 - like : string option; 3767 3765 bookmarked : bool option; 3768 - thread_muted : bool option; 3769 - reply_disabled : bool option; 3770 3766 embedding_disabled : bool option; 3767 + like : string option; 3771 3768 pinned : bool option; 3769 + reply_disabled : bool option; 3770 + repost : string option; 3771 + thread_muted : bool option; 3772 3772 } 3773 3773 3774 3774 let viewer_state_jsont = 3775 3775 Jsont.Object.map ~kind:"Viewer_state" 3776 - (fun _typ repost like bookmarked thread_muted reply_disabled embedding_disabled pinned -> { repost; like; bookmarked; thread_muted; reply_disabled; embedding_disabled; pinned }) 3776 + (fun _typ bookmarked embedding_disabled like pinned reply_disabled repost thread_muted -> { bookmarked; embedding_disabled; like; pinned; reply_disabled; repost; thread_muted }) 3777 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 "repost" Jsont.string ~enc:(fun r -> r.repost) 3779 - |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3780 3778 |> Jsont.Object.opt_mem "bookmarked" Jsont.bool ~enc:(fun r -> r.bookmarked) 3781 - |> Jsont.Object.opt_mem "threadMuted" Jsont.bool ~enc:(fun r -> r.thread_muted) 3782 - |> Jsont.Object.opt_mem "replyDisabled" Jsont.bool ~enc:(fun r -> r.reply_disabled) 3783 3779 |> Jsont.Object.opt_mem "embeddingDisabled" Jsont.bool ~enc:(fun r -> r.embedding_disabled) 3780 + |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3784 3781 |> Jsont.Object.opt_mem "pinned" Jsont.bool ~enc:(fun r -> r.pinned) 3782 + |> Jsont.Object.opt_mem "replyDisabled" Jsont.bool ~enc:(fun r -> r.reply_disabled) 3783 + |> Jsont.Object.opt_mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3784 + |> Jsont.Object.opt_mem "threadMuted" Jsont.bool ~enc:(fun r -> r.thread_muted) 3785 + |> Jsont.Object.finish 3786 + 3787 + type threadgate_view = { 3788 + cid : string option; 3789 + lists : Jsont.json list option; 3790 + record : Jsont.json option; 3791 + uri : string option; 3792 + } 3793 + 3794 + let threadgate_view_jsont = 3795 + Jsont.Object.map ~kind:"Threadgate_view" 3796 + (fun _typ cid lists record uri -> { cid; lists; record; uri }) 3797 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadgateView" ~enc:(fun _ -> "app.bsky.feed.defs#threadgateView") 3798 + |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3799 + |> Jsont.Object.opt_mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3800 + |> Jsont.Object.opt_mem "record" Jsont.json ~enc:(fun r -> r.record) 3801 + |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3785 3802 |> Jsont.Object.finish 3786 3803 3787 3804 type thread_context = { ··· 3795 3812 |> Jsont.Object.opt_mem "rootAuthorLike" Jsont.string ~enc:(fun r -> r.root_author_like) 3796 3813 |> Jsont.Object.finish 3797 3814 3815 + type skeleton_reason_repost = { 3816 + repost : string; 3817 + } 3818 + 3819 + let skeleton_reason_repost_jsont = 3820 + Jsont.Object.map ~kind:"Skeleton_reason_repost" 3821 + (fun _typ repost -> { repost }) 3822 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonReasonRepost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonReasonRepost") 3823 + |> Jsont.Object.mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3824 + |> Jsont.Object.finish 3825 + 3826 + type skeleton_reason_pin = unit 3827 + 3828 + let skeleton_reason_pin_jsont = Jsont.ignore 3829 + 3830 + type skeleton_feed_post = { 3831 + feed_context : string option; 3832 + post : string; 3833 + reason : Jsont.json option; 3834 + } 3835 + 3836 + let skeleton_feed_post_jsont = 3837 + Jsont.Object.map ~kind:"Skeleton_feed_post" 3838 + (fun _typ feed_context post reason -> { feed_context; post; reason }) 3839 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonFeedPost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonFeedPost") 3840 + |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 3841 + |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3842 + |> Jsont.Object.opt_mem "reason" Jsont.json ~enc:(fun r -> r.reason) 3843 + |> Jsont.Object.finish 3844 + 3845 + type request_more = string 3846 + let request_more_jsont = Jsont.string 3847 + 3848 + type request_less = string 3849 + let request_less_jsont = Jsont.string 3850 + 3798 3851 type reply_ref = { 3799 - root : Jsont.json; 3800 - parent : Jsont.json; 3801 3852 grandparent_author : Jsont.json option; 3853 + parent : Jsont.json; 3854 + root : Jsont.json; 3802 3855 } 3803 3856 3804 3857 let reply_ref_jsont = 3805 3858 Jsont.Object.map ~kind:"Reply_ref" 3806 - (fun _typ root parent grandparent_author -> { root; parent; grandparent_author }) 3859 + (fun _typ grandparent_author parent root -> { grandparent_author; parent; root }) 3807 3860 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#replyRef" ~enc:(fun _ -> "app.bsky.feed.defs#replyRef") 3808 - |> Jsont.Object.mem "root" Jsont.json ~enc:(fun r -> r.root) 3861 + |> Jsont.Object.opt_mem "grandparentAuthor" Jsont.json ~enc:(fun r -> r.grandparent_author) 3809 3862 |> Jsont.Object.mem "parent" Jsont.json ~enc:(fun r -> r.parent) 3810 - |> Jsont.Object.opt_mem "grandparentAuthor" Jsont.json ~enc:(fun r -> r.grandparent_author) 3863 + |> Jsont.Object.mem "root" Jsont.json ~enc:(fun r -> r.root) 3811 3864 |> Jsont.Object.finish 3812 3865 3813 3866 type reason_repost = { 3814 3867 by : Jsont.json; 3815 - uri : string option; 3816 3868 cid : string option; 3817 3869 indexed_at : string; 3870 + uri : string option; 3818 3871 } 3819 3872 3820 3873 let reason_repost_jsont = 3821 3874 Jsont.Object.map ~kind:"Reason_repost" 3822 - (fun _typ by uri cid indexed_at -> { by; uri; cid; indexed_at }) 3875 + (fun _typ by cid indexed_at uri -> { by; cid; indexed_at; uri }) 3823 3876 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#reasonRepost" ~enc:(fun _ -> "app.bsky.feed.defs#reasonRepost") 3824 3877 |> Jsont.Object.mem "by" Jsont.json ~enc:(fun r -> r.by) 3825 - |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3826 3878 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3827 3879 |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3880 + |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3828 3881 |> Jsont.Object.finish 3829 3882 3830 3883 type reason_pin = unit ··· 3832 3885 let reason_pin_jsont = Jsont.ignore 3833 3886 3834 3887 type not_found_post = { 3888 + not_found : bool; 3835 3889 uri : string; 3836 - not_found : bool; 3837 3890 } 3838 3891 3839 3892 let not_found_post_jsont = 3840 3893 Jsont.Object.map ~kind:"Not_found_post" 3841 - (fun _typ uri not_found -> { uri; not_found }) 3894 + (fun _typ not_found uri -> { not_found; uri }) 3842 3895 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#notFoundPost" ~enc:(fun _ -> "app.bsky.feed.defs#notFoundPost") 3843 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3844 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) 3845 3898 |> Jsont.Object.finish 3846 3899 3847 - type blocked_author = { 3848 - did : string; 3849 - viewer : Jsont.json option; 3850 - } 3900 + type interaction_share = string 3901 + let interaction_share_jsont = Jsont.string 3851 3902 3852 - let blocked_author_jsont = 3853 - Jsont.Object.map ~kind:"Blocked_author" 3854 - (fun _typ did viewer -> { did; viewer }) 3855 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedAuthor" ~enc:(fun _ -> "app.bsky.feed.defs#blockedAuthor") 3856 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 3857 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3858 - |> Jsont.Object.finish 3859 - 3860 - type generator_viewer_state = { 3861 - like : string option; 3862 - } 3863 - 3864 - let generator_viewer_state_jsont = 3865 - Jsont.Object.map ~kind:"Generator_viewer_state" 3866 - (fun _typ like -> { like }) 3867 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#generatorViewerState" ~enc:(fun _ -> "app.bsky.feed.defs#generatorViewerState") 3868 - |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3869 - |> Jsont.Object.finish 3870 - 3871 - type skeleton_feed_post = { 3872 - post : string; 3873 - reason : Jsont.json option; 3874 - feed_context : string option; 3875 - } 3876 - 3877 - let skeleton_feed_post_jsont = 3878 - Jsont.Object.map ~kind:"Skeleton_feed_post" 3879 - (fun _typ post reason feed_context -> { post; reason; feed_context }) 3880 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonFeedPost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonFeedPost") 3881 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3882 - |> Jsont.Object.opt_mem "reason" Jsont.json ~enc:(fun r -> r.reason) 3883 - |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 3884 - |> Jsont.Object.finish 3885 - 3886 - type skeleton_reason_repost = { 3887 - repost : string; 3888 - } 3903 + type interaction_seen = string 3904 + let interaction_seen_jsont = Jsont.string 3889 3905 3890 - let skeleton_reason_repost_jsont = 3891 - Jsont.Object.map ~kind:"Skeleton_reason_repost" 3892 - (fun _typ repost -> { repost }) 3893 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#skeletonReasonRepost" ~enc:(fun _ -> "app.bsky.feed.defs#skeletonReasonRepost") 3894 - |> Jsont.Object.mem "repost" Jsont.string ~enc:(fun r -> r.repost) 3895 - |> Jsont.Object.finish 3906 + type interaction_repost = string 3907 + let interaction_repost_jsont = Jsont.string 3896 3908 3897 - type skeleton_reason_pin = unit 3898 - 3899 - let skeleton_reason_pin_jsont = Jsont.ignore 3909 + type interaction_reply = string 3910 + let interaction_reply_jsont = Jsont.string 3900 3911 3901 - type threadgate_view = { 3902 - uri : string option; 3903 - cid : string option; 3904 - record : Jsont.json option; 3905 - lists : Jsont.json list option; 3906 - } 3912 + type interaction_quote = string 3913 + let interaction_quote_jsont = Jsont.string 3907 3914 3908 - let threadgate_view_jsont = 3909 - Jsont.Object.map ~kind:"Threadgate_view" 3910 - (fun _typ uri cid record lists -> { uri; cid; record; lists }) 3911 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#threadgateView" ~enc:(fun _ -> "app.bsky.feed.defs#threadgateView") 3912 - |> Jsont.Object.opt_mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3913 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3914 - |> Jsont.Object.opt_mem "record" Jsont.json ~enc:(fun r -> r.record) 3915 - |> Jsont.Object.opt_mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3916 - |> Jsont.Object.finish 3915 + type interaction_like = string 3916 + let interaction_like_jsont = Jsont.string 3917 3917 3918 3918 type interaction = { 3919 - item : string option; 3920 3919 event : string option; 3921 3920 feed_context : string option; 3921 + item : string option; 3922 3922 req_id : string option; 3923 3923 } 3924 3924 3925 3925 let interaction_jsont = 3926 3926 Jsont.Object.map ~kind:"Interaction" 3927 - (fun _typ item event feed_context req_id -> { item; event; feed_context; req_id }) 3927 + (fun _typ event feed_context item req_id -> { event; feed_context; item; req_id }) 3928 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 "item" Jsont.string ~enc:(fun r -> r.item) 3930 3929 |> Jsont.Object.opt_mem "event" Jsont.string ~enc:(fun r -> r.event) 3931 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 3932 |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 3933 3933 |> Jsont.Object.finish 3934 3934 3935 - type request_less = string 3936 - let request_less_jsont = Jsont.string 3935 + type generator_viewer_state = { 3936 + like : string option; 3937 + } 3937 3938 3938 - type request_more = string 3939 - let request_more_jsont = Jsont.string 3939 + let generator_viewer_state_jsont = 3940 + Jsont.Object.map ~kind:"Generator_viewer_state" 3941 + (fun _typ like -> { like }) 3942 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#generatorViewerState" ~enc:(fun _ -> "app.bsky.feed.defs#generatorViewerState") 3943 + |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 3944 + |> Jsont.Object.finish 3940 3945 3941 - type clickthrough_item = string 3942 - let clickthrough_item_jsont = Jsont.string 3946 + type content_mode_video = string 3947 + let content_mode_video_jsont = Jsont.string 3943 3948 3944 - type clickthrough_author = string 3945 - let clickthrough_author_jsont = Jsont.string 3949 + type content_mode_unspecified = string 3950 + let content_mode_unspecified_jsont = Jsont.string 3946 3951 3947 3952 type clickthrough_reposter = string 3948 3953 let clickthrough_reposter_jsont = Jsont.string 3949 3954 3955 + type clickthrough_item = string 3956 + let clickthrough_item_jsont = Jsont.string 3957 + 3950 3958 type clickthrough_embed = string 3951 3959 let clickthrough_embed_jsont = Jsont.string 3952 3960 3953 - type content_mode_unspecified = string 3954 - let content_mode_unspecified_jsont = Jsont.string 3961 + type clickthrough_author = string 3962 + let clickthrough_author_jsont = Jsont.string 3955 3963 3956 - type content_mode_video = string 3957 - let content_mode_video_jsont = Jsont.string 3958 - 3959 - type interaction_seen = string 3960 - let interaction_seen_jsont = Jsont.string 3961 - 3962 - type interaction_like = string 3963 - let interaction_like_jsont = Jsont.string 3964 - 3965 - type interaction_repost = string 3966 - let interaction_repost_jsont = Jsont.string 3964 + type blocked_author = { 3965 + did : string; 3966 + viewer : Jsont.json option; 3967 + } 3967 3968 3968 - type interaction_reply = string 3969 - let interaction_reply_jsont = Jsont.string 3970 - 3971 - type interaction_quote = string 3972 - let interaction_quote_jsont = Jsont.string 3973 - 3974 - type interaction_share = string 3975 - let interaction_share_jsont = Jsont.string 3969 + let blocked_author_jsont = 3970 + Jsont.Object.map ~kind:"Blocked_author" 3971 + (fun _typ did viewer -> { did; viewer }) 3972 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedAuthor" ~enc:(fun _ -> "app.bsky.feed.defs#blockedAuthor") 3973 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 3974 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3975 + |> Jsont.Object.finish 3976 3976 3977 3977 type post_view = { 3978 - uri : string; 3979 - cid : string; 3980 3978 author : Jsont.json; 3981 - record : Jsont.json; 3982 - embed : Jsont.json option; 3983 3979 bookmark_count : int option; 3984 - reply_count : int option; 3985 - repost_count : int option; 3986 - like_count : int option; 3987 - quote_count : int option; 3980 + cid : string; 3981 + debug : Jsont.json option; 3982 + embed : Jsont.json option; 3988 3983 indexed_at : string; 3989 - viewer : Jsont.json option; 3990 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; 3991 3990 threadgate : Jsont.json option; 3992 - debug : Jsont.json option; 3991 + uri : string; 3992 + viewer : Jsont.json option; 3993 3993 } 3994 3994 3995 3995 let post_view_jsont = 3996 3996 Jsont.Object.map ~kind:"Post_view" 3997 - (fun _typ uri cid author record embed bookmark_count reply_count repost_count like_count quote_count indexed_at viewer labels threadgate debug -> { uri; cid; author; record; embed; bookmark_count; reply_count; repost_count; like_count; quote_count; indexed_at; viewer; labels; threadgate; debug }) 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 3998 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#postView" ~enc:(fun _ -> "app.bsky.feed.defs#postView") 3999 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4000 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4001 3999 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 4002 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 4003 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 4004 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) 4005 4009 |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 4006 4010 |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 4007 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 4008 - |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 4009 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 4010 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4011 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 4012 4011 |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 4013 - |> Jsont.Object.opt_mem "debug" Jsont.json ~enc:(fun r -> r.debug) 4014 - |> Jsont.Object.finish 4015 - 4016 - type blocked_post = { 4017 - uri : string; 4018 - blocked : bool; 4019 - author : Jsont.json; 4020 - } 4021 - 4022 - let blocked_post_jsont = 4023 - Jsont.Object.map ~kind:"Blocked_post" 4024 - (fun _typ uri blocked author -> { uri; blocked; author }) 4025 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedPost" ~enc:(fun _ -> "app.bsky.feed.defs#blockedPost") 4026 4012 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4027 - |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 4028 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 4013 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4029 4014 |> Jsont.Object.finish 4030 4015 4031 4016 type generator_view = { 4032 - uri : string; 4017 + accepts_interactions : bool option; 4018 + avatar : string option; 4033 4019 cid : string; 4034 - did : string; 4020 + content_mode : string option; 4035 4021 creator : Jsont.json; 4036 - display_name : string; 4037 4022 description : string option; 4038 4023 description_facets : Richtext.Facet.main list option; 4039 - avatar : string option; 4024 + did : string; 4025 + display_name : string; 4026 + indexed_at : string; 4027 + labels : Com.Atproto.Label.Defs.label list option; 4040 4028 like_count : int option; 4041 - accepts_interactions : bool option; 4042 - labels : Com.Atproto.Label.Defs.label list option; 4029 + uri : string; 4043 4030 viewer : Jsont.json option; 4044 - content_mode : string option; 4045 - indexed_at : string; 4046 4031 } 4047 4032 4048 4033 let generator_view_jsont = 4049 4034 Jsont.Object.map ~kind:"Generator_view" 4050 - (fun _typ uri cid did creator display_name description description_facets avatar like_count accepts_interactions labels viewer content_mode indexed_at -> { uri; cid; did; creator; display_name; description; description_facets; avatar; like_count; accepts_interactions; labels; viewer; content_mode; indexed_at }) 4035 + (fun _typ accepts_interactions avatar cid content_mode creator description description_facets did display_name indexed_at labels like_count uri viewer -> { accepts_interactions; avatar; cid; content_mode; creator; description; description_facets; did; display_name; indexed_at; labels; like_count; uri; viewer }) 4051 4036 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#generatorView" ~enc:(fun _ -> "app.bsky.feed.defs#generatorView") 4052 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4037 + |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 4038 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 4053 4039 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4054 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4040 + |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 4055 4041 |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 4056 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 4057 4042 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 4058 4043 |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 4059 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 4044 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4045 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 4046 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 4047 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 4060 4048 |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 4061 - |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 4062 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 4049 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4063 4050 |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 4064 - |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 4065 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 4066 4051 |> Jsont.Object.finish 4067 4052 4068 - type feed_view_post = { 4069 - post : Jsont.json; 4070 - reply : Jsont.json option; 4071 - reason : Jsont.json option; 4072 - feed_context : string option; 4073 - req_id : string option; 4053 + type blocked_post = { 4054 + author : Jsont.json; 4055 + blocked : bool; 4056 + uri : string; 4074 4057 } 4075 4058 4076 - let feed_view_post_jsont = 4077 - Jsont.Object.map ~kind:"Feed_view_post" 4078 - (fun _typ post reply reason feed_context req_id -> { post; reply; reason; feed_context; req_id }) 4079 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#feedViewPost" ~enc:(fun _ -> "app.bsky.feed.defs#feedViewPost") 4080 - |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 4081 - |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 4082 - |> Jsont.Object.opt_mem "reason" Jsont.json ~enc:(fun r -> r.reason) 4083 - |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 4084 - |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 4059 + let blocked_post_jsont = 4060 + Jsont.Object.map ~kind:"Blocked_post" 4061 + (fun _typ author blocked uri -> { author; blocked; uri }) 4062 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#blockedPost" ~enc:(fun _ -> "app.bsky.feed.defs#blockedPost") 4063 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 4064 + |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 4065 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4085 4066 |> Jsont.Object.finish 4086 4067 4087 4068 type thread_view_post = { 4088 - post : Jsont.json; 4089 4069 parent : Jsont.json option; 4070 + post : Jsont.json; 4090 4071 replies : Jsont.json list option; 4091 4072 thread_context : Jsont.json option; 4092 4073 } 4093 4074 4094 4075 let thread_view_post_jsont = 4095 4076 Jsont.Object.map ~kind:"Thread_view_post" 4096 - (fun _typ post parent replies thread_context -> { post; parent; replies; thread_context }) 4077 + (fun _typ parent post replies thread_context -> { parent; post; replies; thread_context }) 4097 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) 4098 4080 |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 4099 - |> Jsont.Object.opt_mem "parent" Jsont.json ~enc:(fun r -> r.parent) 4100 4081 |> Jsont.Object.opt_mem "replies" (Jsont.list Jsont.json) ~enc:(fun r -> r.replies) 4101 4082 |> Jsont.Object.opt_mem "threadContext" Jsont.json ~enc:(fun r -> r.thread_context) 4102 4083 |> Jsont.Object.finish 4103 4084 4085 + type feed_view_post = { 4086 + feed_context : string option; 4087 + post : Jsont.json; 4088 + reason : Jsont.json option; 4089 + reply : Jsont.json option; 4090 + req_id : string option; 4091 + } 4092 + 4093 + let feed_view_post_jsont = 4094 + Jsont.Object.map ~kind:"Feed_view_post" 4095 + (fun _typ feed_context post reason reply req_id -> { feed_context; post; reason; reply; req_id }) 4096 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.defs#feedViewPost" ~enc:(fun _ -> "app.bsky.feed.defs#feedViewPost") 4097 + |> Jsont.Object.opt_mem "feedContext" Jsont.string ~enc:(fun r -> r.feed_context) 4098 + |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 4099 + |> Jsont.Object.opt_mem "reason" Jsont.json ~enc:(fun r -> r.reason) 4100 + |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 4101 + |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 4102 + |> Jsont.Object.finish 4103 + 4104 4104 end 4105 4105 module Repost = struct 4106 4106 type main = { 4107 - subject : Com.Atproto.Repo.StrongRef.main; 4108 4107 created_at : string; 4108 + subject : Com.Atproto.Repo.StrongRef.main; 4109 4109 via : Com.Atproto.Repo.StrongRef.main option; 4110 4110 } 4111 4111 4112 4112 let main_jsont = 4113 4113 Jsont.Object.map ~kind:"Main" 4114 - (fun _typ subject created_at via -> { subject; created_at; via }) 4114 + (fun _typ created_at subject via -> { created_at; subject; via }) 4115 4115 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.repost" ~enc:(fun _ -> "app.bsky.feed.repost") 4116 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4117 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 4118 |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 4119 4119 |> Jsont.Object.finish 4120 4120 4121 4121 end 4122 4122 module Generator = struct 4123 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; 4124 4130 did : string; 4125 4131 display_name : string; 4126 - description : string option; 4127 - description_facets : Richtext.Facet.main list option; 4128 - avatar : Atp.Blob_ref.t option; 4129 - accepts_interactions : bool option; 4130 4132 labels : Com.Atproto.Label.Defs.self_labels option; 4131 - content_mode : string option; 4132 - created_at : string; 4133 4133 } 4134 4134 4135 4135 let main_jsont = 4136 4136 Jsont.Object.map ~kind:"Main" 4137 - (fun _typ did display_name description description_facets avatar accepts_interactions labels content_mode created_at -> { did; display_name; description; description_facets; avatar; accepts_interactions; labels; content_mode; created_at }) 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 4138 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.generator" ~enc:(fun _ -> "app.bsky.feed.generator") 4139 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4140 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 4141 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 4142 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 4143 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 4144 4139 |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 4145 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 4140 + |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 4146 4141 |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 4147 4142 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4143 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 4144 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 4145 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4146 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 4147 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 4148 4148 |> Jsont.Object.finish 4149 4149 4150 4150 end 4151 4151 module GetPostThread = struct 4152 4152 type params = { 4153 - uri : string; 4154 4153 depth : int option; 4155 4154 parent_height : int option; 4155 + uri : string; 4156 4156 } 4157 4157 4158 4158 let params_jsont = 4159 4159 Jsont.Object.map ~kind:"Params" 4160 - (fun uri depth parent_height -> { 4161 - uri; 4160 + (fun depth parent_height uri -> { 4162 4161 depth; 4163 4162 parent_height; 4163 + uri; 4164 4164 }) 4165 - |> Jsont.Object.mem "uri" Jsont.string 4166 - ~enc:(fun r -> r.uri) 4167 4165 |> Jsont.Object.opt_mem "depth" Jsont.int 4168 4166 ~enc:(fun r -> r.depth) 4169 4167 |> Jsont.Object.opt_mem "parentHeight" Jsont.int 4170 4168 ~enc:(fun r -> r.parent_height) 4169 + |> Jsont.Object.mem "uri" Jsont.string 4170 + ~enc:(fun r -> r.uri) 4171 4171 |> Jsont.Object.finish 4172 4172 4173 4173 type output = { ··· 4186 4186 end 4187 4187 module GetFeed = struct 4188 4188 type params = { 4189 + cursor : string option; 4189 4190 feed : string; 4190 4191 limit : int option; 4191 - cursor : string option; 4192 4192 } 4193 4193 4194 4194 let params_jsont = 4195 4195 Jsont.Object.map ~kind:"Params" 4196 - (fun feed limit cursor -> { 4196 + (fun cursor feed limit -> { 4197 + cursor; 4197 4198 feed; 4198 4199 limit; 4199 - cursor; 4200 4200 }) 4201 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4202 + ~enc:(fun r -> r.cursor) 4201 4203 |> Jsont.Object.mem "feed" Jsont.string 4202 4204 ~enc:(fun r -> r.feed) 4203 4205 |> Jsont.Object.opt_mem "limit" Jsont.int 4204 4206 ~enc:(fun r -> r.limit) 4205 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4206 - ~enc:(fun r -> r.cursor) 4207 4207 |> Jsont.Object.finish 4208 4208 4209 4209 type output = { ··· 4222 4222 end 4223 4223 module GetQuotes = struct 4224 4224 type params = { 4225 - uri : string; 4226 4225 cid : string option; 4227 - limit : int option; 4228 4226 cursor : string option; 4227 + limit : int option; 4228 + uri : string; 4229 4229 } 4230 4230 4231 4231 let params_jsont = 4232 4232 Jsont.Object.map ~kind:"Params" 4233 - (fun uri cid limit cursor -> { 4234 - uri; 4233 + (fun cid cursor limit uri -> { 4235 4234 cid; 4235 + cursor; 4236 4236 limit; 4237 - cursor; 4237 + uri; 4238 4238 }) 4239 - |> Jsont.Object.mem "uri" Jsont.string 4240 - ~enc:(fun r -> r.uri) 4241 4239 |> Jsont.Object.opt_mem "cid" Jsont.string 4242 4240 ~enc:(fun r -> r.cid) 4243 - |> Jsont.Object.opt_mem "limit" Jsont.int 4244 - ~enc:(fun r -> r.limit) 4245 4241 |> Jsont.Object.opt_mem "cursor" Jsont.string 4246 4242 ~enc:(fun r -> r.cursor) 4243 + |> Jsont.Object.opt_mem "limit" Jsont.int 4244 + ~enc:(fun r -> r.limit) 4245 + |> Jsont.Object.mem "uri" Jsont.string 4246 + ~enc:(fun r -> r.uri) 4247 4247 |> Jsont.Object.finish 4248 4248 4249 4249 type output = { 4250 - uri : string; 4251 4250 cid : string option; 4252 4251 cursor : string option; 4253 4252 posts : Jsont.json list; 4253 + uri : string; 4254 4254 } 4255 4255 4256 4256 let output_jsont = 4257 4257 Jsont.Object.map ~kind:"Output" 4258 - (fun _typ uri cid cursor posts -> { uri; cid; cursor; posts }) 4258 + (fun _typ cid cursor posts uri -> { cid; cursor; posts; uri }) 4259 4259 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getQuotes#output" ~enc:(fun _ -> "app.bsky.feed.getQuotes#output") 4260 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4261 4260 |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4262 4261 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4263 4262 |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 4263 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4264 4264 |> Jsont.Object.finish 4265 4265 4266 4266 end 4267 4267 module GetListFeed = struct 4268 4268 type params = { 4269 - list_ : string; 4270 - limit : int option; 4271 4269 cursor : string option; 4270 + limit : int option; 4271 + list_ : string; 4272 4272 } 4273 4273 4274 4274 let params_jsont = 4275 4275 Jsont.Object.map ~kind:"Params" 4276 - (fun list_ limit cursor -> { 4276 + (fun cursor limit list_ -> { 4277 + cursor; 4278 + limit; 4277 4279 list_; 4278 - limit; 4279 - cursor; 4280 4280 }) 4281 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4282 + ~enc:(fun r -> r.cursor) 4283 + |> Jsont.Object.opt_mem "limit" Jsont.int 4284 + ~enc:(fun r -> r.limit) 4281 4285 |> Jsont.Object.mem "list" Jsont.string 4282 4286 ~enc:(fun r -> r.list_) 4283 - |> Jsont.Object.opt_mem "limit" Jsont.int 4284 - ~enc:(fun r -> r.limit) 4285 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4286 - ~enc:(fun r -> r.cursor) 4287 4287 |> Jsont.Object.finish 4288 4288 4289 4289 type output = { ··· 4303 4303 module GetActorLikes = struct 4304 4304 type params = { 4305 4305 actor : string; 4306 - limit : int option; 4307 4306 cursor : string option; 4307 + limit : int option; 4308 4308 } 4309 4309 4310 4310 let params_jsont = 4311 4311 Jsont.Object.map ~kind:"Params" 4312 - (fun actor limit cursor -> { 4312 + (fun actor cursor limit -> { 4313 4313 actor; 4314 - limit; 4315 4314 cursor; 4315 + limit; 4316 4316 }) 4317 4317 |> Jsont.Object.mem "actor" Jsont.string 4318 4318 ~enc:(fun r -> r.actor) 4319 - |> Jsont.Object.opt_mem "limit" Jsont.int 4320 - ~enc:(fun r -> r.limit) 4321 4319 |> Jsont.Object.opt_mem "cursor" Jsont.string 4322 4320 ~enc:(fun r -> r.cursor) 4321 + |> Jsont.Object.opt_mem "limit" Jsont.int 4322 + ~enc:(fun r -> r.limit) 4323 4323 |> Jsont.Object.finish 4324 4324 4325 4325 type output = { ··· 4338 4338 end 4339 4339 module GetFeedSkeleton = struct 4340 4340 type params = { 4341 + cursor : string option; 4341 4342 feed : string; 4342 4343 limit : int option; 4343 - cursor : string option; 4344 4344 } 4345 4345 4346 4346 let params_jsont = 4347 4347 Jsont.Object.map ~kind:"Params" 4348 - (fun feed limit cursor -> { 4348 + (fun cursor feed limit -> { 4349 + cursor; 4349 4350 feed; 4350 4351 limit; 4351 - cursor; 4352 4352 }) 4353 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4354 + ~enc:(fun r -> r.cursor) 4353 4355 |> Jsont.Object.mem "feed" Jsont.string 4354 4356 ~enc:(fun r -> r.feed) 4355 4357 |> Jsont.Object.opt_mem "limit" Jsont.int 4356 4358 ~enc:(fun r -> r.limit) 4357 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4358 - ~enc:(fun r -> r.cursor) 4359 4359 |> Jsont.Object.finish 4360 4360 4361 4361 type output = { ··· 4376 4376 end 4377 4377 module SearchPosts = struct 4378 4378 type params = { 4379 + author : string option; 4380 + cursor : string option; 4381 + domain : string option; 4382 + lang : string option; 4383 + limit : int option; 4384 + mentions : string option; 4379 4385 q : string; 4386 + since : string option; 4380 4387 sort : string option; 4381 - since : string option; 4388 + tag : string list option; 4382 4389 until : string option; 4383 - mentions : string option; 4384 - author : string option; 4385 - lang : string option; 4386 - domain : string option; 4387 4390 url : string option; 4388 - tag : string list option; 4389 - limit : int option; 4390 - cursor : string option; 4391 4391 } 4392 4392 4393 4393 let params_jsont = 4394 4394 Jsont.Object.map ~kind:"Params" 4395 - (fun q sort since until mentions author lang domain url tag limit cursor -> { 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; 4396 4402 q; 4403 + since; 4397 4404 sort; 4398 - since; 4405 + tag; 4399 4406 until; 4400 - mentions; 4401 - author; 4402 - lang; 4403 - domain; 4404 4407 url; 4405 - tag; 4406 - limit; 4407 - cursor; 4408 4408 }) 4409 + |> Jsont.Object.opt_mem "author" Jsont.string 4410 + ~enc:(fun r -> r.author) 4411 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4412 + ~enc:(fun r -> r.cursor) 4413 + |> Jsont.Object.opt_mem "domain" Jsont.string 4414 + ~enc:(fun r -> r.domain) 4415 + |> Jsont.Object.opt_mem "lang" Jsont.string 4416 + ~enc:(fun r -> r.lang) 4417 + |> Jsont.Object.opt_mem "limit" Jsont.int 4418 + ~enc:(fun r -> r.limit) 4419 + |> Jsont.Object.opt_mem "mentions" Jsont.string 4420 + ~enc:(fun r -> r.mentions) 4409 4421 |> Jsont.Object.mem "q" Jsont.string 4410 4422 ~enc:(fun r -> r.q) 4423 + |> Jsont.Object.opt_mem "since" Jsont.string 4424 + ~enc:(fun r -> r.since) 4411 4425 |> Jsont.Object.opt_mem "sort" Jsont.string 4412 4426 ~enc:(fun r -> r.sort) 4413 - |> Jsont.Object.opt_mem "since" Jsont.string 4414 - ~enc:(fun r -> r.since) 4427 + |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 4428 + ~enc:(fun r -> r.tag) 4415 4429 |> Jsont.Object.opt_mem "until" Jsont.string 4416 4430 ~enc:(fun r -> r.until) 4417 - |> Jsont.Object.opt_mem "mentions" Jsont.string 4418 - ~enc:(fun r -> r.mentions) 4419 - |> Jsont.Object.opt_mem "author" Jsont.string 4420 - ~enc:(fun r -> r.author) 4421 - |> Jsont.Object.opt_mem "lang" Jsont.string 4422 - ~enc:(fun r -> r.lang) 4423 - |> Jsont.Object.opt_mem "domain" Jsont.string 4424 - ~enc:(fun r -> r.domain) 4425 4431 |> Jsont.Object.opt_mem "url" Jsont.string 4426 4432 ~enc:(fun r -> r.url) 4427 - |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 4428 - ~enc:(fun r -> r.tag) 4429 - |> Jsont.Object.opt_mem "limit" Jsont.int 4430 - ~enc:(fun r -> r.limit) 4431 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4432 - ~enc:(fun r -> r.cursor) 4433 4433 |> Jsont.Object.finish 4434 4434 4435 4435 type output = { ··· 4494 4494 module GetAuthorFeed = struct 4495 4495 type params = { 4496 4496 actor : string; 4497 - limit : int option; 4498 4497 cursor : string option; 4499 4498 filter : string option; 4500 4499 include_pins : bool option; 4500 + limit : int option; 4501 4501 } 4502 4502 4503 4503 let params_jsont = 4504 4504 Jsont.Object.map ~kind:"Params" 4505 - (fun actor limit cursor filter include_pins -> { 4505 + (fun actor cursor filter include_pins limit -> { 4506 4506 actor; 4507 - limit; 4508 4507 cursor; 4509 4508 filter; 4510 4509 include_pins; 4510 + limit; 4511 4511 }) 4512 4512 |> Jsont.Object.mem "actor" Jsont.string 4513 4513 ~enc:(fun r -> r.actor) 4514 - |> Jsont.Object.opt_mem "limit" Jsont.int 4515 - ~enc:(fun r -> r.limit) 4516 4514 |> Jsont.Object.opt_mem "cursor" Jsont.string 4517 4515 ~enc:(fun r -> r.cursor) 4518 4516 |> Jsont.Object.opt_mem "filter" Jsont.string 4519 4517 ~enc:(fun r -> r.filter) 4520 4518 |> Jsont.Object.opt_mem "includePins" Jsont.bool 4521 4519 ~enc:(fun r -> r.include_pins) 4520 + |> Jsont.Object.opt_mem "limit" Jsont.int 4521 + ~enc:(fun r -> r.limit) 4522 4522 |> Jsont.Object.finish 4523 4523 4524 4524 type output = { ··· 4550 4550 |> Jsont.Object.finish 4551 4551 4552 4552 type output = { 4553 - view : Jsont.json; 4554 4553 is_online : bool; 4555 4554 is_valid : bool; 4555 + view : Jsont.json; 4556 4556 } 4557 4557 4558 4558 let output_jsont = 4559 4559 Jsont.Object.map ~kind:"Output" 4560 - (fun _typ view is_online is_valid -> { view; is_online; is_valid }) 4560 + (fun _typ is_online is_valid view -> { is_online; is_valid; view }) 4561 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 "view" Jsont.json ~enc:(fun r -> r.view) 4563 4562 |> Jsont.Object.mem "isOnline" Jsont.bool ~enc:(fun r -> r.is_online) 4564 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 4565 |> Jsont.Object.finish 4566 4566 4567 4567 end 4568 4568 module GetSuggestedFeeds = struct 4569 4569 type params = { 4570 - limit : int option; 4571 4570 cursor : string option; 4571 + limit : int option; 4572 4572 } 4573 4573 4574 4574 let params_jsont = 4575 4575 Jsont.Object.map ~kind:"Params" 4576 - (fun limit cursor -> { 4576 + (fun cursor limit -> { 4577 + cursor; 4577 4578 limit; 4578 - cursor; 4579 4579 }) 4580 - |> Jsont.Object.opt_mem "limit" Jsont.int 4581 - ~enc:(fun r -> r.limit) 4582 4580 |> Jsont.Object.opt_mem "cursor" Jsont.string 4583 4581 ~enc:(fun r -> r.cursor) 4582 + |> Jsont.Object.opt_mem "limit" Jsont.int 4583 + ~enc:(fun r -> r.limit) 4584 4584 |> Jsont.Object.finish 4585 4585 4586 4586 type output = { ··· 4600 4600 module GetActorFeeds = struct 4601 4601 type params = { 4602 4602 actor : string; 4603 - limit : int option; 4604 4603 cursor : string option; 4604 + limit : int option; 4605 4605 } 4606 4606 4607 4607 let params_jsont = 4608 4608 Jsont.Object.map ~kind:"Params" 4609 - (fun actor limit cursor -> { 4609 + (fun actor cursor limit -> { 4610 4610 actor; 4611 - limit; 4612 4611 cursor; 4612 + limit; 4613 4613 }) 4614 4614 |> Jsont.Object.mem "actor" Jsont.string 4615 4615 ~enc:(fun r -> r.actor) 4616 - |> Jsont.Object.opt_mem "limit" Jsont.int 4617 - ~enc:(fun r -> r.limit) 4618 4616 |> Jsont.Object.opt_mem "cursor" Jsont.string 4619 4617 ~enc:(fun r -> r.cursor) 4618 + |> Jsont.Object.opt_mem "limit" Jsont.int 4619 + ~enc:(fun r -> r.limit) 4620 4620 |> Jsont.Object.finish 4621 4621 4622 4622 type output = { ··· 4662 4662 module GetTimeline = struct 4663 4663 type params = { 4664 4664 algorithm : string option; 4665 - limit : int option; 4666 4665 cursor : string option; 4666 + limit : int option; 4667 4667 } 4668 4668 4669 4669 let params_jsont = 4670 4670 Jsont.Object.map ~kind:"Params" 4671 - (fun algorithm limit cursor -> { 4671 + (fun algorithm cursor limit -> { 4672 4672 algorithm; 4673 - limit; 4674 4673 cursor; 4674 + limit; 4675 4675 }) 4676 4676 |> Jsont.Object.opt_mem "algorithm" Jsont.string 4677 4677 ~enc:(fun r -> r.algorithm) 4678 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4679 + ~enc:(fun r -> r.cursor) 4678 4680 |> Jsont.Object.opt_mem "limit" Jsont.int 4679 4681 ~enc:(fun r -> r.limit) 4680 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4681 - ~enc:(fun r -> r.cursor) 4682 4682 |> Jsont.Object.finish 4683 4683 4684 4684 type output = { ··· 4712 4712 end 4713 4713 module CreateBookmark = struct 4714 4714 type input = { 4715 - uri : string; 4716 4715 cid : string; 4716 + uri : string; 4717 4717 } 4718 4718 4719 4719 let input_jsont = 4720 4720 Jsont.Object.map ~kind:"Input" 4721 - (fun _typ uri cid -> { uri; cid }) 4721 + (fun _typ cid uri -> { cid; uri }) 4722 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 "uri" Jsont.string ~enc:(fun r -> r.uri) 4724 4723 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4724 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4725 4725 |> Jsont.Object.finish 4726 4726 4727 4727 end 4728 4728 module Defs = struct 4729 - type bookmark = { 4729 + type bookmark_view = { 4730 + created_at : string option; 4731 + item : Jsont.json; 4730 4732 subject : Com.Atproto.Repo.StrongRef.main; 4731 4733 } 4732 4734 4733 - let bookmark_jsont = 4734 - Jsont.Object.map ~kind:"Bookmark" 4735 - (fun _typ subject -> { subject }) 4736 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmark" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmark") 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) 4737 4741 |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4738 4742 |> Jsont.Object.finish 4739 4743 4740 - type bookmark_view = { 4744 + type bookmark = { 4741 4745 subject : Com.Atproto.Repo.StrongRef.main; 4742 - created_at : string option; 4743 - item : Jsont.json; 4744 4746 } 4745 4747 4746 - let bookmark_view_jsont = 4747 - Jsont.Object.map ~kind:"Bookmark_view" 4748 - (fun _typ subject created_at item -> { subject; created_at; item }) 4749 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmarkView" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmarkView") 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") 4750 4752 |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4751 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4752 - |> Jsont.Object.mem "item" Jsont.json ~enc:(fun r -> r.item) 4753 4753 |> Jsont.Object.finish 4754 4754 4755 4755 end 4756 4756 module GetBookmarks = struct 4757 4757 type params = { 4758 - limit : int option; 4759 4758 cursor : string option; 4759 + limit : int option; 4760 4760 } 4761 4761 4762 4762 let params_jsont = 4763 4763 Jsont.Object.map ~kind:"Params" 4764 - (fun limit cursor -> { 4765 - limit; 4764 + (fun cursor limit -> { 4766 4765 cursor; 4766 + limit; 4767 4767 }) 4768 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4769 + ~enc:(fun r -> r.cursor) 4768 4770 |> Jsont.Object.opt_mem "limit" Jsont.int 4769 4771 ~enc:(fun r -> r.limit) 4770 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4771 - ~enc:(fun r -> r.cursor) 4772 4772 |> Jsont.Object.finish 4773 4773 4774 4774 type output = { 4775 - cursor : string option; 4776 4775 bookmarks : Defs.bookmark_view list; 4776 + cursor : string option; 4777 4777 } 4778 4778 4779 4779 let output_jsont = 4780 4780 Jsont.Object.map ~kind:"Output" 4781 - (fun _typ cursor bookmarks -> { cursor; bookmarks }) 4781 + (fun _typ bookmarks cursor -> { bookmarks; cursor }) 4782 4782 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.getBookmarks#output" ~enc:(fun _ -> "app.bsky.bookmark.getBookmarks#output") 4783 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4784 4783 |> Jsont.Object.mem "bookmarks" (Jsont.list Defs.bookmark_view_jsont) ~enc:(fun r -> r.bookmarks) 4784 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4785 4785 |> Jsont.Object.finish 4786 4786 4787 4787 end ··· 4789 4789 module Unspecced = struct 4790 4790 module GetSuggestedUsersSkeleton = struct 4791 4791 type params = { 4792 - viewer : string option; 4793 4792 category : string option; 4794 4793 limit : int option; 4794 + viewer : string option; 4795 4795 } 4796 4796 4797 4797 let params_jsont = 4798 4798 Jsont.Object.map ~kind:"Params" 4799 - (fun viewer category limit -> { 4800 - viewer; 4799 + (fun category limit viewer -> { 4801 4800 category; 4802 4801 limit; 4802 + viewer; 4803 4803 }) 4804 - |> Jsont.Object.opt_mem "viewer" Jsont.string 4805 - ~enc:(fun r -> r.viewer) 4806 4804 |> Jsont.Object.opt_mem "category" Jsont.string 4807 4805 ~enc:(fun r -> r.category) 4808 4806 |> Jsont.Object.opt_mem "limit" Jsont.int 4809 4807 ~enc:(fun r -> r.limit) 4808 + |> Jsont.Object.opt_mem "viewer" Jsont.string 4809 + ~enc:(fun r -> r.viewer) 4810 4810 |> Jsont.Object.finish 4811 4811 4812 4812 type output = { ··· 4851 4851 end 4852 4852 module GetPopularFeedGenerators = struct 4853 4853 type params = { 4854 - limit : int option; 4855 4854 cursor : string option; 4855 + limit : int option; 4856 4856 query : string option; 4857 4857 } 4858 4858 4859 4859 let params_jsont = 4860 4860 Jsont.Object.map ~kind:"Params" 4861 - (fun limit cursor query -> { 4862 - limit; 4861 + (fun cursor limit query -> { 4863 4862 cursor; 4863 + limit; 4864 4864 query; 4865 4865 }) 4866 + |> Jsont.Object.opt_mem "cursor" Jsont.string 4867 + ~enc:(fun r -> r.cursor) 4866 4868 |> Jsont.Object.opt_mem "limit" Jsont.int 4867 4869 ~enc:(fun r -> r.limit) 4868 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4869 - ~enc:(fun r -> r.cursor) 4870 4870 |> Jsont.Object.opt_mem "query" Jsont.string 4871 4871 ~enc:(fun r -> r.query) 4872 4872 |> Jsont.Object.finish ··· 4887 4887 end 4888 4888 module GetSuggestedStarterPacksSkeleton = struct 4889 4889 type params = { 4890 - viewer : string option; 4891 4890 limit : int option; 4891 + viewer : string option; 4892 4892 } 4893 4893 4894 4894 let params_jsont = 4895 4895 Jsont.Object.map ~kind:"Params" 4896 - (fun viewer limit -> { 4897 - viewer; 4896 + (fun limit viewer -> { 4898 4897 limit; 4898 + viewer; 4899 4899 }) 4900 + |> Jsont.Object.opt_mem "limit" Jsont.int 4901 + ~enc:(fun r -> r.limit) 4900 4902 |> Jsont.Object.opt_mem "viewer" Jsont.string 4901 4903 ~enc:(fun r -> r.viewer) 4902 - |> Jsont.Object.opt_mem "limit" Jsont.int 4903 - ~enc:(fun r -> r.limit) 4904 4904 |> Jsont.Object.finish 4905 4905 4906 4906 type output = { ··· 4943 4943 end 4944 4944 module GetSuggestedFeedsSkeleton = struct 4945 4945 type params = { 4946 - viewer : string option; 4947 4946 limit : int option; 4947 + viewer : string option; 4948 4948 } 4949 4949 4950 4950 let params_jsont = 4951 4951 Jsont.Object.map ~kind:"Params" 4952 - (fun viewer limit -> { 4953 - viewer; 4952 + (fun limit viewer -> { 4954 4953 limit; 4954 + viewer; 4955 4955 }) 4956 + |> Jsont.Object.opt_mem "limit" Jsont.int 4957 + ~enc:(fun r -> r.limit) 4956 4958 |> Jsont.Object.opt_mem "viewer" Jsont.string 4957 4959 ~enc:(fun r -> r.viewer) 4958 - |> Jsont.Object.opt_mem "limit" Jsont.int 4959 - ~enc:(fun r -> r.limit) 4960 4960 |> Jsont.Object.finish 4961 4961 4962 4962 type output = { ··· 5059 5059 end 5060 5060 module GetOnboardingSuggestedStarterPacksSkeleton = struct 5061 5061 type params = { 5062 - viewer : string option; 5063 5062 limit : int option; 5063 + viewer : string option; 5064 5064 } 5065 5065 5066 5066 let params_jsont = 5067 5067 Jsont.Object.map ~kind:"Params" 5068 - (fun viewer limit -> { 5068 + (fun limit viewer -> { 5069 + limit; 5069 5070 viewer; 5070 - limit; 5071 5071 }) 5072 + |> Jsont.Object.opt_mem "limit" Jsont.int 5073 + ~enc:(fun r -> r.limit) 5072 5074 |> Jsont.Object.opt_mem "viewer" Jsont.string 5073 5075 ~enc:(fun r -> r.viewer) 5074 - |> Jsont.Object.opt_mem "limit" Jsont.int 5075 - ~enc:(fun r -> r.limit) 5076 5076 |> Jsont.Object.finish 5077 5077 5078 5078 type output = { ··· 5088 5088 5089 5089 end 5090 5090 module Defs = struct 5091 - type skeleton_search_post = { 5092 - uri : string; 5093 - } 5094 - 5095 - let skeleton_search_post_jsont = 5096 - Jsont.Object.map ~kind:"Skeleton_search_post" 5097 - (fun _typ uri -> { uri }) 5098 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchPost" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchPost") 5099 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5100 - |> Jsont.Object.finish 5101 - 5102 - type skeleton_search_actor = { 5103 - did : string; 5104 - } 5105 - 5106 - let skeleton_search_actor_jsont = 5107 - Jsont.Object.map ~kind:"Skeleton_search_actor" 5108 - (fun _typ did -> { did }) 5109 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchActor" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchActor") 5110 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 5111 - |> Jsont.Object.finish 5112 - 5113 - type skeleton_search_starter_pack = { 5114 - uri : string; 5115 - } 5116 - 5117 - let skeleton_search_starter_pack_jsont = 5118 - Jsont.Object.map ~kind:"Skeleton_search_starter_pack" 5119 - (fun _typ uri -> { uri }) 5120 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchStarterPack" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchStarterPack") 5121 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5122 - |> Jsont.Object.finish 5123 - 5124 5091 type trending_topic = { 5125 - topic : string; 5126 - display_name : string option; 5127 5092 description : string option; 5093 + display_name : string option; 5128 5094 link : string; 5095 + topic : string; 5129 5096 } 5130 5097 5131 5098 let trending_topic_jsont = 5132 5099 Jsont.Object.map ~kind:"Trending_topic" 5133 - (fun _typ topic display_name description link -> { topic; display_name; description; link }) 5100 + (fun _typ description display_name link topic -> { description; display_name; link; topic }) 5134 5101 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#trendingTopic" ~enc:(fun _ -> "app.bsky.unspecced.defs#trendingTopic") 5135 - |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5102 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 5136 5103 |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5137 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 5138 5104 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5139 - |> Jsont.Object.finish 5140 - 5141 - type skeleton_trend = { 5142 - topic : string; 5143 - display_name : string; 5144 - link : string; 5145 - started_at : string; 5146 - post_count : int; 5147 - status : string option; 5148 - category : string option; 5149 - dids : string list; 5150 - } 5151 - 5152 - let skeleton_trend_jsont = 5153 - Jsont.Object.map ~kind:"Skeleton_trend" 5154 - (fun _typ topic display_name link started_at post_count status category dids -> { topic; display_name; link; started_at; post_count; status; category; dids }) 5155 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonTrend" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonTrend") 5156 5105 |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5157 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5158 - |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5159 - |> Jsont.Object.mem "startedAt" Jsont.string ~enc:(fun r -> r.started_at) 5160 - |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) 5161 - |> Jsont.Object.opt_mem "status" Jsont.string ~enc:(fun r -> r.status) 5162 - |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5163 - |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) ~enc:(fun r -> r.dids) 5164 5106 |> Jsont.Object.finish 5165 5107 5166 5108 type trend_view = { 5167 - topic : string; 5109 + actors : Jsont.json list; 5110 + category : string option; 5168 5111 display_name : string; 5169 5112 link : string; 5170 - started_at : string; 5171 5113 post_count : int; 5114 + started_at : string; 5172 5115 status : string option; 5173 - category : string option; 5174 - actors : Jsont.json list; 5116 + topic : string; 5175 5117 } 5176 5118 5177 5119 let trend_view_jsont = 5178 5120 Jsont.Object.map ~kind:"Trend_view" 5179 - (fun _typ topic display_name link started_at post_count status category actors -> { topic; display_name; link; started_at; post_count; status; category; actors }) 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 }) 5180 5122 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#trendView" ~enc:(fun _ -> "app.bsky.unspecced.defs#trendView") 5181 - |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5123 + |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 5124 + |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5182 5125 |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5183 5126 |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5127 + |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) 5184 5128 |> Jsont.Object.mem "startedAt" Jsont.string ~enc:(fun r -> r.started_at) 5185 - |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) 5186 5129 |> Jsont.Object.opt_mem "status" Jsont.string ~enc:(fun r -> r.status) 5187 - |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5188 - |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 5130 + |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5189 5131 |> Jsont.Object.finish 5190 5132 5191 5133 type thread_item_post = { 5192 - post : Jsont.json; 5134 + hidden_by_threadgate : bool; 5193 5135 more_parents : bool; 5194 5136 more_replies : int; 5195 - op_thread : bool; 5196 - hidden_by_threadgate : bool; 5197 5137 muted_by_viewer : bool; 5138 + op_thread : bool; 5139 + post : Jsont.json; 5198 5140 } 5199 5141 5200 5142 let thread_item_post_jsont = 5201 5143 Jsont.Object.map ~kind:"Thread_item_post" 5202 - (fun _typ post more_parents more_replies op_thread hidden_by_threadgate muted_by_viewer -> { post; more_parents; more_replies; op_thread; hidden_by_threadgate; muted_by_viewer }) 5144 + (fun _typ hidden_by_threadgate more_parents more_replies muted_by_viewer op_thread post -> { hidden_by_threadgate; more_parents; more_replies; muted_by_viewer; op_thread; post }) 5203 5145 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#threadItemPost" ~enc:(fun _ -> "app.bsky.unspecced.defs#threadItemPost") 5204 - |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 5146 + |> Jsont.Object.mem "hiddenByThreadgate" Jsont.bool ~enc:(fun r -> r.hidden_by_threadgate) 5205 5147 |> Jsont.Object.mem "moreParents" Jsont.bool ~enc:(fun r -> r.more_parents) 5206 5148 |> Jsont.Object.mem "moreReplies" Jsont.int ~enc:(fun r -> r.more_replies) 5149 + |> Jsont.Object.mem "mutedByViewer" Jsont.bool ~enc:(fun r -> r.muted_by_viewer) 5207 5150 |> Jsont.Object.mem "opThread" Jsont.bool ~enc:(fun r -> r.op_thread) 5208 - |> Jsont.Object.mem "hiddenByThreadgate" Jsont.bool ~enc:(fun r -> r.hidden_by_threadgate) 5209 - |> Jsont.Object.mem "mutedByViewer" Jsont.bool ~enc:(fun r -> r.muted_by_viewer) 5151 + |> Jsont.Object.mem "post" Jsont.json ~enc:(fun r -> r.post) 5210 5152 |> Jsont.Object.finish 5211 5153 5154 + type thread_item_not_found = unit 5155 + 5156 + let thread_item_not_found_jsont = Jsont.ignore 5157 + 5212 5158 type thread_item_no_unauthenticated = unit 5213 5159 5214 5160 let thread_item_no_unauthenticated_jsont = Jsont.ignore 5215 - 5216 - type thread_item_not_found = unit 5217 - 5218 - let thread_item_not_found_jsont = Jsont.ignore 5219 5161 5220 5162 type thread_item_blocked = { 5221 5163 author : Jsont.json; ··· 5228 5170 |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 5229 5171 |> Jsont.Object.finish 5230 5172 5173 + type skeleton_trend = { 5174 + category : string option; 5175 + dids : string list; 5176 + display_name : string; 5177 + link : string; 5178 + post_count : int; 5179 + started_at : string; 5180 + status : string option; 5181 + topic : string; 5182 + } 5183 + 5184 + let skeleton_trend_jsont = 5185 + Jsont.Object.map ~kind:"Skeleton_trend" 5186 + (fun _typ category dids display_name link post_count started_at status topic -> { category; dids; display_name; link; post_count; started_at; status; topic }) 5187 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonTrend" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonTrend") 5188 + |> Jsont.Object.opt_mem "category" Jsont.string ~enc:(fun r -> r.category) 5189 + |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) ~enc:(fun r -> r.dids) 5190 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 5191 + |> Jsont.Object.mem "link" Jsont.string ~enc:(fun r -> r.link) 5192 + |> Jsont.Object.mem "postCount" Jsont.int ~enc:(fun r -> r.post_count) 5193 + |> Jsont.Object.mem "startedAt" Jsont.string ~enc:(fun r -> r.started_at) 5194 + |> Jsont.Object.opt_mem "status" Jsont.string ~enc:(fun r -> r.status) 5195 + |> Jsont.Object.mem "topic" Jsont.string ~enc:(fun r -> r.topic) 5196 + |> Jsont.Object.finish 5197 + 5198 + type skeleton_search_starter_pack = { 5199 + uri : string; 5200 + } 5201 + 5202 + let skeleton_search_starter_pack_jsont = 5203 + Jsont.Object.map ~kind:"Skeleton_search_starter_pack" 5204 + (fun _typ uri -> { uri }) 5205 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchStarterPack" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchStarterPack") 5206 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5207 + |> Jsont.Object.finish 5208 + 5209 + type skeleton_search_post = { 5210 + uri : string; 5211 + } 5212 + 5213 + let skeleton_search_post_jsont = 5214 + Jsont.Object.map ~kind:"Skeleton_search_post" 5215 + (fun _typ uri -> { uri }) 5216 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchPost" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchPost") 5217 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5218 + |> Jsont.Object.finish 5219 + 5220 + type skeleton_search_actor = { 5221 + did : string; 5222 + } 5223 + 5224 + let skeleton_search_actor_jsont = 5225 + Jsont.Object.map ~kind:"Skeleton_search_actor" 5226 + (fun _typ did -> { did }) 5227 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.defs#skeletonSearchActor" ~enc:(fun _ -> "app.bsky.unspecced.defs#skeletonSearchActor") 5228 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 5229 + |> Jsont.Object.finish 5230 + 5231 5231 type age_assurance_state = { 5232 5232 last_initiated_at : string option; 5233 5233 status : string; ··· 5242 5242 |> Jsont.Object.finish 5243 5243 5244 5244 type age_assurance_event = { 5245 + attempt_id : string; 5246 + complete_ip : string option; 5247 + complete_ua : string option; 5245 5248 created_at : string; 5246 - status : string; 5247 - attempt_id : string; 5248 5249 email : string option; 5249 5250 init_ip : string option; 5250 5251 init_ua : string option; 5251 - complete_ip : string option; 5252 - complete_ua : string option; 5252 + status : string; 5253 5253 } 5254 5254 5255 5255 let age_assurance_event_jsont = 5256 5256 Jsont.Object.map ~kind:"Age_assurance_event" 5257 - (fun _typ created_at status attempt_id email init_ip init_ua complete_ip complete_ua -> { created_at; status; attempt_id; email; init_ip; init_ua; complete_ip; complete_ua }) 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 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) 5259 5262 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 5260 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 5261 - |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 5262 5263 |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 5263 5264 |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 5264 5265 |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 5265 - |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 5266 - |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 5266 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 5267 5267 |> Jsont.Object.finish 5268 5268 5269 5269 end 5270 5270 module GetTaggedSuggestions = struct 5271 5271 type suggestion = { 5272 - tag : string; 5273 - subject_type : string; 5274 5272 subject : string; 5273 + subject_type : string; 5274 + tag : string; 5275 5275 } 5276 5276 5277 5277 let suggestion_jsont = 5278 5278 Jsont.Object.map ~kind:"Suggestion" 5279 - (fun _typ tag subject_type subject -> { tag; subject_type; subject }) 5279 + (fun _typ subject subject_type tag -> { subject; subject_type; tag }) 5280 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 "tag" Jsont.string ~enc:(fun r -> r.tag) 5281 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 5282 5282 |> Jsont.Object.mem "subjectType" Jsont.string ~enc:(fun r -> r.subject_type) 5283 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 5283 + |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 5284 5284 |> Jsont.Object.finish 5285 5285 5286 5286 type params = unit ··· 5301 5301 end 5302 5302 module SearchPostsSkeleton = struct 5303 5303 type params = { 5304 + author : string option; 5305 + cursor : string option; 5306 + domain : string option; 5307 + lang : string option; 5308 + limit : int option; 5309 + mentions : string option; 5304 5310 q : string; 5311 + since : string option; 5305 5312 sort : string option; 5306 - since : string option; 5313 + tag : string list option; 5307 5314 until : string option; 5308 - mentions : string option; 5309 - author : string option; 5310 - lang : string option; 5311 - domain : string option; 5312 5315 url : string option; 5313 - tag : string list option; 5314 5316 viewer : string option; 5315 - limit : int option; 5316 - cursor : string option; 5317 5317 } 5318 5318 5319 5319 let params_jsont = 5320 5320 Jsont.Object.map ~kind:"Params" 5321 - (fun q sort since until mentions author lang domain url tag viewer limit cursor -> { 5321 + (fun author cursor domain lang limit mentions q since sort tag until url viewer -> { 5322 + author; 5323 + cursor; 5324 + domain; 5325 + lang; 5326 + limit; 5327 + mentions; 5322 5328 q; 5329 + since; 5323 5330 sort; 5324 - since; 5331 + tag; 5325 5332 until; 5326 - mentions; 5327 - author; 5328 - lang; 5329 - domain; 5330 5333 url; 5331 - tag; 5332 5334 viewer; 5333 - limit; 5334 - cursor; 5335 5335 }) 5336 + |> Jsont.Object.opt_mem "author" Jsont.string 5337 + ~enc:(fun r -> r.author) 5338 + |> Jsont.Object.opt_mem "cursor" Jsont.string 5339 + ~enc:(fun r -> r.cursor) 5340 + |> Jsont.Object.opt_mem "domain" Jsont.string 5341 + ~enc:(fun r -> r.domain) 5342 + |> Jsont.Object.opt_mem "lang" Jsont.string 5343 + ~enc:(fun r -> r.lang) 5344 + |> Jsont.Object.opt_mem "limit" Jsont.int 5345 + ~enc:(fun r -> r.limit) 5346 + |> Jsont.Object.opt_mem "mentions" Jsont.string 5347 + ~enc:(fun r -> r.mentions) 5336 5348 |> Jsont.Object.mem "q" Jsont.string 5337 5349 ~enc:(fun r -> r.q) 5350 + |> Jsont.Object.opt_mem "since" Jsont.string 5351 + ~enc:(fun r -> r.since) 5338 5352 |> Jsont.Object.opt_mem "sort" Jsont.string 5339 5353 ~enc:(fun r -> r.sort) 5340 - |> Jsont.Object.opt_mem "since" Jsont.string 5341 - ~enc:(fun r -> r.since) 5354 + |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 5355 + ~enc:(fun r -> r.tag) 5342 5356 |> Jsont.Object.opt_mem "until" Jsont.string 5343 5357 ~enc:(fun r -> r.until) 5344 - |> Jsont.Object.opt_mem "mentions" Jsont.string 5345 - ~enc:(fun r -> r.mentions) 5346 - |> Jsont.Object.opt_mem "author" Jsont.string 5347 - ~enc:(fun r -> r.author) 5348 - |> Jsont.Object.opt_mem "lang" Jsont.string 5349 - ~enc:(fun r -> r.lang) 5350 - |> Jsont.Object.opt_mem "domain" Jsont.string 5351 - ~enc:(fun r -> r.domain) 5352 5358 |> Jsont.Object.opt_mem "url" Jsont.string 5353 5359 ~enc:(fun r -> r.url) 5354 - |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 5355 - ~enc:(fun r -> r.tag) 5356 5360 |> Jsont.Object.opt_mem "viewer" Jsont.string 5357 5361 ~enc:(fun r -> r.viewer) 5358 - |> Jsont.Object.opt_mem "limit" Jsont.int 5359 - ~enc:(fun r -> r.limit) 5360 - |> Jsont.Object.opt_mem "cursor" Jsont.string 5361 - ~enc:(fun r -> r.cursor) 5362 5362 |> Jsont.Object.finish 5363 5363 5364 5364 type output = { ··· 5379 5379 end 5380 5380 module GetPostThreadV2 = struct 5381 5381 type thread_item = { 5382 + depth : int; 5382 5383 uri : string; 5383 - depth : int; 5384 5384 value : Jsont.json; 5385 5385 } 5386 5386 5387 5387 let thread_item_jsont = 5388 5388 Jsont.Object.map ~kind:"Thread_item" 5389 - (fun _typ uri depth value -> { uri; depth; value }) 5389 + (fun _typ depth uri value -> { depth; uri; value }) 5390 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 "uri" Jsont.string ~enc:(fun r -> r.uri) 5392 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 5393 |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 5394 5394 |> Jsont.Object.finish 5395 5395 5396 5396 type params = { 5397 - anchor : string; 5398 5397 above : bool option; 5398 + anchor : string; 5399 5399 below : int option; 5400 5400 branching_factor : int option; 5401 5401 sort : string option; ··· 5403 5403 5404 5404 let params_jsont = 5405 5405 Jsont.Object.map ~kind:"Params" 5406 - (fun anchor above below branching_factor sort -> { 5406 + (fun above anchor below branching_factor sort -> { 5407 + above; 5407 5408 anchor; 5408 - above; 5409 5409 below; 5410 5410 branching_factor; 5411 5411 sort; 5412 5412 }) 5413 + |> Jsont.Object.opt_mem "above" Jsont.bool 5414 + ~enc:(fun r -> r.above) 5413 5415 |> Jsont.Object.mem "anchor" Jsont.string 5414 5416 ~enc:(fun r -> r.anchor) 5415 - |> Jsont.Object.opt_mem "above" Jsont.bool 5416 - ~enc:(fun r -> r.above) 5417 5417 |> Jsont.Object.opt_mem "below" Jsont.int 5418 5418 ~enc:(fun r -> r.below) 5419 5419 |> Jsont.Object.opt_mem "branchingFactor" Jsont.int ··· 5423 5423 |> Jsont.Object.finish 5424 5424 5425 5425 type output = { 5426 + has_other_replies : bool; 5426 5427 thread : thread_item list; 5427 5428 threadgate : Jsont.json option; 5428 - has_other_replies : bool; 5429 5429 } 5430 5430 5431 5431 let output_jsont = 5432 5432 Jsont.Object.map ~kind:"Output" 5433 - (fun _typ thread threadgate has_other_replies -> { thread; threadgate; has_other_replies }) 5433 + (fun _typ has_other_replies thread threadgate -> { has_other_replies; thread; threadgate }) 5434 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) 5435 5436 |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5436 5437 |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 5437 - |> Jsont.Object.mem "hasOtherReplies" Jsont.bool ~enc:(fun r -> r.has_other_replies) 5438 5438 |> Jsont.Object.finish 5439 5439 5440 5440 end 5441 5441 module GetTrendingTopics = struct 5442 5442 type params = { 5443 - viewer : string option; 5444 5443 limit : int option; 5444 + viewer : string option; 5445 5445 } 5446 5446 5447 5447 let params_jsont = 5448 5448 Jsont.Object.map ~kind:"Params" 5449 - (fun viewer limit -> { 5449 + (fun limit viewer -> { 5450 + limit; 5450 5451 viewer; 5451 - limit; 5452 5452 }) 5453 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5454 - ~enc:(fun r -> r.viewer) 5455 5453 |> Jsont.Object.opt_mem "limit" Jsont.int 5456 5454 ~enc:(fun r -> r.limit) 5455 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5456 + ~enc:(fun r -> r.viewer) 5457 5457 |> Jsont.Object.finish 5458 5458 5459 5459 type output = { 5460 - topics : Defs.trending_topic list; 5461 5460 suggested : Defs.trending_topic list; 5461 + topics : Defs.trending_topic list; 5462 5462 } 5463 5463 5464 5464 let output_jsont = 5465 5465 Jsont.Object.map ~kind:"Output" 5466 - (fun _typ topics suggested -> { topics; suggested }) 5466 + (fun _typ suggested topics -> { suggested; topics }) 5467 5467 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrendingTopics#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrendingTopics#output") 5468 + |> Jsont.Object.mem "suggested" (Jsont.list Defs.trending_topic_jsont) ~enc:(fun r -> r.suggested) 5468 5469 |> Jsont.Object.mem "topics" (Jsont.list Defs.trending_topic_jsont) ~enc:(fun r -> r.topics) 5469 - |> Jsont.Object.mem "suggested" (Jsont.list Defs.trending_topic_jsont) ~enc:(fun r -> r.suggested) 5470 5470 |> Jsont.Object.finish 5471 5471 5472 5472 end 5473 5473 module GetTrendsSkeleton = struct 5474 5474 type params = { 5475 - viewer : string option; 5476 5475 limit : int option; 5476 + viewer : string option; 5477 5477 } 5478 5478 5479 5479 let params_jsont = 5480 5480 Jsont.Object.map ~kind:"Params" 5481 - (fun viewer limit -> { 5482 - viewer; 5481 + (fun limit viewer -> { 5483 5482 limit; 5483 + viewer; 5484 5484 }) 5485 + |> Jsont.Object.opt_mem "limit" Jsont.int 5486 + ~enc:(fun r -> r.limit) 5485 5487 |> Jsont.Object.opt_mem "viewer" Jsont.string 5486 5488 ~enc:(fun r -> r.viewer) 5487 - |> Jsont.Object.opt_mem "limit" Jsont.int 5488 - ~enc:(fun r -> r.limit) 5489 5489 |> Jsont.Object.finish 5490 5490 5491 5491 type output = { ··· 5502 5502 end 5503 5503 module GetPostThreadOtherV2 = struct 5504 5504 type thread_item = { 5505 - uri : string; 5506 5505 depth : int; 5506 + uri : string; 5507 5507 value : Defs.thread_item_post; 5508 5508 } 5509 5509 5510 5510 let thread_item_jsont = 5511 5511 Jsont.Object.map ~kind:"Thread_item" 5512 - (fun _typ uri depth value -> { uri; depth; value }) 5512 + (fun _typ depth uri value -> { depth; uri; value }) 5513 5513 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadOtherV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadOtherV2#threadItem") 5514 + |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5514 5515 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5515 - |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5516 5516 |> Jsont.Object.mem "value" Defs.thread_item_post_jsont ~enc:(fun r -> r.value) 5517 5517 |> Jsont.Object.finish 5518 5518 ··· 5543 5543 end 5544 5544 module InitAgeAssurance = struct 5545 5545 type input = { 5546 + country_code : string; 5546 5547 email : string; 5547 5548 language : string; 5548 - country_code : string; 5549 5549 } 5550 5550 5551 5551 let input_jsont = 5552 5552 Jsont.Object.map ~kind:"Input" 5553 - (fun _typ email language country_code -> { email; language; country_code }) 5553 + (fun _typ country_code email language -> { country_code; email; language }) 5554 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) 5555 5556 |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 5556 5557 |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 5557 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 5558 5558 |> Jsont.Object.finish 5559 5559 5560 5560 type output = Defs.age_assurance_state ··· 5564 5564 end 5565 5565 module SearchStarterPacksSkeleton = struct 5566 5566 type params = { 5567 + cursor : string option; 5568 + limit : int option; 5567 5569 q : string; 5568 5570 viewer : string option; 5569 - limit : int option; 5570 - cursor : string option; 5571 5571 } 5572 5572 5573 5573 let params_jsont = 5574 5574 Jsont.Object.map ~kind:"Params" 5575 - (fun q viewer limit cursor -> { 5575 + (fun cursor limit q viewer -> { 5576 + cursor; 5577 + limit; 5576 5578 q; 5577 5579 viewer; 5578 - limit; 5579 - cursor; 5580 5580 }) 5581 + |> Jsont.Object.opt_mem "cursor" Jsont.string 5582 + ~enc:(fun r -> r.cursor) 5583 + |> Jsont.Object.opt_mem "limit" Jsont.int 5584 + ~enc:(fun r -> r.limit) 5581 5585 |> Jsont.Object.mem "q" Jsont.string 5582 5586 ~enc:(fun r -> r.q) 5583 5587 |> Jsont.Object.opt_mem "viewer" Jsont.string 5584 5588 ~enc:(fun r -> r.viewer) 5585 - |> Jsont.Object.opt_mem "limit" Jsont.int 5586 - ~enc:(fun r -> r.limit) 5587 - |> Jsont.Object.opt_mem "cursor" Jsont.string 5588 - ~enc:(fun r -> r.cursor) 5589 5589 |> Jsont.Object.finish 5590 5590 5591 5591 type output = { ··· 5606 5606 end 5607 5607 module SearchActorsSkeleton = struct 5608 5608 type params = { 5609 + cursor : string option; 5610 + limit : int option; 5609 5611 q : string; 5610 - viewer : string option; 5611 5612 typeahead : bool option; 5612 - limit : int option; 5613 - cursor : string option; 5613 + viewer : string option; 5614 5614 } 5615 5615 5616 5616 let params_jsont = 5617 5617 Jsont.Object.map ~kind:"Params" 5618 - (fun q viewer typeahead limit cursor -> { 5618 + (fun cursor limit q typeahead viewer -> { 5619 + cursor; 5620 + limit; 5619 5621 q; 5620 - viewer; 5621 5622 typeahead; 5622 - limit; 5623 - cursor; 5623 + viewer; 5624 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) 5625 5629 |> Jsont.Object.mem "q" Jsont.string 5626 5630 ~enc:(fun r -> r.q) 5627 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5628 - ~enc:(fun r -> r.viewer) 5629 5631 |> Jsont.Object.opt_mem "typeahead" Jsont.bool 5630 5632 ~enc:(fun r -> r.typeahead) 5631 - |> Jsont.Object.opt_mem "limit" Jsont.int 5632 - ~enc:(fun r -> r.limit) 5633 - |> Jsont.Object.opt_mem "cursor" Jsont.string 5634 - ~enc:(fun r -> r.cursor) 5633 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5634 + ~enc:(fun r -> r.viewer) 5635 5635 |> Jsont.Object.finish 5636 5636 5637 5637 type output = { 5638 + actors : Defs.skeleton_search_actor list; 5638 5639 cursor : string option; 5639 5640 hits_total : int option; 5640 - actors : Defs.skeleton_search_actor list; 5641 5641 } 5642 5642 5643 5643 let output_jsont = 5644 5644 Jsont.Object.map ~kind:"Output" 5645 - (fun _typ cursor hits_total actors -> { cursor; hits_total; actors }) 5645 + (fun _typ actors cursor hits_total -> { actors; cursor; hits_total }) 5646 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) 5647 5648 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5648 5649 |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5649 - |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5650 5650 |> Jsont.Object.finish 5651 5651 5652 5652 end ··· 5658 5658 end 5659 5659 module GetSuggestionsSkeleton = struct 5660 5660 type params = { 5661 - viewer : string option; 5662 - limit : int option; 5663 5661 cursor : string option; 5662 + limit : int option; 5664 5663 relative_to_did : string option; 5664 + viewer : string option; 5665 5665 } 5666 5666 5667 5667 let params_jsont = 5668 5668 Jsont.Object.map ~kind:"Params" 5669 - (fun viewer limit cursor relative_to_did -> { 5670 - viewer; 5669 + (fun cursor limit relative_to_did viewer -> { 5670 + cursor; 5671 5671 limit; 5672 - cursor; 5673 5672 relative_to_did; 5673 + viewer; 5674 5674 }) 5675 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5676 - ~enc:(fun r -> r.viewer) 5677 - |> Jsont.Object.opt_mem "limit" Jsont.int 5678 - ~enc:(fun r -> r.limit) 5679 5675 |> Jsont.Object.opt_mem "cursor" Jsont.string 5680 5676 ~enc:(fun r -> r.cursor) 5677 + |> Jsont.Object.opt_mem "limit" Jsont.int 5678 + ~enc:(fun r -> r.limit) 5681 5679 |> Jsont.Object.opt_mem "relativeToDid" Jsont.string 5682 5680 ~enc:(fun r -> r.relative_to_did) 5681 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5682 + ~enc:(fun r -> r.viewer) 5683 5683 |> Jsont.Object.finish 5684 5684 5685 5685 type output = { 5686 + actors : Defs.skeleton_search_actor list; 5686 5687 cursor : string option; 5687 - actors : Defs.skeleton_search_actor list; 5688 + rec_id : int option; 5688 5689 relative_to_did : string option; 5689 - rec_id : int option; 5690 5690 } 5691 5691 5692 5692 let output_jsont = 5693 5693 Jsont.Object.map ~kind:"Output" 5694 - (fun _typ cursor actors relative_to_did rec_id -> { cursor; actors; relative_to_did; rec_id }) 5694 + (fun _typ actors cursor rec_id relative_to_did -> { actors; cursor; rec_id; relative_to_did }) 5695 5695 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestionsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestionsSkeleton#output") 5696 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5697 5696 |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5697 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5698 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5698 5699 |> Jsont.Object.opt_mem "relativeToDid" Jsont.string ~enc:(fun r -> r.relative_to_did) 5699 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5700 5700 |> Jsont.Object.finish 5701 5701 5702 5702 end
+869 -869
lexicons/bsky/atp_lexicon_bsky.mli
··· 14 14 module Atproto : sig 15 15 module Label : sig 16 16 module Defs : sig 17 - (** Metadata tag on an atproto resource (eg, repo or record). *) 18 - 19 - type label = { 20 - ver : int option; (** The AT Protocol version of the label object. *) 21 - src : string; (** DID of the actor who created this label. *) 22 - uri : string; (** AT URI of the record, repository (account), or other resource that this label applies to. *) 23 - cid : string option; (** Optionally, CID specifying the specific version of 'uri' resource this label applies to. *) 24 - val_ : string; (** The short string name of the value or type of this label. *) 25 - neg : bool option; (** If true, this is a negation label, overwriting a previous label. *) 26 - cts : string; (** Timestamp when this label was created. *) 27 - exp : string option; (** Timestamp at which this label expires (no longer applies). *) 28 - sig_ : string option; (** Signature of dag-cbor encoded label. *) 29 - } 30 - 31 - (** Jsont codec for {!type:label}. *) 32 - val label_jsont : label Jsont.t 33 - 34 17 (** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. *) 35 18 36 19 type self_label = { ··· 43 26 (** Strings which describe the label in the UI, localized into a specific language. *) 44 27 45 28 type label_value_definition_strings = { 29 + description : string; (** A longer description of what the label means and why it might be applied. *) 46 30 lang : string; (** The code of the language these strings are written in. *) 47 31 name : string; (** A short human-readable name for the label. *) 48 - description : string; (** A longer description of what the label means and why it might be applied. *) 49 32 } 50 33 51 34 (** Jsont codec for {!type:label_value_definition_strings}. *) ··· 55 38 type label_value = string 56 39 val label_value_jsont : label_value Jsont.t 57 40 41 + (** Metadata tag on an atproto resource (eg, repo or record). *) 42 + 43 + type label = { 44 + cid : string option; (** Optionally, CID specifying the specific version of 'uri' resource this label applies to. *) 45 + cts : string; (** Timestamp when this label was created. *) 46 + exp : string option; (** Timestamp at which this label expires (no longer applies). *) 47 + neg : bool option; (** If true, this is a negation label, overwriting a previous label. *) 48 + sig_ : string option; (** Signature of dag-cbor encoded label. *) 49 + src : string; (** DID of the actor who created this label. *) 50 + uri : string; (** AT URI of the record, repository (account), or other resource that this label applies to. *) 51 + val_ : string; (** The short string name of the value or type of this label. *) 52 + ver : int option; (** The AT Protocol version of the label object. *) 53 + } 54 + 55 + (** Jsont codec for {!type:label}. *) 56 + val label_jsont : label Jsont.t 57 + 58 58 (** Metadata tags on an atproto record, published by the author within the record. *) 59 59 60 60 type self_labels = { ··· 67 67 (** Declares a label value and its expected interpretations and behaviors. *) 68 68 69 69 type label_value_definition = { 70 - identifier : string; (** The value of the label being defined. Must only include lowercase ascii and the '-' character (\[a-z-\]+). *) 71 - severity : string; (** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. *) 70 + adult_only : bool option; (** Does the user need to have adult content enabled in order to configure this label? *) 72 71 blurs : string; (** What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. *) 73 72 default_setting : string option; (** The default setting for this label. *) 74 - adult_only : bool option; (** Does the user need to have adult content enabled in order to configure this label? *) 73 + identifier : string; (** The value of the label being defined. Must only include lowercase ascii and the '-' character (\[a-z-\]+). *) 75 74 locales : label_value_definition_strings list; 75 + severity : string; (** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. *) 76 76 } 77 77 78 78 (** Jsont codec for {!type:label_value_definition}. *) ··· 84 84 module StrongRef : sig 85 85 86 86 type main = { 87 - uri : string; 88 87 cid : string; 88 + uri : string; 89 89 } 90 90 91 91 (** Jsont codec for {!type:main}. *) ··· 95 95 end 96 96 module Moderation : sig 97 97 module Defs : sig 98 + (** Tag describing a type of subject that might be reported. *) 99 + 100 + type subject_type = string 101 + val subject_type_jsont : subject_type Jsont.t 102 + 103 + (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 104 + 105 + type reason_violation = string 106 + val reason_violation_jsont : reason_violation Jsont.t 107 + 98 108 99 109 type reason_type = string 100 110 val reason_type_jsont : reason_type Jsont.t ··· 104 114 type reason_spam = string 105 115 val reason_spam_jsont : reason_spam Jsont.t 106 116 107 - (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 108 - 109 - type reason_violation = string 110 - val reason_violation_jsont : reason_violation Jsont.t 111 - 112 - (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 113 - 114 - type reason_misleading = string 115 - val reason_misleading_jsont : reason_misleading Jsont.t 116 - 117 117 (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 118 118 119 119 type reason_sexual = string ··· 128 128 129 129 type reason_other = string 130 130 val reason_other_jsont : reason_other Jsont.t 131 + 132 + (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 133 + 134 + type reason_misleading = string 135 + val reason_misleading_jsont : reason_misleading Jsont.t 131 136 132 137 (** Appeal a previously taken moderation action *) 133 138 134 139 type reason_appeal = string 135 140 val reason_appeal_jsont : reason_appeal Jsont.t 136 141 137 - (** Tag describing a type of subject that might be reported. *) 138 - 139 - type subject_type = string 140 - val subject_type_jsont : subject_type Jsont.t 141 - 142 142 end 143 143 end 144 144 end ··· 165 165 end 166 166 module Richtext : sig 167 167 module Facet : sig 168 + (** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). *) 169 + 170 + type tag = { 171 + tag : string; 172 + } 173 + 174 + (** Jsont codec for {!type:tag}. *) 175 + val tag_jsont : tag Jsont.t 176 + 168 177 (** Facet feature for mention of another account. The text is usually a handle, including a '\@' prefix, but the facet reference is a DID. *) 169 178 170 179 type mention = { ··· 183 192 (** Jsont codec for {!type:link}. *) 184 193 val link_jsont : link Jsont.t 185 194 186 - (** 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 - 188 - type tag = { 189 - tag : string; 190 - } 191 - 192 - (** Jsont codec for {!type:tag}. *) 193 - val tag_jsont : tag Jsont.t 194 - 195 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 196 197 197 type byte_slice = { 198 + byte_end : int; 198 199 byte_start : int; 199 - byte_end : int; 200 200 } 201 201 202 202 (** Jsont codec for {!type:byte_slice}. *) ··· 205 205 (** Annotation of a sub-string within rich text. *) 206 206 207 207 type main = { 208 - index : byte_slice; 209 208 features : Jsont.json list; 209 + index : byte_slice; 210 210 } 211 211 212 212 (** Jsont codec for {!type:main}. *) ··· 240 240 end 241 241 module Ageassurance : sig 242 242 module Defs : sig 243 - (** The access level granted based on Age Assurance data we've processed. *) 244 - 245 - type access = string 246 - val access_jsont : access Jsont.t 247 - 248 243 (** The status of the Age Assurance process. *) 249 244 250 245 type status = string ··· 259 254 (** Jsont codec for {!type:state_metadata}. *) 260 255 val state_metadata_jsont : state_metadata Jsont.t 261 256 262 - (** The Age Assurance configuration for a specific region. *) 263 - 264 - type config_region = { 265 - country_code : string; (** The ISO 3166-1 alpha-2 country code this configuration applies to. *) 266 - region_code : string option; (** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. *) 267 - min_access_age : int; (** The minimum age (as a whole integer) required to use Bluesky in this region. *) 268 - 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. *) 269 - } 270 - 271 - (** Jsont codec for {!type:config_region}. *) 272 - val config_region_jsont : config_region Jsont.t 273 - 274 257 (** Object used to store Age Assurance data in stash. *) 275 258 276 259 type event = { 277 - created_at : string; (** The date and time of this write operation. *) 278 - attempt_id : string; (** The unique identifier for this instance of the Age Assurance flow, in UUID format. *) 279 - status : string; (** The status of the Age Assurance process. *) 280 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. *) 281 264 country_code : string; (** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. *) 282 - region_code : string option; (** The ISO 3166-2 region code provided when beginning the Age Assurance flow. *) 265 + created_at : string; (** The date and time of this write operation. *) 283 266 email : string option; (** The email used for Age Assurance. *) 284 267 init_ip : string option; (** The IP address used when initiating the Age Assurance flow. *) 285 268 init_ua : string option; (** The user agent used when initiating the Age Assurance flow. *) 286 - complete_ip : string option; (** The IP address used when completing the Age Assurance flow. *) 287 - complete_ua : string option; (** The user agent used when completing 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. *) 288 271 } 289 272 290 273 (** Jsont codec for {!type:event}. *) 291 274 val event_jsont : event Jsont.t 292 275 276 + (** The Age Assurance configuration for a specific region. *) 277 + 278 + type config_region = { 279 + country_code : string; (** The ISO 3166-1 alpha-2 country code this configuration applies to. *) 280 + min_access_age : int; (** The minimum age (as a whole integer) required to use Bluesky in this region. *) 281 + region_code : string option; (** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. *) 282 + rules : Jsont.json list; (** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. *) 283 + } 284 + 285 + (** Jsont codec for {!type:config_region}. *) 286 + val config_region_jsont : config_region Jsont.t 287 + 288 + (** The access level granted based on Age Assurance data we've processed. *) 289 + 290 + type access = string 291 + val access_jsont : access Jsont.t 292 + 293 293 (** The user's computed Age Assurance state. *) 294 294 295 295 type state = { 296 + access : access; 296 297 last_initiated_at : string option; (** The timestamp when this state was last updated. *) 297 298 status : status; 298 - access : access; 299 299 } 300 300 301 301 (** Jsont codec for {!type:state}. *) 302 302 val state_jsont : state Jsont.t 303 303 304 + (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 304 305 305 - type config = { 306 - regions : config_region list; (** The per-region Age Assurance configuration. *) 307 - } 308 - 309 - (** Jsont codec for {!type:config}. *) 310 - val config_jsont : config Jsont.t 311 - 312 - (** Age Assurance rule that applies by default. *) 313 - 314 - type config_region_rule_default = { 306 + type config_region_rule_if_declared_under_age = { 315 307 access : access; 308 + age : int; (** The age threshold as a whole integer. *) 316 309 } 317 310 318 - (** Jsont codec for {!type:config_region_rule_default}. *) 319 - val config_region_rule_default_jsont : config_region_rule_default Jsont.t 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 320 313 321 314 (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 322 315 323 316 type config_region_rule_if_declared_over_age = { 324 - age : int; (** The age threshold as a whole integer. *) 325 317 access : access; 318 + age : int; (** The age threshold as a whole integer. *) 326 319 } 327 320 328 321 (** Jsont codec for {!type:config_region_rule_if_declared_over_age}. *) 329 322 val config_region_rule_if_declared_over_age_jsont : config_region_rule_if_declared_over_age Jsont.t 330 323 331 - (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 324 + (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 332 325 333 - type config_region_rule_if_declared_under_age = { 326 + type config_region_rule_if_assured_under_age = { 327 + access : access; 334 328 age : int; (** The age threshold as a whole integer. *) 335 - access : access; 336 329 } 337 330 338 - (** Jsont codec for {!type:config_region_rule_if_declared_under_age}. *) 339 - val config_region_rule_if_declared_under_age_jsont : config_region_rule_if_declared_under_age Jsont.t 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 340 333 341 334 (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 342 335 343 336 type config_region_rule_if_assured_over_age = { 344 - age : int; (** The age threshold as a whole integer. *) 345 337 access : access; 338 + age : int; (** The age threshold as a whole integer. *) 346 339 } 347 340 348 341 (** Jsont codec for {!type:config_region_rule_if_assured_over_age}. *) 349 342 val config_region_rule_if_assured_over_age_jsont : config_region_rule_if_assured_over_age Jsont.t 350 343 351 - (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 344 + (** Age Assurance rule that applies if the account is older than a certain date. *) 352 345 353 - type config_region_rule_if_assured_under_age = { 354 - age : int; (** The age threshold as a whole integer. *) 346 + type config_region_rule_if_account_older_than = { 355 347 access : access; 348 + date : string; (** The date threshold as a datetime string. *) 356 349 } 357 350 358 - (** Jsont codec for {!type:config_region_rule_if_assured_under_age}. *) 359 - val config_region_rule_if_assured_under_age_jsont : config_region_rule_if_assured_under_age Jsont.t 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 360 353 361 354 (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 362 355 363 356 type config_region_rule_if_account_newer_than = { 364 - date : string; (** The date threshold as a datetime string. *) 365 357 access : access; 358 + date : string; (** The date threshold as a datetime string. *) 366 359 } 367 360 368 361 (** Jsont codec for {!type:config_region_rule_if_account_newer_than}. *) 369 362 val config_region_rule_if_account_newer_than_jsont : config_region_rule_if_account_newer_than Jsont.t 370 363 371 - (** Age Assurance rule that applies if the account is older than a certain date. *) 364 + (** Age Assurance rule that applies by default. *) 372 365 373 - type config_region_rule_if_account_older_than = { 374 - date : string; (** The date threshold as a datetime string. *) 366 + type config_region_rule_default = { 375 367 access : access; 376 368 } 377 369 378 - (** Jsont codec for {!type:config_region_rule_if_account_older_than}. *) 379 - val config_region_rule_if_account_older_than_jsont : config_region_rule_if_account_older_than Jsont.t 370 + (** Jsont codec for {!type:config_region_rule_default}. *) 371 + val config_region_rule_default_jsont : config_region_rule_default Jsont.t 372 + 373 + 374 + type config = { 375 + regions : config_region list; (** The per-region Age Assurance configuration. *) 376 + } 377 + 378 + (** Jsont codec for {!type:config}. *) 379 + val config_jsont : config Jsont.t 380 380 381 381 end 382 382 module Begin : sig ··· 384 384 385 385 386 386 type input = { 387 + country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 387 388 email : string; (** The user's email address to receive Age Assurance instructions. *) 388 389 language : string; (** The user's preferred language for communication during the Age Assurance process. *) 389 - country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 390 390 region_code : string option; (** An optional ISO 3166-2 code of the user's region or state within the country. *) 391 391 } 392 392 ··· 414 414 415 415 416 416 type output = { 417 - state : Defs.state; 418 417 metadata : Defs.state_metadata; 418 + state : Defs.state; 419 419 } 420 420 421 421 (** Jsont codec for {!type:output}. *) ··· 445 445 446 446 447 447 type labeler_policies = { 448 + label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; (** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. *) 448 449 label_values : Com.Atproto.Label.Defs.label_value list; (** The label values which this labeler publishes. May include global or custom labels. *) 449 - 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. *) 450 450 } 451 451 452 452 (** Jsont codec for {!type:labeler_policies}. *) 453 453 val labeler_policies_jsont : labeler_policies Jsont.t 454 454 455 455 456 - type labeler_view = { 457 - uri : string; 456 + type labeler_view_detailed = { 458 457 cid : string; 459 458 creator : Jsont.json; 459 + indexed_at : string; 460 + labels : Com.Atproto.Label.Defs.label list option; 460 461 like_count : int option; 462 + policies : Jsont.json; 463 + reason_types : Com.Atproto.Moderation.Defs.reason_type list option; (** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. *) 464 + subject_collections : string list option; (** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. *) 465 + subject_types : Com.Atproto.Moderation.Defs.subject_type list option; (** The set of subject types (account, record, etc) this service accepts reports on. *) 466 + uri : string; 461 467 viewer : Jsont.json option; 462 - indexed_at : string; 463 - labels : Com.Atproto.Label.Defs.label list option; 464 468 } 465 469 466 - (** Jsont codec for {!type:labeler_view}. *) 467 - val labeler_view_jsont : labeler_view Jsont.t 470 + (** Jsont codec for {!type:labeler_view_detailed}. *) 471 + val labeler_view_detailed_jsont : labeler_view_detailed Jsont.t 468 472 469 473 470 - type labeler_view_detailed = { 471 - uri : string; 474 + type labeler_view = { 472 475 cid : string; 473 476 creator : Jsont.json; 474 - policies : Jsont.json; 475 - like_count : int option; 476 - viewer : Jsont.json option; 477 477 indexed_at : string; 478 478 labels : Com.Atproto.Label.Defs.label list option; 479 - reason_types : Com.Atproto.Moderation.Defs.reason_type list option; (** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. *) 480 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; (** The set of subject types (account, record, etc) this service accepts reports on. *) 481 - subject_collections : string list option; (** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. *) 479 + like_count : int option; 480 + uri : string; 481 + viewer : Jsont.json option; 482 482 } 483 483 484 - (** Jsont codec for {!type:labeler_view_detailed}. *) 485 - val labeler_view_detailed_jsont : labeler_view_detailed Jsont.t 484 + (** Jsont codec for {!type:labeler_view}. *) 485 + val labeler_view_jsont : labeler_view Jsont.t 486 486 487 487 end 488 488 module Service : sig 489 489 (** A declaration of the existence of labeler service. *) 490 490 491 491 type main = { 492 - policies : Jsont.json; 493 - labels : Com.Atproto.Label.Defs.self_labels option; 494 492 created_at : string; 493 + labels : Com.Atproto.Label.Defs.self_labels option; 494 + policies : Jsont.json; 495 495 reason_types : Com.Atproto.Moderation.Defs.reason_type list option; (** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. *) 496 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; (** The set of subject types (account, record, etc) this service accepts reports on. *) 497 496 subject_collections : string list option; (** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. *) 497 + subject_types : Com.Atproto.Moderation.Defs.subject_type list option; (** The set of subject types (account, record, etc) this service accepts reports on. *) 498 498 } 499 499 500 500 (** Jsont codec for {!type:main}. *) ··· 506 506 507 507 (** Query/procedure parameters. *) 508 508 type params = { 509 - dids : string list; 510 509 detailed : bool option; 510 + dids : string list; 511 511 } 512 512 513 513 (** Jsont codec for {!type:params}. *) ··· 536 536 537 537 type output = { 538 538 can_upload : bool; 539 - remaining_daily_videos : int option; 540 - remaining_daily_bytes : int option; 541 - message : string option; 542 539 error : string option; 540 + message : string option; 541 + remaining_daily_bytes : int option; 542 + remaining_daily_videos : int option; 543 543 } 544 544 545 545 (** Jsont codec for {!type:output}. *) ··· 549 549 module Defs : sig 550 550 551 551 type job_status = { 552 - job_id : string; 552 + blob : Atp.Blob_ref.t option; 553 553 did : string; 554 - state : string; (** The state of the video processing job. All values not listed as a known value indicate that the job is in process. *) 555 - progress : int option; (** Progress within the current processing state. *) 556 - blob : Atp.Blob_ref.t option; 557 554 error : string option; 555 + job_id : string; 558 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 559 } 560 560 561 561 (** Jsont codec for {!type:job_status}. *) ··· 602 602 module Embed : sig 603 603 module External : sig 604 604 605 + type view_external = { 606 + description : string; 607 + thumb : string option; 608 + title : string; 609 + uri : string; 610 + } 611 + 612 + (** Jsont codec for {!type:view_external}. *) 613 + val view_external_jsont : view_external Jsont.t 614 + 615 + 605 616 type external_ = { 606 - uri : string; 607 - title : string; 608 617 description : string; 609 618 thumb : Atp.Blob_ref.t option; 619 + title : string; 620 + uri : string; 610 621 } 611 622 612 623 (** Jsont codec for {!type:external_}. *) 613 624 val external__jsont : external_ Jsont.t 614 625 615 626 616 - type view_external = { 617 - uri : string; 618 - title : string; 619 - description : string; 620 - thumb : string option; 627 + type view = { 628 + external_ : Jsont.json; 621 629 } 622 630 623 - (** Jsont codec for {!type:view_external}. *) 624 - val view_external_jsont : view_external Jsont.t 631 + (** Jsont codec for {!type:view}. *) 632 + val view_jsont : view Jsont.t 625 633 626 634 (** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). *) 627 635 ··· 632 640 (** Jsont codec for {!type:main}. *) 633 641 val main_jsont : main Jsont.t 634 642 635 - 636 - type view = { 637 - external_ : Jsont.json; 638 - } 639 - 640 - (** Jsont codec for {!type:view}. *) 641 - val view_jsont : view Jsont.t 642 - 643 643 end 644 644 module Defs : sig 645 645 (** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. *) 646 646 647 647 type aspect_ratio = { 648 - width : int; 649 648 height : int; 649 + width : int; 650 650 } 651 651 652 652 (** Jsont codec for {!type:aspect_ratio}. *) ··· 655 655 end 656 656 module Images : sig 657 657 658 + type view_image = { 659 + alt : string; (** Alt text description of the image, for accessibility. *) 660 + aspect_ratio : Jsont.json option; 661 + fullsize : string; (** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. *) 662 + thumb : string; (** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. *) 663 + } 664 + 665 + (** Jsont codec for {!type:view_image}. *) 666 + val view_image_jsont : view_image Jsont.t 667 + 668 + 658 669 type image = { 659 - image : Atp.Blob_ref.t; 660 670 alt : string; (** Alt text description of the image, for accessibility. *) 661 671 aspect_ratio : Jsont.json option; 672 + image : Atp.Blob_ref.t; 662 673 } 663 674 664 675 (** Jsont codec for {!type:image}. *) 665 676 val image_jsont : image Jsont.t 666 677 667 678 668 - type view_image = { 669 - thumb : string; (** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. *) 670 - 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. *) 671 - alt : string; (** Alt text description of the image, for accessibility. *) 672 - aspect_ratio : Jsont.json option; 679 + type view = { 680 + images : Jsont.json list; 673 681 } 674 682 675 - (** Jsont codec for {!type:view_image}. *) 676 - val view_image_jsont : view_image Jsont.t 683 + (** Jsont codec for {!type:view}. *) 684 + val view_jsont : view Jsont.t 677 685 678 686 679 687 type main = { ··· 683 691 (** Jsont codec for {!type:main}. *) 684 692 val main_jsont : main Jsont.t 685 693 694 + end 695 + module Video : sig 686 696 687 697 type view = { 688 - images : Jsont.json list; 698 + alt : string option; 699 + aspect_ratio : Jsont.json option; 700 + cid : string; 701 + playlist : string; 702 + thumbnail : string option; 689 703 } 690 704 691 705 (** Jsont codec for {!type:view}. *) 692 706 val view_jsont : view Jsont.t 693 707 694 - end 695 - module Video : sig 696 708 697 709 type caption = { 698 - lang : string; 699 710 file : Atp.Blob_ref.t; 711 + lang : string; 700 712 } 701 713 702 714 (** Jsont codec for {!type:caption}. *) 703 715 val caption_jsont : caption Jsont.t 704 716 705 717 706 - type view = { 707 - cid : string; 708 - playlist : string; 709 - thumbnail : string option; 710 - alt : string option; 711 - aspect_ratio : Jsont.json option; 712 - } 713 - 714 - (** Jsont codec for {!type:view}. *) 715 - val view_jsont : view Jsont.t 716 - 717 - 718 718 type main = { 719 - video : Atp.Blob_ref.t; (** The mp4 video file. May be up to 100mb, formerly limited to 50mb. *) 720 - captions : Jsont.json list option; 721 719 alt : string option; (** Alt text description of the video, for accessibility. *) 722 720 aspect_ratio : Jsont.json option; 721 + captions : Jsont.json list option; 722 + video : Atp.Blob_ref.t; (** The mp4 video file. May be up to 100mb, formerly limited to 50mb. *) 723 723 } 724 724 725 725 (** Jsont codec for {!type:main}. *) ··· 728 728 end 729 729 module RecordWithMedia : sig 730 730 731 - type main = { 732 - record : Jsont.json; 733 - media : Jsont.json; 734 - } 735 - 736 - (** Jsont codec for {!type:main}. *) 737 - val main_jsont : main Jsont.t 738 - 739 - 740 731 type view = { 741 - record : Jsont.json; 742 732 media : Jsont.json; 733 + record : Jsont.json; 743 734 } 744 735 745 736 (** Jsont codec for {!type:view}. *) 746 737 val view_jsont : view Jsont.t 747 738 748 - end 749 - module Record : sig 750 739 751 740 type main = { 752 - record : Com.Atproto.Repo.StrongRef.main; 741 + media : Jsont.json; 742 + record : Jsont.json; 753 743 } 754 744 755 745 (** Jsont codec for {!type:main}. *) 756 746 val main_jsont : main Jsont.t 757 747 758 - 759 - type view = { 760 - record : Jsont.json; 761 - } 762 - 763 - (** Jsont codec for {!type:view}. *) 764 - val view_jsont : view Jsont.t 765 - 748 + end 749 + module Record : sig 766 750 767 751 type view_record = { 768 - uri : string; 769 - cid : string; 770 752 author : Jsont.json; 771 - value : Jsont.json; (** The record data itself. *) 753 + cid : string; 754 + embeds : Jsont.json list option; 755 + indexed_at : string; 772 756 labels : Com.Atproto.Label.Defs.label list option; 773 - reply_count : int option; 774 - repost_count : int option; 775 757 like_count : int option; 776 758 quote_count : int option; 777 - embeds : Jsont.json list option; 778 - indexed_at : string; 759 + reply_count : int option; 760 + repost_count : int option; 761 + uri : string; 762 + value : Jsont.json; (** The record data itself. *) 779 763 } 780 764 781 765 (** Jsont codec for {!type:view_record}. *) ··· 783 767 784 768 785 769 type view_not_found = { 786 - uri : string; 787 770 not_found : bool; 771 + uri : string; 788 772 } 789 773 790 774 (** Jsont codec for {!type:view_not_found}. *) 791 775 val view_not_found_jsont : view_not_found Jsont.t 792 776 793 777 778 + type view_detached = { 779 + detached : bool; 780 + uri : string; 781 + } 782 + 783 + (** Jsont codec for {!type:view_detached}. *) 784 + val view_detached_jsont : view_detached Jsont.t 785 + 786 + 794 787 type view_blocked = { 788 + author : Jsont.json; 789 + blocked : bool; 795 790 uri : string; 796 - blocked : bool; 797 - author : Jsont.json; 798 791 } 799 792 800 793 (** Jsont codec for {!type:view_blocked}. *) 801 794 val view_blocked_jsont : view_blocked Jsont.t 802 795 803 796 804 - type view_detached = { 805 - uri : string; 806 - detached : bool; 797 + type view = { 798 + record : Jsont.json; 807 799 } 808 800 809 - (** Jsont codec for {!type:view_detached}. *) 810 - val view_detached_jsont : view_detached Jsont.t 801 + (** Jsont codec for {!type:view}. *) 802 + val view_jsont : view Jsont.t 803 + 804 + 805 + type main = { 806 + record : Com.Atproto.Repo.StrongRef.main; 807 + } 808 + 809 + (** Jsont codec for {!type:main}. *) 810 + val main_jsont : main Jsont.t 811 811 812 812 end 813 813 end ··· 829 829 830 830 831 831 type input = { 832 + age_restricted : bool option; (** Set to true when the actor is age restricted *) 833 + app_id : string; 834 + platform : string; 832 835 service_did : string; 833 836 token : string; 834 - platform : string; 835 - app_id : string; 836 - age_restricted : bool option; (** Set to true when the actor is age restricted *) 837 837 } 838 838 839 839 (** Jsont codec for {!type:input}. *) ··· 843 843 module ListNotifications : sig 844 844 845 845 type notification = { 846 - uri : string; 846 + author : Jsont.json; 847 847 cid : string; 848 - author : Jsont.json; 848 + indexed_at : string; 849 + is_read : bool; 850 + labels : Com.Atproto.Label.Defs.label list option; 849 851 reason : string; (** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. *) 850 852 reason_subject : string option; 851 853 record : Jsont.json; 852 - is_read : bool; 853 - indexed_at : string; 854 - labels : Com.Atproto.Label.Defs.label list option; 854 + uri : string; 855 855 } 856 856 857 857 (** Jsont codec for {!type:notification}. *) ··· 861 861 862 862 (** Query/procedure parameters. *) 863 863 type params = { 864 - reasons : string list option; (** Notification reasons to include in response. *) 864 + cursor : string option; 865 865 limit : int option; 866 866 priority : bool option; 867 - cursor : string option; 867 + reasons : string list option; (** Notification reasons to include in response. *) 868 868 seen_at : string option; 869 869 } 870 870 ··· 909 909 910 910 911 911 type input = { 912 + app_id : string; 913 + platform : string; 912 914 service_did : string; 913 915 token : string; 914 - platform : string; 915 - app_id : string; 916 916 } 917 917 918 918 (** Jsont codec for {!type:input}. *) ··· 939 939 val record_deleted_jsont : record_deleted Jsont.t 940 940 941 941 942 - type chat_preference = { 943 - include_ : string; 942 + type preference = { 943 + list_ : bool; 944 944 push : bool; 945 945 } 946 946 947 - (** Jsont codec for {!type:chat_preference}. *) 948 - val chat_preference_jsont : chat_preference Jsont.t 947 + (** Jsont codec for {!type:preference}. *) 948 + val preference_jsont : preference Jsont.t 949 949 950 950 951 951 type filterable_preference = { ··· 958 958 val filterable_preference_jsont : filterable_preference Jsont.t 959 959 960 960 961 - type preference = { 962 - list_ : bool; 961 + type chat_preference = { 962 + include_ : string; 963 963 push : bool; 964 964 } 965 965 966 - (** Jsont codec for {!type:preference}. *) 967 - val preference_jsont : preference Jsont.t 966 + (** Jsont codec for {!type:chat_preference}. *) 967 + val chat_preference_jsont : chat_preference Jsont.t 968 968 969 969 970 970 type activity_subscription = { ··· 974 974 975 975 (** Jsont codec for {!type:activity_subscription}. *) 976 976 val activity_subscription_jsont : activity_subscription Jsont.t 977 + 978 + (** Object used to store activity subscription data in stash. *) 979 + 980 + type subject_activity_subscription = { 981 + activity_subscription : Jsont.json; 982 + subject : string; 983 + } 984 + 985 + (** Jsont codec for {!type:subject_activity_subscription}. *) 986 + val subject_activity_subscription_jsont : subject_activity_subscription Jsont.t 977 987 978 988 979 989 type preferences = { ··· 995 1005 (** Jsont codec for {!type:preferences}. *) 996 1006 val preferences_jsont : preferences Jsont.t 997 1007 998 - (** Object used to store activity subscription data in stash. *) 999 - 1000 - type subject_activity_subscription = { 1001 - subject : string; 1002 - activity_subscription : Jsont.json; 1003 - } 1004 - 1005 - (** Jsont codec for {!type:subject_activity_subscription}. *) 1006 - val subject_activity_subscription_jsont : subject_activity_subscription Jsont.t 1007 - 1008 1008 end 1009 1009 module Declaration : sig 1010 1010 (** A declaration of the user's choices related to notifications that can be produced by them. *) ··· 1022 1022 1023 1023 (** Query/procedure parameters. *) 1024 1024 type params = { 1025 - limit : int option; 1026 1025 cursor : string option; 1026 + limit : int option; 1027 1027 } 1028 1028 1029 1029 (** Jsont codec for {!type:params}. *) ··· 1062 1062 1063 1063 1064 1064 type input = { 1065 - subject : string; 1066 1065 activity_subscription : Jsont.json; 1066 + subject : string; 1067 1067 } 1068 1068 1069 1069 (** Jsont codec for {!type:input}. *) ··· 1071 1071 1072 1072 1073 1073 type output = { 1074 - subject : string; 1075 1074 activity_subscription : Jsont.json option; 1075 + subject : string; 1076 1076 } 1077 1077 1078 1078 (** Jsont codec for {!type:output}. *) ··· 1122 1122 (** A declaration of a Bluesky account status. *) 1123 1123 1124 1124 type main = { 1125 - status : string; (** The status for the account. *) 1126 - embed : Jsont.json option; (** An optional embed associated with the status. *) 1127 - duration_minutes : int option; (** The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. *) 1128 1125 created_at : string; 1126 + duration_minutes : int option; (** The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. *) 1127 + embed : Jsont.json option; (** An optional embed associated with the status. *) 1128 + status : string; (** The status for the account. *) 1129 1129 } 1130 1130 1131 1131 (** Jsont codec for {!type:main}. *) ··· 1136 1136 (** A declaration of a Bluesky account profile. *) 1137 1137 1138 1138 type main = { 1139 - display_name : string option; 1140 - description : string option; (** Free-form profile description text. *) 1141 - pronouns : string option; (** Free-form pronouns text. *) 1142 - website : string option; 1143 1139 avatar : Atp.Blob_ref.t option; (** Small image to be displayed next to posts from account. AKA, 'profile picture' *) 1144 1140 banner : Atp.Blob_ref.t option; (** Larger horizontal image to display behind profile view. *) 1141 + created_at : string option; 1142 + description : string option; (** Free-form profile description text. *) 1143 + display_name : string option; 1144 + joined_via_starter_pack : Com.Atproto.Repo.StrongRef.main option; 1145 1145 labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values, specific to the Bluesky application, on the overall account. *) 1146 - joined_via_starter_pack : Com.Atproto.Repo.StrongRef.main option; 1147 1146 pinned_post : Com.Atproto.Repo.StrongRef.main option; 1148 - created_at : string option; 1147 + pronouns : string option; (** Free-form pronouns text. *) 1148 + website : string option; 1149 1149 } 1150 1150 1151 1151 (** Jsont codec for {!type:main}. *) ··· 1153 1153 1154 1154 end 1155 1155 module Defs : sig 1156 - 1157 - type profile_associated_chat = { 1158 - allow_incoming : string; 1159 - } 1160 - 1161 - (** Jsont codec for {!type:profile_associated_chat}. *) 1162 - val profile_associated_chat_jsont : profile_associated_chat Jsont.t 1163 - 1164 - 1165 - type profile_associated_activity_subscription = { 1166 - allow_subscriptions : string; 1167 - } 1168 - 1169 - (** Jsont codec for {!type:profile_associated_activity_subscription}. *) 1170 - val profile_associated_activity_subscription_jsont : profile_associated_activity_subscription Jsont.t 1171 - 1172 1156 (** An individual verification for an associated subject. *) 1173 1157 1174 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. *) 1175 1161 issuer : string; (** The user who issued this verification. *) 1176 1162 uri : string; (** The AT-URI of the verification record. *) 1177 - is_valid : bool; (** True if the verification passes validation, otherwise false. *) 1178 - created_at : string; (** Timestamp when the verification was created. *) 1179 1163 } 1180 1164 1181 1165 (** Jsont codec for {!type:verification_view}. *) 1182 1166 val verification_view_jsont : verification_view Jsont.t 1183 1167 1168 + (** Preferences for how verified accounts appear in the app. *) 1184 1169 1185 - type preferences = Jsont.json list 1186 - val preferences_jsont : preferences Jsont.t 1187 - 1188 - 1189 - type adult_content_pref = { 1190 - enabled : bool; 1170 + type verification_prefs = { 1171 + hide_badges : bool option; (** Hide the blue check badges for verified accounts and trusted verifiers. *) 1191 1172 } 1192 1173 1193 - (** Jsont codec for {!type:adult_content_pref}. *) 1194 - val adult_content_pref_jsont : adult_content_pref Jsont.t 1174 + (** Jsont codec for {!type:verification_prefs}. *) 1175 + val verification_prefs_jsont : verification_prefs Jsont.t 1195 1176 1196 1177 1197 - type content_label_pref = { 1198 - labeler_did : string option; (** Which labeler does this preference apply to? If undefined, applies globally. *) 1199 - label : string; 1200 - visibility : string; 1178 + type thread_view_pref = { 1179 + sort : string option; (** Sorting mode for threads. *) 1201 1180 } 1202 1181 1203 - (** Jsont codec for {!type:content_label_pref}. *) 1204 - val content_label_pref_jsont : content_label_pref Jsont.t 1182 + (** Jsont codec for {!type:thread_view_pref}. *) 1183 + val thread_view_pref_jsont : thread_view_pref Jsont.t 1205 1184 1206 1185 1207 - type saved_feed = { 1208 - id : string; 1209 - type_ : string; 1210 - value : string; 1211 - pinned : bool; 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; 1212 1195 } 1213 1196 1214 - (** Jsont codec for {!type:saved_feed}. *) 1215 - val saved_feed_jsont : saved_feed Jsont.t 1197 + (** Jsont codec for {!type:status_view}. *) 1198 + val status_view_jsont : status_view Jsont.t 1216 1199 1217 1200 1218 1201 type saved_feeds_pref = { ··· 1225 1208 val saved_feeds_pref_jsont : saved_feeds_pref Jsont.t 1226 1209 1227 1210 1228 - type personal_details_pref = { 1229 - birth_date : string option; (** The birth date of account owner. *) 1211 + type saved_feed = { 1212 + id : string; 1213 + pinned : bool; 1214 + type_ : string; 1215 + value : string; 1230 1216 } 1231 1217 1232 - (** Jsont codec for {!type:personal_details_pref}. *) 1233 - val personal_details_pref_jsont : personal_details_pref Jsont.t 1218 + (** Jsont codec for {!type:saved_feed}. *) 1219 + val saved_feed_jsont : saved_feed Jsont.t 1234 1220 1235 - (** 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. *) 1236 1221 1237 - type declared_age_pref = { 1238 - is_over_age13 : bool option; (** Indicates if the user has declared that they are over 13 years of age. *) 1239 - is_over_age16 : bool option; (** Indicates if the user has declared that they are over 16 years of age. *) 1240 - is_over_age18 : bool option; (** Indicates if the user has declared that they are over 18 years of age. *) 1222 + type profile_associated_chat = { 1223 + allow_incoming : string; 1241 1224 } 1242 1225 1243 - (** Jsont codec for {!type:declared_age_pref}. *) 1244 - val declared_age_pref_jsont : declared_age_pref Jsont.t 1226 + (** Jsont codec for {!type:profile_associated_chat}. *) 1227 + val profile_associated_chat_jsont : profile_associated_chat Jsont.t 1245 1228 1246 1229 1247 - type feed_view_pref = { 1248 - feed : string; (** The URI of the feed, or an identifier which describes the feed. *) 1249 - hide_replies : bool option; (** Hide replies in the feed. *) 1250 - hide_replies_by_unfollowed : bool option; (** Hide replies in the feed if they are not by followed users. *) 1251 - hide_replies_by_like_count : int option; (** Hide replies in the feed if they do not have this number of likes. *) 1252 - hide_reposts : bool option; (** Hide reposts in the feed. *) 1253 - hide_quote_posts : bool option; (** Hide quote posts in the feed. *) 1230 + type profile_associated_activity_subscription = { 1231 + allow_subscriptions : string; 1254 1232 } 1255 1233 1256 - (** Jsont codec for {!type:feed_view_pref}. *) 1257 - val feed_view_pref_jsont : feed_view_pref Jsont.t 1234 + (** Jsont codec for {!type:profile_associated_activity_subscription}. *) 1235 + val profile_associated_activity_subscription_jsont : profile_associated_activity_subscription Jsont.t 1258 1236 1259 1237 1260 - type thread_view_pref = { 1261 - sort : string option; (** Sorting mode for threads. *) 1238 + type preferences = Jsont.json list 1239 + val preferences_jsont : preferences Jsont.t 1240 + 1241 + (** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. *) 1242 + 1243 + type post_interaction_settings_pref = { 1244 + postgate_embedding_rules : Jsont.json list option; (** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 1245 + threadgate_allow_rules : Jsont.json list option; (** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. *) 1262 1246 } 1263 1247 1264 - (** Jsont codec for {!type:thread_view_pref}. *) 1265 - val thread_view_pref_jsont : thread_view_pref Jsont.t 1248 + (** Jsont codec for {!type:post_interaction_settings_pref}. *) 1249 + val post_interaction_settings_pref_jsont : post_interaction_settings_pref Jsont.t 1266 1250 1267 1251 1268 - type interests_pref = { 1269 - tags : string list; (** A list of tags which describe the account owner's interests gathered during onboarding. *) 1252 + type personal_details_pref = { 1253 + birth_date : string option; (** The birth date of account owner. *) 1270 1254 } 1271 1255 1272 - (** Jsont codec for {!type:interests_pref}. *) 1273 - val interests_pref_jsont : interests_pref Jsont.t 1256 + (** Jsont codec for {!type:personal_details_pref}. *) 1257 + val personal_details_pref_jsont : personal_details_pref Jsont.t 1274 1258 1259 + (** A new user experiences (NUX) storage object *) 1275 1260 1276 - type muted_word_target = string 1277 - val muted_word_target_jsont : muted_word_target Jsont.t 1261 + type nux = { 1262 + completed : bool; 1263 + data : string option; (** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. *) 1264 + expires_at : string option; (** The date and time at which the NUX will expire and should be considered completed. *) 1265 + id : string; 1266 + } 1278 1267 1268 + (** Jsont codec for {!type:nux}. *) 1269 + val nux_jsont : nux Jsont.t 1279 1270 1280 - type hidden_posts_pref = { 1281 - items : string list; (** A list of URIs of posts the account owner has hidden. *) 1282 - } 1283 1271 1284 - (** Jsont codec for {!type:hidden_posts_pref}. *) 1285 - val hidden_posts_pref_jsont : hidden_posts_pref Jsont.t 1272 + type muted_word_target = string 1273 + val muted_word_target_jsont : muted_word_target Jsont.t 1286 1274 1287 1275 1288 1276 type labeler_pref_item = { ··· 1292 1280 (** Jsont codec for {!type:labeler_pref_item}. *) 1293 1281 val labeler_pref_item_jsont : labeler_pref_item Jsont.t 1294 1282 1295 - (** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. *) 1296 1283 1297 - type bsky_app_progress_guide = { 1298 - guide : string; 1284 + type interests_pref = { 1285 + tags : string list; (** A list of tags which describe the account owner's interests gathered during onboarding. *) 1299 1286 } 1300 1287 1301 - (** Jsont codec for {!type:bsky_app_progress_guide}. *) 1302 - val bsky_app_progress_guide_jsont : bsky_app_progress_guide Jsont.t 1288 + (** Jsont codec for {!type:interests_pref}. *) 1289 + val interests_pref_jsont : interests_pref Jsont.t 1303 1290 1304 - (** A new user experiences (NUX) storage object *) 1305 1291 1306 - type nux = { 1307 - id : string; 1308 - completed : bool; 1309 - data : string option; (** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. *) 1310 - expires_at : string option; (** The date and time at which the NUX will expire and should be considered completed. *) 1292 + type hidden_posts_pref = { 1293 + items : string list; (** A list of URIs of posts the account owner has hidden. *) 1311 1294 } 1312 1295 1313 - (** Jsont codec for {!type:nux}. *) 1314 - val nux_jsont : nux Jsont.t 1296 + (** Jsont codec for {!type:hidden_posts_pref}. *) 1297 + val hidden_posts_pref_jsont : hidden_posts_pref Jsont.t 1315 1298 1316 - (** Preferences for how verified accounts appear in the app. *) 1299 + 1300 + type feed_view_pref = { 1301 + feed : string; (** The URI of the feed, or an identifier which describes the feed. *) 1302 + hide_quote_posts : bool option; (** Hide quote posts in the feed. *) 1303 + hide_replies : bool option; (** Hide replies in the feed. *) 1304 + hide_replies_by_like_count : int option; (** Hide replies in the feed if they do not have this number of likes. *) 1305 + hide_replies_by_unfollowed : bool option; (** Hide replies in the feed if they are not by followed users. *) 1306 + hide_reposts : bool option; (** Hide reposts in the feed. *) 1307 + } 1308 + 1309 + (** Jsont codec for {!type:feed_view_pref}. *) 1310 + val feed_view_pref_jsont : feed_view_pref Jsont.t 1311 + 1312 + (** Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. *) 1317 1313 1318 - type verification_prefs = { 1319 - hide_badges : bool option; (** Hide the blue check badges for verified accounts and trusted verifiers. *) 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. *) 1320 1318 } 1321 1319 1322 - (** Jsont codec for {!type:verification_prefs}. *) 1323 - val verification_prefs_jsont : verification_prefs Jsont.t 1320 + (** Jsont codec for {!type:declared_age_pref}. *) 1321 + val declared_age_pref_jsont : declared_age_pref Jsont.t 1324 1322 1325 - (** 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. *) 1326 1323 1327 - type post_interaction_settings_pref = { 1328 - 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. *) 1329 - 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. *) 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; 1330 1328 } 1331 1329 1332 - (** Jsont codec for {!type:post_interaction_settings_pref}. *) 1333 - val post_interaction_settings_pref_jsont : post_interaction_settings_pref Jsont.t 1330 + (** Jsont codec for {!type:content_label_pref}. *) 1331 + val content_label_pref_jsont : content_label_pref Jsont.t 1334 1332 1333 + (** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. *) 1335 1334 1336 - type status_view = { 1337 - uri : string option; 1338 - cid : string option; 1339 - status : string; (** The status for the account. *) 1340 - record : Jsont.json; 1341 - embed : Jsont.json option; (** An optional embed associated with the status. *) 1342 - expires_at : string option; (** The date when this status will expire. The application might choose to no longer return the status after expiration. *) 1343 - is_active : bool option; (** True if the status is not expired, false if it is expired. Only present if expiration was set. *) 1344 - is_disabled : bool option; (** True if the user's go-live access has been disabled by a moderator, false otherwise. *) 1335 + type bsky_app_progress_guide = { 1336 + guide : string; 1345 1337 } 1346 1338 1347 - (** Jsont codec for {!type:status_view}. *) 1348 - val status_view_jsont : status_view Jsont.t 1339 + (** Jsont codec for {!type:bsky_app_progress_guide}. *) 1340 + val bsky_app_progress_guide_jsont : bsky_app_progress_guide Jsont.t 1349 1341 1350 1342 1351 - type profile_associated = { 1352 - lists : int option; 1353 - feedgens : int option; 1354 - starter_packs : int option; 1355 - labeler : bool option; 1356 - chat : Jsont.json option; 1357 - activity_subscription : Jsont.json option; 1343 + type adult_content_pref = { 1344 + enabled : bool; 1358 1345 } 1359 1346 1360 - (** Jsont codec for {!type:profile_associated}. *) 1361 - val profile_associated_jsont : profile_associated Jsont.t 1347 + (** Jsont codec for {!type:adult_content_pref}. *) 1348 + val adult_content_pref_jsont : adult_content_pref Jsont.t 1362 1349 1363 1350 (** Represents the verification information about the user this object is attached to. *) 1364 1351 1365 1352 type verification_state = { 1353 + trusted_verifier_status : string; (** The user's status as a trusted verifier. *) 1366 1354 verifications : Jsont.json list; (** All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. *) 1367 1355 verified_status : string; (** The user's status as a verified account. *) 1368 - trusted_verifier_status : string; (** The user's status as a trusted verifier. *) 1369 1356 } 1370 1357 1371 1358 (** Jsont codec for {!type:verification_state}. *) ··· 1379 1366 (** Jsont codec for {!type:saved_feeds_pref_v2}. *) 1380 1367 val saved_feeds_pref_v2_jsont : saved_feeds_pref_v2 Jsont.t 1381 1368 1369 + 1370 + type profile_associated = { 1371 + activity_subscription : Jsont.json option; 1372 + chat : Jsont.json option; 1373 + feedgens : int option; 1374 + labeler : bool option; 1375 + lists : int option; 1376 + starter_packs : int option; 1377 + } 1378 + 1379 + (** Jsont codec for {!type:profile_associated}. *) 1380 + val profile_associated_jsont : profile_associated Jsont.t 1381 + 1382 1382 (** A word that the account owner has muted. *) 1383 1383 1384 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. *) 1385 1387 id : string option; 1386 - value : string; (** The muted word itself. *) 1387 1388 targets : Jsont.json list; (** The intended targets of the muted word. *) 1388 - actor_target : string option; (** Groups of users to apply the muted word to. If undefined, applies to all users. *) 1389 - expires_at : string option; (** The date and time at which the muted word will expire and no longer be applied. *) 1389 + value : string; (** The muted word itself. *) 1390 1390 } 1391 1391 1392 1392 (** Jsont codec for {!type:muted_word}. *) ··· 1404 1404 1405 1405 type bsky_app_state_pref = { 1406 1406 active_progress_guide : Jsont.json option; 1407 - queued_nudges : string list option; (** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. *) 1408 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 1409 } 1410 1410 1411 1411 (** Jsont codec for {!type:bsky_app_state_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 1423 1423 - type profile_view_basic = { 1424 - did : string; 1425 - handle : string; 1426 - display_name : string option; 1427 - pronouns : string option; 1428 - avatar : string option; 1429 - associated : Jsont.json option; 1430 - viewer : Jsont.json option; 1431 - labels : Com.Atproto.Label.Defs.label list option; 1432 - created_at : string option; 1433 - verification : Jsont.json option; 1434 - status : Jsont.json option; 1435 - debug : Jsont.json option; (** Debug information for internal development *) 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; 1436 1434 } 1437 1435 1438 - (** Jsont codec for {!type:profile_view_basic}. *) 1439 - val profile_view_basic_jsont : profile_view_basic Jsont.t 1436 + (** Jsont codec for {!type:viewer_state}. *) 1437 + val viewer_state_jsont : viewer_state Jsont.t 1440 1438 1441 1439 1442 - type profile_view = { 1443 - did : string; 1444 - handle : string; 1445 - display_name : string option; 1446 - pronouns : string option; 1447 - description : string option; 1448 - avatar : string option; 1440 + type profile_view_detailed = { 1449 1441 associated : Jsont.json option; 1450 - indexed_at : string option; 1442 + avatar : string option; 1443 + banner : string option; 1451 1444 created_at : string option; 1452 - viewer : Jsont.json option; 1453 - labels : Com.Atproto.Label.Defs.label list option; 1454 - verification : Jsont.json option; 1455 - status : Jsont.json option; 1456 1445 debug : Jsont.json option; (** Debug information for internal development *) 1457 - } 1458 - 1459 - (** Jsont codec for {!type:profile_view}. *) 1460 - val profile_view_jsont : profile_view Jsont.t 1461 - 1462 - 1463 - type profile_view_detailed = { 1446 + description : string option; 1464 1447 did : string; 1465 - handle : string; 1466 1448 display_name : string option; 1467 - description : string option; 1468 - pronouns : string option; 1469 - website : string option; 1470 - avatar : string option; 1471 - banner : string option; 1472 1449 followers_count : int option; 1473 1450 follows_count : int option; 1474 - posts_count : int option; 1475 - associated : Jsont.json option; 1476 - joined_via_starter_pack : Jsont.json option; 1451 + handle : string; 1477 1452 indexed_at : string option; 1478 - created_at : string option; 1479 - viewer : Jsont.json option; 1453 + joined_via_starter_pack : Jsont.json option; 1480 1454 labels : Com.Atproto.Label.Defs.label list option; 1481 1455 pinned_post : Com.Atproto.Repo.StrongRef.main option; 1482 - verification : Jsont.json option; 1456 + posts_count : int option; 1457 + pronouns : string option; 1483 1458 status : Jsont.json option; 1484 - debug : Jsont.json option; (** Debug information for internal development *) 1459 + verification : Jsont.json option; 1460 + viewer : Jsont.json option; 1461 + website : string option; 1485 1462 } 1486 1463 1487 1464 (** Jsont codec for {!type:profile_view_detailed}. *) 1488 1465 val profile_view_detailed_jsont : profile_view_detailed Jsont.t 1489 1466 1490 - (** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. *) 1491 1467 1492 - type viewer_state = { 1493 - muted : bool option; 1494 - muted_by_list : Jsont.json option; 1495 - blocked_by : bool option; 1496 - blocking : string option; 1497 - blocking_by_list : Jsont.json option; 1498 - following : string option; 1499 - followed_by : string option; 1500 - known_followers : Jsont.json option; (** This property is present only in selected cases, as an optimization. *) 1501 - activity_subscription : Jsont.json option; (** This property is present only in selected cases, as an optimization. *) 1468 + type profile_view_basic = { 1469 + associated : Jsont.json option; 1470 + avatar : string option; 1471 + created_at : string option; 1472 + debug : Jsont.json option; (** Debug information for internal development *) 1473 + did : string; 1474 + display_name : string option; 1475 + handle : string; 1476 + labels : Com.Atproto.Label.Defs.label list option; 1477 + pronouns : string option; 1478 + status : Jsont.json option; 1479 + verification : Jsont.json option; 1480 + viewer : Jsont.json option; 1502 1481 } 1503 1482 1504 - (** Jsont codec for {!type:viewer_state}. *) 1505 - val viewer_state_jsont : viewer_state Jsont.t 1483 + (** Jsont codec for {!type:profile_view_basic}. *) 1484 + val profile_view_basic_jsont : profile_view_basic Jsont.t 1485 + 1486 + 1487 + type profile_view = { 1488 + associated : Jsont.json option; 1489 + avatar : string option; 1490 + created_at : string option; 1491 + debug : Jsont.json option; (** Debug information for internal development *) 1492 + description : string option; 1493 + did : string; 1494 + display_name : string option; 1495 + handle : string; 1496 + indexed_at : string option; 1497 + labels : Com.Atproto.Label.Defs.label list option; 1498 + pronouns : string option; 1499 + status : Jsont.json option; 1500 + verification : Jsont.json option; 1501 + viewer : Jsont.json option; 1502 + } 1503 + 1504 + (** Jsont codec for {!type:profile_view}. *) 1505 + val profile_view_jsont : profile_view Jsont.t 1506 1506 1507 1507 (** The subject's followers whom you also follow *) 1508 1508 ··· 1538 1538 1539 1539 (** Query/procedure parameters. *) 1540 1540 type params = { 1541 - term : string option; (** DEPRECATED: use 'q' instead. *) 1542 - q : string option; (** Search query prefix; not a full query string. *) 1543 1541 limit : int option; 1542 + q : string option; (** Search query prefix; not a full query string. *) 1543 + term : string option; (** DEPRECATED: use 'q' instead. *) 1544 1544 } 1545 1545 1546 1546 (** Jsont codec for {!type:params}. *) ··· 1578 1578 1579 1579 (** Query/procedure parameters. *) 1580 1580 type params = { 1581 - term : string option; (** DEPRECATED: use 'q' instead. *) 1581 + cursor : string option; 1582 + limit : int option; 1582 1583 q : string option; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 1583 - limit : int option; 1584 - cursor : string option; 1584 + term : string option; (** DEPRECATED: use 'q' instead. *) 1585 1585 } 1586 1586 1587 1587 (** Jsont codec for {!type:params}. *) ··· 1589 1589 1590 1590 1591 1591 type output = { 1592 - cursor : string option; 1593 1592 actors : Jsont.json list; 1593 + cursor : string option; 1594 1594 } 1595 1595 1596 1596 (** Jsont codec for {!type:output}. *) ··· 1602 1602 1603 1603 (** Query/procedure parameters. *) 1604 1604 type params = { 1605 + cursor : string option; 1605 1606 limit : int option; 1606 - cursor : string option; 1607 1607 } 1608 1608 1609 1609 (** Jsont codec for {!type:params}. *) ··· 1611 1611 1612 1612 1613 1613 type output = { 1614 - cursor : string option; 1615 1614 actors : Jsont.json list; 1615 + cursor : string option; 1616 1616 rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1617 1617 } 1618 1618 ··· 1655 1655 end 1656 1656 module Contact : sig 1657 1657 module Defs : sig 1658 - (** 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. *) 1659 - 1660 - type match_and_contact_index = { 1661 - match_ : Jsont.json; (** Profile of the matched user. *) 1662 - contact_index : int; (** The index of this match in the import contact input. *) 1663 - } 1664 - 1665 - (** Jsont codec for {!type:match_and_contact_index}. *) 1666 - val match_and_contact_index_jsont : match_and_contact_index Jsont.t 1667 - 1668 1658 1669 1659 type sync_status = { 1670 - synced_at : string; (** Last date when contacts where imported. *) 1671 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. *) 1672 1662 } 1673 1663 1674 1664 (** Jsont codec for {!type:sync_status}. *) ··· 1684 1674 (** Jsont codec for {!type:notification}. *) 1685 1675 val notification_jsont : notification Jsont.t 1686 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 1687 end 1688 1688 module RemoveData : sig 1689 1689 (** Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication. *) ··· 1724 1724 1725 1725 (** Query/procedure parameters. *) 1726 1726 type params = { 1727 - limit : int option; 1728 1727 cursor : string option; 1728 + limit : int option; 1729 1729 } 1730 1730 1731 1731 (** Jsont codec for {!type:params}. *) ··· 1746 1746 1747 1747 1748 1748 type input = { 1749 - phone : string; (** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. *) 1750 1749 code : string; (** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. *) 1750 + phone : string; (** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. *) 1751 1751 } 1752 1752 1753 1753 (** Jsont codec for {!type:input}. *) ··· 1822 1822 1823 1823 1824 1824 type input = { 1825 - token : string; (** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. *) 1826 1825 contacts : string list; (** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. *) 1826 + token : string; (** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. *) 1827 1827 } 1828 1828 1829 1829 (** Jsont codec for {!type:input}. *) ··· 1852 1852 (** Record defining a starter pack of actors and feeds for new users. *) 1853 1853 1854 1854 type main = { 1855 - name : string; (** Display name for starter pack; can not be empty. *) 1855 + created_at : string; 1856 1856 description : string option; 1857 1857 description_facets : Richtext.Facet.main list option; 1858 - list_ : string; (** Reference (AT-URI) to the list record. *) 1859 1858 feeds : Jsont.json list option; 1860 - created_at : string; 1859 + list_ : string; (** Reference (AT-URI) to the list record. *) 1860 + name : string; (** Display name for starter pack; can not be empty. *) 1861 1861 } 1862 1862 1863 1863 (** Jsont codec for {!type:main}. *) ··· 1870 1870 (** Query/procedure parameters. *) 1871 1871 type params = { 1872 1872 actor : string; 1873 - limit : int option; 1874 1873 cursor : string option; 1874 + limit : int option; 1875 1875 } 1876 1876 1877 1877 (** Jsont codec for {!type:params}. *) ··· 1879 1879 1880 1880 1881 1881 type output = { 1882 - subject : Jsont.json; 1883 1882 cursor : string option; 1884 1883 follows : Jsont.json list; 1884 + subject : Jsont.json; 1885 1885 } 1886 1886 1887 1887 (** Jsont codec for {!type:output}. *) ··· 1901 1901 1902 1902 1903 1903 type output = { 1904 - suggestions : Jsont.json list; 1905 1904 is_fallback : bool option; (** If true, response has fallen-back to generic results, and is not scoped using relativeToDid *) 1906 1905 rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1906 + suggestions : Jsont.json list; 1907 1907 } 1908 1908 1909 1909 (** Jsont codec for {!type:output}. *) ··· 1914 1914 (** Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. *) 1915 1915 1916 1916 type main = { 1917 - subject : string; (** DID of the account to be blocked. *) 1918 1917 created_at : string; 1918 + subject : string; (** DID of the account to be blocked. *) 1919 1919 } 1920 1920 1921 1921 (** Jsont codec for {!type:main}. *) ··· 1926 1926 (** Record representing a block relationship against an entire an entire list of accounts (actors). *) 1927 1927 1928 1928 type main = { 1929 - subject : string; (** Reference (AT-URI) to the mod list record. *) 1930 1929 created_at : string; 1930 + subject : string; (** Reference (AT-URI) to the mod list record. *) 1931 1931 } 1932 1932 1933 1933 (** Jsont codec for {!type:main}. *) ··· 1952 1952 (** Query/procedure parameters. *) 1953 1953 type params = { 1954 1954 actor : string; 1955 + cursor : string option; 1955 1956 limit : int option; 1956 - cursor : string option; 1957 1957 } 1958 1958 1959 1959 (** Jsont codec for {!type:params}. *) ··· 1961 1961 1962 1962 1963 1963 type output = { 1964 - subject : Jsont.json; 1965 1964 cursor : string option; 1966 1965 followers : Jsont.json list; 1966 + subject : Jsont.json; 1967 1967 } 1968 1968 1969 1969 (** Jsont codec for {!type:output}. *) ··· 1986 1986 (** Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. *) 1987 1987 1988 1988 type main = { 1989 - subject : string; 1990 1989 created_at : string; 1990 + subject : string; 1991 1991 via : Com.Atproto.Repo.StrongRef.main option; 1992 1992 } 1993 1993 ··· 2037 2037 (** Query/procedure parameters. *) 2038 2038 type params = { 2039 2039 actor : string; 2040 - limit : int option; 2041 2040 cursor : string option; 2041 + limit : int option; 2042 2042 } 2043 2043 2044 2044 (** Jsont codec for {!type:params}. *) ··· 2046 2046 2047 2047 2048 2048 type output = { 2049 - subject : Jsont.json; 2050 2049 cursor : string option; 2051 2050 followers : Jsont.json list; 2051 + subject : Jsont.json; 2052 2052 } 2053 2053 2054 2054 (** Jsont codec for {!type:output}. *) ··· 2071 2071 (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 2072 2072 2073 2073 type main = { 2074 - subject : string; (** The account which is included on the list. *) 2074 + created_at : string; 2075 2075 list_ : string; (** Reference (AT-URI) to the list record (app.bsky.graph.list). *) 2076 - created_at : string; 2076 + subject : string; (** The account which is included on the list. *) 2077 2077 } 2078 2078 2079 2079 (** Jsont codec for {!type:main}. *) ··· 2082 2082 end 2083 2083 module Defs : sig 2084 2084 2085 - type list_item_view = { 2086 - uri : string; 2087 - subject : Jsont.json; 2088 - } 2089 - 2090 - (** Jsont codec for {!type:list_item_view}. *) 2091 - val list_item_view_jsont : list_item_view Jsont.t 2092 - 2093 - 2094 2085 type starter_pack_view_basic = { 2095 - uri : string; 2096 2086 cid : string; 2097 - record : Jsont.json; 2098 2087 creator : Jsont.json; 2099 - list_item_count : int option; 2088 + indexed_at : string; 2089 + joined_all_time_count : int option; 2100 2090 joined_week_count : int option; 2101 - joined_all_time_count : int option; 2102 2091 labels : Com.Atproto.Label.Defs.label list option; 2103 - indexed_at : string; 2092 + list_item_count : int option; 2093 + record : Jsont.json; 2094 + uri : string; 2104 2095 } 2105 2096 2106 2097 (** Jsont codec for {!type:starter_pack_view_basic}. *) 2107 2098 val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 2108 2099 2100 + (** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) *) 2109 2101 2110 - type list_purpose = string 2111 - val list_purpose_jsont : list_purpose Jsont.t 2112 - 2113 - (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 2114 - 2115 - type modlist = string 2116 - val modlist_jsont : modlist Jsont.t 2117 - 2118 - (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2102 + type relationship = { 2103 + blocked_by : string option; (** if the actor is blocked by this DID, contains the AT-URI of the block record *) 2104 + blocked_by_list : string option; (** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record *) 2105 + blocking : string option; (** if the actor blocks this DID, this is the AT-URI of the block record *) 2106 + blocking_by_list : string option; (** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record *) 2107 + did : string; 2108 + followed_by : string option; (** if the actor is followed by this DID, contains the AT-URI of the follow record *) 2109 + following : string option; (** if the actor follows this DID, this is the AT-URI of the follow record *) 2110 + } 2119 2111 2120 - type curatelist = string 2121 - val curatelist_jsont : curatelist Jsont.t 2112 + (** Jsont codec for {!type:relationship}. *) 2113 + val relationship_jsont : relationship Jsont.t 2122 2114 2123 2115 (** A list of actors used for only for reference purposes such as within a starter pack. *) 2124 2116 2125 2117 type referencelist = string 2126 2118 val referencelist_jsont : referencelist Jsont.t 2127 2119 2120 + (** indicates that a handle or DID could not be resolved *) 2121 + 2122 + type not_found_actor = { 2123 + actor : string; 2124 + not_found : bool; 2125 + } 2126 + 2127 + (** Jsont codec for {!type:not_found_actor}. *) 2128 + val not_found_actor_jsont : not_found_actor Jsont.t 2129 + 2130 + (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 2131 + 2132 + type modlist = string 2133 + val modlist_jsont : modlist Jsont.t 2134 + 2128 2135 2129 2136 type list_viewer_state = { 2137 + blocked : string option; 2130 2138 muted : bool option; 2131 - blocked : string option; 2132 2139 } 2133 2140 2134 2141 (** Jsont codec for {!type:list_viewer_state}. *) 2135 2142 val list_viewer_state_jsont : list_viewer_state Jsont.t 2136 2143 2137 - (** indicates that a handle or DID could not be resolved *) 2138 2144 2139 - type not_found_actor = { 2140 - actor : string; 2141 - not_found : bool; 2145 + type list_purpose = string 2146 + val list_purpose_jsont : list_purpose Jsont.t 2147 + 2148 + 2149 + type list_item_view = { 2150 + subject : Jsont.json; 2151 + uri : string; 2142 2152 } 2143 2153 2144 - (** Jsont codec for {!type:not_found_actor}. *) 2145 - val not_found_actor_jsont : not_found_actor Jsont.t 2154 + (** Jsont codec for {!type:list_item_view}. *) 2155 + val list_item_view_jsont : list_item_view Jsont.t 2146 2156 2147 - (** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) *) 2157 + (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2148 2158 2149 - type relationship = { 2150 - did : string; 2151 - following : string option; (** if the actor follows this DID, this is the AT-URI of the follow record *) 2152 - followed_by : string option; (** if the actor is followed by this DID, contains the AT-URI of the follow record *) 2153 - blocking : string option; (** if the actor blocks this DID, this is the AT-URI of the block record *) 2154 - blocked_by : string option; (** if the actor is blocked by this DID, contains the AT-URI of the block record *) 2155 - blocking_by_list : string option; (** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record *) 2156 - 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 *) 2157 - } 2158 - 2159 - (** Jsont codec for {!type:relationship}. *) 2160 - val relationship_jsont : relationship Jsont.t 2159 + type curatelist = string 2160 + val curatelist_jsont : curatelist Jsont.t 2161 2161 2162 2162 2163 2163 type list_view_basic = { 2164 - uri : string; 2164 + avatar : string option; 2165 2165 cid : string; 2166 + indexed_at : string option; 2167 + labels : Com.Atproto.Label.Defs.label list option; 2168 + list_item_count : int option; 2166 2169 name : string; 2167 2170 purpose : Jsont.json; 2168 - avatar : string option; 2169 - list_item_count : int option; 2170 - labels : Com.Atproto.Label.Defs.label list option; 2171 + uri : string; 2171 2172 viewer : Jsont.json option; 2172 - indexed_at : string option; 2173 2173 } 2174 2174 2175 2175 (** Jsont codec for {!type:list_view_basic}. *) ··· 2177 2177 2178 2178 2179 2179 type list_view = { 2180 - uri : string; 2180 + avatar : string option; 2181 2181 cid : string; 2182 2182 creator : Jsont.json; 2183 - name : string; 2184 - purpose : Jsont.json; 2185 2183 description : string option; 2186 2184 description_facets : Richtext.Facet.main list option; 2187 - avatar : string option; 2185 + indexed_at : string; 2186 + labels : Com.Atproto.Label.Defs.label list option; 2188 2187 list_item_count : int option; 2189 - labels : Com.Atproto.Label.Defs.label list option; 2188 + name : string; 2189 + purpose : Jsont.json; 2190 + uri : string; 2190 2191 viewer : Jsont.json option; 2191 - indexed_at : string; 2192 2192 } 2193 2193 2194 2194 (** Jsont codec for {!type:list_view}. *) ··· 2196 2196 2197 2197 2198 2198 type starter_pack_view = { 2199 - uri : string; 2200 2199 cid : string; 2201 - record : Jsont.json; 2202 2200 creator : Jsont.json; 2203 - list_ : Jsont.json option; 2204 - list_items_sample : Jsont.json list option; 2205 2201 feeds : Jsont.json list option; 2202 + indexed_at : string; 2203 + joined_all_time_count : int option; 2206 2204 joined_week_count : int option; 2207 - joined_all_time_count : int option; 2208 2205 labels : Com.Atproto.Label.Defs.label list option; 2209 - indexed_at : string; 2206 + list_ : Jsont.json option; 2207 + list_items_sample : Jsont.json list option; 2208 + record : Jsont.json; 2209 + uri : string; 2210 2210 } 2211 2211 2212 2212 (** Jsont codec for {!type:starter_pack_view}. *) ··· 2218 2218 2219 2219 (** Query/procedure parameters. *) 2220 2220 type params = { 2221 - limit : int option; 2222 2221 cursor : string option; 2222 + limit : int option; 2223 2223 } 2224 2224 2225 2225 (** Jsont codec for {!type:params}. *) ··· 2227 2227 2228 2228 2229 2229 type output = { 2230 - cursor : string option; 2231 2230 blocks : Jsont.json list; 2231 + cursor : string option; 2232 2232 } 2233 2233 2234 2234 (** Jsont codec for {!type:output}. *) ··· 2239 2239 (** Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. *) 2240 2240 2241 2241 type main = { 2242 + created_at : string; (** Date of when the verification was created. *) 2243 + display_name : string; (** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. *) 2244 + handle : string; (** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. *) 2242 2245 subject : string; (** DID of the subject the verification applies to. *) 2243 - 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. *) 2244 - 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. *) 2245 - created_at : string; (** Date of when the verification was created. *) 2246 2246 } 2247 2247 2248 2248 (** Jsont codec for {!type:main}. *) ··· 2254 2254 2255 2255 (** Query/procedure parameters. *) 2256 2256 type params = { 2257 - limit : int option; 2258 2257 cursor : string option; 2258 + limit : int option; 2259 2259 } 2260 2260 2261 2261 (** Jsont codec for {!type:params}. *) ··· 2297 2297 (** A starter pack and an optional list item indicating membership of a target user to that starter pack. *) 2298 2298 2299 2299 type starter_pack_with_membership = { 2300 - starter_pack : Jsont.json; 2301 2300 list_item : Jsont.json option; 2301 + starter_pack : Jsont.json; 2302 2302 } 2303 2303 2304 2304 (** Jsont codec for {!type:starter_pack_with_membership}. *) ··· 2309 2309 (** Query/procedure parameters. *) 2310 2310 type params = { 2311 2311 actor : string; (** The account (actor) to check for membership. *) 2312 + cursor : string option; 2312 2313 limit : int option; 2313 - cursor : string option; 2314 2314 } 2315 2315 2316 2316 (** Jsont codec for {!type:params}. *) ··· 2332 2332 (** Query/procedure parameters. *) 2333 2333 type params = { 2334 2334 actor : string; 2335 - limit : int option; 2336 2335 cursor : string option; 2336 + limit : int option; 2337 2337 } 2338 2338 2339 2339 (** Jsont codec for {!type:params}. *) ··· 2353 2353 (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 2354 2354 2355 2355 type main = { 2356 - purpose : Jsont.json; (** Defines the purpose of the list (aka, moderation-oriented or curration-oriented) *) 2357 - name : string; (** Display name for list; can not be empty. *) 2356 + avatar : Atp.Blob_ref.t option; 2357 + created_at : string; 2358 2358 description : string option; 2359 2359 description_facets : Richtext.Facet.main list option; 2360 - avatar : Atp.Blob_ref.t option; 2361 2360 labels : Com.Atproto.Label.Defs.self_labels option; 2362 - created_at : string; 2361 + name : string; (** Display name for list; can not be empty. *) 2362 + purpose : Jsont.json; (** Defines the purpose of the list (aka, moderation-oriented or curration-oriented) *) 2363 2363 } 2364 2364 2365 2365 (** Jsont codec for {!type:main}. *) ··· 2371 2371 2372 2372 (** Query/procedure parameters. *) 2373 2373 type params = { 2374 - q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2374 + cursor : string option; 2375 2375 limit : int option; 2376 - cursor : string option; 2376 + q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2377 2377 } 2378 2378 2379 2379 (** Jsont codec for {!type:params}. *) ··· 2394 2394 2395 2395 (** Query/procedure parameters. *) 2396 2396 type params = { 2397 - list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 2398 - limit : int option; 2399 2397 cursor : string option; 2398 + limit : int option; 2399 + list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 2400 2400 } 2401 2401 2402 2402 (** Jsont codec for {!type:params}. *) ··· 2405 2405 2406 2406 type output = { 2407 2407 cursor : string option; 2408 - list_ : Jsont.json; 2409 2408 items : Jsont.json list; 2409 + list_ : Jsont.json; 2410 2410 } 2411 2411 2412 2412 (** Jsont codec for {!type:output}. *) ··· 2418 2418 2419 2419 (** Query/procedure parameters. *) 2420 2420 type params = { 2421 - limit : int option; 2422 2421 cursor : string option; 2422 + limit : int option; 2423 2423 } 2424 2424 2425 2425 (** Jsont codec for {!type:params}. *) ··· 2471 2471 (** Query/procedure parameters. *) 2472 2472 type params = { 2473 2473 actor : string; (** The account (actor) to check for membership. *) 2474 - limit : int option; 2475 2474 cursor : string option; 2475 + limit : int option; 2476 2476 purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2477 2477 } 2478 2478 ··· 2494 2494 2495 2495 (** Query/procedure parameters. *) 2496 2496 type params = { 2497 - limit : int option; 2498 2497 cursor : string option; 2498 + limit : int option; 2499 2499 } 2500 2500 2501 2501 (** Jsont codec for {!type:params}. *) ··· 2537 2537 (** Query/procedure parameters. *) 2538 2538 type params = { 2539 2539 actor : string; (** The account (actor) to enumerate lists from. *) 2540 + cursor : string option; 2540 2541 limit : int option; 2541 - cursor : string option; 2542 2542 purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2543 2543 } 2544 2544 ··· 2558 2558 end 2559 2559 module Feed : sig 2560 2560 module Post : sig 2561 - 2562 - type reply_ref = { 2563 - root : Com.Atproto.Repo.StrongRef.main; 2564 - parent : Com.Atproto.Repo.StrongRef.main; 2565 - } 2566 - 2567 - (** Jsont codec for {!type:reply_ref}. *) 2568 - val reply_ref_jsont : reply_ref Jsont.t 2569 - 2570 2561 (** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. *) 2571 2562 2572 2563 type text_slice = { 2564 + end_ : int; 2573 2565 start : int; 2574 - end_ : int; 2575 2566 } 2576 2567 2577 2568 (** Jsont codec for {!type:text_slice}. *) 2578 2569 val text_slice_jsont : text_slice Jsont.t 2579 2570 2571 + 2572 + type reply_ref = { 2573 + parent : Com.Atproto.Repo.StrongRef.main; 2574 + root : Com.Atproto.Repo.StrongRef.main; 2575 + } 2576 + 2577 + (** Jsont codec for {!type:reply_ref}. *) 2578 + val reply_ref_jsont : reply_ref Jsont.t 2579 + 2580 2580 (** Deprecated: use facets instead. *) 2581 2581 2582 2582 type entity = { ··· 2591 2591 (** Record containing a Bluesky post. *) 2592 2592 2593 2593 type main = { 2594 - text : string; (** The primary post content. May be an empty string, if there are embeds. *) 2594 + created_at : string; (** Client-declared timestamp when this post was originally created. *) 2595 + embed : Jsont.json option; 2595 2596 entities : Jsont.json list option; (** DEPRECATED: replaced by app.bsky.richtext.facet. *) 2596 2597 facets : Richtext.Facet.main list option; (** Annotations of text (mentions, URLs, hashtags, etc) *) 2598 + labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values for this post. Effectively content warnings. *) 2599 + langs : string list option; (** Indicates human language of post primary text content. *) 2597 2600 reply : Jsont.json option; 2598 - embed : Jsont.json option; 2599 - langs : string list option; (** Indicates human language of post primary text content. *) 2600 - labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values for this post. Effectively content warnings. *) 2601 2601 tags : string list option; (** Additional hashtags, in addition to any included in post text and facets. *) 2602 - created_at : string; (** Client-declared timestamp when this post was originally created. *) 2602 + text : string; (** The primary post content. May be an empty string, if there are embeds. *) 2603 2603 } 2604 2604 2605 2605 (** Jsont codec for {!type:main}. *) ··· 2609 2609 module GetLikes : sig 2610 2610 2611 2611 type like = { 2612 - indexed_at : string; 2612 + actor : Jsont.json; 2613 2613 created_at : string; 2614 - actor : Jsont.json; 2614 + indexed_at : string; 2615 2615 } 2616 2616 2617 2617 (** Jsont codec for {!type:like}. *) ··· 2621 2621 2622 2622 (** Query/procedure parameters. *) 2623 2623 type params = { 2624 - uri : string; (** AT-URI of the subject (eg, a post record). *) 2625 2624 cid : string option; (** CID of the subject record (aka, specific version of record), to filter likes. *) 2625 + cursor : string option; 2626 2626 limit : int option; 2627 - cursor : string option; 2627 + uri : string; (** AT-URI of the subject (eg, a post record). *) 2628 2628 } 2629 2629 2630 2630 (** Jsont codec for {!type:params}. *) ··· 2632 2632 2633 2633 2634 2634 type output = { 2635 - uri : string; 2636 2635 cid : string option; 2637 2636 cursor : string option; 2638 2637 likes : Jsont.json list; 2638 + uri : string; 2639 2639 } 2640 2640 2641 2641 (** Jsont codec for {!type:output}. *) ··· 2654 2654 2655 2655 type main = { 2656 2656 created_at : string; 2657 - post : string; (** Reference (AT-URI) to the post record. *) 2658 2657 detached_embedding_uris : string list option; (** List of AT-URIs embedding this post that the author has detached from. *) 2659 2658 embedding_rules : Jsont.json list option; (** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 2659 + post : string; (** Reference (AT-URI) to the post record. *) 2660 2660 } 2661 2661 2662 2662 (** Jsont codec for {!type:main}. *) ··· 2668 2668 2669 2669 (** Query/procedure parameters. *) 2670 2670 type params = { 2671 - uri : string; (** Reference (AT-URI) of post record *) 2672 2671 cid : string option; (** If supplied, filters to reposts of specific version (by CID) of the post record. *) 2672 + cursor : string option; 2673 2673 limit : int option; 2674 - cursor : string option; 2674 + uri : string; (** Reference (AT-URI) of post record *) 2675 2675 } 2676 2676 2677 2677 (** Jsont codec for {!type:params}. *) ··· 2679 2679 2680 2680 2681 2681 type output = { 2682 - uri : string; 2683 2682 cid : string option; 2684 2683 cursor : string option; 2685 2684 reposted_by : Jsont.json list; 2685 + uri : string; 2686 2686 } 2687 2687 2688 2688 (** Jsont codec for {!type:output}. *) ··· 2691 2691 end 2692 2692 module DescribeFeedGenerator : sig 2693 2693 2694 - type feed = { 2695 - uri : string; 2696 - } 2697 - 2698 - (** Jsont codec for {!type:feed}. *) 2699 - val feed_jsont : feed Jsont.t 2700 - 2701 - 2702 2694 type links = { 2703 2695 privacy_policy : string option; 2704 2696 terms_of_service : string option; ··· 2706 2698 2707 2699 (** Jsont codec for {!type:links}. *) 2708 2700 val links_jsont : links Jsont.t 2701 + 2702 + 2703 + type feed = { 2704 + uri : string; 2705 + } 2706 + 2707 + (** Jsont codec for {!type:feed}. *) 2708 + val feed_jsont : feed Jsont.t 2709 2709 2710 2710 (** Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). *) 2711 2711 ··· 2728 2728 (** Jsont codec for {!type:mention_rule}. *) 2729 2729 val mention_rule_jsont : mention_rule Jsont.t 2730 2730 2731 - (** Allow replies from actors who follow you. *) 2731 + (** Allow replies from actors on a list. *) 2732 2732 2733 - type follower_rule = unit 2733 + type list_rule = { 2734 + list_ : string; 2735 + } 2734 2736 2735 - (** Jsont codec for {!type:follower_rule}. *) 2736 - val follower_rule_jsont : follower_rule Jsont.t 2737 + (** Jsont codec for {!type:list_rule}. *) 2738 + val list_rule_jsont : list_rule Jsont.t 2737 2739 2738 2740 (** Allow replies from actors you follow. *) 2739 2741 ··· 2742 2744 (** Jsont codec for {!type:following_rule}. *) 2743 2745 val following_rule_jsont : following_rule Jsont.t 2744 2746 2745 - (** Allow replies from actors on a list. *) 2747 + (** Allow replies from actors who follow you. *) 2746 2748 2747 - type list_rule = { 2748 - list_ : string; 2749 - } 2749 + type follower_rule = unit 2750 2750 2751 - (** Jsont codec for {!type:list_rule}. *) 2752 - val list_rule_jsont : list_rule Jsont.t 2751 + (** Jsont codec for {!type:follower_rule}. *) 2752 + val follower_rule_jsont : follower_rule Jsont.t 2753 2753 2754 2754 (** Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. *) 2755 2755 2756 2756 type main = { 2757 - post : string; (** Reference (AT-URI) to the post record. *) 2758 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. *) 2759 2758 created_at : string; 2760 2759 hidden_replies : string list option; (** List of hidden reply URIs. *) 2760 + post : string; (** Reference (AT-URI) to the post record. *) 2761 2761 } 2762 2762 2763 2763 (** Jsont codec for {!type:main}. *) ··· 2768 2768 (** Record declaring a 'like' of a piece of subject content. *) 2769 2769 2770 2770 type main = { 2771 - subject : Com.Atproto.Repo.StrongRef.main; 2772 2771 created_at : string; 2772 + subject : Com.Atproto.Repo.StrongRef.main; 2773 2773 via : Com.Atproto.Repo.StrongRef.main option; 2774 2774 } 2775 2775 ··· 2781 2781 (** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. *) 2782 2782 2783 2783 type viewer_state = { 2784 - repost : string option; 2785 - like : string option; 2786 2784 bookmarked : bool option; 2787 - thread_muted : bool option; 2788 - reply_disabled : bool option; 2789 2785 embedding_disabled : bool option; 2786 + like : string option; 2790 2787 pinned : bool option; 2788 + reply_disabled : bool option; 2789 + repost : string option; 2790 + thread_muted : bool option; 2791 2791 } 2792 2792 2793 2793 (** Jsont codec for {!type:viewer_state}. *) 2794 2794 val viewer_state_jsont : viewer_state Jsont.t 2795 + 2796 + 2797 + type threadgate_view = { 2798 + cid : string option; 2799 + lists : Jsont.json list option; 2800 + record : Jsont.json option; 2801 + uri : string option; 2802 + } 2803 + 2804 + (** Jsont codec for {!type:threadgate_view}. *) 2805 + val threadgate_view_jsont : threadgate_view Jsont.t 2795 2806 2796 2807 (** Metadata about this post within the context of the thread it is in. *) 2797 2808 ··· 2803 2814 val thread_context_jsont : thread_context Jsont.t 2804 2815 2805 2816 2817 + type skeleton_reason_repost = { 2818 + repost : string; 2819 + } 2820 + 2821 + (** Jsont codec for {!type:skeleton_reason_repost}. *) 2822 + val skeleton_reason_repost_jsont : skeleton_reason_repost Jsont.t 2823 + 2824 + 2825 + type skeleton_reason_pin = unit 2826 + 2827 + (** Jsont codec for {!type:skeleton_reason_pin}. *) 2828 + val skeleton_reason_pin_jsont : skeleton_reason_pin Jsont.t 2829 + 2830 + 2831 + type skeleton_feed_post = { 2832 + feed_context : string option; (** Context that will be passed through to client and may be passed to feed generator back alongside interactions. *) 2833 + post : string; 2834 + reason : Jsont.json option; 2835 + } 2836 + 2837 + (** Jsont codec for {!type:skeleton_feed_post}. *) 2838 + val skeleton_feed_post_jsont : skeleton_feed_post Jsont.t 2839 + 2840 + (** Request that more content like the given feed item be shown in the feed *) 2841 + 2842 + type request_more = string 2843 + val request_more_jsont : request_more Jsont.t 2844 + 2845 + (** Request that less content like the given feed item be shown in the feed *) 2846 + 2847 + type request_less = string 2848 + val request_less_jsont : request_less Jsont.t 2849 + 2850 + 2806 2851 type reply_ref = { 2807 - root : Jsont.json; 2808 - parent : Jsont.json; 2809 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; 2810 2855 } 2811 2856 2812 2857 (** Jsont codec for {!type:reply_ref}. *) ··· 2815 2860 2816 2861 type reason_repost = { 2817 2862 by : Jsont.json; 2818 - uri : string option; 2819 2863 cid : string option; 2820 2864 indexed_at : string; 2865 + uri : string option; 2821 2866 } 2822 2867 2823 2868 (** Jsont codec for {!type:reason_repost}. *) ··· 2831 2876 2832 2877 2833 2878 type not_found_post = { 2879 + not_found : bool; 2834 2880 uri : string; 2835 - not_found : bool; 2836 2881 } 2837 2882 2838 2883 (** Jsont codec for {!type:not_found_post}. *) 2839 2884 val not_found_post_jsont : not_found_post Jsont.t 2840 2885 2886 + (** User shared the feed item *) 2841 2887 2842 - type blocked_author = { 2843 - did : string; 2844 - viewer : Jsont.json option; 2845 - } 2888 + type interaction_share = string 2889 + val interaction_share_jsont : interaction_share Jsont.t 2846 2890 2847 - (** Jsont codec for {!type:blocked_author}. *) 2848 - val blocked_author_jsont : blocked_author Jsont.t 2891 + (** Feed item was seen by user *) 2849 2892 2893 + type interaction_seen = string 2894 + val interaction_seen_jsont : interaction_seen Jsont.t 2850 2895 2851 - type generator_viewer_state = { 2852 - like : string option; 2853 - } 2896 + (** User reposted the feed item *) 2854 2897 2855 - (** Jsont codec for {!type:generator_viewer_state}. *) 2856 - val generator_viewer_state_jsont : generator_viewer_state Jsont.t 2898 + type interaction_repost = string 2899 + val interaction_repost_jsont : interaction_repost Jsont.t 2857 2900 2901 + (** User replied to the feed item *) 2858 2902 2859 - type skeleton_feed_post = { 2860 - post : string; 2861 - reason : Jsont.json option; 2862 - feed_context : string option; (** Context that will be passed through to client and may be passed to feed generator back alongside interactions. *) 2863 - } 2903 + type interaction_reply = string 2904 + val interaction_reply_jsont : interaction_reply Jsont.t 2864 2905 2865 - (** Jsont codec for {!type:skeleton_feed_post}. *) 2866 - val skeleton_feed_post_jsont : skeleton_feed_post Jsont.t 2906 + (** User quoted the feed item *) 2867 2907 2908 + type interaction_quote = string 2909 + val interaction_quote_jsont : interaction_quote Jsont.t 2868 2910 2869 - type skeleton_reason_repost = { 2870 - repost : string; 2871 - } 2911 + (** User liked the feed item *) 2872 2912 2873 - (** Jsont codec for {!type:skeleton_reason_repost}. *) 2874 - val skeleton_reason_repost_jsont : skeleton_reason_repost Jsont.t 2875 - 2876 - 2877 - type skeleton_reason_pin = unit 2878 - 2879 - (** Jsont codec for {!type:skeleton_reason_pin}. *) 2880 - val skeleton_reason_pin_jsont : skeleton_reason_pin Jsont.t 2881 - 2882 - 2883 - type threadgate_view = { 2884 - uri : string option; 2885 - cid : string option; 2886 - record : Jsont.json option; 2887 - lists : Jsont.json list option; 2888 - } 2889 - 2890 - (** Jsont codec for {!type:threadgate_view}. *) 2891 - val threadgate_view_jsont : threadgate_view Jsont.t 2913 + type interaction_like = string 2914 + val interaction_like_jsont : interaction_like Jsont.t 2892 2915 2893 2916 2894 2917 type interaction = { 2895 - item : string option; 2896 2918 event : string option; 2897 2919 feed_context : string option; (** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. *) 2920 + item : string option; 2898 2921 req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 2899 2922 } 2900 2923 2901 2924 (** Jsont codec for {!type:interaction}. *) 2902 2925 val interaction_jsont : interaction Jsont.t 2903 2926 2904 - (** Request that less content like the given feed item be shown in the feed *) 2905 2927 2906 - type request_less = string 2907 - val request_less_jsont : request_less Jsont.t 2928 + type generator_viewer_state = { 2929 + like : string option; 2930 + } 2908 2931 2909 - (** Request that more content like the given feed item be shown in the feed *) 2932 + (** Jsont codec for {!type:generator_viewer_state}. *) 2933 + val generator_viewer_state_jsont : generator_viewer_state Jsont.t 2910 2934 2911 - type request_more = string 2912 - val request_more_jsont : request_more Jsont.t 2935 + (** Declares the feed generator returns posts containing app.bsky.embed.video embeds. *) 2913 2936 2914 - (** User clicked through to the feed item *) 2937 + type content_mode_video = string 2938 + val content_mode_video_jsont : content_mode_video Jsont.t 2915 2939 2916 - type clickthrough_item = string 2917 - val clickthrough_item_jsont : clickthrough_item Jsont.t 2940 + (** Declares the feed generator returns any types of posts. *) 2918 2941 2919 - (** User clicked through to the author of the feed item *) 2920 - 2921 - type clickthrough_author = string 2922 - val clickthrough_author_jsont : clickthrough_author Jsont.t 2942 + type content_mode_unspecified = string 2943 + val content_mode_unspecified_jsont : content_mode_unspecified Jsont.t 2923 2944 2924 2945 (** User clicked through to the reposter of the feed item *) 2925 2946 2926 2947 type clickthrough_reposter = string 2927 2948 val clickthrough_reposter_jsont : clickthrough_reposter Jsont.t 2928 2949 2950 + (** User clicked through to the feed item *) 2951 + 2952 + type clickthrough_item = string 2953 + val clickthrough_item_jsont : clickthrough_item Jsont.t 2954 + 2929 2955 (** User clicked through to the embedded content of the feed item *) 2930 2956 2931 2957 type clickthrough_embed = string 2932 2958 val clickthrough_embed_jsont : clickthrough_embed Jsont.t 2933 2959 2934 - (** Declares the feed generator returns any types of posts. *) 2960 + (** User clicked through to the author of the feed item *) 2935 2961 2936 - type content_mode_unspecified = string 2937 - val content_mode_unspecified_jsont : content_mode_unspecified Jsont.t 2962 + type clickthrough_author = string 2963 + val clickthrough_author_jsont : clickthrough_author Jsont.t 2938 2964 2939 - (** Declares the feed generator returns posts containing app.bsky.embed.video embeds. *) 2940 - 2941 - type content_mode_video = string 2942 - val content_mode_video_jsont : content_mode_video Jsont.t 2943 - 2944 - (** Feed item was seen by user *) 2945 - 2946 - type interaction_seen = string 2947 - val interaction_seen_jsont : interaction_seen Jsont.t 2948 - 2949 - (** User liked the feed item *) 2950 - 2951 - type interaction_like = string 2952 - val interaction_like_jsont : interaction_like Jsont.t 2953 - 2954 - (** User reposted the feed item *) 2955 - 2956 - type interaction_repost = string 2957 - val interaction_repost_jsont : interaction_repost Jsont.t 2958 - 2959 - (** User replied to the feed item *) 2960 - 2961 - type interaction_reply = string 2962 - val interaction_reply_jsont : interaction_reply Jsont.t 2963 - 2964 - (** User quoted the feed item *) 2965 2965 2966 - type interaction_quote = string 2967 - val interaction_quote_jsont : interaction_quote Jsont.t 2968 - 2969 - (** User shared the feed item *) 2966 + type blocked_author = { 2967 + did : string; 2968 + viewer : Jsont.json option; 2969 + } 2970 2970 2971 - type interaction_share = string 2972 - val interaction_share_jsont : interaction_share Jsont.t 2971 + (** Jsont codec for {!type:blocked_author}. *) 2972 + val blocked_author_jsont : blocked_author Jsont.t 2973 2973 2974 2974 2975 2975 type post_view = { 2976 - uri : string; 2976 + author : Jsont.json; 2977 + bookmark_count : int option; 2977 2978 cid : string; 2978 - author : Jsont.json; 2979 + debug : Jsont.json option; (** Debug information for internal development *) 2980 + embed : Jsont.json option; 2981 + indexed_at : string; 2982 + labels : Com.Atproto.Label.Defs.label list option; 2983 + like_count : int option; 2984 + quote_count : int option; 2979 2985 record : Jsont.json; 2980 - embed : Jsont.json option; 2981 - bookmark_count : int option; 2982 2986 reply_count : int option; 2983 2987 repost_count : int option; 2984 - like_count : int option; 2985 - quote_count : int option; 2986 - indexed_at : string; 2988 + threadgate : Jsont.json option; 2989 + uri : string; 2987 2990 viewer : Jsont.json option; 2988 - labels : Com.Atproto.Label.Defs.label list option; 2989 - threadgate : Jsont.json option; 2990 - debug : Jsont.json option; (** Debug information for internal development *) 2991 2991 } 2992 2992 2993 2993 (** Jsont codec for {!type:post_view}. *) 2994 2994 val post_view_jsont : post_view Jsont.t 2995 2995 2996 2996 2997 - type blocked_post = { 2998 - uri : string; 2999 - blocked : bool; 3000 - author : Jsont.json; 3001 - } 3002 - 3003 - (** Jsont codec for {!type:blocked_post}. *) 3004 - val blocked_post_jsont : blocked_post Jsont.t 3005 - 3006 - 3007 2997 type generator_view = { 3008 - uri : string; 2998 + accepts_interactions : bool option; 2999 + avatar : string option; 3009 3000 cid : string; 3010 - did : string; 3001 + content_mode : string option; 3011 3002 creator : Jsont.json; 3012 - display_name : string; 3013 3003 description : string option; 3014 3004 description_facets : Richtext.Facet.main list option; 3015 - avatar : string option; 3016 - like_count : int option; 3017 - accepts_interactions : bool option; 3005 + did : string; 3006 + display_name : string; 3007 + indexed_at : string; 3018 3008 labels : Com.Atproto.Label.Defs.label list option; 3009 + like_count : int option; 3010 + uri : string; 3019 3011 viewer : Jsont.json option; 3020 - content_mode : string option; 3021 - indexed_at : string; 3022 3012 } 3023 3013 3024 3014 (** Jsont codec for {!type:generator_view}. *) 3025 3015 val generator_view_jsont : generator_view Jsont.t 3026 3016 3027 3017 3028 - type feed_view_post = { 3029 - post : Jsont.json; 3030 - reply : Jsont.json option; 3031 - reason : Jsont.json option; 3032 - feed_context : string option; (** Context provided by feed generator that may be passed back alongside interactions. *) 3033 - req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3018 + type blocked_post = { 3019 + author : Jsont.json; 3020 + blocked : bool; 3021 + uri : string; 3034 3022 } 3035 3023 3036 - (** Jsont codec for {!type:feed_view_post}. *) 3037 - val feed_view_post_jsont : feed_view_post Jsont.t 3024 + (** Jsont codec for {!type:blocked_post}. *) 3025 + val blocked_post_jsont : blocked_post Jsont.t 3038 3026 3039 3027 3040 3028 type thread_view_post = { 3041 - post : Jsont.json; 3042 3029 parent : Jsont.json option; 3030 + post : Jsont.json; 3043 3031 replies : Jsont.json list option; 3044 3032 thread_context : Jsont.json option; 3045 3033 } ··· 3047 3035 (** Jsont codec for {!type:thread_view_post}. *) 3048 3036 val thread_view_post_jsont : thread_view_post Jsont.t 3049 3037 3038 + 3039 + type feed_view_post = { 3040 + feed_context : string option; (** Context provided by feed generator that may be passed back alongside interactions. *) 3041 + post : Jsont.json; 3042 + reason : Jsont.json option; 3043 + reply : Jsont.json option; 3044 + req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 3045 + } 3046 + 3047 + (** Jsont codec for {!type:feed_view_post}. *) 3048 + val feed_view_post_jsont : feed_view_post Jsont.t 3049 + 3050 3050 end 3051 3051 module Repost : sig 3052 3052 (** Record representing a 'repost' of an existing Bluesky post. *) 3053 3053 3054 3054 type main = { 3055 - subject : Com.Atproto.Repo.StrongRef.main; 3056 3055 created_at : string; 3056 + subject : Com.Atproto.Repo.StrongRef.main; 3057 3057 via : Com.Atproto.Repo.StrongRef.main option; 3058 3058 } 3059 3059 ··· 3065 3065 (** Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. *) 3066 3066 3067 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; 3068 3074 did : string; 3069 3075 display_name : string; 3070 - description : string option; 3071 - description_facets : Richtext.Facet.main list option; 3072 - avatar : Atp.Blob_ref.t option; 3073 - accepts_interactions : bool option; (** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions *) 3074 3076 labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values *) 3075 - content_mode : string option; 3076 - created_at : string; 3077 3077 } 3078 3078 3079 3079 (** Jsont codec for {!type:main}. *) ··· 3085 3085 3086 3086 (** Query/procedure parameters. *) 3087 3087 type params = { 3088 - uri : string; (** Reference (AT-URI) to post record. *) 3089 3088 depth : int option; (** How many levels of reply depth should be included in response. *) 3090 3089 parent_height : int option; (** How many levels of parent (and grandparent, etc) post to include. *) 3090 + uri : string; (** Reference (AT-URI) to post record. *) 3091 3091 } 3092 3092 3093 3093 (** Jsont codec for {!type:params}. *) ··· 3108 3108 3109 3109 (** Query/procedure parameters. *) 3110 3110 type params = { 3111 + cursor : string option; 3111 3112 feed : string; 3112 3113 limit : int option; 3113 - cursor : string option; 3114 3114 } 3115 3115 3116 3116 (** Jsont codec for {!type:params}. *) ··· 3131 3131 3132 3132 (** Query/procedure parameters. *) 3133 3133 type params = { 3134 - uri : string; (** Reference (AT-URI) of post record *) 3135 3134 cid : string option; (** If supplied, filters to quotes of specific version (by CID) of the post record. *) 3136 - limit : int option; 3137 3135 cursor : string option; 3136 + limit : int option; 3137 + uri : string; (** Reference (AT-URI) of post record *) 3138 3138 } 3139 3139 3140 3140 (** Jsont codec for {!type:params}. *) ··· 3142 3142 3143 3143 3144 3144 type output = { 3145 - uri : string; 3146 3145 cid : string option; 3147 3146 cursor : string option; 3148 3147 posts : Jsont.json list; 3148 + uri : string; 3149 3149 } 3150 3150 3151 3151 (** Jsont codec for {!type:output}. *) ··· 3157 3157 3158 3158 (** Query/procedure parameters. *) 3159 3159 type params = { 3160 - list_ : string; (** Reference (AT-URI) to the list record. *) 3161 - limit : int option; 3162 3160 cursor : string option; 3161 + limit : int option; 3162 + list_ : string; (** Reference (AT-URI) to the list record. *) 3163 3163 } 3164 3164 3165 3165 (** Jsont codec for {!type:params}. *) ··· 3181 3181 (** Query/procedure parameters. *) 3182 3182 type params = { 3183 3183 actor : string; 3184 - limit : int option; 3185 3184 cursor : string option; 3185 + limit : int option; 3186 3186 } 3187 3187 3188 3188 (** Jsont codec for {!type:params}. *) ··· 3203 3203 3204 3204 (** Query/procedure parameters. *) 3205 3205 type params = { 3206 + cursor : string option; 3206 3207 feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 3207 3208 limit : int option; 3208 - cursor : string option; 3209 3209 } 3210 3210 3211 3211 (** Jsont codec for {!type:params}. *) ··· 3227 3227 3228 3228 (** Query/procedure parameters. *) 3229 3229 type params = { 3230 + author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 3231 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3232 + domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 3233 + lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 3234 + limit : int option; 3235 + mentions : string option; (** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. *) 3230 3236 q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 3231 - sort : string option; (** Specifies the ranking order of results. *) 3232 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. *) 3233 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). *) 3234 - 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. *) 3235 - author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 3236 - lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 3237 - domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 3238 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. *) 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 - limit : int option; 3241 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3242 3242 } 3243 3243 3244 3244 (** Jsont codec for {!type:params}. *) ··· 3299 3299 (** Query/procedure parameters. *) 3300 3300 type params = { 3301 3301 actor : string; 3302 - limit : int option; 3303 3302 cursor : string option; 3304 3303 filter : string option; (** Combinations of post/repost types to include in response. *) 3305 3304 include_pins : bool option; 3305 + limit : int option; 3306 3306 } 3307 3307 3308 3308 (** Jsont codec for {!type:params}. *) ··· 3331 3331 3332 3332 3333 3333 type output = { 3334 - view : Jsont.json; 3335 3334 is_online : bool; (** Indicates whether the feed generator service has been online recently, or else seems to be inactive. *) 3336 3335 is_valid : bool; (** Indicates whether the feed generator service is compatible with the record declaration. *) 3336 + view : Jsont.json; 3337 3337 } 3338 3338 3339 3339 (** Jsont codec for {!type:output}. *) ··· 3345 3345 3346 3346 (** Query/procedure parameters. *) 3347 3347 type params = { 3348 + cursor : string option; 3348 3349 limit : int option; 3349 - cursor : string option; 3350 3350 } 3351 3351 3352 3352 (** Jsont codec for {!type:params}. *) ··· 3368 3368 (** Query/procedure parameters. *) 3369 3369 type params = { 3370 3370 actor : string; 3371 - limit : int option; 3372 3371 cursor : string option; 3372 + limit : int option; 3373 3373 } 3374 3374 3375 3375 (** Jsont codec for {!type:params}. *) ··· 3411 3411 (** Query/procedure parameters. *) 3412 3412 type params = { 3413 3413 algorithm : string option; (** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. *) 3414 - limit : int option; 3415 3414 cursor : string option; 3415 + limit : int option; 3416 3416 } 3417 3417 3418 3418 (** Jsont codec for {!type:params}. *) ··· 3447 3447 3448 3448 3449 3449 type input = { 3450 - uri : string; 3451 3450 cid : string; 3451 + uri : string; 3452 3452 } 3453 3453 3454 3454 (** Jsont codec for {!type:input}. *) ··· 3456 3456 3457 3457 end 3458 3458 module Defs : sig 3459 + 3460 + type bookmark_view = { 3461 + created_at : string option; 3462 + item : Jsont.json; 3463 + subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the bookmarked record. *) 3464 + } 3465 + 3466 + (** Jsont codec for {!type:bookmark_view}. *) 3467 + val bookmark_view_jsont : bookmark_view Jsont.t 3468 + 3459 3469 (** Object used to store bookmark data in stash. *) 3460 3470 3461 3471 type bookmark = { ··· 3465 3475 (** Jsont codec for {!type:bookmark}. *) 3466 3476 val bookmark_jsont : bookmark Jsont.t 3467 3477 3468 - 3469 - type bookmark_view = { 3470 - subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the bookmarked record. *) 3471 - created_at : string option; 3472 - item : Jsont.json; 3473 - } 3474 - 3475 - (** Jsont codec for {!type:bookmark_view}. *) 3476 - val bookmark_view_jsont : bookmark_view Jsont.t 3477 - 3478 3478 end 3479 3479 module GetBookmarks : sig 3480 3480 (** Gets views of records bookmarked by the authenticated user. Requires authentication. *) 3481 3481 3482 3482 (** Query/procedure parameters. *) 3483 3483 type params = { 3484 + cursor : string option; 3484 3485 limit : int option; 3485 - cursor : string option; 3486 3486 } 3487 3487 3488 3488 (** Jsont codec for {!type:params}. *) ··· 3490 3490 3491 3491 3492 3492 type output = { 3493 - cursor : string option; 3494 3493 bookmarks : Defs.bookmark_view list; 3494 + cursor : string option; 3495 3495 } 3496 3496 3497 3497 (** Jsont codec for {!type:output}. *) ··· 3505 3505 3506 3506 (** Query/procedure parameters. *) 3507 3507 type params = { 3508 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3509 3508 category : string option; (** Category of users to get suggestions for. *) 3510 3509 limit : int option; 3510 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3511 3511 } 3512 3512 3513 3513 (** Jsont codec for {!type:params}. *) ··· 3548 3548 3549 3549 (** Query/procedure parameters. *) 3550 3550 type params = { 3551 - limit : int option; 3552 3551 cursor : string option; 3552 + limit : int option; 3553 3553 query : string option; 3554 3554 } 3555 3555 ··· 3571 3571 3572 3572 (** Query/procedure parameters. *) 3573 3573 type params = { 3574 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3575 3574 limit : int option; 3575 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3576 3576 } 3577 3577 3578 3578 (** Jsont codec for {!type:params}. *) ··· 3612 3612 3613 3613 (** Query/procedure parameters. *) 3614 3614 type params = { 3615 + limit : int option; 3615 3616 viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3616 - limit : int option; 3617 3617 } 3618 3618 3619 3619 (** Jsont codec for {!type:params}. *) ··· 3697 3697 3698 3698 (** Query/procedure parameters. *) 3699 3699 type params = { 3700 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3701 3700 limit : int option; 3701 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3702 3702 } 3703 3703 3704 3704 (** Jsont codec for {!type:params}. *) ··· 3715 3715 end 3716 3716 module Defs : sig 3717 3717 3718 - type skeleton_search_post = { 3719 - uri : string; 3720 - } 3721 - 3722 - (** Jsont codec for {!type:skeleton_search_post}. *) 3723 - val skeleton_search_post_jsont : skeleton_search_post Jsont.t 3724 - 3725 - 3726 - type skeleton_search_actor = { 3727 - did : string; 3728 - } 3729 - 3730 - (** Jsont codec for {!type:skeleton_search_actor}. *) 3731 - val skeleton_search_actor_jsont : skeleton_search_actor Jsont.t 3732 - 3733 - 3734 - type skeleton_search_starter_pack = { 3735 - uri : string; 3736 - } 3737 - 3738 - (** Jsont codec for {!type:skeleton_search_starter_pack}. *) 3739 - val skeleton_search_starter_pack_jsont : skeleton_search_starter_pack Jsont.t 3740 - 3741 - 3742 3718 type trending_topic = { 3743 - topic : string; 3744 - display_name : string option; 3745 3719 description : string option; 3720 + display_name : string option; 3746 3721 link : string; 3722 + topic : string; 3747 3723 } 3748 3724 3749 3725 (** Jsont codec for {!type:trending_topic}. *) 3750 3726 val trending_topic_jsont : trending_topic Jsont.t 3751 3727 3752 3728 3753 - type skeleton_trend = { 3754 - topic : string; 3755 - display_name : string; 3756 - link : string; 3757 - started_at : string; 3758 - post_count : int; 3759 - status : string option; 3760 - category : string option; 3761 - dids : string list; 3762 - } 3763 - 3764 - (** Jsont codec for {!type:skeleton_trend}. *) 3765 - val skeleton_trend_jsont : skeleton_trend Jsont.t 3766 - 3767 - 3768 3729 type trend_view = { 3769 - topic : string; 3730 + actors : Jsont.json list; 3731 + category : string option; 3770 3732 display_name : string; 3771 3733 link : string; 3772 - started_at : string; 3773 3734 post_count : int; 3735 + started_at : string; 3774 3736 status : string option; 3775 - category : string option; 3776 - actors : Jsont.json list; 3737 + topic : string; 3777 3738 } 3778 3739 3779 3740 (** Jsont codec for {!type:trend_view}. *) ··· 3781 3742 3782 3743 3783 3744 type thread_item_post = { 3784 - post : Jsont.json; 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. *) 3785 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. *) 3786 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. *) 3787 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. *) 3788 - hidden_by_threadgate : bool; (** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. *) 3789 - muted_by_viewer : bool; (** This is by an account muted by the viewer requesting it. *) 3750 + post : Jsont.json; 3790 3751 } 3791 3752 3792 3753 (** Jsont codec for {!type:thread_item_post}. *) 3793 3754 val thread_item_post_jsont : thread_item_post Jsont.t 3794 3755 3795 3756 3757 + type thread_item_not_found = unit 3758 + 3759 + (** Jsont codec for {!type:thread_item_not_found}. *) 3760 + val thread_item_not_found_jsont : thread_item_not_found Jsont.t 3761 + 3762 + 3796 3763 type thread_item_no_unauthenticated = unit 3797 3764 3798 3765 (** Jsont codec for {!type:thread_item_no_unauthenticated}. *) 3799 3766 val thread_item_no_unauthenticated_jsont : thread_item_no_unauthenticated Jsont.t 3800 3767 3801 3768 3802 - type thread_item_not_found = unit 3803 - 3804 - (** Jsont codec for {!type:thread_item_not_found}. *) 3805 - val thread_item_not_found_jsont : thread_item_not_found Jsont.t 3806 - 3807 - 3808 3769 type thread_item_blocked = { 3809 3770 author : Jsont.json; 3810 3771 } ··· 3812 3773 (** Jsont codec for {!type:thread_item_blocked}. *) 3813 3774 val thread_item_blocked_jsont : thread_item_blocked Jsont.t 3814 3775 3776 + 3777 + type skeleton_trend = { 3778 + category : string option; 3779 + dids : string list; 3780 + display_name : string; 3781 + link : string; 3782 + post_count : int; 3783 + started_at : string; 3784 + status : string option; 3785 + topic : string; 3786 + } 3787 + 3788 + (** Jsont codec for {!type:skeleton_trend}. *) 3789 + val skeleton_trend_jsont : skeleton_trend Jsont.t 3790 + 3791 + 3792 + type skeleton_search_starter_pack = { 3793 + uri : string; 3794 + } 3795 + 3796 + (** Jsont codec for {!type:skeleton_search_starter_pack}. *) 3797 + val skeleton_search_starter_pack_jsont : skeleton_search_starter_pack Jsont.t 3798 + 3799 + 3800 + type skeleton_search_post = { 3801 + uri : string; 3802 + } 3803 + 3804 + (** Jsont codec for {!type:skeleton_search_post}. *) 3805 + val skeleton_search_post_jsont : skeleton_search_post Jsont.t 3806 + 3807 + 3808 + type skeleton_search_actor = { 3809 + did : string; 3810 + } 3811 + 3812 + (** Jsont codec for {!type:skeleton_search_actor}. *) 3813 + val skeleton_search_actor_jsont : skeleton_search_actor Jsont.t 3814 + 3815 3815 (** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. *) 3816 3816 3817 3817 type age_assurance_state = { ··· 3825 3825 (** Object used to store age assurance data in stash. *) 3826 3826 3827 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. *) 3828 3831 created_at : string; (** The date and time of this write operation. *) 3829 - status : string; (** The status of the age assurance process. *) 3830 - attempt_id : string; (** The unique identifier for this instance of the age assurance flow, in UUID format. *) 3831 3832 email : string option; (** The email used for AA. *) 3832 3833 init_ip : string option; (** The IP address used when initiating the AA flow. *) 3833 3834 init_ua : string option; (** The user agent used when initiating the AA flow. *) 3834 - complete_ip : string option; (** The IP address used when completing the AA flow. *) 3835 - complete_ua : string option; (** The user agent used when completing the AA flow. *) 3835 + status : string; (** The status of the age assurance process. *) 3836 3836 } 3837 3837 3838 3838 (** Jsont codec for {!type:age_assurance_event}. *) ··· 3842 3842 module GetTaggedSuggestions : sig 3843 3843 3844 3844 type suggestion = { 3845 - tag : string; 3846 - subject_type : string; 3847 3845 subject : string; 3846 + subject_type : string; 3847 + tag : string; 3848 3848 } 3849 3849 3850 3850 (** Jsont codec for {!type:suggestion}. *) ··· 3872 3872 3873 3873 (** Query/procedure parameters. *) 3874 3874 type params = { 3875 + author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 3876 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3877 + domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 3878 + lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 3879 + limit : int option; 3880 + 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. *) 3875 3881 q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 3882 + 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). *) 3876 3883 sort : string option; (** Specifies the ranking order of results. *) 3877 - 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). *) 3884 + 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. *) 3878 3885 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). *) 3879 - 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. *) 3880 - author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 3881 - lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 3882 - domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 3883 3886 url : string option; (** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. *) 3884 - 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. *) 3885 3887 viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. *) 3886 - limit : int option; 3887 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 3888 3888 } 3889 3889 3890 3890 (** Jsont codec for {!type:params}. *) ··· 3904 3904 module GetPostThreadV2 : sig 3905 3905 3906 3906 type thread_item = { 3907 - uri : string; 3908 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 3909 value : Jsont.json; 3910 3910 } 3911 3911 ··· 3916 3916 3917 3917 (** Query/procedure parameters. *) 3918 3918 type params = { 3919 + above : bool option; (** Whether to include parents above the anchor. *) 3919 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. *) 3920 - above : bool option; (** Whether to include parents above the anchor. *) 3921 3921 below : int option; (** How many levels of replies to include below the anchor. *) 3922 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 3923 sort : string option; (** Sorting for the thread replies. *) ··· 3928 3928 3929 3929 3930 3930 type output = { 3931 + has_other_replies : bool; (** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. *) 3931 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. *) 3932 3933 threadgate : Jsont.json option; 3933 - has_other_replies : bool; (** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. *) 3934 3934 } 3935 3935 3936 3936 (** Jsont codec for {!type:output}. *) ··· 3942 3942 3943 3943 (** Query/procedure parameters. *) 3944 3944 type params = { 3945 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3946 3945 limit : int option; 3946 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3947 3947 } 3948 3948 3949 3949 (** Jsont codec for {!type:params}. *) ··· 3951 3951 3952 3952 3953 3953 type output = { 3954 - topics : Defs.trending_topic list; 3955 3954 suggested : Defs.trending_topic list; 3955 + topics : Defs.trending_topic list; 3956 3956 } 3957 3957 3958 3958 (** Jsont codec for {!type:output}. *) ··· 3964 3964 3965 3965 (** Query/procedure parameters. *) 3966 3966 type params = { 3967 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3968 3967 limit : int option; 3968 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3969 3969 } 3970 3970 3971 3971 (** Jsont codec for {!type:params}. *) ··· 3983 3983 module GetPostThreadOtherV2 : sig 3984 3984 3985 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. *) 3986 3987 uri : string; 3987 - 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. *) 3988 3988 value : Defs.thread_item_post; 3989 3989 } 3990 3990 ··· 4015 4015 4016 4016 4017 4017 type input = { 4018 + country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 4018 4019 email : string; (** The user's email address to receive assurance instructions. *) 4019 4020 language : string; (** The user's preferred language for communication during the assurance process. *) 4020 - country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 4021 4021 } 4022 4022 4023 4023 (** Jsont codec for {!type:input}. *) ··· 4035 4035 4036 4036 (** Query/procedure parameters. *) 4037 4037 type params = { 4038 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4039 + limit : int option; 4038 4040 q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 4039 4041 viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 4040 - limit : int option; 4041 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4042 4042 } 4043 4043 4044 4044 (** Jsont codec for {!type:params}. *) ··· 4060 4060 4061 4061 (** Query/procedure parameters. *) 4062 4062 type params = { 4063 + cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4064 + limit : int option; 4063 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. *) 4064 4067 viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 4065 - typeahead : bool option; (** If true, acts as fast/simple 'typeahead' query. *) 4066 - limit : int option; 4067 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4068 4068 } 4069 4069 4070 4070 (** Jsont codec for {!type:params}. *) ··· 4072 4072 4073 4073 4074 4074 type output = { 4075 + actors : Defs.skeleton_search_actor list; 4075 4076 cursor : string option; 4076 4077 hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 4077 - actors : Defs.skeleton_search_actor list; 4078 4078 } 4079 4079 4080 4080 (** Jsont codec for {!type:output}. *) ··· 4096 4096 4097 4097 (** Query/procedure parameters. *) 4098 4098 type params = { 4099 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 4099 + cursor : string option; 4100 4100 limit : int option; 4101 - cursor : string option; 4102 4101 relative_to_did : string option; (** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. *) 4102 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 4103 4103 } 4104 4104 4105 4105 (** Jsont codec for {!type:params}. *) ··· 4107 4107 4108 4108 4109 4109 type output = { 4110 - cursor : string option; 4111 4110 actors : Defs.skeleton_search_actor list; 4112 - 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. *) 4111 + cursor : string option; 4113 4112 rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 4113 + relative_to_did : string option; (** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. *) 4114 4114 } 4115 4115 4116 4116 (** Jsont codec for {!type:output}. *)
+52 -52
lexicons/standard-site/atp_lexicon_standard_site.ml
··· 18 18 module Repo = struct 19 19 module StrongRef = struct 20 20 type main = { 21 - uri : string; 22 21 cid : string; 22 + uri : string; 23 23 } 24 24 25 25 let main_jsont = 26 26 Jsont.Object.map ~kind:"Main" 27 - (fun _typ uri cid -> { uri; cid }) 27 + (fun _typ cid uri -> { cid; uri }) 28 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) 29 30 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 30 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 31 31 |> Jsont.Object.finish 32 32 33 33 end ··· 53 53 end 54 54 module Document = struct 55 55 type main = { 56 - site : string; 57 - path : string option; 58 - title : string; 59 - description : string option; 60 - cover_image : Atp.Blob_ref.t option; 61 - content : Jsont.json option; 62 - text_content : string option; 63 56 bsky_post_ref : Com.Atproto.Repo.StrongRef.main option; 57 + content : Jsont.json option; 58 + cover_image : Atp.Blob_ref.t option; 59 + description : string option; 60 + path : string option; 61 + published_at : string; 62 + site : string; 64 63 tags : string list option; 65 - published_at : string; 64 + text_content : string option; 65 + title : string; 66 66 updated_at : string option; 67 67 } 68 68 69 69 let main_jsont = 70 70 Jsont.Object.map ~kind:"Main" 71 - (fun _typ site path title description cover_image content text_content bsky_post_ref tags published_at updated_at -> { site; path; title; description; cover_image; content; text_content; bsky_post_ref; tags; published_at; updated_at }) 71 + (fun _typ bsky_post_ref content cover_image description path published_at site tags text_content title updated_at -> { bsky_post_ref; content; cover_image; description; path; published_at; site; tags; text_content; title; updated_at }) 72 72 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.document" ~enc:(fun _ -> "site.standard.document") 73 - |> Jsont.Object.mem "site" Jsont.string ~enc:(fun r -> r.site) 74 - |> Jsont.Object.opt_mem "path" Jsont.string ~enc:(fun r -> r.path) 75 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 73 + |> Jsont.Object.opt_mem "bskyPostRef" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.bsky_post_ref) 74 + |> Jsont.Object.opt_mem "content" Jsont.json ~enc:(fun r -> r.content) 75 + |> Jsont.Object.opt_mem "coverImage" Atp.Blob_ref.jsont ~enc:(fun r -> r.cover_image) 76 76 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 77 - |> Jsont.Object.opt_mem "coverImage" Atp.Blob_ref.jsont ~enc:(fun r -> r.cover_image) 78 - |> Jsont.Object.opt_mem "content" Jsont.json ~enc:(fun r -> r.content) 79 - |> Jsont.Object.opt_mem "textContent" Jsont.string ~enc:(fun r -> r.text_content) 80 - |> Jsont.Object.opt_mem "bskyPostRef" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.bsky_post_ref) 77 + |> Jsont.Object.opt_mem "path" Jsont.string ~enc:(fun r -> r.path) 78 + |> Jsont.Object.mem "publishedAt" Jsont.string ~enc:(fun r -> r.published_at) 79 + |> Jsont.Object.mem "site" Jsont.string ~enc:(fun r -> r.site) 81 80 |> Jsont.Object.opt_mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 82 - |> Jsont.Object.mem "publishedAt" Jsont.string ~enc:(fun r -> r.published_at) 81 + |> Jsont.Object.opt_mem "textContent" Jsont.string ~enc:(fun r -> r.text_content) 82 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 83 83 |> Jsont.Object.opt_mem "updatedAt" Jsont.string ~enc:(fun r -> r.updated_at) 84 84 |> Jsont.Object.finish 85 85 86 86 end 87 87 module Theme = struct 88 88 module Color = struct 89 - type rgb = { 90 - r : int; 89 + type rgba = { 90 + a : int; 91 + b : int; 91 92 g : int; 92 - b : int; 93 + r : int; 93 94 } 94 95 95 - let rgb_jsont = 96 - Jsont.Object.map ~kind:"Rgb" 97 - (fun _typ r g b -> { r; g; b }) 98 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.color#rgb" ~enc:(fun _ -> "site.standard.theme.color#rgb") 99 - |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 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) 100 102 |> Jsont.Object.mem "g" Jsont.int ~enc:(fun r -> r.g) 101 - |> Jsont.Object.mem "b" Jsont.int ~enc:(fun r -> r.b) 103 + |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 102 104 |> Jsont.Object.finish 103 105 104 - type rgba = { 105 - r : int; 106 - g : int; 106 + type rgb = { 107 107 b : int; 108 - a : int; 108 + g : int; 109 + r : int; 109 110 } 110 111 111 - let rgba_jsont = 112 - Jsont.Object.map ~kind:"Rgba" 113 - (fun _typ r g b a -> { r; g; b; a }) 114 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.theme.color#rgba" ~enc:(fun _ -> "site.standard.theme.color#rgba") 115 - |> Jsont.Object.mem "r" Jsont.int ~enc:(fun r -> r.r) 116 - |> Jsont.Object.mem "g" Jsont.int ~enc:(fun r -> r.g) 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") 117 116 |> Jsont.Object.mem "b" Jsont.int ~enc:(fun r -> r.b) 118 - |> Jsont.Object.mem "a" Jsont.int ~enc:(fun r -> r.a) 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 119 |> Jsont.Object.finish 120 120 121 121 end 122 122 module Basic = struct 123 123 type main = { 124 + accent : Color.rgb; 125 + accent_foreground : Color.rgb; 124 126 background : Color.rgb; 125 127 foreground : Color.rgb; 126 - accent : Color.rgb; 127 - accent_foreground : Color.rgb; 128 128 } 129 129 130 130 let main_jsont = 131 131 Jsont.Object.map ~kind:"Main" 132 - (fun _typ background foreground accent accent_foreground -> { background; foreground; accent; accent_foreground }) 132 + (fun _typ accent accent_foreground background foreground -> { accent; accent_foreground; background; foreground }) 133 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) 134 136 |> Jsont.Object.mem "background" Color.rgb_jsont ~enc:(fun r -> r.background) 135 137 |> Jsont.Object.mem "foreground" Color.rgb_jsont ~enc:(fun r -> r.foreground) 136 - |> Jsont.Object.mem "accent" Color.rgb_jsont ~enc:(fun r -> r.accent) 137 - |> Jsont.Object.mem "accentForeground" Color.rgb_jsont ~enc:(fun r -> r.accent_foreground) 138 138 |> Jsont.Object.finish 139 139 140 140 end ··· 152 152 |> Jsont.Object.finish 153 153 154 154 type main = { 155 - url : string; 155 + basic_theme : Theme.Basic.main option; 156 + description : string option; 156 157 icon : Atp.Blob_ref.t option; 157 158 name : string; 158 - description : string option; 159 - basic_theme : Theme.Basic.main option; 160 159 preferences : preferences option; 160 + url : string; 161 161 } 162 162 163 163 let main_jsont = 164 164 Jsont.Object.map ~kind:"Main" 165 - (fun _typ url icon name description basic_theme preferences -> { url; icon; name; description; basic_theme; preferences }) 165 + (fun _typ basic_theme description icon name preferences url -> { basic_theme; description; icon; name; preferences; url }) 166 166 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.publication" ~enc:(fun _ -> "site.standard.publication") 167 - |> Jsont.Object.mem "url" Jsont.string ~enc:(fun r -> r.url) 167 + |> Jsont.Object.opt_mem "basicTheme" Theme.Basic.main_jsont ~enc:(fun r -> r.basic_theme) 168 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 168 169 |> Jsont.Object.opt_mem "icon" Atp.Blob_ref.jsont ~enc:(fun r -> r.icon) 169 170 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 170 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 171 - |> Jsont.Object.opt_mem "basicTheme" Theme.Basic.main_jsont ~enc:(fun r -> r.basic_theme) 172 171 |> Jsont.Object.opt_mem "preferences" preferences_jsont ~enc:(fun r -> r.preferences) 172 + |> Jsont.Object.mem "url" Jsont.string ~enc:(fun r -> r.url) 173 173 |> Jsont.Object.finish 174 174 175 175 end
+25 -25
lexicons/standard-site/atp_lexicon_standard_site.mli
··· 17 17 (** A URI with a content-hash fingerprint. *) 18 18 19 19 type main = { 20 - uri : string; 21 20 cid : string; 21 + uri : string; 22 22 } 23 23 24 24 (** Jsont codec for {!type:main}. *) ··· 47 47 (** A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently. *) 48 48 49 49 type main = { 50 - site : string; (** Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes. *) 50 + bsky_post_ref : Com.Atproto.Repo.StrongRef.main option; (** Strong reference to a Bluesky post. Useful to keep track of comments off-platform. *) 51 + content : Jsont.json option; (** Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats. *) 52 + cover_image : Atp.Blob_ref.t option; (** Image to used for thumbnail or cover image. Less than 1MB is size. *) 53 + description : string option; (** A brief description or excerpt from the document. *) 51 54 path : string option; (** Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash. *) 55 + published_at : string; (** Timestamp of the documents publish time. *) 56 + site : string; (** Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes. *) 57 + tags : string list option; (** Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags. *) 58 + text_content : string option; (** Plaintext representation of the documents contents. Should not contain markdown or other formatting. *) 52 59 title : string; (** Title of the document. *) 53 - description : string option; (** A brief description or excerpt from the document. *) 54 - cover_image : Atp.Blob_ref.t option; (** Image to used for thumbnail or cover image. Less than 1MB is size. *) 55 - content : Jsont.json option; (** Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats. *) 56 - text_content : string option; (** Plaintext representation of the documents contents. Should not contain markdown or other formatting. *) 57 - bsky_post_ref : Com.Atproto.Repo.StrongRef.main option; (** Strong reference to a Bluesky post. Useful to keep track of comments off-platform. *) 58 - tags : string list option; (** Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags. *) 59 - published_at : string; (** Timestamp of the documents publish time. *) 60 60 updated_at : string option; (** Timestamp of the documents last edit. *) 61 61 } 62 62 ··· 67 67 module Theme : sig 68 68 module Color : sig 69 69 70 - type rgb = { 70 + type rgba = { 71 + a : int; 72 + b : int; 73 + g : int; 71 74 r : int; 72 - g : int; 73 - b : int; 74 75 } 75 76 76 - (** Jsont codec for {!type:rgb}. *) 77 - val rgb_jsont : rgb Jsont.t 77 + (** Jsont codec for {!type:rgba}. *) 78 + val rgba_jsont : rgba Jsont.t 78 79 79 80 80 - type rgba = { 81 + type rgb = { 82 + b : int; 83 + g : int; 81 84 r : int; 82 - g : int; 83 - b : int; 84 - a : int; 85 85 } 86 86 87 - (** Jsont codec for {!type:rgba}. *) 88 - val rgba_jsont : rgba Jsont.t 87 + (** Jsont codec for {!type:rgb}. *) 88 + val rgb_jsont : rgb Jsont.t 89 89 90 90 end 91 91 module Basic : sig 92 92 (** A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications. *) 93 93 94 94 type main = { 95 + accent : Color.rgb; (** Color used for links and button backgrounds. *) 96 + accent_foreground : Color.rgb; (** Color used for button text. *) 95 97 background : Color.rgb; (** Color used for content background. *) 96 98 foreground : Color.rgb; (** Color used for content text. *) 97 - accent : Color.rgb; (** Color used for links and button backgrounds. *) 98 - accent_foreground : Color.rgb; (** Color used for button text. *) 99 99 } 100 100 101 101 (** Jsont codec for {!type:main}. *) ··· 116 116 (** A publication record representing a blog, website, or content platform. Publications serve as containers for documents and define the overall branding and settings. *) 117 117 118 118 type main = { 119 - url : string; (** Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path. *) 119 + basic_theme : Theme.Basic.main option; (** Simplified publication theme for tools and apps to utilize when displaying content. *) 120 + description : string option; (** Brief description of the publication. *) 120 121 icon : Atp.Blob_ref.t option; (** Square image to identify the publication. Should be at least 256x256. *) 121 122 name : string; (** Name of the publication. *) 122 - description : string option; (** Brief description of the publication. *) 123 - basic_theme : Theme.Basic.main option; (** Simplified publication theme for tools and apps to utilize when displaying content. *) 124 123 preferences : preferences option; (** Object containing platform specific preferences (with a few shared properties). *) 124 + url : string; (** Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path. *) 125 125 } 126 126 127 127 (** Jsont codec for {!type:main}. *)
+403 -403
lexicons/tangled/atp_lexicon_tangled.ml
··· 29 29 30 30 module Member = struct 31 31 type main = { 32 - subject : string; 33 - instance : string; 34 32 created_at : string; 33 + instance : string; 34 + subject : string; 35 35 } 36 36 37 37 let main_jsont = 38 38 Jsont.Object.map ~kind:"Main" 39 - (fun _typ subject instance created_at -> { subject; instance; created_at }) 39 + (fun _typ created_at instance subject -> { created_at; instance; subject }) 40 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) 41 43 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 42 - |> Jsont.Object.mem "instance" Jsont.string ~enc:(fun r -> r.instance) 43 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 44 44 |> Jsont.Object.finish 45 45 46 46 end ··· 61 61 |> Jsont.Object.finish 62 62 63 63 type individual_email_commit_count = { 64 - email : string; 65 64 count : int; 65 + email : string; 66 66 } 67 67 68 68 let individual_email_commit_count_jsont = 69 69 Jsont.Object.map ~kind:"Individual_email_commit_count" 70 - (fun _typ email count -> { email; count }) 70 + (fun _typ count email -> { count; email }) 71 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) 72 73 |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 73 - |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 74 74 |> Jsont.Object.finish 75 75 76 76 type lang_breakdown = { ··· 96 96 |> Jsont.Object.finish 97 97 98 98 type meta = { 99 + commit_count : commit_count_breakdown; 99 100 is_default_ref : bool; 100 101 lang_breakdown : lang_breakdown option; 101 - commit_count : commit_count_breakdown; 102 102 } 103 103 104 104 let meta_jsont = 105 105 Jsont.Object.map ~kind:"Meta" 106 - (fun _typ is_default_ref lang_breakdown commit_count -> { is_default_ref; lang_breakdown; commit_count }) 106 + (fun _typ commit_count is_default_ref lang_breakdown -> { commit_count; is_default_ref; lang_breakdown }) 107 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) 108 109 |> Jsont.Object.mem "isDefaultRef" Jsont.bool ~enc:(fun r -> r.is_default_ref) 109 110 |> Jsont.Object.opt_mem "langBreakdown" lang_breakdown_jsont ~enc:(fun r -> r.lang_breakdown) 110 - |> Jsont.Object.mem "commitCount" commit_count_breakdown_jsont ~enc:(fun r -> r.commit_count) 111 111 |> Jsont.Object.finish 112 112 113 113 type main = { 114 + committer_did : string; 115 + meta : meta; 116 + new_sha : string; 117 + old_sha : string; 114 118 ref_ : string; 115 - committer_did : string; 116 119 repo_did : string; 117 120 repo_name : string; 118 - old_sha : string; 119 - new_sha : string; 120 - meta : meta; 121 121 } 122 122 123 123 let main_jsont = 124 124 Jsont.Object.map ~kind:"Main" 125 - (fun _typ ref_ committer_did repo_did repo_name old_sha new_sha meta -> { ref_; committer_did; repo_did; repo_name; old_sha; new_sha; meta }) 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 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) 127 131 |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 128 - |> Jsont.Object.mem "committerDid" Jsont.string ~enc:(fun r -> r.committer_did) 129 132 |> Jsont.Object.mem "repoDid" Jsont.string ~enc:(fun r -> r.repo_did) 130 133 |> Jsont.Object.mem "repoName" Jsont.string ~enc:(fun r -> r.repo_name) 131 - |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 132 - |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 133 - |> Jsont.Object.mem "meta" meta_jsont ~enc:(fun r -> r.meta) 134 134 |> Jsont.Object.finish 135 135 136 136 end ··· 138 138 module Actor = struct 139 139 module Profile = struct 140 140 type main = { 141 + bluesky : bool; 141 142 description : string option; 142 143 links : string list option; 143 - stats : string list option; 144 - bluesky : bool; 145 144 location : string option; 146 145 pinned_repositories : string list option; 147 146 pronouns : string option; 147 + stats : string list option; 148 148 } 149 149 150 150 let main_jsont = 151 151 Jsont.Object.map ~kind:"Main" 152 - (fun _typ description links stats bluesky location pinned_repositories pronouns -> { description; links; stats; bluesky; location; pinned_repositories; pronouns }) 152 + (fun _typ bluesky description links location pinned_repositories pronouns stats -> { bluesky; description; links; location; pinned_repositories; pronouns; stats }) 153 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) 154 155 |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 155 156 |> Jsont.Object.opt_mem "links" (Jsont.list Jsont.string) ~enc:(fun r -> r.links) 156 - |> Jsont.Object.opt_mem "stats" (Jsont.list Jsont.string) ~enc:(fun r -> r.stats) 157 - |> Jsont.Object.mem "bluesky" Jsont.bool ~enc:(fun r -> r.bluesky) 158 157 |> Jsont.Object.opt_mem "location" Jsont.string ~enc:(fun r -> r.location) 159 158 |> Jsont.Object.opt_mem "pinnedRepositories" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned_repositories) 160 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 161 |> Jsont.Object.finish 162 162 163 163 end 164 164 end 165 165 module String = struct 166 166 type main = { 167 - filename : string; 168 - description : string; 167 + contents : string; 169 168 created_at : string; 170 - contents : string; 169 + description : string; 170 + filename : string; 171 171 } 172 172 173 173 let main_jsont = 174 174 Jsont.Object.map ~kind:"Main" 175 - (fun _typ filename description created_at contents -> { filename; description; created_at; contents }) 175 + (fun _typ contents created_at description filename -> { contents; created_at; description; filename }) 176 176 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.string" ~enc:(fun _ -> "sh.tangled.string") 177 - |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 178 - |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 179 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 180 177 |> Jsont.Object.mem "contents" Jsont.string ~enc:(fun r -> r.contents) 178 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 179 + |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 180 + |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 181 181 |> Jsont.Object.finish 182 182 183 183 end 184 184 module Feed = struct 185 185 module Star = struct 186 186 type main = { 187 - subject : string; 188 187 created_at : string; 188 + subject : string; 189 189 } 190 190 191 191 let main_jsont = 192 192 Jsont.Object.map ~kind:"Main" 193 - (fun _typ subject created_at -> { subject; created_at }) 193 + (fun _typ created_at subject -> { created_at; subject }) 194 194 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.star" ~enc:(fun _ -> "sh.tangled.feed.star") 195 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 195 196 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 196 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 197 197 |> Jsont.Object.finish 198 198 199 199 end 200 200 module Reaction = struct 201 201 type main = { 202 - subject : string; 203 - reaction : string; 204 202 created_at : string; 203 + reaction : string; 204 + subject : string; 205 205 } 206 206 207 207 let main_jsont = 208 208 Jsont.Object.map ~kind:"Main" 209 - (fun _typ subject reaction created_at -> { subject; reaction; created_at }) 209 + (fun _typ created_at reaction subject -> { created_at; reaction; subject }) 210 210 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.reaction" ~enc:(fun _ -> "sh.tangled.feed.reaction") 211 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 212 - |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 213 211 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 212 + |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 213 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 214 214 |> Jsont.Object.finish 215 215 216 216 end 217 217 end 218 218 module Repo = struct 219 219 type main = { 220 + created_at : string; 221 + description : string option; 222 + knot : string; 223 + labels : string list option; 220 224 name : string; 221 - knot : string; 225 + source : string option; 222 226 spindle : string option; 223 - description : string option; 227 + topics : string list option; 224 228 website : string option; 225 - topics : string list option; 226 - source : string option; 227 - labels : string list option; 228 - created_at : string; 229 229 } 230 230 231 231 let main_jsont = 232 232 Jsont.Object.map ~kind:"Main" 233 - (fun _typ name knot spindle description website topics source labels created_at -> { name; knot; spindle; description; website; topics; source; labels; created_at }) 233 + (fun _typ created_at description knot labels name source spindle topics website -> { created_at; description; knot; labels; name; source; spindle; topics; website }) 234 234 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo" ~enc:(fun _ -> "sh.tangled.repo") 235 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 235 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 236 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 236 237 |> Jsont.Object.mem "knot" Jsont.string ~enc:(fun r -> r.knot) 238 + |> Jsont.Object.opt_mem "labels" (Jsont.list Jsont.string) ~enc:(fun r -> r.labels) 239 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 240 + |> Jsont.Object.opt_mem "source" Jsont.string ~enc:(fun r -> r.source) 237 241 |> Jsont.Object.opt_mem "spindle" Jsont.string ~enc:(fun r -> r.spindle) 238 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 239 - |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 240 242 |> Jsont.Object.opt_mem "topics" (Jsont.list Jsont.string) ~enc:(fun r -> r.topics) 241 - |> Jsont.Object.opt_mem "source" Jsont.string ~enc:(fun r -> r.source) 242 - |> Jsont.Object.opt_mem "labels" (Jsont.list Jsont.string) ~enc:(fun r -> r.labels) 243 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 243 + |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 244 244 |> Jsont.Object.finish 245 245 246 246 module Artifact = struct 247 247 type main = { 248 + artifact : Atp.Blob_ref.t; 249 + created_at : string; 248 250 name : string; 249 251 repo : string; 250 252 tag : string; 251 - created_at : string; 252 - artifact : Atp.Blob_ref.t; 253 253 } 254 254 255 255 let main_jsont = 256 256 Jsont.Object.map ~kind:"Main" 257 - (fun _typ name repo tag created_at artifact -> { name; repo; tag; created_at; artifact }) 257 + (fun _typ artifact created_at name repo tag -> { artifact; created_at; name; repo; tag }) 258 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) 259 261 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 260 262 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 261 263 |> Jsont.Object.mem "tag" Jsont.binary_string ~enc:(fun r -> r.tag) 262 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 263 - |> Jsont.Object.mem "artifact" Atp.Blob_ref.jsont ~enc:(fun r -> r.artifact) 264 264 |> Jsont.Object.finish 265 265 266 266 end ··· 279 279 |> Jsont.Object.finish 280 280 281 281 type input = { 282 + branch : string; 282 283 did : string; 283 284 name : string; 284 285 patch : string; 285 - branch : string; 286 286 } 287 287 288 288 let input_jsont = 289 289 Jsont.Object.map ~kind:"Input" 290 - (fun _typ did name patch branch -> { did; name; patch; branch }) 290 + (fun _typ branch did name patch -> { branch; did; name; patch }) 291 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) 292 293 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 293 294 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 294 295 |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 295 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 296 296 |> Jsont.Object.finish 297 297 298 298 type output = { 299 - is_conflicted : bool; 300 299 conflicts : conflict_info list option; 301 - message : string option; 302 300 error : string option; 301 + is_conflicted : bool; 302 + message : string option; 303 303 } 304 304 305 305 let output_jsont = 306 306 Jsont.Object.map ~kind:"Output" 307 - (fun _typ is_conflicted conflicts message error -> { is_conflicted; conflicts; message; error }) 307 + (fun _typ conflicts error is_conflicted message -> { conflicts; error; is_conflicted; message }) 308 308 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#output" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#output") 309 - |> Jsont.Object.mem "is_conflicted" Jsont.bool ~enc:(fun r -> r.is_conflicted) 310 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) 311 312 |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 312 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 313 313 |> Jsont.Object.finish 314 314 315 315 end 316 316 module Tree = struct 317 317 type readme = { 318 - filename : string; 319 318 contents : string; 319 + filename : string; 320 320 } 321 321 322 322 let readme_jsont = 323 323 Jsont.Object.map ~kind:"Readme" 324 - (fun _typ filename contents -> { filename; contents }) 324 + (fun _typ contents filename -> { contents; filename }) 325 325 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#readme" ~enc:(fun _ -> "sh.tangled.repo.tree#readme") 326 - |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 327 326 |> Jsont.Object.mem "contents" Jsont.string ~enc:(fun r -> r.contents) 327 + |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 328 328 |> Jsont.Object.finish 329 329 330 330 type last_commit = { ··· 343 343 |> Jsont.Object.finish 344 344 345 345 type tree_entry = { 346 + last_commit : last_commit option; 347 + mode : string; 346 348 name : string; 347 - mode : string; 348 349 size : int; 349 - last_commit : last_commit option; 350 350 } 351 351 352 352 let tree_entry_jsont = 353 353 Jsont.Object.map ~kind:"Tree_entry" 354 - (fun _typ name mode size last_commit -> { name; mode; size; last_commit }) 354 + (fun _typ last_commit mode name size -> { last_commit; mode; name; size }) 355 355 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#treeEntry" ~enc:(fun _ -> "sh.tangled.repo.tree#treeEntry") 356 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 356 + |> Jsont.Object.opt_mem "last_commit" last_commit_jsont ~enc:(fun r -> r.last_commit) 357 357 |> Jsont.Object.mem "mode" Jsont.string ~enc:(fun r -> r.mode) 358 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 358 359 |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 359 - |> Jsont.Object.opt_mem "last_commit" last_commit_jsont ~enc:(fun r -> r.last_commit) 360 360 |> Jsont.Object.finish 361 361 362 362 type params = { 363 - repo : string; 363 + path : string option; 364 364 ref_ : string; 365 - path : string option; 365 + repo : string; 366 366 } 367 367 368 368 let params_jsont = 369 369 Jsont.Object.map ~kind:"Params" 370 - (fun repo ref_ path -> { 370 + (fun path ref_ repo -> { 371 + path; 372 + ref_; 371 373 repo; 372 - ref_; 373 - path; 374 374 }) 375 - |> Jsont.Object.mem "repo" Jsont.string 376 - ~enc:(fun r -> r.repo) 375 + |> Jsont.Object.opt_mem "path" Jsont.string 376 + ~enc:(fun r -> r.path) 377 377 |> Jsont.Object.mem "ref" Jsont.string 378 378 ~enc:(fun r -> r.ref_) 379 - |> Jsont.Object.opt_mem "path" Jsont.string 380 - ~enc:(fun r -> r.path) 379 + |> Jsont.Object.mem "repo" Jsont.string 380 + ~enc:(fun r -> r.repo) 381 381 |> Jsont.Object.finish 382 382 383 383 type output = { 384 - ref_ : string; 385 - parent : string option; 386 384 dotdot : string option; 385 + files : tree_entry list; 386 + parent : string option; 387 387 readme : readme option; 388 - files : tree_entry list; 388 + ref_ : string; 389 389 } 390 390 391 391 let output_jsont = 392 392 Jsont.Object.map ~kind:"Output" 393 - (fun _typ ref_ parent dotdot readme files -> { ref_; parent; dotdot; readme; files }) 393 + (fun _typ dotdot files parent readme ref_ -> { dotdot; files; parent; readme; ref_ }) 394 394 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.tree#output" ~enc:(fun _ -> "sh.tangled.repo.tree#output") 395 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 396 - |> Jsont.Object.opt_mem "parent" Jsont.string ~enc:(fun r -> r.parent) 397 395 |> Jsont.Object.opt_mem "dotdot" Jsont.string ~enc:(fun r -> r.dotdot) 398 - |> Jsont.Object.opt_mem "readme" readme_jsont ~enc:(fun r -> r.readme) 399 396 |> Jsont.Object.mem "files" (Jsont.list tree_entry_jsont) ~enc:(fun r -> r.files) 397 + |> Jsont.Object.opt_mem "parent" Jsont.string ~enc:(fun r -> r.parent) 398 + |> Jsont.Object.opt_mem "readme" readme_jsont ~enc:(fun r -> r.readme) 399 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 400 400 |> Jsont.Object.finish 401 401 402 402 end 403 403 module SetDefaultBranch = struct 404 404 type input = { 405 - repo : string; 406 405 default_branch : string; 406 + repo : string; 407 407 } 408 408 409 409 let input_jsont = 410 410 Jsont.Object.map ~kind:"Input" 411 - (fun _typ repo default_branch -> { repo; default_branch }) 411 + (fun _typ default_branch repo -> { default_branch; repo }) 412 412 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.setDefaultBranch#input" ~enc:(fun _ -> "sh.tangled.repo.setDefaultBranch#input") 413 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 414 413 |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 414 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 415 415 |> Jsont.Object.finish 416 416 417 417 end ··· 443 443 end 444 444 module Merge = struct 445 445 type input = { 446 + author_email : string option; 447 + author_name : string option; 448 + branch : string; 449 + commit_body : string option; 450 + commit_message : string option; 446 451 did : string; 447 452 name : string; 448 453 patch : string; 449 - branch : string; 450 - author_name : string option; 451 - author_email : string option; 452 - commit_body : string option; 453 - commit_message : string option; 454 454 } 455 455 456 456 let input_jsont = 457 457 Jsont.Object.map ~kind:"Input" 458 - (fun _typ did name patch branch author_name author_email commit_body commit_message -> { did; name; patch; branch; author_name; author_email; commit_body; commit_message }) 458 + (fun _typ author_email author_name branch commit_body commit_message did name patch -> { author_email; author_name; branch; commit_body; commit_message; did; name; patch }) 459 459 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.merge#input" ~enc:(fun _ -> "sh.tangled.repo.merge#input") 460 + |> Jsont.Object.opt_mem "authorEmail" Jsont.string ~enc:(fun r -> r.author_email) 461 + |> Jsont.Object.opt_mem "authorName" Jsont.string ~enc:(fun r -> r.author_name) 462 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 463 + |> Jsont.Object.opt_mem "commitBody" Jsont.string ~enc:(fun r -> r.commit_body) 464 + |> Jsont.Object.opt_mem "commitMessage" Jsont.string ~enc:(fun r -> r.commit_message) 460 465 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 461 466 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 462 467 |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 463 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 464 - |> Jsont.Object.opt_mem "authorName" Jsont.string ~enc:(fun r -> r.author_name) 465 - |> Jsont.Object.opt_mem "authorEmail" Jsont.string ~enc:(fun r -> r.author_email) 466 - |> Jsont.Object.opt_mem "commitBody" Jsont.string ~enc:(fun r -> r.commit_body) 467 - |> Jsont.Object.opt_mem "commitMessage" Jsont.string ~enc:(fun r -> r.commit_message) 468 468 |> Jsont.Object.finish 469 469 470 470 end 471 471 module Tags = struct 472 472 type params = { 473 - repo : string; 473 + cursor : string option; 474 474 limit : int option; 475 - cursor : string option; 475 + repo : string; 476 476 } 477 477 478 478 let params_jsont = 479 479 Jsont.Object.map ~kind:"Params" 480 - (fun repo limit cursor -> { 481 - repo; 482 - limit; 480 + (fun cursor limit repo -> { 483 481 cursor; 482 + limit; 483 + repo; 484 484 }) 485 + |> Jsont.Object.opt_mem "cursor" Jsont.string 486 + ~enc:(fun r -> r.cursor) 487 + |> Jsont.Object.opt_mem "limit" Jsont.int 488 + ~enc:(fun r -> r.limit) 485 489 |> Jsont.Object.mem "repo" Jsont.string 486 490 ~enc:(fun r -> r.repo) 487 - |> Jsont.Object.opt_mem "limit" Jsont.int 488 - ~enc:(fun r -> r.limit) 489 - |> Jsont.Object.opt_mem "cursor" Jsont.string 490 - ~enc:(fun r -> r.cursor) 491 491 |> Jsont.Object.finish 492 492 493 493 type output = unit ··· 496 496 end 497 497 module Collaborator = struct 498 498 type main = { 499 + created_at : string; 500 + repo : string; 499 501 subject : string; 500 - repo : string; 501 - created_at : string; 502 502 } 503 503 504 504 let main_jsont = 505 505 Jsont.Object.map ~kind:"Main" 506 - (fun _typ subject repo created_at -> { subject; repo; created_at }) 506 + (fun _typ created_at repo subject -> { created_at; repo; subject }) 507 507 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.collaborator" ~enc:(fun _ -> "sh.tangled.repo.collaborator") 508 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 509 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 508 510 |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 509 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 510 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 511 511 |> Jsont.Object.finish 512 512 513 513 end 514 514 module Branches = struct 515 515 type params = { 516 - repo : string; 517 - limit : int option; 518 516 cursor : string option; 517 + limit : int option; 518 + repo : string; 519 519 } 520 520 521 521 let params_jsont = 522 522 Jsont.Object.map ~kind:"Params" 523 - (fun repo limit cursor -> { 524 - repo; 525 - limit; 523 + (fun cursor limit repo -> { 526 524 cursor; 525 + limit; 526 + repo; 527 527 }) 528 - |> Jsont.Object.mem "repo" Jsont.string 529 - ~enc:(fun r -> r.repo) 528 + |> Jsont.Object.opt_mem "cursor" Jsont.string 529 + ~enc:(fun r -> r.cursor) 530 530 |> Jsont.Object.opt_mem "limit" Jsont.int 531 531 ~enc:(fun r -> r.limit) 532 - |> Jsont.Object.opt_mem "cursor" Jsont.string 533 - ~enc:(fun r -> r.cursor) 532 + |> Jsont.Object.mem "repo" Jsont.string 533 + ~enc:(fun r -> r.repo) 534 534 |> Jsont.Object.finish 535 535 536 536 type output = unit ··· 539 539 end 540 540 module GetDefaultBranch = struct 541 541 type signature = { 542 - name : string; 543 542 email : string; 543 + name : string; 544 544 when_ : string; 545 545 } 546 546 547 547 let signature_jsont = 548 548 Jsont.Object.map ~kind:"Signature" 549 - (fun _typ name email when_ -> { name; email; when_ }) 549 + (fun _typ email name when_ -> { email; name; when_ }) 550 550 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.getDefaultBranch#signature" ~enc:(fun _ -> "sh.tangled.repo.getDefaultBranch#signature") 551 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 551 552 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 552 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 553 553 |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 554 554 |> Jsont.Object.finish 555 555 ··· 567 567 |> Jsont.Object.finish 568 568 569 569 type output = { 570 - name : string; 570 + author : signature option; 571 571 hash : string; 572 + message : string option; 573 + name : string; 572 574 short_hash : string option; 573 575 when_ : string; 574 - message : string option; 575 - author : signature option; 576 576 } 577 577 578 578 let output_jsont = 579 579 Jsont.Object.map ~kind:"Output" 580 - (fun _typ name hash short_hash when_ message author -> { name; hash; short_hash; when_; message; author }) 580 + (fun _typ author hash message name short_hash when_ -> { author; hash; message; name; short_hash; when_ }) 581 581 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.getDefaultBranch#output" ~enc:(fun _ -> "sh.tangled.repo.getDefaultBranch#output") 582 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 582 + |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 583 583 |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 584 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 585 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 584 586 |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 585 587 |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 586 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 587 - |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 588 588 |> Jsont.Object.finish 589 589 590 590 end 591 591 module Create = struct 592 592 type input = { 593 - rkey : string; 594 593 default_branch : string option; 594 + rkey : string; 595 595 source : string option; 596 596 } 597 597 598 598 let input_jsont = 599 599 Jsont.Object.map ~kind:"Input" 600 - (fun _typ rkey default_branch source -> { rkey; default_branch; source }) 600 + (fun _typ default_branch rkey source -> { default_branch; rkey; source }) 601 601 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.create#input" ~enc:(fun _ -> "sh.tangled.repo.create#input") 602 - |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 603 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 604 |> Jsont.Object.opt_mem "source" Jsont.string ~enc:(fun r -> r.source) 605 605 |> Jsont.Object.finish 606 606 607 607 end 608 608 module ForkStatus = struct 609 609 type input = { 610 + branch : string; 610 611 did : string; 612 + hidden_ref : string; 611 613 name : string; 612 614 source : string; 613 - branch : string; 614 - hidden_ref : string; 615 615 } 616 616 617 617 let input_jsont = 618 618 Jsont.Object.map ~kind:"Input" 619 - (fun _typ did name source branch hidden_ref -> { did; name; source; branch; hidden_ref }) 619 + (fun _typ branch did hidden_ref name source -> { branch; did; hidden_ref; name; source }) 620 620 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkStatus#input" ~enc:(fun _ -> "sh.tangled.repo.forkStatus#input") 621 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 621 622 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 623 + |> Jsont.Object.mem "hiddenRef" Jsont.string ~enc:(fun r -> r.hidden_ref) 622 624 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 623 625 |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 624 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 625 - |> Jsont.Object.mem "hiddenRef" Jsont.string ~enc:(fun r -> r.hidden_ref) 626 626 |> Jsont.Object.finish 627 627 628 628 type output = { ··· 639 639 end 640 640 module Branch = struct 641 641 type signature = { 642 + email : string; 642 643 name : string; 643 - email : string; 644 644 when_ : string; 645 645 } 646 646 647 647 let signature_jsont = 648 648 Jsont.Object.map ~kind:"Signature" 649 - (fun _typ name email when_ -> { name; email; when_ }) 649 + (fun _typ email name when_ -> { email; name; when_ }) 650 650 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.branch#signature" ~enc:(fun _ -> "sh.tangled.repo.branch#signature") 651 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 652 651 |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 652 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 653 653 |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 654 654 |> Jsont.Object.finish 655 655 656 656 type params = { 657 - repo : string; 658 657 name : string; 658 + repo : string; 659 659 } 660 660 661 661 let params_jsont = 662 662 Jsont.Object.map ~kind:"Params" 663 - (fun repo name -> { 664 - repo; 663 + (fun name repo -> { 665 664 name; 665 + repo; 666 666 }) 667 + |> Jsont.Object.mem "name" Jsont.string 668 + ~enc:(fun r -> r.name) 667 669 |> Jsont.Object.mem "repo" Jsont.string 668 670 ~enc:(fun r -> r.repo) 669 - |> Jsont.Object.mem "name" Jsont.string 670 - ~enc:(fun r -> r.name) 671 671 |> Jsont.Object.finish 672 672 673 673 type output = { 674 + author : signature option; 675 + hash : string; 676 + is_default : bool option; 677 + message : string option; 674 678 name : string; 675 - hash : string; 676 679 short_hash : string option; 677 680 when_ : string; 678 - message : string option; 679 - author : signature option; 680 - is_default : bool option; 681 681 } 682 682 683 683 let output_jsont = 684 684 Jsont.Object.map ~kind:"Output" 685 - (fun _typ name hash short_hash when_ message author is_default -> { name; hash; short_hash; when_; message; author; is_default }) 685 + (fun _typ author hash is_default message name short_hash when_ -> { author; hash; is_default; message; name; short_hash; when_ }) 686 686 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.branch#output" ~enc:(fun _ -> "sh.tangled.repo.branch#output") 687 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 687 + |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 688 688 |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 689 + |> Jsont.Object.opt_mem "isDefault" Jsont.bool ~enc:(fun r -> r.is_default) 690 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 691 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 689 692 |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 690 693 |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 691 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 692 - |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 693 - |> Jsont.Object.opt_mem "isDefault" Jsont.bool ~enc:(fun r -> r.is_default) 694 694 |> Jsont.Object.finish 695 695 696 696 end 697 697 module DeleteBranch = struct 698 698 type input = { 699 - repo : string; 700 699 branch : string; 700 + repo : string; 701 701 } 702 702 703 703 let input_jsont = 704 704 Jsont.Object.map ~kind:"Input" 705 - (fun _typ repo branch -> { repo; branch }) 705 + (fun _typ branch repo -> { branch; repo }) 706 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 "repo" Jsont.string ~enc:(fun r -> r.repo) 708 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 709 |> Jsont.Object.finish 710 710 711 711 end 712 712 module Log = struct 713 713 type params = { 714 + cursor : string option; 715 + limit : int option; 716 + path : string option; 717 + ref_ : string; 714 718 repo : string; 715 - ref_ : string; 716 - path : string option; 717 - limit : int option; 718 - cursor : string option; 719 719 } 720 720 721 721 let params_jsont = 722 722 Jsont.Object.map ~kind:"Params" 723 - (fun repo ref_ path limit cursor -> { 724 - repo; 725 - ref_; 723 + (fun cursor limit path ref_ repo -> { 724 + cursor; 725 + limit; 726 726 path; 727 - limit; 728 - cursor; 727 + ref_; 728 + repo; 729 729 }) 730 - |> Jsont.Object.mem "repo" Jsont.string 731 - ~enc:(fun r -> r.repo) 732 - |> Jsont.Object.mem "ref" Jsont.string 733 - ~enc:(fun r -> r.ref_) 734 - |> Jsont.Object.opt_mem "path" Jsont.string 735 - ~enc:(fun r -> r.path) 730 + |> Jsont.Object.opt_mem "cursor" Jsont.string 731 + ~enc:(fun r -> r.cursor) 736 732 |> Jsont.Object.opt_mem "limit" Jsont.int 737 733 ~enc:(fun r -> r.limit) 738 - |> Jsont.Object.opt_mem "cursor" Jsont.string 739 - ~enc:(fun r -> r.cursor) 734 + |> Jsont.Object.opt_mem "path" Jsont.string 735 + ~enc:(fun r -> r.path) 736 + |> Jsont.Object.mem "ref" Jsont.string 737 + ~enc:(fun r -> r.ref_) 738 + |> Jsont.Object.mem "repo" Jsont.string 739 + ~enc:(fun r -> r.repo) 740 740 |> Jsont.Object.finish 741 741 742 742 type output = unit ··· 744 744 745 745 end 746 746 module Blob = struct 747 - type signature = { 748 - name : string; 749 - email : string; 750 - when_ : string; 751 - } 752 - 753 - let signature_jsont = 754 - Jsont.Object.map ~kind:"Signature" 755 - (fun _typ name email when_ -> { name; email; when_ }) 756 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.blob#signature" ~enc:(fun _ -> "sh.tangled.repo.blob#signature") 757 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 758 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 759 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 760 - |> Jsont.Object.finish 761 - 762 747 type submodule = { 748 + branch : string option; 763 749 name : string; 764 750 url : string; 765 - branch : string option; 766 751 } 767 752 768 753 let submodule_jsont = 769 754 Jsont.Object.map ~kind:"Submodule" 770 - (fun _typ name url branch -> { name; url; branch }) 755 + (fun _typ branch name url -> { branch; name; url }) 771 756 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.blob#submodule" ~enc:(fun _ -> "sh.tangled.repo.blob#submodule") 757 + |> Jsont.Object.opt_mem "branch" Jsont.string ~enc:(fun r -> r.branch) 772 758 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 773 759 |> Jsont.Object.mem "url" Jsont.string ~enc:(fun r -> r.url) 774 - |> Jsont.Object.opt_mem "branch" Jsont.string ~enc:(fun r -> r.branch) 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 775 |> Jsont.Object.finish 776 776 777 777 type last_commit = { 778 + author : signature option; 778 779 hash : string; 779 - short_hash : string option; 780 780 message : string; 781 - author : signature option; 781 + short_hash : string option; 782 782 when_ : string; 783 783 } 784 784 785 785 let last_commit_jsont = 786 786 Jsont.Object.map ~kind:"Last_commit" 787 - (fun _typ hash short_hash message author when_ -> { hash; short_hash; message; author; when_ }) 787 + (fun _typ author hash message short_hash when_ -> { author; hash; message; short_hash; when_ }) 788 788 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.blob#lastCommit" ~enc:(fun _ -> "sh.tangled.repo.blob#lastCommit") 789 + |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 789 790 |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 790 - |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 791 791 |> Jsont.Object.mem "message" Jsont.string ~enc:(fun r -> r.message) 792 - |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 792 + |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 793 793 |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 794 794 |> Jsont.Object.finish 795 795 796 796 type params = { 797 - repo : string; 798 - ref_ : string; 799 797 path : string; 800 798 raw : bool option; 799 + ref_ : string; 800 + repo : string; 801 801 } 802 802 803 803 let params_jsont = 804 804 Jsont.Object.map ~kind:"Params" 805 - (fun repo ref_ path raw -> { 806 - repo; 807 - ref_; 805 + (fun path raw ref_ repo -> { 808 806 path; 809 807 raw; 808 + ref_; 809 + repo; 810 810 }) 811 - |> Jsont.Object.mem "repo" Jsont.string 812 - ~enc:(fun r -> r.repo) 813 - |> Jsont.Object.mem "ref" Jsont.string 814 - ~enc:(fun r -> r.ref_) 815 811 |> Jsont.Object.mem "path" Jsont.string 816 812 ~enc:(fun r -> r.path) 817 813 |> Jsont.Object.opt_mem "raw" Jsont.bool 818 814 ~enc:(fun r -> r.raw) 815 + |> Jsont.Object.mem "ref" Jsont.string 816 + ~enc:(fun r -> r.ref_) 817 + |> Jsont.Object.mem "repo" Jsont.string 818 + ~enc:(fun r -> r.repo) 819 819 |> Jsont.Object.finish 820 820 821 821 type output = { 822 - ref_ : string; 823 - path : string; 824 822 content : string option; 825 823 encoding : string option; 826 - size : int option; 827 824 is_binary : bool option; 825 + last_commit : last_commit option; 828 826 mime_type : string option; 827 + path : string; 828 + ref_ : string; 829 + size : int option; 829 830 submodule : submodule option; 830 - last_commit : last_commit option; 831 831 } 832 832 833 833 let output_jsont = 834 834 Jsont.Object.map ~kind:"Output" 835 - (fun _typ ref_ path content encoding size is_binary mime_type submodule last_commit -> { ref_; path; content; encoding; size; is_binary; mime_type; submodule; last_commit }) 835 + (fun _typ content encoding is_binary last_commit mime_type path ref_ size submodule -> { content; encoding; is_binary; last_commit; mime_type; path; ref_; size; submodule }) 836 836 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.blob#output" ~enc:(fun _ -> "sh.tangled.repo.blob#output") 837 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 838 - |> Jsont.Object.mem "path" Jsont.string ~enc:(fun r -> r.path) 839 837 |> Jsont.Object.opt_mem "content" Jsont.string ~enc:(fun r -> r.content) 840 838 |> Jsont.Object.opt_mem "encoding" Jsont.string ~enc:(fun r -> r.encoding) 841 - |> Jsont.Object.opt_mem "size" Jsont.int ~enc:(fun r -> r.size) 842 839 |> Jsont.Object.opt_mem "isBinary" Jsont.bool ~enc:(fun r -> r.is_binary) 840 + |> Jsont.Object.opt_mem "lastCommit" last_commit_jsont ~enc:(fun r -> r.last_commit) 843 841 |> Jsont.Object.opt_mem "mimeType" Jsont.string ~enc:(fun r -> r.mime_type) 842 + |> Jsont.Object.mem "path" Jsont.string ~enc:(fun r -> r.path) 843 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 844 + |> Jsont.Object.opt_mem "size" Jsont.int ~enc:(fun r -> r.size) 844 845 |> Jsont.Object.opt_mem "submodule" submodule_jsont ~enc:(fun r -> r.submodule) 845 - |> Jsont.Object.opt_mem "lastCommit" last_commit_jsont ~enc:(fun r -> r.last_commit) 846 846 |> Jsont.Object.finish 847 847 848 848 end 849 849 module RemoveSecret = struct 850 850 type input = { 851 - repo : string; 852 851 key : string; 852 + repo : string; 853 853 } 854 854 855 855 let input_jsont = 856 856 Jsont.Object.map ~kind:"Input" 857 - (fun _typ repo key -> { repo; key }) 857 + (fun _typ key repo -> { key; repo }) 858 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 "repo" Jsont.string ~enc:(fun r -> r.repo) 860 859 |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 860 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 861 861 |> Jsont.Object.finish 862 862 863 863 end 864 864 module Languages = struct 865 865 type language = { 866 + color : string option; 867 + extensions : string list option; 868 + file_count : int option; 866 869 name : string; 867 - size : int; 868 870 percentage : int; 869 - file_count : int option; 870 - color : string option; 871 - extensions : string list option; 871 + size : int; 872 872 } 873 873 874 874 let language_jsont = 875 875 Jsont.Object.map ~kind:"Language" 876 - (fun _typ name size percentage file_count color extensions -> { name; size; percentage; file_count; color; extensions }) 876 + (fun _typ color extensions file_count name percentage size -> { color; extensions; file_count; name; percentage; size }) 877 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) 878 881 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 882 + |> Jsont.Object.mem "percentage" Jsont.int ~enc:(fun r -> r.percentage) 879 883 |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 880 - |> Jsont.Object.mem "percentage" Jsont.int ~enc:(fun r -> r.percentage) 881 - |> Jsont.Object.opt_mem "fileCount" Jsont.int ~enc:(fun r -> r.file_count) 882 - |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 883 - |> Jsont.Object.opt_mem "extensions" (Jsont.list Jsont.string) ~enc:(fun r -> r.extensions) 884 884 |> Jsont.Object.finish 885 885 886 886 type params = { 887 - repo : string; 888 887 ref_ : string option; 888 + repo : string; 889 889 } 890 890 891 891 let params_jsont = 892 892 Jsont.Object.map ~kind:"Params" 893 - (fun repo ref_ -> { 893 + (fun ref_ repo -> { 894 + ref_; 894 895 repo; 895 - ref_; 896 896 }) 897 - |> Jsont.Object.mem "repo" Jsont.string 898 - ~enc:(fun r -> r.repo) 899 897 |> Jsont.Object.opt_mem "ref" Jsont.string 900 898 ~enc:(fun r -> r.ref_) 899 + |> Jsont.Object.mem "repo" Jsont.string 900 + ~enc:(fun r -> r.repo) 901 901 |> Jsont.Object.finish 902 902 903 903 type output = { 904 - ref_ : string; 905 904 languages : language list; 905 + ref_ : string; 906 + total_files : int option; 906 907 total_size : int option; 907 - total_files : int option; 908 908 } 909 909 910 910 let output_jsont = 911 911 Jsont.Object.map ~kind:"Output" 912 - (fun _typ ref_ languages total_size total_files -> { ref_; languages; total_size; total_files }) 912 + (fun _typ languages ref_ total_files total_size -> { languages; ref_; total_files; total_size }) 913 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 "ref" Jsont.string ~enc:(fun r -> r.ref_) 915 914 |> Jsont.Object.mem "languages" (Jsont.list language_jsont) ~enc:(fun r -> r.languages) 916 - |> Jsont.Object.opt_mem "totalSize" Jsont.int ~enc:(fun r -> r.total_size) 915 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 917 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 918 |> Jsont.Object.finish 919 919 920 920 end 921 921 module Diff = struct 922 922 type params = { 923 - repo : string; 924 923 ref_ : string; 924 + repo : string; 925 925 } 926 926 927 927 let params_jsont = 928 928 Jsont.Object.map ~kind:"Params" 929 - (fun repo ref_ -> { 930 - repo; 929 + (fun ref_ repo -> { 931 930 ref_; 931 + repo; 932 932 }) 933 - |> Jsont.Object.mem "repo" Jsont.string 934 - ~enc:(fun r -> r.repo) 935 933 |> Jsont.Object.mem "ref" Jsont.string 936 934 ~enc:(fun r -> r.ref_) 935 + |> Jsont.Object.mem "repo" Jsont.string 936 + ~enc:(fun r -> r.repo) 937 937 |> Jsont.Object.finish 938 938 939 939 type output = unit ··· 942 942 end 943 943 module ForkSync = struct 944 944 type input = { 945 + branch : string; 945 946 did : string; 946 - source : string; 947 947 name : string; 948 - branch : string; 948 + source : string; 949 949 } 950 950 951 951 let input_jsont = 952 952 Jsont.Object.map ~kind:"Input" 953 - (fun _typ did source name branch -> { did; source; name; branch }) 953 + (fun _typ branch did name source -> { branch; did; name; source }) 954 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) 955 956 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 956 - |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 957 957 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 958 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 958 + |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 959 959 |> Jsont.Object.finish 960 960 961 961 end 962 962 module AddSecret = struct 963 963 type input = { 964 - repo : string; 965 964 key : string; 965 + repo : string; 966 966 value : string; 967 967 } 968 968 969 969 let input_jsont = 970 970 Jsont.Object.map ~kind:"Input" 971 - (fun _typ repo key value -> { repo; key; value }) 971 + (fun _typ key repo value -> { key; repo; value }) 972 972 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.addSecret#input" ~enc:(fun _ -> "sh.tangled.repo.addSecret#input") 973 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 973 974 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 974 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 975 975 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 976 976 |> Jsont.Object.finish 977 977 ··· 995 995 end 996 996 module ListSecrets = struct 997 997 type secret = { 998 - repo : string; 999 - key : string; 1000 998 created_at : string; 1001 999 created_by : string; 1000 + key : string; 1001 + repo : string; 1002 1002 } 1003 1003 1004 1004 let secret_jsont = 1005 1005 Jsont.Object.map ~kind:"Secret" 1006 - (fun _typ repo key created_at created_by -> { repo; key; created_at; created_by }) 1006 + (fun _typ created_at created_by key repo -> { created_at; created_by; key; repo }) 1007 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 "repo" Jsont.string ~enc:(fun r -> r.repo) 1009 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1010 1008 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1011 1009 |> Jsont.Object.mem "createdBy" Jsont.string ~enc:(fun r -> r.created_by) 1010 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1011 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1012 1012 |> Jsont.Object.finish 1013 1013 1014 1014 type params = { ··· 1038 1038 end 1039 1039 module Archive = struct 1040 1040 type params = { 1041 - repo : string; 1042 - ref_ : string; 1043 1041 format : string option; 1044 1042 prefix : string option; 1043 + ref_ : string; 1044 + repo : string; 1045 1045 } 1046 1046 1047 1047 let params_jsont = 1048 1048 Jsont.Object.map ~kind:"Params" 1049 - (fun repo ref_ format prefix -> { 1050 - repo; 1051 - ref_; 1049 + (fun format prefix ref_ repo -> { 1052 1050 format; 1053 1051 prefix; 1052 + ref_; 1053 + repo; 1054 1054 }) 1055 - |> Jsont.Object.mem "repo" Jsont.string 1056 - ~enc:(fun r -> r.repo) 1057 - |> Jsont.Object.mem "ref" Jsont.string 1058 - ~enc:(fun r -> r.ref_) 1059 1055 |> Jsont.Object.opt_mem "format" Jsont.string 1060 1056 ~enc:(fun r -> r.format) 1061 1057 |> Jsont.Object.opt_mem "prefix" Jsont.string 1062 1058 ~enc:(fun r -> r.prefix) 1059 + |> Jsont.Object.mem "ref" Jsont.string 1060 + ~enc:(fun r -> r.ref_) 1061 + |> Jsont.Object.mem "repo" Jsont.string 1062 + ~enc:(fun r -> r.repo) 1063 1063 |> Jsont.Object.finish 1064 1064 1065 1065 type output = unit ··· 1068 1068 end 1069 1069 module HiddenRef = struct 1070 1070 type input = { 1071 - repo : string; 1072 1071 fork_ref : string; 1073 1072 remote_ref : string; 1073 + repo : string; 1074 1074 } 1075 1075 1076 1076 let input_jsont = 1077 1077 Jsont.Object.map ~kind:"Input" 1078 - (fun _typ repo fork_ref remote_ref -> { repo; fork_ref; remote_ref }) 1078 + (fun _typ fork_ref remote_ref repo -> { fork_ref; remote_ref; repo }) 1079 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 "repo" Jsont.string ~enc:(fun r -> r.repo) 1081 1080 |> Jsont.Object.mem "forkRef" Jsont.string ~enc:(fun r -> r.fork_ref) 1082 1081 |> Jsont.Object.mem "remoteRef" Jsont.string ~enc:(fun r -> r.remote_ref) 1082 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1083 1083 |> Jsont.Object.finish 1084 1084 1085 1085 type output = { 1086 - success : bool; 1087 - ref_ : string option; 1088 1086 error : string option; 1087 + ref_ : string option; 1088 + success : bool; 1089 1089 } 1090 1090 1091 1091 let output_jsont = 1092 1092 Jsont.Object.map ~kind:"Output" 1093 - (fun _typ success ref_ error -> { success; ref_; error }) 1093 + (fun _typ error ref_ success -> { error; ref_; success }) 1094 1094 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#output" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#output") 1095 - |> Jsont.Object.mem "success" Jsont.bool ~enc:(fun r -> r.success) 1095 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1096 1096 |> Jsont.Object.opt_mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1097 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1097 + |> Jsont.Object.mem "success" Jsont.bool ~enc:(fun r -> r.success) 1098 1098 |> Jsont.Object.finish 1099 1099 1100 1100 end 1101 1101 module Pull = struct 1102 1102 type target = { 1103 - repo : string; 1104 1103 branch : string; 1104 + repo : string; 1105 1105 } 1106 1106 1107 1107 let target_jsont = 1108 1108 Jsont.Object.map ~kind:"Target" 1109 - (fun _typ repo branch -> { repo; branch }) 1109 + (fun _typ branch repo -> { branch; repo }) 1110 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 "repo" Jsont.string ~enc:(fun r -> r.repo) 1112 1111 |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1112 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1113 1113 |> Jsont.Object.finish 1114 1114 1115 1115 type source = { 1116 1116 branch : string; 1117 - sha : string; 1118 1117 repo : string option; 1118 + sha : string; 1119 1119 } 1120 1120 1121 1121 let source_jsont = 1122 1122 Jsont.Object.map ~kind:"Source" 1123 - (fun _typ branch sha repo -> { branch; sha; repo }) 1123 + (fun _typ branch repo sha -> { branch; repo; sha }) 1124 1124 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#source" ~enc:(fun _ -> "sh.tangled.repo.pull#source") 1125 1125 |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1126 - |> Jsont.Object.mem "sha" Jsont.string ~enc:(fun r -> r.sha) 1127 1126 |> Jsont.Object.opt_mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1127 + |> Jsont.Object.mem "sha" Jsont.string ~enc:(fun r -> r.sha) 1128 1128 |> Jsont.Object.finish 1129 1129 1130 1130 type main = { 1131 - target : target; 1132 - title : string; 1133 1131 body : string option; 1134 - patch : string option; 1135 - patch_blob : Atp.Blob_ref.t; 1136 - source : source option; 1137 1132 created_at : string; 1138 1133 mentions : string list option; 1134 + patch : string option; 1135 + patch_blob : Atp.Blob_ref.t; 1139 1136 references : string list option; 1137 + source : source option; 1138 + target : target; 1139 + title : string; 1140 1140 } 1141 1141 1142 1142 let main_jsont = 1143 1143 Jsont.Object.map ~kind:"Main" 1144 - (fun _typ target title body patch patch_blob source created_at mentions references -> { target; title; body; patch; patch_blob; source; created_at; mentions; references }) 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 1145 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull" ~enc:(fun _ -> "sh.tangled.repo.pull") 1146 - |> Jsont.Object.mem "target" target_jsont ~enc:(fun r -> r.target) 1147 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1148 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 1149 |> Jsont.Object.opt_mem "patch" Jsont.string ~enc:(fun r -> r.patch) 1150 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) 1151 1152 |> Jsont.Object.opt_mem "source" source_jsont ~enc:(fun r -> r.source) 1152 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1153 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1154 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1153 + |> Jsont.Object.mem "target" target_jsont ~enc:(fun r -> r.target) 1154 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1155 1155 |> Jsont.Object.finish 1156 1156 1157 1157 module Comment = struct 1158 1158 type main = { 1159 - pull : string; 1160 1159 body : string; 1161 1160 created_at : string; 1162 1161 mentions : string list option; 1162 + pull : string; 1163 1163 references : string list option; 1164 1164 } 1165 1165 1166 1166 let main_jsont = 1167 1167 Jsont.Object.map ~kind:"Main" 1168 - (fun _typ pull body created_at mentions references -> { pull; body; created_at; mentions; references }) 1168 + (fun _typ body created_at mentions pull references -> { body; created_at; mentions; pull; references }) 1169 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 "pull" Jsont.string ~enc:(fun r -> r.pull) 1171 1170 |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 1172 1171 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1173 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 1174 |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1175 1175 |> Jsont.Object.finish 1176 1176 ··· 1208 1208 end 1209 1209 module Issue = struct 1210 1210 type main = { 1211 - repo : string; 1212 - title : string; 1213 1211 body : string option; 1214 1212 created_at : string; 1215 1213 mentions : string list option; 1216 1214 references : string list option; 1215 + repo : string; 1216 + title : string; 1217 1217 } 1218 1218 1219 1219 let main_jsont = 1220 1220 Jsont.Object.map ~kind:"Main" 1221 - (fun _typ repo title body created_at mentions references -> { repo; title; body; created_at; mentions; references }) 1221 + (fun _typ body created_at mentions references repo title -> { body; created_at; mentions; references; repo; title }) 1222 1222 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue" ~enc:(fun _ -> "sh.tangled.repo.issue") 1223 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1224 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1225 1223 |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 1226 1224 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1227 1225 |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1228 1226 |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1227 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1228 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1229 1229 |> Jsont.Object.finish 1230 1230 1231 1231 module Comment = struct 1232 1232 type main = { 1233 - issue : string; 1234 1233 body : string; 1235 1234 created_at : string; 1236 - reply_to : string option; 1235 + issue : string; 1237 1236 mentions : string list option; 1238 1237 references : string list option; 1238 + reply_to : string option; 1239 1239 } 1240 1240 1241 1241 let main_jsont = 1242 1242 Jsont.Object.map ~kind:"Main" 1243 - (fun _typ issue body created_at reply_to mentions references -> { issue; body; created_at; reply_to; mentions; references }) 1243 + (fun _typ body created_at issue mentions references reply_to -> { body; created_at; issue; mentions; references; reply_to }) 1244 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 "issue" Jsont.string ~enc:(fun r -> r.issue) 1246 1245 |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 1247 1246 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1248 - |> Jsont.Object.opt_mem "replyTo" Jsont.string ~enc:(fun r -> r.reply_to) 1247 + |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 1249 1248 |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1250 1249 |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1250 + |> Jsont.Object.opt_mem "replyTo" Jsont.string ~enc:(fun r -> r.reply_to) 1251 1251 |> Jsont.Object.finish 1252 1252 1253 1253 end ··· 1281 1281 module Label = struct 1282 1282 module Definition = struct 1283 1283 type value_type = { 1284 - type_ : string; 1285 - format : string; 1286 1284 enum : string list option; 1285 + format : string; 1286 + type_ : string; 1287 1287 } 1288 1288 1289 1289 let value_type_jsont = 1290 1290 Jsont.Object.map ~kind:"Value_type" 1291 - (fun _typ type_ format enum -> { type_; format; enum }) 1291 + (fun _typ enum format type_ -> { enum; format; type_ }) 1292 1292 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.definition#valueType" ~enc:(fun _ -> "sh.tangled.label.definition#valueType") 1293 + |> Jsont.Object.opt_mem "enum" (Jsont.list Jsont.string) ~enc:(fun r -> r.enum) 1294 + |> Jsont.Object.mem "format" Jsont.string ~enc:(fun r -> r.format) 1293 1295 |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 1294 - |> Jsont.Object.mem "format" Jsont.string ~enc:(fun r -> r.format) 1295 - |> Jsont.Object.opt_mem "enum" (Jsont.list Jsont.string) ~enc:(fun r -> r.enum) 1296 1296 |> Jsont.Object.finish 1297 1297 1298 1298 type main = { 1299 - name : string; 1300 - value_type : value_type; 1301 - scope : string list; 1302 1299 color : string option; 1303 1300 created_at : string; 1304 1301 multiple : bool option; 1302 + name : string; 1303 + scope : string list; 1304 + value_type : value_type; 1305 1305 } 1306 1306 1307 1307 let main_jsont = 1308 1308 Jsont.Object.map ~kind:"Main" 1309 - (fun _typ name value_type scope color created_at multiple -> { name; value_type; scope; color; created_at; multiple }) 1309 + (fun _typ color created_at multiple name scope value_type -> { color; created_at; multiple; name; scope; value_type }) 1310 1310 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.definition" ~enc:(fun _ -> "sh.tangled.label.definition") 1311 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1312 - |> Jsont.Object.mem "valueType" value_type_jsont ~enc:(fun r -> r.value_type) 1313 - |> Jsont.Object.mem "scope" (Jsont.list Jsont.string) ~enc:(fun r -> r.scope) 1314 1311 |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 1315 1312 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1316 1313 |> Jsont.Object.opt_mem "multiple" Jsont.bool ~enc:(fun r -> r.multiple) 1314 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1315 + |> Jsont.Object.mem "scope" (Jsont.list Jsont.string) ~enc:(fun r -> r.scope) 1316 + |> Jsont.Object.mem "valueType" value_type_jsont ~enc:(fun r -> r.value_type) 1317 1317 |> Jsont.Object.finish 1318 1318 1319 1319 end ··· 1332 1332 |> Jsont.Object.finish 1333 1333 1334 1334 type main = { 1335 - subject : string; 1336 - performed_at : string; 1337 1335 add : operand list; 1338 1336 delete : operand list; 1337 + performed_at : string; 1338 + subject : string; 1339 1339 } 1340 1340 1341 1341 let main_jsont = 1342 1342 Jsont.Object.map ~kind:"Main" 1343 - (fun _typ subject performed_at add delete -> { subject; performed_at; add; delete }) 1343 + (fun _typ add delete performed_at subject -> { add; delete; performed_at; subject }) 1344 1344 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op" ~enc:(fun _ -> "sh.tangled.label.op") 1345 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1346 - |> Jsont.Object.mem "performedAt" Jsont.string ~enc:(fun r -> r.performed_at) 1347 1345 |> Jsont.Object.mem "add" (Jsont.list operand_jsont) ~enc:(fun r -> r.add) 1348 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 1349 |> Jsont.Object.finish 1350 1350 1351 1351 end ··· 1353 1353 module Graph = struct 1354 1354 module Follow = struct 1355 1355 type main = { 1356 - subject : string; 1357 1356 created_at : string; 1357 + subject : string; 1358 1358 } 1359 1359 1360 1360 let main_jsont = 1361 1361 Jsont.Object.map ~kind:"Main" 1362 - (fun _typ subject created_at -> { subject; created_at }) 1362 + (fun _typ created_at subject -> { created_at; subject }) 1363 1363 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.graph.follow" ~enc:(fun _ -> "sh.tangled.graph.follow") 1364 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1365 1364 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1365 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1366 1366 |> Jsont.Object.finish 1367 1367 1368 1368 end ··· 1381 1381 1382 1382 module Member = struct 1383 1383 type main = { 1384 - subject : string; 1385 - domain : string; 1386 1384 created_at : string; 1385 + domain : string; 1386 + subject : string; 1387 1387 } 1388 1388 1389 1389 let main_jsont = 1390 1390 Jsont.Object.map ~kind:"Main" 1391 - (fun _typ subject domain created_at -> { subject; domain; created_at }) 1391 + (fun _typ created_at domain subject -> { created_at; domain; subject }) 1392 1392 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.member" ~enc:(fun _ -> "sh.tangled.knot.member") 1393 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1393 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1394 1394 |> Jsont.Object.mem "domain" Jsont.string ~enc:(fun r -> r.domain) 1395 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1395 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1396 1396 |> Jsont.Object.finish 1397 1397 1398 1398 end 1399 1399 module ListKeys = struct 1400 1400 type public_key = { 1401 + created_at : string; 1401 1402 did : string; 1402 1403 key : string; 1403 - created_at : string; 1404 1404 } 1405 1405 1406 1406 let public_key_jsont = 1407 1407 Jsont.Object.map ~kind:"Public_key" 1408 - (fun _typ did key created_at -> { did; key; created_at }) 1408 + (fun _typ created_at did key -> { created_at; did; key }) 1409 1409 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.listKeys#publicKey" ~enc:(fun _ -> "sh.tangled.knot.listKeys#publicKey") 1410 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1410 1411 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1411 1412 |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1412 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1413 1413 |> Jsont.Object.finish 1414 1414 1415 1415 type params = { 1416 - limit : int option; 1417 1416 cursor : string option; 1417 + limit : int option; 1418 1418 } 1419 1419 1420 1420 let params_jsont = 1421 1421 Jsont.Object.map ~kind:"Params" 1422 - (fun limit cursor -> { 1423 - limit; 1422 + (fun cursor limit -> { 1424 1423 cursor; 1424 + limit; 1425 1425 }) 1426 - |> Jsont.Object.opt_mem "limit" Jsont.int 1427 - ~enc:(fun r -> r.limit) 1428 1426 |> Jsont.Object.opt_mem "cursor" Jsont.string 1429 1427 ~enc:(fun r -> r.cursor) 1428 + |> Jsont.Object.opt_mem "limit" Jsont.int 1429 + ~enc:(fun r -> r.limit) 1430 1430 |> Jsont.Object.finish 1431 1431 1432 1432 type output = { 1433 + cursor : string option; 1433 1434 keys : public_key list; 1434 - cursor : string option; 1435 1435 } 1436 1436 1437 1437 let output_jsont = 1438 1438 Jsont.Object.map ~kind:"Output" 1439 - (fun _typ keys cursor -> { keys; cursor }) 1439 + (fun _typ cursor keys -> { cursor; keys }) 1440 1440 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.listKeys#output" ~enc:(fun _ -> "sh.tangled.knot.listKeys#output") 1441 - |> Jsont.Object.mem "keys" (Jsont.list public_key_jsont) ~enc:(fun r -> r.keys) 1442 1441 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 1442 + |> Jsont.Object.mem "keys" (Jsont.list public_key_jsont) ~enc:(fun r -> r.keys) 1443 1443 |> Jsont.Object.finish 1444 1444 1445 1445 end ··· 1472 1472 end 1473 1473 module PublicKey = struct 1474 1474 type main = { 1475 + created_at : string; 1475 1476 key : string; 1476 1477 name : string; 1477 - created_at : string; 1478 1478 } 1479 1479 1480 1480 let main_jsont = 1481 1481 Jsont.Object.map ~kind:"Main" 1482 - (fun _typ key name created_at -> { key; name; created_at }) 1482 + (fun _typ created_at key name -> { created_at; key; name }) 1483 1483 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.publicKey" ~enc:(fun _ -> "sh.tangled.publicKey") 1484 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1484 1485 |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1485 1486 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1486 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1487 1487 |> Jsont.Object.finish 1488 1488 1489 1489 end 1490 1490 module Pipeline = struct 1491 1491 type trigger_repo = { 1492 - knot : string; 1492 + default_branch : string; 1493 1493 did : string; 1494 + knot : string; 1494 1495 repo : string; 1495 - default_branch : string; 1496 1496 } 1497 1497 1498 1498 let trigger_repo_jsont = 1499 1499 Jsont.Object.map ~kind:"Trigger_repo" 1500 - (fun _typ knot did repo default_branch -> { knot; did; repo; default_branch }) 1500 + (fun _typ default_branch did knot repo -> { default_branch; did; knot; repo }) 1501 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) 1502 1504 |> Jsont.Object.mem "knot" Jsont.string ~enc:(fun r -> r.knot) 1503 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1504 1505 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1505 - |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 1506 1506 |> Jsont.Object.finish 1507 1507 1508 1508 type push_trigger_data = { 1509 - ref_ : string; 1510 1509 new_sha : string; 1511 1510 old_sha : string; 1511 + ref_ : string; 1512 1512 } 1513 1513 1514 1514 let push_trigger_data_jsont = 1515 1515 Jsont.Object.map ~kind:"Push_trigger_data" 1516 - (fun _typ ref_ new_sha old_sha -> { ref_; new_sha; old_sha }) 1516 + (fun _typ new_sha old_sha ref_ -> { new_sha; old_sha; ref_ }) 1517 1517 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pushTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pushTriggerData") 1518 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1519 1518 |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 1520 1519 |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 1520 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1521 1521 |> Jsont.Object.finish 1522 1522 1523 1523 type pull_request_trigger_data = { 1524 + action : string; 1524 1525 source_branch : string; 1525 - target_branch : string; 1526 1526 source_sha : string; 1527 - action : string; 1527 + target_branch : string; 1528 1528 } 1529 1529 1530 1530 let pull_request_trigger_data_jsont = 1531 1531 Jsont.Object.map ~kind:"Pull_request_trigger_data" 1532 - (fun _typ source_branch target_branch source_sha action -> { source_branch; target_branch; source_sha; action }) 1532 + (fun _typ action source_branch source_sha target_branch -> { action; source_branch; source_sha; target_branch }) 1533 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) 1534 1535 |> Jsont.Object.mem "sourceBranch" Jsont.string ~enc:(fun r -> r.source_branch) 1535 - |> Jsont.Object.mem "targetBranch" Jsont.string ~enc:(fun r -> r.target_branch) 1536 1536 |> Jsont.Object.mem "sourceSha" Jsont.string ~enc:(fun r -> r.source_sha) 1537 - |> Jsont.Object.mem "action" Jsont.string ~enc:(fun r -> r.action) 1538 - |> Jsont.Object.finish 1539 - 1540 - type clone_opts = { 1541 - skip : bool; 1542 - depth : int; 1543 - submodules : bool; 1544 - } 1545 - 1546 - let clone_opts_jsont = 1547 - Jsont.Object.map ~kind:"Clone_opts" 1548 - (fun _typ skip depth submodules -> { skip; depth; submodules }) 1549 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#cloneOpts" ~enc:(fun _ -> "sh.tangled.pipeline#cloneOpts") 1550 - |> Jsont.Object.mem "skip" Jsont.bool ~enc:(fun r -> r.skip) 1551 - |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 1552 - |> Jsont.Object.mem "submodules" Jsont.bool ~enc:(fun r -> r.submodules) 1537 + |> Jsont.Object.mem "targetBranch" Jsont.string ~enc:(fun r -> r.target_branch) 1553 1538 |> Jsont.Object.finish 1554 1539 1555 1540 type pair = { ··· 1565 1550 |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1566 1551 |> Jsont.Object.finish 1567 1552 1568 - type manual_trigger_data = { 1569 - inputs : pair list option; 1553 + type clone_opts = { 1554 + depth : int; 1555 + skip : bool; 1556 + submodules : bool; 1570 1557 } 1571 1558 1572 - let manual_trigger_data_jsont = 1573 - Jsont.Object.map ~kind:"Manual_trigger_data" 1574 - (fun _typ inputs -> { inputs }) 1575 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#manualTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#manualTriggerData") 1576 - |> Jsont.Object.opt_mem "inputs" (Jsont.list pair_jsont) ~enc:(fun r -> r.inputs) 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) 1577 1566 |> Jsont.Object.finish 1578 1567 1579 1568 type workflow = { 1580 - name : string; 1569 + clone : clone_opts; 1581 1570 engine : string; 1582 - clone : clone_opts; 1571 + name : string; 1583 1572 raw : string; 1584 1573 } 1585 1574 1586 1575 let workflow_jsont = 1587 1576 Jsont.Object.map ~kind:"Workflow" 1588 - (fun _typ name engine clone raw -> { name; engine; clone; raw }) 1577 + (fun _typ clone engine name raw -> { clone; engine; name; raw }) 1589 1578 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#workflow" ~enc:(fun _ -> "sh.tangled.pipeline#workflow") 1590 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1579 + |> Jsont.Object.mem "clone" clone_opts_jsont ~enc:(fun r -> r.clone) 1591 1580 |> Jsont.Object.mem "engine" Jsont.string ~enc:(fun r -> r.engine) 1592 - |> Jsont.Object.mem "clone" clone_opts_jsont ~enc:(fun r -> r.clone) 1581 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1593 1582 |> Jsont.Object.mem "raw" Jsont.string ~enc:(fun r -> r.raw) 1594 1583 |> Jsont.Object.finish 1595 1584 1585 + type manual_trigger_data = { 1586 + inputs : pair list option; 1587 + } 1588 + 1589 + let manual_trigger_data_jsont = 1590 + Jsont.Object.map ~kind:"Manual_trigger_data" 1591 + (fun _typ inputs -> { inputs }) 1592 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#manualTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#manualTriggerData") 1593 + |> Jsont.Object.opt_mem "inputs" (Jsont.list pair_jsont) ~enc:(fun r -> r.inputs) 1594 + |> Jsont.Object.finish 1595 + 1596 1596 type trigger_metadata = { 1597 1597 kind : string; 1598 - repo : trigger_repo; 1599 - push : push_trigger_data option; 1600 - pull_request : pull_request_trigger_data option; 1601 1598 manual : manual_trigger_data option; 1599 + pull_request : pull_request_trigger_data option; 1600 + push : push_trigger_data option; 1601 + repo : trigger_repo; 1602 1602 } 1603 1603 1604 1604 let trigger_metadata_jsont = 1605 1605 Jsont.Object.map ~kind:"Trigger_metadata" 1606 - (fun _typ kind repo push pull_request manual -> { kind; repo; push; pull_request; manual }) 1606 + (fun _typ kind manual pull_request push repo -> { kind; manual; pull_request; push; repo }) 1607 1607 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerMetadata" ~enc:(fun _ -> "sh.tangled.pipeline#triggerMetadata") 1608 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) 1609 1612 |> Jsont.Object.mem "repo" trigger_repo_jsont ~enc:(fun r -> r.repo) 1610 - |> Jsont.Object.opt_mem "push" push_trigger_data_jsont ~enc:(fun r -> r.push) 1611 - |> Jsont.Object.opt_mem "pullRequest" pull_request_trigger_data_jsont ~enc:(fun r -> r.pull_request) 1612 - |> Jsont.Object.opt_mem "manual" manual_trigger_data_jsont ~enc:(fun r -> r.manual) 1613 1613 |> Jsont.Object.finish 1614 1614 1615 1615 type main = { ··· 1627 1627 1628 1628 module Status = struct 1629 1629 type main = { 1630 - pipeline : string; 1631 - workflow : string; 1632 - status : string; 1633 1630 created_at : string; 1634 1631 error : string option; 1635 1632 exit_code : int option; 1633 + pipeline : string; 1634 + status : string; 1635 + workflow : string; 1636 1636 } 1637 1637 1638 1638 let main_jsont = 1639 1639 Jsont.Object.map ~kind:"Main" 1640 - (fun _typ pipeline workflow status created_at error exit_code -> { pipeline; workflow; status; created_at; error; exit_code }) 1640 + (fun _typ created_at error exit_code pipeline status workflow -> { created_at; error; exit_code; pipeline; status; workflow }) 1641 1641 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline.status" ~enc:(fun _ -> "sh.tangled.pipeline.status") 1642 - |> Jsont.Object.mem "pipeline" Jsont.string ~enc:(fun r -> r.pipeline) 1643 - |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 1644 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1645 1642 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1646 1643 |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1647 1644 |> Jsont.Object.opt_mem "exitCode" Jsont.int ~enc:(fun r -> r.exit_code) 1645 + |> Jsont.Object.mem "pipeline" Jsont.string ~enc:(fun r -> r.pipeline) 1646 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1647 + |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 1648 1648 |> Jsont.Object.finish 1649 1649 1650 1650 end
+156 -156
lexicons/tangled/atp_lexicon_tangled.mli
··· 24 24 module Member : sig 25 25 26 26 type main = { 27 - subject : string; 28 - instance : string; (** spindle instance that the subject is now a member of *) 29 27 created_at : string; 28 + instance : string; (** spindle instance that the subject is now a member of *) 29 + subject : string; 30 30 } 31 31 32 32 (** Jsont codec for {!type:main}. *) ··· 47 47 48 48 49 49 type individual_email_commit_count = { 50 - email : string; 51 50 count : int; 51 + email : string; 52 52 } 53 53 54 54 (** Jsont codec for {!type:individual_email_commit_count}. *) ··· 72 72 73 73 74 74 type meta = { 75 + commit_count : commit_count_breakdown; 75 76 is_default_ref : bool; 76 77 lang_breakdown : lang_breakdown option; 77 - commit_count : commit_count_breakdown; 78 78 } 79 79 80 80 (** Jsont codec for {!type:meta}. *) ··· 83 83 (** An update to a git repository, emitted by knots. *) 84 84 85 85 type main = { 86 - ref_ : string; (** Ref being updated *) 87 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 *) 88 91 repo_did : string; (** did of the owner of the repo *) 89 92 repo_name : string; (** name of the repo *) 90 - old_sha : string; (** old SHA of this ref *) 91 - new_sha : string; (** new SHA of this ref *) 92 - meta : meta; 93 93 } 94 94 95 95 (** Jsont codec for {!type:main}. *) ··· 102 102 (** A declaration of a Tangled account profile. *) 103 103 104 104 type main = { 105 + bluesky : bool; (** Include link to this account on Bluesky. *) 105 106 description : string option; (** Free-form profile description text. *) 106 107 links : string list option; 107 - stats : string list option; 108 - bluesky : bool; (** Include link to this account on Bluesky. *) 109 108 location : string option; (** Free-form location text. *) 110 109 pinned_repositories : string list option; (** Any ATURI, it is up to appviews to validate these fields. *) 111 110 pronouns : string option; (** Preferred gender pronouns. *) 111 + stats : string list option; 112 112 } 113 113 114 114 (** Jsont codec for {!type:main}. *) ··· 119 119 module String : sig 120 120 121 121 type main = { 122 - filename : string; 122 + contents : string; 123 + created_at : string; 123 124 description : string; 124 - created_at : string; 125 - contents : string; 125 + filename : string; 126 126 } 127 127 128 128 (** Jsont codec for {!type:main}. *) ··· 133 133 module Star : sig 134 134 135 135 type main = { 136 - subject : string; 137 136 created_at : string; 137 + subject : string; 138 138 } 139 139 140 140 (** Jsont codec for {!type:main}. *) ··· 144 144 module Reaction : sig 145 145 146 146 type main = { 147 + created_at : string; 148 + reaction : string; 147 149 subject : string; 148 - reaction : string; 149 - created_at : string; 150 150 } 151 151 152 152 (** Jsont codec for {!type:main}. *) ··· 157 157 module Repo : sig 158 158 159 159 type main = { 160 + created_at : string; 161 + description : string option; 162 + knot : string; (** knot where the repo was created *) 163 + labels : string list option; (** List of labels that this repo subscribes to *) 160 164 name : string; (** name of the repo *) 161 - knot : string; (** knot where the repo was created *) 165 + source : string option; (** source of the repo *) 162 166 spindle : string option; (** CI runner to send jobs to and receive results from *) 163 - description : string option; 164 - website : string option; (** Any URI related to the repo *) 165 167 topics : string list option; (** Topics related to the repo *) 166 - source : string option; (** source of the repo *) 167 - labels : string list option; (** List of labels that this repo subscribes to *) 168 - created_at : string; 168 + website : string option; (** Any URI related to the repo *) 169 169 } 170 170 171 171 (** Jsont codec for {!type:main}. *) ··· 174 174 module Artifact : sig 175 175 176 176 type main = { 177 + artifact : Atp.Blob_ref.t; (** the artifact *) 178 + created_at : string; (** time of creation of this artifact *) 177 179 name : string; (** name of the artifact *) 178 180 repo : string; (** repo that this artifact is being uploaded to *) 179 181 tag : string; (** hash of the tag object that this artifact is attached to (only annotated tags are supported) *) 180 - created_at : string; (** time of creation of this artifact *) 181 - artifact : Atp.Blob_ref.t; (** the artifact *) 182 182 } 183 183 184 184 (** Jsont codec for {!type:main}. *) ··· 199 199 200 200 201 201 type input = { 202 + branch : string; (** Target branch to merge into *) 202 203 did : string; (** DID of the repository owner *) 203 204 name : string; (** Name of the repository *) 204 205 patch : string; (** Patch or pull request to check for merge conflicts *) 205 - branch : string; (** Target branch to merge into *) 206 206 } 207 207 208 208 (** Jsont codec for {!type:input}. *) ··· 210 210 211 211 212 212 type output = { 213 - is_conflicted : bool; (** Whether the merge has conflicts *) 214 213 conflicts : conflict_info list option; (** List of files with merge conflicts *) 215 - message : string option; (** Additional message about the merge check *) 216 214 error : string option; (** Error message if check failed *) 215 + is_conflicted : bool; (** Whether the merge has conflicts *) 216 + message : string option; (** Additional message about the merge check *) 217 217 } 218 218 219 219 (** Jsont codec for {!type:output}. *) ··· 223 223 module Tree : sig 224 224 225 225 type readme = { 226 - filename : string; (** Name of the readme file *) 227 226 contents : string; (** Contents of the readme file *) 227 + filename : string; (** Name of the readme file *) 228 228 } 229 229 230 230 (** Jsont codec for {!type:readme}. *) ··· 242 242 243 243 244 244 type tree_entry = { 245 + last_commit : last_commit option; 246 + mode : string; (** File mode *) 245 247 name : string; (** Relative file or directory name *) 246 - mode : string; (** File mode *) 247 248 size : int; (** File size in bytes *) 248 - last_commit : last_commit option; 249 249 } 250 250 251 251 (** Jsont codec for {!type:tree_entry}. *) ··· 254 254 255 255 (** Query/procedure parameters. *) 256 256 type params = { 257 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 258 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 259 257 path : string option; (** Path within the repository tree *) 258 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 259 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 260 260 } 261 261 262 262 (** Jsont codec for {!type:params}. *) ··· 264 264 265 265 266 266 type output = { 267 - ref_ : string; (** The git reference used *) 267 + dotdot : string option; (** Parent directory path *) 268 + files : tree_entry list; 268 269 parent : string option; (** The parent path in the tree *) 269 - dotdot : string option; (** Parent directory path *) 270 270 readme : readme option; (** Readme for this file tree *) 271 - files : tree_entry list; 271 + ref_ : string; (** The git reference used *) 272 272 } 273 273 274 274 (** Jsont codec for {!type:output}. *) ··· 280 280 281 281 282 282 type input = { 283 - repo : string; 284 283 default_branch : string; 284 + repo : string; 285 285 } 286 286 287 287 (** Jsont codec for {!type:input}. *) ··· 311 311 312 312 313 313 type input = { 314 - did : string; (** DID of the repository owner *) 315 - name : string; (** Name of the repository *) 316 - patch : string; (** Patch content to merge *) 317 - branch : string; (** Target branch to merge into *) 314 + author_email : string option; (** Author email for the merge commit *) 318 315 author_name : string option; (** Author name for the merge commit *) 319 - author_email : string option; (** Author email for the merge commit *) 316 + branch : string; (** Target branch to merge into *) 320 317 commit_body : string option; (** Additional commit message body *) 321 318 commit_message : string option; (** Merge commit message *) 319 + did : string; (** DID of the repository owner *) 320 + name : string; (** Name of the repository *) 321 + patch : string; (** Patch content to merge *) 322 322 } 323 323 324 324 (** Jsont codec for {!type:input}. *) ··· 329 329 330 330 (** Query/procedure parameters. *) 331 331 type params = { 332 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 332 + cursor : string option; (** Pagination cursor *) 333 333 limit : int option; (** Maximum number of tags to return *) 334 - cursor : string option; (** Pagination cursor *) 334 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 335 335 } 336 336 337 337 (** Jsont codec for {!type:params}. *) ··· 345 345 module Collaborator : sig 346 346 347 347 type main = { 348 - subject : string; 349 - repo : string; (** repo to add this user to *) 350 348 created_at : string; 349 + repo : string; (** repo to add this user to *) 350 + subject : string; 351 351 } 352 352 353 353 (** Jsont codec for {!type:main}. *) ··· 358 358 359 359 (** Query/procedure parameters. *) 360 360 type params = { 361 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 361 + cursor : string option; (** Pagination cursor *) 362 362 limit : int option; (** Maximum number of branches to return *) 363 - cursor : string option; (** Pagination cursor *) 363 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 364 364 } 365 365 366 366 (** Jsont codec for {!type:params}. *) ··· 374 374 module GetDefaultBranch : sig 375 375 376 376 type signature = { 377 - name : string; (** Author name *) 378 377 email : string; (** Author email *) 378 + name : string; (** Author name *) 379 379 when_ : string; (** Author timestamp *) 380 380 } 381 381 ··· 393 393 394 394 395 395 type output = { 396 + author : signature option; 397 + hash : string; (** Latest commit hash on default branch *) 398 + message : string option; (** Latest commit message *) 396 399 name : string; (** Default branch name *) 397 - hash : string; (** Latest commit hash on default branch *) 398 400 short_hash : string option; (** Short commit hash *) 399 401 when_ : string; (** Timestamp of latest commit *) 400 - message : string option; (** Latest commit message *) 401 - author : signature option; 402 402 } 403 403 404 404 (** Jsont codec for {!type:output}. *) ··· 410 410 411 411 412 412 type input = { 413 - rkey : string; (** Rkey of the repository record *) 414 413 default_branch : string option; (** Default branch to push to *) 414 + rkey : string; (** Rkey of the repository record *) 415 415 source : string option; (** A source URL to clone from, populate this when forking or importing a repository. *) 416 416 } 417 417 ··· 424 424 425 425 426 426 type input = { 427 + branch : string; (** Branch to check status for *) 427 428 did : string; (** DID of the fork owner *) 429 + hidden_ref : string; (** Hidden ref to use for comparison *) 428 430 name : string; (** Name of the forked repository *) 429 431 source : string; (** Source repository URL *) 430 - branch : string; (** Branch to check status for *) 431 - hidden_ref : string; (** Hidden ref to use for comparison *) 432 432 } 433 433 434 434 (** Jsont codec for {!type:input}. *) ··· 446 446 module Branch : sig 447 447 448 448 type signature = { 449 - name : string; (** Author name *) 450 449 email : string; (** Author email *) 450 + name : string; (** Author name *) 451 451 when_ : string; (** Author timestamp *) 452 452 } 453 453 ··· 457 457 458 458 (** Query/procedure parameters. *) 459 459 type params = { 460 + name : string; (** Branch name to get information for *) 460 461 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 461 - name : string; (** Branch name to get information for *) 462 462 } 463 463 464 464 (** Jsont codec for {!type:params}. *) ··· 466 466 467 467 468 468 type output = { 469 - name : string; (** Branch name *) 469 + author : signature option; 470 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 *) 471 474 short_hash : string option; (** Short commit hash *) 472 475 when_ : string; (** Timestamp of latest commit *) 473 - message : string option; (** Latest commit message *) 474 - author : signature option; 475 - is_default : bool option; (** Whether this is the default branch *) 476 476 } 477 477 478 478 (** Jsont codec for {!type:output}. *) ··· 484 484 485 485 486 486 type input = { 487 - repo : string; 488 487 branch : string; 488 + repo : string; 489 489 } 490 490 491 491 (** Jsont codec for {!type:input}. *) ··· 496 496 497 497 (** Query/procedure parameters. *) 498 498 type params = { 499 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 500 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 501 - path : string option; (** Path to filter commits by *) 499 + cursor : string option; (** Pagination cursor (commit SHA) *) 502 500 limit : int option; (** Maximum number of commits to return *) 503 - cursor : string option; (** Pagination cursor (commit SHA) *) 501 + path : string option; (** Path to filter commits by *) 502 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 503 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 504 504 } 505 505 506 506 (** Jsont codec for {!type:params}. *) ··· 513 513 end 514 514 module Blob : sig 515 515 516 + type submodule = { 517 + branch : string option; (** Branch to track in the submodule *) 518 + name : string; (** Submodule name *) 519 + url : string; (** Submodule repository URL *) 520 + } 521 + 522 + (** Jsont codec for {!type:submodule}. *) 523 + val submodule_jsont : submodule Jsont.t 524 + 525 + 516 526 type signature = { 517 - name : string; (** Author name *) 518 527 email : string; (** Author email *) 528 + name : string; (** Author name *) 519 529 when_ : string; (** Author timestamp *) 520 530 } 521 531 ··· 523 533 val signature_jsont : signature Jsont.t 524 534 525 535 526 - type submodule = { 527 - name : string; (** Submodule name *) 528 - url : string; (** Submodule repository URL *) 529 - branch : string option; (** Branch to track in the submodule *) 530 - } 531 - 532 - (** Jsont codec for {!type:submodule}. *) 533 - val submodule_jsont : submodule Jsont.t 534 - 535 - 536 536 type last_commit = { 537 + author : signature option; 537 538 hash : string; (** Commit hash *) 538 - short_hash : string option; (** Short commit hash *) 539 539 message : string; (** Commit message *) 540 - author : signature option; 540 + short_hash : string option; (** Short commit hash *) 541 541 when_ : string; (** Commit timestamp *) 542 542 } 543 543 ··· 547 547 548 548 (** Query/procedure parameters. *) 549 549 type params = { 550 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 551 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 552 550 path : string; (** Path to the file within the repository *) 553 551 raw : bool option; (** Return raw file content instead of JSON response *) 552 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 553 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 554 554 } 555 555 556 556 (** Jsont codec for {!type:params}. *) ··· 558 558 559 559 560 560 type output = { 561 - ref_ : string; (** The git reference used *) 562 - path : string; (** The file path *) 563 561 content : string option; (** File content (base64 encoded for binary files) *) 564 562 encoding : string option; (** Content encoding *) 565 - size : int option; (** File size in bytes *) 566 563 is_binary : bool option; (** Whether the file is binary *) 564 + last_commit : last_commit option; 567 565 mime_type : string option; (** MIME type of the file *) 566 + path : string; (** The file path *) 567 + ref_ : string; (** The git reference used *) 568 + size : int option; (** File size in bytes *) 568 569 submodule : submodule option; (** Submodule information if path is a submodule *) 569 - last_commit : last_commit option; 570 570 } 571 571 572 572 (** Jsont codec for {!type:output}. *) ··· 578 578 579 579 580 580 type input = { 581 + key : string; 581 582 repo : string; 582 - key : string; 583 583 } 584 584 585 585 (** Jsont codec for {!type:input}. *) ··· 589 589 module Languages : sig 590 590 591 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 *) 592 595 name : string; (** Programming language name *) 596 + percentage : int; (** Percentage of total codebase (0-100) *) 593 597 size : int; (** Total size of files in this language (bytes) *) 594 - percentage : int; (** Percentage of total codebase (0-100) *) 595 - file_count : int option; (** Number of files in this language *) 596 - color : string option; (** Hex color code for this language *) 597 - extensions : string list option; (** File extensions associated with this language *) 598 598 } 599 599 600 600 (** Jsont codec for {!type:language}. *) ··· 603 603 604 604 (** Query/procedure parameters. *) 605 605 type params = { 606 + ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 606 607 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 607 - ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 608 608 } 609 609 610 610 (** Jsont codec for {!type:params}. *) ··· 612 612 613 613 614 614 type output = { 615 - ref_ : string; (** The git reference used *) 616 615 languages : language list; 616 + ref_ : string; (** The git reference used *) 617 + total_files : int option; (** Total number of files analyzed *) 617 618 total_size : int option; (** Total size of all analyzed files in bytes *) 618 - total_files : int option; (** Total number of files analyzed *) 619 619 } 620 620 621 621 (** Jsont codec for {!type:output}. *) ··· 626 626 627 627 (** Query/procedure parameters. *) 628 628 type params = { 629 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 630 629 ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 630 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 631 631 } 632 632 633 633 (** Jsont codec for {!type:params}. *) ··· 643 643 644 644 645 645 type input = { 646 + branch : string; (** Branch to sync *) 646 647 did : string; (** DID of the fork owner *) 647 - source : string; (** AT-URI of the source repository *) 648 648 name : string; (** Name of the forked repository *) 649 - branch : string; (** Branch to sync *) 649 + source : string; (** AT-URI of the source repository *) 650 650 } 651 651 652 652 (** Jsont codec for {!type:input}. *) ··· 658 658 659 659 660 660 type input = { 661 - repo : string; 662 661 key : string; 662 + repo : string; 663 663 value : string; 664 664 } 665 665 ··· 684 684 module ListSecrets : sig 685 685 686 686 type secret = { 687 - repo : string; 688 - key : string; 689 687 created_at : string; 690 688 created_by : string; 689 + key : string; 690 + repo : string; 691 691 } 692 692 693 693 (** Jsont codec for {!type:secret}. *) ··· 715 715 716 716 (** Query/procedure parameters. *) 717 717 type params = { 718 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 719 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 720 718 format : string option; (** Archive format *) 721 719 prefix : string option; (** Prefix for files in the archive *) 720 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 721 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 722 722 } 723 723 724 724 (** Jsont codec for {!type:params}. *) ··· 735 735 736 736 737 737 type input = { 738 - repo : string; (** AT-URI of the repository *) 739 738 fork_ref : string; (** Fork reference name *) 740 739 remote_ref : string; (** Remote reference name *) 740 + repo : string; (** AT-URI of the repository *) 741 741 } 742 742 743 743 (** Jsont codec for {!type:input}. *) ··· 745 745 746 746 747 747 type output = { 748 - success : bool; (** Whether the hidden ref was created successfully *) 748 + error : string option; (** Error message if creation failed *) 749 749 ref_ : string option; (** The created hidden ref name *) 750 - error : string option; (** Error message if creation failed *) 750 + success : bool; (** Whether the hidden ref was created successfully *) 751 751 } 752 752 753 753 (** Jsont codec for {!type:output}. *) ··· 757 757 module Pull : sig 758 758 759 759 type target = { 760 - repo : string; 761 760 branch : string; 761 + repo : string; 762 762 } 763 763 764 764 (** Jsont codec for {!type:target}. *) ··· 767 767 768 768 type source = { 769 769 branch : string; 770 - sha : string; 771 770 repo : string option; 771 + sha : string; 772 772 } 773 773 774 774 (** Jsont codec for {!type:source}. *) ··· 776 776 777 777 778 778 type main = { 779 - target : target; 780 - title : string; 781 779 body : string option; 780 + created_at : string; 781 + mentions : string list option; 782 782 patch : string option; (** (deprecated) use patchBlob instead *) 783 783 patch_blob : Atp.Blob_ref.t; (** patch content *) 784 + references : string list option; 784 785 source : source option; 785 - created_at : string; 786 - mentions : string list option; 787 - references : string list option; 786 + target : target; 787 + title : string; 788 788 } 789 789 790 790 (** Jsont codec for {!type:main}. *) ··· 793 793 module Comment : sig 794 794 795 795 type main = { 796 - pull : string; 797 796 body : string; 798 797 created_at : string; 799 798 mentions : string list option; 799 + pull : string; 800 800 references : string list option; 801 801 } 802 802 ··· 840 840 module Issue : sig 841 841 842 842 type main = { 843 - repo : string; 844 - title : string; 845 843 body : string option; 846 844 created_at : string; 847 845 mentions : string list option; 848 846 references : string list option; 847 + repo : string; 848 + title : string; 849 849 } 850 850 851 851 (** Jsont codec for {!type:main}. *) ··· 854 854 module Comment : sig 855 855 856 856 type main = { 857 - issue : string; 858 857 body : string; 859 858 created_at : string; 860 - reply_to : string option; 859 + issue : string; 861 860 mentions : string list option; 862 861 references : string list option; 862 + reply_to : string option; 863 863 } 864 864 865 865 (** Jsont codec for {!type:main}. *) ··· 897 897 module Definition : sig 898 898 899 899 type value_type = { 900 - type_ : string; (** The concrete type of this label's value. *) 901 - format : string; (** An optional constraint that can be applied on string concrete types. *) 902 900 enum : string list option; (** Closed set of values that this label can take. *) 901 + format : string; (** An optional constraint that can be applied on string concrete types. *) 902 + type_ : string; (** The concrete type of this label's value. *) 903 903 } 904 904 905 905 (** Jsont codec for {!type:value_type}. *) ··· 907 907 908 908 909 909 type main = { 910 - name : string; (** The display name of this label. *) 911 - value_type : value_type; (** The type definition of this label. Appviews may allow sorting for certain types. *) 912 - scope : string list; (** The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this. *) 913 910 color : string option; (** The hex value for the background color for the label. Appviews may choose to respect this. *) 914 911 created_at : string; 915 912 multiple : bool option; (** Whether this label can be repeated for a given entity, eg.: \[reviewer:foo, reviewer:bar\] *) 913 + name : string; (** The display name of this label. *) 914 + scope : string list; (** The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this. *) 915 + value_type : value_type; (** The type definition of this label. Appviews may allow sorting for certain types. *) 916 916 } 917 917 918 918 (** Jsont codec for {!type:main}. *) ··· 931 931 932 932 933 933 type main = { 934 - subject : string; (** The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. *) 935 - performed_at : string; 936 934 add : operand list; 937 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 938 } 939 939 940 940 (** Jsont codec for {!type:main}. *) ··· 946 946 module Follow : sig 947 947 948 948 type main = { 949 - subject : string; 950 949 created_at : string; 950 + subject : string; 951 951 } 952 952 953 953 (** Jsont codec for {!type:main}. *) ··· 967 967 module Member : sig 968 968 969 969 type main = { 970 - subject : string; 970 + created_at : string; 971 971 domain : string; (** domain that this member now belongs to *) 972 - created_at : string; 972 + subject : string; 973 973 } 974 974 975 975 (** Jsont codec for {!type:main}. *) ··· 979 979 module ListKeys : sig 980 980 981 981 type public_key = { 982 + created_at : string; (** Key upload timestamp *) 982 983 did : string; (** DID associated with the public key *) 983 984 key : string; (** Public key contents *) 984 - created_at : string; (** Key upload timestamp *) 985 985 } 986 986 987 987 (** Jsont codec for {!type:public_key}. *) ··· 991 991 992 992 (** Query/procedure parameters. *) 993 993 type params = { 994 - limit : int option; (** Maximum number of keys to return *) 995 994 cursor : string option; (** Pagination cursor *) 995 + limit : int option; (** Maximum number of keys to return *) 996 996 } 997 997 998 998 (** Jsont codec for {!type:params}. *) ··· 1000 1000 1001 1001 1002 1002 type output = { 1003 - keys : public_key list; 1004 1003 cursor : string option; (** Pagination cursor for next page *) 1004 + keys : public_key list; 1005 1005 } 1006 1006 1007 1007 (** Jsont codec for {!type:output}. *) ··· 1036 1036 module PublicKey : sig 1037 1037 1038 1038 type main = { 1039 + created_at : string; (** key upload timestamp *) 1039 1040 key : string; (** public key contents *) 1040 1041 name : string; (** human-readable name for this key *) 1041 - created_at : string; (** key upload timestamp *) 1042 1042 } 1043 1043 1044 1044 (** Jsont codec for {!type:main}. *) ··· 1048 1048 module Pipeline : sig 1049 1049 1050 1050 type trigger_repo = { 1051 - knot : string; 1051 + default_branch : string; 1052 1052 did : string; 1053 + knot : string; 1053 1054 repo : string; 1054 - default_branch : string; 1055 1055 } 1056 1056 1057 1057 (** Jsont codec for {!type:trigger_repo}. *) ··· 1059 1059 1060 1060 1061 1061 type push_trigger_data = { 1062 - ref_ : string; 1063 1062 new_sha : string; 1064 1063 old_sha : string; 1064 + ref_ : string; 1065 1065 } 1066 1066 1067 1067 (** Jsont codec for {!type:push_trigger_data}. *) ··· 1069 1069 1070 1070 1071 1071 type pull_request_trigger_data = { 1072 + action : string; 1072 1073 source_branch : string; 1073 - target_branch : string; 1074 1074 source_sha : string; 1075 - action : string; 1075 + target_branch : string; 1076 1076 } 1077 1077 1078 1078 (** Jsont codec for {!type:pull_request_trigger_data}. *) 1079 1079 val pull_request_trigger_data_jsont : pull_request_trigger_data Jsont.t 1080 1080 1081 1081 1082 - type clone_opts = { 1083 - skip : bool; 1084 - depth : int; 1085 - submodules : bool; 1086 - } 1087 - 1088 - (** Jsont codec for {!type:clone_opts}. *) 1089 - val clone_opts_jsont : clone_opts Jsont.t 1090 - 1091 - 1092 1082 type pair = { 1093 1083 key : string; 1094 1084 value : string; ··· 1098 1088 val pair_jsont : pair Jsont.t 1099 1089 1100 1090 1101 - type manual_trigger_data = { 1102 - inputs : pair list option; 1091 + type clone_opts = { 1092 + depth : int; 1093 + skip : bool; 1094 + submodules : bool; 1103 1095 } 1104 1096 1105 - (** Jsont codec for {!type:manual_trigger_data}. *) 1106 - val manual_trigger_data_jsont : manual_trigger_data Jsont.t 1097 + (** Jsont codec for {!type:clone_opts}. *) 1098 + val clone_opts_jsont : clone_opts Jsont.t 1107 1099 1108 1100 1109 1101 type workflow = { 1110 - name : string; 1111 - engine : string; 1112 1102 clone : clone_opts; 1103 + engine : string; 1104 + name : string; 1113 1105 raw : string; 1114 1106 } 1115 1107 ··· 1117 1109 val workflow_jsont : workflow Jsont.t 1118 1110 1119 1111 1112 + type manual_trigger_data = { 1113 + inputs : pair list option; 1114 + } 1115 + 1116 + (** Jsont codec for {!type:manual_trigger_data}. *) 1117 + val manual_trigger_data_jsont : manual_trigger_data Jsont.t 1118 + 1119 + 1120 1120 type trigger_metadata = { 1121 1121 kind : string; 1122 + manual : manual_trigger_data option; 1123 + pull_request : pull_request_trigger_data option; 1124 + push : push_trigger_data option; 1122 1125 repo : trigger_repo; 1123 - push : push_trigger_data option; 1124 - pull_request : pull_request_trigger_data option; 1125 - manual : manual_trigger_data option; 1126 1126 } 1127 1127 1128 1128 (** Jsont codec for {!type:trigger_metadata}. *) ··· 1140 1140 module Status : sig 1141 1141 1142 1142 type main = { 1143 - pipeline : string; (** ATURI of the pipeline *) 1144 - workflow : string; (** name of the workflow within this pipeline *) 1145 - status : string; (** status of the workflow *) 1146 1143 created_at : string; (** time of creation of this status update *) 1147 1144 error : string option; (** error message if failed *) 1148 1145 exit_code : int option; (** exit code if failed *) 1146 + pipeline : string; (** ATURI of the pipeline *) 1147 + status : string; (** status of the workflow *) 1148 + workflow : string; (** name of the workflow within this pipeline *) 1149 1149 } 1150 1150 1151 1151 (** Jsont codec for {!type:main}. *)
+4 -4
xrpc/xrpc.mli
··· 18 18 The library provides: 19 19 - {!Client}: Low-level XRPC operations (query, procedure, blob upload) 20 20 - {!Credential}: Session management with automatic token refresh 21 - - {!Error}: Structured error types wrapped as Eio exceptions 21 + - {!module:Error}: Structured error types wrapped as Eio exceptions 22 22 - {!Jwt}: JWT payload decoding for token expiry checking 23 23 - {!Types}: Core data types (session, error payload, etc.) 24 24 ··· 87 87 (** {1 Type Aliases} *) 88 88 89 89 type client = Xrpc_client.t 90 - (** Alias for {!Xrpc_client.t}. *) 90 + (** Alias for [Xrpc_client.t]. *) 91 91 92 92 type session = Xrpc_types.session 93 - (** Alias for {!Xrpc_types.session}. *) 93 + (** Alias for [Xrpc_types.session]. *) 94 94 95 95 type error = Xrpc_error.error 96 - (** Alias for {!Xrpc_error.error}. *) 96 + (** Alias for [Xrpc_error.error]. *)
+5 -5
xrpc/xrpc_client.mli
··· 93 93 @param params Query parameters as key-value pairs 94 94 @param decoder jsont codec for decoding the response 95 95 96 - @raise Eio.Io with {!Xrpc_error.E} on failure *) 96 + @raise Eio.Io with [Xrpc_error.E] on failure *) 97 97 98 98 val procedure : 99 99 t -> ··· 112 112 @param input_data Optional request body data 113 113 @param decoder jsont codec for decoding the response 114 114 115 - @raise Eio.Io with {!Xrpc_error.E} on failure *) 115 + @raise Eio.Io with [Xrpc_error.E] on failure *) 116 116 117 117 val procedure_blob : 118 118 t -> ··· 130 130 @param blob Raw binary data to upload 131 131 @param content_type MIME type of the blob (e.g., ["image/jpeg"]) 132 132 133 - @raise Eio.Io with {!Xrpc_error.E} on failure *) 133 + @raise Eio.Io with [Xrpc_error.E] on failure *) 134 134 135 135 (** {1 Raw Binary Operations} *) 136 136 ··· 141 141 Returns [(body, content_type)]. Used for endpoints that return binary data 142 142 like [com.atproto.sync.getBlob]. 143 143 144 - @raise Eio.Io with {!Xrpc_error.E} on failure *) 144 + @raise Eio.Io with [Xrpc_error.E] on failure *) 145 145 146 146 val procedure_bytes : 147 147 t -> ··· 155 155 156 156 Returns [Some (body, content_type)] or [None] for 204 No Content. 157 157 158 - @raise Eio.Io with {!Xrpc_error.E} on failure *) 158 + @raise Eio.Io with [Xrpc_error.E] on failure *)
+3 -3
xrpc/xrpc_cred.mli
··· 111 111 @param password Account password or app password 112 112 @param auth_factor_token Optional 2FA token if required 113 113 114 - @raise Eio.Io with {!Xrpc_error.E} on authentication failure *) 114 + @raise Eio.Io with [Xrpc_error.E] on authentication failure *) 115 115 116 116 val login_client : 117 117 t -> ··· 127 127 Returns a new client with auto-refresh enabled. The original client is 128 128 updated with the session but doesn't have the refresh interceptor. 129 129 130 - @raise Eio.Io with {!Xrpc_error.E} on authentication failure *) 130 + @raise Eio.Io with [Xrpc_error.E] on authentication failure *) 131 131 132 132 val resume : t -> session:Xrpc_types.session -> unit -> Xrpc_client.t 133 133 (** [resume cred ~session ()] resumes from a stored session. ··· 135 135 Returns a client with automatic token refresh. If the access token is 136 136 expired but refresh token is valid, a refresh is attempted immediately. 137 137 138 - @raise Eio.Io with {!Xrpc_error.E} if the refresh token is also expired *) 138 + @raise Eio.Io with [Xrpc_error.E] if the refresh token is also expired *) 139 139 140 140 val logout : t -> unit 141 141 (** [logout cred] logs out and clears the session.
+1 -1
xrpc/xrpc_types.mli
··· 10 10 11 11 {2 Session} 12 12 13 - The {!session} type represents an authenticated user session. Sessions 13 + The {!type:session} type represents an authenticated user session. Sessions 14 14 contain JWT tokens for authentication and metadata about the user. 15 15 16 16 {2 Error Payload}