···1+{
2+ "lexicon": 1,
3+ "id": "events.smokesignal.profile",
4+ "defs": {
5+ "main": {
6+ "type": "record",
7+ "description": "A user profile for Smoke Signal",
8+ "key": "literal:self",
9+ "record": {
10+ "type": "object",
11+ "properties": {
12+ "displayName": {
13+ "type": "string",
14+ "description": "The display name of the identity.",
15+ "maxGraphemes": 200,
16+ "maxLength": 200
17+ },
18+ "profile_host": {
19+ "type": "string",
20+ "description": "The service used for profile links",
21+ "knownValues": [
22+ "bsky.app",
23+ "blacksky.community"
24+ ]
25+ },
26+ "description": {
27+ "type": "string",
28+ "description": "A free text description of the identity.",
29+ "maxGraphemes": 2000,
30+ "maxLength": 2000
31+ },
32+ "facets": {
33+ "type": "array",
34+ "description": "Annotations of text (mentions, URLs, hashtags, etc) in the description.",
35+ "items": {
36+ "type": "ref",
37+ "ref": "app.bsky.richtext.facet"
38+ }
39+ },
40+ "avatar": {
41+ "type": "blob",
42+ "description": "Small image to be displayed next to events. AKA, 'profile picture'",
43+ "accept": ["image/png", "image/jpeg"],
44+ "maxSize": 1000000
45+ },
46+ "banner": {
47+ "type": "blob",
48+ "description": "Larger horizontal image to display behind profile view.",
49+ "accept": ["image/png", "image/jpeg"],
50+ "maxSize": 1000000
51+ }
52+ }
53+ }
54+ },
55+ "hiring": {
56+ "type": "token",
57+ "description": "Indicates the identity is actively hiring"
58+ },
59+ "forhire": {
60+ "type": "token",
61+ "description": "Indicates the identity is available for hire"
62+ }
63+ }
64+}
+10
migrations/20251024000000_profile_storage.sql
···0000000000
···1+CREATE TABLE profiles (
2+ aturi VARCHAR(1024) PRIMARY KEY,
3+ cid VARCHAR(256) NOT NULL,
4+ did VARCHAR(256) NOT NULL,
5+ display_name VARCHAR(1024) NOT NULL,
6+ record JSON NOT NULL,
7+ updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW ()
8+);
9+10+CREATE INDEX idx_profiles_did ON profiles (did);
···30 /// or appears to be corrupted or tampered with.
31 #[error("error-smokesignal-common-4 Invalid event format or corrupted data")]
32 InvalidEventFormat,
0000000000000033}
···30 /// or appears to be corrupted or tampered with.
31 #[error("error-smokesignal-common-4 Invalid event format or corrupted data")]
32 InvalidEventFormat,
33+34+ /// Error when an image file has an invalid format.
35+ ///
36+ /// This error occurs when an uploaded image file is not in a supported
37+ /// format (PNG or JPEG).
38+ #[error("error-smokesignal-common-5 Invalid image format: only PNG and JPEG are supported")]
39+ InvalidImageFormat,
40+41+ /// Error when a record update fails due to a concurrent modification.
42+ ///
43+ /// This error occurs when attempting to update a record but the record
44+ /// has been modified by another request since it was last read (CAS failure).
45+ #[error("error-smokesignal-common-6 The record has been modified by another request. Please refresh and try again.")]
46+ InvalidSwap,
47}