this repo has no description

update lexicons and do lexgen

+399
+4
Makefile
··· 37 check: ## Compile everything, checking syntax (does not output binaries) 38 go build ./... 39 40 .env: 41 if [ ! -f ".env" ]; then cp example.dev.env .env; fi
··· 37 check: ## Compile everything, checking syntax (does not output binaries) 38 go build ./... 39 40 + .PHONY: lexgen 41 + lexgen: ## Generate lexicon type packages from lexicon schemas 42 + glot codegen --output-dir api lexicons/social/scrumble 43 + 44 .env: 45 if [ ! -f ".env" ]; then cp example.dev.env .env; fi
+12
api/socialscrumble/betaaccountjoin.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.account.join 4 + 5 + package socialscrumble 6 + 7 + // Indicates that an account (user) wants to to be part of a scene. The key must be the DID of the scene. 8 + type BetaAccountJoin struct { 9 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.account.join"` 10 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 11 + Scene *string `json:"scene,omitempty" cborgen:"scene,omitempty"` 12 + }
+16
api/socialscrumble/betaaccountprofile.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.account.profile 4 + 5 + package socialscrumble 6 + 7 + import ( 8 + lexutil "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // Scrumble user profile. Presence of this record indicates that the account is a scrumble user. Scene community accounts should also include this record. 12 + type BetaAccountProfile struct { 13 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.account.profile"` 14 + Avatar *lexutil.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 15 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 16 + }
+20
api/socialscrumble/betacollectioncomment.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.collection.comment 4 + 5 + package socialscrumble 6 + 7 + import ( 8 + comatproto "github.com/bluesky-social/indigo/api/atproto" 9 + ) 10 + 11 + // Threaded discussion comment on an item. 12 + type BetaCollectionComment struct { 13 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.collection.comment"` 14 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 15 + Item comatproto.RepoStrongRef `json:"item" cborgen:"item"` 16 + Parent *comatproto.RepoStrongRef `json:"parent,omitempty" cborgen:"parent,omitempty"` 17 + Scene string `json:"scene" cborgen:"scene"` 18 + // text: TODO: length limit, and whether this is markdown (probably yes, but what subset) 19 + Text string `json:"text" cborgen:"text"` 20 + }
+18
api/socialscrumble/betacollectionfeedback.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.collection.feedback 4 + 5 + package socialscrumble 6 + 7 + import ( 8 + comatproto "github.com/bluesky-social/indigo/api/atproto" 9 + ) 10 + 11 + // Up/Down feedback on an item of content in a scene, from an account. Aggregating services must check for duplicate feedback. 12 + type BetaCollectionFeedback struct { 13 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.collection.feedback"` 14 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 15 + Feedback string `json:"feedback" cborgen:"feedback"` 16 + Scene string `json:"scene" cborgen:"scene"` 17 + Subject comatproto.RepoStrongRef `json:"subject" cborgen:"subject"` 18 + }
+120
api/socialscrumble/betacollectionitem.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.collection.item 4 + 5 + package socialscrumble 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + lexutil "github.com/bluesky-social/indigo/lex/util" 12 + ) 13 + 14 + // Individual item submitted to a scene. 15 + type BetaCollectionItem struct { 16 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.collection.item"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + Item BetaCollectionItem_Item `json:"item" cborgen:"item"` 19 + Scene string `json:"scene" cborgen:"scene"` 20 + Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 21 + } 22 + 23 + type BetaCollectionItem_Item struct { 24 + BetaCollectionItem_AtpItem *BetaCollectionItem_AtpItem 25 + BetaCollectionItem_ImageItem *BetaCollectionItem_ImageItem 26 + BetaCollectionItem_TextItem *BetaCollectionItem_TextItem 27 + BetaCollectionItem_WebItem *BetaCollectionItem_WebItem 28 + } 29 + 30 + func (t *BetaCollectionItem_Item) MarshalJSON() ([]byte, error) { 31 + if t.BetaCollectionItem_AtpItem != nil { 32 + t.BetaCollectionItem_AtpItem.LexiconTypeID = "social.scrumble.beta.collection.item#atpItem" 33 + return json.Marshal(t.BetaCollectionItem_AtpItem) 34 + } 35 + if t.BetaCollectionItem_ImageItem != nil { 36 + t.BetaCollectionItem_ImageItem.LexiconTypeID = "social.scrumble.beta.collection.item#imageItem" 37 + return json.Marshal(t.BetaCollectionItem_ImageItem) 38 + } 39 + if t.BetaCollectionItem_TextItem != nil { 40 + t.BetaCollectionItem_TextItem.LexiconTypeID = "social.scrumble.beta.collection.item#textItem" 41 + return json.Marshal(t.BetaCollectionItem_TextItem) 42 + } 43 + if t.BetaCollectionItem_WebItem != nil { 44 + t.BetaCollectionItem_WebItem.LexiconTypeID = "social.scrumble.beta.collection.item#webItem" 45 + return json.Marshal(t.BetaCollectionItem_WebItem) 46 + } 47 + return nil, fmt.Errorf("can not marshal empty union as JSON") 48 + } 49 + 50 + func (t *BetaCollectionItem_Item) UnmarshalJSON(b []byte) error { 51 + typ, err := lexutil.TypeExtract(b) 52 + if err != nil { 53 + return err 54 + } 55 + 56 + switch typ { 57 + case "social.scrumble.beta.collection.item#atpItem": 58 + t.BetaCollectionItem_AtpItem = new(BetaCollectionItem_AtpItem) 59 + return json.Unmarshal(b, t.BetaCollectionItem_AtpItem) 60 + case "social.scrumble.beta.collection.item#imageItem": 61 + t.BetaCollectionItem_ImageItem = new(BetaCollectionItem_ImageItem) 62 + return json.Unmarshal(b, t.BetaCollectionItem_ImageItem) 63 + case "social.scrumble.beta.collection.item#textItem": 64 + t.BetaCollectionItem_TextItem = new(BetaCollectionItem_TextItem) 65 + return json.Unmarshal(b, t.BetaCollectionItem_TextItem) 66 + case "social.scrumble.beta.collection.item#webItem": 67 + t.BetaCollectionItem_WebItem = new(BetaCollectionItem_WebItem) 68 + return json.Unmarshal(b, t.BetaCollectionItem_WebItem) 69 + default: 70 + return nil 71 + } 72 + } 73 + 74 + // BetaCollectionItem_AspectRatio is a "aspectRatio" in the social.scrumble.beta.collection.item schema. 75 + // 76 + // width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. 77 + type BetaCollectionItem_AspectRatio struct { 78 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.collection.item#aspectRatio,omitempty"` 79 + Height int64 `json:"height" cborgen:"height"` 80 + Width int64 `json:"width" cborgen:"width"` 81 + } 82 + 83 + // BetaCollectionItem_AtpItem is a "atpItem" in the social.scrumble.beta.collection.item schema. 84 + type BetaCollectionItem_AtpItem struct { 85 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.collection.item#atpItem,omitempty"` 86 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 87 + Uri string `json:"uri" cborgen:"uri"` 88 + } 89 + 90 + // BetaCollectionItem_Image is a "image" in the social.scrumble.beta.collection.item schema. 91 + type BetaCollectionItem_Image struct { 92 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.collection.item#image,omitempty"` 93 + Alt *string `json:"alt,omitempty" cborgen:"alt,omitempty"` 94 + AspectRatio *BetaCollectionItem_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 95 + Attribution *string `json:"attribution,omitempty" cborgen:"attribution,omitempty"` 96 + Image lexutil.LexBlob `json:"image" cborgen:"image"` 97 + License *string `json:"license,omitempty" cborgen:"license,omitempty"` 98 + } 99 + 100 + // BetaCollectionItem_ImageItem is a "imageItem" in the social.scrumble.beta.collection.item schema. 101 + type BetaCollectionItem_ImageItem struct { 102 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.collection.item#imageItem,omitempty"` 103 + Images []BetaCollectionItem_Image `json:"images" cborgen:"images"` 104 + } 105 + 106 + // BetaCollectionItem_TextItem is a "textItem" in the social.scrumble.beta.collection.item schema. 107 + type BetaCollectionItem_TextItem struct { 108 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.collection.item#textItem,omitempty"` 109 + Text string `json:"text" cborgen:"text"` 110 + Title *string `json:"title,omitempty" cborgen:"title,omitempty"` 111 + } 112 + 113 + // BetaCollectionItem_WebItem is a "webItem" in the social.scrumble.beta.collection.item schema. 114 + type BetaCollectionItem_WebItem struct { 115 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.collection.item#webItem,omitempty"` 116 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 117 + Thumb *lexutil.LexBlob `json:"thumb,omitempty" cborgen:"thumb,omitempty"` 118 + Title *string `json:"title,omitempty" cborgen:"title,omitempty"` 119 + Url string `json:"url" cborgen:"url"` 120 + }
+18
api/socialscrumble/betacollectionreaction.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.collection.reaction 4 + 5 + package socialscrumble 6 + 7 + import ( 8 + comatproto "github.com/bluesky-social/indigo/api/atproto" 9 + ) 10 + 11 + // Emoji reaction. Aggregators need to de-duplicate. 12 + type BetaCollectionReaction struct { 13 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.collection.reaction"` 14 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 15 + Emoji string `json:"emoji" cborgen:"emoji"` 16 + Scene string `json:"scene" cborgen:"scene"` 17 + Subject comatproto.RepoStrongRef `json:"subject" cborgen:"subject"` 18 + }
+55
api/socialscrumble/betascenedeclaration.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.scene.declaration 4 + 5 + package socialscrumble 6 + 7 + import ( 8 + appbsky "github.com/bluesky-social/indigo/api/bsky" 9 + lexutil "github.com/bluesky-social/indigo/lex/util" 10 + ) 11 + 12 + // Scene metadata and configuration. This record should live under the scene community account. 13 + type BetaSceneDeclaration struct { 14 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.scene.declaration"` 15 + Avatar *lexutil.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 16 + Config BetaSceneDeclaration_SceneConfig `json:"config" cborgen:"config"` 17 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 18 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 19 + DescriptionFacets []appbsky.RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` 20 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 21 + Guidelines []BetaSceneDeclaration_SceneGuideline `json:"guidelines" cborgen:"guidelines"` 22 + } 23 + 24 + // BetaSceneDeclaration_ConfigItems is a "configItems" in the social.scrumble.beta.scene.declaration schema. 25 + // 26 + // Configuration parameters for the scene (TODO) 27 + type BetaSceneDeclaration_ConfigItems struct { 28 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.scene.declaration#configItems,omitempty"` 29 + Types []string `json:"types,omitempty" cborgen:"types,omitempty"` 30 + } 31 + 32 + // BetaSceneDeclaration_ConfigLabeler is a "configLabeler" in the social.scrumble.beta.scene.declaration schema. 33 + // 34 + // Configuration parameters for the scene (TODO) 35 + type BetaSceneDeclaration_ConfigLabeler struct { 36 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.scene.declaration#configLabeler,omitempty"` 37 + Did string `json:"did" cborgen:"did"` 38 + } 39 + 40 + // BetaSceneDeclaration_SceneConfig is a "sceneConfig" in the social.scrumble.beta.scene.declaration schema. 41 + // 42 + // Configuration parameters for the scene 43 + type BetaSceneDeclaration_SceneConfig struct { 44 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.scene.declaration#sceneConfig,omitempty"` 45 + Items *BetaSceneDeclaration_ConfigItems `json:"items,omitempty" cborgen:"items,omitempty"` 46 + Labelers []BetaSceneDeclaration_ConfigLabeler `json:"labelers,omitempty" cborgen:"labelers,omitempty"` 47 + } 48 + 49 + // BetaSceneDeclaration_SceneGuideline is a "sceneGuideline" in the social.scrumble.beta.scene.declaration schema. 50 + // 51 + // An individual criteria or rule describing sumbissions and behaviors in the scene 52 + type BetaSceneDeclaration_SceneGuideline struct { 53 + LexiconTypeID string `json:"$type,omitempty" cborgen:"$type,const=social.scrumble.beta.scene.declaration#sceneGuideline,omitempty"` 54 + Text string `json:"text" cborgen:"text"` 55 + }
+14
api/socialscrumble/betascenemember.go
···
··· 1 + // Code generated by indigo lexgen tool. DO NOT EDIT MANUALLY. 2 + 3 + // Lexicon schema: social.scrumble.beta.scene.member 4 + 5 + package socialscrumble 6 + 7 + // Indicates that an account is a member of the scene. This records gets written to the scene community account. The key should be the account's DID. 8 + type BetaSceneMember struct { 9 + LexiconTypeID string `json:"$type" cborgen:"$type,const=social.scrumble.beta.scene.member"` 10 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 11 + Did string `json:"did" cborgen:"did"` 12 + // role: TODO: make these refs to a defs file? 13 + Role string `json:"role" cborgen:"role"` 14 + }
+89
lexicons/app/bsky/richtext/facet.json
···
··· 1 + { 2 + "defs": { 3 + "byteSlice": { 4 + "description": "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.", 5 + "properties": { 6 + "byteEnd": { 7 + "minimum": 0, 8 + "type": "integer" 9 + }, 10 + "byteStart": { 11 + "minimum": 0, 12 + "type": "integer" 13 + } 14 + }, 15 + "required": [ 16 + "byteStart", 17 + "byteEnd" 18 + ], 19 + "type": "object" 20 + }, 21 + "link": { 22 + "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", 23 + "properties": { 24 + "uri": { 25 + "format": "uri", 26 + "type": "string" 27 + } 28 + }, 29 + "required": [ 30 + "uri" 31 + ], 32 + "type": "object" 33 + }, 34 + "main": { 35 + "description": "Annotation of a sub-string within rich text.", 36 + "properties": { 37 + "features": { 38 + "items": { 39 + "refs": [ 40 + "#mention", 41 + "#link", 42 + "#tag" 43 + ], 44 + "type": "union" 45 + }, 46 + "type": "array" 47 + }, 48 + "index": { 49 + "ref": "#byteSlice", 50 + "type": "ref" 51 + } 52 + }, 53 + "required": [ 54 + "index", 55 + "features" 56 + ], 57 + "type": "object" 58 + }, 59 + "mention": { 60 + "description": "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", 61 + "properties": { 62 + "did": { 63 + "format": "did", 64 + "type": "string" 65 + } 66 + }, 67 + "required": [ 68 + "did" 69 + ], 70 + "type": "object" 71 + }, 72 + "tag": { 73 + "description": "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').", 74 + "properties": { 75 + "tag": { 76 + "maxGraphemes": 64, 77 + "maxLength": 640, 78 + "type": "string" 79 + } 80 + }, 81 + "required": [ 82 + "tag" 83 + ], 84 + "type": "object" 85 + } 86 + }, 87 + "id": "app.bsky.richtext.facet", 88 + "lexicon": 1 89 + }
+24
lexicons/com/atproto/repo/strongRef.json
···
··· 1 + { 2 + "defs": { 3 + "main": { 4 + "properties": { 5 + "cid": { 6 + "format": "cid", 7 + "type": "string" 8 + }, 9 + "uri": { 10 + "format": "at-uri", 11 + "type": "string" 12 + } 13 + }, 14 + "required": [ 15 + "uri", 16 + "cid" 17 + ], 18 + "type": "object" 19 + } 20 + }, 21 + "description": "A URI with a content-hash fingerprint.", 22 + "id": "com.atproto.repo.strongRef", 23 + "lexicon": 1 24 + }
+9
lexicons/social/scrumble/beta/collection/item.json
··· 121 "ref": "#aspectRatio" 122 } 123 } 124 } 125 } 126 }
··· 121 "ref": "#aspectRatio" 122 } 123 } 124 + }, 125 + "aspectRatio": { 126 + "type": "object", 127 + "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", 128 + "required": ["width", "height"], 129 + "properties": { 130 + "width": { "type": "integer", "minimum": 1 }, 131 + "height": { "type": "integer", "minimum": 1 } 132 + } 133 } 134 } 135 }