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.

sync

+5888 -5888
+76 -76
lexicons/atproto/atp_lexicon_atproto.ml
··· 16 16 module Com = struct 17 17 module Atproto = struct 18 18 module Repo = struct 19 + module StrongRef = struct 20 + type main = { 21 + cid : string; 22 + uri : string; 23 + } 24 + 25 + let main_jsont = 26 + Jsont.Object.map ~kind:"Main" 27 + (fun _typ cid uri -> { cid; uri }) 28 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.strongRef" ~enc:(fun _ -> "com.atproto.repo.strongRef") 29 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 30 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 31 + |> Jsont.Object.finish 32 + 33 + end 19 34 module Defs = struct 20 35 type commit_meta = { 21 36 cid : string; ··· 28 43 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.defs#commitMeta" ~enc:(fun _ -> "com.atproto.repo.defs#commitMeta") 29 44 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 30 45 |> Jsont.Object.mem "rev" Jsont.string ~enc:(fun r -> r.rev) 31 - |> Jsont.Object.finish 32 - 33 - end 34 - module GetRecord = struct 35 - type params = { 36 - cid : string option; 37 - collection : string; 38 - repo : string; 39 - rkey : string; 40 - } 41 - 42 - let params_jsont = 43 - Jsont.Object.map ~kind:"Params" 44 - (fun cid collection repo rkey -> { 45 - cid; 46 - collection; 47 - repo; 48 - rkey; 49 - }) 50 - |> Jsont.Object.opt_mem "cid" Jsont.string 51 - ~enc:(fun r -> r.cid) 52 - |> Jsont.Object.mem "collection" Jsont.string 53 - ~enc:(fun r -> r.collection) 54 - |> Jsont.Object.mem "repo" Jsont.string 55 - ~enc:(fun r -> r.repo) 56 - |> Jsont.Object.mem "rkey" Jsont.string 57 - ~enc:(fun r -> r.rkey) 58 - |> Jsont.Object.finish 59 - 60 - type output = { 61 - cid : string option; 62 - uri : string; 63 - value : Jsont.json; 64 - } 65 - 66 - let output_jsont = 67 - Jsont.Object.map ~kind:"Output" 68 - (fun _typ cid uri value -> { cid; uri; value }) 69 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.getRecord#output" ~enc:(fun _ -> "com.atproto.repo.getRecord#output") 70 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 71 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 72 - |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 73 46 |> Jsont.Object.finish 74 47 75 48 end ··· 132 105 |> Jsont.Object.finish 133 106 134 107 end 135 - module StrongRef = struct 136 - type main = { 137 - cid : string; 108 + module GetRecord = struct 109 + type params = { 110 + cid : string option; 111 + collection : string; 112 + repo : string; 113 + rkey : string; 114 + } 115 + 116 + let params_jsont = 117 + Jsont.Object.map ~kind:"Params" 118 + (fun cid collection repo rkey -> { 119 + cid; 120 + collection; 121 + repo; 122 + rkey; 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) 128 + |> Jsont.Object.mem "repo" Jsont.string 129 + ~enc:(fun r -> r.repo) 130 + |> Jsont.Object.mem "rkey" Jsont.string 131 + ~enc:(fun r -> r.rkey) 132 + |> Jsont.Object.finish 133 + 134 + type output = { 135 + cid : string option; 138 136 uri : string; 137 + value : Jsont.json; 139 138 } 140 139 141 - let main_jsont = 142 - Jsont.Object.map ~kind:"Main" 143 - (fun _typ cid uri -> { cid; uri }) 144 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.strongRef" ~enc:(fun _ -> "com.atproto.repo.strongRef") 145 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 140 + let output_jsont = 141 + Jsont.Object.map ~kind:"Output" 142 + (fun _typ cid uri value -> { cid; uri; value }) 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) 146 145 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 146 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 147 147 |> Jsont.Object.finish 148 148 149 149 end ··· 189 189 |> Jsont.Object.finish 190 190 191 191 end 192 - module CreateRecord = struct 192 + module DeleteRecord = struct 193 193 type input = { 194 194 collection : string; 195 - record : Jsont.json; 196 195 repo : string; 197 - rkey : string option; 196 + rkey : string; 198 197 swap_commit : string option; 199 - validate : bool option; 198 + swap_record : string option; 200 199 } 201 200 202 201 let input_jsont = 203 202 Jsont.Object.map ~kind:"Input" 204 - (fun _typ collection record repo rkey swap_commit validate -> { collection; record; repo; rkey; swap_commit; validate }) 205 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.createRecord#input" ~enc:(fun _ -> "com.atproto.repo.createRecord#input") 203 + (fun _typ collection repo rkey swap_commit swap_record -> { collection; repo; rkey; swap_commit; swap_record }) 204 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.deleteRecord#input" ~enc:(fun _ -> "com.atproto.repo.deleteRecord#input") 206 205 |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 207 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 208 206 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 209 - |> Jsont.Object.opt_mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 207 + |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 210 208 |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 211 - |> Jsont.Object.opt_mem "validate" Jsont.bool ~enc:(fun r -> r.validate) 209 + |> Jsont.Object.opt_mem "swapRecord" Jsont.string ~enc:(fun r -> r.swap_record) 212 210 |> Jsont.Object.finish 213 211 214 212 type output = { 215 - cid : string; 216 213 commit : Defs.commit_meta option; 217 - uri : string; 218 - validation_status : string option; 219 214 } 220 215 221 216 let output_jsont = 222 217 Jsont.Object.map ~kind:"Output" 223 - (fun _typ cid commit uri validation_status -> { cid; commit; uri; validation_status }) 224 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.createRecord#output" ~enc:(fun _ -> "com.atproto.repo.createRecord#output") 225 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 218 + (fun _typ commit -> { commit }) 219 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.deleteRecord#output" ~enc:(fun _ -> "com.atproto.repo.deleteRecord#output") 226 220 |> Jsont.Object.opt_mem "commit" Defs.commit_meta_jsont ~enc:(fun r -> r.commit) 227 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 228 - |> Jsont.Object.opt_mem "validationStatus" Jsont.string ~enc:(fun r -> r.validation_status) 229 221 |> Jsont.Object.finish 230 222 231 223 end 232 - module DeleteRecord = struct 224 + module CreateRecord = struct 233 225 type input = { 234 226 collection : string; 227 + record : Jsont.json; 235 228 repo : string; 236 - rkey : string; 229 + rkey : string option; 237 230 swap_commit : string option; 238 - swap_record : string option; 231 + validate : bool option; 239 232 } 240 233 241 234 let input_jsont = 242 235 Jsont.Object.map ~kind:"Input" 243 - (fun _typ collection repo rkey swap_commit swap_record -> { collection; repo; rkey; swap_commit; swap_record }) 244 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.deleteRecord#input" ~enc:(fun _ -> "com.atproto.repo.deleteRecord#input") 236 + (fun _typ collection record repo rkey swap_commit validate -> { collection; record; repo; rkey; swap_commit; validate }) 237 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.createRecord#input" ~enc:(fun _ -> "com.atproto.repo.createRecord#input") 245 238 |> Jsont.Object.mem "collection" Jsont.string ~enc:(fun r -> r.collection) 239 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 246 240 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 247 - |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 241 + |> Jsont.Object.opt_mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 248 242 |> Jsont.Object.opt_mem "swapCommit" Jsont.string ~enc:(fun r -> r.swap_commit) 249 - |> Jsont.Object.opt_mem "swapRecord" Jsont.string ~enc:(fun r -> r.swap_record) 243 + |> Jsont.Object.opt_mem "validate" Jsont.bool ~enc:(fun r -> r.validate) 250 244 |> Jsont.Object.finish 251 245 252 246 type output = { 247 + cid : string; 253 248 commit : Defs.commit_meta option; 249 + uri : string; 250 + validation_status : string option; 254 251 } 255 252 256 253 let output_jsont = 257 254 Jsont.Object.map ~kind:"Output" 258 - (fun _typ commit -> { commit }) 259 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"com.atproto.repo.deleteRecord#output" ~enc:(fun _ -> "com.atproto.repo.deleteRecord#output") 255 + (fun _typ cid commit uri validation_status -> { cid; commit; uri; validation_status }) 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 "cid" Jsont.string ~enc:(fun r -> r.cid) 260 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 + |> Jsont.Object.opt_mem "validationStatus" Jsont.string ~enc:(fun r -> r.validation_status) 261 261 |> Jsont.Object.finish 262 262 263 263 end
+42 -42
lexicons/atproto/atp_lexicon_atproto.mli
··· 13 13 module Com : sig 14 14 module Atproto : sig 15 15 module Repo : sig 16 - module Defs : sig 16 + module StrongRef : sig 17 17 18 - type commit_meta = { 18 + type main = { 19 19 cid : string; 20 - rev : string; 20 + uri : string; 21 21 } 22 22 23 - (** Jsont codec for {!type:commit_meta}. *) 24 - val commit_meta_jsont : commit_meta Jsont.t 23 + (** Jsont codec for {!type:main}. *) 24 + val main_jsont : main Jsont.t 25 25 26 26 end 27 - module GetRecord : sig 28 - (** Get a single record from a repository. Does not require auth. *) 29 - 30 - (** Query/procedure parameters. *) 31 - type params = { 32 - cid : string option; (** The CID of the version of the record. If not specified, then return the most recent version. *) 33 - collection : string; (** The NSID of the record collection. *) 34 - repo : string; (** The handle or DID of the repo. *) 35 - rkey : string; (** The Record Key. *) 36 - } 37 - 38 - (** Jsont codec for {!type:params}. *) 39 - val params_jsont : params Jsont.t 40 - 27 + module Defs : sig 41 28 42 - type output = { 43 - cid : string option; 44 - uri : string; 45 - value : Jsont.json; 29 + type commit_meta = { 30 + cid : string; 31 + rev : string; 46 32 } 47 33 48 - (** Jsont codec for {!type:output}. *) 49 - val output_jsont : output Jsont.t 34 + (** Jsont codec for {!type:commit_meta}. *) 35 + val commit_meta_jsont : commit_meta Jsont.t 50 36 51 37 end 52 38 module ListRecords : sig ··· 84 70 val output_jsont : output Jsont.t 85 71 86 72 end 87 - module StrongRef : sig 73 + module GetRecord : sig 74 + (** Get a single record from a repository. Does not require auth. *) 88 75 89 - type main = { 90 - cid : string; 76 + (** Query/procedure parameters. *) 77 + type params = { 78 + cid : string option; (** The CID of the version of the record. If not specified, then return the most recent version. *) 79 + collection : string; (** The NSID of the record collection. *) 80 + repo : string; (** The handle or DID of the repo. *) 81 + rkey : string; (** The Record Key. *) 82 + } 83 + 84 + (** Jsont codec for {!type:params}. *) 85 + val params_jsont : params Jsont.t 86 + 87 + 88 + type output = { 89 + cid : string option; 91 90 uri : string; 91 + value : Jsont.json; 92 92 } 93 93 94 - (** Jsont codec for {!type:main}. *) 95 - val main_jsont : main Jsont.t 94 + (** Jsont codec for {!type:output}. *) 95 + val output_jsont : output Jsont.t 96 96 97 97 end 98 98 module PutRecord : sig ··· 124 124 val output_jsont : output Jsont.t 125 125 126 126 end 127 - module CreateRecord : sig 128 - (** Create a single new repository record. Requires auth, implemented by PDS. *) 127 + module DeleteRecord : sig 128 + (** Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. *) 129 129 130 130 131 131 type input = { 132 132 collection : string; (** The NSID of the record collection. *) 133 - record : Jsont.json; (** The record itself. Must contain a $type field. *) 134 133 repo : string; (** The handle or DID of the repo (aka, current account). *) 135 - rkey : string option; (** The Record Key. *) 134 + rkey : string; (** The Record Key. *) 136 135 swap_commit : string option; (** Compare and swap with the previous commit by CID. *) 137 - 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. *) 136 + swap_record : string option; (** Compare and swap with the previous record by CID. *) 138 137 } 139 138 140 139 (** Jsont codec for {!type:input}. *) ··· 142 141 143 142 144 143 type output = { 145 - cid : string; 146 144 commit : Defs.commit_meta option; 147 - uri : string; 148 - validation_status : string option; 149 145 } 150 146 151 147 (** Jsont codec for {!type:output}. *) 152 148 val output_jsont : output Jsont.t 153 149 154 150 end 155 - module DeleteRecord : sig 156 - (** Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS. *) 151 + module CreateRecord : sig 152 + (** Create a single new repository record. Requires auth, implemented by PDS. *) 157 153 158 154 159 155 type input = { 160 156 collection : string; (** The NSID of the record collection. *) 157 + record : Jsont.json; (** The record itself. Must contain a $type field. *) 161 158 repo : string; (** The handle or DID of the repo (aka, current account). *) 162 - rkey : string; (** The Record Key. *) 159 + rkey : string option; (** The Record Key. *) 163 160 swap_commit : string option; (** Compare and swap with the previous commit by CID. *) 164 - swap_record : string option; (** Compare and swap with the previous record 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. *) 165 162 } 166 163 167 164 (** Jsont codec for {!type:input}. *) ··· 169 166 170 167 171 168 type output = { 169 + cid : string; 172 170 commit : Defs.commit_meta option; 171 + uri : string; 172 + validation_status : string option; 173 173 } 174 174 175 175 (** Jsont codec for {!type:output}. *)
+2499 -2499
lexicons/bsky/atp_lexicon_bsky.ml
··· 15 15 16 16 module Com = struct 17 17 module Atproto = struct 18 - module Moderation = struct 19 - module Defs = struct 20 - type subject_type = string 21 - let subject_type_jsont = Jsont.string 22 - 23 - type reason_violation = string 24 - let reason_violation_jsont = Jsont.string 25 - 26 - type reason_type = string 27 - let reason_type_jsont = Jsont.string 28 - 29 - type reason_spam = string 30 - let reason_spam_jsont = Jsont.string 31 - 32 - type reason_sexual = string 33 - let reason_sexual_jsont = Jsont.string 34 - 35 - type reason_rude = string 36 - let reason_rude_jsont = Jsont.string 37 - 38 - type reason_other = string 39 - let reason_other_jsont = Jsont.string 40 - 41 - type reason_misleading = string 42 - let reason_misleading_jsont = Jsont.string 43 - 44 - type reason_appeal = string 45 - let reason_appeal_jsont = Jsont.string 46 - 47 - end 48 - end 49 18 module Label = struct 50 19 module Defs = struct 51 20 type self_label = { ··· 155 124 156 125 end 157 126 end 127 + module Moderation = struct 128 + module Defs = struct 129 + type subject_type = string 130 + let subject_type_jsont = Jsont.string 131 + 132 + type reason_violation = string 133 + let reason_violation_jsont = Jsont.string 134 + 135 + type reason_type = string 136 + let reason_type_jsont = Jsont.string 137 + 138 + type reason_spam = string 139 + let reason_spam_jsont = Jsont.string 140 + 141 + type reason_sexual = string 142 + let reason_sexual_jsont = Jsont.string 143 + 144 + type reason_rude = string 145 + let reason_rude_jsont = Jsont.string 146 + 147 + type reason_other = string 148 + let reason_other_jsont = Jsont.string 149 + 150 + type reason_misleading = string 151 + let reason_misleading_jsont = Jsont.string 152 + 153 + type reason_appeal = string 154 + let reason_appeal_jsont = Jsont.string 155 + 156 + end 157 + end 158 158 end 159 159 end 160 160 module App = struct 161 161 module Bsky = struct 162 - module AuthFullApp = struct 162 + module AuthManageLabelerService = struct 163 163 type main = unit 164 164 let main_jsont = Jsont.ignore 165 165 ··· 169 169 let main_jsont = Jsont.ignore 170 170 171 171 end 172 + module AuthManageModeration = struct 173 + type main = unit 174 + let main_jsont = Jsont.ignore 175 + 176 + end 177 + module Richtext = struct 178 + module Facet = struct 179 + type tag = { 180 + tag : string; 181 + } 182 + 183 + let tag_jsont = 184 + Jsont.Object.map ~kind:"Tag" 185 + (fun _typ tag -> { tag }) 186 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#tag" ~enc:(fun _ -> "app.bsky.richtext.facet#tag") 187 + |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 188 + |> Jsont.Object.finish 189 + 190 + type mention = { 191 + did : string; 192 + } 193 + 194 + let mention_jsont = 195 + Jsont.Object.map ~kind:"Mention" 196 + (fun _typ did -> { did }) 197 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#mention" ~enc:(fun _ -> "app.bsky.richtext.facet#mention") 198 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 199 + |> Jsont.Object.finish 200 + 201 + type link = { 202 + uri : string; 203 + } 204 + 205 + let link_jsont = 206 + Jsont.Object.map ~kind:"Link" 207 + (fun _typ uri -> { uri }) 208 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#link" ~enc:(fun _ -> "app.bsky.richtext.facet#link") 209 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 210 + |> Jsont.Object.finish 211 + 212 + type byte_slice = { 213 + byte_end : int; 214 + byte_start : int; 215 + } 216 + 217 + let byte_slice_jsont = 218 + Jsont.Object.map ~kind:"Byte_slice" 219 + (fun _typ byte_end byte_start -> { byte_end; byte_start }) 220 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#byteSlice" ~enc:(fun _ -> "app.bsky.richtext.facet#byteSlice") 221 + |> Jsont.Object.mem "byteEnd" Jsont.int ~enc:(fun r -> r.byte_end) 222 + |> Jsont.Object.mem "byteStart" Jsont.int ~enc:(fun r -> r.byte_start) 223 + |> Jsont.Object.finish 224 + 225 + type main = { 226 + features : Jsont.json list; 227 + index : byte_slice; 228 + } 229 + 230 + let main_jsont = 231 + Jsont.Object.map ~kind:"Main" 232 + (fun _typ features index -> { features; index }) 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) 235 + |> Jsont.Object.mem "index" byte_slice_jsont ~enc:(fun r -> r.index) 236 + |> Jsont.Object.finish 237 + 238 + end 239 + end 172 240 module AuthManageFeedDeclarations = struct 173 241 type main = unit 174 242 let main_jsont = Jsont.ignore 175 243 176 244 end 177 - module AuthManageNotifications = struct 245 + module AuthFullApp = struct 178 246 type main = unit 179 247 let main_jsont = Jsont.ignore 180 248 181 249 end 182 - module AuthManageModeration = struct 250 + module AuthManageNotifications = struct 183 251 type main = unit 184 252 let main_jsont = Jsont.ignore 185 253 ··· 189 257 let main_jsont = Jsont.ignore 190 258 191 259 end 192 - module AuthManageLabelerService = struct 260 + module Ageassurance = struct 261 + module Defs = struct 262 + type status = string 263 + let status_jsont = Jsont.string 264 + 265 + type state_metadata = { 266 + account_created_at : string option; 267 + } 268 + 269 + let state_metadata_jsont = 270 + Jsont.Object.map ~kind:"State_metadata" 271 + (fun _typ account_created_at -> { account_created_at }) 272 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#stateMetadata" ~enc:(fun _ -> "app.bsky.ageassurance.defs#stateMetadata") 273 + |> Jsont.Object.opt_mem "accountCreatedAt" Jsont.string ~enc:(fun r -> r.account_created_at) 274 + |> Jsont.Object.finish 275 + 276 + type event = { 277 + access : string; 278 + attempt_id : string; 279 + complete_ip : string option; 280 + complete_ua : string option; 281 + country_code : string; 282 + created_at : string; 283 + email : string option; 284 + init_ip : string option; 285 + init_ua : string option; 286 + region_code : string option; 287 + status : string; 288 + } 289 + 290 + let event_jsont = 291 + Jsont.Object.map ~kind:"Event" 292 + (fun _typ access attempt_id complete_ip complete_ua country_code created_at email init_ip init_ua region_code status -> { access; attempt_id; complete_ip; complete_ua; country_code; created_at; email; init_ip; init_ua; region_code; status }) 293 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#event" ~enc:(fun _ -> "app.bsky.ageassurance.defs#event") 294 + |> Jsont.Object.mem "access" Jsont.string ~enc:(fun r -> r.access) 295 + |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 296 + |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 297 + |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 298 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 299 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 300 + |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 301 + |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 302 + |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 303 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 304 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 305 + |> Jsont.Object.finish 306 + 307 + type config_region = { 308 + country_code : string; 309 + min_access_age : int; 310 + region_code : string option; 311 + rules : Jsont.json list; 312 + } 313 + 314 + let config_region_jsont = 315 + Jsont.Object.map ~kind:"Config_region" 316 + (fun _typ country_code min_access_age region_code rules -> { country_code; min_access_age; region_code; rules }) 317 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegion" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegion") 318 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 319 + |> Jsont.Object.mem "minAccessAge" Jsont.int ~enc:(fun r -> r.min_access_age) 320 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 321 + |> Jsont.Object.mem "rules" (Jsont.list Jsont.json) ~enc:(fun r -> r.rules) 322 + |> Jsont.Object.finish 323 + 324 + type access = string 325 + let access_jsont = Jsont.string 326 + 327 + type state = { 328 + access : access; 329 + last_initiated_at : string option; 330 + status : status; 331 + } 332 + 333 + let state_jsont = 334 + Jsont.Object.map ~kind:"State" 335 + (fun _typ access last_initiated_at status -> { access; last_initiated_at; status }) 336 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#state" ~enc:(fun _ -> "app.bsky.ageassurance.defs#state") 337 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 338 + |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 339 + |> Jsont.Object.mem "status" status_jsont ~enc:(fun r -> r.status) 340 + |> Jsont.Object.finish 341 + 342 + type config_region_rule_if_declared_under_age = { 343 + access : access; 344 + age : int; 345 + } 346 + 347 + let config_region_rule_if_declared_under_age_jsont = 348 + Jsont.Object.map ~kind:"Config_region_rule_if_declared_under_age" 349 + (fun _typ access age -> { access; age }) 350 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge") 351 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 352 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 353 + |> Jsont.Object.finish 354 + 355 + type config_region_rule_if_declared_over_age = { 356 + access : access; 357 + age : int; 358 + } 359 + 360 + let config_region_rule_if_declared_over_age_jsont = 361 + Jsont.Object.map ~kind:"Config_region_rule_if_declared_over_age" 362 + (fun _typ access age -> { access; age }) 363 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge") 364 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 365 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 366 + |> Jsont.Object.finish 367 + 368 + type config_region_rule_if_assured_under_age = { 369 + access : access; 370 + age : int; 371 + } 372 + 373 + let config_region_rule_if_assured_under_age_jsont = 374 + Jsont.Object.map ~kind:"Config_region_rule_if_assured_under_age" 375 + (fun _typ access age -> { access; age }) 376 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge") 377 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 378 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 379 + |> Jsont.Object.finish 380 + 381 + type config_region_rule_if_assured_over_age = { 382 + access : access; 383 + age : int; 384 + } 385 + 386 + let config_region_rule_if_assured_over_age_jsont = 387 + Jsont.Object.map ~kind:"Config_region_rule_if_assured_over_age" 388 + (fun _typ access age -> { access; age }) 389 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge") 390 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 391 + |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 392 + |> Jsont.Object.finish 393 + 394 + type config_region_rule_if_account_older_than = { 395 + access : access; 396 + date : string; 397 + } 398 + 399 + let config_region_rule_if_account_older_than_jsont = 400 + Jsont.Object.map ~kind:"Config_region_rule_if_account_older_than" 401 + (fun _typ access date -> { access; date }) 402 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan") 403 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 404 + |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 405 + |> Jsont.Object.finish 406 + 407 + type config_region_rule_if_account_newer_than = { 408 + access : access; 409 + date : string; 410 + } 411 + 412 + let config_region_rule_if_account_newer_than_jsont = 413 + Jsont.Object.map ~kind:"Config_region_rule_if_account_newer_than" 414 + (fun _typ access date -> { access; date }) 415 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan") 416 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 417 + |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 418 + |> Jsont.Object.finish 419 + 420 + type config_region_rule_default = { 421 + access : access; 422 + } 423 + 424 + let config_region_rule_default_jsont = 425 + Jsont.Object.map ~kind:"Config_region_rule_default" 426 + (fun _typ access -> { access }) 427 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleDefault" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleDefault") 428 + |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 429 + |> Jsont.Object.finish 430 + 431 + type config = { 432 + regions : config_region list; 433 + } 434 + 435 + let config_jsont = 436 + Jsont.Object.map ~kind:"Config" 437 + (fun _typ regions -> { regions }) 438 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#config" ~enc:(fun _ -> "app.bsky.ageassurance.defs#config") 439 + |> Jsont.Object.mem "regions" (Jsont.list config_region_jsont) ~enc:(fun r -> r.regions) 440 + |> Jsont.Object.finish 441 + 442 + end 443 + module Begin = struct 444 + type input = { 445 + country_code : string; 446 + email : string; 447 + language : string; 448 + region_code : string option; 449 + } 450 + 451 + let input_jsont = 452 + Jsont.Object.map ~kind:"Input" 453 + (fun _typ country_code email language region_code -> { country_code; email; language; region_code }) 454 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.begin#input" ~enc:(fun _ -> "app.bsky.ageassurance.begin#input") 455 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 456 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 457 + |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 458 + |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 459 + |> Jsont.Object.finish 460 + 461 + type output = Defs.state 462 + 463 + let output_jsont = Defs.state_jsont 464 + 465 + end 466 + module GetState = struct 467 + type params = { 468 + country_code : string; 469 + region_code : string option; 470 + } 471 + 472 + let params_jsont = 473 + Jsont.Object.map ~kind:"Params" 474 + (fun country_code region_code -> { 475 + country_code; 476 + region_code; 477 + }) 478 + |> Jsont.Object.mem "countryCode" Jsont.string 479 + ~enc:(fun r -> r.country_code) 480 + |> Jsont.Object.opt_mem "regionCode" Jsont.string 481 + ~enc:(fun r -> r.region_code) 482 + |> Jsont.Object.finish 483 + 484 + type output = { 485 + metadata : Defs.state_metadata; 486 + state : Defs.state; 487 + } 488 + 489 + let output_jsont = 490 + Jsont.Object.map ~kind:"Output" 491 + (fun _typ metadata state -> { metadata; state }) 492 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.getState#output" ~enc:(fun _ -> "app.bsky.ageassurance.getState#output") 493 + |> Jsont.Object.mem "metadata" Defs.state_metadata_jsont ~enc:(fun r -> r.metadata) 494 + |> Jsont.Object.mem "state" Defs.state_jsont ~enc:(fun r -> r.state) 495 + |> Jsont.Object.finish 496 + 497 + end 498 + module GetConfig = struct 499 + type output = Defs.config 500 + 501 + let output_jsont = Defs.config_jsont 502 + 503 + end 504 + end 505 + module Labeler = struct 506 + module Defs = struct 507 + type labeler_viewer_state = { 508 + like : string option; 509 + } 510 + 511 + let labeler_viewer_state_jsont = 512 + Jsont.Object.map ~kind:"Labeler_viewer_state" 513 + (fun _typ like -> { like }) 514 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewerState" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewerState") 515 + |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 516 + |> Jsont.Object.finish 517 + 518 + type labeler_policies = { 519 + label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; 520 + label_values : Com.Atproto.Label.Defs.label_value list; 521 + } 522 + 523 + let labeler_policies_jsont = 524 + Jsont.Object.map ~kind:"Labeler_policies" 525 + (fun _typ label_value_definitions label_values -> { label_value_definitions; label_values }) 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) 528 + |> Jsont.Object.mem "labelValues" (Jsont.list Com.Atproto.Label.Defs.label_value_jsont) ~enc:(fun r -> r.label_values) 529 + |> Jsont.Object.finish 530 + 531 + type labeler_view_detailed = { 532 + cid : string; 533 + creator : Jsont.json; 534 + indexed_at : string; 535 + labels : Com.Atproto.Label.Defs.label list option; 536 + like_count : int option; 537 + policies : Jsont.json; 538 + reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 539 + subject_collections : string list option; 540 + subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 541 + uri : string; 542 + viewer : Jsont.json option; 543 + } 544 + 545 + let labeler_view_detailed_jsont = 546 + Jsont.Object.map ~kind:"Labeler_view_detailed" 547 + (fun _typ cid creator indexed_at labels like_count policies reason_types subject_collections subject_types uri viewer -> { cid; creator; indexed_at; labels; like_count; policies; reason_types; subject_collections; subject_types; uri; viewer }) 548 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewDetailed" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewDetailed") 549 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 550 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 551 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 552 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 553 + |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 554 + |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 555 + |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 556 + |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 557 + |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 558 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 559 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 560 + |> Jsont.Object.finish 561 + 562 + type labeler_view = { 563 + cid : string; 564 + creator : Jsont.json; 565 + indexed_at : string; 566 + labels : Com.Atproto.Label.Defs.label list option; 567 + like_count : int option; 568 + uri : string; 569 + viewer : Jsont.json option; 570 + } 571 + 572 + let labeler_view_jsont = 573 + Jsont.Object.map ~kind:"Labeler_view" 574 + (fun _typ cid creator indexed_at labels like_count uri viewer -> { cid; creator; indexed_at; labels; like_count; uri; viewer }) 575 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerView" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerView") 576 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 577 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 578 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 579 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 580 + |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 581 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 582 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 583 + |> Jsont.Object.finish 584 + 585 + end 586 + module Service = struct 587 + type main = { 588 + created_at : string; 589 + labels : Com.Atproto.Label.Defs.self_labels option; 590 + policies : Jsont.json; 591 + reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 592 + subject_collections : string list option; 593 + subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 594 + } 595 + 596 + let main_jsont = 597 + Jsont.Object.map ~kind:"Main" 598 + (fun _typ created_at labels policies reason_types subject_collections subject_types -> { created_at; labels; policies; reason_types; subject_collections; subject_types }) 599 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.service" ~enc:(fun _ -> "app.bsky.labeler.service") 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 + |> 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) 605 + |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 606 + |> Jsont.Object.finish 607 + 608 + end 609 + module GetServices = struct 610 + type params = { 611 + detailed : bool option; 612 + dids : string list; 613 + } 614 + 615 + let params_jsont = 616 + Jsont.Object.map ~kind:"Params" 617 + (fun detailed dids -> { 618 + detailed; 619 + dids; 620 + }) 621 + |> Jsont.Object.opt_mem "detailed" Jsont.bool 622 + ~enc:(fun r -> r.detailed) 623 + |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) 624 + ~enc:(fun r -> r.dids) 625 + |> Jsont.Object.finish 626 + 627 + type output = { 628 + views : Jsont.json list; 629 + } 630 + 631 + let output_jsont = 632 + Jsont.Object.map ~kind:"Output" 633 + (fun _typ views -> { views }) 634 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.getServices#output" ~enc:(fun _ -> "app.bsky.labeler.getServices#output") 635 + |> Jsont.Object.mem "views" (Jsont.list Jsont.json) ~enc:(fun r -> r.views) 636 + |> Jsont.Object.finish 637 + 638 + end 639 + end 640 + module AuthCreatePosts = struct 193 641 type main = unit 194 642 let main_jsont = Jsont.ignore 195 643 196 644 end 197 - module Notification = struct 198 - module GetUnreadCount = struct 645 + module Video = struct 646 + module GetUploadLimits = struct 647 + type output = { 648 + can_upload : bool; 649 + error : string option; 650 + message : string option; 651 + remaining_daily_bytes : int option; 652 + remaining_daily_videos : int option; 653 + } 654 + 655 + let output_jsont = 656 + Jsont.Object.map ~kind:"Output" 657 + (fun _typ can_upload error message remaining_daily_bytes remaining_daily_videos -> { can_upload; error; message; remaining_daily_bytes; remaining_daily_videos }) 658 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getUploadLimits#output" ~enc:(fun _ -> "app.bsky.video.getUploadLimits#output") 659 + |> Jsont.Object.mem "canUpload" Jsont.bool ~enc:(fun r -> r.can_upload) 660 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 661 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 662 + |> Jsont.Object.opt_mem "remainingDailyBytes" Jsont.int ~enc:(fun r -> r.remaining_daily_bytes) 663 + |> Jsont.Object.opt_mem "remainingDailyVideos" Jsont.int ~enc:(fun r -> r.remaining_daily_videos) 664 + |> Jsont.Object.finish 665 + 666 + end 667 + module Defs = struct 668 + type job_status = { 669 + blob : Atp.Blob_ref.t option; 670 + did : string; 671 + error : string option; 672 + job_id : string; 673 + message : string option; 674 + progress : int option; 675 + state : string; 676 + } 677 + 678 + let job_status_jsont = 679 + Jsont.Object.map ~kind:"Job_status" 680 + (fun _typ blob did error job_id message progress state -> { blob; did; error; job_id; message; progress; state }) 681 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.defs#jobStatus" ~enc:(fun _ -> "app.bsky.video.defs#jobStatus") 682 + |> Jsont.Object.opt_mem "blob" Atp.Blob_ref.jsont ~enc:(fun r -> r.blob) 683 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 684 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 685 + |> Jsont.Object.mem "jobId" Jsont.string ~enc:(fun r -> r.job_id) 686 + |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 687 + |> Jsont.Object.opt_mem "progress" Jsont.int ~enc:(fun r -> r.progress) 688 + |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 689 + |> Jsont.Object.finish 690 + 691 + end 692 + module UploadVideo = struct 693 + type input = unit 694 + let input_jsont = Jsont.ignore 695 + 696 + type output = { 697 + job_status : Defs.job_status; 698 + } 699 + 700 + let output_jsont = 701 + Jsont.Object.map ~kind:"Output" 702 + (fun _typ job_status -> { job_status }) 703 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.uploadVideo#output" ~enc:(fun _ -> "app.bsky.video.uploadVideo#output") 704 + |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 705 + |> Jsont.Object.finish 706 + 707 + end 708 + module GetJobStatus = struct 199 709 type params = { 200 - priority : bool option; 201 - seen_at : string option; 710 + job_id : string; 202 711 } 203 712 204 713 let params_jsont = 205 714 Jsont.Object.map ~kind:"Params" 206 - (fun priority seen_at -> { 207 - priority; 208 - seen_at; 715 + (fun job_id -> { 716 + job_id; 209 717 }) 210 - |> Jsont.Object.opt_mem "priority" Jsont.bool 211 - ~enc:(fun r -> r.priority) 212 - |> Jsont.Object.opt_mem "seenAt" Jsont.string 213 - ~enc:(fun r -> r.seen_at) 718 + |> Jsont.Object.mem "jobId" Jsont.string 719 + ~enc:(fun r -> r.job_id) 214 720 |> Jsont.Object.finish 215 721 216 722 type output = { 217 - count : int; 723 + job_status : Defs.job_status; 218 724 } 219 725 220 726 let output_jsont = 221 727 Jsont.Object.map ~kind:"Output" 222 - (fun _typ count -> { count }) 223 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.getUnreadCount#output" ~enc:(fun _ -> "app.bsky.notification.getUnreadCount#output") 224 - |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 728 + (fun _typ job_status -> { job_status }) 729 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getJobStatus#output" ~enc:(fun _ -> "app.bsky.video.getJobStatus#output") 730 + |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 225 731 |> Jsont.Object.finish 226 732 227 733 end 734 + end 735 + module Embed = struct 736 + module External = struct 737 + type view_external = { 738 + description : string; 739 + thumb : string option; 740 + title : string; 741 + uri : string; 742 + } 743 + 744 + let view_external_jsont = 745 + Jsont.Object.map ~kind:"View_external" 746 + (fun _typ description thumb title uri -> { description; thumb; title; uri }) 747 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#viewExternal" ~enc:(fun _ -> "app.bsky.embed.external#viewExternal") 748 + |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 749 + |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 750 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 751 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 752 + |> Jsont.Object.finish 753 + 754 + type external_ = { 755 + description : string; 756 + thumb : Atp.Blob_ref.t option; 757 + title : string; 758 + uri : string; 759 + } 760 + 761 + let external__jsont = 762 + Jsont.Object.map ~kind:"External_" 763 + (fun _typ description thumb title uri -> { description; thumb; title; uri }) 764 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 765 + |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 766 + |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 767 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 768 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 769 + |> Jsont.Object.finish 770 + 771 + type view = { 772 + external_ : Jsont.json; 773 + } 774 + 775 + let view_jsont = 776 + Jsont.Object.map ~kind:"View" 777 + (fun _typ external_ -> { external_ }) 778 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#view" ~enc:(fun _ -> "app.bsky.embed.external#view") 779 + |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 780 + |> Jsont.Object.finish 781 + 782 + type main = { 783 + external_ : Jsont.json; 784 + } 785 + 786 + let main_jsont = 787 + Jsont.Object.map ~kind:"Main" 788 + (fun _typ external_ -> { external_ }) 789 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 790 + |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 791 + |> Jsont.Object.finish 792 + 793 + end 794 + module Defs = struct 795 + type aspect_ratio = { 796 + height : int; 797 + width : int; 798 + } 799 + 800 + let aspect_ratio_jsont = 801 + Jsont.Object.map ~kind:"Aspect_ratio" 802 + (fun _typ height width -> { height; width }) 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) 805 + |> Jsont.Object.mem "width" Jsont.int ~enc:(fun r -> r.width) 806 + |> Jsont.Object.finish 807 + 808 + end 809 + module Images = struct 810 + type view_image = { 811 + alt : string; 812 + aspect_ratio : Jsont.json option; 813 + fullsize : string; 814 + thumb : string; 815 + } 816 + 817 + let view_image_jsont = 818 + Jsont.Object.map ~kind:"View_image" 819 + (fun _typ alt aspect_ratio fullsize thumb -> { alt; aspect_ratio; fullsize; thumb }) 820 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#viewImage" ~enc:(fun _ -> "app.bsky.embed.images#viewImage") 821 + |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 822 + |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 823 + |> Jsont.Object.mem "fullsize" Jsont.string ~enc:(fun r -> r.fullsize) 824 + |> Jsont.Object.mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 825 + |> Jsont.Object.finish 826 + 827 + type image = { 828 + alt : string; 829 + aspect_ratio : Jsont.json option; 830 + image : Atp.Blob_ref.t; 831 + } 832 + 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") 837 + |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 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 + |> Jsont.Object.finish 841 + 842 + type view = { 843 + images : Jsont.json list; 844 + } 845 + 846 + let view_jsont = 847 + Jsont.Object.map ~kind:"View" 848 + (fun _typ images -> { images }) 849 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#view" ~enc:(fun _ -> "app.bsky.embed.images#view") 850 + |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 851 + |> Jsont.Object.finish 852 + 853 + type main = { 854 + images : Jsont.json list; 855 + } 856 + 857 + let main_jsont = 858 + Jsont.Object.map ~kind:"Main" 859 + (fun _typ images -> { images }) 860 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images" ~enc:(fun _ -> "app.bsky.embed.images") 861 + |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 862 + |> Jsont.Object.finish 863 + 864 + end 865 + module Video = struct 866 + type view = { 867 + alt : string option; 868 + aspect_ratio : Jsont.json option; 869 + cid : string; 870 + playlist : string; 871 + thumbnail : string option; 872 + } 873 + 874 + let view_jsont = 875 + Jsont.Object.map ~kind:"View" 876 + (fun _typ alt aspect_ratio cid playlist thumbnail -> { alt; aspect_ratio; cid; playlist; thumbnail }) 877 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#view" ~enc:(fun _ -> "app.bsky.embed.video#view") 878 + |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 879 + |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 880 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 881 + |> Jsont.Object.mem "playlist" Jsont.string ~enc:(fun r -> r.playlist) 882 + |> Jsont.Object.opt_mem "thumbnail" Jsont.string ~enc:(fun r -> r.thumbnail) 883 + |> Jsont.Object.finish 884 + 885 + type caption = { 886 + file : Atp.Blob_ref.t; 887 + lang : string; 888 + } 889 + 890 + let caption_jsont = 891 + Jsont.Object.map ~kind:"Caption" 892 + (fun _typ file lang -> { file; lang }) 893 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#caption" ~enc:(fun _ -> "app.bsky.embed.video#caption") 894 + |> Jsont.Object.mem "file" Atp.Blob_ref.jsont ~enc:(fun r -> r.file) 895 + |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 896 + |> Jsont.Object.finish 897 + 898 + type main = { 899 + alt : string option; 900 + aspect_ratio : Jsont.json option; 901 + captions : Jsont.json list option; 902 + video : Atp.Blob_ref.t; 903 + } 904 + 905 + let main_jsont = 906 + Jsont.Object.map ~kind:"Main" 907 + (fun _typ alt aspect_ratio captions video -> { alt; aspect_ratio; captions; video }) 908 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video" ~enc:(fun _ -> "app.bsky.embed.video") 909 + |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 910 + |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 911 + |> Jsont.Object.opt_mem "captions" (Jsont.list Jsont.json) ~enc:(fun r -> r.captions) 912 + |> Jsont.Object.mem "video" Atp.Blob_ref.jsont ~enc:(fun r -> r.video) 913 + |> Jsont.Object.finish 914 + 915 + end 916 + module RecordWithMedia = struct 917 + type view = { 918 + media : Jsont.json; 919 + record : Jsont.json; 920 + } 921 + 922 + let view_jsont = 923 + Jsont.Object.map ~kind:"View" 924 + (fun _typ media record -> { media; record }) 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) 927 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 928 + |> Jsont.Object.finish 929 + 930 + type main = { 931 + media : Jsont.json; 932 + record : Jsont.json; 933 + } 934 + 935 + let main_jsont = 936 + Jsont.Object.map ~kind:"Main" 937 + (fun _typ media record -> { media; record }) 938 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia") 939 + |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 940 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 941 + |> Jsont.Object.finish 942 + 943 + end 944 + module Record = struct 945 + type view_record = { 946 + author : Jsont.json; 947 + cid : string; 948 + embeds : Jsont.json list option; 949 + indexed_at : string; 950 + labels : Com.Atproto.Label.Defs.label list option; 951 + like_count : int option; 952 + quote_count : int option; 953 + reply_count : int option; 954 + repost_count : int option; 955 + uri : string; 956 + value : Jsont.json; 957 + } 958 + 959 + let view_record_jsont = 960 + Jsont.Object.map ~kind:"View_record" 961 + (fun _typ author cid embeds indexed_at labels like_count quote_count reply_count repost_count uri value -> { author; cid; embeds; indexed_at; labels; like_count; quote_count; reply_count; repost_count; uri; value }) 962 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewRecord" ~enc:(fun _ -> "app.bsky.embed.record#viewRecord") 963 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 964 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 965 + |> Jsont.Object.opt_mem "embeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.embeds) 966 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 967 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 968 + |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 969 + |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 970 + |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 971 + |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 972 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 973 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 974 + |> Jsont.Object.finish 975 + 976 + type view_not_found = { 977 + not_found : bool; 978 + uri : string; 979 + } 980 + 981 + let view_not_found_jsont = 982 + Jsont.Object.map ~kind:"View_not_found" 983 + (fun _typ not_found uri -> { not_found; uri }) 984 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewNotFound" ~enc:(fun _ -> "app.bsky.embed.record#viewNotFound") 985 + |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 986 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 987 + |> Jsont.Object.finish 988 + 989 + type view_detached = { 990 + detached : bool; 991 + uri : string; 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 = { 1003 + author : Jsont.json; 1004 + blocked : bool; 1005 + uri : string; 1006 + } 1007 + 1008 + let view_blocked_jsont = 1009 + Jsont.Object.map ~kind:"View_blocked" 1010 + (fun _typ author blocked uri -> { author; blocked; uri }) 1011 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewBlocked" ~enc:(fun _ -> "app.bsky.embed.record#viewBlocked") 1012 + |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 1013 + |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 1014 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1015 + |> Jsont.Object.finish 1016 + 1017 + type view = { 1018 + record : Jsont.json; 1019 + } 1020 + 1021 + let view_jsont = 1022 + Jsont.Object.map ~kind:"View" 1023 + (fun _typ record -> { record }) 1024 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#view" ~enc:(fun _ -> "app.bsky.embed.record#view") 1025 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 1026 + |> Jsont.Object.finish 1027 + 1028 + type main = { 1029 + record : Com.Atproto.Repo.StrongRef.main; 1030 + } 1031 + 1032 + let main_jsont = 1033 + Jsont.Object.map ~kind:"Main" 1034 + (fun _typ record -> { record }) 1035 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record" ~enc:(fun _ -> "app.bsky.embed.record") 1036 + |> Jsont.Object.mem "record" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.record) 1037 + |> Jsont.Object.finish 1038 + 1039 + end 1040 + end 1041 + module Notification = struct 228 1042 module UpdateSeen = struct 229 1043 type input = { 230 1044 seen_at : string; ··· 235 1049 (fun _typ seen_at -> { seen_at }) 236 1050 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.updateSeen#input" ~enc:(fun _ -> "app.bsky.notification.updateSeen#input") 237 1051 |> Jsont.Object.mem "seenAt" Jsont.string ~enc:(fun r -> r.seen_at) 1052 + |> Jsont.Object.finish 1053 + 1054 + end 1055 + module RegisterPush = struct 1056 + type input = { 1057 + age_restricted : bool option; 1058 + app_id : string; 1059 + platform : string; 1060 + service_did : string; 1061 + token : string; 1062 + } 1063 + 1064 + let input_jsont = 1065 + Jsont.Object.map ~kind:"Input" 1066 + (fun _typ age_restricted app_id platform service_did token -> { age_restricted; app_id; platform; service_did; token }) 1067 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.registerPush#input" ~enc:(fun _ -> "app.bsky.notification.registerPush#input") 1068 + |> Jsont.Object.opt_mem "ageRestricted" Jsont.bool ~enc:(fun r -> r.age_restricted) 1069 + |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 1070 + |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 1071 + |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 1072 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 238 1073 |> Jsont.Object.finish 239 1074 240 1075 end ··· 313 1148 |> Jsont.Object.finish 314 1149 315 1150 end 316 - module Declaration = struct 317 - type main = { 318 - allow_subscriptions : string; 1151 + module GetUnreadCount = struct 1152 + type params = { 1153 + priority : bool option; 1154 + seen_at : string option; 319 1155 } 320 1156 321 - let main_jsont = 322 - Jsont.Object.map ~kind:"Main" 323 - (fun _typ allow_subscriptions -> { allow_subscriptions }) 324 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.declaration" ~enc:(fun _ -> "app.bsky.notification.declaration") 325 - |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1157 + let params_jsont = 1158 + Jsont.Object.map ~kind:"Params" 1159 + (fun priority seen_at -> { 1160 + priority; 1161 + seen_at; 1162 + }) 1163 + |> Jsont.Object.opt_mem "priority" Jsont.bool 1164 + ~enc:(fun r -> r.priority) 1165 + |> Jsont.Object.opt_mem "seenAt" Jsont.string 1166 + ~enc:(fun r -> r.seen_at) 326 1167 |> Jsont.Object.finish 327 1168 328 - end 329 - module PutPreferences = struct 330 - type input = { 331 - priority : bool; 1169 + type output = { 1170 + count : int; 332 1171 } 333 1172 334 - let input_jsont = 335 - Jsont.Object.map ~kind:"Input" 336 - (fun _typ priority -> { priority }) 337 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferences#input" ~enc:(fun _ -> "app.bsky.notification.putPreferences#input") 338 - |> Jsont.Object.mem "priority" Jsont.bool ~enc:(fun r -> r.priority) 1173 + let output_jsont = 1174 + Jsont.Object.map ~kind:"Output" 1175 + (fun _typ count -> { count }) 1176 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.getUnreadCount#output" ~enc:(fun _ -> "app.bsky.notification.getUnreadCount#output") 1177 + |> Jsont.Object.mem "count" Jsont.int ~enc:(fun r -> r.count) 339 1178 |> Jsont.Object.finish 340 1179 341 1180 end 342 - module RegisterPush = struct 1181 + module UnregisterPush = struct 343 1182 type input = { 344 - age_restricted : bool option; 345 1183 app_id : string; 346 1184 platform : string; 347 1185 service_did : string; ··· 350 1188 351 1189 let input_jsont = 352 1190 Jsont.Object.map ~kind:"Input" 353 - (fun _typ age_restricted app_id platform service_did token -> { age_restricted; app_id; platform; service_did; token }) 354 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.registerPush#input" ~enc:(fun _ -> "app.bsky.notification.registerPush#input") 355 - |> Jsont.Object.opt_mem "ageRestricted" Jsont.bool ~enc:(fun r -> r.age_restricted) 1191 + (fun _typ app_id platform service_did token -> { app_id; platform; service_did; token }) 1192 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.unregisterPush#input" ~enc:(fun _ -> "app.bsky.notification.unregisterPush#input") 356 1193 |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 357 1194 |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 358 1195 |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) ··· 360 1197 |> Jsont.Object.finish 361 1198 362 1199 end 363 - module UnregisterPush = struct 1200 + module PutPreferences = struct 364 1201 type input = { 365 - app_id : string; 366 - platform : string; 367 - service_did : string; 368 - token : string; 1202 + priority : bool; 369 1203 } 370 1204 371 1205 let input_jsont = 372 1206 Jsont.Object.map ~kind:"Input" 373 - (fun _typ app_id platform service_did token -> { app_id; platform; service_did; token }) 374 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.unregisterPush#input" ~enc:(fun _ -> "app.bsky.notification.unregisterPush#input") 375 - |> Jsont.Object.mem "appId" Jsont.string ~enc:(fun r -> r.app_id) 376 - |> Jsont.Object.mem "platform" Jsont.string ~enc:(fun r -> r.platform) 377 - |> Jsont.Object.mem "serviceDid" Jsont.string ~enc:(fun r -> r.service_did) 378 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1207 + (fun _typ priority -> { priority }) 1208 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.putPreferences#input" ~enc:(fun _ -> "app.bsky.notification.putPreferences#input") 1209 + |> Jsont.Object.mem "priority" Jsont.bool ~enc:(fun r -> r.priority) 379 1210 |> Jsont.Object.finish 380 1211 381 1212 end ··· 487 1318 |> Jsont.Object.finish 488 1319 489 1320 end 1321 + module Declaration = struct 1322 + type main = { 1323 + allow_subscriptions : string; 1324 + } 1325 + 1326 + let main_jsont = 1327 + Jsont.Object.map ~kind:"Main" 1328 + (fun _typ allow_subscriptions -> { allow_subscriptions }) 1329 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.notification.declaration" ~enc:(fun _ -> "app.bsky.notification.declaration") 1330 + |> Jsont.Object.mem "allowSubscriptions" Jsont.string ~enc:(fun r -> r.allow_subscriptions) 1331 + |> Jsont.Object.finish 1332 + 1333 + end 490 1334 module ListActivitySubscriptions = struct 491 1335 type params = { 492 1336 cursor : string option; ··· 613 1457 614 1458 end 615 1459 end 616 - module Labeler = struct 617 - module Defs = struct 618 - type labeler_viewer_state = { 619 - like : string option; 620 - } 621 - 622 - let labeler_viewer_state_jsont = 623 - Jsont.Object.map ~kind:"Labeler_viewer_state" 624 - (fun _typ like -> { like }) 625 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewerState" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewerState") 626 - |> Jsont.Object.opt_mem "like" Jsont.string ~enc:(fun r -> r.like) 627 - |> Jsont.Object.finish 628 - 629 - type labeler_policies = { 630 - label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; 631 - label_values : Com.Atproto.Label.Defs.label_value list; 632 - } 633 - 634 - let labeler_policies_jsont = 635 - Jsont.Object.map ~kind:"Labeler_policies" 636 - (fun _typ label_value_definitions label_values -> { label_value_definitions; label_values }) 637 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerPolicies" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerPolicies") 638 - |> Jsont.Object.opt_mem "labelValueDefinitions" (Jsont.list Com.Atproto.Label.Defs.label_value_definition_jsont) ~enc:(fun r -> r.label_value_definitions) 639 - |> Jsont.Object.mem "labelValues" (Jsont.list Com.Atproto.Label.Defs.label_value_jsont) ~enc:(fun r -> r.label_values) 640 - |> Jsont.Object.finish 641 - 642 - type labeler_view_detailed = { 643 - cid : string; 644 - creator : Jsont.json; 645 - indexed_at : string; 646 - labels : Com.Atproto.Label.Defs.label list option; 647 - like_count : int option; 648 - policies : Jsont.json; 649 - reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 650 - subject_collections : string list option; 651 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 652 - uri : string; 653 - viewer : Jsont.json option; 654 - } 655 - 656 - let labeler_view_detailed_jsont = 657 - Jsont.Object.map ~kind:"Labeler_view_detailed" 658 - (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 }) 659 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerViewDetailed" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerViewDetailed") 660 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 661 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 662 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 663 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 664 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 665 - |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 666 - |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 667 - |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 668 - |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 669 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 670 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 671 - |> Jsont.Object.finish 672 - 673 - type labeler_view = { 674 - cid : string; 675 - creator : Jsont.json; 676 - indexed_at : string; 677 - labels : Com.Atproto.Label.Defs.label list option; 678 - like_count : int option; 679 - uri : string; 680 - viewer : Jsont.json option; 681 - } 682 - 683 - let labeler_view_jsont = 684 - Jsont.Object.map ~kind:"Labeler_view" 685 - (fun _typ cid creator indexed_at labels like_count uri viewer -> { cid; creator; indexed_at; labels; like_count; uri; viewer }) 686 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.defs#labelerView" ~enc:(fun _ -> "app.bsky.labeler.defs#labelerView") 687 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 688 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 689 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 690 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 691 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 692 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 693 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 694 - |> Jsont.Object.finish 695 - 696 - end 697 - module Service = struct 698 - type main = { 699 - created_at : string; 700 - labels : Com.Atproto.Label.Defs.self_labels option; 701 - policies : Jsont.json; 702 - reason_types : Com.Atproto.Moderation.Defs.reason_type list option; 703 - subject_collections : string list option; 704 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; 705 - } 706 - 707 - let main_jsont = 708 - Jsont.Object.map ~kind:"Main" 709 - (fun _typ created_at labels policies reason_types subject_collections subject_types -> { created_at; labels; policies; reason_types; subject_collections; subject_types }) 710 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.service" ~enc:(fun _ -> "app.bsky.labeler.service") 711 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 712 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 713 - |> Jsont.Object.mem "policies" Jsont.json ~enc:(fun r -> r.policies) 714 - |> Jsont.Object.opt_mem "reasonTypes" (Jsont.list Com.Atproto.Moderation.Defs.reason_type_jsont) ~enc:(fun r -> r.reason_types) 715 - |> Jsont.Object.opt_mem "subjectCollections" (Jsont.list Jsont.string) ~enc:(fun r -> r.subject_collections) 716 - |> Jsont.Object.opt_mem "subjectTypes" (Jsont.list Com.Atproto.Moderation.Defs.subject_type_jsont) ~enc:(fun r -> r.subject_types) 717 - |> Jsont.Object.finish 718 - 719 - end 720 - module GetServices = struct 721 - type params = { 722 - detailed : bool option; 723 - dids : string list; 724 - } 725 - 726 - let params_jsont = 727 - Jsont.Object.map ~kind:"Params" 728 - (fun detailed dids -> { 729 - detailed; 730 - dids; 731 - }) 732 - |> Jsont.Object.opt_mem "detailed" Jsont.bool 733 - ~enc:(fun r -> r.detailed) 734 - |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) 735 - ~enc:(fun r -> r.dids) 736 - |> Jsont.Object.finish 737 - 738 - type output = { 739 - views : Jsont.json list; 740 - } 741 - 742 - let output_jsont = 743 - Jsont.Object.map ~kind:"Output" 744 - (fun _typ views -> { views }) 745 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.labeler.getServices#output" ~enc:(fun _ -> "app.bsky.labeler.getServices#output") 746 - |> Jsont.Object.mem "views" (Jsont.list Jsont.json) ~enc:(fun r -> r.views) 747 - |> Jsont.Object.finish 748 - 749 - end 750 - end 751 1460 module Actor = struct 752 1461 module Status = struct 753 1462 type live = string ··· 768 1477 |> Jsont.Object.opt_mem "durationMinutes" Jsont.int ~enc:(fun r -> r.duration_minutes) 769 1478 |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 770 1479 |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1480 + |> Jsont.Object.finish 1481 + 1482 + end 1483 + module Profile = struct 1484 + type main = { 1485 + avatar : Atp.Blob_ref.t option; 1486 + banner : Atp.Blob_ref.t option; 1487 + created_at : string option; 1488 + description : string option; 1489 + display_name : string option; 1490 + joined_via_starter_pack : Com.Atproto.Repo.StrongRef.main option; 1491 + labels : Com.Atproto.Label.Defs.self_labels option; 1492 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1493 + pronouns : string option; 1494 + website : string option; 1495 + } 1496 + 1497 + let main_jsont = 1498 + Jsont.Object.map ~kind:"Main" 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 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.profile" ~enc:(fun _ -> "app.bsky.actor.profile") 1501 + |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 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 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 1508 + |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 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) 771 1511 |> Jsont.Object.finish 772 1512 773 1513 end ··· 1308 2048 |> Jsont.Object.finish 1309 2049 1310 2050 end 1311 - module Profile = struct 1312 - type main = { 1313 - avatar : Atp.Blob_ref.t option; 1314 - banner : Atp.Blob_ref.t option; 1315 - created_at : string option; 1316 - description : string option; 1317 - display_name : string option; 1318 - joined_via_starter_pack : Com.Atproto.Repo.StrongRef.main option; 1319 - labels : Com.Atproto.Label.Defs.self_labels option; 1320 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 1321 - pronouns : string option; 1322 - website : string option; 1323 - } 1324 - 1325 - let main_jsont = 1326 - Jsont.Object.map ~kind:"Main" 1327 - (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 }) 1328 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.profile" ~enc:(fun _ -> "app.bsky.actor.profile") 1329 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 1330 - |> Jsont.Object.opt_mem "banner" Atp.Blob_ref.jsont ~enc:(fun r -> r.banner) 1331 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1332 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 1333 - |> Jsont.Object.opt_mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 1334 - |> Jsont.Object.opt_mem "joinedViaStarterPack" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.joined_via_starter_pack) 1335 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 1336 - |> Jsont.Object.opt_mem "pinnedPost" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.pinned_post) 1337 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 1338 - |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 1339 - |> Jsont.Object.finish 1340 - 1341 - end 1342 - module GetProfiles = struct 1343 - type params = { 1344 - actors : string list; 1345 - } 1346 - 1347 - let params_jsont = 1348 - Jsont.Object.map ~kind:"Params" 1349 - (fun actors -> { 1350 - actors; 1351 - }) 1352 - |> Jsont.Object.mem "actors" (Jsont.list Jsont.string) 1353 - ~enc:(fun r -> r.actors) 1354 - |> Jsont.Object.finish 1355 - 1356 - type output = { 1357 - profiles : Jsont.json list; 1358 - } 1359 - 1360 - let output_jsont = 1361 - Jsont.Object.map ~kind:"Output" 1362 - (fun _typ profiles -> { profiles }) 1363 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getProfiles#output" ~enc:(fun _ -> "app.bsky.actor.getProfiles#output") 1364 - |> Jsont.Object.mem "profiles" (Jsont.list Jsont.json) ~enc:(fun r -> r.profiles) 1365 - |> Jsont.Object.finish 1366 - 1367 - end 1368 2051 module GetPreferences = struct 1369 2052 type params = unit 1370 2053 ··· 1382 2065 |> Jsont.Object.finish 1383 2066 1384 2067 end 1385 - module GetSuggestions = struct 2068 + module SearchActorsTypeahead = struct 1386 2069 type params = { 1387 - cursor : string option; 1388 2070 limit : int option; 2071 + q : string option; 2072 + term : string option; 1389 2073 } 1390 2074 1391 2075 let params_jsont = 1392 2076 Jsont.Object.map ~kind:"Params" 1393 - (fun cursor limit -> { 1394 - cursor; 2077 + (fun limit q term -> { 1395 2078 limit; 2079 + q; 2080 + term; 1396 2081 }) 1397 - |> Jsont.Object.opt_mem "cursor" Jsont.string 1398 - ~enc:(fun r -> r.cursor) 1399 2082 |> Jsont.Object.opt_mem "limit" Jsont.int 1400 2083 ~enc:(fun r -> r.limit) 2084 + |> Jsont.Object.opt_mem "q" Jsont.string 2085 + ~enc:(fun r -> r.q) 2086 + |> Jsont.Object.opt_mem "term" Jsont.string 2087 + ~enc:(fun r -> r.term) 1401 2088 |> Jsont.Object.finish 1402 2089 1403 2090 type output = { 1404 2091 actors : Jsont.json list; 1405 - cursor : string option; 1406 - rec_id : int option; 1407 2092 } 1408 2093 1409 2094 let output_jsont = 1410 2095 Jsont.Object.map ~kind:"Output" 1411 - (fun _typ actors cursor rec_id -> { actors; cursor; rec_id }) 1412 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getSuggestions#output" ~enc:(fun _ -> "app.bsky.actor.getSuggestions#output") 2096 + (fun _typ actors -> { actors }) 2097 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.searchActorsTypeahead#output" ~enc:(fun _ -> "app.bsky.actor.searchActorsTypeahead#output") 1413 2098 |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 1414 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 1415 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 1416 2099 |> Jsont.Object.finish 1417 2100 1418 2101 end ··· 1475 2158 |> Jsont.Object.finish 1476 2159 1477 2160 end 1478 - module PutPreferences = struct 1479 - type input = { 1480 - preferences : Jsont.json; 1481 - } 1482 - 1483 - let input_jsont = 1484 - Jsont.Object.map ~kind:"Input" 1485 - (fun _typ preferences -> { preferences }) 1486 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.putPreferences#input" ~enc:(fun _ -> "app.bsky.actor.putPreferences#input") 1487 - |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 1488 - |> Jsont.Object.finish 1489 - 1490 - end 1491 - module SearchActorsTypeahead = struct 2161 + module GetSuggestions = struct 1492 2162 type params = { 2163 + cursor : string option; 1493 2164 limit : int option; 1494 - q : string option; 1495 - term : string option; 1496 2165 } 1497 2166 1498 2167 let params_jsont = 1499 2168 Jsont.Object.map ~kind:"Params" 1500 - (fun limit q term -> { 2169 + (fun cursor limit -> { 2170 + cursor; 1501 2171 limit; 1502 - q; 1503 - term; 1504 2172 }) 2173 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2174 + ~enc:(fun r -> r.cursor) 1505 2175 |> Jsont.Object.opt_mem "limit" Jsont.int 1506 2176 ~enc:(fun r -> r.limit) 1507 - |> Jsont.Object.opt_mem "q" Jsont.string 1508 - ~enc:(fun r -> r.q) 1509 - |> Jsont.Object.opt_mem "term" Jsont.string 1510 - ~enc:(fun r -> r.term) 1511 2177 |> Jsont.Object.finish 1512 2178 1513 2179 type output = { 1514 2180 actors : Jsont.json list; 2181 + cursor : string option; 2182 + rec_id : int option; 1515 2183 } 1516 2184 1517 2185 let output_jsont = 1518 2186 Jsont.Object.map ~kind:"Output" 1519 - (fun _typ actors -> { actors }) 1520 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.searchActorsTypeahead#output" ~enc:(fun _ -> "app.bsky.actor.searchActorsTypeahead#output") 2187 + (fun _typ actors cursor rec_id -> { actors; cursor; rec_id }) 2188 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getSuggestions#output" ~enc:(fun _ -> "app.bsky.actor.getSuggestions#output") 1521 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 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 1522 2192 |> Jsont.Object.finish 1523 2193 1524 2194 end 1525 - end 1526 - module Video = struct 1527 - module GetUploadLimits = struct 2195 + module GetProfiles = struct 2196 + type params = { 2197 + actors : string list; 2198 + } 2199 + 2200 + let params_jsont = 2201 + Jsont.Object.map ~kind:"Params" 2202 + (fun actors -> { 2203 + actors; 2204 + }) 2205 + |> Jsont.Object.mem "actors" (Jsont.list Jsont.string) 2206 + ~enc:(fun r -> r.actors) 2207 + |> Jsont.Object.finish 2208 + 1528 2209 type output = { 1529 - can_upload : bool; 1530 - error : string option; 1531 - message : string option; 1532 - remaining_daily_bytes : int option; 1533 - remaining_daily_videos : int option; 2210 + profiles : Jsont.json list; 1534 2211 } 1535 2212 1536 2213 let output_jsont = 1537 2214 Jsont.Object.map ~kind:"Output" 1538 - (fun _typ can_upload error message remaining_daily_bytes remaining_daily_videos -> { can_upload; error; message; remaining_daily_bytes; remaining_daily_videos }) 1539 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getUploadLimits#output" ~enc:(fun _ -> "app.bsky.video.getUploadLimits#output") 1540 - |> Jsont.Object.mem "canUpload" Jsont.bool ~enc:(fun r -> r.can_upload) 1541 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1542 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 1543 - |> Jsont.Object.opt_mem "remainingDailyBytes" Jsont.int ~enc:(fun r -> r.remaining_daily_bytes) 1544 - |> Jsont.Object.opt_mem "remainingDailyVideos" Jsont.int ~enc:(fun r -> r.remaining_daily_videos) 2215 + (fun _typ profiles -> { profiles }) 2216 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.getProfiles#output" ~enc:(fun _ -> "app.bsky.actor.getProfiles#output") 2217 + |> Jsont.Object.mem "profiles" (Jsont.list Jsont.json) ~enc:(fun r -> r.profiles) 2218 + |> Jsont.Object.finish 2219 + 2220 + end 2221 + module PutPreferences = struct 2222 + type input = { 2223 + preferences : Jsont.json; 2224 + } 2225 + 2226 + let input_jsont = 2227 + Jsont.Object.map ~kind:"Input" 2228 + (fun _typ preferences -> { preferences }) 2229 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.actor.putPreferences#input" ~enc:(fun _ -> "app.bsky.actor.putPreferences#input") 2230 + |> Jsont.Object.mem "preferences" Jsont.json ~enc:(fun r -> r.preferences) 1545 2231 |> Jsont.Object.finish 1546 2232 1547 2233 end 2234 + end 2235 + module Contact = struct 1548 2236 module Defs = struct 1549 - type job_status = { 1550 - blob : Atp.Blob_ref.t option; 1551 - did : string; 1552 - error : string option; 1553 - job_id : string; 1554 - message : string option; 1555 - progress : int option; 1556 - state : string; 2237 + type sync_status = { 2238 + matches_count : int; 2239 + synced_at : string; 2240 + } 2241 + 2242 + let sync_status_jsont = 2243 + Jsont.Object.map ~kind:"Sync_status" 2244 + (fun _typ matches_count synced_at -> { matches_count; synced_at }) 2245 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#syncStatus" ~enc:(fun _ -> "app.bsky.contact.defs#syncStatus") 2246 + |> Jsont.Object.mem "matchesCount" Jsont.int ~enc:(fun r -> r.matches_count) 2247 + |> Jsont.Object.mem "syncedAt" Jsont.string ~enc:(fun r -> r.synced_at) 2248 + |> Jsont.Object.finish 2249 + 2250 + type notification = { 2251 + from : string; 2252 + to_ : string; 1557 2253 } 1558 2254 1559 - let job_status_jsont = 1560 - Jsont.Object.map ~kind:"Job_status" 1561 - (fun _typ blob did error job_id message progress state -> { blob; did; error; job_id; message; progress; state }) 1562 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.defs#jobStatus" ~enc:(fun _ -> "app.bsky.video.defs#jobStatus") 1563 - |> Jsont.Object.opt_mem "blob" Atp.Blob_ref.jsont ~enc:(fun r -> r.blob) 1564 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1565 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1566 - |> Jsont.Object.mem "jobId" Jsont.string ~enc:(fun r -> r.job_id) 1567 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 1568 - |> Jsont.Object.opt_mem "progress" Jsont.int ~enc:(fun r -> r.progress) 1569 - |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 2255 + let notification_jsont = 2256 + Jsont.Object.map ~kind:"Notification" 2257 + (fun _typ from to_ -> { from; to_ }) 2258 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#notification" ~enc:(fun _ -> "app.bsky.contact.defs#notification") 2259 + |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 2260 + |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 2261 + |> Jsont.Object.finish 2262 + 2263 + type match_and_contact_index = { 2264 + contact_index : int; 2265 + match_ : Jsont.json; 2266 + } 2267 + 2268 + let match_and_contact_index_jsont = 2269 + Jsont.Object.map ~kind:"Match_and_contact_index" 2270 + (fun _typ contact_index match_ -> { contact_index; match_ }) 2271 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#matchAndContactIndex" ~enc:(fun _ -> "app.bsky.contact.defs#matchAndContactIndex") 2272 + |> Jsont.Object.mem "contactIndex" Jsont.int ~enc:(fun r -> r.contact_index) 2273 + |> Jsont.Object.mem "match" Jsont.json ~enc:(fun r -> r.match_) 2274 + |> Jsont.Object.finish 2275 + 2276 + end 2277 + module RemoveData = struct 2278 + type input = unit 2279 + 2280 + let input_jsont = Jsont.ignore 2281 + 2282 + type output = unit 2283 + 2284 + let output_jsont = Jsont.ignore 2285 + 2286 + end 2287 + module DismissMatch = struct 2288 + type input = { 2289 + subject : string; 2290 + } 2291 + 2292 + let input_jsont = 2293 + Jsont.Object.map ~kind:"Input" 2294 + (fun _typ subject -> { subject }) 2295 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.dismissMatch#input" ~enc:(fun _ -> "app.bsky.contact.dismissMatch#input") 2296 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1570 2297 |> Jsont.Object.finish 1571 2298 2299 + type output = unit 2300 + 2301 + let output_jsont = Jsont.ignore 2302 + 1572 2303 end 1573 - module GetJobStatus = struct 2304 + module GetMatches = struct 1574 2305 type params = { 1575 - job_id : string; 2306 + cursor : string option; 2307 + limit : int option; 1576 2308 } 1577 2309 1578 2310 let params_jsont = 1579 2311 Jsont.Object.map ~kind:"Params" 1580 - (fun job_id -> { 1581 - job_id; 2312 + (fun cursor limit -> { 2313 + cursor; 2314 + limit; 1582 2315 }) 1583 - |> Jsont.Object.mem "jobId" Jsont.string 1584 - ~enc:(fun r -> r.job_id) 2316 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2317 + ~enc:(fun r -> r.cursor) 2318 + |> Jsont.Object.opt_mem "limit" Jsont.int 2319 + ~enc:(fun r -> r.limit) 1585 2320 |> Jsont.Object.finish 1586 2321 1587 2322 type output = { 1588 - job_status : Defs.job_status; 2323 + cursor : string option; 2324 + matches : Jsont.json list; 1589 2325 } 1590 2326 1591 2327 let output_jsont = 1592 2328 Jsont.Object.map ~kind:"Output" 1593 - (fun _typ job_status -> { job_status }) 1594 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.getJobStatus#output" ~enc:(fun _ -> "app.bsky.video.getJobStatus#output") 1595 - |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 2329 + (fun _typ cursor matches -> { cursor; matches }) 2330 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getMatches#output" ~enc:(fun _ -> "app.bsky.contact.getMatches#output") 2331 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2332 + |> Jsont.Object.mem "matches" (Jsont.list Jsont.json) ~enc:(fun r -> r.matches) 1596 2333 |> Jsont.Object.finish 1597 2334 1598 2335 end 1599 - module UploadVideo = struct 1600 - type input = unit 1601 - let input_jsont = Jsont.ignore 2336 + module VerifyPhone = struct 2337 + type input = { 2338 + code : string; 2339 + phone : string; 2340 + } 2341 + 2342 + let input_jsont = 2343 + Jsont.Object.map ~kind:"Input" 2344 + (fun _typ code phone -> { code; phone }) 2345 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#input" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#input") 2346 + |> Jsont.Object.mem "code" Jsont.string ~enc:(fun r -> r.code) 2347 + |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 2348 + |> Jsont.Object.finish 1602 2349 1603 2350 type output = { 1604 - job_status : Defs.job_status; 2351 + token : string; 1605 2352 } 1606 2353 1607 2354 let output_jsont = 1608 2355 Jsont.Object.map ~kind:"Output" 1609 - (fun _typ job_status -> { job_status }) 1610 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.video.uploadVideo#output" ~enc:(fun _ -> "app.bsky.video.uploadVideo#output") 1611 - |> Jsont.Object.mem "jobStatus" Defs.job_status_jsont ~enc:(fun r -> r.job_status) 2356 + (fun _typ token -> { token }) 2357 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#output" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#output") 2358 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1612 2359 |> Jsont.Object.finish 1613 2360 1614 2361 end 1615 - end 1616 - module Richtext = struct 1617 - module Facet = struct 1618 - type tag = { 1619 - tag : string; 1620 - } 1621 - 1622 - let tag_jsont = 1623 - Jsont.Object.map ~kind:"Tag" 1624 - (fun _typ tag -> { tag }) 1625 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#tag" ~enc:(fun _ -> "app.bsky.richtext.facet#tag") 1626 - |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 1627 - |> Jsont.Object.finish 1628 - 1629 - type mention = { 1630 - did : string; 2362 + module StartPhoneVerification = struct 2363 + type input = { 2364 + phone : string; 1631 2365 } 1632 2366 1633 - let mention_jsont = 1634 - Jsont.Object.map ~kind:"Mention" 1635 - (fun _typ did -> { did }) 1636 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#mention" ~enc:(fun _ -> "app.bsky.richtext.facet#mention") 1637 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2367 + let input_jsont = 2368 + Jsont.Object.map ~kind:"Input" 2369 + (fun _typ phone -> { phone }) 2370 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.startPhoneVerification#input" ~enc:(fun _ -> "app.bsky.contact.startPhoneVerification#input") 2371 + |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 1638 2372 |> Jsont.Object.finish 1639 2373 1640 - type link = { 1641 - uri : string; 1642 - } 2374 + type output = unit 1643 2375 1644 - let link_jsont = 1645 - Jsont.Object.map ~kind:"Link" 1646 - (fun _typ uri -> { uri }) 1647 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#link" ~enc:(fun _ -> "app.bsky.richtext.facet#link") 1648 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1649 - |> Jsont.Object.finish 2376 + let output_jsont = Jsont.ignore 1650 2377 1651 - type byte_slice = { 1652 - byte_end : int; 1653 - byte_start : int; 2378 + end 2379 + module SendNotification = struct 2380 + type input = { 2381 + from : string; 2382 + to_ : string; 1654 2383 } 1655 2384 1656 - let byte_slice_jsont = 1657 - Jsont.Object.map ~kind:"Byte_slice" 1658 - (fun _typ byte_end byte_start -> { byte_end; byte_start }) 1659 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet#byteSlice" ~enc:(fun _ -> "app.bsky.richtext.facet#byteSlice") 1660 - |> Jsont.Object.mem "byteEnd" Jsont.int ~enc:(fun r -> r.byte_end) 1661 - |> Jsont.Object.mem "byteStart" Jsont.int ~enc:(fun r -> r.byte_start) 2385 + let input_jsont = 2386 + Jsont.Object.map ~kind:"Input" 2387 + (fun _typ from to_ -> { from; to_ }) 2388 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.sendNotification#input" ~enc:(fun _ -> "app.bsky.contact.sendNotification#input") 2389 + |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 2390 + |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 1662 2391 |> Jsont.Object.finish 1663 2392 1664 - type main = { 1665 - features : Jsont.json list; 1666 - index : byte_slice; 1667 - } 2393 + type output = unit 1668 2394 1669 - let main_jsont = 1670 - Jsont.Object.map ~kind:"Main" 1671 - (fun _typ features index -> { features; index }) 1672 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.richtext.facet" ~enc:(fun _ -> "app.bsky.richtext.facet") 1673 - |> Jsont.Object.mem "features" (Jsont.list Jsont.json) ~enc:(fun r -> r.features) 1674 - |> Jsont.Object.mem "index" byte_slice_jsont ~enc:(fun r -> r.index) 1675 - |> Jsont.Object.finish 2395 + let output_jsont = Jsont.ignore 1676 2396 1677 2397 end 1678 - end 1679 - module AuthCreatePosts = struct 1680 - type main = unit 1681 - let main_jsont = Jsont.ignore 2398 + module GetSyncStatus = struct 2399 + type params = unit 1682 2400 1683 - end 1684 - module Ageassurance = struct 1685 - module Defs = struct 1686 - type status = string 1687 - let status_jsont = Jsont.string 2401 + let params_jsont = Jsont.ignore 1688 2402 1689 - type state_metadata = { 1690 - account_created_at : string option; 2403 + type output = { 2404 + sync_status : Defs.sync_status option; 1691 2405 } 1692 2406 1693 - let state_metadata_jsont = 1694 - Jsont.Object.map ~kind:"State_metadata" 1695 - (fun _typ account_created_at -> { account_created_at }) 1696 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#stateMetadata" ~enc:(fun _ -> "app.bsky.ageassurance.defs#stateMetadata") 1697 - |> Jsont.Object.opt_mem "accountCreatedAt" Jsont.string ~enc:(fun r -> r.account_created_at) 2407 + let output_jsont = 2408 + Jsont.Object.map ~kind:"Output" 2409 + (fun _typ sync_status -> { sync_status }) 2410 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getSyncStatus#output" ~enc:(fun _ -> "app.bsky.contact.getSyncStatus#output") 2411 + |> Jsont.Object.opt_mem "syncStatus" Defs.sync_status_jsont ~enc:(fun r -> r.sync_status) 1698 2412 |> Jsont.Object.finish 1699 2413 1700 - type event = { 1701 - access : string; 1702 - attempt_id : string; 1703 - complete_ip : string option; 1704 - complete_ua : string option; 1705 - country_code : string; 1706 - created_at : string; 1707 - email : string option; 1708 - init_ip : string option; 1709 - init_ua : string option; 1710 - region_code : string option; 1711 - status : string; 2414 + end 2415 + module ImportContacts = struct 2416 + type input = { 2417 + contacts : string list; 2418 + token : string; 1712 2419 } 1713 2420 1714 - let event_jsont = 1715 - Jsont.Object.map ~kind:"Event" 1716 - (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 }) 1717 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#event" ~enc:(fun _ -> "app.bsky.ageassurance.defs#event") 1718 - |> Jsont.Object.mem "access" Jsont.string ~enc:(fun r -> r.access) 1719 - |> Jsont.Object.mem "attemptId" Jsont.string ~enc:(fun r -> r.attempt_id) 1720 - |> Jsont.Object.opt_mem "completeIp" Jsont.string ~enc:(fun r -> r.complete_ip) 1721 - |> Jsont.Object.opt_mem "completeUa" Jsont.string ~enc:(fun r -> r.complete_ua) 1722 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 1723 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1724 - |> Jsont.Object.opt_mem "email" Jsont.string ~enc:(fun r -> r.email) 1725 - |> Jsont.Object.opt_mem "initIp" Jsont.string ~enc:(fun r -> r.init_ip) 1726 - |> Jsont.Object.opt_mem "initUa" Jsont.string ~enc:(fun r -> r.init_ua) 1727 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 1728 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 2421 + let input_jsont = 2422 + Jsont.Object.map ~kind:"Input" 2423 + (fun _typ contacts token -> { contacts; token }) 2424 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#input" ~enc:(fun _ -> "app.bsky.contact.importContacts#input") 2425 + |> Jsont.Object.mem "contacts" (Jsont.list Jsont.string) ~enc:(fun r -> r.contacts) 2426 + |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 1729 2427 |> Jsont.Object.finish 1730 2428 1731 - type config_region = { 1732 - country_code : string; 1733 - min_access_age : int; 1734 - region_code : string option; 1735 - rules : Jsont.json list; 2429 + type output = { 2430 + matches_and_contact_indexes : Defs.match_and_contact_index list; 1736 2431 } 1737 2432 1738 - let config_region_jsont = 1739 - Jsont.Object.map ~kind:"Config_region" 1740 - (fun _typ country_code min_access_age region_code rules -> { country_code; min_access_age; region_code; rules }) 1741 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegion" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegion") 1742 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 1743 - |> Jsont.Object.mem "minAccessAge" Jsont.int ~enc:(fun r -> r.min_access_age) 1744 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 1745 - |> Jsont.Object.mem "rules" (Jsont.list Jsont.json) ~enc:(fun r -> r.rules) 2433 + let output_jsont = 2434 + Jsont.Object.map ~kind:"Output" 2435 + (fun _typ matches_and_contact_indexes -> { matches_and_contact_indexes }) 2436 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#output" ~enc:(fun _ -> "app.bsky.contact.importContacts#output") 2437 + |> Jsont.Object.mem "matchesAndContactIndexes" (Jsont.list Defs.match_and_contact_index_jsont) ~enc:(fun r -> r.matches_and_contact_indexes) 1746 2438 |> Jsont.Object.finish 1747 2439 1748 - type access = string 1749 - let access_jsont = Jsont.string 1750 - 1751 - type state = { 1752 - access : access; 1753 - last_initiated_at : string option; 1754 - status : status; 2440 + end 2441 + end 2442 + module Graph = struct 2443 + module Starterpack = struct 2444 + type feed_item = { 2445 + uri : string; 1755 2446 } 1756 2447 1757 - let state_jsont = 1758 - Jsont.Object.map ~kind:"State" 1759 - (fun _typ access last_initiated_at status -> { access; last_initiated_at; status }) 1760 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#state" ~enc:(fun _ -> "app.bsky.ageassurance.defs#state") 1761 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1762 - |> Jsont.Object.opt_mem "lastInitiatedAt" Jsont.string ~enc:(fun r -> r.last_initiated_at) 1763 - |> Jsont.Object.mem "status" status_jsont ~enc:(fun r -> r.status) 2448 + let feed_item_jsont = 2449 + Jsont.Object.map ~kind:"Feed_item" 2450 + (fun _typ uri -> { uri }) 2451 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.starterpack#feedItem" ~enc:(fun _ -> "app.bsky.graph.starterpack#feedItem") 2452 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1764 2453 |> Jsont.Object.finish 1765 2454 1766 - type config_region_rule_if_declared_under_age = { 1767 - access : access; 1768 - age : int; 2455 + type main = { 2456 + created_at : string; 2457 + description : string option; 2458 + description_facets : Richtext.Facet.main list option; 2459 + feeds : Jsont.json list option; 2460 + list_ : string; 2461 + name : string; 1769 2462 } 1770 2463 1771 - let config_region_rule_if_declared_under_age_jsont = 1772 - Jsont.Object.map ~kind:"Config_region_rule_if_declared_under_age" 1773 - (fun _typ access age -> { access; age }) 1774 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge") 1775 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1776 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 2464 + let main_jsont = 2465 + Jsont.Object.map ~kind:"Main" 2466 + (fun _typ created_at description description_facets feeds list_ name -> { created_at; description; description_facets; feeds; list_; name }) 2467 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.starterpack" ~enc:(fun _ -> "app.bsky.graph.starterpack") 2468 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2469 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2470 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2471 + |> Jsont.Object.opt_mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 2472 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2473 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1777 2474 |> Jsont.Object.finish 1778 2475 1779 - type config_region_rule_if_declared_over_age = { 1780 - access : access; 1781 - age : int; 2476 + end 2477 + module GetFollows = struct 2478 + type params = { 2479 + actor : string; 2480 + cursor : string option; 2481 + limit : int option; 1782 2482 } 1783 2483 1784 - let config_region_rule_if_declared_over_age_jsont = 1785 - Jsont.Object.map ~kind:"Config_region_rule_if_declared_over_age" 1786 - (fun _typ access age -> { access; age }) 1787 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge") 1788 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1789 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 2484 + let params_jsont = 2485 + Jsont.Object.map ~kind:"Params" 2486 + (fun actor cursor limit -> { 2487 + actor; 2488 + cursor; 2489 + limit; 2490 + }) 2491 + |> Jsont.Object.mem "actor" Jsont.string 2492 + ~enc:(fun r -> r.actor) 2493 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2494 + ~enc:(fun r -> r.cursor) 2495 + |> Jsont.Object.opt_mem "limit" Jsont.int 2496 + ~enc:(fun r -> r.limit) 1790 2497 |> Jsont.Object.finish 1791 2498 1792 - type config_region_rule_if_assured_under_age = { 1793 - access : access; 1794 - age : int; 2499 + type output = { 2500 + cursor : string option; 2501 + follows : Jsont.json list; 2502 + subject : Jsont.json; 1795 2503 } 1796 2504 1797 - let config_region_rule_if_assured_under_age_jsont = 1798 - Jsont.Object.map ~kind:"Config_region_rule_if_assured_under_age" 1799 - (fun _typ access age -> { access; age }) 1800 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge") 1801 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1802 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 2505 + let output_jsont = 2506 + Jsont.Object.map ~kind:"Output" 2507 + (fun _typ cursor follows subject -> { cursor; follows; subject }) 2508 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollows#output" ~enc:(fun _ -> "app.bsky.graph.getFollows#output") 2509 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2510 + |> Jsont.Object.mem "follows" (Jsont.list Jsont.json) ~enc:(fun r -> r.follows) 2511 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 1803 2512 |> Jsont.Object.finish 1804 2513 1805 - type config_region_rule_if_assured_over_age = { 1806 - access : access; 1807 - age : int; 2514 + end 2515 + module GetSuggestedFollowsByActor = struct 2516 + type params = { 2517 + actor : string; 1808 2518 } 1809 2519 1810 - let config_region_rule_if_assured_over_age_jsont = 1811 - Jsont.Object.map ~kind:"Config_region_rule_if_assured_over_age" 1812 - (fun _typ access age -> { access; age }) 1813 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge") 1814 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1815 - |> Jsont.Object.mem "age" Jsont.int ~enc:(fun r -> r.age) 2520 + let params_jsont = 2521 + Jsont.Object.map ~kind:"Params" 2522 + (fun actor -> { 2523 + actor; 2524 + }) 2525 + |> Jsont.Object.mem "actor" Jsont.string 2526 + ~enc:(fun r -> r.actor) 1816 2527 |> Jsont.Object.finish 1817 2528 1818 - type config_region_rule_if_account_older_than = { 1819 - access : access; 1820 - date : string; 2529 + type output = { 2530 + is_fallback : bool option; 2531 + rec_id : int option; 2532 + suggestions : Jsont.json list; 1821 2533 } 1822 2534 1823 - let config_region_rule_if_account_older_than_jsont = 1824 - Jsont.Object.map ~kind:"Config_region_rule_if_account_older_than" 1825 - (fun _typ access date -> { access; date }) 1826 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan") 1827 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1828 - |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 2535 + let output_jsont = 2536 + Jsont.Object.map ~kind:"Output" 2537 + (fun _typ is_fallback rec_id suggestions -> { is_fallback; rec_id; suggestions }) 2538 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getSuggestedFollowsByActor#output" ~enc:(fun _ -> "app.bsky.graph.getSuggestedFollowsByActor#output") 2539 + |> Jsont.Object.opt_mem "isFallback" Jsont.bool ~enc:(fun r -> r.is_fallback) 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) 1829 2542 |> Jsont.Object.finish 1830 2543 1831 - type config_region_rule_if_account_newer_than = { 1832 - access : access; 1833 - date : string; 2544 + end 2545 + module Block = struct 2546 + type main = { 2547 + created_at : string; 2548 + subject : string; 1834 2549 } 1835 2550 1836 - let config_region_rule_if_account_newer_than_jsont = 1837 - Jsont.Object.map ~kind:"Config_region_rule_if_account_newer_than" 1838 - (fun _typ access date -> { access; date }) 1839 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan") 1840 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 1841 - |> Jsont.Object.mem "date" Jsont.string ~enc:(fun r -> r.date) 2551 + let main_jsont = 2552 + Jsont.Object.map ~kind:"Main" 2553 + (fun _typ created_at subject -> { created_at; subject }) 2554 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.block" ~enc:(fun _ -> "app.bsky.graph.block") 2555 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2556 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1842 2557 |> Jsont.Object.finish 1843 2558 1844 - type config_region_rule_default = { 1845 - access : access; 2559 + end 2560 + module Listblock = struct 2561 + type main = { 2562 + created_at : string; 2563 + subject : string; 1846 2564 } 1847 2565 1848 - let config_region_rule_default_jsont = 1849 - Jsont.Object.map ~kind:"Config_region_rule_default" 1850 - (fun _typ access -> { access }) 1851 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#configRegionRuleDefault" ~enc:(fun _ -> "app.bsky.ageassurance.defs#configRegionRuleDefault") 1852 - |> Jsont.Object.mem "access" access_jsont ~enc:(fun r -> r.access) 2566 + let main_jsont = 2567 + Jsont.Object.map ~kind:"Main" 2568 + (fun _typ created_at subject -> { created_at; subject }) 2569 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listblock" ~enc:(fun _ -> "app.bsky.graph.listblock") 2570 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2571 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1853 2572 |> Jsont.Object.finish 1854 2573 1855 - type config = { 1856 - regions : config_region list; 2574 + end 2575 + module MuteThread = struct 2576 + type input = { 2577 + root : string; 1857 2578 } 1858 2579 1859 - let config_jsont = 1860 - Jsont.Object.map ~kind:"Config" 1861 - (fun _typ regions -> { regions }) 1862 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.defs#config" ~enc:(fun _ -> "app.bsky.ageassurance.defs#config") 1863 - |> Jsont.Object.mem "regions" (Jsont.list config_region_jsont) ~enc:(fun r -> r.regions) 2580 + let input_jsont = 2581 + Jsont.Object.map ~kind:"Input" 2582 + (fun _typ root -> { root }) 2583 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteThread#input" ~enc:(fun _ -> "app.bsky.graph.muteThread#input") 2584 + |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 1864 2585 |> Jsont.Object.finish 1865 2586 1866 2587 end 1867 - module GetState = struct 2588 + module GetFollowers = struct 1868 2589 type params = { 1869 - country_code : string; 1870 - region_code : string option; 2590 + actor : string; 2591 + cursor : string option; 2592 + limit : int option; 1871 2593 } 1872 2594 1873 2595 let params_jsont = 1874 2596 Jsont.Object.map ~kind:"Params" 1875 - (fun country_code region_code -> { 1876 - country_code; 1877 - region_code; 2597 + (fun actor cursor limit -> { 2598 + actor; 2599 + cursor; 2600 + limit; 1878 2601 }) 1879 - |> Jsont.Object.mem "countryCode" Jsont.string 1880 - ~enc:(fun r -> r.country_code) 1881 - |> Jsont.Object.opt_mem "regionCode" Jsont.string 1882 - ~enc:(fun r -> r.region_code) 2602 + |> Jsont.Object.mem "actor" Jsont.string 2603 + ~enc:(fun r -> r.actor) 2604 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2605 + ~enc:(fun r -> r.cursor) 2606 + |> Jsont.Object.opt_mem "limit" Jsont.int 2607 + ~enc:(fun r -> r.limit) 1883 2608 |> Jsont.Object.finish 1884 2609 1885 2610 type output = { 1886 - metadata : Defs.state_metadata; 1887 - state : Defs.state; 2611 + cursor : string option; 2612 + followers : Jsont.json list; 2613 + subject : Jsont.json; 1888 2614 } 1889 2615 1890 2616 let output_jsont = 1891 2617 Jsont.Object.map ~kind:"Output" 1892 - (fun _typ metadata state -> { metadata; state }) 1893 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.getState#output" ~enc:(fun _ -> "app.bsky.ageassurance.getState#output") 1894 - |> Jsont.Object.mem "metadata" Defs.state_metadata_jsont ~enc:(fun r -> r.metadata) 1895 - |> Jsont.Object.mem "state" Defs.state_jsont ~enc:(fun r -> r.state) 2618 + (fun _typ cursor followers subject -> { cursor; followers; subject }) 2619 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getFollowers#output") 2620 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2621 + |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2622 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 1896 2623 |> Jsont.Object.finish 1897 2624 1898 2625 end 1899 - module Begin = struct 2626 + module UnmuteThread = struct 1900 2627 type input = { 1901 - country_code : string; 1902 - email : string; 1903 - language : string; 1904 - region_code : string option; 2628 + root : string; 1905 2629 } 1906 2630 1907 2631 let input_jsont = 1908 2632 Jsont.Object.map ~kind:"Input" 1909 - (fun _typ country_code email language region_code -> { country_code; email; language; region_code }) 1910 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.ageassurance.begin#input" ~enc:(fun _ -> "app.bsky.ageassurance.begin#input") 1911 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 1912 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 1913 - |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 1914 - |> Jsont.Object.opt_mem "regionCode" Jsont.string ~enc:(fun r -> r.region_code) 2633 + (fun _typ root -> { root }) 2634 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteThread#input" ~enc:(fun _ -> "app.bsky.graph.unmuteThread#input") 2635 + |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 1915 2636 |> Jsont.Object.finish 1916 2637 1917 - type output = Defs.state 1918 - 1919 - let output_jsont = Defs.state_jsont 1920 - 1921 2638 end 1922 - module GetConfig = struct 1923 - type output = Defs.config 1924 - 1925 - let output_jsont = Defs.config_jsont 1926 - 1927 - end 1928 - end 1929 - module Embed = struct 1930 - module Defs = struct 1931 - type aspect_ratio = { 1932 - height : int; 1933 - width : int; 2639 + module Follow = struct 2640 + type main = { 2641 + created_at : string; 2642 + subject : string; 2643 + via : Com.Atproto.Repo.StrongRef.main option; 1934 2644 } 1935 2645 1936 - let aspect_ratio_jsont = 1937 - Jsont.Object.map ~kind:"Aspect_ratio" 1938 - (fun _typ height width -> { height; width }) 1939 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.defs#aspectRatio" ~enc:(fun _ -> "app.bsky.embed.defs#aspectRatio") 1940 - |> Jsont.Object.mem "height" Jsont.int ~enc:(fun r -> r.height) 1941 - |> Jsont.Object.mem "width" Jsont.int ~enc:(fun r -> r.width) 2646 + let main_jsont = 2647 + Jsont.Object.map ~kind:"Main" 2648 + (fun _typ created_at subject via -> { created_at; subject; via }) 2649 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.follow" ~enc:(fun _ -> "app.bsky.graph.follow") 2650 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2651 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2652 + |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 1942 2653 |> Jsont.Object.finish 1943 2654 1944 2655 end 1945 - module External = struct 1946 - type view_external = { 1947 - description : string; 1948 - thumb : string option; 1949 - title : string; 1950 - uri : string; 2656 + module UnmuteActor = struct 2657 + type input = { 2658 + actor : string; 1951 2659 } 1952 2660 1953 - let view_external_jsont = 1954 - Jsont.Object.map ~kind:"View_external" 1955 - (fun _typ description thumb title uri -> { description; thumb; title; uri }) 1956 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#viewExternal" ~enc:(fun _ -> "app.bsky.embed.external#viewExternal") 1957 - |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 1958 - |> Jsont.Object.opt_mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 1959 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1960 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2661 + let input_jsont = 2662 + Jsont.Object.map ~kind:"Input" 2663 + (fun _typ actor -> { actor }) 2664 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActor#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActor#input") 2665 + |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 1961 2666 |> Jsont.Object.finish 1962 2667 1963 - type external_ = { 1964 - description : string; 1965 - thumb : Atp.Blob_ref.t option; 1966 - title : string; 1967 - uri : string; 1968 - } 1969 - 1970 - let external__jsont = 1971 - Jsont.Object.map ~kind:"External_" 1972 - (fun _typ description thumb title uri -> { description; thumb; title; uri }) 1973 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#external" ~enc:(fun _ -> "app.bsky.embed.external#external") 1974 - |> Jsont.Object.mem "description" Jsont.string ~enc:(fun r -> r.description) 1975 - |> Jsont.Object.opt_mem "thumb" Atp.Blob_ref.jsont ~enc:(fun r -> r.thumb) 1976 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1977 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 1978 - |> Jsont.Object.finish 1979 - 1980 - type view = { 1981 - external_ : Jsont.json; 2668 + end 2669 + module MuteActorList = struct 2670 + type input = { 2671 + list_ : string; 1982 2672 } 1983 2673 1984 - let view_jsont = 1985 - Jsont.Object.map ~kind:"View" 1986 - (fun _typ external_ -> { external_ }) 1987 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external#view" ~enc:(fun _ -> "app.bsky.embed.external#view") 1988 - |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 2674 + let input_jsont = 2675 + Jsont.Object.map ~kind:"Input" 2676 + (fun _typ list_ -> { list_ }) 2677 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActorList#input" ~enc:(fun _ -> "app.bsky.graph.muteActorList#input") 2678 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 1989 2679 |> Jsont.Object.finish 1990 2680 1991 - type main = { 1992 - external_ : Jsont.json; 2681 + end 2682 + module UnmuteActorList = struct 2683 + type input = { 2684 + list_ : string; 1993 2685 } 1994 2686 1995 - let main_jsont = 1996 - Jsont.Object.map ~kind:"Main" 1997 - (fun _typ external_ -> { external_ }) 1998 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.external" ~enc:(fun _ -> "app.bsky.embed.external") 1999 - |> Jsont.Object.mem "external" Jsont.json ~enc:(fun r -> r.external_) 2687 + let input_jsont = 2688 + Jsont.Object.map ~kind:"Input" 2689 + (fun _typ list_ -> { list_ }) 2690 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActorList#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActorList#input") 2691 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2000 2692 |> Jsont.Object.finish 2001 2693 2002 2694 end 2003 - module Images = struct 2004 - type view_image = { 2005 - alt : string; 2006 - aspect_ratio : Jsont.json option; 2007 - fullsize : string; 2008 - thumb : string; 2695 + module GetKnownFollowers = struct 2696 + type params = { 2697 + actor : string; 2698 + cursor : string option; 2699 + limit : int option; 2009 2700 } 2010 2701 2011 - let view_image_jsont = 2012 - Jsont.Object.map ~kind:"View_image" 2013 - (fun _typ alt aspect_ratio fullsize thumb -> { alt; aspect_ratio; fullsize; thumb }) 2014 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#viewImage" ~enc:(fun _ -> "app.bsky.embed.images#viewImage") 2015 - |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 2016 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 2017 - |> Jsont.Object.mem "fullsize" Jsont.string ~enc:(fun r -> r.fullsize) 2018 - |> Jsont.Object.mem "thumb" Jsont.string ~enc:(fun r -> r.thumb) 2702 + let params_jsont = 2703 + Jsont.Object.map ~kind:"Params" 2704 + (fun actor cursor limit -> { 2705 + actor; 2706 + cursor; 2707 + limit; 2708 + }) 2709 + |> Jsont.Object.mem "actor" Jsont.string 2710 + ~enc:(fun r -> r.actor) 2711 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2712 + ~enc:(fun r -> r.cursor) 2713 + |> Jsont.Object.opt_mem "limit" Jsont.int 2714 + ~enc:(fun r -> r.limit) 2019 2715 |> Jsont.Object.finish 2020 2716 2021 - type image = { 2022 - alt : string; 2023 - aspect_ratio : Jsont.json option; 2024 - image : Atp.Blob_ref.t; 2717 + type output = { 2718 + cursor : string option; 2719 + followers : Jsont.json list; 2720 + subject : Jsont.json; 2025 2721 } 2026 2722 2027 - let image_jsont = 2028 - Jsont.Object.map ~kind:"Image" 2029 - (fun _typ alt aspect_ratio image -> { alt; aspect_ratio; image }) 2030 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#image" ~enc:(fun _ -> "app.bsky.embed.images#image") 2031 - |> Jsont.Object.mem "alt" Jsont.string ~enc:(fun r -> r.alt) 2032 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 2033 - |> Jsont.Object.mem "image" Atp.Blob_ref.jsont ~enc:(fun r -> r.image) 2723 + let output_jsont = 2724 + Jsont.Object.map ~kind:"Output" 2725 + (fun _typ cursor followers subject -> { cursor; followers; subject }) 2726 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getKnownFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getKnownFollowers#output") 2727 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2728 + |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 2729 + |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 2034 2730 |> Jsont.Object.finish 2035 2731 2036 - type view = { 2037 - images : Jsont.json list; 2732 + end 2733 + module MuteActor = struct 2734 + type input = { 2735 + actor : string; 2038 2736 } 2039 2737 2040 - let view_jsont = 2041 - Jsont.Object.map ~kind:"View" 2042 - (fun _typ images -> { images }) 2043 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images#view" ~enc:(fun _ -> "app.bsky.embed.images#view") 2044 - |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 2738 + let input_jsont = 2739 + Jsont.Object.map ~kind:"Input" 2740 + (fun _typ actor -> { actor }) 2741 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActor#input" ~enc:(fun _ -> "app.bsky.graph.muteActor#input") 2742 + |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 2045 2743 |> Jsont.Object.finish 2046 2744 2745 + end 2746 + module Listitem = struct 2047 2747 type main = { 2048 - images : Jsont.json list; 2748 + created_at : string; 2749 + list_ : string; 2750 + subject : string; 2049 2751 } 2050 2752 2051 2753 let main_jsont = 2052 2754 Jsont.Object.map ~kind:"Main" 2053 - (fun _typ images -> { images }) 2054 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.images" ~enc:(fun _ -> "app.bsky.embed.images") 2055 - |> Jsont.Object.mem "images" (Jsont.list Jsont.json) ~enc:(fun r -> r.images) 2755 + (fun _typ created_at list_ subject -> { created_at; list_; subject }) 2756 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listitem" ~enc:(fun _ -> "app.bsky.graph.listitem") 2757 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2758 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 2759 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2056 2760 |> Jsont.Object.finish 2057 2761 2058 2762 end 2059 - module Video = struct 2060 - type view = { 2061 - alt : string option; 2062 - aspect_ratio : Jsont.json option; 2763 + module Defs = struct 2764 + type starter_pack_view_basic = { 2063 2765 cid : string; 2064 - playlist : string; 2065 - thumbnail : string option; 2766 + creator : Jsont.json; 2767 + indexed_at : string; 2768 + joined_all_time_count : int option; 2769 + joined_week_count : int option; 2770 + labels : Com.Atproto.Label.Defs.label list option; 2771 + list_item_count : int option; 2772 + record : Jsont.json; 2773 + uri : string; 2066 2774 } 2067 2775 2068 - let view_jsont = 2069 - Jsont.Object.map ~kind:"View" 2070 - (fun _typ alt aspect_ratio cid playlist thumbnail -> { alt; aspect_ratio; cid; playlist; thumbnail }) 2071 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#view" ~enc:(fun _ -> "app.bsky.embed.video#view") 2072 - |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 2073 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 2776 + let starter_pack_view_basic_jsont = 2777 + Jsont.Object.map ~kind:"Starter_pack_view_basic" 2778 + (fun _typ cid creator indexed_at joined_all_time_count joined_week_count labels list_item_count record uri -> { cid; creator; indexed_at; joined_all_time_count; joined_week_count; labels; list_item_count; record; uri }) 2779 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackViewBasic") 2074 2780 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2075 - |> Jsont.Object.mem "playlist" Jsont.string ~enc:(fun r -> r.playlist) 2076 - |> Jsont.Object.opt_mem "thumbnail" Jsont.string ~enc:(fun r -> r.thumbnail) 2781 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2782 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2783 + |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 2784 + |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 2785 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2786 + |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2787 + |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2788 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2077 2789 |> Jsont.Object.finish 2078 2790 2079 - type caption = { 2080 - file : Atp.Blob_ref.t; 2081 - lang : 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; 2082 2799 } 2083 2800 2084 - let caption_jsont = 2085 - Jsont.Object.map ~kind:"Caption" 2086 - (fun _typ file lang -> { file; lang }) 2087 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video#caption" ~enc:(fun _ -> "app.bsky.embed.video#caption") 2088 - |> Jsont.Object.mem "file" Atp.Blob_ref.jsont ~enc:(fun r -> r.file) 2089 - |> Jsont.Object.mem "lang" Jsont.string ~enc:(fun r -> r.lang) 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) 2090 2812 |> Jsont.Object.finish 2091 2813 2092 - type main = { 2093 - alt : string option; 2094 - aspect_ratio : Jsont.json option; 2095 - captions : Jsont.json list option; 2096 - video : Atp.Blob_ref.t; 2814 + type referencelist = string 2815 + let referencelist_jsont = Jsont.string 2816 + 2817 + type not_found_actor = { 2818 + actor : string; 2819 + not_found : bool; 2097 2820 } 2098 2821 2099 - let main_jsont = 2100 - Jsont.Object.map ~kind:"Main" 2101 - (fun _typ alt aspect_ratio captions video -> { alt; aspect_ratio; captions; video }) 2102 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.video" ~enc:(fun _ -> "app.bsky.embed.video") 2103 - |> Jsont.Object.opt_mem "alt" Jsont.string ~enc:(fun r -> r.alt) 2104 - |> Jsont.Object.opt_mem "aspectRatio" Jsont.json ~enc:(fun r -> r.aspect_ratio) 2105 - |> Jsont.Object.opt_mem "captions" (Jsont.list Jsont.json) ~enc:(fun r -> r.captions) 2106 - |> Jsont.Object.mem "video" Atp.Blob_ref.jsont ~enc:(fun r -> r.video) 2822 + let not_found_actor_jsont = 2823 + Jsont.Object.map ~kind:"Not_found_actor" 2824 + (fun _typ actor not_found -> { actor; not_found }) 2825 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#notFoundActor" ~enc:(fun _ -> "app.bsky.graph.defs#notFoundActor") 2826 + |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 2827 + |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 2107 2828 |> Jsont.Object.finish 2108 2829 2109 - end 2110 - module RecordWithMedia = struct 2111 - type view = { 2112 - media : Jsont.json; 2113 - record : Jsont.json; 2830 + type modlist = string 2831 + let modlist_jsont = Jsont.string 2832 + 2833 + type list_viewer_state = { 2834 + blocked : string option; 2835 + muted : bool option; 2114 2836 } 2115 2837 2116 - let view_jsont = 2117 - Jsont.Object.map ~kind:"View" 2118 - (fun _typ media record -> { media; record }) 2119 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia#view" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia#view") 2120 - |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 2121 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 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) 2122 2844 |> Jsont.Object.finish 2123 2845 2124 - type main = { 2125 - media : Jsont.json; 2126 - record : Jsont.json; 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; 2127 2852 } 2128 2853 2129 - let main_jsont = 2130 - Jsont.Object.map ~kind:"Main" 2131 - (fun _typ media record -> { media; record }) 2132 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.recordWithMedia" ~enc:(fun _ -> "app.bsky.embed.recordWithMedia") 2133 - |> Jsont.Object.mem "media" Jsont.json ~enc:(fun r -> r.media) 2134 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 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) 2135 2860 |> Jsont.Object.finish 2136 2861 2137 - end 2138 - module Record = struct 2139 - type view_record = { 2140 - author : Jsont.json; 2862 + type curatelist = string 2863 + let curatelist_jsont = Jsont.string 2864 + 2865 + type list_view_basic = { 2866 + avatar : string option; 2141 2867 cid : string; 2142 - embeds : Jsont.json list option; 2143 - indexed_at : string; 2868 + indexed_at : string option; 2144 2869 labels : Com.Atproto.Label.Defs.label list option; 2145 - like_count : int option; 2146 - quote_count : int option; 2147 - reply_count : int option; 2148 - repost_count : int option; 2870 + list_item_count : int option; 2871 + name : string; 2872 + purpose : Jsont.json; 2149 2873 uri : string; 2150 - value : Jsont.json; 2874 + viewer : Jsont.json option; 2151 2875 } 2152 2876 2153 - let view_record_jsont = 2154 - Jsont.Object.map ~kind:"View_record" 2155 - (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 }) 2156 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewRecord" ~enc:(fun _ -> "app.bsky.embed.record#viewRecord") 2157 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 2877 + let list_view_basic_jsont = 2878 + Jsont.Object.map ~kind:"List_view_basic" 2879 + (fun _typ avatar cid indexed_at labels list_item_count name purpose uri viewer -> { avatar; cid; indexed_at; labels; list_item_count; name; purpose; uri; viewer }) 2880 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#listViewBasic") 2881 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2158 2882 |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2159 - |> Jsont.Object.opt_mem "embeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.embeds) 2160 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2883 + |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2161 2884 |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2162 - |> Jsont.Object.opt_mem "likeCount" Jsont.int ~enc:(fun r -> r.like_count) 2163 - |> Jsont.Object.opt_mem "quoteCount" Jsont.int ~enc:(fun r -> r.quote_count) 2164 - |> Jsont.Object.opt_mem "replyCount" Jsont.int ~enc:(fun r -> r.reply_count) 2165 - |> Jsont.Object.opt_mem "repostCount" Jsont.int ~enc:(fun r -> r.repost_count) 2885 + |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2886 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2887 + |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 2166 2888 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2167 - |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 2889 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2168 2890 |> Jsont.Object.finish 2169 2891 2170 - type view_not_found = { 2171 - not_found : bool; 2892 + type list_view = { 2893 + avatar : string option; 2894 + cid : string; 2895 + creator : Jsont.json; 2896 + description : string option; 2897 + description_facets : Richtext.Facet.main list option; 2898 + indexed_at : string; 2899 + labels : Com.Atproto.Label.Defs.label list option; 2900 + list_item_count : int option; 2901 + name : string; 2902 + purpose : Jsont.json; 2172 2903 uri : string; 2904 + viewer : Jsont.json option; 2173 2905 } 2174 2906 2175 - let view_not_found_jsont = 2176 - Jsont.Object.map ~kind:"View_not_found" 2177 - (fun _typ not_found uri -> { not_found; uri }) 2178 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewNotFound" ~enc:(fun _ -> "app.bsky.embed.record#viewNotFound") 2179 - |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 2907 + let list_view_jsont = 2908 + Jsont.Object.map ~kind:"List_view" 2909 + (fun _typ avatar cid creator description description_facets indexed_at labels list_item_count name purpose uri viewer -> { avatar; cid; creator; description; description_facets; indexed_at; labels; list_item_count; name; purpose; uri; viewer }) 2910 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listView" ~enc:(fun _ -> "app.bsky.graph.defs#listView") 2911 + |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 2912 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2913 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2914 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2915 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 2916 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 2917 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 2918 + |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 2919 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 2920 + |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 2180 2921 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2922 + |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 2181 2923 |> Jsont.Object.finish 2182 2924 2183 - type view_detached = { 2184 - detached : bool; 2925 + type starter_pack_view = { 2926 + cid : string; 2927 + creator : Jsont.json; 2928 + feeds : Jsont.json list option; 2929 + indexed_at : string; 2930 + joined_all_time_count : int option; 2931 + joined_week_count : int option; 2932 + labels : Com.Atproto.Label.Defs.label list option; 2933 + list_ : Jsont.json option; 2934 + list_items_sample : Jsont.json list option; 2935 + record : Jsont.json; 2185 2936 uri : string; 2186 2937 } 2187 2938 2188 - let view_detached_jsont = 2189 - Jsont.Object.map ~kind:"View_detached" 2190 - (fun _typ detached uri -> { detached; uri }) 2191 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewDetached" ~enc:(fun _ -> "app.bsky.embed.record#viewDetached") 2192 - |> Jsont.Object.mem "detached" Jsont.bool ~enc:(fun r -> r.detached) 2939 + let starter_pack_view_jsont = 2940 + Jsont.Object.map ~kind:"Starter_pack_view" 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 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackView" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackView") 2943 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 2944 + |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 2945 + |> Jsont.Object.opt_mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 2946 + |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 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) 2949 + |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 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) 2193 2953 |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2194 2954 |> Jsont.Object.finish 2195 2955 2196 - type view_blocked = { 2197 - author : Jsont.json; 2198 - blocked : bool; 2199 - uri : string; 2956 + end 2957 + module GetBlocks = struct 2958 + type params = { 2959 + cursor : string option; 2960 + limit : int option; 2200 2961 } 2201 2962 2202 - let view_blocked_jsont = 2203 - Jsont.Object.map ~kind:"View_blocked" 2204 - (fun _typ author blocked uri -> { author; blocked; uri }) 2205 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#viewBlocked" ~enc:(fun _ -> "app.bsky.embed.record#viewBlocked") 2206 - |> Jsont.Object.mem "author" Jsont.json ~enc:(fun r -> r.author) 2207 - |> Jsont.Object.mem "blocked" Jsont.bool ~enc:(fun r -> r.blocked) 2208 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 2963 + let params_jsont = 2964 + Jsont.Object.map ~kind:"Params" 2965 + (fun cursor limit -> { 2966 + cursor; 2967 + limit; 2968 + }) 2969 + |> Jsont.Object.opt_mem "cursor" Jsont.string 2970 + ~enc:(fun r -> r.cursor) 2971 + |> Jsont.Object.opt_mem "limit" Jsont.int 2972 + ~enc:(fun r -> r.limit) 2209 2973 |> Jsont.Object.finish 2210 2974 2211 - type view = { 2212 - record : Jsont.json; 2975 + type output = { 2976 + blocks : Jsont.json list; 2977 + cursor : string option; 2213 2978 } 2214 2979 2215 - let view_jsont = 2216 - Jsont.Object.map ~kind:"View" 2217 - (fun _typ record -> { record }) 2218 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record#view" ~enc:(fun _ -> "app.bsky.embed.record#view") 2219 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 2980 + let output_jsont = 2981 + Jsont.Object.map ~kind:"Output" 2982 + (fun _typ blocks cursor -> { blocks; cursor }) 2983 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getBlocks#output") 2984 + |> Jsont.Object.mem "blocks" (Jsont.list Jsont.json) ~enc:(fun r -> r.blocks) 2985 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2220 2986 |> Jsont.Object.finish 2221 2987 2988 + end 2989 + module Verification = struct 2222 2990 type main = { 2223 - record : Com.Atproto.Repo.StrongRef.main; 2991 + created_at : string; 2992 + display_name : string; 2993 + handle : string; 2994 + subject : string; 2224 2995 } 2225 2996 2226 2997 let main_jsont = 2227 2998 Jsont.Object.map ~kind:"Main" 2228 - (fun _typ record -> { record }) 2229 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.embed.record" ~enc:(fun _ -> "app.bsky.embed.record") 2230 - |> Jsont.Object.mem "record" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.record) 2999 + (fun _typ created_at display_name handle subject -> { created_at; display_name; handle; subject }) 3000 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.verification" ~enc:(fun _ -> "app.bsky.graph.verification") 3001 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3002 + |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 3003 + |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 3004 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 2231 3005 |> Jsont.Object.finish 2232 3006 2233 3007 end 2234 - end 2235 - module Contact = struct 2236 - module SendNotification = struct 2237 - type input = { 2238 - from : string; 2239 - to_ : string; 3008 + module GetMutes = struct 3009 + type params = { 3010 + cursor : string option; 3011 + limit : int option; 2240 3012 } 2241 3013 2242 - let input_jsont = 2243 - Jsont.Object.map ~kind:"Input" 2244 - (fun _typ from to_ -> { from; to_ }) 2245 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.sendNotification#input" ~enc:(fun _ -> "app.bsky.contact.sendNotification#input") 2246 - |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 2247 - |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 3014 + let params_jsont = 3015 + Jsont.Object.map ~kind:"Params" 3016 + (fun cursor limit -> { 3017 + cursor; 3018 + limit; 3019 + }) 3020 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3021 + ~enc:(fun r -> r.cursor) 3022 + |> Jsont.Object.opt_mem "limit" Jsont.int 3023 + ~enc:(fun r -> r.limit) 2248 3024 |> Jsont.Object.finish 2249 3025 2250 - type output = unit 3026 + type output = { 3027 + cursor : string option; 3028 + mutes : Jsont.json list; 3029 + } 2251 3030 2252 - let output_jsont = Jsont.ignore 3031 + let output_jsont = 3032 + Jsont.Object.map ~kind:"Output" 3033 + (fun _typ cursor mutes -> { cursor; mutes }) 3034 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getMutes#output" ~enc:(fun _ -> "app.bsky.graph.getMutes#output") 3035 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3036 + |> Jsont.Object.mem "mutes" (Jsont.list Jsont.json) ~enc:(fun r -> r.mutes) 3037 + |> Jsont.Object.finish 2253 3038 2254 3039 end 2255 - module StartPhoneVerification = struct 2256 - type input = { 2257 - phone : string; 3040 + module GetRelationships = struct 3041 + type params = { 3042 + actor : string; 3043 + others : string list option; 2258 3044 } 2259 3045 2260 - let input_jsont = 2261 - Jsont.Object.map ~kind:"Input" 2262 - (fun _typ phone -> { phone }) 2263 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.startPhoneVerification#input" ~enc:(fun _ -> "app.bsky.contact.startPhoneVerification#input") 2264 - |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 3046 + let params_jsont = 3047 + Jsont.Object.map ~kind:"Params" 3048 + (fun actor others -> { 3049 + actor; 3050 + others; 3051 + }) 3052 + |> Jsont.Object.mem "actor" Jsont.string 3053 + ~enc:(fun r -> r.actor) 3054 + |> Jsont.Object.opt_mem "others" (Jsont.list Jsont.string) 3055 + ~enc:(fun r -> r.others) 2265 3056 |> Jsont.Object.finish 2266 3057 2267 - type output = unit 3058 + type output = { 3059 + actor : string option; 3060 + relationships : Jsont.json list; 3061 + } 2268 3062 2269 - let output_jsont = Jsont.ignore 3063 + let output_jsont = 3064 + Jsont.Object.map ~kind:"Output" 3065 + (fun _typ actor relationships -> { actor; relationships }) 3066 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getRelationships#output" ~enc:(fun _ -> "app.bsky.graph.getRelationships#output") 3067 + |> Jsont.Object.opt_mem "actor" Jsont.string ~enc:(fun r -> r.actor) 3068 + |> Jsont.Object.mem "relationships" (Jsont.list Jsont.json) ~enc:(fun r -> r.relationships) 3069 + |> Jsont.Object.finish 2270 3070 2271 3071 end 2272 - module GetMatches = struct 3072 + module GetStarterPacksWithMembership = struct 3073 + type starter_pack_with_membership = { 3074 + list_item : Jsont.json option; 3075 + starter_pack : Jsont.json; 3076 + } 3077 + 3078 + let starter_pack_with_membership_jsont = 3079 + Jsont.Object.map ~kind:"Starter_pack_with_membership" 3080 + (fun _typ list_item starter_pack -> { list_item; starter_pack }) 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) 3083 + |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 3084 + |> Jsont.Object.finish 3085 + 2273 3086 type params = { 3087 + actor : string; 2274 3088 cursor : string option; 2275 3089 limit : int option; 2276 3090 } 2277 3091 2278 3092 let params_jsont = 2279 3093 Jsont.Object.map ~kind:"Params" 2280 - (fun cursor limit -> { 3094 + (fun actor cursor limit -> { 3095 + actor; 2281 3096 cursor; 2282 3097 limit; 2283 3098 }) 3099 + |> Jsont.Object.mem "actor" Jsont.string 3100 + ~enc:(fun r -> r.actor) 2284 3101 |> Jsont.Object.opt_mem "cursor" Jsont.string 2285 3102 ~enc:(fun r -> r.cursor) 2286 3103 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 2289 3106 2290 3107 type output = { 2291 3108 cursor : string option; 2292 - matches : Jsont.json list; 3109 + starter_packs_with_membership : Jsont.json list; 2293 3110 } 2294 3111 2295 3112 let output_jsont = 2296 3113 Jsont.Object.map ~kind:"Output" 2297 - (fun _typ cursor matches -> { cursor; matches }) 2298 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getMatches#output" ~enc:(fun _ -> "app.bsky.contact.getMatches#output") 3114 + (fun _typ cursor starter_packs_with_membership -> { cursor; starter_packs_with_membership }) 3115 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacksWithMembership#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPacksWithMembership#output") 2299 3116 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 2300 - |> Jsont.Object.mem "matches" (Jsont.list Jsont.json) ~enc:(fun r -> r.matches) 3117 + |> Jsont.Object.mem "starterPacksWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs_with_membership) 2301 3118 |> Jsont.Object.finish 2302 3119 2303 3120 end 2304 - module VerifyPhone = struct 2305 - type input = { 2306 - code : string; 2307 - phone : string; 3121 + module GetActorStarterPacks = struct 3122 + type params = { 3123 + actor : string; 3124 + cursor : string option; 3125 + limit : int option; 2308 3126 } 2309 3127 2310 - let input_jsont = 2311 - Jsont.Object.map ~kind:"Input" 2312 - (fun _typ code phone -> { code; phone }) 2313 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#input" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#input") 2314 - |> Jsont.Object.mem "code" Jsont.string ~enc:(fun r -> r.code) 2315 - |> Jsont.Object.mem "phone" Jsont.string ~enc:(fun r -> r.phone) 3128 + let params_jsont = 3129 + Jsont.Object.map ~kind:"Params" 3130 + (fun actor cursor limit -> { 3131 + actor; 3132 + cursor; 3133 + limit; 3134 + }) 3135 + |> Jsont.Object.mem "actor" Jsont.string 3136 + ~enc:(fun r -> r.actor) 3137 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3138 + ~enc:(fun r -> r.cursor) 3139 + |> Jsont.Object.opt_mem "limit" Jsont.int 3140 + ~enc:(fun r -> r.limit) 2316 3141 |> Jsont.Object.finish 2317 3142 2318 3143 type output = { 2319 - token : string; 3144 + cursor : string option; 3145 + starter_packs : Jsont.json list; 2320 3146 } 2321 3147 2322 3148 let output_jsont = 2323 3149 Jsont.Object.map ~kind:"Output" 2324 - (fun _typ token -> { token }) 2325 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.verifyPhone#output" ~enc:(fun _ -> "app.bsky.contact.verifyPhone#output") 2326 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 3150 + (fun _typ cursor starter_packs -> { cursor; starter_packs }) 3151 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getActorStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getActorStarterPacks#output") 3152 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3153 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 2327 3154 |> Jsont.Object.finish 2328 3155 2329 3156 end 2330 - module RemoveData = struct 2331 - type input = unit 3157 + module List = struct 3158 + type main = { 3159 + avatar : Atp.Blob_ref.t option; 3160 + created_at : string; 3161 + description : string option; 3162 + description_facets : Richtext.Facet.main list option; 3163 + labels : Com.Atproto.Label.Defs.self_labels option; 3164 + name : string; 3165 + purpose : Jsont.json; 3166 + } 2332 3167 2333 - let input_jsont = Jsont.ignore 3168 + let main_jsont = 3169 + Jsont.Object.map ~kind:"Main" 3170 + (fun _typ avatar created_at description description_facets labels name purpose -> { avatar; created_at; description; description_facets; labels; name; purpose }) 3171 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.list" ~enc:(fun _ -> "app.bsky.graph.list") 3172 + |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 3173 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3174 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 3175 + |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 3176 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3177 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 3178 + |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 3179 + |> Jsont.Object.finish 2334 3180 2335 - type output = unit 3181 + end 3182 + module SearchStarterPacks = struct 3183 + type params = { 3184 + cursor : string option; 3185 + limit : int option; 3186 + q : string; 3187 + } 2336 3188 2337 - let output_jsont = Jsont.ignore 3189 + let params_jsont = 3190 + Jsont.Object.map ~kind:"Params" 3191 + (fun cursor limit q -> { 3192 + cursor; 3193 + limit; 3194 + q; 3195 + }) 3196 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3197 + ~enc:(fun r -> r.cursor) 3198 + |> Jsont.Object.opt_mem "limit" Jsont.int 3199 + ~enc:(fun r -> r.limit) 3200 + |> Jsont.Object.mem "q" Jsont.string 3201 + ~enc:(fun r -> r.q) 3202 + |> Jsont.Object.finish 2338 3203 2339 - end 2340 - module Defs = struct 2341 - type sync_status = { 2342 - matches_count : int; 2343 - synced_at : string; 3204 + type output = { 3205 + cursor : string option; 3206 + starter_packs : Jsont.json list; 2344 3207 } 2345 3208 2346 - let sync_status_jsont = 2347 - Jsont.Object.map ~kind:"Sync_status" 2348 - (fun _typ matches_count synced_at -> { matches_count; synced_at }) 2349 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#syncStatus" ~enc:(fun _ -> "app.bsky.contact.defs#syncStatus") 2350 - |> Jsont.Object.mem "matchesCount" Jsont.int ~enc:(fun r -> r.matches_count) 2351 - |> Jsont.Object.mem "syncedAt" Jsont.string ~enc:(fun r -> r.synced_at) 3209 + let output_jsont = 3210 + Jsont.Object.map ~kind:"Output" 3211 + (fun _typ cursor starter_packs -> { cursor; starter_packs }) 3212 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.searchStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.searchStarterPacks#output") 3213 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3214 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 2352 3215 |> Jsont.Object.finish 2353 3216 2354 - type notification = { 2355 - from : string; 2356 - to_ : string; 3217 + end 3218 + module GetList = struct 3219 + type params = { 3220 + cursor : string option; 3221 + limit : int option; 3222 + list_ : string; 2357 3223 } 2358 3224 2359 - let notification_jsont = 2360 - Jsont.Object.map ~kind:"Notification" 2361 - (fun _typ from to_ -> { from; to_ }) 2362 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#notification" ~enc:(fun _ -> "app.bsky.contact.defs#notification") 2363 - |> Jsont.Object.mem "from" Jsont.string ~enc:(fun r -> r.from) 2364 - |> Jsont.Object.mem "to" Jsont.string ~enc:(fun r -> r.to_) 3225 + let params_jsont = 3226 + Jsont.Object.map ~kind:"Params" 3227 + (fun cursor limit list_ -> { 3228 + cursor; 3229 + limit; 3230 + list_; 3231 + }) 3232 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3233 + ~enc:(fun r -> r.cursor) 3234 + |> Jsont.Object.opt_mem "limit" Jsont.int 3235 + ~enc:(fun r -> r.limit) 3236 + |> Jsont.Object.mem "list" Jsont.string 3237 + ~enc:(fun r -> r.list_) 2365 3238 |> Jsont.Object.finish 2366 3239 2367 - type match_and_contact_index = { 2368 - contact_index : int; 2369 - match_ : Jsont.json; 3240 + type output = { 3241 + cursor : string option; 3242 + items : Jsont.json list; 3243 + list_ : Jsont.json; 2370 3244 } 2371 3245 2372 - let match_and_contact_index_jsont = 2373 - Jsont.Object.map ~kind:"Match_and_contact_index" 2374 - (fun _typ contact_index match_ -> { contact_index; match_ }) 2375 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.defs#matchAndContactIndex" ~enc:(fun _ -> "app.bsky.contact.defs#matchAndContactIndex") 2376 - |> Jsont.Object.mem "contactIndex" Jsont.int ~enc:(fun r -> r.contact_index) 2377 - |> Jsont.Object.mem "match" Jsont.json ~enc:(fun r -> r.match_) 3246 + let output_jsont = 3247 + Jsont.Object.map ~kind:"Output" 3248 + (fun _typ cursor items list_ -> { cursor; items; list_ }) 3249 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getList#output" ~enc:(fun _ -> "app.bsky.graph.getList#output") 3250 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3251 + |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 3252 + |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 2378 3253 |> Jsont.Object.finish 2379 3254 2380 3255 end 2381 - module DismissMatch = struct 2382 - type input = { 2383 - subject : string; 3256 + module GetListBlocks = struct 3257 + type params = { 3258 + cursor : string option; 3259 + limit : int option; 2384 3260 } 2385 3261 2386 - let input_jsont = 2387 - Jsont.Object.map ~kind:"Input" 2388 - (fun _typ subject -> { subject }) 2389 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.dismissMatch#input" ~enc:(fun _ -> "app.bsky.contact.dismissMatch#input") 2390 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 3262 + let params_jsont = 3263 + Jsont.Object.map ~kind:"Params" 3264 + (fun cursor limit -> { 3265 + cursor; 3266 + limit; 3267 + }) 3268 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3269 + ~enc:(fun r -> r.cursor) 3270 + |> Jsont.Object.opt_mem "limit" Jsont.int 3271 + ~enc:(fun r -> r.limit) 2391 3272 |> Jsont.Object.finish 2392 3273 2393 - type output = unit 3274 + type output = { 3275 + cursor : string option; 3276 + lists : Jsont.json list; 3277 + } 2394 3278 2395 - let output_jsont = Jsont.ignore 3279 + let output_jsont = 3280 + Jsont.Object.map ~kind:"Output" 3281 + (fun _typ cursor lists -> { cursor; lists }) 3282 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getListBlocks#output") 3283 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3284 + |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 3285 + |> Jsont.Object.finish 2396 3286 2397 3287 end 2398 - module GetSyncStatus = struct 2399 - type params = unit 3288 + module GetStarterPack = struct 3289 + type params = { 3290 + starter_pack : string; 3291 + } 2400 3292 2401 - let params_jsont = Jsont.ignore 3293 + let params_jsont = 3294 + Jsont.Object.map ~kind:"Params" 3295 + (fun starter_pack -> { 3296 + starter_pack; 3297 + }) 3298 + |> Jsont.Object.mem "starterPack" Jsont.string 3299 + ~enc:(fun r -> r.starter_pack) 3300 + |> Jsont.Object.finish 2402 3301 2403 3302 type output = { 2404 - sync_status : Defs.sync_status option; 3303 + starter_pack : Jsont.json; 2405 3304 } 2406 3305 2407 3306 let output_jsont = 2408 3307 Jsont.Object.map ~kind:"Output" 2409 - (fun _typ sync_status -> { sync_status }) 2410 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.getSyncStatus#output" ~enc:(fun _ -> "app.bsky.contact.getSyncStatus#output") 2411 - |> Jsont.Object.opt_mem "syncStatus" Defs.sync_status_jsont ~enc:(fun r -> r.sync_status) 3308 + (fun _typ starter_pack -> { starter_pack }) 3309 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPack#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPack#output") 3310 + |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 2412 3311 |> Jsont.Object.finish 2413 3312 2414 3313 end 2415 - module ImportContacts = struct 2416 - type input = { 2417 - contacts : string list; 2418 - token : string; 3314 + module GetListsWithMembership = struct 3315 + type list_with_membership = { 3316 + list_ : Jsont.json; 3317 + list_item : Jsont.json option; 2419 3318 } 2420 3319 2421 - let input_jsont = 2422 - Jsont.Object.map ~kind:"Input" 2423 - (fun _typ contacts token -> { contacts; token }) 2424 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#input" ~enc:(fun _ -> "app.bsky.contact.importContacts#input") 2425 - |> Jsont.Object.mem "contacts" (Jsont.list Jsont.string) ~enc:(fun r -> r.contacts) 2426 - |> Jsont.Object.mem "token" Jsont.string ~enc:(fun r -> r.token) 3320 + let list_with_membership_jsont = 3321 + Jsont.Object.map ~kind:"List_with_membership" 3322 + (fun _typ list_ list_item -> { list_; list_item }) 3323 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#listWithMembership" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#listWithMembership") 3324 + |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 3325 + |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 3326 + |> Jsont.Object.finish 3327 + 3328 + type params = { 3329 + actor : string; 3330 + cursor : string option; 3331 + limit : int option; 3332 + purposes : string list option; 3333 + } 3334 + 3335 + let params_jsont = 3336 + Jsont.Object.map ~kind:"Params" 3337 + (fun actor cursor limit purposes -> { 3338 + actor; 3339 + cursor; 3340 + limit; 3341 + purposes; 3342 + }) 3343 + |> Jsont.Object.mem "actor" Jsont.string 3344 + ~enc:(fun r -> r.actor) 3345 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3346 + ~enc:(fun r -> r.cursor) 3347 + |> Jsont.Object.opt_mem "limit" Jsont.int 3348 + ~enc:(fun r -> r.limit) 3349 + |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3350 + ~enc:(fun r -> r.purposes) 2427 3351 |> Jsont.Object.finish 2428 3352 2429 3353 type output = { 2430 - matches_and_contact_indexes : Defs.match_and_contact_index list; 3354 + cursor : string option; 3355 + lists_with_membership : Jsont.json list; 2431 3356 } 2432 3357 2433 3358 let output_jsont = 2434 3359 Jsont.Object.map ~kind:"Output" 2435 - (fun _typ matches_and_contact_indexes -> { matches_and_contact_indexes }) 2436 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.contact.importContacts#output" ~enc:(fun _ -> "app.bsky.contact.importContacts#output") 2437 - |> Jsont.Object.mem "matchesAndContactIndexes" (Jsont.list Defs.match_and_contact_index_jsont) ~enc:(fun r -> r.matches_and_contact_indexes) 3360 + (fun _typ cursor lists_with_membership -> { cursor; lists_with_membership }) 3361 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#output" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#output") 3362 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3363 + |> Jsont.Object.mem "listsWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists_with_membership) 2438 3364 |> Jsont.Object.finish 2439 3365 2440 3366 end 2441 - end 2442 - module Feed = struct 2443 - module Repost = struct 2444 - type main = { 2445 - created_at : string; 2446 - subject : Com.Atproto.Repo.StrongRef.main; 2447 - via : Com.Atproto.Repo.StrongRef.main option; 3367 + module GetListMutes = struct 3368 + type params = { 3369 + cursor : string option; 3370 + limit : int option; 2448 3371 } 2449 3372 2450 - let main_jsont = 2451 - Jsont.Object.map ~kind:"Main" 2452 - (fun _typ created_at subject via -> { created_at; subject; via }) 2453 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.repost" ~enc:(fun _ -> "app.bsky.feed.repost") 2454 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2455 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 2456 - |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3373 + let params_jsont = 3374 + Jsont.Object.map ~kind:"Params" 3375 + (fun cursor limit -> { 3376 + cursor; 3377 + limit; 3378 + }) 3379 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3380 + ~enc:(fun r -> r.cursor) 3381 + |> Jsont.Object.opt_mem "limit" Jsont.int 3382 + ~enc:(fun r -> r.limit) 2457 3383 |> Jsont.Object.finish 2458 3384 2459 - end 2460 - module DescribeFeedGenerator = struct 2461 - type links = { 2462 - privacy_policy : string option; 2463 - terms_of_service : string option; 3385 + type output = { 3386 + cursor : string option; 3387 + lists : Jsont.json list; 2464 3388 } 2465 3389 2466 - let links_jsont = 2467 - Jsont.Object.map ~kind:"Links" 2468 - (fun _typ privacy_policy terms_of_service -> { privacy_policy; terms_of_service }) 2469 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#links" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#links") 2470 - |> Jsont.Object.opt_mem "privacyPolicy" Jsont.string ~enc:(fun r -> r.privacy_policy) 2471 - |> Jsont.Object.opt_mem "termsOfService" Jsont.string ~enc:(fun r -> r.terms_of_service) 3390 + let output_jsont = 3391 + Jsont.Object.map ~kind:"Output" 3392 + (fun _typ cursor lists -> { cursor; lists }) 3393 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListMutes#output" ~enc:(fun _ -> "app.bsky.graph.getListMutes#output") 3394 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3395 + |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 2472 3396 |> Jsont.Object.finish 2473 3397 2474 - type feed = { 2475 - uri : string; 3398 + end 3399 + module GetStarterPacks = struct 3400 + type params = { 3401 + uris : string list; 2476 3402 } 2477 3403 2478 - let feed_jsont = 2479 - Jsont.Object.map ~kind:"Feed" 2480 - (fun _typ uri -> { uri }) 2481 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#feed" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#feed") 2482 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3404 + let params_jsont = 3405 + Jsont.Object.map ~kind:"Params" 3406 + (fun uris -> { 3407 + uris; 3408 + }) 3409 + |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 3410 + ~enc:(fun r -> r.uris) 2483 3411 |> Jsont.Object.finish 2484 3412 2485 3413 type output = { 2486 - did : string; 2487 - feeds : Jsont.json list; 2488 - links : Jsont.json option; 3414 + starter_packs : Jsont.json list; 2489 3415 } 2490 3416 2491 3417 let output_jsont = 2492 3418 Jsont.Object.map ~kind:"Output" 2493 - (fun _typ did feeds links -> { did; feeds; links }) 2494 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#output" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#output") 2495 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2496 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 2497 - |> Jsont.Object.opt_mem "links" Jsont.json ~enc:(fun r -> r.links) 3419 + (fun _typ starter_packs -> { starter_packs }) 3420 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPacks#output") 3421 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 2498 3422 |> Jsont.Object.finish 2499 3423 2500 3424 end 2501 - module Threadgate = struct 2502 - type mention_rule = unit 3425 + module GetLists = struct 3426 + type params = { 3427 + actor : string; 3428 + cursor : string option; 3429 + limit : int option; 3430 + purposes : string list option; 3431 + } 2503 3432 2504 - let mention_rule_jsont = Jsont.ignore 3433 + let params_jsont = 3434 + Jsont.Object.map ~kind:"Params" 3435 + (fun actor cursor limit purposes -> { 3436 + actor; 3437 + cursor; 3438 + limit; 3439 + purposes; 3440 + }) 3441 + |> Jsont.Object.mem "actor" Jsont.string 3442 + ~enc:(fun r -> r.actor) 3443 + |> Jsont.Object.opt_mem "cursor" Jsont.string 3444 + ~enc:(fun r -> r.cursor) 3445 + |> Jsont.Object.opt_mem "limit" Jsont.int 3446 + ~enc:(fun r -> r.limit) 3447 + |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 3448 + ~enc:(fun r -> r.purposes) 3449 + |> Jsont.Object.finish 2505 3450 2506 - type list_rule = { 2507 - list_ : string; 3451 + type output = { 3452 + cursor : string option; 3453 + lists : Jsont.json list; 2508 3454 } 2509 3455 2510 - let list_rule_jsont = 2511 - Jsont.Object.map ~kind:"List_rule" 2512 - (fun _typ list_ -> { list_ }) 2513 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate#listRule" ~enc:(fun _ -> "app.bsky.feed.threadgate#listRule") 2514 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3456 + let output_jsont = 3457 + Jsont.Object.map ~kind:"Output" 3458 + (fun _typ cursor lists -> { cursor; lists }) 3459 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getLists#output" ~enc:(fun _ -> "app.bsky.graph.getLists#output") 3460 + |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3461 + |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 2515 3462 |> Jsont.Object.finish 2516 3463 2517 - type following_rule = unit 3464 + end 3465 + end 3466 + module Feed = struct 3467 + module Post = struct 3468 + type text_slice = { 3469 + end_ : int; 3470 + start : int; 3471 + } 2518 3472 2519 - let following_rule_jsont = Jsont.ignore 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 2520 3480 2521 - type follower_rule = unit 3481 + type reply_ref = { 3482 + parent : Com.Atproto.Repo.StrongRef.main; 3483 + root : Com.Atproto.Repo.StrongRef.main; 3484 + } 2522 3485 2523 - let follower_rule_jsont = Jsont.ignore 3486 + let reply_ref_jsont = 3487 + Jsont.Object.map ~kind:"Reply_ref" 3488 + (fun _typ parent root -> { parent; root }) 3489 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#replyRef" ~enc:(fun _ -> "app.bsky.feed.post#replyRef") 3490 + |> Jsont.Object.mem "parent" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.parent) 3491 + |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3492 + |> Jsont.Object.finish 2524 3493 2525 - type main = { 2526 - allow : Jsont.json list option; 2527 - created_at : string; 2528 - hidden_replies : string list option; 2529 - post : string; 3494 + type entity = { 3495 + index : Jsont.json; 3496 + type_ : string; 3497 + value : string; 2530 3498 } 2531 3499 2532 - let main_jsont = 2533 - Jsont.Object.map ~kind:"Main" 2534 - (fun _typ allow created_at hidden_replies post -> { allow; created_at; hidden_replies; post }) 2535 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate" ~enc:(fun _ -> "app.bsky.feed.threadgate") 2536 - |> Jsont.Object.opt_mem "allow" (Jsont.list Jsont.json) ~enc:(fun r -> r.allow) 2537 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2538 - |> Jsont.Object.opt_mem "hiddenReplies" (Jsont.list Jsont.string) ~enc:(fun r -> r.hidden_replies) 2539 - |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3500 + let entity_jsont = 3501 + Jsont.Object.map ~kind:"Entity" 3502 + (fun _typ index type_ value -> { index; type_; value }) 3503 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#entity" ~enc:(fun _ -> "app.bsky.feed.post#entity") 3504 + |> Jsont.Object.mem "index" Jsont.json ~enc:(fun r -> r.index) 3505 + |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 3506 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 2540 3507 |> Jsont.Object.finish 2541 3508 2542 - end 2543 - module Like = struct 2544 3509 type main = { 2545 3510 created_at : string; 2546 - subject : Com.Atproto.Repo.StrongRef.main; 2547 - via : Com.Atproto.Repo.StrongRef.main option; 3511 + embed : Jsont.json option; 3512 + entities : Jsont.json list option; 3513 + facets : Richtext.Facet.main list option; 3514 + labels : Com.Atproto.Label.Defs.self_labels option; 3515 + langs : string list option; 3516 + reply : Jsont.json option; 3517 + tags : string list option; 3518 + text : string; 2548 3519 } 2549 3520 2550 3521 let main_jsont = 2551 3522 Jsont.Object.map ~kind:"Main" 2552 - (fun _typ created_at subject via -> { created_at; subject; via }) 2553 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.like" ~enc:(fun _ -> "app.bsky.feed.like") 3523 + (fun _typ created_at embed entities facets labels langs reply tags text -> { created_at; embed; entities; facets; labels; langs; reply; tags; text }) 3524 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post" ~enc:(fun _ -> "app.bsky.feed.post") 2554 3525 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2555 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 2556 - |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3526 + |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 3527 + |> Jsont.Object.opt_mem "entities" (Jsont.list Jsont.json) ~enc:(fun r -> r.entities) 3528 + |> Jsont.Object.opt_mem "facets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.facets) 3529 + |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3530 + |> Jsont.Object.opt_mem "langs" (Jsont.list Jsont.string) ~enc:(fun r -> r.langs) 3531 + |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 3532 + |> Jsont.Object.opt_mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 3533 + |> Jsont.Object.mem "text" Jsont.string ~enc:(fun r -> r.text) 2557 3534 |> Jsont.Object.finish 2558 3535 2559 3536 end ··· 2616 3593 |> Jsont.Object.finish 2617 3594 2618 3595 end 3596 + module Postgate = struct 3597 + type disable_rule = unit 3598 + 3599 + let disable_rule_jsont = Jsont.ignore 3600 + 3601 + type main = { 3602 + created_at : string; 3603 + detached_embedding_uris : string list option; 3604 + embedding_rules : Jsont.json list option; 3605 + post : string; 3606 + } 3607 + 3608 + let main_jsont = 3609 + Jsont.Object.map ~kind:"Main" 3610 + (fun _typ created_at detached_embedding_uris embedding_rules post -> { created_at; detached_embedding_uris; embedding_rules; post }) 3611 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.postgate" ~enc:(fun _ -> "app.bsky.feed.postgate") 3612 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3613 + |> Jsont.Object.opt_mem "detachedEmbeddingUris" (Jsont.list Jsont.string) ~enc:(fun r -> r.detached_embedding_uris) 3614 + |> Jsont.Object.opt_mem "embeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.embedding_rules) 3615 + |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3616 + |> Jsont.Object.finish 3617 + 3618 + end 2619 3619 module GetRepostedBy = struct 2620 3620 type params = { 2621 3621 cid : string option; ··· 2660 3660 |> Jsont.Object.finish 2661 3661 2662 3662 end 2663 - module Generator = struct 2664 - type main = { 2665 - accepts_interactions : bool option; 2666 - avatar : Atp.Blob_ref.t option; 2667 - content_mode : string option; 2668 - created_at : string; 2669 - description : string option; 2670 - description_facets : Richtext.Facet.main list option; 3663 + module DescribeFeedGenerator = struct 3664 + type links = { 3665 + privacy_policy : string option; 3666 + terms_of_service : string option; 3667 + } 3668 + 3669 + let links_jsont = 3670 + Jsont.Object.map ~kind:"Links" 3671 + (fun _typ privacy_policy terms_of_service -> { privacy_policy; terms_of_service }) 3672 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#links" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#links") 3673 + |> Jsont.Object.opt_mem "privacyPolicy" Jsont.string ~enc:(fun r -> r.privacy_policy) 3674 + |> Jsont.Object.opt_mem "termsOfService" Jsont.string ~enc:(fun r -> r.terms_of_service) 3675 + |> Jsont.Object.finish 3676 + 3677 + type feed = { 3678 + uri : string; 3679 + } 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 + type output = { 2671 3689 did : string; 2672 - display_name : string; 2673 - labels : Com.Atproto.Label.Defs.self_labels option; 3690 + feeds : Jsont.json list; 3691 + links : Jsont.json option; 2674 3692 } 2675 3693 2676 - let main_jsont = 2677 - Jsont.Object.map ~kind:"Main" 2678 - (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 }) 2679 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.generator" ~enc:(fun _ -> "app.bsky.feed.generator") 2680 - |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 2681 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 2682 - |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 2683 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2684 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 2685 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 3694 + let output_jsont = 3695 + Jsont.Object.map ~kind:"Output" 3696 + (fun _typ did feeds links -> { did; feeds; links }) 3697 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.describeFeedGenerator#output" ~enc:(fun _ -> "app.bsky.feed.describeFeedGenerator#output") 2686 3698 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 2687 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 2688 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3699 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 3700 + |> Jsont.Object.opt_mem "links" Jsont.json ~enc:(fun r -> r.links) 2689 3701 |> Jsont.Object.finish 2690 3702 2691 3703 end 2692 - module Postgate = struct 2693 - type disable_rule = unit 3704 + module Threadgate = struct 3705 + type mention_rule = unit 2694 3706 2695 - let disable_rule_jsont = Jsont.ignore 3707 + let mention_rule_jsont = Jsont.ignore 3708 + 3709 + type list_rule = { 3710 + list_ : string; 3711 + } 3712 + 3713 + let list_rule_jsont = 3714 + Jsont.Object.map ~kind:"List_rule" 3715 + (fun _typ list_ -> { list_ }) 3716 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate#listRule" ~enc:(fun _ -> "app.bsky.feed.threadgate#listRule") 3717 + |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3718 + |> Jsont.Object.finish 3719 + 3720 + type following_rule = unit 3721 + 3722 + let following_rule_jsont = Jsont.ignore 3723 + 3724 + type follower_rule = unit 3725 + 3726 + let follower_rule_jsont = Jsont.ignore 2696 3727 2697 3728 type main = { 3729 + allow : Jsont.json list option; 2698 3730 created_at : string; 2699 - detached_embedding_uris : string list option; 2700 - embedding_rules : Jsont.json list option; 3731 + hidden_replies : string list option; 2701 3732 post : string; 2702 3733 } 2703 3734 2704 3735 let main_jsont = 2705 3736 Jsont.Object.map ~kind:"Main" 2706 - (fun _typ created_at detached_embedding_uris embedding_rules post -> { created_at; detached_embedding_uris; embedding_rules; post }) 2707 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.postgate" ~enc:(fun _ -> "app.bsky.feed.postgate") 3737 + (fun _typ allow created_at hidden_replies post -> { allow; created_at; hidden_replies; post }) 3738 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.threadgate" ~enc:(fun _ -> "app.bsky.feed.threadgate") 3739 + |> Jsont.Object.opt_mem "allow" (Jsont.list Jsont.json) ~enc:(fun r -> r.allow) 2708 3740 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 2709 - |> Jsont.Object.opt_mem "detachedEmbeddingUris" (Jsont.list Jsont.string) ~enc:(fun r -> r.detached_embedding_uris) 2710 - |> Jsont.Object.opt_mem "embeddingRules" (Jsont.list Jsont.json) ~enc:(fun r -> r.embedding_rules) 3741 + |> Jsont.Object.opt_mem "hiddenReplies" (Jsont.list Jsont.string) ~enc:(fun r -> r.hidden_replies) 2711 3742 |> Jsont.Object.mem "post" Jsont.string ~enc:(fun r -> r.post) 3743 + |> Jsont.Object.finish 3744 + 3745 + end 3746 + module Like = struct 3747 + type main = { 3748 + created_at : string; 3749 + subject : Com.Atproto.Repo.StrongRef.main; 3750 + via : Com.Atproto.Repo.StrongRef.main option; 3751 + } 3752 + 3753 + let main_jsont = 3754 + Jsont.Object.map ~kind:"Main" 3755 + (fun _typ created_at subject via -> { created_at; subject; via }) 3756 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.like" ~enc:(fun _ -> "app.bsky.feed.like") 3757 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3758 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 3759 + |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 2712 3760 |> Jsont.Object.finish 2713 3761 2714 3762 end ··· 3054 4102 |> Jsont.Object.finish 3055 4103 3056 4104 end 3057 - module Post = struct 3058 - type text_slice = { 3059 - end_ : int; 3060 - start : int; 3061 - } 3062 - 3063 - let text_slice_jsont = 3064 - Jsont.Object.map ~kind:"Text_slice" 3065 - (fun _typ end_ start -> { end_; start }) 3066 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#textSlice" ~enc:(fun _ -> "app.bsky.feed.post#textSlice") 3067 - |> Jsont.Object.mem "end" Jsont.int ~enc:(fun r -> r.end_) 3068 - |> Jsont.Object.mem "start" Jsont.int ~enc:(fun r -> r.start) 3069 - |> Jsont.Object.finish 3070 - 3071 - type reply_ref = { 3072 - parent : Com.Atproto.Repo.StrongRef.main; 3073 - root : Com.Atproto.Repo.StrongRef.main; 3074 - } 3075 - 3076 - let reply_ref_jsont = 3077 - Jsont.Object.map ~kind:"Reply_ref" 3078 - (fun _typ parent root -> { parent; root }) 3079 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#replyRef" ~enc:(fun _ -> "app.bsky.feed.post#replyRef") 3080 - |> Jsont.Object.mem "parent" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.parent) 3081 - |> Jsont.Object.mem "root" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.root) 3082 - |> Jsont.Object.finish 3083 - 3084 - type entity = { 3085 - index : Jsont.json; 3086 - type_ : string; 3087 - value : string; 4105 + module Repost = struct 4106 + type main = { 4107 + created_at : string; 4108 + subject : Com.Atproto.Repo.StrongRef.main; 4109 + via : Com.Atproto.Repo.StrongRef.main option; 3088 4110 } 3089 4111 3090 - let entity_jsont = 3091 - Jsont.Object.map ~kind:"Entity" 3092 - (fun _typ index type_ value -> { index; type_; value }) 3093 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post#entity" ~enc:(fun _ -> "app.bsky.feed.post#entity") 3094 - |> Jsont.Object.mem "index" Jsont.json ~enc:(fun r -> r.index) 3095 - |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 3096 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 4112 + let main_jsont = 4113 + Jsont.Object.map ~kind:"Main" 4114 + (fun _typ created_at subject via -> { created_at; subject; via }) 4115 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.repost" ~enc:(fun _ -> "app.bsky.feed.repost") 4116 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4117 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4118 + |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 3097 4119 |> Jsont.Object.finish 3098 4120 4121 + end 4122 + module Generator = struct 3099 4123 type main = { 4124 + accepts_interactions : bool option; 4125 + avatar : Atp.Blob_ref.t option; 4126 + content_mode : string option; 3100 4127 created_at : string; 3101 - embed : Jsont.json option; 3102 - entities : Jsont.json list option; 3103 - facets : Richtext.Facet.main list option; 4128 + description : string option; 4129 + description_facets : Richtext.Facet.main list option; 4130 + did : string; 4131 + display_name : string; 3104 4132 labels : Com.Atproto.Label.Defs.self_labels option; 3105 - langs : string list option; 3106 - reply : Jsont.json option; 3107 - tags : string list option; 3108 - text : string; 3109 4133 } 3110 4134 3111 4135 let main_jsont = 3112 4136 Jsont.Object.map ~kind:"Main" 3113 - (fun _typ created_at embed entities facets labels langs reply tags text -> { created_at; embed; entities; facets; labels; langs; reply; tags; text }) 3114 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.post" ~enc:(fun _ -> "app.bsky.feed.post") 4137 + (fun _typ accepts_interactions avatar content_mode created_at description description_facets did display_name labels -> { accepts_interactions; avatar; content_mode; created_at; description; description_facets; did; display_name; labels }) 4138 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.generator" ~enc:(fun _ -> "app.bsky.feed.generator") 4139 + |> Jsont.Object.opt_mem "acceptsInteractions" Jsont.bool ~enc:(fun r -> r.accepts_interactions) 4140 + |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 4141 + |> Jsont.Object.opt_mem "contentMode" Jsont.string ~enc:(fun r -> r.content_mode) 3115 4142 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3116 - |> Jsont.Object.opt_mem "embed" Jsont.json ~enc:(fun r -> r.embed) 3117 - |> Jsont.Object.opt_mem "entities" (Jsont.list Jsont.json) ~enc:(fun r -> r.entities) 3118 - |> Jsont.Object.opt_mem "facets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.facets) 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) 3119 4147 |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 3120 - |> Jsont.Object.opt_mem "langs" (Jsont.list Jsont.string) ~enc:(fun r -> r.langs) 3121 - |> Jsont.Object.opt_mem "reply" Jsont.json ~enc:(fun r -> r.reply) 3122 - |> Jsont.Object.opt_mem "tags" (Jsont.list Jsont.string) ~enc:(fun r -> r.tags) 3123 - |> Jsont.Object.mem "text" Jsont.string ~enc:(fun r -> r.text) 3124 4148 |> Jsont.Object.finish 3125 4149 3126 4150 end 3127 - module GetPosts = struct 4151 + module GetPostThread = struct 3128 4152 type params = { 3129 - uris : string list; 3130 - } 3131 - 3132 - let params_jsont = 3133 - Jsont.Object.map ~kind:"Params" 3134 - (fun uris -> { 3135 - uris; 3136 - }) 3137 - |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 3138 - ~enc:(fun r -> r.uris) 3139 - |> Jsont.Object.finish 3140 - 3141 - type output = { 3142 - posts : Jsont.json list; 3143 - } 3144 - 3145 - let output_jsont = 3146 - Jsont.Object.map ~kind:"Output" 3147 - (fun _typ posts -> { posts }) 3148 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPosts#output" ~enc:(fun _ -> "app.bsky.feed.getPosts#output") 3149 - |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 3150 - |> Jsont.Object.finish 3151 - 3152 - end 3153 - module GetQuotes = struct 3154 - type params = { 3155 - cid : string option; 3156 - cursor : string option; 3157 - limit : int option; 4153 + depth : int option; 4154 + parent_height : int option; 3158 4155 uri : string; 3159 4156 } 3160 4157 3161 4158 let params_jsont = 3162 4159 Jsont.Object.map ~kind:"Params" 3163 - (fun cid cursor limit uri -> { 3164 - cid; 3165 - cursor; 3166 - limit; 4160 + (fun depth parent_height uri -> { 4161 + depth; 4162 + parent_height; 3167 4163 uri; 3168 4164 }) 3169 - |> Jsont.Object.opt_mem "cid" Jsont.string 3170 - ~enc:(fun r -> r.cid) 3171 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3172 - ~enc:(fun r -> r.cursor) 3173 - |> Jsont.Object.opt_mem "limit" Jsont.int 3174 - ~enc:(fun r -> r.limit) 4165 + |> Jsont.Object.opt_mem "depth" Jsont.int 4166 + ~enc:(fun r -> r.depth) 4167 + |> Jsont.Object.opt_mem "parentHeight" Jsont.int 4168 + ~enc:(fun r -> r.parent_height) 3175 4169 |> Jsont.Object.mem "uri" Jsont.string 3176 4170 ~enc:(fun r -> r.uri) 3177 4171 |> Jsont.Object.finish 3178 4172 3179 4173 type output = { 3180 - cid : string option; 3181 - cursor : string option; 3182 - posts : Jsont.json list; 3183 - uri : string; 4174 + thread : Jsont.json; 4175 + threadgate : Jsont.json option; 3184 4176 } 3185 4177 3186 4178 let output_jsont = 3187 4179 Jsont.Object.map ~kind:"Output" 3188 - (fun _typ cid cursor posts uri -> { cid; cursor; posts; uri }) 3189 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getQuotes#output" ~enc:(fun _ -> "app.bsky.feed.getQuotes#output") 3190 - |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3191 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3192 - |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 3193 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4180 + (fun _typ thread threadgate -> { thread; threadgate }) 4181 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPostThread#output" ~enc:(fun _ -> "app.bsky.feed.getPostThread#output") 4182 + |> Jsont.Object.mem "thread" Jsont.json ~enc:(fun r -> r.thread) 4183 + |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 3194 4184 |> Jsont.Object.finish 3195 4185 3196 4186 end 3197 - module GetAuthorFeed = struct 4187 + module GetFeed = struct 3198 4188 type params = { 3199 - actor : string; 3200 4189 cursor : string option; 3201 - filter : string option; 3202 - include_pins : bool option; 4190 + feed : string; 3203 4191 limit : int option; 3204 4192 } 3205 4193 3206 4194 let params_jsont = 3207 4195 Jsont.Object.map ~kind:"Params" 3208 - (fun actor cursor filter include_pins limit -> { 3209 - actor; 4196 + (fun cursor feed limit -> { 3210 4197 cursor; 3211 - filter; 3212 - include_pins; 4198 + feed; 3213 4199 limit; 3214 4200 }) 3215 - |> Jsont.Object.mem "actor" Jsont.string 3216 - ~enc:(fun r -> r.actor) 3217 4201 |> Jsont.Object.opt_mem "cursor" Jsont.string 3218 4202 ~enc:(fun r -> r.cursor) 3219 - |> Jsont.Object.opt_mem "filter" Jsont.string 3220 - ~enc:(fun r -> r.filter) 3221 - |> Jsont.Object.opt_mem "includePins" Jsont.bool 3222 - ~enc:(fun r -> r.include_pins) 4203 + |> Jsont.Object.mem "feed" Jsont.string 4204 + ~enc:(fun r -> r.feed) 3223 4205 |> Jsont.Object.opt_mem "limit" Jsont.int 3224 4206 ~enc:(fun r -> r.limit) 3225 4207 |> Jsont.Object.finish ··· 3232 4214 let output_jsont = 3233 4215 Jsont.Object.map ~kind:"Output" 3234 4216 (fun _typ cursor feed -> { cursor; feed }) 3235 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getAuthorFeed#output" ~enc:(fun _ -> "app.bsky.feed.getAuthorFeed#output") 4217 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeed#output" ~enc:(fun _ -> "app.bsky.feed.getFeed#output") 3236 4218 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3237 4219 |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 3238 4220 |> Jsont.Object.finish 3239 4221 3240 4222 end 3241 - module GetTimeline = struct 4223 + module GetQuotes = struct 3242 4224 type params = { 3243 - algorithm : string option; 4225 + cid : string option; 3244 4226 cursor : string option; 3245 4227 limit : int option; 4228 + uri : string; 3246 4229 } 3247 4230 3248 4231 let params_jsont = 3249 4232 Jsont.Object.map ~kind:"Params" 3250 - (fun algorithm cursor limit -> { 3251 - algorithm; 4233 + (fun cid cursor limit uri -> { 4234 + cid; 3252 4235 cursor; 3253 4236 limit; 4237 + uri; 3254 4238 }) 3255 - |> Jsont.Object.opt_mem "algorithm" Jsont.string 3256 - ~enc:(fun r -> r.algorithm) 4239 + |> Jsont.Object.opt_mem "cid" Jsont.string 4240 + ~enc:(fun r -> r.cid) 3257 4241 |> Jsont.Object.opt_mem "cursor" Jsont.string 3258 4242 ~enc:(fun r -> r.cursor) 3259 4243 |> Jsont.Object.opt_mem "limit" Jsont.int 3260 4244 ~enc:(fun r -> r.limit) 4245 + |> Jsont.Object.mem "uri" Jsont.string 4246 + ~enc:(fun r -> r.uri) 3261 4247 |> Jsont.Object.finish 3262 4248 3263 4249 type output = { 4250 + cid : string option; 3264 4251 cursor : string option; 3265 - feed : Jsont.json list; 4252 + posts : Jsont.json list; 4253 + uri : string; 3266 4254 } 3267 4255 3268 4256 let output_jsont = 3269 4257 Jsont.Object.map ~kind:"Output" 3270 - (fun _typ cursor feed -> { cursor; feed }) 3271 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getTimeline#output" ~enc:(fun _ -> "app.bsky.feed.getTimeline#output") 4258 + (fun _typ cid cursor posts uri -> { cid; cursor; posts; uri }) 4259 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getQuotes#output" ~enc:(fun _ -> "app.bsky.feed.getQuotes#output") 4260 + |> Jsont.Object.opt_mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3272 4261 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3273 - |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 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) 3274 4264 |> Jsont.Object.finish 3275 4265 3276 4266 end ··· 3310 4300 |> Jsont.Object.finish 3311 4301 3312 4302 end 3313 - module GetSuggestedFeeds = struct 3314 - type params = { 3315 - cursor : string option; 3316 - limit : int option; 3317 - } 3318 - 3319 - let params_jsont = 3320 - Jsont.Object.map ~kind:"Params" 3321 - (fun cursor limit -> { 3322 - cursor; 3323 - limit; 3324 - }) 3325 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3326 - ~enc:(fun r -> r.cursor) 3327 - |> Jsont.Object.opt_mem "limit" Jsont.int 3328 - ~enc:(fun r -> r.limit) 3329 - |> Jsont.Object.finish 3330 - 3331 - type output = { 3332 - cursor : string option; 3333 - feeds : Jsont.json list; 3334 - } 3335 - 3336 - let output_jsont = 3337 - Jsont.Object.map ~kind:"Output" 3338 - (fun _typ cursor feeds -> { cursor; feeds }) 3339 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getSuggestedFeeds#output" ~enc:(fun _ -> "app.bsky.feed.getSuggestedFeeds#output") 3340 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3341 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 3342 - |> Jsont.Object.finish 3343 - 3344 - end 3345 4303 module GetActorLikes = struct 3346 4304 type params = { 3347 4305 actor : string; ··· 3378 4336 |> Jsont.Object.finish 3379 4337 3380 4338 end 3381 - module GetActorFeeds = struct 4339 + module GetFeedSkeleton = struct 3382 4340 type params = { 3383 - actor : string; 3384 4341 cursor : string option; 4342 + feed : string; 3385 4343 limit : int option; 3386 4344 } 3387 4345 3388 4346 let params_jsont = 3389 4347 Jsont.Object.map ~kind:"Params" 3390 - (fun actor cursor limit -> { 3391 - actor; 4348 + (fun cursor feed limit -> { 3392 4349 cursor; 4350 + feed; 3393 4351 limit; 3394 4352 }) 3395 - |> Jsont.Object.mem "actor" Jsont.string 3396 - ~enc:(fun r -> r.actor) 3397 4353 |> Jsont.Object.opt_mem "cursor" Jsont.string 3398 4354 ~enc:(fun r -> r.cursor) 4355 + |> Jsont.Object.mem "feed" Jsont.string 4356 + ~enc:(fun r -> r.feed) 3399 4357 |> Jsont.Object.opt_mem "limit" Jsont.int 3400 4358 ~enc:(fun r -> r.limit) 3401 4359 |> Jsont.Object.finish 3402 4360 3403 4361 type output = { 3404 4362 cursor : string option; 3405 - feeds : Jsont.json list; 4363 + feed : Jsont.json list; 4364 + req_id : string option; 3406 4365 } 3407 4366 3408 4367 let output_jsont = 3409 4368 Jsont.Object.map ~kind:"Output" 3410 - (fun _typ cursor feeds -> { cursor; feeds }) 3411 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getActorFeeds#output" ~enc:(fun _ -> "app.bsky.feed.getActorFeeds#output") 4369 + (fun _typ cursor feed req_id -> { cursor; feed; req_id }) 4370 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedSkeleton#output" ~enc:(fun _ -> "app.bsky.feed.getFeedSkeleton#output") 3412 4371 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3413 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4372 + |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4373 + |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 3414 4374 |> Jsont.Object.finish 3415 4375 3416 4376 end ··· 3488 4448 |> Jsont.Object.finish 3489 4449 3490 4450 end 3491 - module GetPostThread = struct 3492 - type params = { 3493 - depth : int option; 3494 - parent_height : int option; 3495 - uri : string; 3496 - } 3497 - 3498 - let params_jsont = 3499 - Jsont.Object.map ~kind:"Params" 3500 - (fun depth parent_height uri -> { 3501 - depth; 3502 - parent_height; 3503 - uri; 3504 - }) 3505 - |> Jsont.Object.opt_mem "depth" Jsont.int 3506 - ~enc:(fun r -> r.depth) 3507 - |> Jsont.Object.opt_mem "parentHeight" Jsont.int 3508 - ~enc:(fun r -> r.parent_height) 3509 - |> Jsont.Object.mem "uri" Jsont.string 3510 - ~enc:(fun r -> r.uri) 3511 - |> Jsont.Object.finish 3512 - 3513 - type output = { 3514 - thread : Jsont.json; 3515 - threadgate : Jsont.json option; 3516 - } 3517 - 3518 - let output_jsont = 3519 - Jsont.Object.map ~kind:"Output" 3520 - (fun _typ thread threadgate -> { thread; threadgate }) 3521 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPostThread#output" ~enc:(fun _ -> "app.bsky.feed.getPostThread#output") 3522 - |> Jsont.Object.mem "thread" Jsont.json ~enc:(fun r -> r.thread) 3523 - |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 3524 - |> Jsont.Object.finish 3525 - 3526 - end 3527 - module GetFeedSkeleton = struct 3528 - type params = { 3529 - cursor : string option; 3530 - feed : string; 3531 - limit : int option; 3532 - } 3533 - 3534 - let params_jsont = 3535 - Jsont.Object.map ~kind:"Params" 3536 - (fun cursor feed limit -> { 3537 - cursor; 3538 - feed; 3539 - limit; 3540 - }) 3541 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3542 - ~enc:(fun r -> r.cursor) 3543 - |> Jsont.Object.mem "feed" Jsont.string 3544 - ~enc:(fun r -> r.feed) 3545 - |> Jsont.Object.opt_mem "limit" Jsont.int 3546 - ~enc:(fun r -> r.limit) 3547 - |> Jsont.Object.finish 3548 - 3549 - type output = { 3550 - cursor : string option; 3551 - feed : Jsont.json list; 3552 - req_id : string option; 3553 - } 3554 - 3555 - let output_jsont = 3556 - Jsont.Object.map ~kind:"Output" 3557 - (fun _typ cursor feed req_id -> { cursor; feed; req_id }) 3558 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedSkeleton#output" ~enc:(fun _ -> "app.bsky.feed.getFeedSkeleton#output") 3559 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3560 - |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 3561 - |> Jsont.Object.opt_mem "reqId" Jsont.string ~enc:(fun r -> r.req_id) 3562 - |> Jsont.Object.finish 3563 - 3564 - end 3565 - module GetFeed = struct 3566 - type params = { 3567 - cursor : string option; 3568 - feed : string; 3569 - limit : int option; 3570 - } 3571 - 3572 - let params_jsont = 3573 - Jsont.Object.map ~kind:"Params" 3574 - (fun cursor feed limit -> { 3575 - cursor; 3576 - feed; 3577 - limit; 3578 - }) 3579 - |> Jsont.Object.opt_mem "cursor" Jsont.string 3580 - ~enc:(fun r -> r.cursor) 3581 - |> Jsont.Object.mem "feed" Jsont.string 3582 - ~enc:(fun r -> r.feed) 3583 - |> Jsont.Object.opt_mem "limit" Jsont.int 3584 - ~enc:(fun r -> r.limit) 3585 - |> Jsont.Object.finish 3586 - 3587 - type output = { 3588 - cursor : string option; 3589 - feed : Jsont.json list; 3590 - } 3591 - 3592 - let output_jsont = 3593 - Jsont.Object.map ~kind:"Output" 3594 - (fun _typ cursor feed -> { cursor; feed }) 3595 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeed#output" ~enc:(fun _ -> "app.bsky.feed.getFeed#output") 3596 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3597 - |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 3598 - |> Jsont.Object.finish 3599 - 3600 - end 3601 4451 module GetFeedGenerators = struct 3602 4452 type params = { 3603 4453 feeds : string list; ··· 3641 4491 let output_jsont = Jsont.ignore 3642 4492 3643 4493 end 3644 - module GetFeedGenerator = struct 3645 - type params = { 3646 - feed : string; 3647 - } 3648 - 3649 - let params_jsont = 3650 - Jsont.Object.map ~kind:"Params" 3651 - (fun feed -> { 3652 - feed; 3653 - }) 3654 - |> Jsont.Object.mem "feed" Jsont.string 3655 - ~enc:(fun r -> r.feed) 3656 - |> Jsont.Object.finish 3657 - 3658 - type output = { 3659 - is_online : bool; 3660 - is_valid : bool; 3661 - view : Jsont.json; 3662 - } 3663 - 3664 - let output_jsont = 3665 - Jsont.Object.map ~kind:"Output" 3666 - (fun _typ is_online is_valid view -> { is_online; is_valid; view }) 3667 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedGenerator#output" ~enc:(fun _ -> "app.bsky.feed.getFeedGenerator#output") 3668 - |> Jsont.Object.mem "isOnline" Jsont.bool ~enc:(fun r -> r.is_online) 3669 - |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 3670 - |> Jsont.Object.mem "view" Jsont.json ~enc:(fun r -> r.view) 3671 - |> Jsont.Object.finish 3672 - 3673 - end 3674 - end 3675 - module Graph = struct 3676 - module Defs = struct 3677 - type starter_pack_view_basic = { 3678 - cid : string; 3679 - creator : Jsont.json; 3680 - indexed_at : string; 3681 - joined_all_time_count : int option; 3682 - joined_week_count : int option; 3683 - labels : Com.Atproto.Label.Defs.label list option; 3684 - list_item_count : int option; 3685 - record : Jsont.json; 3686 - uri : string; 3687 - } 3688 - 3689 - let starter_pack_view_basic_jsont = 3690 - Jsont.Object.map ~kind:"Starter_pack_view_basic" 3691 - (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 }) 3692 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackViewBasic") 3693 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3694 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 3695 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3696 - |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 3697 - |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 3698 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 3699 - |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 3700 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 3701 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3702 - |> Jsont.Object.finish 3703 - 3704 - type relationship = { 3705 - blocked_by : string option; 3706 - blocked_by_list : string option; 3707 - blocking : string option; 3708 - blocking_by_list : string option; 3709 - did : string; 3710 - followed_by : string option; 3711 - following : string option; 3712 - } 3713 - 3714 - let relationship_jsont = 3715 - Jsont.Object.map ~kind:"Relationship" 3716 - (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 }) 3717 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#relationship" ~enc:(fun _ -> "app.bsky.graph.defs#relationship") 3718 - |> Jsont.Object.opt_mem "blockedBy" Jsont.string ~enc:(fun r -> r.blocked_by) 3719 - |> Jsont.Object.opt_mem "blockedByList" Jsont.string ~enc:(fun r -> r.blocked_by_list) 3720 - |> Jsont.Object.opt_mem "blocking" Jsont.string ~enc:(fun r -> r.blocking) 3721 - |> Jsont.Object.opt_mem "blockingByList" Jsont.string ~enc:(fun r -> r.blocking_by_list) 3722 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 3723 - |> Jsont.Object.opt_mem "followedBy" Jsont.string ~enc:(fun r -> r.followed_by) 3724 - |> Jsont.Object.opt_mem "following" Jsont.string ~enc:(fun r -> r.following) 3725 - |> Jsont.Object.finish 3726 - 3727 - type referencelist = string 3728 - let referencelist_jsont = Jsont.string 3729 - 3730 - type not_found_actor = { 3731 - actor : string; 3732 - not_found : bool; 3733 - } 3734 - 3735 - let not_found_actor_jsont = 3736 - Jsont.Object.map ~kind:"Not_found_actor" 3737 - (fun _typ actor not_found -> { actor; not_found }) 3738 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#notFoundActor" ~enc:(fun _ -> "app.bsky.graph.defs#notFoundActor") 3739 - |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 3740 - |> Jsont.Object.mem "notFound" Jsont.bool ~enc:(fun r -> r.not_found) 3741 - |> Jsont.Object.finish 3742 - 3743 - type modlist = string 3744 - let modlist_jsont = Jsont.string 3745 - 3746 - type list_viewer_state = { 3747 - blocked : string option; 3748 - muted : bool option; 3749 - } 3750 - 3751 - let list_viewer_state_jsont = 3752 - Jsont.Object.map ~kind:"List_viewer_state" 3753 - (fun _typ blocked muted -> { blocked; muted }) 3754 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewerState" ~enc:(fun _ -> "app.bsky.graph.defs#listViewerState") 3755 - |> Jsont.Object.opt_mem "blocked" Jsont.string ~enc:(fun r -> r.blocked) 3756 - |> Jsont.Object.opt_mem "muted" Jsont.bool ~enc:(fun r -> r.muted) 3757 - |> Jsont.Object.finish 3758 - 3759 - type list_purpose = string 3760 - let list_purpose_jsont = Jsont.string 3761 - 3762 - type list_item_view = { 3763 - subject : Jsont.json; 3764 - uri : string; 3765 - } 3766 - 3767 - let list_item_view_jsont = 3768 - Jsont.Object.map ~kind:"List_item_view" 3769 - (fun _typ subject uri -> { subject; uri }) 3770 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listItemView" ~enc:(fun _ -> "app.bsky.graph.defs#listItemView") 3771 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 3772 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3773 - |> Jsont.Object.finish 3774 - 3775 - type curatelist = string 3776 - let curatelist_jsont = Jsont.string 3777 - 3778 - type list_view_basic = { 3779 - avatar : string option; 3780 - cid : string; 3781 - indexed_at : string option; 3782 - labels : Com.Atproto.Label.Defs.label list option; 3783 - list_item_count : int option; 3784 - name : string; 3785 - purpose : Jsont.json; 3786 - uri : string; 3787 - viewer : Jsont.json option; 3788 - } 3789 - 3790 - let list_view_basic_jsont = 3791 - Jsont.Object.map ~kind:"List_view_basic" 3792 - (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 }) 3793 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listViewBasic" ~enc:(fun _ -> "app.bsky.graph.defs#listViewBasic") 3794 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 3795 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3796 - |> Jsont.Object.opt_mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3797 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 3798 - |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 3799 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 3800 - |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 3801 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3802 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3803 - |> Jsont.Object.finish 3804 - 3805 - type list_view = { 3806 - avatar : string option; 3807 - cid : string; 3808 - creator : Jsont.json; 3809 - description : string option; 3810 - description_facets : Richtext.Facet.main list option; 3811 - indexed_at : string; 3812 - labels : Com.Atproto.Label.Defs.label list option; 3813 - list_item_count : int option; 3814 - name : string; 3815 - purpose : Jsont.json; 3816 - uri : string; 3817 - viewer : Jsont.json option; 3818 - } 3819 - 3820 - let list_view_jsont = 3821 - Jsont.Object.map ~kind:"List_view" 3822 - (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 }) 3823 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#listView" ~enc:(fun _ -> "app.bsky.graph.defs#listView") 3824 - |> Jsont.Object.opt_mem "avatar" Jsont.string ~enc:(fun r -> r.avatar) 3825 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3826 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 3827 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 3828 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 3829 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3830 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 3831 - |> Jsont.Object.opt_mem "listItemCount" Jsont.int ~enc:(fun r -> r.list_item_count) 3832 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 3833 - |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 3834 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3835 - |> Jsont.Object.opt_mem "viewer" Jsont.json ~enc:(fun r -> r.viewer) 3836 - |> Jsont.Object.finish 3837 - 3838 - type starter_pack_view = { 3839 - cid : string; 3840 - creator : Jsont.json; 3841 - feeds : Jsont.json list option; 3842 - indexed_at : string; 3843 - joined_all_time_count : int option; 3844 - joined_week_count : int option; 3845 - labels : Com.Atproto.Label.Defs.label list option; 3846 - list_ : Jsont.json option; 3847 - list_items_sample : Jsont.json list option; 3848 - record : Jsont.json; 3849 - uri : string; 3850 - } 3851 - 3852 - let starter_pack_view_jsont = 3853 - Jsont.Object.map ~kind:"Starter_pack_view" 3854 - (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 }) 3855 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.defs#starterPackView" ~enc:(fun _ -> "app.bsky.graph.defs#starterPackView") 3856 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 3857 - |> Jsont.Object.mem "creator" Jsont.json ~enc:(fun r -> r.creator) 3858 - |> Jsont.Object.opt_mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 3859 - |> Jsont.Object.mem "indexedAt" Jsont.string ~enc:(fun r -> r.indexed_at) 3860 - |> Jsont.Object.opt_mem "joinedAllTimeCount" Jsont.int ~enc:(fun r -> r.joined_all_time_count) 3861 - |> Jsont.Object.opt_mem "joinedWeekCount" Jsont.int ~enc:(fun r -> r.joined_week_count) 3862 - |> Jsont.Object.opt_mem "labels" (Jsont.list Com.Atproto.Label.Defs.label_jsont) ~enc:(fun r -> r.labels) 3863 - |> Jsont.Object.opt_mem "list" Jsont.json ~enc:(fun r -> r.list_) 3864 - |> Jsont.Object.opt_mem "listItemsSample" (Jsont.list Jsont.json) ~enc:(fun r -> r.list_items_sample) 3865 - |> Jsont.Object.mem "record" Jsont.json ~enc:(fun r -> r.record) 3866 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 3867 - |> Jsont.Object.finish 3868 - 3869 - end 3870 - module UnmuteActor = struct 3871 - type input = { 3872 - actor : string; 3873 - } 3874 - 3875 - let input_jsont = 3876 - Jsont.Object.map ~kind:"Input" 3877 - (fun _typ actor -> { actor }) 3878 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActor#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActor#input") 3879 - |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 3880 - |> Jsont.Object.finish 3881 - 3882 - end 3883 - module Listitem = struct 3884 - type main = { 3885 - created_at : string; 3886 - list_ : string; 3887 - subject : string; 3888 - } 3889 - 3890 - let main_jsont = 3891 - Jsont.Object.map ~kind:"Main" 3892 - (fun _typ created_at list_ subject -> { created_at; list_; subject }) 3893 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listitem" ~enc:(fun _ -> "app.bsky.graph.listitem") 3894 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 3895 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3896 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 3897 - |> Jsont.Object.finish 3898 - 3899 - end 3900 - module GetSuggestedFollowsByActor = struct 3901 - type params = { 3902 - actor : string; 3903 - } 3904 - 3905 - let params_jsont = 3906 - Jsont.Object.map ~kind:"Params" 3907 - (fun actor -> { 3908 - actor; 3909 - }) 3910 - |> Jsont.Object.mem "actor" Jsont.string 3911 - ~enc:(fun r -> r.actor) 3912 - |> Jsont.Object.finish 3913 - 3914 - type output = { 3915 - is_fallback : bool option; 3916 - rec_id : int option; 3917 - suggestions : Jsont.json list; 3918 - } 3919 - 3920 - let output_jsont = 3921 - Jsont.Object.map ~kind:"Output" 3922 - (fun _typ is_fallback rec_id suggestions -> { is_fallback; rec_id; suggestions }) 3923 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getSuggestedFollowsByActor#output" ~enc:(fun _ -> "app.bsky.graph.getSuggestedFollowsByActor#output") 3924 - |> Jsont.Object.opt_mem "isFallback" Jsont.bool ~enc:(fun r -> r.is_fallback) 3925 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 3926 - |> Jsont.Object.mem "suggestions" (Jsont.list Jsont.json) ~enc:(fun r -> r.suggestions) 3927 - |> Jsont.Object.finish 3928 - 3929 - end 3930 - module MuteActorList = struct 3931 - type input = { 3932 - list_ : string; 3933 - } 3934 - 3935 - let input_jsont = 3936 - Jsont.Object.map ~kind:"Input" 3937 - (fun _typ list_ -> { list_ }) 3938 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActorList#input" ~enc:(fun _ -> "app.bsky.graph.muteActorList#input") 3939 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 3940 - |> Jsont.Object.finish 3941 - 3942 - end 3943 - module GetFollowers = struct 4494 + module GetAuthorFeed = struct 3944 4495 type params = { 3945 4496 actor : string; 3946 4497 cursor : string option; 4498 + filter : string option; 4499 + include_pins : bool option; 3947 4500 limit : int option; 3948 4501 } 3949 4502 3950 4503 let params_jsont = 3951 4504 Jsont.Object.map ~kind:"Params" 3952 - (fun actor cursor limit -> { 4505 + (fun actor cursor filter include_pins limit -> { 3953 4506 actor; 3954 4507 cursor; 4508 + filter; 4509 + include_pins; 3955 4510 limit; 3956 4511 }) 3957 4512 |> Jsont.Object.mem "actor" Jsont.string 3958 4513 ~enc:(fun r -> r.actor) 3959 4514 |> Jsont.Object.opt_mem "cursor" Jsont.string 3960 4515 ~enc:(fun r -> r.cursor) 4516 + |> Jsont.Object.opt_mem "filter" Jsont.string 4517 + ~enc:(fun r -> r.filter) 4518 + |> Jsont.Object.opt_mem "includePins" Jsont.bool 4519 + ~enc:(fun r -> r.include_pins) 3961 4520 |> Jsont.Object.opt_mem "limit" Jsont.int 3962 4521 ~enc:(fun r -> r.limit) 3963 4522 |> Jsont.Object.finish 3964 4523 3965 4524 type output = { 3966 4525 cursor : string option; 3967 - followers : Jsont.json list; 3968 - subject : Jsont.json; 4526 + feed : Jsont.json list; 3969 4527 } 3970 4528 3971 4529 let output_jsont = 3972 4530 Jsont.Object.map ~kind:"Output" 3973 - (fun _typ cursor followers subject -> { cursor; followers; subject }) 3974 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getFollowers#output") 4531 + (fun _typ cursor feed -> { cursor; feed }) 4532 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getAuthorFeed#output" ~enc:(fun _ -> "app.bsky.feed.getAuthorFeed#output") 3975 4533 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 3976 - |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 3977 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 3978 - |> Jsont.Object.finish 3979 - 3980 - end 3981 - module MuteActor = struct 3982 - type input = { 3983 - actor : string; 3984 - } 3985 - 3986 - let input_jsont = 3987 - Jsont.Object.map ~kind:"Input" 3988 - (fun _typ actor -> { actor }) 3989 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteActor#input" ~enc:(fun _ -> "app.bsky.graph.muteActor#input") 3990 - |> Jsont.Object.mem "actor" Jsont.string ~enc:(fun r -> r.actor) 3991 - |> Jsont.Object.finish 3992 - 3993 - end 3994 - module UnmuteActorList = struct 3995 - type input = { 3996 - list_ : string; 3997 - } 3998 - 3999 - let input_jsont = 4000 - Jsont.Object.map ~kind:"Input" 4001 - (fun _typ list_ -> { list_ }) 4002 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteActorList#input" ~enc:(fun _ -> "app.bsky.graph.unmuteActorList#input") 4003 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 4534 + |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4004 4535 |> Jsont.Object.finish 4005 4536 4006 4537 end 4007 - module GetBlocks = struct 4538 + module GetFeedGenerator = struct 4008 4539 type params = { 4009 - cursor : string option; 4010 - limit : int option; 4540 + feed : string; 4011 4541 } 4012 4542 4013 4543 let params_jsont = 4014 4544 Jsont.Object.map ~kind:"Params" 4015 - (fun cursor limit -> { 4016 - cursor; 4017 - limit; 4545 + (fun feed -> { 4546 + feed; 4018 4547 }) 4019 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4020 - ~enc:(fun r -> r.cursor) 4021 - |> Jsont.Object.opt_mem "limit" Jsont.int 4022 - ~enc:(fun r -> r.limit) 4548 + |> Jsont.Object.mem "feed" Jsont.string 4549 + ~enc:(fun r -> r.feed) 4023 4550 |> Jsont.Object.finish 4024 4551 4025 4552 type output = { 4026 - blocks : Jsont.json list; 4027 - cursor : string option; 4553 + is_online : bool; 4554 + is_valid : bool; 4555 + view : Jsont.json; 4028 4556 } 4029 4557 4030 4558 let output_jsont = 4031 4559 Jsont.Object.map ~kind:"Output" 4032 - (fun _typ blocks cursor -> { blocks; cursor }) 4033 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getBlocks#output") 4034 - |> Jsont.Object.mem "blocks" (Jsont.list Jsont.json) ~enc:(fun r -> r.blocks) 4035 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4560 + (fun _typ is_online is_valid view -> { is_online; is_valid; view }) 4561 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getFeedGenerator#output" ~enc:(fun _ -> "app.bsky.feed.getFeedGenerator#output") 4562 + |> Jsont.Object.mem "isOnline" Jsont.bool ~enc:(fun r -> r.is_online) 4563 + |> Jsont.Object.mem "isValid" Jsont.bool ~enc:(fun r -> r.is_valid) 4564 + |> Jsont.Object.mem "view" Jsont.json ~enc:(fun r -> r.view) 4036 4565 |> Jsont.Object.finish 4037 4566 4038 4567 end 4039 - module Listblock = struct 4040 - type main = { 4041 - created_at : string; 4042 - subject : string; 4043 - } 4044 - 4045 - let main_jsont = 4046 - Jsont.Object.map ~kind:"Main" 4047 - (fun _typ created_at subject -> { created_at; subject }) 4048 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.listblock" ~enc:(fun _ -> "app.bsky.graph.listblock") 4049 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4050 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 4051 - |> Jsont.Object.finish 4052 - 4053 - end 4054 - module MuteThread = struct 4055 - type input = { 4056 - root : string; 4057 - } 4058 - 4059 - let input_jsont = 4060 - Jsont.Object.map ~kind:"Input" 4061 - (fun _typ root -> { root }) 4062 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.muteThread#input" ~enc:(fun _ -> "app.bsky.graph.muteThread#input") 4063 - |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 4064 - |> Jsont.Object.finish 4065 - 4066 - end 4067 - module Follow = struct 4068 - type main = { 4069 - created_at : string; 4070 - subject : string; 4071 - via : Com.Atproto.Repo.StrongRef.main option; 4072 - } 4073 - 4074 - let main_jsont = 4075 - Jsont.Object.map ~kind:"Main" 4076 - (fun _typ created_at subject via -> { created_at; subject; via }) 4077 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.follow" ~enc:(fun _ -> "app.bsky.graph.follow") 4078 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4079 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 4080 - |> Jsont.Object.opt_mem "via" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.via) 4081 - |> Jsont.Object.finish 4082 - 4083 - end 4084 - module Starterpack = struct 4085 - type feed_item = { 4086 - uri : string; 4087 - } 4088 - 4089 - let feed_item_jsont = 4090 - Jsont.Object.map ~kind:"Feed_item" 4091 - (fun _typ uri -> { uri }) 4092 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.starterpack#feedItem" ~enc:(fun _ -> "app.bsky.graph.starterpack#feedItem") 4093 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4094 - |> Jsont.Object.finish 4095 - 4096 - type main = { 4097 - created_at : string; 4098 - description : string option; 4099 - description_facets : Richtext.Facet.main list option; 4100 - feeds : Jsont.json list option; 4101 - list_ : string; 4102 - name : string; 4103 - } 4104 - 4105 - let main_jsont = 4106 - Jsont.Object.map ~kind:"Main" 4107 - (fun _typ created_at description description_facets feeds list_ name -> { created_at; description; description_facets; feeds; list_; name }) 4108 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.starterpack" ~enc:(fun _ -> "app.bsky.graph.starterpack") 4109 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4110 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 4111 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 4112 - |> Jsont.Object.opt_mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4113 - |> Jsont.Object.mem "list" Jsont.string ~enc:(fun r -> r.list_) 4114 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 4115 - |> Jsont.Object.finish 4116 - 4117 - end 4118 - module GetFollows = struct 4119 - type params = { 4120 - actor : string; 4121 - cursor : string option; 4122 - limit : int option; 4123 - } 4124 - 4125 - let params_jsont = 4126 - Jsont.Object.map ~kind:"Params" 4127 - (fun actor cursor limit -> { 4128 - actor; 4129 - cursor; 4130 - limit; 4131 - }) 4132 - |> Jsont.Object.mem "actor" Jsont.string 4133 - ~enc:(fun r -> r.actor) 4134 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4135 - ~enc:(fun r -> r.cursor) 4136 - |> Jsont.Object.opt_mem "limit" Jsont.int 4137 - ~enc:(fun r -> r.limit) 4138 - |> Jsont.Object.finish 4139 - 4140 - type output = { 4141 - cursor : string option; 4142 - follows : Jsont.json list; 4143 - subject : Jsont.json; 4144 - } 4145 - 4146 - let output_jsont = 4147 - Jsont.Object.map ~kind:"Output" 4148 - (fun _typ cursor follows subject -> { cursor; follows; subject }) 4149 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getFollows#output" ~enc:(fun _ -> "app.bsky.graph.getFollows#output") 4150 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4151 - |> Jsont.Object.mem "follows" (Jsont.list Jsont.json) ~enc:(fun r -> r.follows) 4152 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 4153 - |> Jsont.Object.finish 4154 - 4155 - end 4156 - module Verification = struct 4157 - type main = { 4158 - created_at : string; 4159 - display_name : string; 4160 - handle : string; 4161 - subject : string; 4162 - } 4163 - 4164 - let main_jsont = 4165 - Jsont.Object.map ~kind:"Main" 4166 - (fun _typ created_at display_name handle subject -> { created_at; display_name; handle; subject }) 4167 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.verification" ~enc:(fun _ -> "app.bsky.graph.verification") 4168 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4169 - |> Jsont.Object.mem "displayName" Jsont.string ~enc:(fun r -> r.display_name) 4170 - |> Jsont.Object.mem "handle" Jsont.string ~enc:(fun r -> r.handle) 4171 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 4172 - |> Jsont.Object.finish 4173 - 4174 - end 4175 - module UnmuteThread = struct 4176 - type input = { 4177 - root : string; 4178 - } 4179 - 4180 - let input_jsont = 4181 - Jsont.Object.map ~kind:"Input" 4182 - (fun _typ root -> { root }) 4183 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.unmuteThread#input" ~enc:(fun _ -> "app.bsky.graph.unmuteThread#input") 4184 - |> Jsont.Object.mem "root" Jsont.string ~enc:(fun r -> r.root) 4185 - |> Jsont.Object.finish 4186 - 4187 - end 4188 - module GetMutes = struct 4568 + module GetSuggestedFeeds = struct 4189 4569 type params = { 4190 4570 cursor : string option; 4191 4571 limit : int option; ··· 4205 4585 4206 4586 type output = { 4207 4587 cursor : string option; 4208 - mutes : Jsont.json list; 4588 + feeds : Jsont.json list; 4209 4589 } 4210 4590 4211 4591 let output_jsont = 4212 4592 Jsont.Object.map ~kind:"Output" 4213 - (fun _typ cursor mutes -> { cursor; mutes }) 4214 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getMutes#output" ~enc:(fun _ -> "app.bsky.graph.getMutes#output") 4593 + (fun _typ cursor feeds -> { cursor; feeds }) 4594 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getSuggestedFeeds#output" ~enc:(fun _ -> "app.bsky.feed.getSuggestedFeeds#output") 4215 4595 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4216 - |> Jsont.Object.mem "mutes" (Jsont.list Jsont.json) ~enc:(fun r -> r.mutes) 4596 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4217 4597 |> Jsont.Object.finish 4218 4598 4219 4599 end 4220 - module GetKnownFollowers = struct 4600 + module GetActorFeeds = struct 4221 4601 type params = { 4222 4602 actor : string; 4223 4603 cursor : string option; ··· 4241 4621 4242 4622 type output = { 4243 4623 cursor : string option; 4244 - followers : Jsont.json list; 4245 - subject : Jsont.json; 4624 + feeds : Jsont.json list; 4246 4625 } 4247 4626 4248 4627 let output_jsont = 4249 4628 Jsont.Object.map ~kind:"Output" 4250 - (fun _typ cursor followers subject -> { cursor; followers; subject }) 4251 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getKnownFollowers#output" ~enc:(fun _ -> "app.bsky.graph.getKnownFollowers#output") 4629 + (fun _typ cursor feeds -> { cursor; feeds }) 4630 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getActorFeeds#output" ~enc:(fun _ -> "app.bsky.feed.getActorFeeds#output") 4252 4631 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4253 - |> Jsont.Object.mem "followers" (Jsont.list Jsont.json) ~enc:(fun r -> r.followers) 4254 - |> Jsont.Object.mem "subject" Jsont.json ~enc:(fun r -> r.subject) 4255 - |> Jsont.Object.finish 4256 - 4257 - end 4258 - module Block = struct 4259 - type main = { 4260 - created_at : string; 4261 - subject : string; 4262 - } 4263 - 4264 - let main_jsont = 4265 - Jsont.Object.map ~kind:"Main" 4266 - (fun _typ created_at subject -> { created_at; subject }) 4267 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.block" ~enc:(fun _ -> "app.bsky.graph.block") 4268 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4269 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 4632 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4270 4633 |> Jsont.Object.finish 4271 4634 4272 4635 end 4273 - module GetRelationships = struct 4636 + module GetPosts = struct 4274 4637 type params = { 4275 - actor : string; 4276 - others : string list option; 4638 + uris : string list; 4277 4639 } 4278 4640 4279 4641 let params_jsont = 4280 4642 Jsont.Object.map ~kind:"Params" 4281 - (fun actor others -> { 4282 - actor; 4283 - others; 4643 + (fun uris -> { 4644 + uris; 4284 4645 }) 4285 - |> Jsont.Object.mem "actor" Jsont.string 4286 - ~enc:(fun r -> r.actor) 4287 - |> Jsont.Object.opt_mem "others" (Jsont.list Jsont.string) 4288 - ~enc:(fun r -> r.others) 4646 + |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 4647 + ~enc:(fun r -> r.uris) 4289 4648 |> Jsont.Object.finish 4290 4649 4291 4650 type output = { 4292 - actor : string option; 4293 - relationships : Jsont.json list; 4651 + posts : Jsont.json list; 4294 4652 } 4295 4653 4296 4654 let output_jsont = 4297 4655 Jsont.Object.map ~kind:"Output" 4298 - (fun _typ actor relationships -> { actor; relationships }) 4299 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getRelationships#output" ~enc:(fun _ -> "app.bsky.graph.getRelationships#output") 4300 - |> Jsont.Object.opt_mem "actor" Jsont.string ~enc:(fun r -> r.actor) 4301 - |> Jsont.Object.mem "relationships" (Jsont.list Jsont.json) ~enc:(fun r -> r.relationships) 4656 + (fun _typ posts -> { posts }) 4657 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getPosts#output" ~enc:(fun _ -> "app.bsky.feed.getPosts#output") 4658 + |> Jsont.Object.mem "posts" (Jsont.list Jsont.json) ~enc:(fun r -> r.posts) 4302 4659 |> Jsont.Object.finish 4303 4660 4304 4661 end 4305 - module GetListsWithMembership = struct 4306 - type list_with_membership = { 4307 - list_ : Jsont.json; 4308 - list_item : Jsont.json option; 4309 - } 4310 - 4311 - let list_with_membership_jsont = 4312 - Jsont.Object.map ~kind:"List_with_membership" 4313 - (fun _typ list_ list_item -> { list_; list_item }) 4314 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#listWithMembership" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#listWithMembership") 4315 - |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 4316 - |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 4317 - |> Jsont.Object.finish 4318 - 4662 + module GetTimeline = struct 4319 4663 type params = { 4320 - actor : string; 4664 + algorithm : string option; 4321 4665 cursor : string option; 4322 4666 limit : int option; 4323 - purposes : string list option; 4324 4667 } 4325 4668 4326 4669 let params_jsont = 4327 4670 Jsont.Object.map ~kind:"Params" 4328 - (fun actor cursor limit purposes -> { 4329 - actor; 4671 + (fun algorithm cursor limit -> { 4672 + algorithm; 4330 4673 cursor; 4331 4674 limit; 4332 - purposes; 4333 4675 }) 4334 - |> Jsont.Object.mem "actor" Jsont.string 4335 - ~enc:(fun r -> r.actor) 4676 + |> Jsont.Object.opt_mem "algorithm" Jsont.string 4677 + ~enc:(fun r -> r.algorithm) 4336 4678 |> Jsont.Object.opt_mem "cursor" Jsont.string 4337 4679 ~enc:(fun r -> r.cursor) 4338 4680 |> Jsont.Object.opt_mem "limit" Jsont.int 4339 4681 ~enc:(fun r -> r.limit) 4340 - |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 4341 - ~enc:(fun r -> r.purposes) 4342 4682 |> Jsont.Object.finish 4343 4683 4344 4684 type output = { 4345 4685 cursor : string option; 4346 - lists_with_membership : Jsont.json list; 4686 + feed : Jsont.json list; 4347 4687 } 4348 4688 4349 4689 let output_jsont = 4350 4690 Jsont.Object.map ~kind:"Output" 4351 - (fun _typ cursor lists_with_membership -> { cursor; lists_with_membership }) 4352 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListsWithMembership#output" ~enc:(fun _ -> "app.bsky.graph.getListsWithMembership#output") 4691 + (fun _typ cursor feed -> { cursor; feed }) 4692 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.feed.getTimeline#output" ~enc:(fun _ -> "app.bsky.feed.getTimeline#output") 4353 4693 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4354 - |> Jsont.Object.mem "listsWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists_with_membership) 4694 + |> Jsont.Object.mem "feed" (Jsont.list Jsont.json) ~enc:(fun r -> r.feed) 4355 4695 |> Jsont.Object.finish 4356 4696 4357 4697 end 4358 - module GetListMutes = struct 4359 - type params = { 4360 - cursor : string option; 4361 - limit : int option; 4698 + end 4699 + module Bookmark = struct 4700 + module DeleteBookmark = struct 4701 + type input = { 4702 + uri : string; 4362 4703 } 4363 4704 4364 - let params_jsont = 4365 - Jsont.Object.map ~kind:"Params" 4366 - (fun cursor limit -> { 4367 - cursor; 4368 - limit; 4369 - }) 4370 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4371 - ~enc:(fun r -> r.cursor) 4372 - |> Jsont.Object.opt_mem "limit" Jsont.int 4373 - ~enc:(fun r -> r.limit) 4374 - |> Jsont.Object.finish 4375 - 4376 - type output = { 4377 - cursor : string option; 4378 - lists : Jsont.json list; 4379 - } 4380 - 4381 - let output_jsont = 4382 - Jsont.Object.map ~kind:"Output" 4383 - (fun _typ cursor lists -> { cursor; lists }) 4384 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListMutes#output" ~enc:(fun _ -> "app.bsky.graph.getListMutes#output") 4385 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4386 - |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 4705 + let input_jsont = 4706 + Jsont.Object.map ~kind:"Input" 4707 + (fun _typ uri -> { uri }) 4708 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.deleteBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.deleteBookmark#input") 4709 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4387 4710 |> Jsont.Object.finish 4388 4711 4389 4712 end 4390 - module GetActorStarterPacks = struct 4391 - type params = { 4392 - actor : string; 4393 - cursor : string option; 4394 - limit : int option; 4713 + module CreateBookmark = struct 4714 + type input = { 4715 + cid : string; 4716 + uri : string; 4395 4717 } 4396 4718 4397 - let params_jsont = 4398 - Jsont.Object.map ~kind:"Params" 4399 - (fun actor cursor limit -> { 4400 - actor; 4401 - cursor; 4402 - limit; 4403 - }) 4404 - |> Jsont.Object.mem "actor" Jsont.string 4405 - ~enc:(fun r -> r.actor) 4406 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4407 - ~enc:(fun r -> r.cursor) 4408 - |> Jsont.Object.opt_mem "limit" Jsont.int 4409 - ~enc:(fun r -> r.limit) 4410 - |> Jsont.Object.finish 4411 - 4412 - type output = { 4413 - cursor : string option; 4414 - starter_packs : Jsont.json list; 4415 - } 4416 - 4417 - let output_jsont = 4418 - Jsont.Object.map ~kind:"Output" 4419 - (fun _typ cursor starter_packs -> { cursor; starter_packs }) 4420 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getActorStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getActorStarterPacks#output") 4421 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4422 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 4719 + let input_jsont = 4720 + Jsont.Object.map ~kind:"Input" 4721 + (fun _typ cid uri -> { cid; uri }) 4722 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.createBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.createBookmark#input") 4723 + |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4724 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4423 4725 |> Jsont.Object.finish 4424 4726 4425 4727 end 4426 - module SearchStarterPacks = struct 4427 - type params = { 4428 - cursor : string option; 4429 - limit : int option; 4430 - q : string; 4728 + module Defs = struct 4729 + type bookmark_view = { 4730 + created_at : string option; 4731 + item : Jsont.json; 4732 + subject : Com.Atproto.Repo.StrongRef.main; 4431 4733 } 4432 4734 4433 - let params_jsont = 4434 - Jsont.Object.map ~kind:"Params" 4435 - (fun cursor limit q -> { 4436 - cursor; 4437 - limit; 4438 - q; 4439 - }) 4440 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4441 - ~enc:(fun r -> r.cursor) 4442 - |> Jsont.Object.opt_mem "limit" Jsont.int 4443 - ~enc:(fun r -> r.limit) 4444 - |> Jsont.Object.mem "q" Jsont.string 4445 - ~enc:(fun r -> r.q) 4735 + let bookmark_view_jsont = 4736 + Jsont.Object.map ~kind:"Bookmark_view" 4737 + (fun _typ created_at item subject -> { created_at; item; subject }) 4738 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmarkView" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmarkView") 4739 + |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4740 + |> Jsont.Object.mem "item" Jsont.json ~enc:(fun r -> r.item) 4741 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4446 4742 |> Jsont.Object.finish 4447 4743 4448 - type output = { 4449 - cursor : string option; 4450 - starter_packs : Jsont.json list; 4744 + type bookmark = { 4745 + subject : Com.Atproto.Repo.StrongRef.main; 4451 4746 } 4452 4747 4453 - let output_jsont = 4454 - Jsont.Object.map ~kind:"Output" 4455 - (fun _typ cursor starter_packs -> { cursor; starter_packs }) 4456 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.searchStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.searchStarterPacks#output") 4457 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4458 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 4748 + let bookmark_jsont = 4749 + Jsont.Object.map ~kind:"Bookmark" 4750 + (fun _typ subject -> { subject }) 4751 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmark" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmark") 4752 + |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4459 4753 |> Jsont.Object.finish 4460 4754 4461 4755 end 4462 - module GetStarterPacksWithMembership = struct 4463 - type starter_pack_with_membership = { 4464 - list_item : Jsont.json option; 4465 - starter_pack : Jsont.json; 4466 - } 4467 - 4468 - let starter_pack_with_membership_jsont = 4469 - Jsont.Object.map ~kind:"Starter_pack_with_membership" 4470 - (fun _typ list_item starter_pack -> { list_item; starter_pack }) 4471 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership" ~enc:(fun _ -> "app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership") 4472 - |> Jsont.Object.opt_mem "listItem" Jsont.json ~enc:(fun r -> r.list_item) 4473 - |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 4474 - |> Jsont.Object.finish 4475 - 4756 + module GetBookmarks = struct 4476 4757 type params = { 4477 - actor : string; 4478 4758 cursor : string option; 4479 4759 limit : int option; 4480 4760 } 4481 4761 4482 4762 let params_jsont = 4483 4763 Jsont.Object.map ~kind:"Params" 4484 - (fun actor cursor limit -> { 4485 - actor; 4764 + (fun cursor limit -> { 4486 4765 cursor; 4487 4766 limit; 4488 4767 }) 4489 - |> Jsont.Object.mem "actor" Jsont.string 4490 - ~enc:(fun r -> r.actor) 4491 4768 |> Jsont.Object.opt_mem "cursor" Jsont.string 4492 4769 ~enc:(fun r -> r.cursor) 4493 4770 |> Jsont.Object.opt_mem "limit" Jsont.int ··· 4495 4772 |> Jsont.Object.finish 4496 4773 4497 4774 type output = { 4775 + bookmarks : Defs.bookmark_view list; 4498 4776 cursor : string option; 4499 - starter_packs_with_membership : Jsont.json list; 4500 4777 } 4501 4778 4502 4779 let output_jsont = 4503 4780 Jsont.Object.map ~kind:"Output" 4504 - (fun _typ cursor starter_packs_with_membership -> { cursor; starter_packs_with_membership }) 4505 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacksWithMembership#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPacksWithMembership#output") 4781 + (fun _typ bookmarks cursor -> { bookmarks; cursor }) 4782 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.getBookmarks#output" ~enc:(fun _ -> "app.bsky.bookmark.getBookmarks#output") 4783 + |> Jsont.Object.mem "bookmarks" (Jsont.list Defs.bookmark_view_jsont) ~enc:(fun r -> r.bookmarks) 4506 4784 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4507 - |> Jsont.Object.mem "starterPacksWithMembership" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs_with_membership) 4508 4785 |> Jsont.Object.finish 4509 4786 4510 4787 end 4511 - module GetLists = struct 4788 + end 4789 + module Unspecced = struct 4790 + module GetSuggestedUsersSkeleton = struct 4512 4791 type params = { 4513 - actor : string; 4514 - cursor : string option; 4792 + category : string option; 4515 4793 limit : int option; 4516 - purposes : string list option; 4794 + viewer : string option; 4517 4795 } 4518 4796 4519 4797 let params_jsont = 4520 4798 Jsont.Object.map ~kind:"Params" 4521 - (fun actor cursor limit purposes -> { 4522 - actor; 4523 - cursor; 4799 + (fun category limit viewer -> { 4800 + category; 4524 4801 limit; 4525 - purposes; 4802 + viewer; 4526 4803 }) 4527 - |> Jsont.Object.mem "actor" Jsont.string 4528 - ~enc:(fun r -> r.actor) 4529 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4530 - ~enc:(fun r -> r.cursor) 4804 + |> Jsont.Object.opt_mem "category" Jsont.string 4805 + ~enc:(fun r -> r.category) 4531 4806 |> Jsont.Object.opt_mem "limit" Jsont.int 4532 4807 ~enc:(fun r -> r.limit) 4533 - |> Jsont.Object.opt_mem "purposes" (Jsont.list Jsont.string) 4534 - ~enc:(fun r -> r.purposes) 4535 - |> Jsont.Object.finish 4536 - 4537 - type output = { 4538 - cursor : string option; 4539 - lists : Jsont.json list; 4540 - } 4541 - 4542 - let output_jsont = 4543 - Jsont.Object.map ~kind:"Output" 4544 - (fun _typ cursor lists -> { cursor; lists }) 4545 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getLists#output" ~enc:(fun _ -> "app.bsky.graph.getLists#output") 4546 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4547 - |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 4548 - |> Jsont.Object.finish 4549 - 4550 - end 4551 - module GetStarterPack = struct 4552 - type params = { 4553 - starter_pack : string; 4554 - } 4555 - 4556 - let params_jsont = 4557 - Jsont.Object.map ~kind:"Params" 4558 - (fun starter_pack -> { 4559 - starter_pack; 4560 - }) 4561 - |> Jsont.Object.mem "starterPack" Jsont.string 4562 - ~enc:(fun r -> r.starter_pack) 4808 + |> Jsont.Object.opt_mem "viewer" Jsont.string 4809 + ~enc:(fun r -> r.viewer) 4563 4810 |> Jsont.Object.finish 4564 4811 4565 4812 type output = { 4566 - starter_pack : Jsont.json; 4813 + dids : string list; 4814 + rec_id : int option; 4567 4815 } 4568 4816 4569 4817 let output_jsont = 4570 4818 Jsont.Object.map ~kind:"Output" 4571 - (fun _typ starter_pack -> { starter_pack }) 4572 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPack#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPack#output") 4573 - |> Jsont.Object.mem "starterPack" Jsont.json ~enc:(fun r -> r.starter_pack) 4819 + (fun _typ dids rec_id -> { dids; rec_id }) 4820 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedUsersSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedUsersSkeleton#output") 4821 + |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) ~enc:(fun r -> r.dids) 4822 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 4574 4823 |> Jsont.Object.finish 4575 4824 4576 4825 end 4577 - module GetListBlocks = struct 4826 + module GetOnboardingSuggestedStarterPacks = struct 4578 4827 type params = { 4579 - cursor : string option; 4580 4828 limit : int option; 4581 4829 } 4582 4830 4583 4831 let params_jsont = 4584 4832 Jsont.Object.map ~kind:"Params" 4585 - (fun cursor limit -> { 4586 - cursor; 4833 + (fun limit -> { 4587 4834 limit; 4588 4835 }) 4589 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4590 - ~enc:(fun r -> r.cursor) 4591 4836 |> Jsont.Object.opt_mem "limit" Jsont.int 4592 4837 ~enc:(fun r -> r.limit) 4593 4838 |> Jsont.Object.finish 4594 4839 4595 4840 type output = { 4596 - cursor : string option; 4597 - lists : Jsont.json list; 4598 - } 4599 - 4600 - let output_jsont = 4601 - Jsont.Object.map ~kind:"Output" 4602 - (fun _typ cursor lists -> { cursor; lists }) 4603 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getListBlocks#output" ~enc:(fun _ -> "app.bsky.graph.getListBlocks#output") 4604 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4605 - |> Jsont.Object.mem "lists" (Jsont.list Jsont.json) ~enc:(fun r -> r.lists) 4606 - |> Jsont.Object.finish 4607 - 4608 - end 4609 - module GetStarterPacks = struct 4610 - type params = { 4611 - uris : string list; 4612 - } 4613 - 4614 - let params_jsont = 4615 - Jsont.Object.map ~kind:"Params" 4616 - (fun uris -> { 4617 - uris; 4618 - }) 4619 - |> Jsont.Object.mem "uris" (Jsont.list Jsont.string) 4620 - ~enc:(fun r -> r.uris) 4621 - |> Jsont.Object.finish 4622 - 4623 - type output = { 4624 4841 starter_packs : Jsont.json list; 4625 4842 } 4626 4843 4627 4844 let output_jsont = 4628 4845 Jsont.Object.map ~kind:"Output" 4629 4846 (fun _typ starter_packs -> { starter_packs }) 4630 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getStarterPacks#output" ~enc:(fun _ -> "app.bsky.graph.getStarterPacks#output") 4847 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output" ~enc:(fun _ -> "app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output") 4631 4848 |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 4632 4849 |> Jsont.Object.finish 4633 4850 4634 4851 end 4635 - module GetList = struct 4852 + module GetPopularFeedGenerators = struct 4636 4853 type params = { 4637 4854 cursor : string option; 4638 4855 limit : int option; 4639 - list_ : string; 4856 + query : string option; 4640 4857 } 4641 4858 4642 4859 let params_jsont = 4643 4860 Jsont.Object.map ~kind:"Params" 4644 - (fun cursor limit list_ -> { 4861 + (fun cursor limit query -> { 4645 4862 cursor; 4646 4863 limit; 4647 - list_; 4864 + query; 4648 4865 }) 4649 4866 |> Jsont.Object.opt_mem "cursor" Jsont.string 4650 4867 ~enc:(fun r -> r.cursor) 4651 4868 |> Jsont.Object.opt_mem "limit" Jsont.int 4652 4869 ~enc:(fun r -> r.limit) 4653 - |> Jsont.Object.mem "list" Jsont.string 4654 - ~enc:(fun r -> r.list_) 4870 + |> Jsont.Object.opt_mem "query" Jsont.string 4871 + ~enc:(fun r -> r.query) 4655 4872 |> Jsont.Object.finish 4656 4873 4657 4874 type output = { 4658 4875 cursor : string option; 4659 - items : Jsont.json list; 4660 - list_ : Jsont.json; 4876 + feeds : Jsont.json list; 4661 4877 } 4662 4878 4663 4879 let output_jsont = 4664 4880 Jsont.Object.map ~kind:"Output" 4665 - (fun _typ cursor items list_ -> { cursor; items; list_ }) 4666 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.getList#output" ~enc:(fun _ -> "app.bsky.graph.getList#output") 4881 + (fun _typ cursor feeds -> { cursor; feeds }) 4882 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPopularFeedGenerators#output" ~enc:(fun _ -> "app.bsky.unspecced.getPopularFeedGenerators#output") 4667 4883 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4668 - |> Jsont.Object.mem "items" (Jsont.list Jsont.json) ~enc:(fun r -> r.items) 4669 - |> Jsont.Object.mem "list" Jsont.json ~enc:(fun r -> r.list_) 4884 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 4670 4885 |> Jsont.Object.finish 4671 4886 4672 4887 end 4673 - module List = struct 4674 - type main = { 4675 - avatar : Atp.Blob_ref.t option; 4676 - created_at : string; 4677 - description : string option; 4678 - description_facets : Richtext.Facet.main list option; 4679 - labels : Com.Atproto.Label.Defs.self_labels option; 4680 - name : string; 4681 - purpose : Jsont.json; 4682 - } 4683 - 4684 - let main_jsont = 4685 - Jsont.Object.map ~kind:"Main" 4686 - (fun _typ avatar created_at description description_facets labels name purpose -> { avatar; created_at; description; description_facets; labels; name; purpose }) 4687 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.graph.list" ~enc:(fun _ -> "app.bsky.graph.list") 4688 - |> Jsont.Object.opt_mem "avatar" Atp.Blob_ref.jsont ~enc:(fun r -> r.avatar) 4689 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4690 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 4691 - |> Jsont.Object.opt_mem "descriptionFacets" (Jsont.list Richtext.Facet.main_jsont) ~enc:(fun r -> r.description_facets) 4692 - |> Jsont.Object.opt_mem "labels" Com.Atproto.Label.Defs.self_labels_jsont ~enc:(fun r -> r.labels) 4693 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 4694 - |> Jsont.Object.mem "purpose" Jsont.json ~enc:(fun r -> r.purpose) 4695 - |> Jsont.Object.finish 4696 - 4697 - end 4698 - end 4699 - module Bookmark = struct 4700 - module Defs = struct 4701 - type bookmark_view = { 4702 - created_at : string option; 4703 - item : Jsont.json; 4704 - subject : Com.Atproto.Repo.StrongRef.main; 4705 - } 4706 - 4707 - let bookmark_view_jsont = 4708 - Jsont.Object.map ~kind:"Bookmark_view" 4709 - (fun _typ created_at item subject -> { created_at; item; subject }) 4710 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmarkView" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmarkView") 4711 - |> Jsont.Object.opt_mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 4712 - |> Jsont.Object.mem "item" Jsont.json ~enc:(fun r -> r.item) 4713 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4714 - |> Jsont.Object.finish 4715 - 4716 - type bookmark = { 4717 - subject : Com.Atproto.Repo.StrongRef.main; 4718 - } 4719 - 4720 - let bookmark_jsont = 4721 - Jsont.Object.map ~kind:"Bookmark" 4722 - (fun _typ subject -> { subject }) 4723 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.defs#bookmark" ~enc:(fun _ -> "app.bsky.bookmark.defs#bookmark") 4724 - |> Jsont.Object.mem "subject" Com.Atproto.Repo.StrongRef.main_jsont ~enc:(fun r -> r.subject) 4725 - |> Jsont.Object.finish 4726 - 4727 - end 4728 - module CreateBookmark = struct 4729 - type input = { 4730 - cid : string; 4731 - uri : string; 4732 - } 4733 - 4734 - let input_jsont = 4735 - Jsont.Object.map ~kind:"Input" 4736 - (fun _typ cid uri -> { cid; uri }) 4737 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.createBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.createBookmark#input") 4738 - |> Jsont.Object.mem "cid" Jsont.string ~enc:(fun r -> r.cid) 4739 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4740 - |> Jsont.Object.finish 4741 - 4742 - end 4743 - module DeleteBookmark = struct 4744 - type input = { 4745 - uri : string; 4746 - } 4747 - 4748 - let input_jsont = 4749 - Jsont.Object.map ~kind:"Input" 4750 - (fun _typ uri -> { uri }) 4751 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.deleteBookmark#input" ~enc:(fun _ -> "app.bsky.bookmark.deleteBookmark#input") 4752 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 4753 - |> Jsont.Object.finish 4754 - 4755 - end 4756 - module GetBookmarks = struct 4888 + module GetSuggestedStarterPacksSkeleton = struct 4757 4889 type params = { 4758 - cursor : string option; 4759 4890 limit : int option; 4891 + viewer : string option; 4760 4892 } 4761 4893 4762 4894 let params_jsont = 4763 4895 Jsont.Object.map ~kind:"Params" 4764 - (fun cursor limit -> { 4765 - cursor; 4896 + (fun limit viewer -> { 4766 4897 limit; 4898 + viewer; 4767 4899 }) 4768 - |> Jsont.Object.opt_mem "cursor" Jsont.string 4769 - ~enc:(fun r -> r.cursor) 4770 4900 |> Jsont.Object.opt_mem "limit" Jsont.int 4771 4901 ~enc:(fun r -> r.limit) 4902 + |> Jsont.Object.opt_mem "viewer" Jsont.string 4903 + ~enc:(fun r -> r.viewer) 4772 4904 |> Jsont.Object.finish 4773 4905 4774 4906 type output = { 4775 - bookmarks : Defs.bookmark_view list; 4776 - cursor : string option; 4907 + starter_packs : string list; 4777 4908 } 4778 4909 4779 4910 let output_jsont = 4780 4911 Jsont.Object.map ~kind:"Output" 4781 - (fun _typ bookmarks cursor -> { bookmarks; cursor }) 4782 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.bookmark.getBookmarks#output" ~enc:(fun _ -> "app.bsky.bookmark.getBookmarks#output") 4783 - |> Jsont.Object.mem "bookmarks" (Jsont.list Defs.bookmark_view_jsont) ~enc:(fun r -> r.bookmarks) 4784 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 4912 + (fun _typ starter_packs -> { starter_packs }) 4913 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedStarterPacksSkeleton#output") 4914 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.string) ~enc:(fun r -> r.starter_packs) 4785 4915 |> Jsont.Object.finish 4786 4916 4787 4917 end 4788 - end 4789 - module Unspecced = struct 4790 4918 module GetSuggestedFeeds = struct 4791 4919 type params = { 4792 4920 limit : int option; ··· 4813 4941 |> Jsont.Object.finish 4814 4942 4815 4943 end 4816 - module GetSuggestedUsers = struct 4944 + module GetSuggestedFeedsSkeleton = struct 4817 4945 type params = { 4818 - category : string option; 4819 4946 limit : int option; 4947 + viewer : string option; 4820 4948 } 4821 4949 4822 4950 let params_jsont = 4823 4951 Jsont.Object.map ~kind:"Params" 4824 - (fun category limit -> { 4825 - category; 4952 + (fun limit viewer -> { 4826 4953 limit; 4954 + viewer; 4827 4955 }) 4828 - |> Jsont.Object.opt_mem "category" Jsont.string 4829 - ~enc:(fun r -> r.category) 4830 4956 |> Jsont.Object.opt_mem "limit" Jsont.int 4831 4957 ~enc:(fun r -> r.limit) 4958 + |> Jsont.Object.opt_mem "viewer" Jsont.string 4959 + ~enc:(fun r -> r.viewer) 4832 4960 |> Jsont.Object.finish 4833 4961 4834 4962 type output = { 4835 - actors : Jsont.json list; 4836 - rec_id : int option; 4963 + feeds : string list; 4837 4964 } 4838 4965 4839 4966 let output_jsont = 4840 4967 Jsont.Object.map ~kind:"Output" 4841 - (fun _typ actors rec_id -> { actors; rec_id }) 4842 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedUsers#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedUsers#output") 4843 - |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 4844 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 4968 + (fun _typ feeds -> { feeds }) 4969 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedFeedsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedFeedsSkeleton#output") 4970 + |> Jsont.Object.mem "feeds" (Jsont.list Jsont.string) ~enc:(fun r -> r.feeds) 4845 4971 |> Jsont.Object.finish 4846 4972 4847 4973 end 4848 - module GetSuggestedUsersSkeleton = struct 4849 - type params = { 4850 - category : string option; 4851 - limit : int option; 4852 - viewer : string option; 4974 + module GetConfig = struct 4975 + type live_now_config = { 4976 + did : string; 4977 + domains : string list; 4853 4978 } 4854 4979 4855 - let params_jsont = 4856 - Jsont.Object.map ~kind:"Params" 4857 - (fun category limit viewer -> { 4858 - category; 4859 - limit; 4860 - viewer; 4861 - }) 4862 - |> Jsont.Object.opt_mem "category" Jsont.string 4863 - ~enc:(fun r -> r.category) 4864 - |> Jsont.Object.opt_mem "limit" Jsont.int 4865 - ~enc:(fun r -> r.limit) 4866 - |> Jsont.Object.opt_mem "viewer" Jsont.string 4867 - ~enc:(fun r -> r.viewer) 4980 + let live_now_config_jsont = 4981 + Jsont.Object.map ~kind:"Live_now_config" 4982 + (fun _typ did domains -> { did; domains }) 4983 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#liveNowConfig" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#liveNowConfig") 4984 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 4985 + |> Jsont.Object.mem "domains" (Jsont.list Jsont.string) ~enc:(fun r -> r.domains) 4868 4986 |> Jsont.Object.finish 4869 4987 4870 4988 type output = { 4871 - dids : string list; 4872 - rec_id : int option; 4989 + check_email_confirmed : bool option; 4990 + live_now : live_now_config list option; 4873 4991 } 4874 4992 4875 4993 let output_jsont = 4876 4994 Jsont.Object.map ~kind:"Output" 4877 - (fun _typ dids rec_id -> { dids; rec_id }) 4878 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedUsersSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedUsersSkeleton#output") 4879 - |> Jsont.Object.mem "dids" (Jsont.list Jsont.string) ~enc:(fun r -> r.dids) 4880 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 4995 + (fun _typ check_email_confirmed live_now -> { check_email_confirmed; live_now }) 4996 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#output" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#output") 4997 + |> Jsont.Object.opt_mem "checkEmailConfirmed" Jsont.bool ~enc:(fun r -> r.check_email_confirmed) 4998 + |> Jsont.Object.opt_mem "liveNow" (Jsont.list live_now_config_jsont) ~enc:(fun r -> r.live_now) 4881 4999 |> Jsont.Object.finish 4882 5000 4883 5001 end ··· 4907 5025 |> Jsont.Object.finish 4908 5026 4909 5027 end 4910 - module GetOnboardingSuggestedStarterPacksSkeleton = struct 5028 + module GetSuggestedUsers = struct 4911 5029 type params = { 5030 + category : string option; 4912 5031 limit : int option; 4913 - viewer : string option; 4914 5032 } 4915 5033 4916 5034 let params_jsont = 4917 5035 Jsont.Object.map ~kind:"Params" 4918 - (fun limit viewer -> { 5036 + (fun category limit -> { 5037 + category; 4919 5038 limit; 4920 - viewer; 4921 5039 }) 5040 + |> Jsont.Object.opt_mem "category" Jsont.string 5041 + ~enc:(fun r -> r.category) 4922 5042 |> Jsont.Object.opt_mem "limit" Jsont.int 4923 5043 ~enc:(fun r -> r.limit) 4924 - |> Jsont.Object.opt_mem "viewer" Jsont.string 4925 - ~enc:(fun r -> r.viewer) 4926 5044 |> Jsont.Object.finish 4927 5045 4928 5046 type output = { 4929 - starter_packs : string list; 5047 + actors : Jsont.json list; 5048 + rec_id : int option; 4930 5049 } 4931 5050 4932 5051 let output_jsont = 4933 5052 Jsont.Object.map ~kind:"Output" 4934 - (fun _typ starter_packs -> { starter_packs }) 4935 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton#output") 4936 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.string) ~enc:(fun r -> r.starter_packs) 5053 + (fun _typ actors rec_id -> { actors; rec_id }) 5054 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedUsers#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedUsers#output") 5055 + |> Jsont.Object.mem "actors" (Jsont.list Jsont.json) ~enc:(fun r -> r.actors) 5056 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 4937 5057 |> Jsont.Object.finish 4938 5058 4939 5059 end 4940 - module GetSuggestedFeedsSkeleton = struct 5060 + module GetOnboardingSuggestedStarterPacksSkeleton = struct 4941 5061 type params = { 4942 5062 limit : int option; 4943 5063 viewer : string option; ··· 4956 5076 |> Jsont.Object.finish 4957 5077 4958 5078 type output = { 4959 - feeds : string list; 4960 - } 4961 - 4962 - let output_jsont = 4963 - Jsont.Object.map ~kind:"Output" 4964 - (fun _typ feeds -> { feeds }) 4965 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedFeedsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedFeedsSkeleton#output") 4966 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.string) ~enc:(fun r -> r.feeds) 4967 - |> Jsont.Object.finish 4968 - 4969 - end 4970 - module GetOnboardingSuggestedStarterPacks = struct 4971 - type params = { 4972 - limit : int option; 4973 - } 4974 - 4975 - let params_jsont = 4976 - Jsont.Object.map ~kind:"Params" 4977 - (fun limit -> { 4978 - limit; 4979 - }) 4980 - |> Jsont.Object.opt_mem "limit" Jsont.int 4981 - ~enc:(fun r -> r.limit) 4982 - |> Jsont.Object.finish 4983 - 4984 - type output = { 4985 - starter_packs : Jsont.json list; 5079 + starter_packs : string list; 4986 5080 } 4987 5081 4988 5082 let output_jsont = 4989 5083 Jsont.Object.map ~kind:"Output" 4990 5084 (fun _typ starter_packs -> { starter_packs }) 4991 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output" ~enc:(fun _ -> "app.bsky.unspecced.getOnboardingSuggestedStarterPacks#output") 4992 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.json) ~enc:(fun r -> r.starter_packs) 5085 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton#output") 5086 + |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.string) ~enc:(fun r -> r.starter_packs) 4993 5087 |> Jsont.Object.finish 4994 5088 4995 5089 end ··· 5173 5267 |> Jsont.Object.finish 5174 5268 5175 5269 end 5176 - module GetConfig = struct 5177 - type live_now_config = { 5178 - did : string; 5179 - domains : string list; 5270 + module GetTaggedSuggestions = struct 5271 + type suggestion = { 5272 + subject : string; 5273 + subject_type : string; 5274 + tag : string; 5180 5275 } 5181 5276 5182 - let live_now_config_jsont = 5183 - Jsont.Object.map ~kind:"Live_now_config" 5184 - (fun _typ did domains -> { did; domains }) 5185 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#liveNowConfig" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#liveNowConfig") 5186 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 5187 - |> Jsont.Object.mem "domains" (Jsont.list Jsont.string) ~enc:(fun r -> r.domains) 5277 + let suggestion_jsont = 5278 + Jsont.Object.map ~kind:"Suggestion" 5279 + (fun _typ subject subject_type tag -> { subject; subject_type; tag }) 5280 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#suggestion" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#suggestion") 5281 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 5282 + |> Jsont.Object.mem "subjectType" Jsont.string ~enc:(fun r -> r.subject_type) 5283 + |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 5188 5284 |> Jsont.Object.finish 5189 5285 5286 + type params = unit 5287 + 5288 + let params_jsont = Jsont.ignore 5289 + 5190 5290 type output = { 5191 - check_email_confirmed : bool option; 5192 - live_now : live_now_config list option; 5291 + suggestions : suggestion list; 5193 5292 } 5194 5293 5195 5294 let output_jsont = 5196 5295 Jsont.Object.map ~kind:"Output" 5197 - (fun _typ check_email_confirmed live_now -> { check_email_confirmed; live_now }) 5198 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getConfig#output" ~enc:(fun _ -> "app.bsky.unspecced.getConfig#output") 5199 - |> Jsont.Object.opt_mem "checkEmailConfirmed" Jsont.bool ~enc:(fun r -> r.check_email_confirmed) 5200 - |> Jsont.Object.opt_mem "liveNow" (Jsont.list live_now_config_jsont) ~enc:(fun r -> r.live_now) 5296 + (fun _typ suggestions -> { suggestions }) 5297 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#output" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#output") 5298 + |> Jsont.Object.mem "suggestions" (Jsont.list suggestion_jsont) ~enc:(fun r -> r.suggestions) 5201 5299 |> Jsont.Object.finish 5202 5300 5203 5301 end 5204 - module GetPopularFeedGenerators = struct 5302 + module SearchPostsSkeleton = struct 5205 5303 type params = { 5304 + author : string option; 5206 5305 cursor : string option; 5306 + domain : string option; 5307 + lang : string option; 5207 5308 limit : int option; 5208 - query : string option; 5309 + mentions : string option; 5310 + q : string; 5311 + since : string option; 5312 + sort : string option; 5313 + tag : string list option; 5314 + until : string option; 5315 + url : string option; 5316 + viewer : string option; 5209 5317 } 5210 5318 5211 5319 let params_jsont = 5212 5320 Jsont.Object.map ~kind:"Params" 5213 - (fun cursor limit query -> { 5321 + (fun author cursor domain lang limit mentions q since sort tag until url viewer -> { 5322 + author; 5214 5323 cursor; 5324 + domain; 5325 + lang; 5215 5326 limit; 5216 - query; 5327 + mentions; 5328 + q; 5329 + since; 5330 + sort; 5331 + tag; 5332 + until; 5333 + url; 5334 + viewer; 5217 5335 }) 5336 + |> Jsont.Object.opt_mem "author" Jsont.string 5337 + ~enc:(fun r -> r.author) 5218 5338 |> Jsont.Object.opt_mem "cursor" Jsont.string 5219 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) 5220 5344 |> Jsont.Object.opt_mem "limit" Jsont.int 5221 5345 ~enc:(fun r -> r.limit) 5222 - |> Jsont.Object.opt_mem "query" Jsont.string 5223 - ~enc:(fun r -> r.query) 5346 + |> Jsont.Object.opt_mem "mentions" Jsont.string 5347 + ~enc:(fun r -> r.mentions) 5348 + |> Jsont.Object.mem "q" Jsont.string 5349 + ~enc:(fun r -> r.q) 5350 + |> Jsont.Object.opt_mem "since" Jsont.string 5351 + ~enc:(fun r -> r.since) 5352 + |> Jsont.Object.opt_mem "sort" Jsont.string 5353 + ~enc:(fun r -> r.sort) 5354 + |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 5355 + ~enc:(fun r -> r.tag) 5356 + |> Jsont.Object.opt_mem "until" Jsont.string 5357 + ~enc:(fun r -> r.until) 5358 + |> Jsont.Object.opt_mem "url" Jsont.string 5359 + ~enc:(fun r -> r.url) 5360 + |> Jsont.Object.opt_mem "viewer" Jsont.string 5361 + ~enc:(fun r -> r.viewer) 5224 5362 |> Jsont.Object.finish 5225 5363 5226 5364 type output = { 5227 5365 cursor : string option; 5228 - feeds : Jsont.json list; 5366 + hits_total : int option; 5367 + posts : Defs.skeleton_search_post list; 5229 5368 } 5230 5369 5231 5370 let output_jsont = 5232 5371 Jsont.Object.map ~kind:"Output" 5233 - (fun _typ cursor feeds -> { cursor; feeds }) 5234 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPopularFeedGenerators#output" ~enc:(fun _ -> "app.bsky.unspecced.getPopularFeedGenerators#output") 5372 + (fun _typ cursor hits_total posts -> { cursor; hits_total; posts }) 5373 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchPostsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchPostsSkeleton#output") 5235 5374 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5236 - |> Jsont.Object.mem "feeds" (Jsont.list Jsont.json) ~enc:(fun r -> r.feeds) 5375 + |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5376 + |> Jsont.Object.mem "posts" (Jsont.list Defs.skeleton_search_post_jsont) ~enc:(fun r -> r.posts) 5237 5377 |> Jsont.Object.finish 5238 5378 5239 5379 end 5240 - module GetTaggedSuggestions = struct 5241 - type suggestion = { 5242 - subject : string; 5243 - subject_type : string; 5244 - tag : string; 5380 + module GetPostThreadV2 = struct 5381 + type thread_item = { 5382 + depth : int; 5383 + uri : string; 5384 + value : Jsont.json; 5245 5385 } 5246 5386 5247 - let suggestion_jsont = 5248 - Jsont.Object.map ~kind:"Suggestion" 5249 - (fun _typ subject subject_type tag -> { subject; subject_type; tag }) 5250 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#suggestion" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#suggestion") 5251 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 5252 - |> Jsont.Object.mem "subjectType" Jsont.string ~enc:(fun r -> r.subject_type) 5253 - |> Jsont.Object.mem "tag" Jsont.string ~enc:(fun r -> r.tag) 5387 + let thread_item_jsont = 5388 + Jsont.Object.map ~kind:"Thread_item" 5389 + (fun _typ depth uri value -> { depth; uri; value }) 5390 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#threadItem") 5391 + |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5392 + |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5393 + |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 5254 5394 |> Jsont.Object.finish 5255 5395 5256 - type params = unit 5396 + type params = { 5397 + above : bool option; 5398 + anchor : string; 5399 + below : int option; 5400 + branching_factor : int option; 5401 + sort : string option; 5402 + } 5257 5403 5258 - let params_jsont = Jsont.ignore 5404 + let params_jsont = 5405 + Jsont.Object.map ~kind:"Params" 5406 + (fun above anchor below branching_factor sort -> { 5407 + above; 5408 + anchor; 5409 + below; 5410 + branching_factor; 5411 + sort; 5412 + }) 5413 + |> Jsont.Object.opt_mem "above" Jsont.bool 5414 + ~enc:(fun r -> r.above) 5415 + |> Jsont.Object.mem "anchor" Jsont.string 5416 + ~enc:(fun r -> r.anchor) 5417 + |> Jsont.Object.opt_mem "below" Jsont.int 5418 + ~enc:(fun r -> r.below) 5419 + |> Jsont.Object.opt_mem "branchingFactor" Jsont.int 5420 + ~enc:(fun r -> r.branching_factor) 5421 + |> Jsont.Object.opt_mem "sort" Jsont.string 5422 + ~enc:(fun r -> r.sort) 5423 + |> Jsont.Object.finish 5259 5424 5260 5425 type output = { 5261 - suggestions : suggestion list; 5426 + has_other_replies : bool; 5427 + thread : thread_item list; 5428 + threadgate : Jsont.json option; 5262 5429 } 5263 5430 5264 5431 let output_jsont = 5265 5432 Jsont.Object.map ~kind:"Output" 5266 - (fun _typ suggestions -> { suggestions }) 5267 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTaggedSuggestions#output" ~enc:(fun _ -> "app.bsky.unspecced.getTaggedSuggestions#output") 5268 - |> Jsont.Object.mem "suggestions" (Jsont.list suggestion_jsont) ~enc:(fun r -> r.suggestions) 5433 + (fun _typ has_other_replies thread threadgate -> { has_other_replies; thread; threadgate }) 5434 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#output" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#output") 5435 + |> Jsont.Object.mem "hasOtherReplies" Jsont.bool ~enc:(fun r -> r.has_other_replies) 5436 + |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5437 + |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 5269 5438 |> Jsont.Object.finish 5270 5439 5271 5440 end 5272 - module GetSuggestedStarterPacksSkeleton = struct 5441 + module GetTrendingTopics = struct 5273 5442 type params = { 5274 5443 limit : int option; 5275 5444 viewer : string option; ··· 5288 5457 |> Jsont.Object.finish 5289 5458 5290 5459 type output = { 5291 - starter_packs : string list; 5460 + suggested : Defs.trending_topic list; 5461 + topics : Defs.trending_topic list; 5292 5462 } 5293 5463 5294 5464 let output_jsont = 5295 5465 Jsont.Object.map ~kind:"Output" 5296 - (fun _typ starter_packs -> { starter_packs }) 5297 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestedStarterPacksSkeleton#output") 5298 - |> Jsont.Object.mem "starterPacks" (Jsont.list Jsont.string) ~enc:(fun r -> r.starter_packs) 5466 + (fun _typ suggested topics -> { suggested; topics }) 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) 5469 + |> Jsont.Object.mem "topics" (Jsont.list Defs.trending_topic_jsont) ~enc:(fun r -> r.topics) 5299 5470 |> Jsont.Object.finish 5300 5471 5301 5472 end 5302 - module InitAgeAssurance = struct 5303 - type input = { 5304 - country_code : string; 5305 - email : string; 5306 - language : string; 5307 - } 5308 - 5309 - let input_jsont = 5310 - Jsont.Object.map ~kind:"Input" 5311 - (fun _typ country_code email language -> { country_code; email; language }) 5312 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.initAgeAssurance#input" ~enc:(fun _ -> "app.bsky.unspecced.initAgeAssurance#input") 5313 - |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 5314 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 5315 - |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 5316 - |> Jsont.Object.finish 5317 - 5318 - type output = Defs.age_assurance_state 5319 - 5320 - let output_jsont = Defs.age_assurance_state_jsont 5321 - 5322 - end 5323 - module GetTrendingTopics = struct 5473 + module GetTrendsSkeleton = struct 5324 5474 type params = { 5325 5475 limit : int option; 5326 5476 viewer : string option; ··· 5339 5489 |> Jsont.Object.finish 5340 5490 5341 5491 type output = { 5342 - suggested : Defs.trending_topic list; 5343 - topics : Defs.trending_topic list; 5492 + trends : Defs.skeleton_trend list; 5344 5493 } 5345 5494 5346 5495 let output_jsont = 5347 5496 Jsont.Object.map ~kind:"Output" 5348 - (fun _typ suggested topics -> { suggested; topics }) 5349 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrendingTopics#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrendingTopics#output") 5350 - |> Jsont.Object.mem "suggested" (Jsont.list Defs.trending_topic_jsont) ~enc:(fun r -> r.suggested) 5351 - |> Jsont.Object.mem "topics" (Jsont.list Defs.trending_topic_jsont) ~enc:(fun r -> r.topics) 5497 + (fun _typ trends -> { trends }) 5498 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrendsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrendsSkeleton#output") 5499 + |> Jsont.Object.mem "trends" (Jsont.list Defs.skeleton_trend_jsont) ~enc:(fun r -> r.trends) 5352 5500 |> Jsont.Object.finish 5353 5501 5354 5502 end ··· 5393 5541 |> Jsont.Object.finish 5394 5542 5395 5543 end 5396 - module GetSuggestionsSkeleton = struct 5397 - type params = { 5398 - cursor : string option; 5399 - limit : int option; 5400 - relative_to_did : string option; 5401 - viewer : string option; 5402 - } 5403 - 5404 - let params_jsont = 5405 - Jsont.Object.map ~kind:"Params" 5406 - (fun cursor limit relative_to_did viewer -> { 5407 - cursor; 5408 - limit; 5409 - relative_to_did; 5410 - viewer; 5411 - }) 5412 - |> Jsont.Object.opt_mem "cursor" Jsont.string 5413 - ~enc:(fun r -> r.cursor) 5414 - |> Jsont.Object.opt_mem "limit" Jsont.int 5415 - ~enc:(fun r -> r.limit) 5416 - |> Jsont.Object.opt_mem "relativeToDid" Jsont.string 5417 - ~enc:(fun r -> r.relative_to_did) 5418 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5419 - ~enc:(fun r -> r.viewer) 5420 - |> Jsont.Object.finish 5421 - 5422 - type output = { 5423 - actors : Defs.skeleton_search_actor list; 5424 - cursor : string option; 5425 - rec_id : int option; 5426 - relative_to_did : string option; 5544 + module InitAgeAssurance = struct 5545 + type input = { 5546 + country_code : string; 5547 + email : string; 5548 + language : string; 5427 5549 } 5428 5550 5429 - let output_jsont = 5430 - Jsont.Object.map ~kind:"Output" 5431 - (fun _typ actors cursor rec_id relative_to_did -> { actors; cursor; rec_id; relative_to_did }) 5432 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestionsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestionsSkeleton#output") 5433 - |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5434 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5435 - |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5436 - |> Jsont.Object.opt_mem "relativeToDid" Jsont.string ~enc:(fun r -> r.relative_to_did) 5551 + let input_jsont = 5552 + Jsont.Object.map ~kind:"Input" 5553 + (fun _typ country_code email language -> { country_code; email; language }) 5554 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.initAgeAssurance#input" ~enc:(fun _ -> "app.bsky.unspecced.initAgeAssurance#input") 5555 + |> Jsont.Object.mem "countryCode" Jsont.string ~enc:(fun r -> r.country_code) 5556 + |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 5557 + |> Jsont.Object.mem "language" Jsont.string ~enc:(fun r -> r.language) 5437 5558 |> Jsont.Object.finish 5438 5559 5439 - end 5440 - module GetAgeAssuranceState = struct 5441 5560 type output = Defs.age_assurance_state 5442 5561 5443 5562 let output_jsont = Defs.age_assurance_state_jsont ··· 5485 5604 |> Jsont.Object.finish 5486 5605 5487 5606 end 5488 - module SearchPostsSkeleton = struct 5607 + module SearchActorsSkeleton = struct 5489 5608 type params = { 5490 - author : string option; 5491 5609 cursor : string option; 5492 - domain : string option; 5493 - lang : string option; 5494 5610 limit : int option; 5495 - mentions : string option; 5496 5611 q : string; 5497 - since : string option; 5498 - sort : string option; 5499 - tag : string list option; 5500 - until : string option; 5501 - url : string option; 5612 + typeahead : bool option; 5502 5613 viewer : string option; 5503 5614 } 5504 5615 5505 5616 let params_jsont = 5506 5617 Jsont.Object.map ~kind:"Params" 5507 - (fun author cursor domain lang limit mentions q since sort tag until url viewer -> { 5508 - author; 5618 + (fun cursor limit q typeahead viewer -> { 5509 5619 cursor; 5510 - domain; 5511 - lang; 5512 5620 limit; 5513 - mentions; 5514 5621 q; 5515 - since; 5516 - sort; 5517 - tag; 5518 - until; 5519 - url; 5622 + typeahead; 5520 5623 viewer; 5521 5624 }) 5522 - |> Jsont.Object.opt_mem "author" Jsont.string 5523 - ~enc:(fun r -> r.author) 5524 5625 |> Jsont.Object.opt_mem "cursor" Jsont.string 5525 5626 ~enc:(fun r -> r.cursor) 5526 - |> Jsont.Object.opt_mem "domain" Jsont.string 5527 - ~enc:(fun r -> r.domain) 5528 - |> Jsont.Object.opt_mem "lang" Jsont.string 5529 - ~enc:(fun r -> r.lang) 5530 5627 |> Jsont.Object.opt_mem "limit" Jsont.int 5531 5628 ~enc:(fun r -> r.limit) 5532 - |> Jsont.Object.opt_mem "mentions" Jsont.string 5533 - ~enc:(fun r -> r.mentions) 5534 5629 |> Jsont.Object.mem "q" Jsont.string 5535 5630 ~enc:(fun r -> r.q) 5536 - |> Jsont.Object.opt_mem "since" Jsont.string 5537 - ~enc:(fun r -> r.since) 5538 - |> Jsont.Object.opt_mem "sort" Jsont.string 5539 - ~enc:(fun r -> r.sort) 5540 - |> Jsont.Object.opt_mem "tag" (Jsont.list Jsont.string) 5541 - ~enc:(fun r -> r.tag) 5542 - |> Jsont.Object.opt_mem "until" Jsont.string 5543 - ~enc:(fun r -> r.until) 5544 - |> Jsont.Object.opt_mem "url" Jsont.string 5545 - ~enc:(fun r -> r.url) 5631 + |> Jsont.Object.opt_mem "typeahead" Jsont.bool 5632 + ~enc:(fun r -> r.typeahead) 5546 5633 |> Jsont.Object.opt_mem "viewer" Jsont.string 5547 5634 ~enc:(fun r -> r.viewer) 5548 5635 |> Jsont.Object.finish 5549 5636 5550 5637 type output = { 5638 + actors : Defs.skeleton_search_actor list; 5551 5639 cursor : string option; 5552 5640 hits_total : int option; 5553 - posts : Defs.skeleton_search_post list; 5554 5641 } 5555 5642 5556 5643 let output_jsont = 5557 5644 Jsont.Object.map ~kind:"Output" 5558 - (fun _typ cursor hits_total posts -> { cursor; hits_total; posts }) 5559 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchPostsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchPostsSkeleton#output") 5645 + (fun _typ actors cursor hits_total -> { actors; cursor; hits_total }) 5646 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchActorsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchActorsSkeleton#output") 5647 + |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5560 5648 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5561 5649 |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5562 - |> Jsont.Object.mem "posts" (Jsont.list Defs.skeleton_search_post_jsont) ~enc:(fun r -> r.posts) 5563 5650 |> Jsont.Object.finish 5564 5651 5565 5652 end 5566 - module SearchActorsSkeleton = struct 5653 + module GetAgeAssuranceState = struct 5654 + type output = Defs.age_assurance_state 5655 + 5656 + let output_jsont = Defs.age_assurance_state_jsont 5657 + 5658 + end 5659 + module GetSuggestionsSkeleton = struct 5567 5660 type params = { 5568 5661 cursor : string option; 5569 5662 limit : int option; 5570 - q : string; 5571 - typeahead : bool option; 5663 + relative_to_did : string option; 5572 5664 viewer : string option; 5573 5665 } 5574 5666 5575 5667 let params_jsont = 5576 5668 Jsont.Object.map ~kind:"Params" 5577 - (fun cursor limit q typeahead viewer -> { 5669 + (fun cursor limit relative_to_did viewer -> { 5578 5670 cursor; 5579 5671 limit; 5580 - q; 5581 - typeahead; 5672 + relative_to_did; 5582 5673 viewer; 5583 5674 }) 5584 5675 |> Jsont.Object.opt_mem "cursor" Jsont.string 5585 5676 ~enc:(fun r -> r.cursor) 5586 5677 |> Jsont.Object.opt_mem "limit" Jsont.int 5587 5678 ~enc:(fun r -> r.limit) 5588 - |> Jsont.Object.mem "q" Jsont.string 5589 - ~enc:(fun r -> r.q) 5590 - |> Jsont.Object.opt_mem "typeahead" Jsont.bool 5591 - ~enc:(fun r -> r.typeahead) 5679 + |> Jsont.Object.opt_mem "relativeToDid" Jsont.string 5680 + ~enc:(fun r -> r.relative_to_did) 5592 5681 |> Jsont.Object.opt_mem "viewer" Jsont.string 5593 5682 ~enc:(fun r -> r.viewer) 5594 5683 |> Jsont.Object.finish ··· 5596 5685 type output = { 5597 5686 actors : Defs.skeleton_search_actor list; 5598 5687 cursor : string option; 5599 - hits_total : int option; 5688 + rec_id : int option; 5689 + relative_to_did : string option; 5600 5690 } 5601 5691 5602 5692 let output_jsont = 5603 5693 Jsont.Object.map ~kind:"Output" 5604 - (fun _typ actors cursor hits_total -> { actors; cursor; hits_total }) 5605 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.searchActorsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.searchActorsSkeleton#output") 5694 + (fun _typ actors cursor rec_id relative_to_did -> { actors; cursor; rec_id; relative_to_did }) 5695 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getSuggestionsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getSuggestionsSkeleton#output") 5606 5696 |> Jsont.Object.mem "actors" (Jsont.list Defs.skeleton_search_actor_jsont) ~enc:(fun r -> r.actors) 5607 5697 |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 5608 - |> Jsont.Object.opt_mem "hitsTotal" Jsont.int ~enc:(fun r -> r.hits_total) 5698 + |> Jsont.Object.opt_mem "recId" Jsont.int ~enc:(fun r -> r.rec_id) 5699 + |> Jsont.Object.opt_mem "relativeToDid" Jsont.string ~enc:(fun r -> r.relative_to_did) 5609 5700 |> Jsont.Object.finish 5610 5701 5611 5702 end ··· 5632 5723 (fun _typ trends -> { trends }) 5633 5724 |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrends#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrends#output") 5634 5725 |> Jsont.Object.mem "trends" (Jsont.list Defs.trend_view_jsont) ~enc:(fun r -> r.trends) 5635 - |> Jsont.Object.finish 5636 - 5637 - end 5638 - module GetPostThreadV2 = struct 5639 - type thread_item = { 5640 - depth : int; 5641 - uri : string; 5642 - value : Jsont.json; 5643 - } 5644 - 5645 - let thread_item_jsont = 5646 - Jsont.Object.map ~kind:"Thread_item" 5647 - (fun _typ depth uri value -> { depth; uri; value }) 5648 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#threadItem" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#threadItem") 5649 - |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 5650 - |> Jsont.Object.mem "uri" Jsont.string ~enc:(fun r -> r.uri) 5651 - |> Jsont.Object.mem "value" Jsont.json ~enc:(fun r -> r.value) 5652 - |> Jsont.Object.finish 5653 - 5654 - type params = { 5655 - above : bool option; 5656 - anchor : string; 5657 - below : int option; 5658 - branching_factor : int option; 5659 - sort : string option; 5660 - } 5661 - 5662 - let params_jsont = 5663 - Jsont.Object.map ~kind:"Params" 5664 - (fun above anchor below branching_factor sort -> { 5665 - above; 5666 - anchor; 5667 - below; 5668 - branching_factor; 5669 - sort; 5670 - }) 5671 - |> Jsont.Object.opt_mem "above" Jsont.bool 5672 - ~enc:(fun r -> r.above) 5673 - |> Jsont.Object.mem "anchor" Jsont.string 5674 - ~enc:(fun r -> r.anchor) 5675 - |> Jsont.Object.opt_mem "below" Jsont.int 5676 - ~enc:(fun r -> r.below) 5677 - |> Jsont.Object.opt_mem "branchingFactor" Jsont.int 5678 - ~enc:(fun r -> r.branching_factor) 5679 - |> Jsont.Object.opt_mem "sort" Jsont.string 5680 - ~enc:(fun r -> r.sort) 5681 - |> Jsont.Object.finish 5682 - 5683 - type output = { 5684 - has_other_replies : bool; 5685 - thread : thread_item list; 5686 - threadgate : Jsont.json option; 5687 - } 5688 - 5689 - let output_jsont = 5690 - Jsont.Object.map ~kind:"Output" 5691 - (fun _typ has_other_replies thread threadgate -> { has_other_replies; thread; threadgate }) 5692 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getPostThreadV2#output" ~enc:(fun _ -> "app.bsky.unspecced.getPostThreadV2#output") 5693 - |> Jsont.Object.mem "hasOtherReplies" Jsont.bool ~enc:(fun r -> r.has_other_replies) 5694 - |> Jsont.Object.mem "thread" (Jsont.list thread_item_jsont) ~enc:(fun r -> r.thread) 5695 - |> Jsont.Object.opt_mem "threadgate" Jsont.json ~enc:(fun r -> r.threadgate) 5696 - |> Jsont.Object.finish 5697 - 5698 - end 5699 - module GetTrendsSkeleton = struct 5700 - type params = { 5701 - limit : int option; 5702 - viewer : string option; 5703 - } 5704 - 5705 - let params_jsont = 5706 - Jsont.Object.map ~kind:"Params" 5707 - (fun limit viewer -> { 5708 - limit; 5709 - viewer; 5710 - }) 5711 - |> Jsont.Object.opt_mem "limit" Jsont.int 5712 - ~enc:(fun r -> r.limit) 5713 - |> Jsont.Object.opt_mem "viewer" Jsont.string 5714 - ~enc:(fun r -> r.viewer) 5715 - |> Jsont.Object.finish 5716 - 5717 - type output = { 5718 - trends : Defs.skeleton_trend list; 5719 - } 5720 - 5721 - let output_jsont = 5722 - Jsont.Object.map ~kind:"Output" 5723 - (fun _typ trends -> { trends }) 5724 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"app.bsky.unspecced.getTrendsSkeleton#output" ~enc:(fun _ -> "app.bsky.unspecced.getTrendsSkeleton#output") 5725 - |> Jsont.Object.mem "trends" (Jsont.list Defs.skeleton_trend_jsont) ~enc:(fun r -> r.trends) 5726 5726 |> Jsont.Object.finish 5727 5727 5728 5728 end
+1641 -1641
lexicons/bsky/atp_lexicon_bsky.mli
··· 12 12 13 13 module Com : sig 14 14 module Atproto : sig 15 - module Moderation : sig 16 - module Defs : sig 17 - (** Tag describing a type of subject that might be reported. *) 18 - 19 - type subject_type = string 20 - val subject_type_jsont : subject_type Jsont.t 21 - 22 - (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 23 - 24 - type reason_violation = string 25 - val reason_violation_jsont : reason_violation Jsont.t 26 - 27 - 28 - type reason_type = string 29 - val reason_type_jsont : reason_type Jsont.t 30 - 31 - (** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. *) 32 - 33 - type reason_spam = string 34 - val reason_spam_jsont : reason_spam Jsont.t 35 - 36 - (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 37 - 38 - type reason_sexual = string 39 - val reason_sexual_jsont : reason_sexual Jsont.t 40 - 41 - (** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. *) 42 - 43 - type reason_rude = string 44 - val reason_rude_jsont : reason_rude Jsont.t 45 - 46 - (** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. *) 47 - 48 - type reason_other = string 49 - val reason_other_jsont : reason_other Jsont.t 50 - 51 - (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 52 - 53 - type reason_misleading = string 54 - val reason_misleading_jsont : reason_misleading Jsont.t 55 - 56 - (** Appeal a previously taken moderation action *) 57 - 58 - type reason_appeal = string 59 - val reason_appeal_jsont : reason_appeal Jsont.t 60 - 61 - end 62 - end 63 15 module Label : sig 64 16 module Defs : sig 65 17 (** Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel. *) ··· 141 93 142 94 end 143 95 end 96 + module Moderation : sig 97 + module Defs : sig 98 + (** Tag describing a type of subject that might be reported. *) 99 + 100 + type subject_type = string 101 + val subject_type_jsont : subject_type Jsont.t 102 + 103 + (** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. *) 104 + 105 + type reason_violation = string 106 + val reason_violation_jsont : reason_violation Jsont.t 107 + 108 + 109 + type reason_type = string 110 + val reason_type_jsont : reason_type Jsont.t 111 + 112 + (** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. *) 113 + 114 + type reason_spam = string 115 + val reason_spam_jsont : reason_spam Jsont.t 116 + 117 + (** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. *) 118 + 119 + type reason_sexual = string 120 + val reason_sexual_jsont : reason_sexual Jsont.t 121 + 122 + (** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. *) 123 + 124 + type reason_rude = string 125 + val reason_rude_jsont : reason_rude Jsont.t 126 + 127 + (** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. *) 128 + 129 + type reason_other = string 130 + val reason_other_jsont : reason_other Jsont.t 131 + 132 + (** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. *) 133 + 134 + type reason_misleading = string 135 + val reason_misleading_jsont : reason_misleading Jsont.t 136 + 137 + (** Appeal a previously taken moderation action *) 138 + 139 + type reason_appeal = string 140 + val reason_appeal_jsont : reason_appeal Jsont.t 141 + 142 + end 143 + end 144 144 end 145 145 end 146 146 module App : sig 147 147 module Bsky : sig 148 - module AuthFullApp : sig 148 + module AuthManageLabelerService : sig 149 149 150 150 type main = unit 151 151 val main_jsont : main Jsont.t ··· 157 157 val main_jsont : main Jsont.t 158 158 159 159 end 160 + module AuthManageModeration : sig 161 + 162 + type main = unit 163 + val main_jsont : main Jsont.t 164 + 165 + end 166 + module Richtext : sig 167 + module Facet : sig 168 + (** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). *) 169 + 170 + type tag = { 171 + tag : string; 172 + } 173 + 174 + (** Jsont codec for {!type:tag}. *) 175 + val tag_jsont : tag Jsont.t 176 + 177 + (** Facet feature for mention of another account. The text is usually a handle, including a '\@' prefix, but the facet reference is a DID. *) 178 + 179 + type mention = { 180 + did : string; 181 + } 182 + 183 + (** Jsont codec for {!type:mention}. *) 184 + val mention_jsont : mention Jsont.t 185 + 186 + (** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. *) 187 + 188 + type link = { 189 + uri : string; 190 + } 191 + 192 + (** Jsont codec for {!type:link}. *) 193 + val link_jsont : link Jsont.t 194 + 195 + (** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. *) 196 + 197 + type byte_slice = { 198 + byte_end : int; 199 + byte_start : int; 200 + } 201 + 202 + (** Jsont codec for {!type:byte_slice}. *) 203 + val byte_slice_jsont : byte_slice Jsont.t 204 + 205 + (** Annotation of a sub-string within rich text. *) 206 + 207 + type main = { 208 + features : Jsont.json list; 209 + index : byte_slice; 210 + } 211 + 212 + (** Jsont codec for {!type:main}. *) 213 + val main_jsont : main Jsont.t 214 + 215 + end 216 + end 160 217 module AuthManageFeedDeclarations : sig 161 218 162 219 type main = unit 163 220 val main_jsont : main Jsont.t 164 221 165 222 end 166 - module AuthManageNotifications : sig 223 + module AuthFullApp : sig 167 224 168 225 type main = unit 169 226 val main_jsont : main Jsont.t 170 227 171 228 end 172 - module AuthManageModeration : sig 229 + module AuthManageNotifications : sig 173 230 174 231 type main = unit 175 232 val main_jsont : main Jsont.t ··· 181 238 val main_jsont : main Jsont.t 182 239 183 240 end 184 - module AuthManageLabelerService : sig 241 + module Ageassurance : sig 242 + module Defs : sig 243 + (** The status of the Age Assurance process. *) 244 + 245 + type status = string 246 + val status_jsont : status Jsont.t 247 + 248 + (** Additional metadata needed to compute Age Assurance state client-side. *) 249 + 250 + type state_metadata = { 251 + account_created_at : string option; (** The account creation timestamp. *) 252 + } 253 + 254 + (** Jsont codec for {!type:state_metadata}. *) 255 + val state_metadata_jsont : state_metadata Jsont.t 256 + 257 + (** Object used to store Age Assurance data in stash. *) 258 + 259 + type event = { 260 + access : string; (** The access level granted based on Age Assurance data we've processed. *) 261 + attempt_id : string; (** The unique identifier for this instance of the Age Assurance flow, in UUID format. *) 262 + complete_ip : string option; (** The IP address used when completing the Age Assurance flow. *) 263 + complete_ua : string option; (** The user agent used when completing the Age Assurance flow. *) 264 + country_code : string; (** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. *) 265 + created_at : string; (** The date and time of this write operation. *) 266 + email : string option; (** The email used for Age Assurance. *) 267 + init_ip : string option; (** The IP address used when initiating the Age Assurance flow. *) 268 + init_ua : string option; (** The user agent used when initiating the Age Assurance flow. *) 269 + region_code : string option; (** The ISO 3166-2 region code provided when beginning the Age Assurance flow. *) 270 + status : string; (** The status of the Age Assurance process. *) 271 + } 272 + 273 + (** Jsont codec for {!type:event}. *) 274 + val event_jsont : event Jsont.t 275 + 276 + (** The Age Assurance configuration for a specific region. *) 277 + 278 + type config_region = { 279 + country_code : string; (** The ISO 3166-1 alpha-2 country code this configuration applies to. *) 280 + min_access_age : int; (** The minimum age (as a whole integer) required to use Bluesky in this region. *) 281 + region_code : string option; (** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. *) 282 + rules : Jsont.json list; (** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. *) 283 + } 284 + 285 + (** Jsont codec for {!type:config_region}. *) 286 + val config_region_jsont : config_region Jsont.t 287 + 288 + (** The access level granted based on Age Assurance data we've processed. *) 289 + 290 + type access = string 291 + val access_jsont : access Jsont.t 292 + 293 + (** The user's computed Age Assurance state. *) 294 + 295 + type state = { 296 + access : access; 297 + last_initiated_at : string option; (** The timestamp when this state was last updated. *) 298 + status : status; 299 + } 300 + 301 + (** Jsont codec for {!type:state}. *) 302 + val state_jsont : state Jsont.t 303 + 304 + (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 305 + 306 + type config_region_rule_if_declared_under_age = { 307 + access : access; 308 + age : int; (** The age threshold as a whole integer. *) 309 + } 310 + 311 + (** Jsont codec for {!type:config_region_rule_if_declared_under_age}. *) 312 + val config_region_rule_if_declared_under_age_jsont : config_region_rule_if_declared_under_age Jsont.t 313 + 314 + (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 315 + 316 + type config_region_rule_if_declared_over_age = { 317 + access : access; 318 + age : int; (** The age threshold as a whole integer. *) 319 + } 320 + 321 + (** Jsont codec for {!type:config_region_rule_if_declared_over_age}. *) 322 + val config_region_rule_if_declared_over_age_jsont : config_region_rule_if_declared_over_age Jsont.t 323 + 324 + (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 325 + 326 + type config_region_rule_if_assured_under_age = { 327 + access : access; 328 + age : int; (** The age threshold as a whole integer. *) 329 + } 330 + 331 + (** Jsont codec for {!type:config_region_rule_if_assured_under_age}. *) 332 + val config_region_rule_if_assured_under_age_jsont : config_region_rule_if_assured_under_age Jsont.t 333 + 334 + (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 335 + 336 + type config_region_rule_if_assured_over_age = { 337 + access : access; 338 + age : int; (** The age threshold as a whole integer. *) 339 + } 340 + 341 + (** Jsont codec for {!type:config_region_rule_if_assured_over_age}. *) 342 + val config_region_rule_if_assured_over_age_jsont : config_region_rule_if_assured_over_age Jsont.t 343 + 344 + (** Age Assurance rule that applies if the account is older than a certain date. *) 345 + 346 + type config_region_rule_if_account_older_than = { 347 + access : access; 348 + date : string; (** The date threshold as a datetime string. *) 349 + } 350 + 351 + (** Jsont codec for {!type:config_region_rule_if_account_older_than}. *) 352 + val config_region_rule_if_account_older_than_jsont : config_region_rule_if_account_older_than Jsont.t 353 + 354 + (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 355 + 356 + type config_region_rule_if_account_newer_than = { 357 + access : access; 358 + date : string; (** The date threshold as a datetime string. *) 359 + } 360 + 361 + (** Jsont codec for {!type:config_region_rule_if_account_newer_than}. *) 362 + val config_region_rule_if_account_newer_than_jsont : config_region_rule_if_account_newer_than Jsont.t 363 + 364 + (** Age Assurance rule that applies by default. *) 365 + 366 + type config_region_rule_default = { 367 + access : access; 368 + } 369 + 370 + (** Jsont codec for {!type:config_region_rule_default}. *) 371 + val config_region_rule_default_jsont : config_region_rule_default Jsont.t 372 + 373 + 374 + type config = { 375 + regions : config_region list; (** The per-region Age Assurance configuration. *) 376 + } 377 + 378 + (** Jsont codec for {!type:config}. *) 379 + val config_jsont : config Jsont.t 380 + 381 + end 382 + module Begin : sig 383 + (** Initiate Age Assurance for an account. *) 384 + 385 + 386 + type input = { 387 + country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 388 + email : string; (** The user's email address to receive Age Assurance instructions. *) 389 + language : string; (** The user's preferred language for communication during the Age Assurance process. *) 390 + region_code : string option; (** An optional ISO 3166-2 code of the user's region or state within the country. *) 391 + } 392 + 393 + (** Jsont codec for {!type:input}. *) 394 + val input_jsont : input Jsont.t 395 + 396 + 397 + type output = Defs.state 398 + 399 + (** Jsont codec for {!type:output}. *) 400 + val output_jsont : output Jsont.t 401 + 402 + end 403 + module GetState : sig 404 + (** Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side. *) 405 + 406 + (** Query/procedure parameters. *) 407 + type params = { 408 + country_code : string; 409 + region_code : string option; 410 + } 411 + 412 + (** Jsont codec for {!type:params}. *) 413 + val params_jsont : params Jsont.t 414 + 415 + 416 + type output = { 417 + metadata : Defs.state_metadata; 418 + state : Defs.state; 419 + } 420 + 421 + (** Jsont codec for {!type:output}. *) 422 + val output_jsont : output Jsont.t 423 + 424 + end 425 + module GetConfig : sig 426 + (** Returns Age Assurance configuration for use on the client. *) 427 + 428 + 429 + type output = Defs.config 430 + 431 + (** Jsont codec for {!type:output}. *) 432 + val output_jsont : output Jsont.t 433 + 434 + end 435 + end 436 + module Labeler : sig 437 + module Defs : sig 438 + 439 + type labeler_viewer_state = { 440 + like : string option; 441 + } 442 + 443 + (** Jsont codec for {!type:labeler_viewer_state}. *) 444 + val labeler_viewer_state_jsont : labeler_viewer_state Jsont.t 445 + 446 + 447 + type labeler_policies = { 448 + label_value_definitions : Com.Atproto.Label.Defs.label_value_definition list option; (** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. *) 449 + label_values : Com.Atproto.Label.Defs.label_value list; (** The label values which this labeler publishes. May include global or custom labels. *) 450 + } 451 + 452 + (** Jsont codec for {!type:labeler_policies}. *) 453 + val labeler_policies_jsont : labeler_policies Jsont.t 454 + 455 + 456 + type labeler_view_detailed = { 457 + cid : string; 458 + creator : Jsont.json; 459 + indexed_at : string; 460 + labels : Com.Atproto.Label.Defs.label list option; 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; 467 + viewer : Jsont.json option; 468 + } 469 + 470 + (** Jsont codec for {!type:labeler_view_detailed}. *) 471 + val labeler_view_detailed_jsont : labeler_view_detailed Jsont.t 472 + 473 + 474 + type labeler_view = { 475 + cid : string; 476 + creator : Jsont.json; 477 + indexed_at : string; 478 + labels : Com.Atproto.Label.Defs.label list option; 479 + like_count : int option; 480 + uri : string; 481 + viewer : Jsont.json option; 482 + } 483 + 484 + (** Jsont codec for {!type:labeler_view}. *) 485 + val labeler_view_jsont : labeler_view Jsont.t 486 + 487 + end 488 + module Service : sig 489 + (** A declaration of the existence of labeler service. *) 490 + 491 + type main = { 492 + created_at : string; 493 + labels : Com.Atproto.Label.Defs.self_labels option; 494 + policies : Jsont.json; 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_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 + } 499 + 500 + (** Jsont codec for {!type:main}. *) 501 + val main_jsont : main Jsont.t 502 + 503 + end 504 + module GetServices : sig 505 + (** Get information about a list of labeler services. *) 506 + 507 + (** Query/procedure parameters. *) 508 + type params = { 509 + detailed : bool option; 510 + dids : string list; 511 + } 512 + 513 + (** Jsont codec for {!type:params}. *) 514 + val params_jsont : params Jsont.t 515 + 516 + 517 + type output = { 518 + views : Jsont.json list; 519 + } 520 + 521 + (** Jsont codec for {!type:output}. *) 522 + val output_jsont : output Jsont.t 523 + 524 + end 525 + end 526 + module AuthCreatePosts : sig 185 527 186 528 type main = unit 187 529 val main_jsont : main Jsont.t 188 530 189 531 end 190 - module Notification : sig 191 - module GetUnreadCount : sig 192 - (** Count the number of unread notifications for the requesting account. Requires auth. *) 532 + module Video : sig 533 + module GetUploadLimits : sig 534 + (** Get video upload limits for the authenticated user. *) 535 + 536 + 537 + type output = { 538 + can_upload : bool; 539 + error : string option; 540 + message : string option; 541 + remaining_daily_bytes : int option; 542 + remaining_daily_videos : int option; 543 + } 544 + 545 + (** Jsont codec for {!type:output}. *) 546 + val output_jsont : output Jsont.t 547 + 548 + end 549 + module Defs : sig 550 + 551 + type job_status = { 552 + blob : Atp.Blob_ref.t option; 553 + did : string; 554 + error : string option; 555 + job_id : string; 556 + message : string option; 557 + progress : int option; (** Progress within the current processing state. *) 558 + state : string; (** The state of the video processing job. All values not listed as a known value indicate that the job is in process. *) 559 + } 560 + 561 + (** Jsont codec for {!type:job_status}. *) 562 + val job_status_jsont : job_status Jsont.t 563 + 564 + end 565 + module UploadVideo : sig 566 + (** Upload a video to be processed then stored on the PDS. *) 567 + 568 + 569 + type input = unit 570 + val input_jsont : input Jsont.t 571 + 572 + 573 + type output = { 574 + job_status : Defs.job_status; 575 + } 576 + 577 + (** Jsont codec for {!type:output}. *) 578 + val output_jsont : output Jsont.t 579 + 580 + end 581 + module GetJobStatus : sig 582 + (** Get status details for a video processing job. *) 193 583 194 584 (** Query/procedure parameters. *) 195 585 type params = { 196 - priority : bool option; 197 - seen_at : string option; 586 + job_id : string; 198 587 } 199 588 200 589 (** Jsont codec for {!type:params}. *) ··· 202 591 203 592 204 593 type output = { 205 - count : int; 594 + job_status : Defs.job_status; 206 595 } 207 596 208 597 (** Jsont codec for {!type:output}. *) 209 598 val output_jsont : output Jsont.t 210 599 211 600 end 601 + end 602 + module Embed : sig 603 + module External : sig 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 + 616 + type external_ = { 617 + description : string; 618 + thumb : Atp.Blob_ref.t option; 619 + title : string; 620 + uri : string; 621 + } 622 + 623 + (** Jsont codec for {!type:external_}. *) 624 + val external__jsont : external_ Jsont.t 625 + 626 + 627 + type view = { 628 + external_ : Jsont.json; 629 + } 630 + 631 + (** Jsont codec for {!type:view}. *) 632 + val view_jsont : view Jsont.t 633 + 634 + (** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). *) 635 + 636 + type main = { 637 + external_ : Jsont.json; 638 + } 639 + 640 + (** Jsont codec for {!type:main}. *) 641 + val main_jsont : main Jsont.t 642 + 643 + end 644 + module Defs : sig 645 + (** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. *) 646 + 647 + type aspect_ratio = { 648 + height : int; 649 + width : int; 650 + } 651 + 652 + (** Jsont codec for {!type:aspect_ratio}. *) 653 + val aspect_ratio_jsont : aspect_ratio Jsont.t 654 + 655 + end 656 + module Images : sig 657 + 658 + type view_image = { 659 + alt : string; (** Alt text description of the image, for accessibility. *) 660 + aspect_ratio : Jsont.json option; 661 + fullsize : string; (** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. *) 662 + thumb : string; (** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. *) 663 + } 664 + 665 + (** Jsont codec for {!type:view_image}. *) 666 + val view_image_jsont : view_image Jsont.t 667 + 668 + 669 + type image = { 670 + alt : string; (** Alt text description of the image, for accessibility. *) 671 + aspect_ratio : Jsont.json option; 672 + image : Atp.Blob_ref.t; 673 + } 674 + 675 + (** Jsont codec for {!type:image}. *) 676 + val image_jsont : image Jsont.t 677 + 678 + 679 + type view = { 680 + images : Jsont.json list; 681 + } 682 + 683 + (** Jsont codec for {!type:view}. *) 684 + val view_jsont : view Jsont.t 685 + 686 + 687 + type main = { 688 + images : Jsont.json list; 689 + } 690 + 691 + (** Jsont codec for {!type:main}. *) 692 + val main_jsont : main Jsont.t 693 + 694 + end 695 + module Video : sig 696 + 697 + type view = { 698 + alt : string option; 699 + aspect_ratio : Jsont.json option; 700 + cid : string; 701 + playlist : string; 702 + thumbnail : string option; 703 + } 704 + 705 + (** Jsont codec for {!type:view}. *) 706 + val view_jsont : view Jsont.t 707 + 708 + 709 + type caption = { 710 + file : Atp.Blob_ref.t; 711 + lang : string; 712 + } 713 + 714 + (** Jsont codec for {!type:caption}. *) 715 + val caption_jsont : caption Jsont.t 716 + 717 + 718 + type main = { 719 + alt : string option; (** Alt text description of the video, for accessibility. *) 720 + aspect_ratio : Jsont.json option; 721 + captions : Jsont.json list option; 722 + video : Atp.Blob_ref.t; (** The mp4 video file. May be up to 100mb, formerly limited to 50mb. *) 723 + } 724 + 725 + (** Jsont codec for {!type:main}. *) 726 + val main_jsont : main Jsont.t 727 + 728 + end 729 + module RecordWithMedia : sig 730 + 731 + type view = { 732 + media : Jsont.json; 733 + record : Jsont.json; 734 + } 735 + 736 + (** Jsont codec for {!type:view}. *) 737 + val view_jsont : view Jsont.t 738 + 739 + 740 + type main = { 741 + media : Jsont.json; 742 + record : Jsont.json; 743 + } 744 + 745 + (** Jsont codec for {!type:main}. *) 746 + val main_jsont : main Jsont.t 747 + 748 + end 749 + module Record : sig 750 + 751 + type view_record = { 752 + author : Jsont.json; 753 + cid : string; 754 + embeds : Jsont.json list option; 755 + indexed_at : string; 756 + labels : Com.Atproto.Label.Defs.label list option; 757 + like_count : int option; 758 + quote_count : int option; 759 + reply_count : int option; 760 + repost_count : int option; 761 + uri : string; 762 + value : Jsont.json; (** The record data itself. *) 763 + } 764 + 765 + (** Jsont codec for {!type:view_record}. *) 766 + val view_record_jsont : view_record Jsont.t 767 + 768 + 769 + type view_not_found = { 770 + not_found : bool; 771 + uri : string; 772 + } 773 + 774 + (** Jsont codec for {!type:view_not_found}. *) 775 + val view_not_found_jsont : view_not_found Jsont.t 776 + 777 + 778 + type view_detached = { 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 + 787 + type view_blocked = { 788 + author : Jsont.json; 789 + blocked : bool; 790 + uri : string; 791 + } 792 + 793 + (** Jsont codec for {!type:view_blocked}. *) 794 + val view_blocked_jsont : view_blocked Jsont.t 795 + 796 + 797 + type view = { 798 + record : Jsont.json; 799 + } 800 + 801 + (** Jsont codec for {!type:view}. *) 802 + val view_jsont : view Jsont.t 803 + 804 + 805 + type main = { 806 + record : Com.Atproto.Repo.StrongRef.main; 807 + } 808 + 809 + (** Jsont codec for {!type:main}. *) 810 + val main_jsont : main Jsont.t 811 + 812 + end 813 + end 814 + module Notification : sig 212 815 module UpdateSeen : sig 213 816 (** Notify server that the requesting account has seen notifications. Requires auth. *) 214 817 ··· 221 824 val input_jsont : input Jsont.t 222 825 223 826 end 827 + module RegisterPush : sig 828 + (** Register to receive push notifications, via a specified service, for the requesting account. Requires auth. *) 829 + 830 + 831 + type input = { 832 + age_restricted : bool option; (** Set to true when the actor is age restricted *) 833 + app_id : string; 834 + platform : string; 835 + service_did : string; 836 + token : string; 837 + } 838 + 839 + (** Jsont codec for {!type:input}. *) 840 + val input_jsont : input Jsont.t 841 + 842 + end 224 843 module ListNotifications : sig 225 844 226 845 type notification = { ··· 264 883 val output_jsont : output Jsont.t 265 884 266 885 end 267 - module Declaration : sig 268 - (** A declaration of the user's choices related to notifications that can be produced by them. *) 886 + module GetUnreadCount : sig 887 + (** Count the number of unread notifications for the requesting account. Requires auth. *) 269 888 270 - type main = { 271 - allow_subscriptions : string; (** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. *) 889 + (** Query/procedure parameters. *) 890 + type params = { 891 + priority : bool option; 892 + seen_at : string option; 272 893 } 273 894 274 - (** Jsont codec for {!type:main}. *) 275 - val main_jsont : main Jsont.t 895 + (** Jsont codec for {!type:params}. *) 896 + val params_jsont : params Jsont.t 276 897 277 - end 278 - module PutPreferences : sig 279 - (** Set notification-related preferences for an account. Requires auth. *) 280 898 281 - 282 - type input = { 283 - priority : bool; 899 + type output = { 900 + count : int; 284 901 } 285 902 286 - (** Jsont codec for {!type:input}. *) 287 - val input_jsont : input Jsont.t 903 + (** Jsont codec for {!type:output}. *) 904 + val output_jsont : output Jsont.t 288 905 289 906 end 290 - module RegisterPush : sig 291 - (** Register to receive push notifications, via a specified service, for the requesting account. Requires auth. *) 907 + module UnregisterPush : sig 908 + (** The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. *) 292 909 293 910 294 911 type input = { 295 - age_restricted : bool option; (** Set to true when the actor is age restricted *) 296 912 app_id : string; 297 913 platform : string; 298 914 service_did : string; ··· 303 919 val input_jsont : input Jsont.t 304 920 305 921 end 306 - module UnregisterPush : sig 307 - (** The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth. *) 922 + module PutPreferences : sig 923 + (** Set notification-related preferences for an account. Requires auth. *) 308 924 309 925 310 926 type input = { 311 - app_id : string; 312 - platform : string; 313 - service_did : string; 314 - token : string; 927 + priority : bool; 315 928 } 316 929 317 930 (** Jsont codec for {!type:input}. *) ··· 391 1004 392 1005 (** Jsont codec for {!type:preferences}. *) 393 1006 val preferences_jsont : preferences Jsont.t 1007 + 1008 + end 1009 + module Declaration : sig 1010 + (** A declaration of the user's choices related to notifications that can be produced by them. *) 1011 + 1012 + type main = { 1013 + allow_subscriptions : string; (** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. *) 1014 + } 1015 + 1016 + (** Jsont codec for {!type:main}. *) 1017 + val main_jsont : main Jsont.t 394 1018 395 1019 end 396 1020 module ListActivitySubscriptions : sig ··· 488 1112 489 1113 end 490 1114 end 491 - module Labeler : sig 492 - module Defs : sig 493 - 494 - type labeler_viewer_state = { 495 - like : string option; 496 - } 497 - 498 - (** Jsont codec for {!type:labeler_viewer_state}. *) 499 - val labeler_viewer_state_jsont : labeler_viewer_state Jsont.t 500 - 501 - 502 - type labeler_policies = { 503 - 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. *) 504 - label_values : Com.Atproto.Label.Defs.label_value list; (** The label values which this labeler publishes. May include global or custom labels. *) 505 - } 506 - 507 - (** Jsont codec for {!type:labeler_policies}. *) 508 - val labeler_policies_jsont : labeler_policies Jsont.t 509 - 510 - 511 - type labeler_view_detailed = { 512 - cid : string; 513 - creator : Jsont.json; 514 - indexed_at : string; 515 - labels : Com.Atproto.Label.Defs.label list option; 516 - like_count : int option; 517 - policies : Jsont.json; 518 - 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. *) 519 - 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. *) 520 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; (** The set of subject types (account, record, etc) this service accepts reports on. *) 521 - uri : string; 522 - viewer : Jsont.json option; 523 - } 524 - 525 - (** Jsont codec for {!type:labeler_view_detailed}. *) 526 - val labeler_view_detailed_jsont : labeler_view_detailed Jsont.t 527 - 528 - 529 - type labeler_view = { 530 - cid : string; 531 - creator : Jsont.json; 532 - indexed_at : string; 533 - labels : Com.Atproto.Label.Defs.label list option; 534 - like_count : int option; 535 - uri : string; 536 - viewer : Jsont.json option; 537 - } 538 - 539 - (** Jsont codec for {!type:labeler_view}. *) 540 - val labeler_view_jsont : labeler_view Jsont.t 541 - 542 - end 543 - module Service : sig 544 - (** A declaration of the existence of labeler service. *) 545 - 546 - type main = { 547 - created_at : string; 548 - labels : Com.Atproto.Label.Defs.self_labels option; 549 - policies : Jsont.json; 550 - 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. *) 551 - 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. *) 552 - subject_types : Com.Atproto.Moderation.Defs.subject_type list option; (** The set of subject types (account, record, etc) this service accepts reports on. *) 553 - } 554 - 555 - (** Jsont codec for {!type:main}. *) 556 - val main_jsont : main Jsont.t 557 - 558 - end 559 - module GetServices : sig 560 - (** Get information about a list of labeler services. *) 561 - 562 - (** Query/procedure parameters. *) 563 - type params = { 564 - detailed : bool option; 565 - dids : string list; 566 - } 567 - 568 - (** Jsont codec for {!type:params}. *) 569 - val params_jsont : params Jsont.t 570 - 571 - 572 - type output = { 573 - views : Jsont.json list; 574 - } 575 - 576 - (** Jsont codec for {!type:output}. *) 577 - val output_jsont : output Jsont.t 578 - 579 - end 580 - end 581 1115 module Actor : sig 582 1116 module Status : sig 583 1117 (** Advertises an account as currently offering live content. *) ··· 592 1126 duration_minutes : int option; (** The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. *) 593 1127 embed : Jsont.json option; (** An optional embed associated with the status. *) 594 1128 status : string; (** The status for the account. *) 1129 + } 1130 + 1131 + (** Jsont codec for {!type:main}. *) 1132 + val main_jsont : main Jsont.t 1133 + 1134 + end 1135 + module Profile : sig 1136 + (** A declaration of a Bluesky account profile. *) 1137 + 1138 + type main = { 1139 + avatar : Atp.Blob_ref.t option; (** Small image to be displayed next to posts from account. AKA, 'profile picture' *) 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 + labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values, specific to the Bluesky application, on the overall account. *) 1146 + pinned_post : Com.Atproto.Repo.StrongRef.main option; 1147 + pronouns : string option; (** Free-form pronouns text. *) 1148 + website : string option; 595 1149 } 596 1150 597 1151 (** Jsont codec for {!type:main}. *) ··· 961 1515 val known_followers_jsont : known_followers Jsont.t 962 1516 963 1517 end 964 - module Profile : sig 965 - (** A declaration of a Bluesky account profile. *) 1518 + module GetPreferences : sig 1519 + (** Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. *) 1520 + 1521 + (** Query/procedure parameters. *) 1522 + type params = unit 1523 + 1524 + (** Jsont codec for {!type:params}. *) 1525 + val params_jsont : params Jsont.t 1526 + 966 1527 967 - type main = { 968 - avatar : Atp.Blob_ref.t option; (** Small image to be displayed next to posts from account. AKA, 'profile picture' *) 969 - banner : Atp.Blob_ref.t option; (** Larger horizontal image to display behind profile view. *) 970 - created_at : string option; 971 - description : string option; (** Free-form profile description text. *) 972 - display_name : string option; 973 - joined_via_starter_pack : Com.Atproto.Repo.StrongRef.main option; 974 - labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values, specific to the Bluesky application, on the overall account. *) 975 - pinned_post : Com.Atproto.Repo.StrongRef.main option; 976 - pronouns : string option; (** Free-form pronouns text. *) 977 - website : string option; 1528 + type output = { 1529 + preferences : Jsont.json; 978 1530 } 979 1531 980 - (** Jsont codec for {!type:main}. *) 981 - val main_jsont : main Jsont.t 1532 + (** Jsont codec for {!type:output}. *) 1533 + val output_jsont : output Jsont.t 982 1534 983 1535 end 984 - module GetProfiles : sig 985 - (** Get detailed profile views of multiple actors. *) 1536 + module SearchActorsTypeahead : sig 1537 + (** Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. *) 986 1538 987 1539 (** Query/procedure parameters. *) 988 1540 type params = { 989 - actors : string list; 1541 + limit : int option; 1542 + q : string option; (** Search query prefix; not a full query string. *) 1543 + term : string option; (** DEPRECATED: use 'q' instead. *) 990 1544 } 991 1545 992 1546 (** Jsont codec for {!type:params}. *) ··· 994 1548 995 1549 996 1550 type output = { 997 - profiles : Jsont.json list; 1551 + actors : Jsont.json list; 998 1552 } 999 1553 1000 1554 (** Jsont codec for {!type:output}. *) 1001 1555 val output_jsont : output Jsont.t 1002 1556 1003 1557 end 1004 - module GetPreferences : sig 1005 - (** Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth. *) 1558 + module GetProfile : sig 1559 + (** Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. *) 1006 1560 1007 1561 (** Query/procedure parameters. *) 1008 - type params = unit 1562 + type params = { 1563 + actor : string; (** Handle or DID of account to fetch profile of. *) 1564 + } 1009 1565 1010 1566 (** Jsont codec for {!type:params}. *) 1011 1567 val params_jsont : params Jsont.t 1012 1568 1013 1569 1014 - type output = { 1015 - preferences : Jsont.json; 1016 - } 1570 + type output = Jsont.json 1017 1571 1018 1572 (** Jsont codec for {!type:output}. *) 1019 1573 val output_jsont : output Jsont.t 1020 1574 1021 1575 end 1022 - module GetSuggestions : sig 1023 - (** Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. *) 1576 + module SearchActors : sig 1577 + (** Find actors (profiles) matching search criteria. Does not require auth. *) 1024 1578 1025 1579 (** Query/procedure parameters. *) 1026 1580 type params = { 1027 1581 cursor : string option; 1028 1582 limit : int option; 1583 + q : string option; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 1584 + term : string option; (** DEPRECATED: use 'q' instead. *) 1029 1585 } 1030 1586 1031 1587 (** Jsont codec for {!type:params}. *) ··· 1035 1591 type output = { 1036 1592 actors : Jsont.json list; 1037 1593 cursor : string option; 1038 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1039 1594 } 1040 1595 1041 1596 (** Jsont codec for {!type:output}. *) 1042 1597 val output_jsont : output Jsont.t 1043 1598 1044 1599 end 1045 - module GetProfile : sig 1046 - (** Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth. *) 1600 + module GetSuggestions : sig 1601 + (** Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding. *) 1047 1602 1048 1603 (** Query/procedure parameters. *) 1049 1604 type params = { 1050 - actor : string; (** Handle or DID of account to fetch profile of. *) 1605 + cursor : string option; 1606 + limit : int option; 1051 1607 } 1052 1608 1053 1609 (** Jsont codec for {!type:params}. *) 1054 1610 val params_jsont : params Jsont.t 1055 1611 1056 1612 1057 - type output = Jsont.json 1613 + type output = { 1614 + actors : Jsont.json list; 1615 + cursor : string option; 1616 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1617 + } 1058 1618 1059 1619 (** Jsont codec for {!type:output}. *) 1060 1620 val output_jsont : output Jsont.t 1061 1621 1062 1622 end 1063 - module SearchActors : sig 1064 - (** Find actors (profiles) matching search criteria. Does not require auth. *) 1623 + module GetProfiles : sig 1624 + (** Get detailed profile views of multiple actors. *) 1065 1625 1066 1626 (** Query/procedure parameters. *) 1067 1627 type params = { 1068 - cursor : string option; 1069 - limit : int option; 1070 - q : string option; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 1071 - term : string option; (** DEPRECATED: use 'q' instead. *) 1628 + actors : string list; 1072 1629 } 1073 1630 1074 1631 (** Jsont codec for {!type:params}. *) ··· 1076 1633 1077 1634 1078 1635 type output = { 1079 - actors : Jsont.json list; 1080 - cursor : string option; 1636 + profiles : Jsont.json list; 1081 1637 } 1082 1638 1083 1639 (** Jsont codec for {!type:output}. *) ··· 1096 1652 val input_jsont : input Jsont.t 1097 1653 1098 1654 end 1099 - module SearchActorsTypeahead : sig 1100 - (** Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth. *) 1655 + end 1656 + module Contact : sig 1657 + module Defs : sig 1101 1658 1102 - (** Query/procedure parameters. *) 1103 - type params = { 1104 - limit : int option; 1105 - q : string option; (** Search query prefix; not a full query string. *) 1106 - term : string option; (** DEPRECATED: use 'q' instead. *) 1659 + type sync_status = { 1660 + matches_count : int; (** Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match. *) 1661 + synced_at : string; (** Last date when contacts where imported. *) 1662 + } 1663 + 1664 + (** Jsont codec for {!type:sync_status}. *) 1665 + val sync_status_jsont : sync_status Jsont.t 1666 + 1667 + (** A stash object to be sent via bsync representing a notification to be created. *) 1668 + 1669 + type notification = { 1670 + from : string; (** The DID of who this notification comes from. *) 1671 + to_ : string; (** The DID of who this notification should go to. *) 1107 1672 } 1108 1673 1109 - (** Jsont codec for {!type:params}. *) 1110 - val params_jsont : params Jsont.t 1674 + (** Jsont codec for {!type:notification}. *) 1675 + val notification_jsont : notification Jsont.t 1111 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. *) 1112 1678 1113 - type output = { 1114 - actors : Jsont.json list; 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. *) 1115 1682 } 1116 1683 1117 - (** Jsont codec for {!type:output}. *) 1118 - val output_jsont : output Jsont.t 1684 + (** Jsont codec for {!type:match_and_contact_index}. *) 1685 + val match_and_contact_index_jsont : match_and_contact_index Jsont.t 1119 1686 1120 1687 end 1121 - end 1122 - module Video : sig 1123 - module GetUploadLimits : sig 1124 - (** Get video upload limits for the authenticated user. *) 1688 + module RemoveData : sig 1689 + (** Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication. *) 1125 1690 1126 1691 1127 - type output = { 1128 - can_upload : bool; 1129 - error : string option; 1130 - message : string option; 1131 - remaining_daily_bytes : int option; 1132 - remaining_daily_videos : int option; 1133 - } 1692 + type input = unit 1693 + 1694 + (** Jsont codec for {!type:input}. *) 1695 + val input_jsont : input Jsont.t 1696 + 1697 + 1698 + type output = unit 1134 1699 1135 1700 (** Jsont codec for {!type:output}. *) 1136 1701 val output_jsont : output Jsont.t 1137 1702 1138 1703 end 1139 - module Defs : sig 1704 + module DismissMatch : sig 1705 + (** Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication. *) 1140 1706 1141 - type job_status = { 1142 - blob : Atp.Blob_ref.t option; 1143 - did : string; 1144 - error : string option; 1145 - job_id : string; 1146 - message : string option; 1147 - progress : int option; (** Progress within the current processing state. *) 1148 - state : string; (** The state of the video processing job. All values not listed as a known value indicate that the job is in process. *) 1707 + 1708 + type input = { 1709 + subject : string; (** The subject's DID to dismiss the match with. *) 1149 1710 } 1150 1711 1151 - (** Jsont codec for {!type:job_status}. *) 1152 - val job_status_jsont : job_status Jsont.t 1712 + (** Jsont codec for {!type:input}. *) 1713 + val input_jsont : input Jsont.t 1714 + 1715 + 1716 + type output = unit 1717 + 1718 + (** Jsont codec for {!type:output}. *) 1719 + val output_jsont : output Jsont.t 1153 1720 1154 1721 end 1155 - module GetJobStatus : sig 1156 - (** Get status details for a video processing job. *) 1722 + module GetMatches : sig 1723 + (** Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication. *) 1157 1724 1158 1725 (** Query/procedure parameters. *) 1159 1726 type params = { 1160 - job_id : string; 1727 + cursor : string option; 1728 + limit : int option; 1161 1729 } 1162 1730 1163 1731 (** Jsont codec for {!type:params}. *) ··· 1165 1733 1166 1734 1167 1735 type output = { 1168 - job_status : Defs.job_status; 1736 + cursor : string option; 1737 + matches : Jsont.json list; 1169 1738 } 1170 1739 1171 1740 (** Jsont codec for {!type:output}. *) 1172 1741 val output_jsont : output Jsont.t 1173 1742 1174 1743 end 1175 - module UploadVideo : sig 1176 - (** Upload a video to be processed then stored on the PDS. *) 1744 + module VerifyPhone : sig 1745 + (** Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. *) 1746 + 1177 1747 1748 + type input = { 1749 + code : string; (** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. *) 1750 + phone : string; (** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. *) 1751 + } 1178 1752 1179 - type input = unit 1753 + (** Jsont codec for {!type:input}. *) 1180 1754 val input_jsont : input Jsont.t 1181 1755 1182 1756 1183 1757 type output = { 1184 - job_status : Defs.job_status; 1758 + token : string; (** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. *) 1185 1759 } 1186 1760 1187 1761 (** Jsont codec for {!type:output}. *) 1188 1762 val output_jsont : output Jsont.t 1189 1763 1190 1764 end 1191 - end 1192 - module Richtext : sig 1193 - module Facet : sig 1194 - (** 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'). *) 1765 + module StartPhoneVerification : sig 1766 + (** Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. *) 1767 + 1195 1768 1196 - type tag = { 1197 - tag : string; 1769 + type input = { 1770 + phone : string; (** The phone number to receive the code via SMS. *) 1198 1771 } 1199 1772 1200 - (** Jsont codec for {!type:tag}. *) 1201 - val tag_jsont : tag Jsont.t 1773 + (** Jsont codec for {!type:input}. *) 1774 + val input_jsont : input Jsont.t 1202 1775 1203 - (** Facet feature for mention of another account. The text is usually a handle, including a '\@' prefix, but the facet reference is a DID. *) 1204 1776 1205 - type mention = { 1206 - did : string; 1207 - } 1777 + type output = unit 1208 1778 1209 - (** Jsont codec for {!type:mention}. *) 1210 - val mention_jsont : mention Jsont.t 1779 + (** Jsont codec for {!type:output}. *) 1780 + val output_jsont : output Jsont.t 1211 1781 1212 - (** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. *) 1782 + end 1783 + module SendNotification : sig 1784 + (** System endpoint to send notifications related to contact imports. Requires role authentication. *) 1213 1785 1214 - type link = { 1215 - uri : string; 1216 - } 1217 1786 1218 - (** Jsont codec for {!type:link}. *) 1219 - val link_jsont : link Jsont.t 1220 - 1221 - (** 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. *) 1222 - 1223 - type byte_slice = { 1224 - byte_end : int; 1225 - byte_start : int; 1787 + type input = { 1788 + from : string; (** The DID of who this notification comes from. *) 1789 + to_ : string; (** The DID of who this notification should go to. *) 1226 1790 } 1227 1791 1228 - (** Jsont codec for {!type:byte_slice}. *) 1229 - val byte_slice_jsont : byte_slice Jsont.t 1792 + (** Jsont codec for {!type:input}. *) 1793 + val input_jsont : input Jsont.t 1230 1794 1231 - (** Annotation of a sub-string within rich text. *) 1232 1795 1233 - type main = { 1234 - features : Jsont.json list; 1235 - index : byte_slice; 1236 - } 1796 + type output = unit 1237 1797 1238 - (** Jsont codec for {!type:main}. *) 1239 - val main_jsont : main Jsont.t 1798 + (** Jsont codec for {!type:output}. *) 1799 + val output_jsont : output Jsont.t 1240 1800 1241 1801 end 1242 - end 1243 - module AuthCreatePosts : sig 1802 + module GetSyncStatus : sig 1803 + (** Gets the user's current contact import status. Requires authentication. *) 1244 1804 1245 - type main = unit 1246 - val main_jsont : main Jsont.t 1805 + (** Query/procedure parameters. *) 1806 + type params = unit 1247 1807 1248 - end 1249 - module Ageassurance : sig 1250 - module Defs : sig 1251 - (** The status of the Age Assurance process. *) 1808 + (** Jsont codec for {!type:params}. *) 1809 + val params_jsont : params Jsont.t 1252 1810 1253 - type status = string 1254 - val status_jsont : status Jsont.t 1255 1811 1256 - (** Additional metadata needed to compute Age Assurance state client-side. *) 1257 - 1258 - type state_metadata = { 1259 - account_created_at : string option; (** The account creation timestamp. *) 1812 + type output = { 1813 + sync_status : Defs.sync_status option; (** If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since. *) 1260 1814 } 1261 1815 1262 - (** Jsont codec for {!type:state_metadata}. *) 1263 - val state_metadata_jsont : state_metadata Jsont.t 1816 + (** Jsont codec for {!type:output}. *) 1817 + val output_jsont : output Jsont.t 1264 1818 1265 - (** Object used to store Age Assurance data in stash. *) 1819 + end 1820 + module ImportContacts : sig 1821 + (** Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. *) 1266 1822 1267 - type event = { 1268 - access : string; (** The access level granted based on Age Assurance data we've processed. *) 1269 - attempt_id : string; (** The unique identifier for this instance of the Age Assurance flow, in UUID format. *) 1270 - complete_ip : string option; (** The IP address used when completing the Age Assurance flow. *) 1271 - complete_ua : string option; (** The user agent used when completing the Age Assurance flow. *) 1272 - country_code : string; (** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. *) 1273 - created_at : string; (** The date and time of this write operation. *) 1274 - email : string option; (** The email used for Age Assurance. *) 1275 - init_ip : string option; (** The IP address used when initiating the Age Assurance flow. *) 1276 - init_ua : string option; (** The user agent used when initiating the Age Assurance flow. *) 1277 - region_code : string option; (** The ISO 3166-2 region code provided when beginning the Age Assurance flow. *) 1278 - status : string; (** The status of the Age Assurance process. *) 1823 + 1824 + type input = { 1825 + contacts : string list; (** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. *) 1826 + token : string; (** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. *) 1279 1827 } 1280 1828 1281 - (** Jsont codec for {!type:event}. *) 1282 - val event_jsont : event Jsont.t 1829 + (** Jsont codec for {!type:input}. *) 1830 + val input_jsont : input Jsont.t 1283 1831 1284 - (** The Age Assurance configuration for a specific region. *) 1285 1832 1286 - type config_region = { 1287 - country_code : string; (** The ISO 3166-1 alpha-2 country code this configuration applies to. *) 1288 - min_access_age : int; (** The minimum age (as a whole integer) required to use Bluesky in this region. *) 1289 - region_code : string option; (** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. *) 1290 - 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. *) 1833 + type output = { 1834 + matches_and_contact_indexes : Defs.match_and_contact_index list; (** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. *) 1291 1835 } 1292 1836 1293 - (** Jsont codec for {!type:config_region}. *) 1294 - val config_region_jsont : config_region Jsont.t 1837 + (** Jsont codec for {!type:output}. *) 1838 + val output_jsont : output Jsont.t 1295 1839 1296 - (** The access level granted based on Age Assurance data we've processed. *) 1840 + end 1841 + end 1842 + module Graph : sig 1843 + module Starterpack : sig 1297 1844 1298 - type access = string 1299 - val access_jsont : access Jsont.t 1300 - 1301 - (** The user's computed Age Assurance state. *) 1302 - 1303 - type state = { 1304 - access : access; 1305 - last_initiated_at : string option; (** The timestamp when this state was last updated. *) 1306 - status : status; 1845 + type feed_item = { 1846 + uri : string; 1307 1847 } 1308 1848 1309 - (** Jsont codec for {!type:state}. *) 1310 - val state_jsont : state Jsont.t 1849 + (** Jsont codec for {!type:feed_item}. *) 1850 + val feed_item_jsont : feed_item Jsont.t 1311 1851 1312 - (** Age Assurance rule that applies if the user has declared themselves under a certain age. *) 1852 + (** Record defining a starter pack of actors and feeds for new users. *) 1313 1853 1314 - type config_region_rule_if_declared_under_age = { 1315 - access : access; 1316 - age : int; (** The age threshold as a whole integer. *) 1854 + type main = { 1855 + created_at : string; 1856 + description : string option; 1857 + description_facets : Richtext.Facet.main list option; 1858 + feeds : Jsont.json list option; 1859 + list_ : string; (** Reference (AT-URI) to the list record. *) 1860 + name : string; (** Display name for starter pack; can not be empty. *) 1317 1861 } 1318 1862 1319 - (** Jsont codec for {!type:config_region_rule_if_declared_under_age}. *) 1320 - val config_region_rule_if_declared_under_age_jsont : config_region_rule_if_declared_under_age Jsont.t 1863 + (** Jsont codec for {!type:main}. *) 1864 + val main_jsont : main Jsont.t 1321 1865 1322 - (** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. *) 1866 + end 1867 + module GetFollows : sig 1868 + (** Enumerates accounts which a specified account (actor) follows. *) 1323 1869 1324 - type config_region_rule_if_declared_over_age = { 1325 - access : access; 1326 - age : int; (** The age threshold as a whole integer. *) 1870 + (** Query/procedure parameters. *) 1871 + type params = { 1872 + actor : string; 1873 + cursor : string option; 1874 + limit : int option; 1327 1875 } 1328 1876 1329 - (** Jsont codec for {!type:config_region_rule_if_declared_over_age}. *) 1330 - val config_region_rule_if_declared_over_age_jsont : config_region_rule_if_declared_over_age Jsont.t 1877 + (** Jsont codec for {!type:params}. *) 1878 + val params_jsont : params Jsont.t 1331 1879 1332 - (** Age Assurance rule that applies if the user has been assured to be under a certain age. *) 1333 1880 1334 - type config_region_rule_if_assured_under_age = { 1335 - access : access; 1336 - age : int; (** The age threshold as a whole integer. *) 1881 + type output = { 1882 + cursor : string option; 1883 + follows : Jsont.json list; 1884 + subject : Jsont.json; 1337 1885 } 1338 1886 1339 - (** Jsont codec for {!type:config_region_rule_if_assured_under_age}. *) 1340 - val config_region_rule_if_assured_under_age_jsont : config_region_rule_if_assured_under_age Jsont.t 1887 + (** Jsont codec for {!type:output}. *) 1888 + val output_jsont : output Jsont.t 1341 1889 1342 - (** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. *) 1890 + end 1891 + module GetSuggestedFollowsByActor : sig 1892 + (** Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. *) 1343 1893 1344 - type config_region_rule_if_assured_over_age = { 1345 - access : access; 1346 - age : int; (** The age threshold as a whole integer. *) 1894 + (** Query/procedure parameters. *) 1895 + type params = { 1896 + actor : string; 1347 1897 } 1348 1898 1349 - (** Jsont codec for {!type:config_region_rule_if_assured_over_age}. *) 1350 - val config_region_rule_if_assured_over_age_jsont : config_region_rule_if_assured_over_age Jsont.t 1899 + (** Jsont codec for {!type:params}. *) 1900 + val params_jsont : params Jsont.t 1351 1901 1352 - (** Age Assurance rule that applies if the account is older than a certain date. *) 1353 1902 1354 - type config_region_rule_if_account_older_than = { 1355 - access : access; 1356 - date : string; (** The date threshold as a datetime string. *) 1903 + type output = { 1904 + is_fallback : bool option; (** If true, response has fallen-back to generic results, and is not scoped using relativeToDid *) 1905 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 1906 + suggestions : Jsont.json list; 1357 1907 } 1358 1908 1359 - (** Jsont codec for {!type:config_region_rule_if_account_older_than}. *) 1360 - val config_region_rule_if_account_older_than_jsont : config_region_rule_if_account_older_than Jsont.t 1909 + (** Jsont codec for {!type:output}. *) 1910 + val output_jsont : output Jsont.t 1361 1911 1362 - (** Age Assurance rule that applies if the account is equal-to or newer than a certain date. *) 1912 + end 1913 + module Block : sig 1914 + (** Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. *) 1363 1915 1364 - type config_region_rule_if_account_newer_than = { 1365 - access : access; 1366 - date : string; (** The date threshold as a datetime string. *) 1916 + type main = { 1917 + created_at : string; 1918 + subject : string; (** DID of the account to be blocked. *) 1367 1919 } 1368 1920 1369 - (** Jsont codec for {!type:config_region_rule_if_account_newer_than}. *) 1370 - val config_region_rule_if_account_newer_than_jsont : config_region_rule_if_account_newer_than Jsont.t 1921 + (** Jsont codec for {!type:main}. *) 1922 + val main_jsont : main Jsont.t 1371 1923 1372 - (** Age Assurance rule that applies by default. *) 1924 + end 1925 + module Listblock : sig 1926 + (** Record representing a block relationship against an entire an entire list of accounts (actors). *) 1373 1927 1374 - type config_region_rule_default = { 1375 - access : access; 1928 + type main = { 1929 + created_at : string; 1930 + subject : string; (** Reference (AT-URI) to the mod list record. *) 1376 1931 } 1377 1932 1378 - (** Jsont codec for {!type:config_region_rule_default}. *) 1379 - val config_region_rule_default_jsont : config_region_rule_default Jsont.t 1933 + (** Jsont codec for {!type:main}. *) 1934 + val main_jsont : main Jsont.t 1935 + 1936 + end 1937 + module MuteThread : sig 1938 + (** Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. *) 1380 1939 1381 1940 1382 - type config = { 1383 - regions : config_region list; (** The per-region Age Assurance configuration. *) 1941 + type input = { 1942 + root : string; 1384 1943 } 1385 1944 1386 - (** Jsont codec for {!type:config}. *) 1387 - val config_jsont : config Jsont.t 1945 + (** Jsont codec for {!type:input}. *) 1946 + val input_jsont : input Jsont.t 1388 1947 1389 1948 end 1390 - module GetState : sig 1391 - (** Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side. *) 1949 + module GetFollowers : sig 1950 + (** Enumerates accounts which follow a specified account (actor). *) 1392 1951 1393 1952 (** Query/procedure parameters. *) 1394 1953 type params = { 1395 - country_code : string; 1396 - region_code : string option; 1954 + actor : string; 1955 + cursor : string option; 1956 + limit : int option; 1397 1957 } 1398 1958 1399 1959 (** Jsont codec for {!type:params}. *) ··· 1401 1961 1402 1962 1403 1963 type output = { 1404 - metadata : Defs.state_metadata; 1405 - state : Defs.state; 1964 + cursor : string option; 1965 + followers : Jsont.json list; 1966 + subject : Jsont.json; 1406 1967 } 1407 1968 1408 1969 (** Jsont codec for {!type:output}. *) 1409 1970 val output_jsont : output Jsont.t 1410 1971 1411 1972 end 1412 - module Begin : sig 1413 - (** Initiate Age Assurance for an account. *) 1973 + module UnmuteThread : sig 1974 + (** Unmutes the specified thread. Requires auth. *) 1414 1975 1415 1976 1416 1977 type input = { 1417 - country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 1418 - email : string; (** The user's email address to receive Age Assurance instructions. *) 1419 - language : string; (** The user's preferred language for communication during the Age Assurance process. *) 1420 - region_code : string option; (** An optional ISO 3166-2 code of the user's region or state within the country. *) 1978 + root : string; 1421 1979 } 1422 1980 1423 1981 (** Jsont codec for {!type:input}. *) 1424 1982 val input_jsont : input Jsont.t 1425 1983 1984 + end 1985 + module Follow : sig 1986 + (** Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. *) 1426 1987 1427 - type output = Defs.state 1988 + type main = { 1989 + created_at : string; 1990 + subject : string; 1991 + via : Com.Atproto.Repo.StrongRef.main option; 1992 + } 1428 1993 1429 - (** Jsont codec for {!type:output}. *) 1430 - val output_jsont : output Jsont.t 1994 + (** Jsont codec for {!type:main}. *) 1995 + val main_jsont : main Jsont.t 1431 1996 1432 1997 end 1433 - module GetConfig : sig 1434 - (** Returns Age Assurance configuration for use on the client. *) 1998 + module UnmuteActor : sig 1999 + (** Unmutes the specified account. Requires auth. *) 1435 2000 1436 2001 1437 - type output = Defs.config 1438 - 1439 - (** Jsont codec for {!type:output}. *) 1440 - val output_jsont : output Jsont.t 1441 - 1442 - end 1443 - end 1444 - module Embed : sig 1445 - module Defs : sig 1446 - (** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. *) 1447 - 1448 - type aspect_ratio = { 1449 - height : int; 1450 - width : int; 2002 + type input = { 2003 + actor : string; 1451 2004 } 1452 2005 1453 - (** Jsont codec for {!type:aspect_ratio}. *) 1454 - val aspect_ratio_jsont : aspect_ratio Jsont.t 2006 + (** Jsont codec for {!type:input}. *) 2007 + val input_jsont : input Jsont.t 1455 2008 1456 2009 end 1457 - module External : sig 1458 - 1459 - type view_external = { 1460 - description : string; 1461 - thumb : string option; 1462 - title : string; 1463 - uri : string; 1464 - } 1465 - 1466 - (** Jsont codec for {!type:view_external}. *) 1467 - val view_external_jsont : view_external Jsont.t 2010 + module MuteActorList : sig 2011 + (** Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. *) 1468 2012 1469 2013 1470 - type external_ = { 1471 - description : string; 1472 - thumb : Atp.Blob_ref.t option; 1473 - title : string; 1474 - uri : string; 2014 + type input = { 2015 + list_ : string; 1475 2016 } 1476 2017 1477 - (** Jsont codec for {!type:external_}. *) 1478 - val external__jsont : external_ Jsont.t 2018 + (** Jsont codec for {!type:input}. *) 2019 + val input_jsont : input Jsont.t 1479 2020 2021 + end 2022 + module UnmuteActorList : sig 2023 + (** Unmutes the specified list of accounts. Requires auth. *) 1480 2024 1481 - type view = { 1482 - external_ : Jsont.json; 1483 - } 1484 2025 1485 - (** Jsont codec for {!type:view}. *) 1486 - val view_jsont : view Jsont.t 1487 - 1488 - (** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). *) 1489 - 1490 - type main = { 1491 - external_ : Jsont.json; 2026 + type input = { 2027 + list_ : string; 1492 2028 } 1493 2029 1494 - (** Jsont codec for {!type:main}. *) 1495 - val main_jsont : main Jsont.t 2030 + (** Jsont codec for {!type:input}. *) 2031 + val input_jsont : input Jsont.t 1496 2032 1497 2033 end 1498 - module Images : sig 2034 + module GetKnownFollowers : sig 2035 + (** Enumerates accounts which follow a specified account (actor) and are followed by the viewer. *) 1499 2036 1500 - type view_image = { 1501 - alt : string; (** Alt text description of the image, for accessibility. *) 1502 - aspect_ratio : Jsont.json option; 1503 - 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. *) 1504 - thumb : string; (** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. *) 2037 + (** Query/procedure parameters. *) 2038 + type params = { 2039 + actor : string; 2040 + cursor : string option; 2041 + limit : int option; 1505 2042 } 1506 2043 1507 - (** Jsont codec for {!type:view_image}. *) 1508 - val view_image_jsont : view_image Jsont.t 2044 + (** Jsont codec for {!type:params}. *) 2045 + val params_jsont : params Jsont.t 1509 2046 1510 2047 1511 - type image = { 1512 - alt : string; (** Alt text description of the image, for accessibility. *) 1513 - aspect_ratio : Jsont.json option; 1514 - image : Atp.Blob_ref.t; 2048 + type output = { 2049 + cursor : string option; 2050 + followers : Jsont.json list; 2051 + subject : Jsont.json; 1515 2052 } 1516 2053 1517 - (** Jsont codec for {!type:image}. *) 1518 - val image_jsont : image Jsont.t 2054 + (** Jsont codec for {!type:output}. *) 2055 + val output_jsont : output Jsont.t 1519 2056 2057 + end 2058 + module MuteActor : sig 2059 + (** Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. *) 1520 2060 1521 - type view = { 1522 - images : Jsont.json list; 2061 + 2062 + type input = { 2063 + actor : string; 1523 2064 } 1524 2065 1525 - (** Jsont codec for {!type:view}. *) 1526 - val view_jsont : view Jsont.t 2066 + (** Jsont codec for {!type:input}. *) 2067 + val input_jsont : input Jsont.t 1527 2068 2069 + end 2070 + module Listitem : sig 2071 + (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 1528 2072 1529 2073 type main = { 1530 - images : Jsont.json list; 2074 + created_at : string; 2075 + list_ : string; (** Reference (AT-URI) to the list record (app.bsky.graph.list). *) 2076 + subject : string; (** The account which is included on the list. *) 1531 2077 } 1532 2078 1533 2079 (** Jsont codec for {!type:main}. *) 1534 2080 val main_jsont : main Jsont.t 1535 2081 1536 2082 end 1537 - module Video : sig 2083 + module Defs : sig 1538 2084 1539 - type view = { 1540 - alt : string option; 1541 - aspect_ratio : Jsont.json option; 2085 + type starter_pack_view_basic = { 1542 2086 cid : string; 1543 - playlist : string; 1544 - thumbnail : string option; 2087 + creator : Jsont.json; 2088 + indexed_at : string; 2089 + joined_all_time_count : int option; 2090 + joined_week_count : int option; 2091 + labels : Com.Atproto.Label.Defs.label list option; 2092 + list_item_count : int option; 2093 + record : Jsont.json; 2094 + uri : string; 1545 2095 } 1546 2096 1547 - (** Jsont codec for {!type:view}. *) 1548 - val view_jsont : view Jsont.t 2097 + (** Jsont codec for {!type:starter_pack_view_basic}. *) 2098 + val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 1549 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) *) 1550 2101 1551 - type caption = { 1552 - file : Atp.Blob_ref.t; 1553 - lang : string; 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 *) 1554 2110 } 1555 2111 1556 - (** Jsont codec for {!type:caption}. *) 1557 - val caption_jsont : caption Jsont.t 2112 + (** Jsont codec for {!type:relationship}. *) 2113 + val relationship_jsont : relationship Jsont.t 1558 2114 2115 + (** A list of actors used for only for reference purposes such as within a starter pack. *) 1559 2116 1560 - type main = { 1561 - alt : string option; (** Alt text description of the video, for accessibility. *) 1562 - aspect_ratio : Jsont.json option; 1563 - captions : Jsont.json list option; 1564 - video : Atp.Blob_ref.t; (** The mp4 video file. May be up to 100mb, formerly limited to 50mb. *) 2117 + type referencelist = string 2118 + val referencelist_jsont : referencelist Jsont.t 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; 1565 2125 } 1566 2126 1567 - (** Jsont codec for {!type:main}. *) 1568 - val main_jsont : main Jsont.t 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 1569 2134 1570 - end 1571 - module RecordWithMedia : sig 1572 2135 1573 - type view = { 1574 - media : Jsont.json; 1575 - record : Jsont.json; 2136 + type list_viewer_state = { 2137 + blocked : string option; 2138 + muted : bool option; 1576 2139 } 1577 2140 1578 - (** Jsont codec for {!type:view}. *) 1579 - val view_jsont : view Jsont.t 2141 + (** Jsont codec for {!type:list_viewer_state}. *) 2142 + val list_viewer_state_jsont : list_viewer_state Jsont.t 1580 2143 1581 2144 1582 - type main = { 1583 - media : Jsont.json; 1584 - record : Jsont.json; 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; 1585 2152 } 1586 2153 1587 - (** Jsont codec for {!type:main}. *) 1588 - val main_jsont : main Jsont.t 2154 + (** Jsont codec for {!type:list_item_view}. *) 2155 + val list_item_view_jsont : list_item_view Jsont.t 2156 + 2157 + (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2158 + 2159 + type curatelist = string 2160 + val curatelist_jsont : curatelist Jsont.t 1589 2161 1590 - end 1591 - module Record : sig 1592 2162 1593 - type view_record = { 1594 - author : Jsont.json; 2163 + type list_view_basic = { 2164 + avatar : string option; 1595 2165 cid : string; 1596 - embeds : Jsont.json list option; 1597 - indexed_at : string; 2166 + indexed_at : string option; 1598 2167 labels : Com.Atproto.Label.Defs.label list option; 1599 - like_count : int option; 1600 - quote_count : int option; 1601 - reply_count : int option; 1602 - repost_count : int option; 2168 + list_item_count : int option; 2169 + name : string; 2170 + purpose : Jsont.json; 1603 2171 uri : string; 1604 - value : Jsont.json; (** The record data itself. *) 2172 + viewer : Jsont.json option; 1605 2173 } 1606 2174 1607 - (** Jsont codec for {!type:view_record}. *) 1608 - val view_record_jsont : view_record Jsont.t 2175 + (** Jsont codec for {!type:list_view_basic}. *) 2176 + val list_view_basic_jsont : list_view_basic Jsont.t 1609 2177 1610 2178 1611 - type view_not_found = { 1612 - not_found : bool; 2179 + type list_view = { 2180 + avatar : string option; 2181 + cid : string; 2182 + creator : Jsont.json; 2183 + description : string option; 2184 + description_facets : Richtext.Facet.main list option; 2185 + indexed_at : string; 2186 + labels : Com.Atproto.Label.Defs.label list option; 2187 + list_item_count : int option; 2188 + name : string; 2189 + purpose : Jsont.json; 1613 2190 uri : string; 2191 + viewer : Jsont.json option; 1614 2192 } 1615 2193 1616 - (** Jsont codec for {!type:view_not_found}. *) 1617 - val view_not_found_jsont : view_not_found Jsont.t 2194 + (** Jsont codec for {!type:list_view}. *) 2195 + val list_view_jsont : list_view Jsont.t 1618 2196 1619 2197 1620 - type view_detached = { 1621 - detached : bool; 2198 + type starter_pack_view = { 2199 + cid : string; 2200 + creator : Jsont.json; 2201 + feeds : Jsont.json list option; 2202 + indexed_at : string; 2203 + joined_all_time_count : int option; 2204 + joined_week_count : int option; 2205 + labels : Com.Atproto.Label.Defs.label list option; 2206 + list_ : Jsont.json option; 2207 + list_items_sample : Jsont.json list option; 2208 + record : Jsont.json; 1622 2209 uri : string; 1623 2210 } 1624 2211 1625 - (** Jsont codec for {!type:view_detached}. *) 1626 - val view_detached_jsont : view_detached Jsont.t 2212 + (** Jsont codec for {!type:starter_pack_view}. *) 2213 + val starter_pack_view_jsont : starter_pack_view Jsont.t 1627 2214 2215 + end 2216 + module GetBlocks : sig 2217 + (** Enumerates which accounts the requesting account is currently blocking. Requires auth. *) 1628 2218 1629 - type view_blocked = { 1630 - author : Jsont.json; 1631 - blocked : bool; 1632 - uri : string; 2219 + (** Query/procedure parameters. *) 2220 + type params = { 2221 + cursor : string option; 2222 + limit : int option; 1633 2223 } 1634 2224 1635 - (** Jsont codec for {!type:view_blocked}. *) 1636 - val view_blocked_jsont : view_blocked Jsont.t 2225 + (** Jsont codec for {!type:params}. *) 2226 + val params_jsont : params Jsont.t 1637 2227 1638 2228 1639 - type view = { 1640 - record : Jsont.json; 2229 + type output = { 2230 + blocks : Jsont.json list; 2231 + cursor : string option; 1641 2232 } 1642 2233 1643 - (** Jsont codec for {!type:view}. *) 1644 - val view_jsont : view Jsont.t 2234 + (** Jsont codec for {!type:output}. *) 2235 + val output_jsont : output Jsont.t 1645 2236 2237 + end 2238 + module Verification : sig 2239 + (** Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted. *) 1646 2240 1647 2241 type main = { 1648 - record : Com.Atproto.Repo.StrongRef.main; 2242 + created_at : string; (** Date of when the verification was created. *) 2243 + display_name : string; (** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. *) 2244 + handle : string; (** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. *) 2245 + subject : string; (** DID of the subject the verification applies to. *) 1649 2246 } 1650 2247 1651 2248 (** Jsont codec for {!type:main}. *) 1652 2249 val main_jsont : main Jsont.t 1653 2250 1654 2251 end 1655 - end 1656 - module Contact : sig 1657 - module SendNotification : sig 1658 - (** System endpoint to send notifications related to contact imports. Requires role authentication. *) 2252 + module GetMutes : sig 2253 + (** Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. *) 1659 2254 1660 - 1661 - type input = { 1662 - from : string; (** The DID of who this notification comes from. *) 1663 - to_ : string; (** The DID of who this notification should go to. *) 2255 + (** Query/procedure parameters. *) 2256 + type params = { 2257 + cursor : string option; 2258 + limit : int option; 1664 2259 } 1665 2260 1666 - (** Jsont codec for {!type:input}. *) 1667 - val input_jsont : input Jsont.t 2261 + (** Jsont codec for {!type:params}. *) 2262 + val params_jsont : params Jsont.t 1668 2263 1669 2264 1670 - type output = unit 2265 + type output = { 2266 + cursor : string option; 2267 + mutes : Jsont.json list; 2268 + } 1671 2269 1672 2270 (** Jsont codec for {!type:output}. *) 1673 2271 val output_jsont : output Jsont.t 1674 2272 1675 2273 end 1676 - module StartPhoneVerification : sig 1677 - (** Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication. *) 2274 + module GetRelationships : sig 2275 + (** Enumerates public relationships between one account, and a list of other accounts. Does not require auth. *) 1678 2276 1679 - 1680 - type input = { 1681 - phone : string; (** The phone number to receive the code via SMS. *) 2277 + (** Query/procedure parameters. *) 2278 + type params = { 2279 + actor : string; (** Primary account requesting relationships for. *) 2280 + others : string list option; (** List of 'other' accounts to be related back to the primary. *) 1682 2281 } 1683 2282 1684 - (** Jsont codec for {!type:input}. *) 1685 - val input_jsont : input Jsont.t 2283 + (** Jsont codec for {!type:params}. *) 2284 + val params_jsont : params Jsont.t 1686 2285 1687 2286 1688 - type output = unit 2287 + type output = { 2288 + actor : string option; 2289 + relationships : Jsont.json list; 2290 + } 1689 2291 1690 2292 (** Jsont codec for {!type:output}. *) 1691 2293 val output_jsont : output Jsont.t 1692 2294 1693 2295 end 1694 - module GetMatches : sig 1695 - (** Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication. *) 2296 + module GetStarterPacksWithMembership : sig 2297 + (** A starter pack and an optional list item indicating membership of a target user to that starter pack. *) 2298 + 2299 + type starter_pack_with_membership = { 2300 + list_item : Jsont.json option; 2301 + starter_pack : Jsont.json; 2302 + } 2303 + 2304 + (** Jsont codec for {!type:starter_pack_with_membership}. *) 2305 + val starter_pack_with_membership_jsont : starter_pack_with_membership Jsont.t 2306 + 2307 + (** Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. *) 1696 2308 1697 2309 (** Query/procedure parameters. *) 1698 2310 type params = { 2311 + actor : string; (** The account (actor) to check for membership. *) 1699 2312 cursor : string option; 1700 2313 limit : int option; 1701 2314 } ··· 1706 2319 1707 2320 type output = { 1708 2321 cursor : string option; 1709 - matches : Jsont.json list; 2322 + starter_packs_with_membership : Jsont.json list; 1710 2323 } 1711 2324 1712 2325 (** Jsont codec for {!type:output}. *) 1713 2326 val output_jsont : output Jsont.t 1714 2327 1715 2328 end 1716 - module VerifyPhone : sig 1717 - (** Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication. *) 2329 + module GetActorStarterPacks : sig 2330 + (** Get a list of starter packs created by the actor. *) 1718 2331 1719 - 1720 - type input = { 1721 - code : string; (** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. *) 1722 - phone : string; (** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. *) 2332 + (** Query/procedure parameters. *) 2333 + type params = { 2334 + actor : string; 2335 + cursor : string option; 2336 + limit : int option; 1723 2337 } 1724 2338 1725 - (** Jsont codec for {!type:input}. *) 1726 - val input_jsont : input Jsont.t 2339 + (** Jsont codec for {!type:params}. *) 2340 + val params_jsont : params Jsont.t 1727 2341 1728 2342 1729 2343 type output = { 1730 - token : string; (** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. *) 2344 + cursor : string option; 2345 + starter_packs : Jsont.json list; 1731 2346 } 1732 2347 1733 2348 (** Jsont codec for {!type:output}. *) 1734 2349 val output_jsont : output Jsont.t 1735 2350 1736 2351 end 1737 - module RemoveData : sig 1738 - (** Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication. *) 1739 - 2352 + module List : sig 2353 + (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 1740 2354 1741 - type input = unit 2355 + type main = { 2356 + avatar : Atp.Blob_ref.t option; 2357 + created_at : string; 2358 + description : string option; 2359 + description_facets : Richtext.Facet.main list option; 2360 + labels : Com.Atproto.Label.Defs.self_labels option; 2361 + name : string; (** Display name for list; can not be empty. *) 2362 + purpose : Jsont.json; (** Defines the purpose of the list (aka, moderation-oriented or curration-oriented) *) 2363 + } 1742 2364 1743 - (** Jsont codec for {!type:input}. *) 1744 - val input_jsont : input Jsont.t 2365 + (** Jsont codec for {!type:main}. *) 2366 + val main_jsont : main Jsont.t 1745 2367 2368 + end 2369 + module SearchStarterPacks : sig 2370 + (** Find starter packs matching search criteria. Does not require auth. *) 1746 2371 1747 - type output = unit 2372 + (** Query/procedure parameters. *) 2373 + type params = { 2374 + cursor : string option; 2375 + limit : int option; 2376 + q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 2377 + } 1748 2378 1749 - (** Jsont codec for {!type:output}. *) 1750 - val output_jsont : output Jsont.t 2379 + (** Jsont codec for {!type:params}. *) 2380 + val params_jsont : params Jsont.t 1751 2381 1752 - end 1753 - module Defs : sig 1754 2382 1755 - type sync_status = { 1756 - 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. *) 1757 - synced_at : string; (** Last date when contacts where imported. *) 2383 + type output = { 2384 + cursor : string option; 2385 + starter_packs : Jsont.json list; 1758 2386 } 1759 2387 1760 - (** Jsont codec for {!type:sync_status}. *) 1761 - val sync_status_jsont : sync_status Jsont.t 2388 + (** Jsont codec for {!type:output}. *) 2389 + val output_jsont : output Jsont.t 1762 2390 1763 - (** A stash object to be sent via bsync representing a notification to be created. *) 2391 + end 2392 + module GetList : sig 2393 + (** Gets a 'view' (with additional context) of a specified list. *) 1764 2394 1765 - type notification = { 1766 - from : string; (** The DID of who this notification comes from. *) 1767 - to_ : string; (** The DID of who this notification should go to. *) 2395 + (** Query/procedure parameters. *) 2396 + type params = { 2397 + cursor : string option; 2398 + limit : int option; 2399 + list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 1768 2400 } 1769 2401 1770 - (** Jsont codec for {!type:notification}. *) 1771 - val notification_jsont : notification Jsont.t 2402 + (** Jsont codec for {!type:params}. *) 2403 + val params_jsont : params Jsont.t 1772 2404 1773 - (** 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. *) 1774 2405 1775 - type match_and_contact_index = { 1776 - contact_index : int; (** The index of this match in the import contact input. *) 1777 - match_ : Jsont.json; (** Profile of the matched user. *) 2406 + type output = { 2407 + cursor : string option; 2408 + items : Jsont.json list; 2409 + list_ : Jsont.json; 1778 2410 } 1779 2411 1780 - (** Jsont codec for {!type:match_and_contact_index}. *) 1781 - val match_and_contact_index_jsont : match_and_contact_index Jsont.t 2412 + (** Jsont codec for {!type:output}. *) 2413 + val output_jsont : output Jsont.t 1782 2414 1783 2415 end 1784 - module DismissMatch : sig 1785 - (** Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication. *) 2416 + module GetListBlocks : sig 2417 + (** Get mod lists that the requesting account (actor) is blocking. Requires auth. *) 1786 2418 1787 - 1788 - type input = { 1789 - subject : string; (** The subject's DID to dismiss the match with. *) 2419 + (** Query/procedure parameters. *) 2420 + type params = { 2421 + cursor : string option; 2422 + limit : int option; 1790 2423 } 1791 2424 1792 - (** Jsont codec for {!type:input}. *) 1793 - val input_jsont : input Jsont.t 2425 + (** Jsont codec for {!type:params}. *) 2426 + val params_jsont : params Jsont.t 1794 2427 1795 2428 1796 - type output = unit 2429 + type output = { 2430 + cursor : string option; 2431 + lists : Jsont.json list; 2432 + } 1797 2433 1798 2434 (** Jsont codec for {!type:output}. *) 1799 2435 val output_jsont : output Jsont.t 1800 2436 1801 2437 end 1802 - module GetSyncStatus : sig 1803 - (** Gets the user's current contact import status. Requires authentication. *) 2438 + module GetStarterPack : sig 2439 + (** Gets a view of a starter pack. *) 1804 2440 1805 2441 (** Query/procedure parameters. *) 1806 - type params = unit 2442 + type params = { 2443 + starter_pack : string; (** Reference (AT-URI) of the starter pack record. *) 2444 + } 1807 2445 1808 2446 (** Jsont codec for {!type:params}. *) 1809 2447 val params_jsont : params Jsont.t 1810 2448 1811 2449 1812 2450 type output = { 1813 - sync_status : Defs.sync_status option; (** If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since. *) 2451 + starter_pack : Jsont.json; 1814 2452 } 1815 2453 1816 2454 (** Jsont codec for {!type:output}. *) 1817 2455 val output_jsont : output Jsont.t 1818 2456 1819 2457 end 1820 - module ImportContacts : sig 1821 - (** Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication. *) 2458 + module GetListsWithMembership : sig 2459 + (** A list and an optional list item indicating membership of a target user to that list. *) 2460 + 2461 + type list_with_membership = { 2462 + list_ : Jsont.json; 2463 + list_item : Jsont.json option; 2464 + } 1822 2465 2466 + (** Jsont codec for {!type:list_with_membership}. *) 2467 + val list_with_membership_jsont : list_with_membership Jsont.t 1823 2468 1824 - type input = { 1825 - contacts : string list; (** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. *) 1826 - token : string; (** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. *) 2469 + (** Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth. *) 2470 + 2471 + (** Query/procedure parameters. *) 2472 + type params = { 2473 + actor : string; (** The account (actor) to check for membership. *) 2474 + cursor : string option; 2475 + limit : int option; 2476 + purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 1827 2477 } 1828 2478 1829 - (** Jsont codec for {!type:input}. *) 1830 - val input_jsont : input Jsont.t 2479 + (** Jsont codec for {!type:params}. *) 2480 + val params_jsont : params Jsont.t 1831 2481 1832 2482 1833 2483 type output = { 1834 - matches_and_contact_indexes : Defs.match_and_contact_index list; (** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. *) 2484 + cursor : string option; 2485 + lists_with_membership : Jsont.json list; 1835 2486 } 1836 2487 1837 2488 (** Jsont codec for {!type:output}. *) 1838 2489 val output_jsont : output Jsont.t 1839 2490 1840 2491 end 1841 - end 1842 - module Feed : sig 1843 - module Repost : sig 1844 - (** Record representing a 'repost' of an existing Bluesky post. *) 2492 + module GetListMutes : sig 2493 + (** Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. *) 1845 2494 1846 - type main = { 1847 - created_at : string; 1848 - subject : Com.Atproto.Repo.StrongRef.main; 1849 - via : Com.Atproto.Repo.StrongRef.main option; 2495 + (** Query/procedure parameters. *) 2496 + type params = { 2497 + cursor : string option; 2498 + limit : int option; 1850 2499 } 1851 2500 1852 - (** Jsont codec for {!type:main}. *) 1853 - val main_jsont : main Jsont.t 2501 + (** Jsont codec for {!type:params}. *) 2502 + val params_jsont : params Jsont.t 1854 2503 1855 - end 1856 - module DescribeFeedGenerator : sig 1857 2504 1858 - type links = { 1859 - privacy_policy : string option; 1860 - terms_of_service : string option; 2505 + type output = { 2506 + cursor : string option; 2507 + lists : Jsont.json list; 1861 2508 } 1862 2509 1863 - (** Jsont codec for {!type:links}. *) 1864 - val links_jsont : links Jsont.t 2510 + (** Jsont codec for {!type:output}. *) 2511 + val output_jsont : output Jsont.t 1865 2512 2513 + end 2514 + module GetStarterPacks : sig 2515 + (** Get views for a list of starter packs. *) 1866 2516 1867 - type feed = { 1868 - uri : string; 2517 + (** Query/procedure parameters. *) 2518 + type params = { 2519 + uris : string list; 1869 2520 } 1870 2521 1871 - (** Jsont codec for {!type:feed}. *) 1872 - val feed_jsont : feed Jsont.t 1873 - 1874 - (** Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). *) 2522 + (** Jsont codec for {!type:params}. *) 2523 + val params_jsont : params Jsont.t 1875 2524 1876 2525 1877 2526 type output = { 1878 - did : string; 1879 - feeds : Jsont.json list; 1880 - links : Jsont.json option; 2527 + starter_packs : Jsont.json list; 1881 2528 } 1882 2529 1883 2530 (** Jsont codec for {!type:output}. *) 1884 2531 val output_jsont : output Jsont.t 1885 2532 1886 2533 end 1887 - module Threadgate : sig 1888 - (** Allow replies from actors mentioned in your post. *) 2534 + module GetLists : sig 2535 + (** Enumerates the lists created by a specified account (actor). *) 1889 2536 1890 - type mention_rule = unit 2537 + (** Query/procedure parameters. *) 2538 + type params = { 2539 + actor : string; (** The account (actor) to enumerate lists from. *) 2540 + cursor : string option; 2541 + limit : int option; 2542 + purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 2543 + } 1891 2544 1892 - (** Jsont codec for {!type:mention_rule}. *) 1893 - val mention_rule_jsont : mention_rule Jsont.t 2545 + (** Jsont codec for {!type:params}. *) 2546 + val params_jsont : params Jsont.t 1894 2547 1895 - (** Allow replies from actors on a list. *) 1896 2548 1897 - type list_rule = { 1898 - list_ : string; 2549 + type output = { 2550 + cursor : string option; 2551 + lists : Jsont.json list; 1899 2552 } 1900 2553 1901 - (** Jsont codec for {!type:list_rule}. *) 1902 - val list_rule_jsont : list_rule Jsont.t 2554 + (** Jsont codec for {!type:output}. *) 2555 + val output_jsont : output Jsont.t 1903 2556 1904 - (** Allow replies from actors you follow. *) 2557 + end 2558 + end 2559 + module Feed : sig 2560 + module Post : sig 2561 + (** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. *) 1905 2562 1906 - type following_rule = unit 2563 + type text_slice = { 2564 + end_ : int; 2565 + start : int; 2566 + } 1907 2567 1908 - (** Jsont codec for {!type:following_rule}. *) 1909 - val following_rule_jsont : following_rule Jsont.t 2568 + (** Jsont codec for {!type:text_slice}. *) 2569 + val text_slice_jsont : text_slice Jsont.t 1910 2570 1911 - (** Allow replies from actors who follow you. *) 1912 2571 1913 - type follower_rule = unit 2572 + type reply_ref = { 2573 + parent : Com.Atproto.Repo.StrongRef.main; 2574 + root : Com.Atproto.Repo.StrongRef.main; 2575 + } 1914 2576 1915 - (** Jsont codec for {!type:follower_rule}. *) 1916 - val follower_rule_jsont : follower_rule Jsont.t 2577 + (** Jsont codec for {!type:reply_ref}. *) 2578 + val reply_ref_jsont : reply_ref Jsont.t 1917 2579 1918 - (** 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. *) 2580 + (** Deprecated: use facets instead. *) 1919 2581 1920 - type main = { 1921 - 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. *) 1922 - created_at : string; 1923 - hidden_replies : string list option; (** List of hidden reply URIs. *) 1924 - post : string; (** Reference (AT-URI) to the post record. *) 2582 + type entity = { 2583 + index : Jsont.json; 2584 + type_ : string; (** Expected values are 'mention' and 'link'. *) 2585 + value : string; 1925 2586 } 1926 2587 1927 - (** Jsont codec for {!type:main}. *) 1928 - val main_jsont : main Jsont.t 2588 + (** Jsont codec for {!type:entity}. *) 2589 + val entity_jsont : entity Jsont.t 1929 2590 1930 - end 1931 - module Like : sig 1932 - (** Record declaring a 'like' of a piece of subject content. *) 2591 + (** Record containing a Bluesky post. *) 1933 2592 1934 2593 type main = { 1935 - created_at : string; 1936 - subject : Com.Atproto.Repo.StrongRef.main; 1937 - via : Com.Atproto.Repo.StrongRef.main option; 2594 + created_at : string; (** Client-declared timestamp when this post was originally created. *) 2595 + embed : Jsont.json option; 2596 + entities : Jsont.json list option; (** DEPRECATED: replaced by app.bsky.richtext.facet. *) 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. *) 2600 + reply : Jsont.json option; 2601 + tags : string list option; (** Additional hashtags, in addition to any included in post text and facets. *) 2602 + text : string; (** The primary post content. May be an empty string, if there are embeds. *) 1938 2603 } 1939 2604 1940 2605 (** Jsont codec for {!type:main}. *) ··· 1977 2642 val output_jsont : output Jsont.t 1978 2643 1979 2644 end 2645 + module Postgate : sig 2646 + (** Disables embedding of this post. *) 2647 + 2648 + type disable_rule = unit 2649 + 2650 + (** Jsont codec for {!type:disable_rule}. *) 2651 + val disable_rule_jsont : disable_rule Jsont.t 2652 + 2653 + (** Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. *) 2654 + 2655 + type main = { 2656 + created_at : string; 2657 + detached_embedding_uris : string list option; (** List of AT-URIs embedding this post that the author has detached from. *) 2658 + embedding_rules : Jsont.json list option; (** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. *) 2659 + post : string; (** Reference (AT-URI) to the post record. *) 2660 + } 2661 + 2662 + (** Jsont codec for {!type:main}. *) 2663 + val main_jsont : main Jsont.t 2664 + 2665 + end 1980 2666 module GetRepostedBy : sig 1981 2667 (** Get a list of reposts for a given post. *) 1982 2668 ··· 2003 2689 val output_jsont : output Jsont.t 2004 2690 2005 2691 end 2006 - module Generator : sig 2007 - (** Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. *) 2692 + module DescribeFeedGenerator : sig 2693 + 2694 + type links = { 2695 + privacy_policy : string option; 2696 + terms_of_service : string option; 2697 + } 2698 + 2699 + (** Jsont codec for {!type:links}. *) 2700 + val links_jsont : links Jsont.t 2701 + 2702 + 2703 + type feed = { 2704 + uri : string; 2705 + } 2706 + 2707 + (** Jsont codec for {!type:feed}. *) 2708 + val feed_jsont : feed Jsont.t 2709 + 2710 + (** Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View). *) 2008 2711 2009 - type main = { 2010 - accepts_interactions : bool option; (** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions *) 2011 - avatar : Atp.Blob_ref.t option; 2012 - content_mode : string option; 2013 - created_at : string; 2014 - description : string option; 2015 - description_facets : Richtext.Facet.main list option; 2712 + 2713 + type output = { 2016 2714 did : string; 2017 - display_name : string; 2018 - labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values *) 2715 + feeds : Jsont.json list; 2716 + links : Jsont.json option; 2019 2717 } 2020 2718 2021 - (** Jsont codec for {!type:main}. *) 2022 - val main_jsont : main Jsont.t 2719 + (** Jsont codec for {!type:output}. *) 2720 + val output_jsont : output Jsont.t 2023 2721 2024 2722 end 2025 - module Postgate : sig 2026 - (** Disables embedding of this post. *) 2723 + module Threadgate : sig 2724 + (** Allow replies from actors mentioned in your post. *) 2027 2725 2028 - type disable_rule = unit 2726 + type mention_rule = unit 2029 2727 2030 - (** Jsont codec for {!type:disable_rule}. *) 2031 - val disable_rule_jsont : disable_rule Jsont.t 2728 + (** Jsont codec for {!type:mention_rule}. *) 2729 + val mention_rule_jsont : mention_rule Jsont.t 2730 + 2731 + (** Allow replies from actors on a list. *) 2732 + 2733 + type list_rule = { 2734 + list_ : string; 2735 + } 2736 + 2737 + (** Jsont codec for {!type:list_rule}. *) 2738 + val list_rule_jsont : list_rule Jsont.t 2032 2739 2033 - (** Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. *) 2740 + (** Allow replies from actors you follow. *) 2741 + 2742 + type following_rule = unit 2743 + 2744 + (** Jsont codec for {!type:following_rule}. *) 2745 + val following_rule_jsont : following_rule Jsont.t 2746 + 2747 + (** Allow replies from actors who follow you. *) 2748 + 2749 + type follower_rule = unit 2750 + 2751 + (** Jsont codec for {!type:follower_rule}. *) 2752 + val follower_rule_jsont : follower_rule Jsont.t 2753 + 2754 + (** Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. *) 2034 2755 2035 2756 type main = { 2757 + allow : Jsont.json list option; (** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. *) 2036 2758 created_at : string; 2037 - detached_embedding_uris : string list option; (** List of AT-URIs embedding this post that the author has detached from. *) 2038 - 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. *) 2759 + hidden_replies : string list option; (** List of hidden reply URIs. *) 2039 2760 post : string; (** Reference (AT-URI) to the post record. *) 2761 + } 2762 + 2763 + (** Jsont codec for {!type:main}. *) 2764 + val main_jsont : main Jsont.t 2765 + 2766 + end 2767 + module Like : sig 2768 + (** Record declaring a 'like' of a piece of subject content. *) 2769 + 2770 + type main = { 2771 + created_at : string; 2772 + subject : Com.Atproto.Repo.StrongRef.main; 2773 + via : Com.Atproto.Repo.StrongRef.main option; 2040 2774 } 2041 2775 2042 2776 (** Jsont codec for {!type:main}. *) ··· 2314 3048 val feed_view_post_jsont : feed_view_post Jsont.t 2315 3049 2316 3050 end 2317 - module Post : sig 2318 - (** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. *) 2319 - 2320 - type text_slice = { 2321 - end_ : int; 2322 - start : int; 2323 - } 2324 - 2325 - (** Jsont codec for {!type:text_slice}. *) 2326 - val text_slice_jsont : text_slice Jsont.t 2327 - 2328 - 2329 - type reply_ref = { 2330 - parent : Com.Atproto.Repo.StrongRef.main; 2331 - root : Com.Atproto.Repo.StrongRef.main; 2332 - } 2333 - 2334 - (** Jsont codec for {!type:reply_ref}. *) 2335 - val reply_ref_jsont : reply_ref Jsont.t 2336 - 2337 - (** Deprecated: use facets instead. *) 2338 - 2339 - type entity = { 2340 - index : Jsont.json; 2341 - type_ : string; (** Expected values are 'mention' and 'link'. *) 2342 - value : string; 2343 - } 2344 - 2345 - (** Jsont codec for {!type:entity}. *) 2346 - val entity_jsont : entity Jsont.t 2347 - 2348 - (** Record containing a Bluesky post. *) 3051 + module Repost : sig 3052 + (** Record representing a 'repost' of an existing Bluesky post. *) 2349 3053 2350 3054 type main = { 2351 - created_at : string; (** Client-declared timestamp when this post was originally created. *) 2352 - embed : Jsont.json option; 2353 - entities : Jsont.json list option; (** DEPRECATED: replaced by app.bsky.richtext.facet. *) 2354 - facets : Richtext.Facet.main list option; (** Annotations of text (mentions, URLs, hashtags, etc) *) 2355 - labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values for this post. Effectively content warnings. *) 2356 - langs : string list option; (** Indicates human language of post primary text content. *) 2357 - reply : Jsont.json option; 2358 - tags : string list option; (** Additional hashtags, in addition to any included in post text and facets. *) 2359 - text : string; (** The primary post content. May be an empty string, if there are embeds. *) 3055 + created_at : string; 3056 + subject : Com.Atproto.Repo.StrongRef.main; 3057 + via : Com.Atproto.Repo.StrongRef.main option; 2360 3058 } 2361 3059 2362 3060 (** Jsont codec for {!type:main}. *) 2363 3061 val main_jsont : main Jsont.t 2364 3062 2365 3063 end 2366 - module GetPosts : sig 2367 - (** Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. *) 3064 + module Generator : sig 3065 + (** Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository. *) 2368 3066 2369 - (** Query/procedure parameters. *) 2370 - type params = { 2371 - uris : string list; (** List of post AT-URIs to return hydrated views for. *) 3067 + type main = { 3068 + accepts_interactions : bool option; (** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions *) 3069 + avatar : Atp.Blob_ref.t option; 3070 + content_mode : string option; 3071 + created_at : string; 3072 + description : string option; 3073 + description_facets : Richtext.Facet.main list option; 3074 + did : string; 3075 + display_name : string; 3076 + labels : Com.Atproto.Label.Defs.self_labels option; (** Self-label values *) 2372 3077 } 2373 3078 2374 - (** Jsont codec for {!type:params}. *) 2375 - val params_jsont : params Jsont.t 2376 - 2377 - 2378 - type output = { 2379 - posts : Jsont.json list; 2380 - } 2381 - 2382 - (** Jsont codec for {!type:output}. *) 2383 - val output_jsont : output Jsont.t 3079 + (** Jsont codec for {!type:main}. *) 3080 + val main_jsont : main Jsont.t 2384 3081 2385 3082 end 2386 - module GetQuotes : sig 2387 - (** Get a list of quotes for a given post. *) 3083 + module GetPostThread : sig 3084 + (** Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. *) 2388 3085 2389 3086 (** Query/procedure parameters. *) 2390 3087 type params = { 2391 - cid : string option; (** If supplied, filters to quotes of specific version (by CID) of the post record. *) 2392 - cursor : string option; 2393 - limit : int option; 2394 - uri : string; (** Reference (AT-URI) of post record *) 3088 + depth : int option; (** How many levels of reply depth should be included in response. *) 3089 + parent_height : int option; (** How many levels of parent (and grandparent, etc) post to include. *) 3090 + uri : string; (** Reference (AT-URI) to post record. *) 2395 3091 } 2396 3092 2397 3093 (** Jsont codec for {!type:params}. *) ··· 2399 3095 2400 3096 2401 3097 type output = { 2402 - cid : string option; 2403 - cursor : string option; 2404 - posts : Jsont.json list; 2405 - uri : string; 3098 + thread : Jsont.json; 3099 + threadgate : Jsont.json option; 2406 3100 } 2407 3101 2408 3102 (** Jsont codec for {!type:output}. *) 2409 3103 val output_jsont : output Jsont.t 2410 3104 2411 3105 end 2412 - module GetAuthorFeed : sig 2413 - (** Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. *) 3106 + module GetFeed : sig 3107 + (** Get a hydrated feed from an actor's selected feed generator. Implemented by App View. *) 2414 3108 2415 3109 (** Query/procedure parameters. *) 2416 3110 type params = { 2417 - actor : string; 2418 3111 cursor : string option; 2419 - filter : string option; (** Combinations of post/repost types to include in response. *) 2420 - include_pins : bool option; 3112 + feed : string; 2421 3113 limit : int option; 2422 3114 } 2423 3115 ··· 2434 3126 val output_jsont : output Jsont.t 2435 3127 2436 3128 end 2437 - module GetTimeline : sig 2438 - (** Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. *) 3129 + module GetQuotes : sig 3130 + (** Get a list of quotes for a given post. *) 2439 3131 2440 3132 (** Query/procedure parameters. *) 2441 3133 type params = { 2442 - algorithm : string option; (** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. *) 3134 + cid : string option; (** If supplied, filters to quotes of specific version (by CID) of the post record. *) 2443 3135 cursor : string option; 2444 3136 limit : int option; 3137 + uri : string; (** Reference (AT-URI) of post record *) 2445 3138 } 2446 3139 2447 3140 (** Jsont codec for {!type:params}. *) ··· 2449 3142 2450 3143 2451 3144 type output = { 3145 + cid : string option; 2452 3146 cursor : string option; 2453 - feed : Jsont.json list; 3147 + posts : Jsont.json list; 3148 + uri : string; 2454 3149 } 2455 3150 2456 3151 (** Jsont codec for {!type:output}. *) ··· 2480 3175 val output_jsont : output Jsont.t 2481 3176 2482 3177 end 2483 - module GetSuggestedFeeds : sig 2484 - (** Get a list of suggested feeds (feed generators) for the requesting account. *) 2485 - 2486 - (** Query/procedure parameters. *) 2487 - type params = { 2488 - cursor : string option; 2489 - limit : int option; 2490 - } 2491 - 2492 - (** Jsont codec for {!type:params}. *) 2493 - val params_jsont : params Jsont.t 2494 - 2495 - 2496 - type output = { 2497 - cursor : string option; 2498 - feeds : Jsont.json list; 2499 - } 2500 - 2501 - (** Jsont codec for {!type:output}. *) 2502 - val output_jsont : output Jsont.t 2503 - 2504 - end 2505 3178 module GetActorLikes : sig 2506 3179 (** Get a list of posts liked by an actor. Requires auth, actor must be the requesting account. *) 2507 3180 ··· 2525 3198 val output_jsont : output Jsont.t 2526 3199 2527 3200 end 2528 - module GetActorFeeds : sig 2529 - (** Get a list of feeds (feed generator records) created by the actor (in the actor's repo). *) 3201 + module GetFeedSkeleton : sig 3202 + (** Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. *) 2530 3203 2531 3204 (** Query/procedure parameters. *) 2532 3205 type params = { 2533 - actor : string; 2534 3206 cursor : string option; 3207 + feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 2535 3208 limit : int option; 2536 3209 } 2537 3210 ··· 2541 3214 2542 3215 type output = { 2543 3216 cursor : string option; 2544 - feeds : Jsont.json list; 3217 + feed : Jsont.json list; 3218 + req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 2545 3219 } 2546 3220 2547 3221 (** Jsont codec for {!type:output}. *) ··· 2581 3255 val output_jsont : output Jsont.t 2582 3256 2583 3257 end 2584 - module GetPostThread : sig 2585 - (** Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests. *) 2586 - 2587 - (** Query/procedure parameters. *) 2588 - type params = { 2589 - depth : int option; (** How many levels of reply depth should be included in response. *) 2590 - parent_height : int option; (** How many levels of parent (and grandparent, etc) post to include. *) 2591 - uri : string; (** Reference (AT-URI) to post record. *) 2592 - } 2593 - 2594 - (** Jsont codec for {!type:params}. *) 2595 - val params_jsont : params Jsont.t 2596 - 2597 - 2598 - type output = { 2599 - thread : Jsont.json; 2600 - threadgate : Jsont.json option; 2601 - } 2602 - 2603 - (** Jsont codec for {!type:output}. *) 2604 - val output_jsont : output Jsont.t 2605 - 2606 - end 2607 - module GetFeedSkeleton : sig 2608 - (** Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service. *) 2609 - 2610 - (** Query/procedure parameters. *) 2611 - type params = { 2612 - cursor : string option; 2613 - feed : string; (** Reference to feed generator record describing the specific feed being requested. *) 2614 - limit : int option; 2615 - } 2616 - 2617 - (** Jsont codec for {!type:params}. *) 2618 - val params_jsont : params Jsont.t 2619 - 2620 - 2621 - type output = { 2622 - cursor : string option; 2623 - feed : Jsont.json list; 2624 - req_id : string option; (** Unique identifier per request that may be passed back alongside interactions. *) 2625 - } 2626 - 2627 - (** Jsont codec for {!type:output}. *) 2628 - val output_jsont : output Jsont.t 2629 - 2630 - end 2631 - module GetFeed : sig 2632 - (** Get a hydrated feed from an actor's selected feed generator. Implemented by App View. *) 2633 - 2634 - (** Query/procedure parameters. *) 2635 - type params = { 2636 - cursor : string option; 2637 - feed : string; 2638 - limit : int option; 2639 - } 2640 - 2641 - (** Jsont codec for {!type:params}. *) 2642 - val params_jsont : params Jsont.t 2643 - 2644 - 2645 - type output = { 2646 - cursor : string option; 2647 - feed : Jsont.json list; 2648 - } 2649 - 2650 - (** Jsont codec for {!type:output}. *) 2651 - val output_jsont : output Jsont.t 2652 - 2653 - end 2654 3258 module GetFeedGenerators : sig 2655 3259 (** Get information about a list of feed generators. *) 2656 3260 ··· 2689 3293 val output_jsont : output Jsont.t 2690 3294 2691 3295 end 2692 - module GetFeedGenerator : sig 2693 - (** Get information about a feed generator. Implemented by AppView. *) 2694 - 2695 - (** Query/procedure parameters. *) 2696 - type params = { 2697 - feed : string; (** AT-URI of the feed generator record. *) 2698 - } 2699 - 2700 - (** Jsont codec for {!type:params}. *) 2701 - val params_jsont : params Jsont.t 2702 - 2703 - 2704 - type output = { 2705 - is_online : bool; (** Indicates whether the feed generator service has been online recently, or else seems to be inactive. *) 2706 - is_valid : bool; (** Indicates whether the feed generator service is compatible with the record declaration. *) 2707 - view : Jsont.json; 2708 - } 2709 - 2710 - (** Jsont codec for {!type:output}. *) 2711 - val output_jsont : output Jsont.t 2712 - 2713 - end 2714 - end 2715 - module Graph : sig 2716 - module Defs : sig 2717 - 2718 - type starter_pack_view_basic = { 2719 - cid : string; 2720 - creator : Jsont.json; 2721 - indexed_at : string; 2722 - joined_all_time_count : int option; 2723 - joined_week_count : int option; 2724 - labels : Com.Atproto.Label.Defs.label list option; 2725 - list_item_count : int option; 2726 - record : Jsont.json; 2727 - uri : string; 2728 - } 2729 - 2730 - (** Jsont codec for {!type:starter_pack_view_basic}. *) 2731 - val starter_pack_view_basic_jsont : starter_pack_view_basic Jsont.t 2732 - 2733 - (** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) *) 2734 - 2735 - type relationship = { 2736 - blocked_by : string option; (** if the actor is blocked by this DID, contains the AT-URI of the block record *) 2737 - 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 *) 2738 - blocking : string option; (** if the actor blocks this DID, this is the AT-URI of the block record *) 2739 - blocking_by_list : string option; (** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record *) 2740 - did : string; 2741 - followed_by : string option; (** if the actor is followed by this DID, contains the AT-URI of the follow record *) 2742 - following : string option; (** if the actor follows this DID, this is the AT-URI of the follow record *) 2743 - } 2744 - 2745 - (** Jsont codec for {!type:relationship}. *) 2746 - val relationship_jsont : relationship Jsont.t 2747 - 2748 - (** A list of actors used for only for reference purposes such as within a starter pack. *) 2749 - 2750 - type referencelist = string 2751 - val referencelist_jsont : referencelist Jsont.t 2752 - 2753 - (** indicates that a handle or DID could not be resolved *) 2754 - 2755 - type not_found_actor = { 2756 - actor : string; 2757 - not_found : bool; 2758 - } 2759 - 2760 - (** Jsont codec for {!type:not_found_actor}. *) 2761 - val not_found_actor_jsont : not_found_actor Jsont.t 2762 - 2763 - (** A list of actors to apply an aggregate moderation action (mute/block) on. *) 2764 - 2765 - type modlist = string 2766 - val modlist_jsont : modlist Jsont.t 2767 - 2768 - 2769 - type list_viewer_state = { 2770 - blocked : string option; 2771 - muted : bool option; 2772 - } 2773 - 2774 - (** Jsont codec for {!type:list_viewer_state}. *) 2775 - val list_viewer_state_jsont : list_viewer_state Jsont.t 2776 - 2777 - 2778 - type list_purpose = string 2779 - val list_purpose_jsont : list_purpose Jsont.t 2780 - 2781 - 2782 - type list_item_view = { 2783 - subject : Jsont.json; 2784 - uri : string; 2785 - } 2786 - 2787 - (** Jsont codec for {!type:list_item_view}. *) 2788 - val list_item_view_jsont : list_item_view Jsont.t 2789 - 2790 - (** A list of actors used for curation purposes such as list feeds or interaction gating. *) 2791 - 2792 - type curatelist = string 2793 - val curatelist_jsont : curatelist Jsont.t 2794 - 2795 - 2796 - type list_view_basic = { 2797 - avatar : string option; 2798 - cid : string; 2799 - indexed_at : string option; 2800 - labels : Com.Atproto.Label.Defs.label list option; 2801 - list_item_count : int option; 2802 - name : string; 2803 - purpose : Jsont.json; 2804 - uri : string; 2805 - viewer : Jsont.json option; 2806 - } 2807 - 2808 - (** Jsont codec for {!type:list_view_basic}. *) 2809 - val list_view_basic_jsont : list_view_basic Jsont.t 2810 - 2811 - 2812 - type list_view = { 2813 - avatar : string option; 2814 - cid : string; 2815 - creator : Jsont.json; 2816 - description : string option; 2817 - description_facets : Richtext.Facet.main list option; 2818 - indexed_at : string; 2819 - labels : Com.Atproto.Label.Defs.label list option; 2820 - list_item_count : int option; 2821 - name : string; 2822 - purpose : Jsont.json; 2823 - uri : string; 2824 - viewer : Jsont.json option; 2825 - } 2826 - 2827 - (** Jsont codec for {!type:list_view}. *) 2828 - val list_view_jsont : list_view Jsont.t 2829 - 2830 - 2831 - type starter_pack_view = { 2832 - cid : string; 2833 - creator : Jsont.json; 2834 - feeds : Jsont.json list option; 2835 - indexed_at : string; 2836 - joined_all_time_count : int option; 2837 - joined_week_count : int option; 2838 - labels : Com.Atproto.Label.Defs.label list option; 2839 - list_ : Jsont.json option; 2840 - list_items_sample : Jsont.json list option; 2841 - record : Jsont.json; 2842 - uri : string; 2843 - } 2844 - 2845 - (** Jsont codec for {!type:starter_pack_view}. *) 2846 - val starter_pack_view_jsont : starter_pack_view Jsont.t 2847 - 2848 - end 2849 - module UnmuteActor : sig 2850 - (** Unmutes the specified account. Requires auth. *) 2851 - 2852 - 2853 - type input = { 2854 - actor : string; 2855 - } 2856 - 2857 - (** Jsont codec for {!type:input}. *) 2858 - val input_jsont : input Jsont.t 2859 - 2860 - end 2861 - module Listitem : sig 2862 - (** Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records. *) 2863 - 2864 - type main = { 2865 - created_at : string; 2866 - list_ : string; (** Reference (AT-URI) to the list record (app.bsky.graph.list). *) 2867 - subject : string; (** The account which is included on the list. *) 2868 - } 2869 - 2870 - (** Jsont codec for {!type:main}. *) 2871 - val main_jsont : main Jsont.t 2872 - 2873 - end 2874 - module GetSuggestedFollowsByActor : sig 2875 - (** Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account. *) 2876 - 2877 - (** Query/procedure parameters. *) 2878 - type params = { 2879 - actor : string; 2880 - } 2881 - 2882 - (** Jsont codec for {!type:params}. *) 2883 - val params_jsont : params Jsont.t 2884 - 2885 - 2886 - type output = { 2887 - is_fallback : bool option; (** If true, response has fallen-back to generic results, and is not scoped using relativeToDid *) 2888 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 2889 - suggestions : Jsont.json list; 2890 - } 2891 - 2892 - (** Jsont codec for {!type:output}. *) 2893 - val output_jsont : output Jsont.t 2894 - 2895 - end 2896 - module MuteActorList : sig 2897 - (** Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth. *) 2898 - 2899 - 2900 - type input = { 2901 - list_ : string; 2902 - } 2903 - 2904 - (** Jsont codec for {!type:input}. *) 2905 - val input_jsont : input Jsont.t 2906 - 2907 - end 2908 - module GetFollowers : sig 2909 - (** Enumerates accounts which follow a specified account (actor). *) 3296 + module GetAuthorFeed : sig 3297 + (** Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth. *) 2910 3298 2911 3299 (** Query/procedure parameters. *) 2912 3300 type params = { 2913 3301 actor : string; 2914 3302 cursor : string option; 3303 + filter : string option; (** Combinations of post/repost types to include in response. *) 3304 + include_pins : bool option; 2915 3305 limit : int option; 2916 3306 } 2917 3307 ··· 2921 3311 2922 3312 type output = { 2923 3313 cursor : string option; 2924 - followers : Jsont.json list; 2925 - subject : Jsont.json; 3314 + feed : Jsont.json list; 2926 3315 } 2927 3316 2928 3317 (** Jsont codec for {!type:output}. *) 2929 3318 val output_jsont : output Jsont.t 2930 3319 2931 3320 end 2932 - module MuteActor : sig 2933 - (** Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth. *) 2934 - 2935 - 2936 - type input = { 2937 - actor : string; 2938 - } 2939 - 2940 - (** Jsont codec for {!type:input}. *) 2941 - val input_jsont : input Jsont.t 2942 - 2943 - end 2944 - module UnmuteActorList : sig 2945 - (** Unmutes the specified list of accounts. Requires auth. *) 2946 - 2947 - 2948 - type input = { 2949 - list_ : string; 2950 - } 2951 - 2952 - (** Jsont codec for {!type:input}. *) 2953 - val input_jsont : input Jsont.t 2954 - 2955 - end 2956 - module GetBlocks : sig 2957 - (** Enumerates which accounts the requesting account is currently blocking. Requires auth. *) 3321 + module GetFeedGenerator : sig 3322 + (** Get information about a feed generator. Implemented by AppView. *) 2958 3323 2959 3324 (** Query/procedure parameters. *) 2960 3325 type params = { 2961 - cursor : string option; 2962 - limit : int option; 2963 - } 2964 - 2965 - (** Jsont codec for {!type:params}. *) 2966 - val params_jsont : params Jsont.t 2967 - 2968 - 2969 - type output = { 2970 - blocks : Jsont.json list; 2971 - cursor : string option; 2972 - } 2973 - 2974 - (** Jsont codec for {!type:output}. *) 2975 - val output_jsont : output Jsont.t 2976 - 2977 - end 2978 - module Listblock : sig 2979 - (** Record representing a block relationship against an entire an entire list of accounts (actors). *) 2980 - 2981 - type main = { 2982 - created_at : string; 2983 - subject : string; (** Reference (AT-URI) to the mod list record. *) 2984 - } 2985 - 2986 - (** Jsont codec for {!type:main}. *) 2987 - val main_jsont : main Jsont.t 2988 - 2989 - end 2990 - module MuteThread : sig 2991 - (** Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth. *) 2992 - 2993 - 2994 - type input = { 2995 - root : string; 2996 - } 2997 - 2998 - (** Jsont codec for {!type:input}. *) 2999 - val input_jsont : input Jsont.t 3000 - 3001 - end 3002 - module Follow : sig 3003 - (** Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView. *) 3004 - 3005 - type main = { 3006 - created_at : string; 3007 - subject : string; 3008 - via : Com.Atproto.Repo.StrongRef.main option; 3009 - } 3010 - 3011 - (** Jsont codec for {!type:main}. *) 3012 - val main_jsont : main Jsont.t 3013 - 3014 - end 3015 - module Starterpack : sig 3016 - 3017 - type feed_item = { 3018 - uri : string; 3019 - } 3020 - 3021 - (** Jsont codec for {!type:feed_item}. *) 3022 - val feed_item_jsont : feed_item Jsont.t 3023 - 3024 - (** Record defining a starter pack of actors and feeds for new users. *) 3025 - 3026 - type main = { 3027 - created_at : string; 3028 - description : string option; 3029 - description_facets : Richtext.Facet.main list option; 3030 - feeds : Jsont.json list option; 3031 - list_ : string; (** Reference (AT-URI) to the list record. *) 3032 - name : string; (** Display name for starter pack; can not be empty. *) 3033 - } 3034 - 3035 - (** Jsont codec for {!type:main}. *) 3036 - val main_jsont : main Jsont.t 3037 - 3038 - end 3039 - module GetFollows : sig 3040 - (** Enumerates accounts which a specified account (actor) follows. *) 3041 - 3042 - (** Query/procedure parameters. *) 3043 - type params = { 3044 - actor : string; 3045 - cursor : string option; 3046 - limit : int option; 3326 + feed : string; (** AT-URI of the feed generator record. *) 3047 3327 } 3048 3328 3049 3329 (** Jsont codec for {!type:params}. *) ··· 3051 3331 3052 3332 3053 3333 type output = { 3054 - cursor : string option; 3055 - follows : Jsont.json list; 3056 - subject : Jsont.json; 3334 + is_online : bool; (** Indicates whether the feed generator service has been online recently, or else seems to be inactive. *) 3335 + is_valid : bool; (** Indicates whether the feed generator service is compatible with the record declaration. *) 3336 + view : Jsont.json; 3057 3337 } 3058 3338 3059 3339 (** Jsont codec for {!type:output}. *) 3060 3340 val output_jsont : output Jsont.t 3061 3341 3062 3342 end 3063 - module Verification : sig 3064 - (** 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. *) 3065 - 3066 - type main = { 3067 - created_at : string; (** Date of when the verification was created. *) 3068 - 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. *) 3069 - 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. *) 3070 - subject : string; (** DID of the subject the verification applies to. *) 3071 - } 3072 - 3073 - (** Jsont codec for {!type:main}. *) 3074 - val main_jsont : main Jsont.t 3075 - 3076 - end 3077 - module UnmuteThread : sig 3078 - (** Unmutes the specified thread. Requires auth. *) 3079 - 3080 - 3081 - type input = { 3082 - root : string; 3083 - } 3084 - 3085 - (** Jsont codec for {!type:input}. *) 3086 - val input_jsont : input Jsont.t 3087 - 3088 - end 3089 - module GetMutes : sig 3090 - (** Enumerates accounts that the requesting account (actor) currently has muted. Requires auth. *) 3343 + module GetSuggestedFeeds : sig 3344 + (** Get a list of suggested feeds (feed generators) for the requesting account. *) 3091 3345 3092 3346 (** Query/procedure parameters. *) 3093 3347 type params = { ··· 3101 3355 3102 3356 type output = { 3103 3357 cursor : string option; 3104 - mutes : Jsont.json list; 3358 + feeds : Jsont.json list; 3105 3359 } 3106 3360 3107 3361 (** Jsont codec for {!type:output}. *) 3108 3362 val output_jsont : output Jsont.t 3109 3363 3110 3364 end 3111 - module GetKnownFollowers : sig 3112 - (** Enumerates accounts which follow a specified account (actor) and are followed by the viewer. *) 3365 + module GetActorFeeds : sig 3366 + (** Get a list of feeds (feed generator records) created by the actor (in the actor's repo). *) 3113 3367 3114 3368 (** Query/procedure parameters. *) 3115 3369 type params = { ··· 3124 3378 3125 3379 type output = { 3126 3380 cursor : string option; 3127 - followers : Jsont.json list; 3128 - subject : Jsont.json; 3381 + feeds : Jsont.json list; 3129 3382 } 3130 3383 3131 3384 (** Jsont codec for {!type:output}. *) 3132 3385 val output_jsont : output Jsont.t 3133 3386 3134 3387 end 3135 - module Block : sig 3136 - (** Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details. *) 3137 - 3138 - type main = { 3139 - created_at : string; 3140 - subject : string; (** DID of the account to be blocked. *) 3141 - } 3142 - 3143 - (** Jsont codec for {!type:main}. *) 3144 - val main_jsont : main Jsont.t 3145 - 3146 - end 3147 - module GetRelationships : sig 3148 - (** Enumerates public relationships between one account, and a list of other accounts. Does not require auth. *) 3388 + module GetPosts : sig 3389 + (** Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'. *) 3149 3390 3150 3391 (** Query/procedure parameters. *) 3151 3392 type params = { 3152 - actor : string; (** Primary account requesting relationships for. *) 3153 - others : string list option; (** List of 'other' accounts to be related back to the primary. *) 3393 + uris : string list; (** List of post AT-URIs to return hydrated views for. *) 3154 3394 } 3155 3395 3156 3396 (** Jsont codec for {!type:params}. *) ··· 3158 3398 3159 3399 3160 3400 type output = { 3161 - actor : string option; 3162 - relationships : Jsont.json list; 3401 + posts : Jsont.json list; 3163 3402 } 3164 3403 3165 3404 (** Jsont codec for {!type:output}. *) 3166 3405 val output_jsont : output Jsont.t 3167 3406 3168 3407 end 3169 - module GetListsWithMembership : sig 3170 - (** A list and an optional list item indicating membership of a target user to that list. *) 3171 - 3172 - type list_with_membership = { 3173 - list_ : Jsont.json; 3174 - list_item : Jsont.json option; 3175 - } 3176 - 3177 - (** Jsont codec for {!type:list_with_membership}. *) 3178 - val list_with_membership_jsont : list_with_membership Jsont.t 3179 - 3180 - (** Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth. *) 3408 + module GetTimeline : sig 3409 + (** Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed. *) 3181 3410 3182 3411 (** Query/procedure parameters. *) 3183 3412 type params = { 3184 - actor : string; (** The account (actor) to check for membership. *) 3413 + algorithm : string option; (** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. *) 3185 3414 cursor : string option; 3186 3415 limit : int option; 3187 - purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 3188 3416 } 3189 3417 3190 3418 (** Jsont codec for {!type:params}. *) ··· 3193 3421 3194 3422 type output = { 3195 3423 cursor : string option; 3196 - lists_with_membership : Jsont.json list; 3424 + feed : Jsont.json list; 3197 3425 } 3198 3426 3199 3427 (** Jsont codec for {!type:output}. *) 3200 3428 val output_jsont : output Jsont.t 3201 3429 3202 3430 end 3203 - module GetListMutes : sig 3204 - (** Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth. *) 3431 + end 3432 + module Bookmark : sig 3433 + module DeleteBookmark : sig 3434 + (** Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 3205 3435 3206 - (** Query/procedure parameters. *) 3207 - type params = { 3208 - cursor : string option; 3209 - limit : int option; 3210 - } 3211 - 3212 - (** Jsont codec for {!type:params}. *) 3213 - val params_jsont : params Jsont.t 3214 3436 3215 - 3216 - type output = { 3217 - cursor : string option; 3218 - lists : Jsont.json list; 3437 + type input = { 3438 + uri : string; 3219 3439 } 3220 3440 3221 - (** Jsont codec for {!type:output}. *) 3222 - val output_jsont : output Jsont.t 3441 + (** Jsont codec for {!type:input}. *) 3442 + val input_jsont : input Jsont.t 3223 3443 3224 3444 end 3225 - module GetActorStarterPacks : sig 3226 - (** Get a list of starter packs created by the actor. *) 3227 - 3228 - (** Query/procedure parameters. *) 3229 - type params = { 3230 - actor : string; 3231 - cursor : string option; 3232 - limit : int option; 3233 - } 3445 + module CreateBookmark : sig 3446 + (** Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 3234 3447 3235 - (** Jsont codec for {!type:params}. *) 3236 - val params_jsont : params Jsont.t 3237 3448 3238 - 3239 - type output = { 3240 - cursor : string option; 3241 - starter_packs : Jsont.json list; 3449 + type input = { 3450 + cid : string; 3451 + uri : string; 3242 3452 } 3243 3453 3244 - (** Jsont codec for {!type:output}. *) 3245 - val output_jsont : output Jsont.t 3454 + (** Jsont codec for {!type:input}. *) 3455 + val input_jsont : input Jsont.t 3246 3456 3247 3457 end 3248 - module SearchStarterPacks : sig 3249 - (** Find starter packs matching search criteria. Does not require auth. *) 3458 + module Defs : sig 3250 3459 3251 - (** Query/procedure parameters. *) 3252 - type params = { 3253 - cursor : string option; 3254 - limit : int option; 3255 - q : string; (** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 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. *) 3256 3464 } 3257 3465 3258 - (** Jsont codec for {!type:params}. *) 3259 - val params_jsont : params Jsont.t 3466 + (** Jsont codec for {!type:bookmark_view}. *) 3467 + val bookmark_view_jsont : bookmark_view Jsont.t 3260 3468 3469 + (** Object used to store bookmark data in stash. *) 3261 3470 3262 - type output = { 3263 - cursor : string option; 3264 - starter_packs : Jsont.json list; 3471 + type bookmark = { 3472 + subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. *) 3265 3473 } 3266 3474 3267 - (** Jsont codec for {!type:output}. *) 3268 - val output_jsont : output Jsont.t 3475 + (** Jsont codec for {!type:bookmark}. *) 3476 + val bookmark_jsont : bookmark Jsont.t 3269 3477 3270 3478 end 3271 - module GetStarterPacksWithMembership : sig 3272 - (** A starter pack and an optional list item indicating membership of a target user to that starter pack. *) 3273 - 3274 - type starter_pack_with_membership = { 3275 - list_item : Jsont.json option; 3276 - starter_pack : Jsont.json; 3277 - } 3278 - 3279 - (** Jsont codec for {!type:starter_pack_with_membership}. *) 3280 - val starter_pack_with_membership_jsont : starter_pack_with_membership Jsont.t 3281 - 3282 - (** Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth. *) 3479 + module GetBookmarks : sig 3480 + (** Gets views of records bookmarked by the authenticated user. Requires authentication. *) 3283 3481 3284 3482 (** Query/procedure parameters. *) 3285 3483 type params = { 3286 - actor : string; (** The account (actor) to check for membership. *) 3287 3484 cursor : string option; 3288 3485 limit : int option; 3289 3486 } ··· 3293 3490 3294 3491 3295 3492 type output = { 3493 + bookmarks : Defs.bookmark_view list; 3296 3494 cursor : string option; 3297 - starter_packs_with_membership : Jsont.json list; 3298 3495 } 3299 3496 3300 3497 (** Jsont codec for {!type:output}. *) 3301 3498 val output_jsont : output Jsont.t 3302 3499 3303 3500 end 3304 - module GetLists : sig 3305 - (** Enumerates the lists created by a specified account (actor). *) 3501 + end 3502 + module Unspecced : sig 3503 + module GetSuggestedUsersSkeleton : sig 3504 + (** Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers *) 3306 3505 3307 3506 (** Query/procedure parameters. *) 3308 3507 type params = { 3309 - actor : string; (** The account (actor) to enumerate lists from. *) 3310 - cursor : string option; 3508 + category : string option; (** Category of users to get suggestions for. *) 3311 3509 limit : int option; 3312 - purposes : string list option; (** Optional filter by list purpose. If not specified, all supported types are returned. *) 3313 - } 3314 - 3315 - (** Jsont codec for {!type:params}. *) 3316 - val params_jsont : params Jsont.t 3317 - 3318 - 3319 - type output = { 3320 - cursor : string option; 3321 - lists : Jsont.json list; 3322 - } 3323 - 3324 - (** Jsont codec for {!type:output}. *) 3325 - val output_jsont : output Jsont.t 3326 - 3327 - end 3328 - module GetStarterPack : sig 3329 - (** Gets a view of a starter pack. *) 3330 - 3331 - (** Query/procedure parameters. *) 3332 - type params = { 3333 - starter_pack : string; (** Reference (AT-URI) of the starter pack record. *) 3510 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3334 3511 } 3335 3512 3336 3513 (** Jsont codec for {!type:params}. *) ··· 3338 3515 3339 3516 3340 3517 type output = { 3341 - starter_pack : Jsont.json; 3518 + dids : string list; 3519 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3342 3520 } 3343 3521 3344 3522 (** Jsont codec for {!type:output}. *) 3345 3523 val output_jsont : output Jsont.t 3346 3524 3347 3525 end 3348 - module GetListBlocks : sig 3349 - (** Get mod lists that the requesting account (actor) is blocking. Requires auth. *) 3526 + module GetOnboardingSuggestedStarterPacks : sig 3527 + (** Get a list of suggested starterpacks for onboarding *) 3350 3528 3351 3529 (** Query/procedure parameters. *) 3352 3530 type params = { 3353 - cursor : string option; 3354 3531 limit : int option; 3355 3532 } 3356 3533 ··· 3359 3536 3360 3537 3361 3538 type output = { 3362 - cursor : string option; 3363 - lists : Jsont.json list; 3364 - } 3365 - 3366 - (** Jsont codec for {!type:output}. *) 3367 - val output_jsont : output Jsont.t 3368 - 3369 - end 3370 - module GetStarterPacks : sig 3371 - (** Get views for a list of starter packs. *) 3372 - 3373 - (** Query/procedure parameters. *) 3374 - type params = { 3375 - uris : string list; 3376 - } 3377 - 3378 - (** Jsont codec for {!type:params}. *) 3379 - val params_jsont : params Jsont.t 3380 - 3381 - 3382 - type output = { 3383 3539 starter_packs : Jsont.json list; 3384 3540 } 3385 3541 ··· 3387 3543 val output_jsont : output Jsont.t 3388 3544 3389 3545 end 3390 - module GetList : sig 3391 - (** Gets a 'view' (with additional context) of a specified list. *) 3546 + module GetPopularFeedGenerators : sig 3547 + (** An unspecced view of globally popular feed generators. *) 3392 3548 3393 3549 (** Query/procedure parameters. *) 3394 3550 type params = { 3395 3551 cursor : string option; 3396 3552 limit : int option; 3397 - list_ : string; (** Reference (AT-URI) of the list record to hydrate. *) 3553 + query : string option; 3398 3554 } 3399 3555 3400 3556 (** Jsont codec for {!type:params}. *) ··· 3403 3559 3404 3560 type output = { 3405 3561 cursor : string option; 3406 - items : Jsont.json list; 3407 - list_ : Jsont.json; 3562 + feeds : Jsont.json list; 3408 3563 } 3409 3564 3410 3565 (** Jsont codec for {!type:output}. *) 3411 3566 val output_jsont : output Jsont.t 3412 3567 3413 3568 end 3414 - module List : sig 3415 - (** Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists. *) 3416 - 3417 - type main = { 3418 - avatar : Atp.Blob_ref.t option; 3419 - created_at : string; 3420 - description : string option; 3421 - description_facets : Richtext.Facet.main list option; 3422 - labels : Com.Atproto.Label.Defs.self_labels option; 3423 - name : string; (** Display name for list; can not be empty. *) 3424 - purpose : Jsont.json; (** Defines the purpose of the list (aka, moderation-oriented or curration-oriented) *) 3425 - } 3426 - 3427 - (** Jsont codec for {!type:main}. *) 3428 - val main_jsont : main Jsont.t 3429 - 3430 - end 3431 - end 3432 - module Bookmark : sig 3433 - module Defs : sig 3434 - 3435 - type bookmark_view = { 3436 - created_at : string option; 3437 - item : Jsont.json; 3438 - subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the bookmarked record. *) 3439 - } 3440 - 3441 - (** Jsont codec for {!type:bookmark_view}. *) 3442 - val bookmark_view_jsont : bookmark_view Jsont.t 3443 - 3444 - (** Object used to store bookmark data in stash. *) 3445 - 3446 - type bookmark = { 3447 - subject : Com.Atproto.Repo.StrongRef.main; (** A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported. *) 3448 - } 3449 - 3450 - (** Jsont codec for {!type:bookmark}. *) 3451 - val bookmark_jsont : bookmark Jsont.t 3452 - 3453 - end 3454 - module CreateBookmark : sig 3455 - (** Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 3456 - 3457 - 3458 - type input = { 3459 - cid : string; 3460 - uri : string; 3461 - } 3462 - 3463 - (** Jsont codec for {!type:input}. *) 3464 - val input_jsont : input Jsont.t 3465 - 3466 - end 3467 - module DeleteBookmark : sig 3468 - (** Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication. *) 3469 - 3470 - 3471 - type input = { 3472 - uri : string; 3473 - } 3474 - 3475 - (** Jsont codec for {!type:input}. *) 3476 - val input_jsont : input Jsont.t 3477 - 3478 - end 3479 - module GetBookmarks : sig 3480 - (** Gets views of records bookmarked by the authenticated user. Requires authentication. *) 3569 + module GetSuggestedStarterPacksSkeleton : sig 3570 + (** Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks *) 3481 3571 3482 3572 (** Query/procedure parameters. *) 3483 3573 type params = { 3484 - cursor : string option; 3485 3574 limit : int option; 3575 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3486 3576 } 3487 3577 3488 3578 (** Jsont codec for {!type:params}. *) ··· 3490 3580 3491 3581 3492 3582 type output = { 3493 - bookmarks : Defs.bookmark_view list; 3494 - cursor : string option; 3583 + starter_packs : string list; 3495 3584 } 3496 3585 3497 3586 (** Jsont codec for {!type:output}. *) 3498 3587 val output_jsont : output Jsont.t 3499 3588 3500 3589 end 3501 - end 3502 - module Unspecced : sig 3503 3590 module GetSuggestedFeeds : sig 3504 3591 (** Get a list of suggested feeds *) 3505 3592 ··· 3520 3607 val output_jsont : output Jsont.t 3521 3608 3522 3609 end 3523 - module GetSuggestedUsers : sig 3524 - (** Get a list of suggested users *) 3610 + module GetSuggestedFeedsSkeleton : sig 3611 + (** Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds *) 3525 3612 3526 3613 (** Query/procedure parameters. *) 3527 3614 type params = { 3528 - category : string option; (** Category of users to get suggestions for. *) 3529 3615 limit : int option; 3616 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3530 3617 } 3531 3618 3532 3619 (** Jsont codec for {!type:params}. *) ··· 3534 3621 3535 3622 3536 3623 type output = { 3537 - actors : Jsont.json list; 3538 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3624 + feeds : string list; 3539 3625 } 3540 3626 3541 3627 (** Jsont codec for {!type:output}. *) 3542 3628 val output_jsont : output Jsont.t 3543 3629 3544 3630 end 3545 - module GetSuggestedUsersSkeleton : sig 3546 - (** Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers *) 3631 + module GetConfig : sig 3547 3632 3548 - (** Query/procedure parameters. *) 3549 - type params = { 3550 - category : string option; (** Category of users to get suggestions for. *) 3551 - limit : int option; 3552 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3633 + type live_now_config = { 3634 + did : string; 3635 + domains : string list; 3553 3636 } 3554 3637 3555 - (** Jsont codec for {!type:params}. *) 3556 - val params_jsont : params Jsont.t 3638 + (** Jsont codec for {!type:live_now_config}. *) 3639 + val live_now_config_jsont : live_now_config Jsont.t 3640 + 3641 + (** Get miscellaneous runtime configuration. *) 3557 3642 3558 3643 3559 3644 type output = { 3560 - dids : string list; 3561 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3645 + check_email_confirmed : bool option; 3646 + live_now : live_now_config list option; 3562 3647 } 3563 3648 3564 3649 (** Jsont codec for {!type:output}. *) ··· 3585 3670 val output_jsont : output Jsont.t 3586 3671 3587 3672 end 3588 - module GetOnboardingSuggestedStarterPacksSkeleton : sig 3589 - (** Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks *) 3673 + module GetSuggestedUsers : sig 3674 + (** Get a list of suggested users *) 3590 3675 3591 3676 (** Query/procedure parameters. *) 3592 3677 type params = { 3678 + category : string option; (** Category of users to get suggestions for. *) 3593 3679 limit : int option; 3594 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3595 3680 } 3596 3681 3597 3682 (** Jsont codec for {!type:params}. *) ··· 3599 3684 3600 3685 3601 3686 type output = { 3602 - starter_packs : string list; 3687 + actors : Jsont.json list; 3688 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3603 3689 } 3604 3690 3605 3691 (** Jsont codec for {!type:output}. *) 3606 3692 val output_jsont : output Jsont.t 3607 3693 3608 3694 end 3609 - module GetSuggestedFeedsSkeleton : sig 3610 - (** Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds *) 3695 + module GetOnboardingSuggestedStarterPacksSkeleton : sig 3696 + (** Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks *) 3611 3697 3612 3698 (** Query/procedure parameters. *) 3613 3699 type params = { ··· 3620 3706 3621 3707 3622 3708 type output = { 3623 - feeds : string list; 3624 - } 3625 - 3626 - (** Jsont codec for {!type:output}. *) 3627 - val output_jsont : output Jsont.t 3628 - 3629 - end 3630 - module GetOnboardingSuggestedStarterPacks : sig 3631 - (** Get a list of suggested starterpacks for onboarding *) 3632 - 3633 - (** Query/procedure parameters. *) 3634 - type params = { 3635 - limit : int option; 3636 - } 3637 - 3638 - (** Jsont codec for {!type:params}. *) 3639 - val params_jsont : params Jsont.t 3640 - 3641 - 3642 - type output = { 3643 - starter_packs : Jsont.json list; 3709 + starter_packs : string list; 3644 3710 } 3645 3711 3646 3712 (** Jsont codec for {!type:output}. *) ··· 3773 3839 val age_assurance_event_jsont : age_assurance_event Jsont.t 3774 3840 3775 3841 end 3776 - module GetConfig : sig 3842 + module GetTaggedSuggestions : sig 3777 3843 3778 - type live_now_config = { 3779 - did : string; 3780 - domains : string list; 3844 + type suggestion = { 3845 + subject : string; 3846 + subject_type : string; 3847 + tag : string; 3781 3848 } 3782 3849 3783 - (** Jsont codec for {!type:live_now_config}. *) 3784 - val live_now_config_jsont : live_now_config Jsont.t 3850 + (** Jsont codec for {!type:suggestion}. *) 3851 + val suggestion_jsont : suggestion Jsont.t 3852 + 3853 + (** Get a list of suggestions (feeds and users) tagged with categories *) 3785 3854 3786 - (** Get miscellaneous runtime configuration. *) 3855 + (** Query/procedure parameters. *) 3856 + type params = unit 3857 + 3858 + (** Jsont codec for {!type:params}. *) 3859 + val params_jsont : params Jsont.t 3787 3860 3788 3861 3789 3862 type output = { 3790 - check_email_confirmed : bool option; 3791 - live_now : live_now_config list option; 3863 + suggestions : suggestion list; 3792 3864 } 3793 3865 3794 3866 (** Jsont codec for {!type:output}. *) 3795 3867 val output_jsont : output Jsont.t 3796 3868 3797 3869 end 3798 - module GetPopularFeedGenerators : sig 3799 - (** An unspecced view of globally popular feed generators. *) 3870 + module SearchPostsSkeleton : sig 3871 + (** Backend Posts search, returns only skeleton *) 3800 3872 3801 3873 (** Query/procedure parameters. *) 3802 3874 type params = { 3803 - cursor : string option; 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. *) 3804 3879 limit : int option; 3805 - query : string 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. *) 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). *) 3883 + sort : string option; (** Specifies the ranking order of results. *) 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 + 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). *) 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. *) 3887 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. *) 3806 3888 } 3807 3889 3808 3890 (** Jsont codec for {!type:params}. *) ··· 3811 3893 3812 3894 type output = { 3813 3895 cursor : string option; 3814 - feeds : Jsont.json list; 3896 + hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 3897 + posts : Defs.skeleton_search_post list; 3815 3898 } 3816 3899 3817 3900 (** Jsont codec for {!type:output}. *) 3818 3901 val output_jsont : output Jsont.t 3819 3902 3820 3903 end 3821 - module GetTaggedSuggestions : sig 3904 + module GetPostThreadV2 : sig 3822 3905 3823 - type suggestion = { 3824 - subject : string; 3825 - subject_type : string; 3826 - tag : string; 3906 + type thread_item = { 3907 + depth : int; (** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. *) 3908 + uri : string; 3909 + value : Jsont.json; 3827 3910 } 3828 3911 3829 - (** Jsont codec for {!type:suggestion}. *) 3830 - val suggestion_jsont : suggestion Jsont.t 3912 + (** Jsont codec for {!type:thread_item}. *) 3913 + val thread_item_jsont : thread_item Jsont.t 3831 3914 3832 - (** Get a list of suggestions (feeds and users) tagged with categories *) 3915 + (** (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. *) 3833 3916 3834 3917 (** Query/procedure parameters. *) 3835 - type params = unit 3918 + type params = { 3919 + above : bool option; (** Whether to include parents above the anchor. *) 3920 + anchor : string; (** Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post. *) 3921 + below : int option; (** How many levels of replies to include below the anchor. *) 3922 + branching_factor : int option; (** Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). *) 3923 + sort : string option; (** Sorting for the thread replies. *) 3924 + } 3836 3925 3837 3926 (** Jsont codec for {!type:params}. *) 3838 3927 val params_jsont : params Jsont.t 3839 3928 3840 3929 3841 3930 type output = { 3842 - suggestions : suggestion list; 3931 + has_other_replies : bool; (** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. *) 3932 + thread : thread_item list; (** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. *) 3933 + threadgate : Jsont.json option; 3843 3934 } 3844 3935 3845 3936 (** Jsont codec for {!type:output}. *) 3846 3937 val output_jsont : output Jsont.t 3847 3938 3848 3939 end 3849 - module GetSuggestedStarterPacksSkeleton : sig 3850 - (** Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks *) 3940 + module GetTrendingTopics : sig 3941 + (** Get a list of trending topics *) 3851 3942 3852 3943 (** Query/procedure parameters. *) 3853 3944 type params = { 3854 3945 limit : int option; 3855 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3946 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3856 3947 } 3857 3948 3858 3949 (** Jsont codec for {!type:params}. *) ··· 3860 3951 3861 3952 3862 3953 type output = { 3863 - starter_packs : string list; 3954 + suggested : Defs.trending_topic list; 3955 + topics : Defs.trending_topic list; 3864 3956 } 3865 3957 3866 3958 (** Jsont codec for {!type:output}. *) 3867 3959 val output_jsont : output Jsont.t 3868 3960 3869 3961 end 3870 - module InitAgeAssurance : sig 3871 - (** Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. *) 3872 - 3873 - 3874 - type input = { 3875 - country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 3876 - email : string; (** The user's email address to receive assurance instructions. *) 3877 - language : string; (** The user's preferred language for communication during the assurance process. *) 3878 - } 3879 - 3880 - (** Jsont codec for {!type:input}. *) 3881 - val input_jsont : input Jsont.t 3882 - 3883 - 3884 - type output = Defs.age_assurance_state 3885 - 3886 - (** Jsont codec for {!type:output}. *) 3887 - val output_jsont : output Jsont.t 3888 - 3889 - end 3890 - module GetTrendingTopics : sig 3891 - (** Get a list of trending topics *) 3962 + module GetTrendsSkeleton : sig 3963 + (** Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends *) 3892 3964 3893 3965 (** Query/procedure parameters. *) 3894 3966 type params = { 3895 3967 limit : int option; 3896 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3968 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 3897 3969 } 3898 3970 3899 3971 (** Jsont codec for {!type:params}. *) ··· 3901 3973 3902 3974 3903 3975 type output = { 3904 - suggested : Defs.trending_topic list; 3905 - topics : Defs.trending_topic list; 3976 + trends : Defs.skeleton_trend list; 3906 3977 } 3907 3978 3908 3979 (** Jsont codec for {!type:output}. *) ··· 3939 4010 val output_jsont : output Jsont.t 3940 4011 3941 4012 end 3942 - module GetSuggestionsSkeleton : sig 3943 - (** Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions *) 4013 + module InitAgeAssurance : sig 4014 + (** Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age. *) 3944 4015 3945 - (** Query/procedure parameters. *) 3946 - type params = { 3947 - cursor : string option; 3948 - limit : int option; 3949 - relative_to_did : string option; (** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. *) 3950 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 3951 - } 3952 4016 3953 - (** Jsont codec for {!type:params}. *) 3954 - val params_jsont : params Jsont.t 3955 - 3956 - 3957 - type output = { 3958 - actors : Defs.skeleton_search_actor list; 3959 - cursor : string option; 3960 - rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 3961 - 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. *) 4017 + type input = { 4018 + country_code : string; (** An ISO 3166-1 alpha-2 code of the user's location. *) 4019 + email : string; (** The user's email address to receive assurance instructions. *) 4020 + language : string; (** The user's preferred language for communication during the assurance process. *) 3962 4021 } 3963 4022 3964 - (** Jsont codec for {!type:output}. *) 3965 - val output_jsont : output Jsont.t 3966 - 3967 - end 3968 - module GetAgeAssuranceState : sig 3969 - (** Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required. *) 4023 + (** Jsont codec for {!type:input}. *) 4024 + val input_jsont : input Jsont.t 3970 4025 3971 4026 3972 4027 type output = Defs.age_assurance_state ··· 4000 4055 val output_jsont : output Jsont.t 4001 4056 4002 4057 end 4003 - module SearchPostsSkeleton : sig 4004 - (** Backend Posts search, returns only skeleton *) 4005 - 4006 - (** Query/procedure parameters. *) 4007 - type params = { 4008 - author : string option; (** Filter to posts by the given account. Handles are resolved to DID before query-time. *) 4009 - cursor : string option; (** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. *) 4010 - domain : string option; (** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. *) 4011 - lang : string option; (** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. *) 4012 - limit : int option; 4013 - 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. *) 4014 - q : string; (** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. *) 4015 - 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). *) 4016 - sort : string option; (** Specifies the ranking order of results. *) 4017 - 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. *) 4018 - 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). *) 4019 - url : string option; (** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. *) 4020 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. *) 4021 - } 4022 - 4023 - (** Jsont codec for {!type:params}. *) 4024 - val params_jsont : params Jsont.t 4025 - 4026 - 4027 - type output = { 4028 - cursor : string option; 4029 - hits_total : int option; (** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. *) 4030 - posts : Defs.skeleton_search_post list; 4031 - } 4032 - 4033 - (** Jsont codec for {!type:output}. *) 4034 - val output_jsont : output Jsont.t 4035 - 4036 - end 4037 4058 module SearchActorsSkeleton : sig 4038 4059 (** Backend Actors (profile) search, returns only skeleton. *) 4039 4060 ··· 4060 4081 val output_jsont : output Jsont.t 4061 4082 4062 4083 end 4063 - module GetTrends : sig 4064 - (** Get the current trends on the network *) 4084 + module GetAgeAssuranceState : sig 4085 + (** Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required. *) 4065 4086 4066 - (** Query/procedure parameters. *) 4067 - type params = { 4068 - limit : int option; 4069 - } 4070 4087 4071 - (** Jsont codec for {!type:params}. *) 4072 - val params_jsont : params Jsont.t 4073 - 4074 - 4075 - type output = { 4076 - trends : Defs.trend_view list; 4077 - } 4088 + type output = Defs.age_assurance_state 4078 4089 4079 4090 (** Jsont codec for {!type:output}. *) 4080 4091 val output_jsont : output Jsont.t 4081 4092 4082 4093 end 4083 - module GetPostThreadV2 : sig 4084 - 4085 - type thread_item = { 4086 - 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. *) 4087 - uri : string; 4088 - value : Jsont.json; 4089 - } 4090 - 4091 - (** Jsont codec for {!type:thread_item}. *) 4092 - val thread_item_jsont : thread_item Jsont.t 4093 - 4094 - (** (NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests. *) 4094 + module GetSuggestionsSkeleton : sig 4095 + (** Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions *) 4095 4096 4096 4097 (** Query/procedure parameters. *) 4097 4098 type params = { 4098 - above : bool option; (** Whether to include parents above the anchor. *) 4099 - 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. *) 4100 - below : int option; (** How many levels of replies to include below the anchor. *) 4101 - 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). *) 4102 - sort : string option; (** Sorting for the thread replies. *) 4099 + cursor : string option; 4100 + limit : int option; 4101 + relative_to_did : string option; (** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. *) 4102 + viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. *) 4103 4103 } 4104 4104 4105 4105 (** Jsont codec for {!type:params}. *) ··· 4107 4107 4108 4108 4109 4109 type output = { 4110 - has_other_replies : bool; (** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. *) 4111 - thread : thread_item list; (** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. *) 4112 - threadgate : Jsont.json option; 4110 + actors : Defs.skeleton_search_actor list; 4111 + cursor : string option; 4112 + rec_id : int option; (** Snowflake for this recommendation, use when submitting recommendation events. *) 4113 + relative_to_did : string option; (** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. *) 4113 4114 } 4114 4115 4115 4116 (** Jsont codec for {!type:output}. *) 4116 4117 val output_jsont : output Jsont.t 4117 4118 4118 4119 end 4119 - module GetTrendsSkeleton : sig 4120 - (** Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends *) 4120 + module GetTrends : sig 4121 + (** Get the current trends on the network *) 4121 4122 4122 4123 (** Query/procedure parameters. *) 4123 4124 type params = { 4124 4125 limit : int option; 4125 - viewer : string option; (** DID of the account making the request (not included for public/unauthenticated queries). *) 4126 4126 } 4127 4127 4128 4128 (** Jsont codec for {!type:params}. *) ··· 4130 4130 4131 4131 4132 4132 type output = { 4133 - trends : Defs.skeleton_trend list; 4133 + trends : Defs.trend_view list; 4134 4134 } 4135 4135 4136 4136 (** Jsont codec for {!type:output}. *)
+15 -15
lexicons/standard-site/atp_lexicon_standard_site.ml
··· 36 36 end 37 37 module Site = struct 38 38 module Standard = struct 39 + module Graph = struct 40 + module Subscription = struct 41 + type main = { 42 + publication : string; 43 + } 44 + 45 + let main_jsont = 46 + Jsont.Object.map ~kind:"Main" 47 + (fun _typ publication -> { publication }) 48 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.graph.subscription" ~enc:(fun _ -> "site.standard.graph.subscription") 49 + |> Jsont.Object.mem "publication" Jsont.string ~enc:(fun r -> r.publication) 50 + |> Jsont.Object.finish 51 + 52 + end 53 + end 39 54 module Document = struct 40 55 type main = { 41 56 bsky_post_ref : Com.Atproto.Repo.StrongRef.main option; ··· 120 135 |> Jsont.Object.mem "accentForeground" Color.rgb_jsont ~enc:(fun r -> r.accent_foreground) 121 136 |> Jsont.Object.mem "background" Color.rgb_jsont ~enc:(fun r -> r.background) 122 137 |> Jsont.Object.mem "foreground" Color.rgb_jsont ~enc:(fun r -> r.foreground) 123 - |> Jsont.Object.finish 124 - 125 - end 126 - end 127 - module Graph = struct 128 - module Subscription = struct 129 - type main = { 130 - publication : string; 131 - } 132 - 133 - let main_jsont = 134 - Jsont.Object.map ~kind:"Main" 135 - (fun _typ publication -> { publication }) 136 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"site.standard.graph.subscription" ~enc:(fun _ -> "site.standard.graph.subscription") 137 - |> Jsont.Object.mem "publication" Jsont.string ~enc:(fun r -> r.publication) 138 138 |> Jsont.Object.finish 139 139 140 140 end
+13 -13
lexicons/standard-site/atp_lexicon_standard_site.mli
··· 30 30 end 31 31 module Site : sig 32 32 module Standard : sig 33 + module Graph : sig 34 + module Subscription : sig 35 + (** Record declaring a subscription to a publication. *) 36 + 37 + type main = { 38 + publication : string; (** AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789). *) 39 + } 40 + 41 + (** Jsont codec for {!type:main}. *) 42 + val main_jsont : main Jsont.t 43 + 44 + end 45 + end 33 46 module Document : sig 34 47 (** A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently. *) 35 48 ··· 83 96 accent_foreground : Color.rgb; (** Color used for button text. *) 84 97 background : Color.rgb; (** Color used for content background. *) 85 98 foreground : Color.rgb; (** Color used for content text. *) 86 - } 87 - 88 - (** Jsont codec for {!type:main}. *) 89 - val main_jsont : main Jsont.t 90 - 91 - end 92 - end 93 - module Graph : sig 94 - module Subscription : sig 95 - (** Record declaring a subscription to a publication. *) 96 - 97 - type main = { 98 - publication : string; (** AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789). *) 99 99 } 100 100 101 101 (** Jsont codec for {!type:main}. *)
+963 -963
lexicons/tangled/atp_lexicon_tangled.ml
··· 15 15 16 16 module Sh = struct 17 17 module Tangled = struct 18 - module Actor = struct 19 - module Profile = struct 20 - type main = { 21 - bluesky : bool; 22 - description : string option; 23 - links : string list option; 24 - location : string option; 25 - pinned_repositories : string list option; 26 - pronouns : string option; 27 - stats : string list option; 28 - } 29 - 30 - let main_jsont = 31 - Jsont.Object.map ~kind:"Main" 32 - (fun _typ bluesky description links location pinned_repositories pronouns stats -> { bluesky; description; links; location; pinned_repositories; pronouns; stats }) 33 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.actor.profile" ~enc:(fun _ -> "sh.tangled.actor.profile") 34 - |> Jsont.Object.mem "bluesky" Jsont.bool ~enc:(fun r -> r.bluesky) 35 - |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 36 - |> Jsont.Object.opt_mem "links" (Jsont.list Jsont.string) ~enc:(fun r -> r.links) 37 - |> Jsont.Object.opt_mem "location" Jsont.string ~enc:(fun r -> r.location) 38 - |> Jsont.Object.opt_mem "pinnedRepositories" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned_repositories) 39 - |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 40 - |> Jsont.Object.opt_mem "stats" (Jsont.list Jsont.string) ~enc:(fun r -> r.stats) 41 - |> Jsont.Object.finish 42 - 43 - end 44 - end 45 - module Owner = struct 46 - type output = { 47 - owner : string; 48 - } 49 - 50 - let output_jsont = 51 - Jsont.Object.map ~kind:"Output" 52 - (fun _typ owner -> { owner }) 53 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.owner#output" ~enc:(fun _ -> "sh.tangled.owner#output") 54 - |> Jsont.Object.mem "owner" Jsont.string ~enc:(fun r -> r.owner) 55 - |> Jsont.Object.finish 56 - 57 - end 58 18 module Spindle = struct 59 19 type main = { 60 20 created_at : string; ··· 85 45 86 46 end 87 47 end 88 - module Pipeline = struct 89 - type trigger_repo = { 90 - default_branch : string; 91 - did : string; 92 - knot : string; 93 - repo : string; 94 - } 95 - 96 - let trigger_repo_jsont = 97 - Jsont.Object.map ~kind:"Trigger_repo" 98 - (fun _typ default_branch did knot repo -> { default_branch; did; knot; repo }) 99 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerRepo" ~enc:(fun _ -> "sh.tangled.pipeline#triggerRepo") 100 - |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 101 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 102 - |> Jsont.Object.mem "knot" Jsont.string ~enc:(fun r -> r.knot) 103 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 104 - |> Jsont.Object.finish 105 - 106 - type push_trigger_data = { 107 - new_sha : string; 108 - old_sha : string; 109 - ref_ : string; 110 - } 111 - 112 - let push_trigger_data_jsont = 113 - Jsont.Object.map ~kind:"Push_trigger_data" 114 - (fun _typ new_sha old_sha ref_ -> { new_sha; old_sha; ref_ }) 115 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pushTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pushTriggerData") 116 - |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 117 - |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 118 - |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 119 - |> Jsont.Object.finish 120 - 121 - type pull_request_trigger_data = { 122 - action : string; 123 - source_branch : string; 124 - source_sha : string; 125 - target_branch : string; 126 - } 127 - 128 - let pull_request_trigger_data_jsont = 129 - Jsont.Object.map ~kind:"Pull_request_trigger_data" 130 - (fun _typ action source_branch source_sha target_branch -> { action; source_branch; source_sha; target_branch }) 131 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pullRequestTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pullRequestTriggerData") 132 - |> Jsont.Object.mem "action" Jsont.string ~enc:(fun r -> r.action) 133 - |> Jsont.Object.mem "sourceBranch" Jsont.string ~enc:(fun r -> r.source_branch) 134 - |> Jsont.Object.mem "sourceSha" Jsont.string ~enc:(fun r -> r.source_sha) 135 - |> Jsont.Object.mem "targetBranch" Jsont.string ~enc:(fun r -> r.target_branch) 136 - |> Jsont.Object.finish 137 - 138 - type pair = { 139 - key : string; 140 - value : string; 141 - } 142 - 143 - let pair_jsont = 144 - Jsont.Object.map ~kind:"Pair" 145 - (fun _typ key value -> { key; value }) 146 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pair" ~enc:(fun _ -> "sh.tangled.pipeline#pair") 147 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 148 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 149 - |> Jsont.Object.finish 150 - 151 - type clone_opts = { 152 - depth : int; 153 - skip : bool; 154 - submodules : bool; 155 - } 156 - 157 - let clone_opts_jsont = 158 - Jsont.Object.map ~kind:"Clone_opts" 159 - (fun _typ depth skip submodules -> { depth; skip; submodules }) 160 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#cloneOpts" ~enc:(fun _ -> "sh.tangled.pipeline#cloneOpts") 161 - |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 162 - |> Jsont.Object.mem "skip" Jsont.bool ~enc:(fun r -> r.skip) 163 - |> Jsont.Object.mem "submodules" Jsont.bool ~enc:(fun r -> r.submodules) 164 - |> Jsont.Object.finish 165 - 166 - type workflow = { 167 - clone : clone_opts; 168 - engine : string; 169 - name : string; 170 - raw : string; 171 - } 172 - 173 - let workflow_jsont = 174 - Jsont.Object.map ~kind:"Workflow" 175 - (fun _typ clone engine name raw -> { clone; engine; name; raw }) 176 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#workflow" ~enc:(fun _ -> "sh.tangled.pipeline#workflow") 177 - |> Jsont.Object.mem "clone" clone_opts_jsont ~enc:(fun r -> r.clone) 178 - |> Jsont.Object.mem "engine" Jsont.string ~enc:(fun r -> r.engine) 179 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 180 - |> Jsont.Object.mem "raw" Jsont.string ~enc:(fun r -> r.raw) 181 - |> Jsont.Object.finish 182 - 183 - type manual_trigger_data = { 184 - inputs : pair list option; 185 - } 186 - 187 - let manual_trigger_data_jsont = 188 - Jsont.Object.map ~kind:"Manual_trigger_data" 189 - (fun _typ inputs -> { inputs }) 190 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#manualTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#manualTriggerData") 191 - |> Jsont.Object.opt_mem "inputs" (Jsont.list pair_jsont) ~enc:(fun r -> r.inputs) 192 - |> Jsont.Object.finish 193 - 194 - type trigger_metadata = { 195 - kind : string; 196 - manual : manual_trigger_data option; 197 - pull_request : pull_request_trigger_data option; 198 - push : push_trigger_data option; 199 - repo : trigger_repo; 200 - } 201 - 202 - let trigger_metadata_jsont = 203 - Jsont.Object.map ~kind:"Trigger_metadata" 204 - (fun _typ kind manual pull_request push repo -> { kind; manual; pull_request; push; repo }) 205 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerMetadata" ~enc:(fun _ -> "sh.tangled.pipeline#triggerMetadata") 206 - |> Jsont.Object.mem "kind" Jsont.string ~enc:(fun r -> r.kind) 207 - |> Jsont.Object.opt_mem "manual" manual_trigger_data_jsont ~enc:(fun r -> r.manual) 208 - |> Jsont.Object.opt_mem "pullRequest" pull_request_trigger_data_jsont ~enc:(fun r -> r.pull_request) 209 - |> Jsont.Object.opt_mem "push" push_trigger_data_jsont ~enc:(fun r -> r.push) 210 - |> Jsont.Object.mem "repo" trigger_repo_jsont ~enc:(fun r -> r.repo) 211 - |> Jsont.Object.finish 212 - 213 - type main = { 214 - trigger_metadata : trigger_metadata; 215 - workflows : workflow list; 216 - } 217 - 218 - let main_jsont = 219 - Jsont.Object.map ~kind:"Main" 220 - (fun _typ trigger_metadata workflows -> { trigger_metadata; workflows }) 221 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline" ~enc:(fun _ -> "sh.tangled.pipeline") 222 - |> Jsont.Object.mem "triggerMetadata" trigger_metadata_jsont ~enc:(fun r -> r.trigger_metadata) 223 - |> Jsont.Object.mem "workflows" (Jsont.list workflow_jsont) ~enc:(fun r -> r.workflows) 224 - |> Jsont.Object.finish 225 - 226 - module Status = struct 227 - type main = { 228 - created_at : string; 229 - error : string option; 230 - exit_code : int option; 231 - pipeline : string; 232 - status : string; 233 - workflow : string; 234 - } 235 - 236 - let main_jsont = 237 - Jsont.Object.map ~kind:"Main" 238 - (fun _typ created_at error exit_code pipeline status workflow -> { created_at; error; exit_code; pipeline; status; workflow }) 239 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline.status" ~enc:(fun _ -> "sh.tangled.pipeline.status") 240 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 241 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 242 - |> Jsont.Object.opt_mem "exitCode" Jsont.int ~enc:(fun r -> r.exit_code) 243 - |> Jsont.Object.mem "pipeline" Jsont.string ~enc:(fun r -> r.pipeline) 244 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 245 - |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 246 - |> Jsont.Object.finish 247 - 248 - end 249 - end 250 - module Knot = struct 251 - type main = { 252 - created_at : string; 253 - } 254 - 255 - let main_jsont = 256 - Jsont.Object.map ~kind:"Main" 257 - (fun _typ created_at -> { created_at }) 258 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot" ~enc:(fun _ -> "sh.tangled.knot") 259 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 260 - |> Jsont.Object.finish 261 - 262 - module Version = struct 263 - type output = { 264 - version : string; 265 - } 266 - 267 - let output_jsont = 268 - Jsont.Object.map ~kind:"Output" 269 - (fun _typ version -> { version }) 270 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.version#output" ~enc:(fun _ -> "sh.tangled.knot.version#output") 271 - |> Jsont.Object.mem "version" Jsont.string ~enc:(fun r -> r.version) 272 - |> Jsont.Object.finish 273 - 274 - end 275 - module ListKeys = struct 276 - type public_key = { 277 - created_at : string; 278 - did : string; 279 - key : string; 280 - } 281 - 282 - let public_key_jsont = 283 - Jsont.Object.map ~kind:"Public_key" 284 - (fun _typ created_at did key -> { created_at; did; key }) 285 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.listKeys#publicKey" ~enc:(fun _ -> "sh.tangled.knot.listKeys#publicKey") 286 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 287 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 288 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 289 - |> Jsont.Object.finish 290 - 291 - type params = { 292 - cursor : string option; 293 - limit : int option; 294 - } 295 - 296 - let params_jsont = 297 - Jsont.Object.map ~kind:"Params" 298 - (fun cursor limit -> { 299 - cursor; 300 - limit; 301 - }) 302 - |> Jsont.Object.opt_mem "cursor" Jsont.string 303 - ~enc:(fun r -> r.cursor) 304 - |> Jsont.Object.opt_mem "limit" Jsont.int 305 - ~enc:(fun r -> r.limit) 306 - |> Jsont.Object.finish 307 - 308 - type output = { 309 - cursor : string option; 310 - keys : public_key list; 311 - } 312 - 313 - let output_jsont = 314 - Jsont.Object.map ~kind:"Output" 315 - (fun _typ cursor keys -> { cursor; keys }) 316 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.listKeys#output" ~enc:(fun _ -> "sh.tangled.knot.listKeys#output") 317 - |> Jsont.Object.opt_mem "cursor" Jsont.string ~enc:(fun r -> r.cursor) 318 - |> Jsont.Object.mem "keys" (Jsont.list public_key_jsont) ~enc:(fun r -> r.keys) 319 - |> Jsont.Object.finish 320 - 321 - end 322 - module Member = struct 323 - type main = { 324 - created_at : string; 325 - domain : string; 326 - subject : string; 327 - } 328 - 329 - let main_jsont = 330 - Jsont.Object.map ~kind:"Main" 331 - (fun _typ created_at domain subject -> { created_at; domain; subject }) 332 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.member" ~enc:(fun _ -> "sh.tangled.knot.member") 333 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 334 - |> Jsont.Object.mem "domain" Jsont.string ~enc:(fun r -> r.domain) 335 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 336 - |> Jsont.Object.finish 337 - 338 - end 339 - end 340 - module Label = struct 341 - module Op = struct 342 - type operand = { 343 - key : string; 344 - value : string; 345 - } 346 - 347 - let operand_jsont = 348 - Jsont.Object.map ~kind:"Operand" 349 - (fun _typ key value -> { key; value }) 350 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op#operand" ~enc:(fun _ -> "sh.tangled.label.op#operand") 351 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 352 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 353 - |> Jsont.Object.finish 354 - 355 - type main = { 356 - add : operand list; 357 - delete : operand list; 358 - performed_at : string; 359 - subject : string; 360 - } 361 - 362 - let main_jsont = 363 - Jsont.Object.map ~kind:"Main" 364 - (fun _typ add delete performed_at subject -> { add; delete; performed_at; subject }) 365 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op" ~enc:(fun _ -> "sh.tangled.label.op") 366 - |> Jsont.Object.mem "add" (Jsont.list operand_jsont) ~enc:(fun r -> r.add) 367 - |> Jsont.Object.mem "delete" (Jsont.list operand_jsont) ~enc:(fun r -> r.delete) 368 - |> Jsont.Object.mem "performedAt" Jsont.string ~enc:(fun r -> r.performed_at) 369 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 370 - |> Jsont.Object.finish 371 - 372 - end 373 - module Definition = struct 374 - type value_type = { 375 - enum : string list option; 376 - format : string; 377 - type_ : string; 378 - } 379 - 380 - let value_type_jsont = 381 - Jsont.Object.map ~kind:"Value_type" 382 - (fun _typ enum format type_ -> { enum; format; type_ }) 383 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.definition#valueType" ~enc:(fun _ -> "sh.tangled.label.definition#valueType") 384 - |> Jsont.Object.opt_mem "enum" (Jsont.list Jsont.string) ~enc:(fun r -> r.enum) 385 - |> Jsont.Object.mem "format" Jsont.string ~enc:(fun r -> r.format) 386 - |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 387 - |> Jsont.Object.finish 388 - 389 - type main = { 390 - color : string option; 391 - created_at : string; 392 - multiple : bool option; 393 - name : string; 394 - scope : string list; 395 - value_type : value_type; 396 - } 397 - 398 - let main_jsont = 399 - Jsont.Object.map ~kind:"Main" 400 - (fun _typ color created_at multiple name scope value_type -> { color; created_at; multiple; name; scope; value_type }) 401 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.definition" ~enc:(fun _ -> "sh.tangled.label.definition") 402 - |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 403 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 404 - |> Jsont.Object.opt_mem "multiple" Jsont.bool ~enc:(fun r -> r.multiple) 405 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 406 - |> Jsont.Object.mem "scope" (Jsont.list Jsont.string) ~enc:(fun r -> r.scope) 407 - |> Jsont.Object.mem "valueType" value_type_jsont ~enc:(fun r -> r.value_type) 408 - |> Jsont.Object.finish 409 - 410 - end 411 - end 412 - module Feed = struct 413 - module Reaction = struct 414 - type main = { 415 - created_at : string; 416 - reaction : string; 417 - subject : string; 418 - } 419 - 420 - let main_jsont = 421 - Jsont.Object.map ~kind:"Main" 422 - (fun _typ created_at reaction subject -> { created_at; reaction; subject }) 423 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.reaction" ~enc:(fun _ -> "sh.tangled.feed.reaction") 424 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 425 - |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 426 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 427 - |> Jsont.Object.finish 428 - 429 - end 430 - module Star = struct 431 - type main = { 432 - created_at : string; 433 - subject : string; 434 - } 435 - 436 - let main_jsont = 437 - Jsont.Object.map ~kind:"Main" 438 - (fun _typ created_at subject -> { created_at; subject }) 439 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.star" ~enc:(fun _ -> "sh.tangled.feed.star") 440 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 441 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 442 - |> Jsont.Object.finish 443 - 444 - end 445 - end 446 - module PublicKey = struct 447 - type main = { 448 - created_at : string; 449 - key : string; 450 - name : string; 451 - } 452 - 453 - let main_jsont = 454 - Jsont.Object.map ~kind:"Main" 455 - (fun _typ created_at key name -> { created_at; key; name }) 456 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.publicKey" ~enc:(fun _ -> "sh.tangled.publicKey") 457 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 458 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 459 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 460 - |> Jsont.Object.finish 461 - 462 - end 463 - module Graph = struct 464 - module Follow = struct 465 - type main = { 466 - created_at : string; 467 - subject : string; 468 - } 469 - 470 - let main_jsont = 471 - Jsont.Object.map ~kind:"Main" 472 - (fun _typ created_at subject -> { created_at; subject }) 473 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.graph.follow" ~enc:(fun _ -> "sh.tangled.graph.follow") 474 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 475 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 476 - |> Jsont.Object.finish 477 - 478 - end 479 - end 480 48 module Git = struct 481 49 module RefUpdate = struct 482 50 type individual_language_size = { ··· 567 135 568 136 end 569 137 end 138 + module Actor = struct 139 + module Profile = struct 140 + type main = { 141 + bluesky : bool; 142 + description : string option; 143 + links : string list option; 144 + location : string option; 145 + pinned_repositories : string list option; 146 + pronouns : string option; 147 + stats : string list option; 148 + } 149 + 150 + let main_jsont = 151 + Jsont.Object.map ~kind:"Main" 152 + (fun _typ bluesky description links location pinned_repositories pronouns stats -> { bluesky; description; links; location; pinned_repositories; pronouns; stats }) 153 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.actor.profile" ~enc:(fun _ -> "sh.tangled.actor.profile") 154 + |> Jsont.Object.mem "bluesky" Jsont.bool ~enc:(fun r -> r.bluesky) 155 + |> Jsont.Object.opt_mem "description" Jsont.string ~enc:(fun r -> r.description) 156 + |> Jsont.Object.opt_mem "links" (Jsont.list Jsont.string) ~enc:(fun r -> r.links) 157 + |> Jsont.Object.opt_mem "location" Jsont.string ~enc:(fun r -> r.location) 158 + |> Jsont.Object.opt_mem "pinnedRepositories" (Jsont.list Jsont.string) ~enc:(fun r -> r.pinned_repositories) 159 + |> Jsont.Object.opt_mem "pronouns" Jsont.string ~enc:(fun r -> r.pronouns) 160 + |> Jsont.Object.opt_mem "stats" (Jsont.list Jsont.string) ~enc:(fun r -> r.stats) 161 + |> Jsont.Object.finish 162 + 163 + end 164 + end 570 165 module String = struct 571 166 type main = { 572 167 contents : string; ··· 586 181 |> Jsont.Object.finish 587 182 588 183 end 184 + module Feed = struct 185 + module Star = struct 186 + type main = { 187 + created_at : string; 188 + subject : string; 189 + } 190 + 191 + let main_jsont = 192 + Jsont.Object.map ~kind:"Main" 193 + (fun _typ created_at subject -> { created_at; subject }) 194 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.star" ~enc:(fun _ -> "sh.tangled.feed.star") 195 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 196 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 197 + |> Jsont.Object.finish 198 + 199 + end 200 + module Reaction = struct 201 + type main = { 202 + created_at : string; 203 + reaction : string; 204 + subject : string; 205 + } 206 + 207 + let main_jsont = 208 + Jsont.Object.map ~kind:"Main" 209 + (fun _typ created_at reaction subject -> { created_at; reaction; subject }) 210 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.feed.reaction" ~enc:(fun _ -> "sh.tangled.feed.reaction") 211 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 212 + |> Jsont.Object.mem "reaction" Jsont.string ~enc:(fun r -> r.reaction) 213 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 214 + |> Jsont.Object.finish 215 + 216 + end 217 + end 589 218 module Repo = struct 590 219 type main = { 591 220 created_at : string; ··· 614 243 |> Jsont.Object.opt_mem "website" Jsont.string ~enc:(fun r -> r.website) 615 244 |> Jsont.Object.finish 616 245 617 - module Issue = struct 246 + module Artifact = struct 618 247 type main = { 619 - body : string option; 248 + artifact : Atp.Blob_ref.t; 620 249 created_at : string; 621 - mentions : string list option; 622 - references : string list option; 250 + name : string; 623 251 repo : string; 624 - title : string; 252 + tag : string; 625 253 } 626 254 627 255 let main_jsont = 628 256 Jsont.Object.map ~kind:"Main" 629 - (fun _typ body created_at mentions references repo title -> { body; created_at; mentions; references; repo; title }) 630 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue" ~enc:(fun _ -> "sh.tangled.repo.issue") 631 - |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 257 + (fun _typ artifact created_at name repo tag -> { artifact; created_at; name; repo; tag }) 258 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.artifact" ~enc:(fun _ -> "sh.tangled.repo.artifact") 259 + |> Jsont.Object.mem "artifact" Atp.Blob_ref.jsont ~enc:(fun r -> r.artifact) 632 260 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 633 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 634 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 261 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 635 262 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 636 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 263 + |> Jsont.Object.mem "tag" Jsont.binary_string ~enc:(fun r -> r.tag) 637 264 |> Jsont.Object.finish 638 265 639 - module Comment = struct 640 - type main = { 641 - body : string; 642 - created_at : string; 643 - issue : string; 644 - mentions : string list option; 645 - references : string list option; 646 - reply_to : string option; 647 - } 648 - 649 - let main_jsont = 650 - Jsont.Object.map ~kind:"Main" 651 - (fun _typ body created_at issue mentions references reply_to -> { body; created_at; issue; mentions; references; reply_to }) 652 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.comment" ~enc:(fun _ -> "sh.tangled.repo.issue.comment") 653 - |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 654 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 655 - |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 656 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 657 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 658 - |> Jsont.Object.opt_mem "replyTo" Jsont.string ~enc:(fun r -> r.reply_to) 659 - |> Jsont.Object.finish 660 - 661 - end 662 - module State = struct 663 - type main = { 664 - issue : string; 665 - state : string; 666 - } 667 - 668 - let main_jsont = 669 - Jsont.Object.map ~kind:"Main" 670 - (fun _typ issue state -> { issue; state }) 671 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.state" ~enc:(fun _ -> "sh.tangled.repo.issue.state") 672 - |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 673 - |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 674 - |> Jsont.Object.finish 675 - 676 - module Closed = struct 677 - type main = string 678 - let main_jsont = Jsont.string 679 - 680 - end 681 - module Open = struct 682 - type main = string 683 - let main_jsont = Jsont.string 684 - 685 - end 686 - end 687 266 end 688 - module Pull = struct 689 - type target = { 690 - branch : string; 691 - repo : string; 267 + module MergeCheck = struct 268 + type conflict_info = { 269 + filename : string; 270 + reason : string; 692 271 } 693 272 694 - let target_jsont = 695 - Jsont.Object.map ~kind:"Target" 696 - (fun _typ branch repo -> { branch; repo }) 697 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#target" ~enc:(fun _ -> "sh.tangled.repo.pull#target") 698 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 699 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 273 + let conflict_info_jsont = 274 + Jsont.Object.map ~kind:"Conflict_info" 275 + (fun _typ filename reason -> { filename; reason }) 276 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#conflictInfo" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#conflictInfo") 277 + |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 278 + |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 700 279 |> Jsont.Object.finish 701 280 702 - type source = { 281 + type input = { 703 282 branch : string; 704 - repo : string option; 705 - sha : string; 706 - } 707 - 708 - let source_jsont = 709 - Jsont.Object.map ~kind:"Source" 710 - (fun _typ branch repo sha -> { branch; repo; sha }) 711 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#source" ~enc:(fun _ -> "sh.tangled.repo.pull#source") 712 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 713 - |> Jsont.Object.opt_mem "repo" Jsont.string ~enc:(fun r -> r.repo) 714 - |> Jsont.Object.mem "sha" Jsont.string ~enc:(fun r -> r.sha) 715 - |> Jsont.Object.finish 716 - 717 - type main = { 718 - body : string option; 719 - created_at : string; 720 - mentions : string list option; 721 - patch : string option; 722 - patch_blob : Atp.Blob_ref.t; 723 - references : string list option; 724 - source : source option; 725 - target : target; 726 - title : string; 727 - } 728 - 729 - let main_jsont = 730 - Jsont.Object.map ~kind:"Main" 731 - (fun _typ body created_at mentions patch patch_blob references source target title -> { body; created_at; mentions; patch; patch_blob; references; source; target; title }) 732 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull" ~enc:(fun _ -> "sh.tangled.repo.pull") 733 - |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 734 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 735 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 736 - |> Jsont.Object.opt_mem "patch" Jsont.string ~enc:(fun r -> r.patch) 737 - |> Jsont.Object.mem "patchBlob" Atp.Blob_ref.jsont ~enc:(fun r -> r.patch_blob) 738 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 739 - |> Jsont.Object.opt_mem "source" source_jsont ~enc:(fun r -> r.source) 740 - |> Jsont.Object.mem "target" target_jsont ~enc:(fun r -> r.target) 741 - |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 742 - |> Jsont.Object.finish 743 - 744 - module Comment = struct 745 - type main = { 746 - body : string; 747 - created_at : string; 748 - mentions : string list option; 749 - pull : string; 750 - references : string list option; 751 - } 752 - 753 - let main_jsont = 754 - Jsont.Object.map ~kind:"Main" 755 - (fun _typ body created_at mentions pull references -> { body; created_at; mentions; pull; references }) 756 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.comment" ~enc:(fun _ -> "sh.tangled.repo.pull.comment") 757 - |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 758 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 759 - |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 760 - |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 761 - |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 762 - |> Jsont.Object.finish 763 - 764 - end 765 - module Status = struct 766 - type main = { 767 - pull : string; 768 - status : string; 769 - } 770 - 771 - let main_jsont = 772 - Jsont.Object.map ~kind:"Main" 773 - (fun _typ pull status -> { pull; status }) 774 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.status" ~enc:(fun _ -> "sh.tangled.repo.pull.status") 775 - |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 776 - |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 777 - |> Jsont.Object.finish 778 - 779 - module Merged = struct 780 - type main = string 781 - let main_jsont = Jsont.string 782 - 783 - end 784 - module Closed = struct 785 - type main = string 786 - let main_jsont = Jsont.string 787 - 788 - end 789 - module Open = struct 790 - type main = string 791 - let main_jsont = Jsont.string 792 - 793 - end 794 - end 795 - end 796 - module SetDefaultBranch = struct 797 - type input = { 798 - default_branch : string; 799 - repo : string; 283 + did : string; 284 + name : string; 285 + patch : string; 800 286 } 801 287 802 288 let input_jsont = 803 289 Jsont.Object.map ~kind:"Input" 804 - (fun _typ default_branch repo -> { default_branch; repo }) 805 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.setDefaultBranch#input" ~enc:(fun _ -> "sh.tangled.repo.setDefaultBranch#input") 806 - |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 807 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 808 - |> Jsont.Object.finish 809 - 810 - end 811 - module GetDefaultBranch = struct 812 - type signature = { 813 - email : string; 814 - name : string; 815 - when_ : string; 816 - } 817 - 818 - let signature_jsont = 819 - Jsont.Object.map ~kind:"Signature" 820 - (fun _typ email name when_ -> { email; name; when_ }) 821 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.getDefaultBranch#signature" ~enc:(fun _ -> "sh.tangled.repo.getDefaultBranch#signature") 822 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 290 + (fun _typ branch did name patch -> { branch; did; name; patch }) 291 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#input" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#input") 292 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 293 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 823 294 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 824 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 825 - |> Jsont.Object.finish 826 - 827 - type params = { 828 - repo : string; 829 - } 830 - 831 - let params_jsont = 832 - Jsont.Object.map ~kind:"Params" 833 - (fun repo -> { 834 - repo; 835 - }) 836 - |> Jsont.Object.mem "repo" Jsont.string 837 - ~enc:(fun r -> r.repo) 295 + |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 838 296 |> Jsont.Object.finish 839 297 840 298 type output = { 841 - author : signature option; 842 - hash : string; 299 + conflicts : conflict_info list option; 300 + error : string option; 301 + is_conflicted : bool; 843 302 message : string option; 844 - name : string; 845 - short_hash : string option; 846 - when_ : string; 847 303 } 848 304 849 305 let output_jsont = 850 306 Jsont.Object.map ~kind:"Output" 851 - (fun _typ author hash message name short_hash when_ -> { author; hash; message; name; short_hash; when_ }) 852 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.getDefaultBranch#output" ~enc:(fun _ -> "sh.tangled.repo.getDefaultBranch#output") 853 - |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 854 - |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 307 + (fun _typ conflicts error is_conflicted message -> { conflicts; error; is_conflicted; message }) 308 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#output" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#output") 309 + |> Jsont.Object.opt_mem "conflicts" (Jsont.list conflict_info_jsont) ~enc:(fun r -> r.conflicts) 310 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 311 + |> Jsont.Object.mem "is_conflicted" Jsont.bool ~enc:(fun r -> r.is_conflicted) 855 312 |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 856 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 857 - |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 858 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 859 - |> Jsont.Object.finish 860 - 861 - end 862 - module DeleteBranch = struct 863 - type input = { 864 - branch : string; 865 - repo : string; 866 - } 867 - 868 - let input_jsont = 869 - Jsont.Object.map ~kind:"Input" 870 - (fun _typ branch repo -> { branch; repo }) 871 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.deleteBranch#input" ~enc:(fun _ -> "sh.tangled.repo.deleteBranch#input") 872 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 873 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 874 - |> Jsont.Object.finish 875 - 876 - end 877 - module Delete = struct 878 - type input = { 879 - did : string; 880 - name : string; 881 - rkey : string; 882 - } 883 - 884 - let input_jsont = 885 - Jsont.Object.map ~kind:"Input" 886 - (fun _typ did name rkey -> { did; name; rkey }) 887 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.delete#input" ~enc:(fun _ -> "sh.tangled.repo.delete#input") 888 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 889 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 890 - |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 891 313 |> Jsont.Object.finish 892 314 893 315 end ··· 978 400 |> Jsont.Object.finish 979 401 980 402 end 981 - module AddSecret = struct 403 + module SetDefaultBranch = struct 982 404 type input = { 983 - key : string; 405 + default_branch : string; 984 406 repo : string; 985 - value : string; 986 407 } 987 408 988 409 let input_jsont = 989 410 Jsont.Object.map ~kind:"Input" 990 - (fun _typ key repo value -> { key; repo; value }) 991 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.addSecret#input" ~enc:(fun _ -> "sh.tangled.repo.addSecret#input") 992 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 411 + (fun _typ default_branch repo -> { default_branch; repo }) 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 "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 993 414 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 994 - |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 995 415 |> Jsont.Object.finish 996 416 997 417 end 998 - module Branch = struct 999 - type signature = { 1000 - email : string; 1001 - name : string; 1002 - when_ : string; 1003 - } 1004 - 1005 - let signature_jsont = 1006 - Jsont.Object.map ~kind:"Signature" 1007 - (fun _typ email name when_ -> { email; name; when_ }) 1008 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.branch#signature" ~enc:(fun _ -> "sh.tangled.repo.branch#signature") 1009 - |> Jsont.Object.mem "email" Jsont.string ~enc:(fun r -> r.email) 1010 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1011 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 1012 - |> Jsont.Object.finish 1013 - 418 + module Compare = struct 1014 419 type params = { 1015 - name : string; 1016 420 repo : string; 421 + rev1 : string; 422 + rev2 : string; 1017 423 } 1018 424 1019 425 let params_jsont = 1020 426 Jsont.Object.map ~kind:"Params" 1021 - (fun name repo -> { 1022 - name; 427 + (fun repo rev1 rev2 -> { 1023 428 repo; 429 + rev1; 430 + rev2; 1024 431 }) 1025 - |> Jsont.Object.mem "name" Jsont.string 1026 - ~enc:(fun r -> r.name) 1027 432 |> Jsont.Object.mem "repo" Jsont.string 1028 433 ~enc:(fun r -> r.repo) 434 + |> Jsont.Object.mem "rev1" Jsont.string 435 + ~enc:(fun r -> r.rev1) 436 + |> Jsont.Object.mem "rev2" Jsont.string 437 + ~enc:(fun r -> r.rev2) 1029 438 |> Jsont.Object.finish 1030 439 1031 - type output = { 1032 - author : signature option; 1033 - hash : string; 1034 - is_default : bool option; 1035 - message : string option; 440 + type output = unit 441 + let output_jsont = Jsont.ignore 442 + 443 + end 444 + module Merge = struct 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; 451 + did : string; 1036 452 name : string; 1037 - short_hash : string option; 1038 - when_ : string; 453 + patch : string; 1039 454 } 1040 455 1041 - let output_jsont = 1042 - Jsont.Object.map ~kind:"Output" 1043 - (fun _typ author hash is_default message name short_hash when_ -> { author; hash; is_default; message; name; short_hash; when_ }) 1044 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.branch#output" ~enc:(fun _ -> "sh.tangled.repo.branch#output") 1045 - |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 1046 - |> Jsont.Object.mem "hash" Jsont.string ~enc:(fun r -> r.hash) 1047 - |> Jsont.Object.opt_mem "isDefault" Jsont.bool ~enc:(fun r -> r.is_default) 1048 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 456 + let input_jsont = 457 + Jsont.Object.map ~kind:"Input" 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 + |> 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) 465 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1049 466 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1050 - |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 1051 - |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 467 + |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 1052 468 |> Jsont.Object.finish 1053 469 1054 470 end 1055 - module Log = struct 471 + module Tags = struct 1056 472 type params = { 1057 473 cursor : string option; 1058 474 limit : int option; 1059 - path : string option; 1060 - ref_ : string; 1061 475 repo : string; 1062 476 } 1063 477 1064 478 let params_jsont = 1065 479 Jsont.Object.map ~kind:"Params" 1066 - (fun cursor limit path ref_ repo -> { 480 + (fun cursor limit repo -> { 1067 481 cursor; 1068 482 limit; 1069 - path; 1070 - ref_; 1071 483 repo; 1072 484 }) 1073 485 |> Jsont.Object.opt_mem "cursor" Jsont.string 1074 486 ~enc:(fun r -> r.cursor) 1075 487 |> Jsont.Object.opt_mem "limit" Jsont.int 1076 488 ~enc:(fun r -> r.limit) 1077 - |> Jsont.Object.opt_mem "path" Jsont.string 1078 - ~enc:(fun r -> r.path) 1079 - |> Jsont.Object.mem "ref" Jsont.string 1080 - ~enc:(fun r -> r.ref_) 1081 489 |> Jsont.Object.mem "repo" Jsont.string 1082 490 ~enc:(fun r -> r.repo) 1083 491 |> Jsont.Object.finish ··· 1086 494 let output_jsont = Jsont.ignore 1087 495 1088 496 end 1089 - module ListSecrets = struct 1090 - type secret = { 497 + module Collaborator = struct 498 + type main = { 1091 499 created_at : string; 1092 - created_by : string; 1093 - key : string; 1094 500 repo : string; 501 + subject : string; 1095 502 } 1096 503 1097 - let secret_jsont = 1098 - Jsont.Object.map ~kind:"Secret" 1099 - (fun _typ created_at created_by key repo -> { created_at; created_by; key; repo }) 1100 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#secret" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#secret") 504 + let main_jsont = 505 + Jsont.Object.map ~kind:"Main" 506 + (fun _typ created_at repo subject -> { created_at; repo; subject }) 507 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.collaborator" ~enc:(fun _ -> "sh.tangled.repo.collaborator") 1101 508 |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1102 - |> Jsont.Object.mem "createdBy" Jsont.string ~enc:(fun r -> r.created_by) 1103 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1104 509 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1105 - |> Jsont.Object.finish 1106 - 1107 - type params = { 1108 - repo : string; 1109 - } 1110 - 1111 - let params_jsont = 1112 - Jsont.Object.map ~kind:"Params" 1113 - (fun repo -> { 1114 - repo; 1115 - }) 1116 - |> Jsont.Object.mem "repo" Jsont.string 1117 - ~enc:(fun r -> r.repo) 1118 - |> Jsont.Object.finish 1119 - 1120 - type output = { 1121 - secrets : secret list; 1122 - } 1123 - 1124 - let output_jsont = 1125 - Jsont.Object.map ~kind:"Output" 1126 - (fun _typ secrets -> { secrets }) 1127 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#output" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#output") 1128 - |> Jsont.Object.mem "secrets" (Jsont.list secret_jsont) ~enc:(fun r -> r.secrets) 510 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1129 511 |> Jsont.Object.finish 1130 512 1131 513 end 1132 - module Tags = struct 514 + module Branches = struct 1133 515 type params = { 1134 516 cursor : string option; 1135 517 limit : int option; ··· 1155 537 let output_jsont = Jsont.ignore 1156 538 1157 539 end 1158 - module Diff = struct 540 + module GetDefaultBranch = struct 541 + type signature = { 542 + email : string; 543 + name : string; 544 + when_ : string; 545 + } 546 + 547 + let signature_jsont = 548 + Jsont.Object.map ~kind:"Signature" 549 + (fun _typ email name when_ -> { email; name; when_ }) 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) 552 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 553 + |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 554 + |> Jsont.Object.finish 555 + 1159 556 type params = { 1160 - ref_ : string; 1161 557 repo : string; 1162 558 } 1163 559 1164 560 let params_jsont = 1165 561 Jsont.Object.map ~kind:"Params" 1166 - (fun ref_ repo -> { 1167 - ref_; 562 + (fun repo -> { 1168 563 repo; 1169 564 }) 1170 - |> Jsont.Object.mem "ref" Jsont.string 1171 - ~enc:(fun r -> r.ref_) 1172 565 |> Jsont.Object.mem "repo" Jsont.string 1173 566 ~enc:(fun r -> r.repo) 1174 567 |> Jsont.Object.finish 1175 568 1176 - type output = unit 1177 - let output_jsont = Jsont.ignore 1178 - 1179 - end 1180 - module Collaborator = struct 1181 - type main = { 1182 - created_at : string; 1183 - repo : string; 1184 - subject : string; 569 + type output = { 570 + author : signature option; 571 + hash : string; 572 + message : string option; 573 + name : string; 574 + short_hash : string option; 575 + when_ : string; 1185 576 } 1186 577 1187 - let main_jsont = 1188 - Jsont.Object.map ~kind:"Main" 1189 - (fun _typ created_at repo subject -> { created_at; repo; subject }) 1190 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.collaborator" ~enc:(fun _ -> "sh.tangled.repo.collaborator") 1191 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1192 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1193 - |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 578 + let output_jsont = 579 + Jsont.Object.map ~kind:"Output" 580 + (fun _typ author hash message name short_hash when_ -> { author; hash; message; name; short_hash; when_ }) 581 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.getDefaultBranch#output" ~enc:(fun _ -> "sh.tangled.repo.getDefaultBranch#output") 582 + |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 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) 586 + |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 587 + |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 1194 588 |> Jsont.Object.finish 1195 589 1196 590 end ··· 1211 605 |> Jsont.Object.finish 1212 606 1213 607 end 1214 - module Artifact = struct 1215 - type main = { 1216 - artifact : Atp.Blob_ref.t; 1217 - created_at : string; 608 + module ForkStatus = struct 609 + type input = { 610 + branch : string; 611 + did : string; 612 + hidden_ref : string; 1218 613 name : string; 1219 - repo : string; 1220 - tag : string; 614 + source : string; 1221 615 } 1222 616 1223 - let main_jsont = 1224 - Jsont.Object.map ~kind:"Main" 1225 - (fun _typ artifact created_at name repo tag -> { artifact; created_at; name; repo; tag }) 1226 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.artifact" ~enc:(fun _ -> "sh.tangled.repo.artifact") 1227 - |> Jsont.Object.mem "artifact" Atp.Blob_ref.jsont ~enc:(fun r -> r.artifact) 1228 - |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 617 + let input_jsont = 618 + Jsont.Object.map ~kind:"Input" 619 + (fun _typ branch did hidden_ref name source -> { branch; did; hidden_ref; name; source }) 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) 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) 1229 624 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1230 - |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1231 - |> Jsont.Object.mem "tag" Jsont.binary_string ~enc:(fun r -> r.tag) 625 + |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 626 + |> Jsont.Object.finish 627 + 628 + type output = { 629 + status : int; 630 + } 631 + 632 + let output_jsont = 633 + Jsont.Object.map ~kind:"Output" 634 + (fun _typ status -> { status }) 635 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkStatus#output" ~enc:(fun _ -> "sh.tangled.repo.forkStatus#output") 636 + |> Jsont.Object.mem "status" Jsont.int ~enc:(fun r -> r.status) 1232 637 |> Jsont.Object.finish 1233 638 1234 639 end 1235 - module Archive = struct 640 + module Branch = struct 641 + type signature = { 642 + email : string; 643 + name : string; 644 + when_ : string; 645 + } 646 + 647 + let signature_jsont = 648 + Jsont.Object.map ~kind:"Signature" 649 + (fun _typ email name when_ -> { email; name; when_ }) 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 "email" Jsont.string ~enc:(fun r -> r.email) 652 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 653 + |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 654 + |> Jsont.Object.finish 655 + 1236 656 type params = { 1237 - format : string option; 1238 - prefix : string option; 1239 - ref_ : string; 657 + name : string; 1240 658 repo : string; 1241 659 } 1242 660 1243 661 let params_jsont = 1244 662 Jsont.Object.map ~kind:"Params" 1245 - (fun format prefix ref_ repo -> { 1246 - format; 1247 - prefix; 1248 - ref_; 663 + (fun name repo -> { 664 + name; 1249 665 repo; 1250 666 }) 1251 - |> Jsont.Object.opt_mem "format" Jsont.string 1252 - ~enc:(fun r -> r.format) 1253 - |> Jsont.Object.opt_mem "prefix" Jsont.string 1254 - ~enc:(fun r -> r.prefix) 1255 - |> Jsont.Object.mem "ref" Jsont.string 1256 - ~enc:(fun r -> r.ref_) 667 + |> Jsont.Object.mem "name" Jsont.string 668 + ~enc:(fun r -> r.name) 1257 669 |> Jsont.Object.mem "repo" Jsont.string 1258 670 ~enc:(fun r -> r.repo) 1259 671 |> Jsont.Object.finish 1260 672 1261 - type output = unit 1262 - let output_jsont = Jsont.ignore 673 + type output = { 674 + author : signature option; 675 + hash : string; 676 + is_default : bool option; 677 + message : string option; 678 + name : string; 679 + short_hash : string option; 680 + when_ : string; 681 + } 682 + 683 + let output_jsont = 684 + Jsont.Object.map ~kind:"Output" 685 + (fun _typ author hash is_default message name short_hash when_ -> { author; hash; is_default; message; name; short_hash; when_ }) 686 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.branch#output" ~enc:(fun _ -> "sh.tangled.repo.branch#output") 687 + |> Jsont.Object.opt_mem "author" signature_jsont ~enc:(fun r -> r.author) 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) 692 + |> Jsont.Object.opt_mem "shortHash" Jsont.string ~enc:(fun r -> r.short_hash) 693 + |> Jsont.Object.mem "when" Jsont.string ~enc:(fun r -> r.when_) 694 + |> Jsont.Object.finish 1263 695 1264 696 end 1265 - module RemoveSecret = struct 697 + module DeleteBranch = struct 1266 698 type input = { 1267 - key : string; 699 + branch : string; 1268 700 repo : string; 1269 701 } 1270 702 1271 703 let input_jsont = 1272 704 Jsont.Object.map ~kind:"Input" 1273 - (fun _typ key repo -> { key; repo }) 1274 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.removeSecret#input" ~enc:(fun _ -> "sh.tangled.repo.removeSecret#input") 1275 - |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 705 + (fun _typ branch repo -> { branch; repo }) 706 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.deleteBranch#input" ~enc:(fun _ -> "sh.tangled.repo.deleteBranch#input") 707 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1276 708 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1277 709 |> Jsont.Object.finish 1278 710 1279 711 end 1280 - module Merge = struct 1281 - type input = { 1282 - author_email : string option; 1283 - author_name : string option; 1284 - branch : string; 1285 - commit_body : string option; 1286 - commit_message : string option; 1287 - did : string; 1288 - name : string; 1289 - patch : string; 712 + module Log = struct 713 + type params = { 714 + cursor : string option; 715 + limit : int option; 716 + path : string option; 717 + ref_ : string; 718 + repo : string; 1290 719 } 1291 720 1292 - let input_jsont = 1293 - Jsont.Object.map ~kind:"Input" 1294 - (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 }) 1295 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.merge#input" ~enc:(fun _ -> "sh.tangled.repo.merge#input") 1296 - |> Jsont.Object.opt_mem "authorEmail" Jsont.string ~enc:(fun r -> r.author_email) 1297 - |> Jsont.Object.opt_mem "authorName" Jsont.string ~enc:(fun r -> r.author_name) 1298 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1299 - |> Jsont.Object.opt_mem "commitBody" Jsont.string ~enc:(fun r -> r.commit_body) 1300 - |> Jsont.Object.opt_mem "commitMessage" Jsont.string ~enc:(fun r -> r.commit_message) 1301 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1302 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1303 - |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 721 + let params_jsont = 722 + Jsont.Object.map ~kind:"Params" 723 + (fun cursor limit path ref_ repo -> { 724 + cursor; 725 + limit; 726 + path; 727 + ref_; 728 + repo; 729 + }) 730 + |> Jsont.Object.opt_mem "cursor" Jsont.string 731 + ~enc:(fun r -> r.cursor) 732 + |> Jsont.Object.opt_mem "limit" Jsont.int 733 + ~enc:(fun r -> r.limit) 734 + |> Jsont.Object.opt_mem "path" Jsont.string 735 + ~enc:(fun r -> r.path) 736 + |> Jsont.Object.mem "ref" Jsont.string 737 + ~enc:(fun r -> r.ref_) 738 + |> Jsont.Object.mem "repo" Jsont.string 739 + ~enc:(fun r -> r.repo) 1304 740 |> Jsont.Object.finish 741 + 742 + type output = unit 743 + let output_jsont = Jsont.ignore 1305 744 1306 745 end 1307 746 module Blob = struct ··· 1407 846 |> Jsont.Object.finish 1408 847 1409 848 end 1410 - module HiddenRef = struct 849 + module RemoveSecret = struct 1411 850 type input = { 1412 - fork_ref : string; 1413 - remote_ref : string; 851 + key : string; 1414 852 repo : string; 1415 853 } 1416 854 1417 855 let input_jsont = 1418 856 Jsont.Object.map ~kind:"Input" 1419 - (fun _typ fork_ref remote_ref repo -> { fork_ref; remote_ref; repo }) 1420 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#input" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#input") 1421 - |> Jsont.Object.mem "forkRef" Jsont.string ~enc:(fun r -> r.fork_ref) 1422 - |> Jsont.Object.mem "remoteRef" Jsont.string ~enc:(fun r -> r.remote_ref) 857 + (fun _typ key repo -> { key; repo }) 858 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.removeSecret#input" ~enc:(fun _ -> "sh.tangled.repo.removeSecret#input") 859 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1423 860 |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1424 861 |> Jsont.Object.finish 1425 862 1426 - type output = { 1427 - error : string option; 863 + end 864 + module Languages = struct 865 + type language = { 866 + color : string option; 867 + extensions : string list option; 868 + file_count : int option; 869 + name : string; 870 + percentage : int; 871 + size : int; 872 + } 873 + 874 + let language_jsont = 875 + Jsont.Object.map ~kind:"Language" 876 + (fun _typ color extensions file_count name percentage size -> { color; extensions; file_count; name; percentage; size }) 877 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#language" ~enc:(fun _ -> "sh.tangled.repo.languages#language") 878 + |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 879 + |> Jsont.Object.opt_mem "extensions" (Jsont.list Jsont.string) ~enc:(fun r -> r.extensions) 880 + |> Jsont.Object.opt_mem "fileCount" Jsont.int ~enc:(fun r -> r.file_count) 881 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 882 + |> Jsont.Object.mem "percentage" Jsont.int ~enc:(fun r -> r.percentage) 883 + |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 884 + |> Jsont.Object.finish 885 + 886 + type params = { 1428 887 ref_ : string option; 1429 - success : bool; 888 + repo : string; 889 + } 890 + 891 + let params_jsont = 892 + Jsont.Object.map ~kind:"Params" 893 + (fun ref_ repo -> { 894 + ref_; 895 + repo; 896 + }) 897 + |> Jsont.Object.opt_mem "ref" Jsont.string 898 + ~enc:(fun r -> r.ref_) 899 + |> Jsont.Object.mem "repo" Jsont.string 900 + ~enc:(fun r -> r.repo) 901 + |> Jsont.Object.finish 902 + 903 + type output = { 904 + languages : language list; 905 + ref_ : string; 906 + total_files : int option; 907 + total_size : int option; 1430 908 } 1431 909 1432 910 let output_jsont = 1433 911 Jsont.Object.map ~kind:"Output" 1434 - (fun _typ error ref_ success -> { error; ref_; success }) 1435 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#output" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#output") 1436 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1437 - |> Jsont.Object.opt_mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1438 - |> Jsont.Object.mem "success" Jsont.bool ~enc:(fun r -> r.success) 912 + (fun _typ languages ref_ total_files total_size -> { languages; ref_; total_files; total_size }) 913 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#output" ~enc:(fun _ -> "sh.tangled.repo.languages#output") 914 + |> Jsont.Object.mem "languages" (Jsont.list language_jsont) ~enc:(fun r -> r.languages) 915 + |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 916 + |> Jsont.Object.opt_mem "totalFiles" Jsont.int ~enc:(fun r -> r.total_files) 917 + |> Jsont.Object.opt_mem "totalSize" Jsont.int ~enc:(fun r -> r.total_size) 1439 918 |> Jsont.Object.finish 1440 919 1441 920 end 1442 - module Compare = struct 921 + module Diff = struct 1443 922 type params = { 923 + ref_ : string; 1444 924 repo : string; 1445 - rev1 : string; 1446 - rev2 : string; 1447 925 } 1448 926 1449 927 let params_jsont = 1450 928 Jsont.Object.map ~kind:"Params" 1451 - (fun repo rev1 rev2 -> { 929 + (fun ref_ repo -> { 930 + ref_; 1452 931 repo; 1453 - rev1; 1454 - rev2; 1455 932 }) 933 + |> Jsont.Object.mem "ref" Jsont.string 934 + ~enc:(fun r -> r.ref_) 1456 935 |> Jsont.Object.mem "repo" Jsont.string 1457 936 ~enc:(fun r -> r.repo) 1458 - |> Jsont.Object.mem "rev1" Jsont.string 1459 - ~enc:(fun r -> r.rev1) 1460 - |> Jsont.Object.mem "rev2" Jsont.string 1461 - ~enc:(fun r -> r.rev2) 1462 937 |> Jsont.Object.finish 1463 938 1464 939 type output = unit 1465 940 let output_jsont = Jsont.ignore 1466 941 1467 942 end 1468 - module ForkStatus = struct 943 + module ForkSync = struct 1469 944 type input = { 1470 945 branch : string; 1471 946 did : string; 1472 - hidden_ref : string; 1473 947 name : string; 1474 948 source : string; 1475 949 } 1476 950 1477 951 let input_jsont = 1478 952 Jsont.Object.map ~kind:"Input" 1479 - (fun _typ branch did hidden_ref name source -> { branch; did; hidden_ref; name; source }) 1480 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkStatus#input" ~enc:(fun _ -> "sh.tangled.repo.forkStatus#input") 953 + (fun _typ branch did name source -> { branch; did; name; source }) 954 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkSync#input" ~enc:(fun _ -> "sh.tangled.repo.forkSync#input") 1481 955 |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1482 956 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1483 - |> Jsont.Object.mem "hiddenRef" Jsont.string ~enc:(fun r -> r.hidden_ref) 1484 957 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1485 958 |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 1486 959 |> Jsont.Object.finish 1487 960 1488 - type output = { 1489 - status : int; 961 + end 962 + module AddSecret = struct 963 + type input = { 964 + key : string; 965 + repo : string; 966 + value : string; 1490 967 } 1491 968 1492 - let output_jsont = 1493 - Jsont.Object.map ~kind:"Output" 1494 - (fun _typ status -> { status }) 1495 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkStatus#output" ~enc:(fun _ -> "sh.tangled.repo.forkStatus#output") 1496 - |> Jsont.Object.mem "status" Jsont.int ~enc:(fun r -> r.status) 969 + let input_jsont = 970 + Jsont.Object.map ~kind:"Input" 971 + (fun _typ key repo value -> { key; repo; value }) 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) 974 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 975 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1497 976 |> Jsont.Object.finish 1498 977 1499 978 end 1500 - module MergeCheck = struct 1501 - type conflict_info = { 1502 - filename : string; 1503 - reason : string; 1504 - } 1505 - 1506 - let conflict_info_jsont = 1507 - Jsont.Object.map ~kind:"Conflict_info" 1508 - (fun _typ filename reason -> { filename; reason }) 1509 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#conflictInfo" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#conflictInfo") 1510 - |> Jsont.Object.mem "filename" Jsont.string ~enc:(fun r -> r.filename) 1511 - |> Jsont.Object.mem "reason" Jsont.string ~enc:(fun r -> r.reason) 1512 - |> Jsont.Object.finish 1513 - 979 + module Delete = struct 1514 980 type input = { 1515 - branch : string; 1516 981 did : string; 1517 982 name : string; 1518 - patch : string; 983 + rkey : string; 1519 984 } 1520 985 1521 986 let input_jsont = 1522 987 Jsont.Object.map ~kind:"Input" 1523 - (fun _typ branch did name patch -> { branch; did; name; patch }) 1524 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#input" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#input") 1525 - |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 988 + (fun _typ did name rkey -> { did; name; rkey }) 989 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.delete#input" ~enc:(fun _ -> "sh.tangled.repo.delete#input") 1526 990 |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1527 991 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1528 - |> Jsont.Object.mem "patch" Jsont.string ~enc:(fun r -> r.patch) 992 + |> Jsont.Object.mem "rkey" Jsont.string ~enc:(fun r -> r.rkey) 993 + |> Jsont.Object.finish 994 + 995 + end 996 + module ListSecrets = struct 997 + type secret = { 998 + created_at : string; 999 + created_by : string; 1000 + key : string; 1001 + repo : string; 1002 + } 1003 + 1004 + let secret_jsont = 1005 + Jsont.Object.map ~kind:"Secret" 1006 + (fun _typ created_at created_by key repo -> { created_at; created_by; key; repo }) 1007 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#secret" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#secret") 1008 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1009 + |> Jsont.Object.mem "createdBy" Jsont.string ~enc:(fun r -> r.created_by) 1010 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1011 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1012 + |> Jsont.Object.finish 1013 + 1014 + type params = { 1015 + repo : string; 1016 + } 1017 + 1018 + let params_jsont = 1019 + Jsont.Object.map ~kind:"Params" 1020 + (fun repo -> { 1021 + repo; 1022 + }) 1023 + |> Jsont.Object.mem "repo" Jsont.string 1024 + ~enc:(fun r -> r.repo) 1529 1025 |> Jsont.Object.finish 1530 1026 1531 1027 type output = { 1532 - conflicts : conflict_info list option; 1533 - error : string option; 1534 - is_conflicted : bool; 1535 - message : string option; 1028 + secrets : secret list; 1536 1029 } 1537 1030 1538 1031 let output_jsont = 1539 1032 Jsont.Object.map ~kind:"Output" 1540 - (fun _typ conflicts error is_conflicted message -> { conflicts; error; is_conflicted; message }) 1541 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.mergeCheck#output" ~enc:(fun _ -> "sh.tangled.repo.mergeCheck#output") 1542 - |> Jsont.Object.opt_mem "conflicts" (Jsont.list conflict_info_jsont) ~enc:(fun r -> r.conflicts) 1543 - |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1544 - |> Jsont.Object.mem "is_conflicted" Jsont.bool ~enc:(fun r -> r.is_conflicted) 1545 - |> Jsont.Object.opt_mem "message" Jsont.string ~enc:(fun r -> r.message) 1033 + (fun _typ secrets -> { secrets }) 1034 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.listSecrets#output" ~enc:(fun _ -> "sh.tangled.repo.listSecrets#output") 1035 + |> Jsont.Object.mem "secrets" (Jsont.list secret_jsont) ~enc:(fun r -> r.secrets) 1546 1036 |> Jsont.Object.finish 1547 1037 1548 1038 end 1549 - module Branches = struct 1039 + module Archive = struct 1550 1040 type params = { 1551 - cursor : string option; 1552 - limit : int option; 1041 + format : string option; 1042 + prefix : string option; 1043 + ref_ : string; 1553 1044 repo : string; 1554 1045 } 1555 1046 1556 1047 let params_jsont = 1557 1048 Jsont.Object.map ~kind:"Params" 1558 - (fun cursor limit repo -> { 1559 - cursor; 1560 - limit; 1049 + (fun format prefix ref_ repo -> { 1050 + format; 1051 + prefix; 1052 + ref_; 1561 1053 repo; 1562 1054 }) 1563 - |> Jsont.Object.opt_mem "cursor" Jsont.string 1564 - ~enc:(fun r -> r.cursor) 1565 - |> Jsont.Object.opt_mem "limit" Jsont.int 1566 - ~enc:(fun r -> r.limit) 1055 + |> Jsont.Object.opt_mem "format" Jsont.string 1056 + ~enc:(fun r -> r.format) 1057 + |> Jsont.Object.opt_mem "prefix" Jsont.string 1058 + ~enc:(fun r -> r.prefix) 1059 + |> Jsont.Object.mem "ref" Jsont.string 1060 + ~enc:(fun r -> r.ref_) 1567 1061 |> Jsont.Object.mem "repo" Jsont.string 1568 1062 ~enc:(fun r -> r.repo) 1569 1063 |> Jsont.Object.finish ··· 1572 1066 let output_jsont = Jsont.ignore 1573 1067 1574 1068 end 1575 - module ForkSync = struct 1069 + module HiddenRef = struct 1576 1070 type input = { 1577 - branch : string; 1578 - did : string; 1579 - name : string; 1580 - source : string; 1071 + fork_ref : string; 1072 + remote_ref : string; 1073 + repo : string; 1581 1074 } 1582 1075 1583 1076 let input_jsont = 1584 1077 Jsont.Object.map ~kind:"Input" 1585 - (fun _typ branch did name source -> { branch; did; name; source }) 1586 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.forkSync#input" ~enc:(fun _ -> "sh.tangled.repo.forkSync#input") 1078 + (fun _typ fork_ref remote_ref repo -> { fork_ref; remote_ref; repo }) 1079 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#input" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#input") 1080 + |> Jsont.Object.mem "forkRef" Jsont.string ~enc:(fun r -> r.fork_ref) 1081 + |> Jsont.Object.mem "remoteRef" Jsont.string ~enc:(fun r -> r.remote_ref) 1082 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1083 + |> Jsont.Object.finish 1084 + 1085 + type output = { 1086 + error : string option; 1087 + ref_ : string option; 1088 + success : bool; 1089 + } 1090 + 1091 + let output_jsont = 1092 + Jsont.Object.map ~kind:"Output" 1093 + (fun _typ error ref_ success -> { error; ref_; success }) 1094 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.hiddenRef#output" ~enc:(fun _ -> "sh.tangled.repo.hiddenRef#output") 1095 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1096 + |> Jsont.Object.opt_mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1097 + |> Jsont.Object.mem "success" Jsont.bool ~enc:(fun r -> r.success) 1098 + |> Jsont.Object.finish 1099 + 1100 + end 1101 + module Pull = struct 1102 + type target = { 1103 + branch : string; 1104 + repo : string; 1105 + } 1106 + 1107 + let target_jsont = 1108 + Jsont.Object.map ~kind:"Target" 1109 + (fun _typ branch repo -> { branch; repo }) 1110 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#target" ~enc:(fun _ -> "sh.tangled.repo.pull#target") 1587 1111 |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1588 - |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1589 - |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1590 - |> Jsont.Object.mem "source" Jsont.string ~enc:(fun r -> r.source) 1112 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1113 + |> Jsont.Object.finish 1114 + 1115 + type source = { 1116 + branch : string; 1117 + repo : string option; 1118 + sha : string; 1119 + } 1120 + 1121 + let source_jsont = 1122 + Jsont.Object.map ~kind:"Source" 1123 + (fun _typ branch repo sha -> { branch; repo; sha }) 1124 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull#source" ~enc:(fun _ -> "sh.tangled.repo.pull#source") 1125 + |> Jsont.Object.mem "branch" Jsont.string ~enc:(fun r -> r.branch) 1126 + |> Jsont.Object.opt_mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1127 + |> Jsont.Object.mem "sha" Jsont.string ~enc:(fun r -> r.sha) 1128 + |> Jsont.Object.finish 1129 + 1130 + type main = { 1131 + body : string option; 1132 + created_at : string; 1133 + mentions : string list option; 1134 + patch : string option; 1135 + patch_blob : Atp.Blob_ref.t; 1136 + references : string list option; 1137 + source : source option; 1138 + target : target; 1139 + title : string; 1140 + } 1141 + 1142 + let main_jsont = 1143 + Jsont.Object.map ~kind:"Main" 1144 + (fun _typ body created_at mentions patch patch_blob references source target title -> { body; created_at; mentions; patch; patch_blob; references; source; target; title }) 1145 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull" ~enc:(fun _ -> "sh.tangled.repo.pull") 1146 + |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 1147 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1148 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1149 + |> Jsont.Object.opt_mem "patch" Jsont.string ~enc:(fun r -> r.patch) 1150 + |> Jsont.Object.mem "patchBlob" Atp.Blob_ref.jsont ~enc:(fun r -> r.patch_blob) 1151 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1152 + |> Jsont.Object.opt_mem "source" source_jsont ~enc:(fun r -> r.source) 1153 + |> Jsont.Object.mem "target" target_jsont ~enc:(fun r -> r.target) 1154 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1155 + |> Jsont.Object.finish 1156 + 1157 + module Comment = struct 1158 + type main = { 1159 + body : string; 1160 + created_at : string; 1161 + mentions : string list option; 1162 + pull : string; 1163 + references : string list option; 1164 + } 1165 + 1166 + let main_jsont = 1167 + Jsont.Object.map ~kind:"Main" 1168 + (fun _typ body created_at mentions pull references -> { body; created_at; mentions; pull; references }) 1169 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.comment" ~enc:(fun _ -> "sh.tangled.repo.pull.comment") 1170 + |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 1171 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1172 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1173 + |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 1174 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1175 + |> Jsont.Object.finish 1176 + 1177 + end 1178 + module Status = struct 1179 + type main = { 1180 + pull : string; 1181 + status : string; 1182 + } 1183 + 1184 + let main_jsont = 1185 + Jsont.Object.map ~kind:"Main" 1186 + (fun _typ pull status -> { pull; status }) 1187 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.pull.status" ~enc:(fun _ -> "sh.tangled.repo.pull.status") 1188 + |> Jsont.Object.mem "pull" Jsont.string ~enc:(fun r -> r.pull) 1189 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1190 + |> Jsont.Object.finish 1191 + 1192 + module Closed = struct 1193 + type main = string 1194 + let main_jsont = Jsont.string 1195 + 1196 + end 1197 + module Open = struct 1198 + type main = string 1199 + let main_jsont = Jsont.string 1200 + 1201 + end 1202 + module Merged = struct 1203 + type main = string 1204 + let main_jsont = Jsont.string 1205 + 1206 + end 1207 + end 1208 + end 1209 + module Issue = struct 1210 + type main = { 1211 + body : string option; 1212 + created_at : string; 1213 + mentions : string list option; 1214 + references : string list option; 1215 + repo : string; 1216 + title : string; 1217 + } 1218 + 1219 + let main_jsont = 1220 + Jsont.Object.map ~kind:"Main" 1221 + (fun _typ body created_at mentions references repo title -> { body; created_at; mentions; references; repo; title }) 1222 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue" ~enc:(fun _ -> "sh.tangled.repo.issue") 1223 + |> Jsont.Object.opt_mem "body" Jsont.string ~enc:(fun r -> r.body) 1224 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1225 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1226 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1227 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1228 + |> Jsont.Object.mem "title" Jsont.string ~enc:(fun r -> r.title) 1229 + |> Jsont.Object.finish 1230 + 1231 + module Comment = struct 1232 + type main = { 1233 + body : string; 1234 + created_at : string; 1235 + issue : string; 1236 + mentions : string list option; 1237 + references : string list option; 1238 + reply_to : string option; 1239 + } 1240 + 1241 + let main_jsont = 1242 + Jsont.Object.map ~kind:"Main" 1243 + (fun _typ body created_at issue mentions references reply_to -> { body; created_at; issue; mentions; references; reply_to }) 1244 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.comment" ~enc:(fun _ -> "sh.tangled.repo.issue.comment") 1245 + |> Jsont.Object.mem "body" Jsont.string ~enc:(fun r -> r.body) 1246 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1247 + |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 1248 + |> Jsont.Object.opt_mem "mentions" (Jsont.list Jsont.string) ~enc:(fun r -> r.mentions) 1249 + |> Jsont.Object.opt_mem "references" (Jsont.list Jsont.string) ~enc:(fun r -> r.references) 1250 + |> Jsont.Object.opt_mem "replyTo" Jsont.string ~enc:(fun r -> r.reply_to) 1591 1251 |> Jsont.Object.finish 1592 1252 1253 + end 1254 + module State = struct 1255 + type main = { 1256 + issue : string; 1257 + state : string; 1258 + } 1259 + 1260 + let main_jsont = 1261 + Jsont.Object.map ~kind:"Main" 1262 + (fun _typ issue state -> { issue; state }) 1263 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.issue.state" ~enc:(fun _ -> "sh.tangled.repo.issue.state") 1264 + |> Jsont.Object.mem "issue" Jsont.string ~enc:(fun r -> r.issue) 1265 + |> Jsont.Object.mem "state" Jsont.string ~enc:(fun r -> r.state) 1266 + |> Jsont.Object.finish 1267 + 1268 + module Closed = struct 1269 + type main = string 1270 + let main_jsont = Jsont.string 1271 + 1272 + end 1273 + module Open = struct 1274 + type main = string 1275 + let main_jsont = Jsont.string 1276 + 1277 + end 1278 + end 1593 1279 end 1594 - module Languages = struct 1595 - type language = { 1280 + end 1281 + module Label = struct 1282 + module Definition = struct 1283 + type value_type = { 1284 + enum : string list option; 1285 + format : string; 1286 + type_ : string; 1287 + } 1288 + 1289 + let value_type_jsont = 1290 + Jsont.Object.map ~kind:"Value_type" 1291 + (fun _typ enum format type_ -> { enum; format; type_ }) 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) 1295 + |> Jsont.Object.mem "type" Jsont.string ~enc:(fun r -> r.type_) 1296 + |> Jsont.Object.finish 1297 + 1298 + type main = { 1596 1299 color : string option; 1597 - extensions : string list option; 1598 - file_count : int option; 1300 + created_at : string; 1301 + multiple : bool option; 1599 1302 name : string; 1600 - percentage : int; 1601 - size : int; 1303 + scope : string list; 1304 + value_type : value_type; 1602 1305 } 1603 1306 1604 - let language_jsont = 1605 - Jsont.Object.map ~kind:"Language" 1606 - (fun _typ color extensions file_count name percentage size -> { color; extensions; file_count; name; percentage; size }) 1607 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#language" ~enc:(fun _ -> "sh.tangled.repo.languages#language") 1307 + let main_jsont = 1308 + Jsont.Object.map ~kind:"Main" 1309 + (fun _typ color created_at multiple name scope value_type -> { color; created_at; multiple; name; scope; value_type }) 1310 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.definition" ~enc:(fun _ -> "sh.tangled.label.definition") 1608 1311 |> Jsont.Object.opt_mem "color" Jsont.string ~enc:(fun r -> r.color) 1609 - |> Jsont.Object.opt_mem "extensions" (Jsont.list Jsont.string) ~enc:(fun r -> r.extensions) 1610 - |> Jsont.Object.opt_mem "fileCount" Jsont.int ~enc:(fun r -> r.file_count) 1312 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1313 + |> Jsont.Object.opt_mem "multiple" Jsont.bool ~enc:(fun r -> r.multiple) 1611 1314 |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1612 - |> Jsont.Object.mem "percentage" Jsont.int ~enc:(fun r -> r.percentage) 1613 - |> Jsont.Object.mem "size" Jsont.int ~enc:(fun r -> r.size) 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 + |> Jsont.Object.finish 1318 + 1319 + end 1320 + module Op = struct 1321 + type operand = { 1322 + key : string; 1323 + value : string; 1324 + } 1325 + 1326 + let operand_jsont = 1327 + Jsont.Object.map ~kind:"Operand" 1328 + (fun _typ key value -> { key; value }) 1329 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op#operand" ~enc:(fun _ -> "sh.tangled.label.op#operand") 1330 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1331 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1332 + |> Jsont.Object.finish 1333 + 1334 + type main = { 1335 + add : operand list; 1336 + delete : operand list; 1337 + performed_at : string; 1338 + subject : string; 1339 + } 1340 + 1341 + let main_jsont = 1342 + Jsont.Object.map ~kind:"Main" 1343 + (fun _typ add delete performed_at subject -> { add; delete; performed_at; subject }) 1344 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.label.op" ~enc:(fun _ -> "sh.tangled.label.op") 1345 + |> Jsont.Object.mem "add" (Jsont.list operand_jsont) ~enc:(fun r -> r.add) 1346 + |> Jsont.Object.mem "delete" (Jsont.list operand_jsont) ~enc:(fun r -> r.delete) 1347 + |> Jsont.Object.mem "performedAt" Jsont.string ~enc:(fun r -> r.performed_at) 1348 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1349 + |> Jsont.Object.finish 1350 + 1351 + end 1352 + end 1353 + module Graph = struct 1354 + module Follow = struct 1355 + type main = { 1356 + created_at : string; 1357 + subject : string; 1358 + } 1359 + 1360 + let main_jsont = 1361 + Jsont.Object.map ~kind:"Main" 1362 + (fun _typ created_at subject -> { created_at; subject }) 1363 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.graph.follow" ~enc:(fun _ -> "sh.tangled.graph.follow") 1364 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1365 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1366 + |> Jsont.Object.finish 1367 + 1368 + end 1369 + end 1370 + module Knot = struct 1371 + type main = { 1372 + created_at : string; 1373 + } 1374 + 1375 + let main_jsont = 1376 + Jsont.Object.map ~kind:"Main" 1377 + (fun _typ created_at -> { created_at }) 1378 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot" ~enc:(fun _ -> "sh.tangled.knot") 1379 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1380 + |> Jsont.Object.finish 1381 + 1382 + module Member = struct 1383 + type main = { 1384 + created_at : string; 1385 + domain : string; 1386 + subject : string; 1387 + } 1388 + 1389 + let main_jsont = 1390 + Jsont.Object.map ~kind:"Main" 1391 + (fun _typ created_at domain subject -> { created_at; domain; subject }) 1392 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.member" ~enc:(fun _ -> "sh.tangled.knot.member") 1393 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1394 + |> Jsont.Object.mem "domain" Jsont.string ~enc:(fun r -> r.domain) 1395 + |> Jsont.Object.mem "subject" Jsont.string ~enc:(fun r -> r.subject) 1396 + |> Jsont.Object.finish 1397 + 1398 + end 1399 + module ListKeys = struct 1400 + type public_key = { 1401 + created_at : string; 1402 + did : string; 1403 + key : string; 1404 + } 1405 + 1406 + let public_key_jsont = 1407 + Jsont.Object.map ~kind:"Public_key" 1408 + (fun _typ created_at did key -> { created_at; did; key }) 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) 1411 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1412 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1614 1413 |> Jsont.Object.finish 1615 1414 1616 1415 type params = { 1617 - ref_ : string option; 1618 - repo : string; 1416 + cursor : string option; 1417 + limit : int option; 1619 1418 } 1620 1419 1621 1420 let params_jsont = 1622 1421 Jsont.Object.map ~kind:"Params" 1623 - (fun ref_ repo -> { 1624 - ref_; 1625 - repo; 1422 + (fun cursor limit -> { 1423 + cursor; 1424 + limit; 1626 1425 }) 1627 - |> Jsont.Object.opt_mem "ref" Jsont.string 1628 - ~enc:(fun r -> r.ref_) 1629 - |> Jsont.Object.mem "repo" Jsont.string 1630 - ~enc:(fun r -> r.repo) 1426 + |> Jsont.Object.opt_mem "cursor" Jsont.string 1427 + ~enc:(fun r -> r.cursor) 1428 + |> Jsont.Object.opt_mem "limit" Jsont.int 1429 + ~enc:(fun r -> r.limit) 1631 1430 |> Jsont.Object.finish 1632 1431 1633 1432 type output = { 1634 - languages : language list; 1635 - ref_ : string; 1636 - total_files : int option; 1637 - total_size : int option; 1433 + cursor : string option; 1434 + keys : public_key list; 1638 1435 } 1639 1436 1640 1437 let output_jsont = 1641 1438 Jsont.Object.map ~kind:"Output" 1642 - (fun _typ languages ref_ total_files total_size -> { languages; ref_; total_files; total_size }) 1643 - |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.repo.languages#output" ~enc:(fun _ -> "sh.tangled.repo.languages#output") 1644 - |> Jsont.Object.mem "languages" (Jsont.list language_jsont) ~enc:(fun r -> r.languages) 1439 + (fun _typ cursor keys -> { cursor; keys }) 1440 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.listKeys#output" ~enc:(fun _ -> "sh.tangled.knot.listKeys#output") 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 + |> Jsont.Object.finish 1444 + 1445 + end 1446 + module Version = struct 1447 + type output = { 1448 + version : string; 1449 + } 1450 + 1451 + let output_jsont = 1452 + Jsont.Object.map ~kind:"Output" 1453 + (fun _typ version -> { version }) 1454 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.knot.version#output" ~enc:(fun _ -> "sh.tangled.knot.version#output") 1455 + |> Jsont.Object.mem "version" Jsont.string ~enc:(fun r -> r.version) 1456 + |> Jsont.Object.finish 1457 + 1458 + end 1459 + end 1460 + module Owner = struct 1461 + type output = { 1462 + owner : string; 1463 + } 1464 + 1465 + let output_jsont = 1466 + Jsont.Object.map ~kind:"Output" 1467 + (fun _typ owner -> { owner }) 1468 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.owner#output" ~enc:(fun _ -> "sh.tangled.owner#output") 1469 + |> Jsont.Object.mem "owner" Jsont.string ~enc:(fun r -> r.owner) 1470 + |> Jsont.Object.finish 1471 + 1472 + end 1473 + module PublicKey = struct 1474 + type main = { 1475 + created_at : string; 1476 + key : string; 1477 + name : string; 1478 + } 1479 + 1480 + let main_jsont = 1481 + Jsont.Object.map ~kind:"Main" 1482 + (fun _typ created_at key name -> { created_at; key; name }) 1483 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.publicKey" ~enc:(fun _ -> "sh.tangled.publicKey") 1484 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1485 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1486 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1487 + |> Jsont.Object.finish 1488 + 1489 + end 1490 + module Pipeline = struct 1491 + type trigger_repo = { 1492 + default_branch : string; 1493 + did : string; 1494 + knot : string; 1495 + repo : string; 1496 + } 1497 + 1498 + let trigger_repo_jsont = 1499 + Jsont.Object.map ~kind:"Trigger_repo" 1500 + (fun _typ default_branch did knot repo -> { default_branch; did; knot; repo }) 1501 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerRepo" ~enc:(fun _ -> "sh.tangled.pipeline#triggerRepo") 1502 + |> Jsont.Object.mem "defaultBranch" Jsont.string ~enc:(fun r -> r.default_branch) 1503 + |> Jsont.Object.mem "did" Jsont.string ~enc:(fun r -> r.did) 1504 + |> Jsont.Object.mem "knot" Jsont.string ~enc:(fun r -> r.knot) 1505 + |> Jsont.Object.mem "repo" Jsont.string ~enc:(fun r -> r.repo) 1506 + |> Jsont.Object.finish 1507 + 1508 + type push_trigger_data = { 1509 + new_sha : string; 1510 + old_sha : string; 1511 + ref_ : string; 1512 + } 1513 + 1514 + let push_trigger_data_jsont = 1515 + Jsont.Object.map ~kind:"Push_trigger_data" 1516 + (fun _typ new_sha old_sha ref_ -> { new_sha; old_sha; ref_ }) 1517 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pushTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pushTriggerData") 1518 + |> Jsont.Object.mem "newSha" Jsont.string ~enc:(fun r -> r.new_sha) 1519 + |> Jsont.Object.mem "oldSha" Jsont.string ~enc:(fun r -> r.old_sha) 1645 1520 |> Jsont.Object.mem "ref" Jsont.string ~enc:(fun r -> r.ref_) 1646 - |> Jsont.Object.opt_mem "totalFiles" Jsont.int ~enc:(fun r -> r.total_files) 1647 - |> Jsont.Object.opt_mem "totalSize" Jsont.int ~enc:(fun r -> r.total_size) 1521 + |> Jsont.Object.finish 1522 + 1523 + type pull_request_trigger_data = { 1524 + action : string; 1525 + source_branch : string; 1526 + source_sha : string; 1527 + target_branch : string; 1528 + } 1529 + 1530 + let pull_request_trigger_data_jsont = 1531 + Jsont.Object.map ~kind:"Pull_request_trigger_data" 1532 + (fun _typ action source_branch source_sha target_branch -> { action; source_branch; source_sha; target_branch }) 1533 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pullRequestTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#pullRequestTriggerData") 1534 + |> Jsont.Object.mem "action" Jsont.string ~enc:(fun r -> r.action) 1535 + |> Jsont.Object.mem "sourceBranch" Jsont.string ~enc:(fun r -> r.source_branch) 1536 + |> Jsont.Object.mem "sourceSha" Jsont.string ~enc:(fun r -> r.source_sha) 1537 + |> Jsont.Object.mem "targetBranch" Jsont.string ~enc:(fun r -> r.target_branch) 1538 + |> Jsont.Object.finish 1539 + 1540 + type pair = { 1541 + key : string; 1542 + value : string; 1543 + } 1544 + 1545 + let pair_jsont = 1546 + Jsont.Object.map ~kind:"Pair" 1547 + (fun _typ key value -> { key; value }) 1548 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#pair" ~enc:(fun _ -> "sh.tangled.pipeline#pair") 1549 + |> Jsont.Object.mem "key" Jsont.string ~enc:(fun r -> r.key) 1550 + |> Jsont.Object.mem "value" Jsont.string ~enc:(fun r -> r.value) 1551 + |> Jsont.Object.finish 1552 + 1553 + type clone_opts = { 1554 + depth : int; 1555 + skip : bool; 1556 + submodules : bool; 1557 + } 1558 + 1559 + let clone_opts_jsont = 1560 + Jsont.Object.map ~kind:"Clone_opts" 1561 + (fun _typ depth skip submodules -> { depth; skip; submodules }) 1562 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#cloneOpts" ~enc:(fun _ -> "sh.tangled.pipeline#cloneOpts") 1563 + |> Jsont.Object.mem "depth" Jsont.int ~enc:(fun r -> r.depth) 1564 + |> Jsont.Object.mem "skip" Jsont.bool ~enc:(fun r -> r.skip) 1565 + |> Jsont.Object.mem "submodules" Jsont.bool ~enc:(fun r -> r.submodules) 1566 + |> Jsont.Object.finish 1567 + 1568 + type workflow = { 1569 + clone : clone_opts; 1570 + engine : string; 1571 + name : string; 1572 + raw : string; 1573 + } 1574 + 1575 + let workflow_jsont = 1576 + Jsont.Object.map ~kind:"Workflow" 1577 + (fun _typ clone engine name raw -> { clone; engine; name; raw }) 1578 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#workflow" ~enc:(fun _ -> "sh.tangled.pipeline#workflow") 1579 + |> Jsont.Object.mem "clone" clone_opts_jsont ~enc:(fun r -> r.clone) 1580 + |> Jsont.Object.mem "engine" Jsont.string ~enc:(fun r -> r.engine) 1581 + |> Jsont.Object.mem "name" Jsont.string ~enc:(fun r -> r.name) 1582 + |> Jsont.Object.mem "raw" Jsont.string ~enc:(fun r -> r.raw) 1583 + |> Jsont.Object.finish 1584 + 1585 + type manual_trigger_data = { 1586 + inputs : pair list option; 1587 + } 1588 + 1589 + let manual_trigger_data_jsont = 1590 + Jsont.Object.map ~kind:"Manual_trigger_data" 1591 + (fun _typ inputs -> { inputs }) 1592 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#manualTriggerData" ~enc:(fun _ -> "sh.tangled.pipeline#manualTriggerData") 1593 + |> Jsont.Object.opt_mem "inputs" (Jsont.list pair_jsont) ~enc:(fun r -> r.inputs) 1594 + |> Jsont.Object.finish 1595 + 1596 + type trigger_metadata = { 1597 + kind : string; 1598 + manual : manual_trigger_data option; 1599 + pull_request : pull_request_trigger_data option; 1600 + push : push_trigger_data option; 1601 + repo : trigger_repo; 1602 + } 1603 + 1604 + let trigger_metadata_jsont = 1605 + Jsont.Object.map ~kind:"Trigger_metadata" 1606 + (fun _typ kind manual pull_request push repo -> { kind; manual; pull_request; push; repo }) 1607 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline#triggerMetadata" ~enc:(fun _ -> "sh.tangled.pipeline#triggerMetadata") 1608 + |> Jsont.Object.mem "kind" Jsont.string ~enc:(fun r -> r.kind) 1609 + |> Jsont.Object.opt_mem "manual" manual_trigger_data_jsont ~enc:(fun r -> r.manual) 1610 + |> Jsont.Object.opt_mem "pullRequest" pull_request_trigger_data_jsont ~enc:(fun r -> r.pull_request) 1611 + |> Jsont.Object.opt_mem "push" push_trigger_data_jsont ~enc:(fun r -> r.push) 1612 + |> Jsont.Object.mem "repo" trigger_repo_jsont ~enc:(fun r -> r.repo) 1613 + |> Jsont.Object.finish 1614 + 1615 + type main = { 1616 + trigger_metadata : trigger_metadata; 1617 + workflows : workflow list; 1618 + } 1619 + 1620 + let main_jsont = 1621 + Jsont.Object.map ~kind:"Main" 1622 + (fun _typ trigger_metadata workflows -> { trigger_metadata; workflows }) 1623 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline" ~enc:(fun _ -> "sh.tangled.pipeline") 1624 + |> Jsont.Object.mem "triggerMetadata" trigger_metadata_jsont ~enc:(fun r -> r.trigger_metadata) 1625 + |> Jsont.Object.mem "workflows" (Jsont.list workflow_jsont) ~enc:(fun r -> r.workflows) 1626 + |> Jsont.Object.finish 1627 + 1628 + module Status = struct 1629 + type main = { 1630 + created_at : string; 1631 + error : string option; 1632 + exit_code : int option; 1633 + pipeline : string; 1634 + status : string; 1635 + workflow : string; 1636 + } 1637 + 1638 + let main_jsont = 1639 + Jsont.Object.map ~kind:"Main" 1640 + (fun _typ created_at error exit_code pipeline status workflow -> { created_at; error; exit_code; pipeline; status; workflow }) 1641 + |> Jsont.Object.mem "$type" Jsont.string ~dec_absent:"sh.tangled.pipeline.status" ~enc:(fun _ -> "sh.tangled.pipeline.status") 1642 + |> Jsont.Object.mem "createdAt" Jsont.string ~enc:(fun r -> r.created_at) 1643 + |> Jsont.Object.opt_mem "error" Jsont.string ~enc:(fun r -> r.error) 1644 + |> Jsont.Object.opt_mem "exitCode" Jsont.int ~enc:(fun r -> r.exit_code) 1645 + |> Jsont.Object.mem "pipeline" Jsont.string ~enc:(fun r -> r.pipeline) 1646 + |> Jsont.Object.mem "status" Jsont.string ~enc:(fun r -> r.status) 1647 + |> Jsont.Object.mem "workflow" Jsont.string ~enc:(fun r -> r.workflow) 1648 1648 |> Jsont.Object.finish 1649 1649 1650 1650 end
+639 -639
lexicons/tangled/atp_lexicon_tangled.mli
··· 12 12 13 13 module Sh : sig 14 14 module Tangled : sig 15 - module Actor : sig 16 - module Profile : sig 17 - (** A declaration of a Tangled account profile. *) 18 - 19 - type main = { 20 - bluesky : bool; (** Include link to this account on Bluesky. *) 21 - description : string option; (** Free-form profile description text. *) 22 - links : string list option; 23 - location : string option; (** Free-form location text. *) 24 - pinned_repositories : string list option; (** Any ATURI, it is up to appviews to validate these fields. *) 25 - pronouns : string option; (** Preferred gender pronouns. *) 26 - stats : string list option; 27 - } 28 - 29 - (** Jsont codec for {!type:main}. *) 30 - val main_jsont : main Jsont.t 31 - 32 - end 33 - end 34 - module Owner : sig 35 - (** Get the owner of a service *) 36 - 37 - 38 - type output = { 39 - owner : string; 40 - } 41 - 42 - (** Jsont codec for {!type:output}. *) 43 - val output_jsont : output Jsont.t 44 - 45 - end 46 15 module Spindle : sig 47 16 48 17 type main = { ··· 65 34 66 35 end 67 36 end 68 - module Pipeline : sig 69 - 70 - type trigger_repo = { 71 - default_branch : string; 72 - did : string; 73 - knot : string; 74 - repo : string; 75 - } 76 - 77 - (** Jsont codec for {!type:trigger_repo}. *) 78 - val trigger_repo_jsont : trigger_repo Jsont.t 79 - 80 - 81 - type push_trigger_data = { 82 - new_sha : string; 83 - old_sha : string; 84 - ref_ : string; 85 - } 86 - 87 - (** Jsont codec for {!type:push_trigger_data}. *) 88 - val push_trigger_data_jsont : push_trigger_data Jsont.t 89 - 90 - 91 - type pull_request_trigger_data = { 92 - action : string; 93 - source_branch : string; 94 - source_sha : string; 95 - target_branch : string; 96 - } 97 - 98 - (** Jsont codec for {!type:pull_request_trigger_data}. *) 99 - val pull_request_trigger_data_jsont : pull_request_trigger_data Jsont.t 100 - 37 + module Git : sig 38 + module RefUpdate : sig 101 39 102 - type pair = { 103 - key : string; 104 - value : string; 40 + type individual_language_size = { 41 + lang : string; 42 + size : int; 105 43 } 106 44 107 - (** Jsont codec for {!type:pair}. *) 108 - val pair_jsont : pair Jsont.t 45 + (** Jsont codec for {!type:individual_language_size}. *) 46 + val individual_language_size_jsont : individual_language_size Jsont.t 109 47 110 48 111 - type clone_opts = { 112 - depth : int; 113 - skip : bool; 114 - submodules : bool; 49 + type individual_email_commit_count = { 50 + count : int; 51 + email : string; 115 52 } 116 53 117 - (** Jsont codec for {!type:clone_opts}. *) 118 - val clone_opts_jsont : clone_opts Jsont.t 54 + (** Jsont codec for {!type:individual_email_commit_count}. *) 55 + val individual_email_commit_count_jsont : individual_email_commit_count Jsont.t 119 56 120 57 121 - type workflow = { 122 - clone : clone_opts; 123 - engine : string; 124 - name : string; 125 - raw : string; 58 + type lang_breakdown = { 59 + inputs : individual_language_size list option; 126 60 } 127 61 128 - (** Jsont codec for {!type:workflow}. *) 129 - val workflow_jsont : workflow Jsont.t 62 + (** Jsont codec for {!type:lang_breakdown}. *) 63 + val lang_breakdown_jsont : lang_breakdown Jsont.t 130 64 131 65 132 - type manual_trigger_data = { 133 - inputs : pair list option; 66 + type commit_count_breakdown = { 67 + by_email : individual_email_commit_count list option; 134 68 } 135 69 136 - (** Jsont codec for {!type:manual_trigger_data}. *) 137 - val manual_trigger_data_jsont : manual_trigger_data Jsont.t 70 + (** Jsont codec for {!type:commit_count_breakdown}. *) 71 + val commit_count_breakdown_jsont : commit_count_breakdown Jsont.t 138 72 139 73 140 - type trigger_metadata = { 141 - kind : string; 142 - manual : manual_trigger_data option; 143 - pull_request : pull_request_trigger_data option; 144 - push : push_trigger_data option; 145 - repo : trigger_repo; 74 + type meta = { 75 + commit_count : commit_count_breakdown; 76 + is_default_ref : bool; 77 + lang_breakdown : lang_breakdown option; 146 78 } 147 79 148 - (** Jsont codec for {!type:trigger_metadata}. *) 149 - val trigger_metadata_jsont : trigger_metadata Jsont.t 80 + (** Jsont codec for {!type:meta}. *) 81 + val meta_jsont : meta Jsont.t 150 82 83 + (** An update to a git repository, emitted by knots. *) 151 84 152 85 type main = { 153 - trigger_metadata : trigger_metadata; 154 - workflows : workflow list; 86 + committer_did : string; (** did of the user that pushed this ref *) 87 + meta : meta; 88 + new_sha : string; (** new SHA of this ref *) 89 + old_sha : string; (** old SHA of this ref *) 90 + ref_ : string; (** Ref being updated *) 91 + repo_did : string; (** did of the owner of the repo *) 92 + repo_name : string; (** name of the repo *) 155 93 } 156 94 157 95 (** Jsont codec for {!type:main}. *) 158 96 val main_jsont : main Jsont.t 159 97 160 - module Status : sig 98 + end 99 + end 100 + module Actor : sig 101 + module Profile : sig 102 + (** A declaration of a Tangled account profile. *) 161 103 162 104 type main = { 163 - created_at : string; (** time of creation of this status update *) 164 - error : string option; (** error message if failed *) 165 - exit_code : int option; (** exit code if failed *) 166 - pipeline : string; (** ATURI of the pipeline *) 167 - status : string; (** status of the workflow *) 168 - workflow : string; (** name of the workflow within this pipeline *) 105 + bluesky : bool; (** Include link to this account on Bluesky. *) 106 + description : string option; (** Free-form profile description text. *) 107 + links : string list option; 108 + location : string option; (** Free-form location text. *) 109 + pinned_repositories : string list option; (** Any ATURI, it is up to appviews to validate these fields. *) 110 + pronouns : string option; (** Preferred gender pronouns. *) 111 + stats : string list option; 169 112 } 170 113 171 114 (** Jsont codec for {!type:main}. *) ··· 173 116 174 117 end 175 118 end 176 - module Knot : sig 119 + module String : sig 177 120 178 121 type main = { 122 + contents : string; 179 123 created_at : string; 124 + description : string; 125 + filename : string; 180 126 } 181 127 182 128 (** Jsont codec for {!type:main}. *) 183 129 val main_jsont : main Jsont.t 184 130 185 - module Version : sig 186 - (** Get the version of a knot *) 187 - 188 - 189 - type output = { 190 - version : string; 191 - } 192 - 193 - (** Jsont codec for {!type:output}. *) 194 - val output_jsont : output Jsont.t 195 - 196 - end 197 - module ListKeys : sig 198 - 199 - type public_key = { 200 - created_at : string; (** Key upload timestamp *) 201 - did : string; (** DID associated with the public key *) 202 - key : string; (** Public key contents *) 203 - } 204 - 205 - (** Jsont codec for {!type:public_key}. *) 206 - val public_key_jsont : public_key Jsont.t 207 - 208 - (** List all public keys stored in the knot server *) 209 - 210 - (** Query/procedure parameters. *) 211 - type params = { 212 - cursor : string option; (** Pagination cursor *) 213 - limit : int option; (** Maximum number of keys to return *) 214 - } 215 - 216 - (** Jsont codec for {!type:params}. *) 217 - val params_jsont : params Jsont.t 218 - 219 - 220 - type output = { 221 - cursor : string option; (** Pagination cursor for next page *) 222 - keys : public_key list; 223 - } 224 - 225 - (** Jsont codec for {!type:output}. *) 226 - val output_jsont : output Jsont.t 227 - 228 - end 229 - module Member : sig 131 + end 132 + module Feed : sig 133 + module Star : sig 230 134 231 135 type main = { 232 136 created_at : string; 233 - domain : string; (** domain that this member now belongs to *) 234 137 subject : string; 235 138 } 236 139 ··· 238 141 val main_jsont : main Jsont.t 239 142 240 143 end 241 - end 242 - module Label : sig 243 - module Op : sig 244 - 245 - type operand = { 246 - key : string; (** ATURI to the label definition *) 247 - value : string; (** Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value. *) 248 - } 249 - 250 - (** Jsont codec for {!type:operand}. *) 251 - val operand_jsont : operand Jsont.t 252 - 144 + module Reaction : sig 253 145 254 146 type main = { 255 - add : operand list; 256 - delete : operand list; 257 - performed_at : string; 258 - subject : string; (** The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. *) 147 + created_at : string; 148 + reaction : string; 149 + subject : string; 259 150 } 260 151 261 152 (** Jsont codec for {!type:main}. *) 262 153 val main_jsont : main Jsont.t 263 154 264 155 end 265 - module Definition : sig 266 - 267 - type value_type = { 268 - enum : string list option; (** Closed set of values that this label can take. *) 269 - format : string; (** An optional constraint that can be applied on string concrete types. *) 270 - type_ : string; (** The concrete type of this label's value. *) 271 - } 272 - 273 - (** Jsont codec for {!type:value_type}. *) 274 - val value_type_jsont : value_type Jsont.t 275 - 156 + end 157 + module Repo : sig 276 158 277 159 type main = { 278 - color : string option; (** The hex value for the background color for the label. Appviews may choose to respect this. *) 279 160 created_at : string; 280 - multiple : bool option; (** Whether this label can be repeated for a given entity, eg.: \[reviewer:foo, reviewer:bar\] *) 281 - name : string; (** The display name of this label. *) 282 - scope : string list; (** The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this. *) 283 - value_type : value_type; (** The type definition of this label. Appviews may allow sorting for certain types. *) 161 + description : string option; 162 + knot : string; (** knot where the repo was created *) 163 + labels : string list option; (** List of labels that this repo subscribes to *) 164 + name : string; (** name of the repo *) 165 + source : string option; (** source of the repo *) 166 + spindle : string option; (** CI runner to send jobs to and receive results from *) 167 + topics : string list option; (** Topics related to the repo *) 168 + website : string option; (** Any URI related to the repo *) 284 169 } 285 170 286 171 (** Jsont codec for {!type:main}. *) 287 172 val main_jsont : main Jsont.t 288 173 289 - end 290 - end 291 - module Feed : sig 292 - module Reaction : sig 174 + module Artifact : sig 293 175 294 176 type main = { 295 - created_at : string; 296 - reaction : string; 297 - subject : string; 177 + artifact : Atp.Blob_ref.t; (** the artifact *) 178 + created_at : string; (** time of creation of this artifact *) 179 + name : string; (** name of the artifact *) 180 + repo : string; (** repo that this artifact is being uploaded to *) 181 + tag : string; (** hash of the tag object that this artifact is attached to (only annotated tags are supported) *) 298 182 } 299 183 300 184 (** Jsont codec for {!type:main}. *) 301 185 val main_jsont : main Jsont.t 302 186 303 187 end 304 - module Star : sig 188 + module MergeCheck : sig 305 189 306 - type main = { 307 - created_at : string; 308 - subject : string; 190 + type conflict_info = { 191 + filename : string; (** Name of the conflicted file *) 192 + reason : string; (** Reason for the conflict *) 309 193 } 310 194 311 - (** Jsont codec for {!type:main}. *) 312 - val main_jsont : main Jsont.t 195 + (** Jsont codec for {!type:conflict_info}. *) 196 + val conflict_info_jsont : conflict_info Jsont.t 313 197 314 - end 315 - end 316 - module PublicKey : sig 198 + (** Check if a merge is possible between two branches *) 317 199 318 - type main = { 319 - created_at : string; (** key upload timestamp *) 320 - key : string; (** public key contents *) 321 - name : string; (** human-readable name for this key *) 200 + 201 + type input = { 202 + branch : string; (** Target branch to merge into *) 203 + did : string; (** DID of the repository owner *) 204 + name : string; (** Name of the repository *) 205 + patch : string; (** Patch or pull request to check for merge conflicts *) 322 206 } 323 207 324 - (** Jsont codec for {!type:main}. *) 325 - val main_jsont : main Jsont.t 208 + (** Jsont codec for {!type:input}. *) 209 + val input_jsont : input Jsont.t 326 210 327 - end 328 - module Graph : sig 329 - module Follow : sig 330 211 331 - type main = { 332 - created_at : string; 333 - subject : string; 212 + type output = { 213 + conflicts : conflict_info list option; (** List of files with merge conflicts *) 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 *) 334 217 } 335 218 336 - (** Jsont codec for {!type:main}. *) 337 - val main_jsont : main Jsont.t 219 + (** Jsont codec for {!type:output}. *) 220 + val output_jsont : output Jsont.t 338 221 339 222 end 340 - end 341 - module Git : sig 342 - module RefUpdate : sig 223 + module Tree : sig 343 224 344 - type individual_language_size = { 345 - lang : string; 346 - size : int; 225 + type readme = { 226 + contents : string; (** Contents of the readme file *) 227 + filename : string; (** Name of the readme file *) 347 228 } 348 229 349 - (** Jsont codec for {!type:individual_language_size}. *) 350 - val individual_language_size_jsont : individual_language_size Jsont.t 230 + (** Jsont codec for {!type:readme}. *) 231 + val readme_jsont : readme Jsont.t 351 232 352 233 353 - type individual_email_commit_count = { 354 - count : int; 355 - email : string; 234 + type last_commit = { 235 + hash : string; (** Commit hash *) 236 + message : string; (** Commit message *) 237 + when_ : string; (** Commit timestamp *) 356 238 } 357 239 358 - (** Jsont codec for {!type:individual_email_commit_count}. *) 359 - val individual_email_commit_count_jsont : individual_email_commit_count Jsont.t 240 + (** Jsont codec for {!type:last_commit}. *) 241 + val last_commit_jsont : last_commit Jsont.t 360 242 361 243 362 - type lang_breakdown = { 363 - inputs : individual_language_size list option; 244 + type tree_entry = { 245 + last_commit : last_commit option; 246 + mode : string; (** File mode *) 247 + name : string; (** Relative file or directory name *) 248 + size : int; (** File size in bytes *) 364 249 } 365 250 366 - (** Jsont codec for {!type:lang_breakdown}. *) 367 - val lang_breakdown_jsont : lang_breakdown Jsont.t 251 + (** Jsont codec for {!type:tree_entry}. *) 252 + val tree_entry_jsont : tree_entry Jsont.t 368 253 369 254 370 - type commit_count_breakdown = { 371 - by_email : individual_email_commit_count list option; 255 + (** Query/procedure parameters. *) 256 + type params = { 257 + path : string option; (** Path within the repository tree *) 258 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 259 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 372 260 } 373 261 374 - (** Jsont codec for {!type:commit_count_breakdown}. *) 375 - val commit_count_breakdown_jsont : commit_count_breakdown Jsont.t 262 + (** Jsont codec for {!type:params}. *) 263 + val params_jsont : params Jsont.t 376 264 377 265 378 - type meta = { 379 - commit_count : commit_count_breakdown; 380 - is_default_ref : bool; 381 - lang_breakdown : lang_breakdown option; 266 + type output = { 267 + dotdot : string option; (** Parent directory path *) 268 + files : tree_entry list; 269 + parent : string option; (** The parent path in the tree *) 270 + readme : readme option; (** Readme for this file tree *) 271 + ref_ : string; (** The git reference used *) 382 272 } 383 273 384 - (** Jsont codec for {!type:meta}. *) 385 - val meta_jsont : meta Jsont.t 274 + (** Jsont codec for {!type:output}. *) 275 + val output_jsont : output Jsont.t 386 276 387 - (** An update to a git repository, emitted by knots. *) 277 + end 278 + module SetDefaultBranch : sig 279 + (** Set the default branch for a repository *) 388 280 389 - type main = { 390 - committer_did : string; (** did of the user that pushed this ref *) 391 - meta : meta; 392 - new_sha : string; (** new SHA of this ref *) 393 - old_sha : string; (** old SHA of this ref *) 394 - ref_ : string; (** Ref being updated *) 395 - repo_did : string; (** did of the owner of the repo *) 396 - repo_name : string; (** name of the repo *) 281 + 282 + type input = { 283 + default_branch : string; 284 + repo : string; 397 285 } 398 286 399 - (** Jsont codec for {!type:main}. *) 400 - val main_jsont : main Jsont.t 287 + (** Jsont codec for {!type:input}. *) 288 + val input_jsont : input Jsont.t 401 289 402 290 end 403 - end 404 - module String : sig 291 + module Compare : sig 405 292 406 - type main = { 407 - contents : string; 408 - created_at : string; 409 - description : string; 410 - filename : string; 293 + (** Query/procedure parameters. *) 294 + type params = { 295 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 296 + rev1 : string; (** First revision (commit, branch, or tag) *) 297 + rev2 : string; (** Second revision (commit, branch, or tag) *) 411 298 } 412 299 413 - (** Jsont codec for {!type:main}. *) 414 - val main_jsont : main Jsont.t 300 + (** Jsont codec for {!type:params}. *) 301 + val params_jsont : params Jsont.t 415 302 416 - end 417 - module Repo : sig 303 + (** Compare output in application/json *) 418 304 419 - type main = { 420 - created_at : string; 421 - description : string option; 422 - knot : string; (** knot where the repo was created *) 423 - labels : string list option; (** List of labels that this repo subscribes to *) 424 - name : string; (** name of the repo *) 425 - source : string option; (** source of the repo *) 426 - spindle : string option; (** CI runner to send jobs to and receive results from *) 427 - topics : string list option; (** Topics related to the repo *) 428 - website : string option; (** Any URI related to the repo *) 429 - } 305 + type output = unit 306 + val output_jsont : output Jsont.t 430 307 431 - (** Jsont codec for {!type:main}. *) 432 - val main_jsont : main Jsont.t 308 + end 309 + module Merge : sig 310 + (** Merge a patch into a repository branch *) 433 311 434 - module Issue : sig 435 312 436 - type main = { 437 - body : string option; 438 - created_at : string; 439 - mentions : string list option; 440 - references : string list option; 441 - repo : string; 442 - title : string; 313 + type input = { 314 + author_email : string option; (** Author email for the merge commit *) 315 + author_name : string option; (** Author name for the merge commit *) 316 + branch : string; (** Target branch to merge into *) 317 + commit_body : string option; (** Additional commit message body *) 318 + commit_message : string option; (** Merge commit message *) 319 + did : string; (** DID of the repository owner *) 320 + name : string; (** Name of the repository *) 321 + patch : string; (** Patch content to merge *) 443 322 } 444 323 445 - (** Jsont codec for {!type:main}. *) 446 - val main_jsont : main Jsont.t 324 + (** Jsont codec for {!type:input}. *) 325 + val input_jsont : input Jsont.t 447 326 448 - module Comment : sig 327 + end 328 + module Tags : sig 449 329 450 - type main = { 451 - body : string; 452 - created_at : string; 453 - issue : string; 454 - mentions : string list option; 455 - references : string list option; 456 - reply_to : string option; 330 + (** Query/procedure parameters. *) 331 + type params = { 332 + cursor : string option; (** Pagination cursor *) 333 + limit : int option; (** Maximum number of tags to return *) 334 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 457 335 } 458 336 459 - (** Jsont codec for {!type:main}. *) 460 - val main_jsont : main Jsont.t 337 + (** Jsont codec for {!type:params}. *) 338 + val params_jsont : params Jsont.t 461 339 462 - end 463 - module State : sig 340 + 341 + type output = unit 342 + val output_jsont : output Jsont.t 343 + 344 + end 345 + module Collaborator : sig 464 346 465 347 type main = { 466 - issue : string; 467 - state : string; (** state of the issue *) 348 + created_at : string; 349 + repo : string; (** repo to add this user to *) 350 + subject : string; 468 351 } 469 352 470 353 (** Jsont codec for {!type:main}. *) 471 354 val main_jsont : main Jsont.t 472 355 473 - module Closed : sig 474 - (** closed issue *) 475 - 476 - type main = string 477 - val main_jsont : main Jsont.t 478 - 479 - end 480 - module Open : sig 481 - (** open issue *) 482 - 483 - type main = string 484 - val main_jsont : main Jsont.t 485 - 486 - end 487 - end 488 356 end 489 - module Pull : sig 357 + module Branches : sig 490 358 491 - type target = { 492 - branch : string; 493 - repo : string; 359 + (** Query/procedure parameters. *) 360 + type params = { 361 + cursor : string option; (** Pagination cursor *) 362 + limit : int option; (** Maximum number of branches to return *) 363 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 494 364 } 495 365 496 - (** Jsont codec for {!type:target}. *) 497 - val target_jsont : target Jsont.t 366 + (** Jsont codec for {!type:params}. *) 367 + val params_jsont : params Jsont.t 498 368 499 369 500 - type source = { 501 - branch : string; 502 - repo : string option; 503 - sha : string; 504 - } 505 - 506 - (** Jsont codec for {!type:source}. *) 507 - val source_jsont : source Jsont.t 370 + type output = unit 371 + val output_jsont : output Jsont.t 508 372 373 + end 374 + module GetDefaultBranch : sig 509 375 510 - type main = { 511 - body : string option; 512 - created_at : string; 513 - mentions : string list option; 514 - patch : string option; (** (deprecated) use patchBlob instead *) 515 - patch_blob : Atp.Blob_ref.t; (** patch content *) 516 - references : string list option; 517 - source : source option; 518 - target : target; 519 - title : string; 376 + type signature = { 377 + email : string; (** Author email *) 378 + name : string; (** Author name *) 379 + when_ : string; (** Author timestamp *) 520 380 } 521 381 522 - (** Jsont codec for {!type:main}. *) 523 - val main_jsont : main Jsont.t 382 + (** Jsont codec for {!type:signature}. *) 383 + val signature_jsont : signature Jsont.t 524 384 525 - module Comment : sig 526 385 527 - type main = { 528 - body : string; 529 - created_at : string; 530 - mentions : string list option; 531 - pull : string; 532 - references : string list option; 386 + (** Query/procedure parameters. *) 387 + type params = { 388 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 533 389 } 534 390 535 - (** Jsont codec for {!type:main}. *) 536 - val main_jsont : main Jsont.t 391 + (** Jsont codec for {!type:params}. *) 392 + val params_jsont : params Jsont.t 537 393 538 - end 539 - module Status : sig 540 394 541 - type main = { 542 - pull : string; 543 - status : string; (** status of the pull request *) 395 + type output = { 396 + author : signature option; 397 + hash : string; (** Latest commit hash on default branch *) 398 + message : string option; (** Latest commit message *) 399 + name : string; (** Default branch name *) 400 + short_hash : string option; (** Short commit hash *) 401 + when_ : string; (** Timestamp of latest commit *) 544 402 } 545 403 546 - (** Jsont codec for {!type:main}. *) 547 - val main_jsont : main Jsont.t 548 - 549 - module Merged : sig 550 - (** merged pull request *) 404 + (** Jsont codec for {!type:output}. *) 405 + val output_jsont : output Jsont.t 551 406 552 - type main = string 553 - val main_jsont : main Jsont.t 407 + end 408 + module Create : sig 409 + (** Create a new repository *) 554 410 555 - end 556 - module Closed : sig 557 - (** closed pull request *) 558 411 559 - type main = string 560 - val main_jsont : main Jsont.t 561 - 562 - end 563 - module Open : sig 564 - (** open pull request *) 412 + type input = { 413 + default_branch : string option; (** Default branch to push to *) 414 + rkey : string; (** Rkey of the repository record *) 415 + source : string option; (** A source URL to clone from, populate this when forking or importing a repository. *) 416 + } 565 417 566 - type main = string 567 - val main_jsont : main Jsont.t 418 + (** Jsont codec for {!type:input}. *) 419 + val input_jsont : input Jsont.t 568 420 569 - end 570 - end 571 421 end 572 - module SetDefaultBranch : sig 573 - (** Set the default branch for a repository *) 422 + module ForkStatus : sig 423 + (** Check fork status relative to upstream source *) 574 424 575 425 576 426 type input = { 577 - default_branch : string; 578 - repo : string; 427 + branch : string; (** Branch to check status for *) 428 + did : string; (** DID of the fork owner *) 429 + hidden_ref : string; (** Hidden ref to use for comparison *) 430 + name : string; (** Name of the forked repository *) 431 + source : string; (** Source repository URL *) 579 432 } 580 433 581 434 (** Jsont codec for {!type:input}. *) 582 435 val input_jsont : input Jsont.t 583 436 437 + 438 + type output = { 439 + status : int; (** Fork status: 0=UpToDate, 1=FastForwardable, 2=Conflict, 3=MissingBranch *) 440 + } 441 + 442 + (** Jsont codec for {!type:output}. *) 443 + val output_jsont : output Jsont.t 444 + 584 445 end 585 - module GetDefaultBranch : sig 446 + module Branch : sig 586 447 587 448 type signature = { 588 449 email : string; (** Author email *) ··· 596 457 597 458 (** Query/procedure parameters. *) 598 459 type params = { 460 + name : string; (** Branch name to get information for *) 599 461 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 600 462 } 601 463 ··· 605 467 606 468 type output = { 607 469 author : signature option; 608 - hash : string; (** Latest commit hash on default branch *) 470 + hash : string; (** Latest commit hash on this branch *) 471 + is_default : bool option; (** Whether this is the default branch *) 609 472 message : string option; (** Latest commit message *) 610 - name : string; (** Default branch name *) 473 + name : string; (** Branch name *) 611 474 short_hash : string option; (** Short commit hash *) 612 475 when_ : string; (** Timestamp of latest commit *) 613 476 } ··· 629 492 val input_jsont : input Jsont.t 630 493 631 494 end 632 - module Delete : sig 633 - (** Delete a repository *) 634 - 495 + module Log : sig 635 496 636 - type input = { 637 - did : string; (** DID of the repository owner *) 638 - name : string; (** Name of the repository to delete *) 639 - rkey : string; (** Rkey of the repository record *) 497 + (** Query/procedure parameters. *) 498 + type params = { 499 + cursor : string option; (** Pagination cursor (commit SHA) *) 500 + limit : int option; (** Maximum number of commits to return *) 501 + path : string option; (** Path to filter commits by *) 502 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 503 + repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 640 504 } 641 505 642 - (** Jsont codec for {!type:input}. *) 643 - val input_jsont : input Jsont.t 506 + (** Jsont codec for {!type:params}. *) 507 + val params_jsont : params Jsont.t 508 + 509 + 510 + type output = unit 511 + val output_jsont : output Jsont.t 644 512 645 513 end 646 - module Tree : sig 514 + module Blob : sig 647 515 648 - type readme = { 649 - contents : string; (** Contents of the readme file *) 650 - filename : string; (** Name of the readme file *) 516 + type submodule = { 517 + branch : string option; (** Branch to track in the submodule *) 518 + name : string; (** Submodule name *) 519 + url : string; (** Submodule repository URL *) 651 520 } 652 521 653 - (** Jsont codec for {!type:readme}. *) 654 - val readme_jsont : readme Jsont.t 522 + (** Jsont codec for {!type:submodule}. *) 523 + val submodule_jsont : submodule Jsont.t 524 + 525 + 526 + type signature = { 527 + email : string; (** Author email *) 528 + name : string; (** Author name *) 529 + when_ : string; (** Author timestamp *) 530 + } 531 + 532 + (** Jsont codec for {!type:signature}. *) 533 + val signature_jsont : signature Jsont.t 655 534 656 535 657 536 type last_commit = { 537 + author : signature option; 658 538 hash : string; (** Commit hash *) 659 539 message : string; (** Commit message *) 540 + short_hash : string option; (** Short commit hash *) 660 541 when_ : string; (** Commit timestamp *) 661 542 } 662 543 ··· 664 545 val last_commit_jsont : last_commit Jsont.t 665 546 666 547 667 - type tree_entry = { 668 - last_commit : last_commit option; 669 - mode : string; (** File mode *) 670 - name : string; (** Relative file or directory name *) 671 - size : int; (** File size in bytes *) 672 - } 673 - 674 - (** Jsont codec for {!type:tree_entry}. *) 675 - val tree_entry_jsont : tree_entry Jsont.t 676 - 677 - 678 548 (** Query/procedure parameters. *) 679 549 type params = { 680 - path : string option; (** Path within the repository tree *) 550 + path : string; (** Path to the file within the repository *) 551 + raw : bool option; (** Return raw file content instead of JSON response *) 681 552 ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 682 553 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 683 554 } ··· 687 558 688 559 689 560 type output = { 690 - dotdot : string option; (** Parent directory path *) 691 - files : tree_entry list; 692 - parent : string option; (** The parent path in the tree *) 693 - readme : readme option; (** Readme for this file tree *) 561 + content : string option; (** File content (base64 encoded for binary files) *) 562 + encoding : string option; (** Content encoding *) 563 + is_binary : bool option; (** Whether the file is binary *) 564 + last_commit : last_commit option; 565 + mime_type : string option; (** MIME type of the file *) 566 + path : string; (** The file path *) 694 567 ref_ : string; (** The git reference used *) 568 + size : int option; (** File size in bytes *) 569 + submodule : submodule option; (** Submodule information if path is a submodule *) 695 570 } 696 571 697 572 (** Jsont codec for {!type:output}. *) 698 573 val output_jsont : output Jsont.t 699 574 700 575 end 701 - module AddSecret : sig 702 - (** Add a CI secret *) 576 + module RemoveSecret : sig 577 + (** Remove a CI secret *) 703 578 704 579 705 580 type input = { 706 581 key : string; 707 582 repo : string; 708 - value : string; 709 583 } 710 584 711 585 (** Jsont codec for {!type:input}. *) 712 586 val input_jsont : input Jsont.t 713 587 714 588 end 715 - module Branch : sig 589 + module Languages : sig 716 590 717 - type signature = { 718 - email : string; (** Author email *) 719 - name : string; (** Author name *) 720 - when_ : string; (** Author timestamp *) 591 + type language = { 592 + color : string option; (** Hex color code for this language *) 593 + extensions : string list option; (** File extensions associated with this language *) 594 + file_count : int option; (** Number of files in this language *) 595 + name : string; (** Programming language name *) 596 + percentage : int; (** Percentage of total codebase (0-100) *) 597 + size : int; (** Total size of files in this language (bytes) *) 721 598 } 722 599 723 - (** Jsont codec for {!type:signature}. *) 724 - val signature_jsont : signature Jsont.t 600 + (** Jsont codec for {!type:language}. *) 601 + val language_jsont : language Jsont.t 725 602 726 603 727 604 (** Query/procedure parameters. *) 728 605 type params = { 729 - name : string; (** Branch name to get information for *) 606 + ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 730 607 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 731 608 } 732 609 ··· 735 612 736 613 737 614 type output = { 738 - author : signature option; 739 - hash : string; (** Latest commit hash on this branch *) 740 - is_default : bool option; (** Whether this is the default branch *) 741 - message : string option; (** Latest commit message *) 742 - name : string; (** Branch name *) 743 - short_hash : string option; (** Short commit hash *) 744 - when_ : string; (** Timestamp of latest commit *) 615 + languages : language list; 616 + ref_ : string; (** The git reference used *) 617 + total_files : int option; (** Total number of files analyzed *) 618 + total_size : int option; (** Total size of all analyzed files in bytes *) 745 619 } 746 620 747 621 (** Jsont codec for {!type:output}. *) 748 622 val output_jsont : output Jsont.t 749 623 750 624 end 751 - module Log : sig 625 + module Diff : sig 752 626 753 627 (** Query/procedure parameters. *) 754 628 type params = { 755 - cursor : string option; (** Pagination cursor (commit SHA) *) 756 - limit : int option; (** Maximum number of commits to return *) 757 - path : string option; (** Path to filter commits by *) 758 629 ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 759 630 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 760 631 } ··· 767 638 val output_jsont : output Jsont.t 768 639 769 640 end 641 + module ForkSync : sig 642 + (** Sync a forked repository with its upstream source *) 643 + 644 + 645 + type input = { 646 + branch : string; (** Branch to sync *) 647 + did : string; (** DID of the fork owner *) 648 + name : string; (** Name of the forked repository *) 649 + source : string; (** AT-URI of the source repository *) 650 + } 651 + 652 + (** Jsont codec for {!type:input}. *) 653 + val input_jsont : input Jsont.t 654 + 655 + end 656 + module AddSecret : sig 657 + (** Add a CI secret *) 658 + 659 + 660 + type input = { 661 + key : string; 662 + repo : string; 663 + value : string; 664 + } 665 + 666 + (** Jsont codec for {!type:input}. *) 667 + val input_jsont : input Jsont.t 668 + 669 + end 670 + module Delete : sig 671 + (** Delete a repository *) 672 + 673 + 674 + type input = { 675 + did : string; (** DID of the repository owner *) 676 + name : string; (** Name of the repository to delete *) 677 + rkey : string; (** Rkey of the repository record *) 678 + } 679 + 680 + (** Jsont codec for {!type:input}. *) 681 + val input_jsont : input Jsont.t 682 + 683 + end 770 684 module ListSecrets : sig 771 685 772 686 type secret = { ··· 797 711 val output_jsont : output Jsont.t 798 712 799 713 end 800 - module Tags : sig 714 + module Archive : sig 801 715 802 716 (** Query/procedure parameters. *) 803 717 type params = { 804 - cursor : string option; (** Pagination cursor *) 805 - limit : int option; (** Maximum number of tags to return *) 718 + format : string option; (** Archive format *) 719 + prefix : string option; (** Prefix for files in the archive *) 720 + ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 806 721 repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 807 722 } 808 723 809 724 (** Jsont codec for {!type:params}. *) 810 725 val params_jsont : params Jsont.t 811 726 727 + (** Binary archive data *) 812 728 813 729 type output = unit 814 730 val output_jsont : output Jsont.t 815 731 816 732 end 817 - module Diff : sig 733 + module HiddenRef : sig 734 + (** Create a hidden ref in a repository *) 735 + 818 736 819 - (** Query/procedure parameters. *) 820 - type params = { 821 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 822 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 737 + type input = { 738 + fork_ref : string; (** Fork reference name *) 739 + remote_ref : string; (** Remote reference name *) 740 + repo : string; (** AT-URI of the repository *) 823 741 } 824 742 825 - (** Jsont codec for {!type:params}. *) 826 - val params_jsont : params Jsont.t 743 + (** Jsont codec for {!type:input}. *) 744 + val input_jsont : input Jsont.t 827 745 828 746 829 - type output = unit 747 + type output = { 748 + error : string option; (** Error message if creation failed *) 749 + ref_ : string option; (** The created hidden ref name *) 750 + success : bool; (** Whether the hidden ref was created successfully *) 751 + } 752 + 753 + (** Jsont codec for {!type:output}. *) 830 754 val output_jsont : output Jsont.t 831 755 832 756 end 833 - module Collaborator : sig 757 + module Pull : sig 758 + 759 + type target = { 760 + branch : string; 761 + repo : string; 762 + } 763 + 764 + (** Jsont codec for {!type:target}. *) 765 + val target_jsont : target Jsont.t 766 + 767 + 768 + type source = { 769 + branch : string; 770 + repo : string option; 771 + sha : string; 772 + } 773 + 774 + (** Jsont codec for {!type:source}. *) 775 + val source_jsont : source Jsont.t 776 + 834 777 835 778 type main = { 779 + body : string option; 836 780 created_at : string; 837 - repo : string; (** repo to add this user to *) 838 - subject : string; 781 + mentions : string list option; 782 + patch : string option; (** (deprecated) use patchBlob instead *) 783 + patch_blob : Atp.Blob_ref.t; (** patch content *) 784 + references : string list option; 785 + source : source option; 786 + target : target; 787 + title : string; 839 788 } 840 789 841 790 (** Jsont codec for {!type:main}. *) 842 791 val main_jsont : main Jsont.t 843 792 844 - end 845 - module Create : sig 846 - (** Create a new repository *) 793 + module Comment : sig 847 794 848 - 849 - type input = { 850 - default_branch : string option; (** Default branch to push to *) 851 - rkey : string; (** Rkey of the repository record *) 852 - source : string option; (** A source URL to clone from, populate this when forking or importing a repository. *) 795 + type main = { 796 + body : string; 797 + created_at : string; 798 + mentions : string list option; 799 + pull : string; 800 + references : string list option; 853 801 } 854 802 855 - (** Jsont codec for {!type:input}. *) 856 - val input_jsont : input Jsont.t 803 + (** Jsont codec for {!type:main}. *) 804 + val main_jsont : main Jsont.t 857 805 858 - end 859 - module Artifact : sig 806 + end 807 + module Status : sig 860 808 861 809 type main = { 862 - artifact : Atp.Blob_ref.t; (** the artifact *) 863 - created_at : string; (** time of creation of this artifact *) 864 - name : string; (** name of the artifact *) 865 - repo : string; (** repo that this artifact is being uploaded to *) 866 - tag : string; (** hash of the tag object that this artifact is attached to (only annotated tags are supported) *) 810 + pull : string; 811 + status : string; (** status of the pull request *) 867 812 } 868 813 869 814 (** Jsont codec for {!type:main}. *) 870 815 val main_jsont : main Jsont.t 871 816 817 + module Closed : sig 818 + (** closed pull request *) 819 + 820 + type main = string 821 + val main_jsont : main Jsont.t 822 + 823 + end 824 + module Open : sig 825 + (** open pull request *) 826 + 827 + type main = string 828 + val main_jsont : main Jsont.t 829 + 830 + end 831 + module Merged : sig 832 + (** merged pull request *) 833 + 834 + type main = string 835 + val main_jsont : main Jsont.t 836 + 837 + end 838 + end 872 839 end 873 - module Archive : sig 840 + module Issue : sig 874 841 875 - (** Query/procedure parameters. *) 876 - type params = { 877 - format : string option; (** Archive format *) 878 - prefix : string option; (** Prefix for files in the archive *) 879 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 880 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 842 + type main = { 843 + body : string option; 844 + created_at : string; 845 + mentions : string list option; 846 + references : string list option; 847 + repo : string; 848 + title : string; 881 849 } 882 850 883 - (** Jsont codec for {!type:params}. *) 884 - val params_jsont : params Jsont.t 851 + (** Jsont codec for {!type:main}. *) 852 + val main_jsont : main Jsont.t 885 853 886 - (** Binary archive data *) 854 + module Comment : sig 887 855 888 - type output = unit 889 - val output_jsont : output Jsont.t 856 + type main = { 857 + body : string; 858 + created_at : string; 859 + issue : string; 860 + mentions : string list option; 861 + references : string list option; 862 + reply_to : string option; 863 + } 890 864 891 - end 892 - module RemoveSecret : sig 893 - (** Remove a CI secret *) 865 + (** Jsont codec for {!type:main}. *) 866 + val main_jsont : main Jsont.t 894 867 868 + end 869 + module State : sig 895 870 896 - type input = { 897 - key : string; 898 - repo : string; 871 + type main = { 872 + issue : string; 873 + state : string; (** state of the issue *) 899 874 } 900 875 901 - (** Jsont codec for {!type:input}. *) 902 - val input_jsont : input Jsont.t 876 + (** Jsont codec for {!type:main}. *) 877 + val main_jsont : main Jsont.t 903 878 904 - end 905 - module Merge : sig 906 - (** Merge a patch into a repository branch *) 879 + module Closed : sig 880 + (** closed issue *) 907 881 882 + type main = string 883 + val main_jsont : main Jsont.t 908 884 909 - type input = { 910 - author_email : string option; (** Author email for the merge commit *) 911 - author_name : string option; (** Author name for the merge commit *) 912 - branch : string; (** Target branch to merge into *) 913 - commit_body : string option; (** Additional commit message body *) 914 - commit_message : string option; (** Merge commit message *) 915 - did : string; (** DID of the repository owner *) 916 - name : string; (** Name of the repository *) 917 - patch : string; (** Patch content to merge *) 918 - } 885 + end 886 + module Open : sig 887 + (** open issue *) 919 888 920 - (** Jsont codec for {!type:input}. *) 921 - val input_jsont : input Jsont.t 889 + type main = string 890 + val main_jsont : main Jsont.t 922 891 892 + end 893 + end 923 894 end 924 - module Blob : sig 895 + end 896 + module Label : sig 897 + module Definition : sig 925 898 926 - type submodule = { 927 - branch : string option; (** Branch to track in the submodule *) 928 - name : string; (** Submodule name *) 929 - url : string; (** Submodule repository URL *) 899 + type value_type = { 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. *) 930 903 } 931 904 932 - (** Jsont codec for {!type:submodule}. *) 933 - val submodule_jsont : submodule Jsont.t 905 + (** Jsont codec for {!type:value_type}. *) 906 + val value_type_jsont : value_type Jsont.t 934 907 935 908 936 - type signature = { 937 - email : string; (** Author email *) 938 - name : string; (** Author name *) 939 - when_ : string; (** Author timestamp *) 909 + type main = { 910 + color : string option; (** The hex value for the background color for the label. Appviews may choose to respect this. *) 911 + created_at : string; 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. *) 940 916 } 941 917 942 - (** Jsont codec for {!type:signature}. *) 943 - val signature_jsont : signature Jsont.t 918 + (** Jsont codec for {!type:main}. *) 919 + val main_jsont : main Jsont.t 944 920 921 + end 922 + module Op : sig 945 923 946 - type last_commit = { 947 - author : signature option; 948 - hash : string; (** Commit hash *) 949 - message : string; (** Commit message *) 950 - short_hash : string option; (** Short commit hash *) 951 - when_ : string; (** Commit timestamp *) 924 + type operand = { 925 + key : string; (** ATURI to the label definition *) 926 + value : string; (** Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value. *) 952 927 } 953 928 954 - (** Jsont codec for {!type:last_commit}. *) 955 - val last_commit_jsont : last_commit Jsont.t 929 + (** Jsont codec for {!type:operand}. *) 930 + val operand_jsont : operand Jsont.t 956 931 957 932 958 - (** Query/procedure parameters. *) 959 - type params = { 960 - path : string; (** Path to the file within the repository *) 961 - raw : bool option; (** Return raw file content instead of JSON response *) 962 - ref_ : string; (** Git reference (branch, tag, or commit SHA) *) 963 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 933 + type main = { 934 + add : operand list; 935 + delete : operand list; 936 + performed_at : string; 937 + subject : string; (** The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. *) 964 938 } 965 939 966 - (** Jsont codec for {!type:params}. *) 967 - val params_jsont : params Jsont.t 940 + (** Jsont codec for {!type:main}. *) 941 + val main_jsont : main Jsont.t 968 942 943 + end 944 + end 945 + module Graph : sig 946 + module Follow : sig 969 947 970 - type output = { 971 - content : string option; (** File content (base64 encoded for binary files) *) 972 - encoding : string option; (** Content encoding *) 973 - is_binary : bool option; (** Whether the file is binary *) 974 - last_commit : last_commit option; 975 - mime_type : string option; (** MIME type of the file *) 976 - path : string; (** The file path *) 977 - ref_ : string; (** The git reference used *) 978 - size : int option; (** File size in bytes *) 979 - submodule : submodule option; (** Submodule information if path is a submodule *) 948 + type main = { 949 + created_at : string; 950 + subject : string; 980 951 } 981 952 982 - (** Jsont codec for {!type:output}. *) 983 - val output_jsont : output Jsont.t 953 + (** Jsont codec for {!type:main}. *) 954 + val main_jsont : main Jsont.t 984 955 985 956 end 986 - module HiddenRef : sig 987 - (** Create a hidden ref in a repository *) 988 - 957 + end 958 + module Knot : sig 989 959 990 - type input = { 991 - fork_ref : string; (** Fork reference name *) 992 - remote_ref : string; (** Remote reference name *) 993 - repo : string; (** AT-URI of the repository *) 960 + type main = { 961 + created_at : string; 994 962 } 995 963 996 - (** Jsont codec for {!type:input}. *) 997 - val input_jsont : input Jsont.t 964 + (** Jsont codec for {!type:main}. *) 965 + val main_jsont : main Jsont.t 998 966 967 + module Member : sig 999 968 1000 - type output = { 1001 - error : string option; (** Error message if creation failed *) 1002 - ref_ : string option; (** The created hidden ref name *) 1003 - success : bool; (** Whether the hidden ref was created successfully *) 969 + type main = { 970 + created_at : string; 971 + domain : string; (** domain that this member now belongs to *) 972 + subject : string; 1004 973 } 1005 974 1006 - (** Jsont codec for {!type:output}. *) 1007 - val output_jsont : output Jsont.t 975 + (** Jsont codec for {!type:main}. *) 976 + val main_jsont : main Jsont.t 1008 977 1009 978 end 1010 - module Compare : sig 979 + module ListKeys : sig 980 + 981 + type public_key = { 982 + created_at : string; (** Key upload timestamp *) 983 + did : string; (** DID associated with the public key *) 984 + key : string; (** Public key contents *) 985 + } 986 + 987 + (** Jsont codec for {!type:public_key}. *) 988 + val public_key_jsont : public_key Jsont.t 989 + 990 + (** List all public keys stored in the knot server *) 1011 991 1012 992 (** Query/procedure parameters. *) 1013 993 type params = { 1014 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 1015 - rev1 : string; (** First revision (commit, branch, or tag) *) 1016 - rev2 : string; (** Second revision (commit, branch, or tag) *) 994 + cursor : string option; (** Pagination cursor *) 995 + limit : int option; (** Maximum number of keys to return *) 1017 996 } 1018 997 1019 998 (** Jsont codec for {!type:params}. *) 1020 999 val params_jsont : params Jsont.t 1021 1000 1022 - (** Compare output in application/json *) 1023 1001 1024 - type output = unit 1002 + type output = { 1003 + cursor : string option; (** Pagination cursor for next page *) 1004 + keys : public_key list; 1005 + } 1006 + 1007 + (** Jsont codec for {!type:output}. *) 1025 1008 val output_jsont : output Jsont.t 1026 1009 1027 1010 end 1028 - module ForkStatus : sig 1029 - (** Check fork status relative to upstream source *) 1011 + module Version : sig 1012 + (** Get the version of a knot *) 1030 1013 1031 1014 1032 - type input = { 1033 - branch : string; (** Branch to check status for *) 1034 - did : string; (** DID of the fork owner *) 1035 - hidden_ref : string; (** Hidden ref to use for comparison *) 1036 - name : string; (** Name of the forked repository *) 1037 - source : string; (** Source repository URL *) 1015 + type output = { 1016 + version : string; 1038 1017 } 1039 1018 1040 - (** Jsont codec for {!type:input}. *) 1041 - val input_jsont : input Jsont.t 1019 + (** Jsont codec for {!type:output}. *) 1020 + val output_jsont : output Jsont.t 1021 + 1022 + end 1023 + end 1024 + module Owner : sig 1025 + (** Get the owner of a service *) 1042 1026 1043 1027 1044 1028 type output = { 1045 - status : int; (** Fork status: 0=UpToDate, 1=FastForwardable, 2=Conflict, 3=MissingBranch *) 1029 + owner : string; 1046 1030 } 1047 1031 1048 1032 (** Jsont codec for {!type:output}. *) 1049 1033 val output_jsont : output Jsont.t 1050 1034 1051 - end 1052 - module MergeCheck : sig 1035 + end 1036 + module PublicKey : sig 1053 1037 1054 - type conflict_info = { 1055 - filename : string; (** Name of the conflicted file *) 1056 - reason : string; (** Reason for the conflict *) 1038 + type main = { 1039 + created_at : string; (** key upload timestamp *) 1040 + key : string; (** public key contents *) 1041 + name : string; (** human-readable name for this key *) 1057 1042 } 1058 1043 1059 - (** Jsont codec for {!type:conflict_info}. *) 1060 - val conflict_info_jsont : conflict_info Jsont.t 1044 + (** Jsont codec for {!type:main}. *) 1045 + val main_jsont : main Jsont.t 1061 1046 1062 - (** Check if a merge is possible between two branches *) 1047 + end 1048 + module Pipeline : sig 1063 1049 1050 + type trigger_repo = { 1051 + default_branch : string; 1052 + did : string; 1053 + knot : string; 1054 + repo : string; 1055 + } 1064 1056 1065 - type input = { 1066 - branch : string; (** Target branch to merge into *) 1067 - did : string; (** DID of the repository owner *) 1068 - name : string; (** Name of the repository *) 1069 - patch : string; (** Patch or pull request to check for merge conflicts *) 1057 + (** Jsont codec for {!type:trigger_repo}. *) 1058 + val trigger_repo_jsont : trigger_repo Jsont.t 1059 + 1060 + 1061 + type push_trigger_data = { 1062 + new_sha : string; 1063 + old_sha : string; 1064 + ref_ : string; 1070 1065 } 1071 1066 1072 - (** Jsont codec for {!type:input}. *) 1073 - val input_jsont : input Jsont.t 1067 + (** Jsont codec for {!type:push_trigger_data}. *) 1068 + val push_trigger_data_jsont : push_trigger_data Jsont.t 1074 1069 1075 1070 1076 - type output = { 1077 - conflicts : conflict_info list option; (** List of files with merge conflicts *) 1078 - error : string option; (** Error message if check failed *) 1079 - is_conflicted : bool; (** Whether the merge has conflicts *) 1080 - message : string option; (** Additional message about the merge check *) 1071 + type pull_request_trigger_data = { 1072 + action : string; 1073 + source_branch : string; 1074 + source_sha : string; 1075 + target_branch : string; 1081 1076 } 1082 1077 1083 - (** Jsont codec for {!type:output}. *) 1084 - val output_jsont : output Jsont.t 1078 + (** Jsont codec for {!type:pull_request_trigger_data}. *) 1079 + val pull_request_trigger_data_jsont : pull_request_trigger_data Jsont.t 1085 1080 1086 - end 1087 - module Branches : sig 1088 1081 1089 - (** Query/procedure parameters. *) 1090 - type params = { 1091 - cursor : string option; (** Pagination cursor *) 1092 - limit : int option; (** Maximum number of branches to return *) 1093 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 1082 + type pair = { 1083 + key : string; 1084 + value : string; 1085 + } 1086 + 1087 + (** Jsont codec for {!type:pair}. *) 1088 + val pair_jsont : pair Jsont.t 1089 + 1090 + 1091 + type clone_opts = { 1092 + depth : int; 1093 + skip : bool; 1094 + submodules : bool; 1094 1095 } 1095 1096 1096 - (** Jsont codec for {!type:params}. *) 1097 - val params_jsont : params Jsont.t 1097 + (** Jsont codec for {!type:clone_opts}. *) 1098 + val clone_opts_jsont : clone_opts Jsont.t 1098 1099 1099 1100 1100 - type output = unit 1101 - val output_jsont : output Jsont.t 1101 + type workflow = { 1102 + clone : clone_opts; 1103 + engine : string; 1104 + name : string; 1105 + raw : string; 1106 + } 1102 1107 1103 - end 1104 - module ForkSync : sig 1105 - (** Sync a forked repository with its upstream source *) 1108 + (** Jsont codec for {!type:workflow}. *) 1109 + val workflow_jsont : workflow Jsont.t 1106 1110 1107 1111 1108 - type input = { 1109 - branch : string; (** Branch to sync *) 1110 - did : string; (** DID of the fork owner *) 1111 - name : string; (** Name of the forked repository *) 1112 - source : string; (** AT-URI of the source repository *) 1112 + type manual_trigger_data = { 1113 + inputs : pair list option; 1113 1114 } 1114 1115 1115 - (** Jsont codec for {!type:input}. *) 1116 - val input_jsont : input Jsont.t 1116 + (** Jsont codec for {!type:manual_trigger_data}. *) 1117 + val manual_trigger_data_jsont : manual_trigger_data Jsont.t 1117 1118 1118 - end 1119 - module Languages : sig 1120 1119 1121 - type language = { 1122 - color : string option; (** Hex color code for this language *) 1123 - extensions : string list option; (** File extensions associated with this language *) 1124 - file_count : int option; (** Number of files in this language *) 1125 - name : string; (** Programming language name *) 1126 - percentage : int; (** Percentage of total codebase (0-100) *) 1127 - size : int; (** Total size of files in this language (bytes) *) 1120 + type trigger_metadata = { 1121 + kind : string; 1122 + manual : manual_trigger_data option; 1123 + pull_request : pull_request_trigger_data option; 1124 + push : push_trigger_data option; 1125 + repo : trigger_repo; 1128 1126 } 1129 1127 1130 - (** Jsont codec for {!type:language}. *) 1131 - val language_jsont : language Jsont.t 1128 + (** Jsont codec for {!type:trigger_metadata}. *) 1129 + val trigger_metadata_jsont : trigger_metadata Jsont.t 1132 1130 1133 1131 1134 - (** Query/procedure parameters. *) 1135 - type params = { 1136 - ref_ : string option; (** Git reference (branch, tag, or commit SHA) *) 1137 - repo : string; (** Repository identifier in format 'did:plc:.../repoName' *) 1132 + type main = { 1133 + trigger_metadata : trigger_metadata; 1134 + workflows : workflow list; 1138 1135 } 1139 1136 1140 - (** Jsont codec for {!type:params}. *) 1141 - val params_jsont : params Jsont.t 1137 + (** Jsont codec for {!type:main}. *) 1138 + val main_jsont : main Jsont.t 1142 1139 1140 + module Status : sig 1143 1141 1144 - type output = { 1145 - languages : language list; 1146 - ref_ : string; (** The git reference used *) 1147 - total_files : int option; (** Total number of files analyzed *) 1148 - total_size : int option; (** Total size of all analyzed files in bytes *) 1142 + type main = { 1143 + created_at : string; (** time of creation of this status update *) 1144 + error : string option; (** error message if failed *) 1145 + exit_code : int option; (** exit code if failed *) 1146 + pipeline : string; (** ATURI of the pipeline *) 1147 + status : string; (** status of the workflow *) 1148 + workflow : string; (** name of the workflow within this pipeline *) 1149 1149 } 1150 1150 1151 - (** Jsont codec for {!type:output}. *) 1152 - val output_jsont : output Jsont.t 1151 + (** Jsont codec for {!type:main}. *) 1152 + val main_jsont : main Jsont.t 1153 1153 1154 1154 end 1155 1155 end