···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: community.lexicon.location.hthree
4+5+package communitylexicon
6+7+// A physical location in the form of a H3 encoded location.
8+type LocationHthree struct {
9+ LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=community.lexicon.location.hthree,omitempty"`
10+ // name: The name of the location.
11+ Name *string `json:"name,omitempty" cborgen:"name,omitempty"`
12+ // value: The h3 encoded location.
13+ Value string `json:"value" cborgen:"value"`
14+}
···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: place.atwork.endorsement
4+5+package placeatwork
6+7+import (
8+ "encoding/json"
9+ "fmt"
10+11+ comatproto "github.com/bluesky-social/indigo/api/atproto"
12+ lexutil "github.com/bluesky-social/indigo/lex/util"
13+)
14+15+// A cryptographically-verified professional endorsement between two identities.
16+type Endorsement struct {
17+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.atwork.endorsement"`
18+ // createdAt: Timestamp when the endorsement was created.
19+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
20+ // giver: The DID of the identity giving the endorsement.
21+ Giver string `json:"giver" cborgen:"giver"`
22+ // receiver: The DID of the identity receiving the endorsement.
23+ Receiver string `json:"receiver" cborgen:"receiver"`
24+ // signatures: Verified signatures from endorsement proofs (strong references).
25+ Signatures []Endorsement_Signatures_Elem `json:"signatures,omitempty" cborgen:"signatures,omitempty"`
26+ // text: The endorsement text content.
27+ Text string `json:"text" cborgen:"text"`
28+}
29+30+type Endorsement_Signatures_Elem struct {
31+ RepoStrongRef *comatproto.RepoStrongRef
32+}
33+34+func (t *Endorsement_Signatures_Elem) MarshalJSON() ([]byte, error) {
35+ if t.RepoStrongRef != nil {
36+ t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef"
37+ return json.Marshal(t.RepoStrongRef)
38+ }
39+ return nil, fmt.Errorf("can not marshal empty union as JSON")
40+}
41+42+func (t *Endorsement_Signatures_Elem) UnmarshalJSON(b []byte) error {
43+ typ, err := lexutil.TypeExtract(b)
44+ if err != nil {
45+ return err
46+ }
47+48+ switch typ {
49+ case "com.atproto.repo.strongRef":
50+ t.RepoStrongRef = new(comatproto.RepoStrongRef)
51+ return json.Unmarshal(b, t.RepoStrongRef)
52+ default:
53+ return nil
54+ }
55+}
+12
placeatwork/endorsementProof.go
···000000000000
···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: place.atwork.endorsementProof
4+5+package placeatwork
6+7+// A cryptographic proof record that validates an endorsement by containing the CID of the endorsement content.
8+type EndorsementProof struct {
9+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.atwork.endorsementProof"`
10+ // cid: The CID (Content Identifier) of the endorsement content that this proof validates. The endorsement's signatures array references this proof record.
11+ Cid string `json:"cid" cborgen:"cid"`
12+}
+40
placeatwork/getListing.go
···0000000000000000000000000000000000000000
···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: place.atwork.getListing
4+5+package placeatwork
6+7+import (
8+ "context"
9+10+ lexutil "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+// GetListing_Output is the output of a place.atwork.getListing call.
14+type GetListing_Output struct {
15+ // cid: CID of the listing record
16+ Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
17+ // uri: AT-URI of the listing
18+ Uri string `json:"uri" cborgen:"uri"`
19+ // value: The job listing record
20+ Value Listing `json:"value" cborgen:"value"`
21+}
22+23+// GetListing calls the XRPC method "place.atwork.getListing".
24+//
25+// # Get a single job listing by repo (DID) and record key
26+//
27+// repo: The DID of the repo (repository owner)
28+// rkey: The record key (TID)
29+func GetListing(ctx context.Context, c lexutil.LexClient, repo string, rkey string) (*GetListing_Output, error) {
30+ var out GetListing_Output
31+32+ params := map[string]interface{}{}
33+ params["repo"] = repo
34+ params["rkey"] = rkey
35+36+ if err := c.LexDo(ctx, lexutil.Query, "", "place.atwork.getListing", params, nil, &out); err != nil {
37+ return nil, err
38+ }
39+ return &out, nil
40+}
···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: place.atwork.listing
4+5+package placeatwork
6+7+import (
8+ "encoding/json"
9+ "fmt"
10+11+ appbsky "github.com/bluesky-social/indigo/api/bsky"
12+ lexutil "github.com/bluesky-social/indigo/lex/util"
13+ "tangled.org/bnewbold.net/atwork-cli/communitylexicon"
14+)
15+16+// A job listing
17+type Listing struct {
18+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.atwork.listing"`
19+ // applyLink: URL where applicants can apply for the job.
20+ ApplyLink *string `json:"applyLink,omitempty" cborgen:"applyLink,omitempty"`
21+ // banner: Larger horizontal image to display behind job listing view.
22+ Banner *lexutil.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"`
23+ // description: The description of the job listing.
24+ Description string `json:"description" cborgen:"description"`
25+ // facets: Annotations of text (mentions, URLs, hashtags, etc).
26+ Facets []appbsky.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"`
27+ // locations: Locations that are relevant to the job listing.
28+ Locations []Listing_Locations_Elem `json:"locations,omitempty" cborgen:"locations,omitempty"`
29+ // notAfter: Client-declared timestamp when the job listing expires.
30+ NotAfter string `json:"notAfter" cborgen:"notAfter"`
31+ // notBefore: Client-declared timestamp when the job listing becomes visible.
32+ NotBefore string `json:"notBefore" cborgen:"notBefore"`
33+ // title: The title of the job listing.
34+ Title string `json:"title" cborgen:"title"`
35+}
36+37+type Listing_Locations_Elem struct {
38+ LocationHthree *communitylexicon.LocationHthree
39+}
40+41+func (t *Listing_Locations_Elem) MarshalJSON() ([]byte, error) {
42+ if t.LocationHthree != nil {
43+ t.LocationHthree.LexiconTypeID = "community.lexicon.location.hthree"
44+ return json.Marshal(t.LocationHthree)
45+ }
46+ return nil, fmt.Errorf("can not marshal empty union as JSON")
47+}
48+49+func (t *Listing_Locations_Elem) UnmarshalJSON(b []byte) error {
50+ typ, err := lexutil.TypeExtract(b)
51+ if err != nil {
52+ return err
53+ }
54+55+ switch typ {
56+ case "community.lexicon.location.hthree":
57+ t.LocationHthree = new(communitylexicon.LocationHthree)
58+ return json.Unmarshal(b, t.LocationHthree)
59+ default:
60+ return nil
61+ }
62+}
+31
placeatwork/profile.go
···0000000000000000000000000000000
···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: place.atwork.profile
4+5+package placeatwork
6+7+import (
8+ appbsky "github.com/bluesky-social/indigo/api/bsky"
9+ lexutil "github.com/bluesky-social/indigo/lex/util"
10+)
11+12+// A user profile for AT://Work.Place
13+type Profile struct {
14+ LexiconTypeID string `json:"$type" cborgen:"$type,const=place.atwork.profile"`
15+ // avatar: Small image to be displayed next to job listings from account. AKA, 'profile picture'
16+ Avatar *lexutil.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"`
17+ // banner: Larger horizontal image to display behind profile view.
18+ Banner *lexutil.LexBlob `json:"banner,omitempty" cborgen:"banner,omitempty"`
19+ // description: A free text description of the identity.
20+ Description *string `json:"description,omitempty" cborgen:"description,omitempty"`
21+ // displayName: The display name of the identity.
22+ DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"`
23+ // facets: Annotations of text (mentions, URLs, hashtags, etc) in the description.
24+ Facets []appbsky.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"`
25+ // profile_host: The service used for profile links
26+ Profile_host *string `json:"profile_host,omitempty" cborgen:"profile_host,omitempty"`
27+ // resume: The identity's resume.
28+ Resume *lexutil.LexBlob `json:"resume,omitempty" cborgen:"resume,omitempty"`
29+ // status: The current status of the identity.
30+ Status *string `json:"status,omitempty" cborgen:"status,omitempty"`
31+}
+46
placeatwork/searchListings.go
···0000000000000000000000000000000000000000000000
···1+// Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY.
2+3+// Lexicon schema: place.atwork.searchListings
4+5+package placeatwork
6+7+import (
8+ "context"
9+10+ lexutil "github.com/bluesky-social/indigo/lex/util"
11+)
12+13+// SearchListings_Output is the output of a place.atwork.searchListings call.
14+type SearchListings_Output struct {
15+ Listings []SearchListings_ListingRecord `json:"listings" cborgen:"listings"`
16+}
17+18+// SearchListings calls the XRPC method "place.atwork.searchListings".
19+//
20+// # Search job listings using full-text query
21+//
22+// query: Search query string for full-text search
23+func SearchListings(ctx context.Context, c lexutil.LexClient, query string) (*SearchListings_Output, error) {
24+ var out SearchListings_Output
25+26+ params := map[string]interface{}{}
27+ params["query"] = query
28+29+ if err := c.LexDo(ctx, lexutil.Query, "", "place.atwork.searchListings", params, nil, &out); err != nil {
30+ return nil, err
31+ }
32+ return &out, nil
33+}
34+35+// SearchListings_ListingRecord is a "listingRecord" in the place.atwork.searchListings schema.
36+//
37+// A job listing record with metadata for strong references
38+type SearchListings_ListingRecord struct {
39+ LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=place.atwork.searchListings#listingRecord,omitempty"`
40+ // cid: CID of the listing record
41+ Cid string `json:"cid" cborgen:"cid"`
42+ // uri: AT-URI of the listing (at://did/place.atwork.listing/rkey)
43+ Uri string `json:"uri" cborgen:"uri"`
44+ // value: The full job listing record
45+ Value *Listing `json:"value,omitempty" cborgen:"value,omitempty"`
46+}