package atproto const ( LexiconSupport = "com.atprotofans.high-five.support" LexiconSupportProof = "com.atprotofans.high-five.supportProof" LexiconBrokerProof = "com.atprotofans.high-five.brokerProof" LexiconActorStatus = "app.bsky.actor.status" LexiconFeedPost = "app.bsky.feed.post" LexiconFacetLink = "app.bsky.richtext.facet#link" LexiconFacetMention = "app.bsky.richtext.facet#mention" // New lexicons for one-big-room model LexiconHighFive = "com.atprotofans.high-five.highFive" LexiconHighFiveProof = "com.atprotofans.high-five.highFiveProof" ) // StrongRef is a reference to a specific version of a record. type StrongRef struct { Type string `json:"$type" cbor:"$type"` URI string `json:"uri" cbor:"uri"` CID string `json:"cid" cbor:"cid"` } // Support is the main high-five record created in the recipient's repository. type Support struct { Type string `json:"$type" cbor:"$type"` Subject string `json:"subject" cbor:"subject"` TxnID string `json:"txnid" cbor:"txnid"` CreatedAt string `json:"createdAt" cbor:"createdAt"` Signatures []StrongRef `json:"signatures,omitempty" cbor:"signatures,omitempty"` } // SupportContent is the content that gets hashed for the supportProof CID. type SupportContent struct { Type string `json:"$type" cbor:"$type"` Subject string `json:"subject" cbor:"subject"` TxnID string `json:"txnid" cbor:"txnid"` CreatedAt string `json:"createdAt" cbor:"createdAt"` Sig SupportProofSig `json:"$sig" cbor:"$sig"` } // SupportProofSig is the signature portion of the support content. type SupportProofSig struct { Type string `json:"$type" cbor:"$type"` Repository string `json:"repository" cbor:"repository"` } // SupportProof is the proof record created in the supporter's repository. type SupportProof struct { Type string `json:"$type" cbor:"$type"` CID string `json:"cid" cbor:"cid"` } // BrokerContent is the content that gets hashed for the brokerProof CID. type BrokerContent struct { Type string `json:"$type" cbor:"$type"` Subject string `json:"subject" cbor:"subject"` TxnID string `json:"txnid" cbor:"txnid"` CreatedAt string `json:"createdAt" cbor:"createdAt"` Sig BrokerProofSig `json:"$sig" cbor:"$sig"` } // BrokerProofSig is the signature portion of the broker content. type BrokerProofSig struct { Type string `json:"$type" cbor:"$type"` Repository string `json:"repository" cbor:"repository"` } // BrokerProof is the proof record created in the broker's repository. type BrokerProof struct { Type string `json:"$type" cbor:"$type"` CID string `json:"cid" cbor:"cid"` } // HighFive is the main record created by the identity giving the high-five. // Created in the giver's repository under com.atprotofans.high-five.highFive collection. type HighFive struct { Type string `json:"$type" cbor:"$type"` TxnID string `json:"txnid" cbor:"txnid"` Subject string `json:"subject" cbor:"subject"` // DID of recipient CreatedAt string `json:"createdAt" cbor:"createdAt"` Signatures []StrongRef `json:"signatures,omitempty" cbor:"signatures,omitempty"` } // HighFiveContent is used for computing the content CID for high-five proofs. type HighFiveContent struct { Type string `json:"$type" cbor:"$type"` TxnID string `json:"txnid" cbor:"txnid"` Subject string `json:"subject" cbor:"subject"` CreatedAt string `json:"createdAt" cbor:"createdAt"` Sig HighFiveProofSig `json:"$sig" cbor:"$sig"` } // HighFiveProofSig is the signature portion of the high-five content. type HighFiveProofSig struct { Type string `json:"$type" cbor:"$type"` Repository string `json:"repository" cbor:"repository"` // DID of high-five giver } // HighFiveProof is the proof record created in the recipient's repository. type HighFiveProof struct { Type string `json:"$type" cbor:"$type"` CID string `json:"cid" cbor:"cid"` } // ActorStatus represents the app.bsky.actor.status record. type ActorStatus struct { Type string `json:"$type"` Status string `json:"status"` CreatedAt string `json:"createdAt"` DurationMinutes *int `json:"durationMinutes,omitempty"` Embed *ActorStatusEmbed `json:"embed,omitempty"` } // ActorStatusEmbed represents an embed in the actor status. type ActorStatusEmbed struct { Type string `json:"$type"` External ActorStatusEmbedExternal `json:"external"` } // ActorStatusEmbedExternal represents the external link in an embed. type ActorStatusEmbedExternal struct { URI string `json:"uri"` Title string `json:"title"` Description string `json:"description"` } // CreateRecordRequest is the request body for com.atproto.repo.createRecord. type CreateRecordRequest struct { Repo string `json:"repo"` Collection string `json:"collection"` RKey string `json:"rkey,omitempty"` Record interface{} `json:"record"` } // CreateRecordResponse is the response from com.atproto.repo.createRecord. type CreateRecordResponse struct { URI string `json:"uri"` CID string `json:"cid"` } // DeleteRecordRequest is the request body for com.atproto.repo.deleteRecord. type DeleteRecordRequest struct { Repo string `json:"repo"` Collection string `json:"collection"` RKey string `json:"rkey"` } // FeedPost represents an app.bsky.feed.post record. type FeedPost struct { Type string `json:"$type"` Text string `json:"text"` CreatedAt string `json:"createdAt"` Facets []PostFacet `json:"facets,omitempty"` Reply *PostReply `json:"reply,omitempty"` } // PostReply contains references for reply threading. type PostReply struct { Root PostRef `json:"root"` Parent PostRef `json:"parent"` } // PostRef is a reference to a post (used in replies). type PostRef struct { URI string `json:"uri"` CID string `json:"cid"` } // PostFacet represents a rich text facet in a post. type PostFacet struct { Index FacetIndex `json:"index"` Features []FacetFeature `json:"features"` } // FacetIndex specifies the byte range for a facet. type FacetIndex struct { ByteStart int `json:"byteStart"` ByteEnd int `json:"byteEnd"` } // FacetFeature represents a feature in a facet (e.g., link, mention). type FacetFeature struct { Type string `json:"$type"` URI string `json:"uri,omitempty"` // For links DID string `json:"did,omitempty"` // For mentions }