Module Cephalopod_models.Com_Atproto_Sync_SubscribeRepos

lexicon "com.atproto.sync.subscribeRepos"

def main

type main_msg = [
  1. | `Com_atproto_sync_subscriberepos_commit of Types.com_atproto_sync_subscriberepos_commit
  2. | `Com_atproto_sync_subscriberepos_sync of Types.com_atproto_sync_subscriberepos_sync
  3. | `Com_atproto_sync_subscriberepos_identity of Types.com_atproto_sync_subscriberepos_identity
  4. | `Com_atproto_sync_subscriberepos_account of Types.com_atproto_sync_subscriberepos_account
  5. | `Com_atproto_sync_subscriberepos_info of Types.com_atproto_sync_subscriberepos_info
  6. | `Other of Cephalopod_dasl.Value.t
    (*

    Non closed union

    *)
]
val show_main_msg : main_msg -> Ppx_deriving_runtime.string
val main_msg_nsid_of_fragment : string -> string

Turn a fragment (in header) into a full nsid

val main_msg_of_value : type_tag:string -> main_msg Cephalopod_dasl.Value.Util.conv
val main_msg_to_value : main_msg -> Cephalopod_dasl.Value.t
type main_params = {
  1. cursor : int64 option;
    (*

    The last known event seq number to backfill from.

    *)
}
val show_main_params : main_params -> Ppx_deriving_runtime.string
val make_main_params : ?cursor:int64 -> unit -> main_params
val main_params_of_value : main_params Cephalopod_dasl.Value.Util.conv
val main_params_to_value : main_params -> Cephalopod_dasl.Value.t
type main_error = [
  1. | `FutureCursor
  2. | `ConsumerTooSlow
]
val show_main_error : main_error -> Ppx_deriving_runtime.string

Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.

def commit

type nonrec commit = Types.com_atproto_sync_subscriberepos_commit = {
  1. seq : int64;
    (*

    The stream sequence number of this message.

    *)
  2. rebase : bool;
    (*

    DEPRECATED -- unused

    *)
  3. tooBig : bool;
    (*

    DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.

    *)
  4. repo : string;
    (*

    The repo this event comes from. Note that all other message types name this field 'did'. format: "Did"

    *)
  5. commit : Cephalopod_dasl.Cid.t;
    (*

    Repo commit object CID.

    *)
  6. rev : string;
    (*

    The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. format: "Tid"

    *)
  7. since : string option;
    (*

    The rev of the last emitted commit from this repo (if any). format: "Tid"

    *)
  8. blocks : bytes;
    (*

    CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. maximum length: 2000000

    *)
  9. ops : Types.com_atproto_sync_subscriberepos_repoop list;
    (*

    maximum length: 200

    *)
  10. blobs : Cephalopod_dasl.Cid.t list;
  11. prevData : Cephalopod_dasl.Cid.t option;
    (*

    The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose.

    *)
  12. time : string;
    (*

    Timestamp of when this message was originally broadcast. format: "Datetime"

    *)
}

def sync

type nonrec sync = Types.com_atproto_sync_subscriberepos_sync = {
  1. seq : int64;
    (*

    The stream sequence number of this message.

    *)
  2. did : string;
    (*

    The account this repo event corresponds to. Must match that in the commit object. format: "Did"

    *)
  3. blocks : bytes;
    (*

    CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. maximum length: 10000

    *)
  4. rev : string;
    (*

    The rev of the commit. This value must match that in the commit object.

    *)
  5. time : string;
    (*

    Timestamp of when this message was originally broadcast. format: "Datetime"

    *)
}

def identity

type nonrec identity = Types.com_atproto_sync_subscriberepos_identity = {
  1. seq : int64;
  2. did : string;
    (*

    format: "Did"

    *)
  3. time : string;
    (*

    format: "Datetime"

    *)
  4. handle : string option;
    (*

    The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details. format: "Handle"

    *)
}

def account

type nonrec account = Types.com_atproto_sync_subscriberepos_account = {
  1. seq : int64;
  2. did : string;
    (*

    format: "Did"

    *)
  3. time : string;
    (*

    format: "Datetime"

    *)
  4. active : bool;
    (*

    Indicates that the account has a repository which can be fetched from the host that emitted this event.

    *)
  5. status : string option;
    (*

    If active=false, this optional field indicates a reason for why the account is not active. known values: "takendown"; "suspended"; "deleted"; "deactivated"; "desynchronized"; "throttled"

    *)
}

def info

type nonrec info = Types.com_atproto_sync_subscriberepos_info = {
  1. name : string;
    (*

    known values: "OutdatedCursor"

    *)
  2. message : string option;
}

def repoOp

type nonrec repoop = Types.com_atproto_sync_subscriberepos_repoop = {
  1. action : string;
    (*

    known values: "create"; "update"; "delete"

    *)
  2. path : string;
  3. cid : Cephalopod_dasl.Cid.t option;
    (*

    For creates and updates, the new record CID. For deletions, null.

    *)
  4. prev : Cephalopod_dasl.Cid.t option;
    (*

    For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined.

    *)
}