From 28e8450cbb1a7190bd6d1d90553059cfb93280ec Mon Sep 17 00:00:00 2001 From: Florian <45694132+flo-bit@users.noreply.github.com> Date: Sat, 15 Aug 2026 06:18:26 +0200 Subject: [PATCH] commit --- contrail.lock.json | 8 +- lex.config.js | 2 +- src/lib/assets/favicon.svg | 1 - src/lib/atproto/index.ts | 5 +- src/lib/atproto/oauth.remote.ts | 21 -- src/lib/contrail/index.ts | 6 +- .../lexicons/app/bsky/actor/profile.json | 75 +++++++ .../lexicons/com/atproto/label/defs.json | 190 ++++++++++++++++++ .../lexicons/com/atproto/repo/strongRef.json | 25 +++ .../watch/atmo/comment/getRecord.json | 3 +- .../watch/atmo/comment/listRecords.json | 3 +- .../lexicons/watch/atmo/getProfile.json | 3 +- .../lexicons/watch/atmo/like/getRecord.json | 3 +- .../lexicons/watch/atmo/like/listRecords.json | 3 +- .../lexicons/watch/atmo/list/getRecord.json | 3 +- .../lexicons/watch/atmo/list/listRecords.json | 3 +- .../watch/atmo/listItem/getRecord.json | 3 +- .../watch/atmo/listItem/listRecords.json | 3 +- .../lexicons/watch/atmo/review/getRecord.json | 3 +- .../watch/atmo/review/listRecords.json | 3 +- src/lib/contrail/types/index.ts | 3 + .../types/types/app/bsky/actor/profile.ts | 98 +++++++++ .../types/types/com/atproto/label/defs.ts | 184 +++++++++++++++++ .../types/types/com/atproto/repo/strongRef.ts | 14 ++ .../types/watch/atmo/comment/getRecord.ts | 25 ++- .../types/watch/atmo/comment/listRecords.ts | 25 ++- .../types/types/watch/atmo/getProfile.ts | 25 ++- .../types/types/watch/atmo/like/getRecord.ts | 25 ++- .../types/watch/atmo/like/listRecords.ts | 25 ++- .../types/types/watch/atmo/list/getRecord.ts | 25 ++- .../types/watch/atmo/list/listRecords.ts | 25 ++- .../types/watch/atmo/listItem/getRecord.ts | 25 ++- .../types/watch/atmo/listItem/listRecords.ts | 25 ++- .../types/watch/atmo/review/getRecord.ts | 25 ++- .../types/watch/atmo/review/listRecords.ts | 25 ++- src/routes/(app)/+layout.server.ts | 5 + src/routes/(app)/+layout.svelte | 4 +- .../(app)/_components/AccountMenuItem.svelte | 58 ++++++ src/routes/(app)/_components/AppMenu.svelte | 94 ++------- src/routes/(app)/_components/MenuItem.svelte | 54 +++++ .../(app)/_components/SearchMenuItem.svelte | 69 +++++++ .../(app)/profile/[actor]/+layout.server.ts | 116 ++++++----- src/routes/(app)/profile/[actor]/+page.svelte | 41 +++- src/routes/+layout.svelte | 2 - src/routes/demo/atproto/+page.server.ts | 66 ------ src/routes/demo/atproto/+page.svelte | 52 ----- src/routes/demo/atproto/login/+page.server.ts | 19 -- src/routes/demo/atproto/login/+page.svelte | 42 ---- 48 files changed, 1080 insertions(+), 482 deletions(-) delete mode 100644 src/lib/assets/favicon.svg create mode 100644 src/lib/contrail/lexicons/app/bsky/actor/profile.json create mode 100644 src/lib/contrail/lexicons/com/atproto/label/defs.json create mode 100644 src/lib/contrail/lexicons/com/atproto/repo/strongRef.json create mode 100644 src/lib/contrail/types/types/app/bsky/actor/profile.ts create mode 100644 src/lib/contrail/types/types/com/atproto/label/defs.ts create mode 100644 src/lib/contrail/types/types/com/atproto/repo/strongRef.ts create mode 100644 src/routes/(app)/+layout.server.ts create mode 100644 src/routes/(app)/_components/AccountMenuItem.svelte create mode 100644 src/routes/(app)/_components/MenuItem.svelte create mode 100644 src/routes/(app)/_components/SearchMenuItem.svelte delete mode 100644 src/routes/demo/atproto/+page.server.ts delete mode 100644 src/routes/demo/atproto/+page.svelte delete mode 100644 src/routes/demo/atproto/login/+page.server.ts delete mode 100644 src/routes/demo/atproto/login/+page.svelte diff --git a/contrail.lock.json b/contrail.lock.json index bdca287..d76ac5f 100644 --- a/contrail.lock.json +++ b/contrail.lock.json @@ -3,8 +3,8 @@ "version": 1, "endpoint": "http://127.0.0.1:8787", "namespace": "watch.atmo", - "contractDigest": "sha256:0f5f5b7930ba4502e4ef35f81ac33abd71896958e45841c96f55748a631e4d19", - "lexiconDigest": "sha256:ec400c9703839dd015a9d006e626f3b7d03f52815db8b4d7b183de23bb387385", + "contractDigest": "sha256:401ce47ba01fb8c1ba1c34821782214c2c95eb1752784630f064c659dd6b1b0f", + "lexiconDigest": "sha256:c979563d792495eda7062f0a4748b83d3724ba5b0d98991de0d7868092eda8b7", "methods": [ "watch.atmo.comment.getRecord", "watch.atmo.comment.listRecords", @@ -16,13 +16,11 @@ "watch.atmo.list.listRecords", "watch.atmo.listItem.getRecord", "watch.atmo.listItem.listRecords", - "watch.atmo.profile.getRecord", - "watch.atmo.profile.listRecords", "watch.atmo.review.getRecord", "watch.atmo.review.listRecords" ], "collections": [ - "social.popfeed.actor.profile", + "app.bsky.actor.profile", "social.popfeed.feed.comment", "social.popfeed.feed.like", "social.popfeed.feed.list", diff --git a/lex.config.js b/lex.config.js index 1f75dc4..643c7ff 100644 --- a/lex.config.js +++ b/lex.config.js @@ -5,7 +5,7 @@ export default { serviceDid: null, scope: null, collections: [ - "social.popfeed.actor.profile", + "app.bsky.actor.profile", "social.popfeed.feed.comment", "social.popfeed.feed.like", "social.popfeed.feed.list", diff --git a/src/lib/assets/favicon.svg b/src/lib/assets/favicon.svg deleted file mode 100644 index cc5dc66..0000000 --- a/src/lib/assets/favicon.svg +++ /dev/null @@ -1 +0,0 @@ -svelte-logo \ No newline at end of file diff --git a/src/lib/atproto/index.ts b/src/lib/atproto/index.ts index 555eb72..a98ce8f 100644 --- a/src/lib/atproto/index.ts +++ b/src/lib/atproto/index.ts @@ -3,13 +3,16 @@ import '@atcute/atproto'; import { createAtprotoAuth } from '@svelte-atproto/oauth/server'; import { cloudflareKV } from '@svelte-atproto/oauth/server/stores/cloudflare'; import { env } from '$env/dynamic/private'; +import { contrail } from '$lib/contrail'; // To enable signup, add: signupPDS: 'https://your-pds.example/' export const atproto = createAtprotoAuth({ origin: env.ORIGIN, cookieSecret: env.COOKIE_SECRET, clientAssertionKey: env.CLIENT_ASSERTION_KEY, - scope: 'atproto repo:xyz.statusphere.status', + scope: + 'atproto repo:social.popfeed.feed.review repo:social.popfeed.feed.comment repo:social.popfeed.feed.like repo:social.popfeed.feed.list repo:social.popfeed.feed.listItem ' + + contrail.scope, sessions: cloudflareKV('OAUTH_SESSIONS'), states: cloudflareKV('OAUTH_STATES', { ttl: 600 }) }); diff --git a/src/lib/atproto/oauth.remote.ts b/src/lib/atproto/oauth.remote.ts index c4e7f7c..a9239d6 100644 --- a/src/lib/atproto/oauth.remote.ts +++ b/src/lib/atproto/oauth.remote.ts @@ -14,24 +14,3 @@ export const oauthLogin = command( ); export const oauthLogout = command(() => atproto.api.logout()); - -const COLLECTION = 'xyz.statusphere.status'; - -export const setStatus = command(v.string(), async (status) => { - const { locals } = getRequestEvent(); - if (!locals.client || !locals.did) error(401, 'Not signed in'); - - await locals.client.post('com.atproto.repo.putRecord', { - input: { - repo: locals.did, - collection: COLLECTION, - rkey: createTID(), - record: { - $type: COLLECTION, - status, - createdAt: new Date().toISOString() - } - } - }); - return { ok: true }; -}); diff --git a/src/lib/contrail/index.ts b/src/lib/contrail/index.ts index a6beffa..3567d50 100644 --- a/src/lib/contrail/index.ts +++ b/src/lib/contrail/index.ts @@ -5,7 +5,7 @@ import type {} from "./types/index.js"; export const contrail = createPublicServiceClient({ endpoint: "http://127.0.0.1:8787", allowInsecureHttp: true, - contractDigest: "sha256:0f5f5b7930ba4502e4ef35f81ac33abd71896958e45841c96f55748a631e4d19", + contractDigest: "sha256:401ce47ba01fb8c1ba1c34821782214c2c95eb1752784630f064c659dd6b1b0f", serviceMethods: [ "watch.atmo.comment.getRecord", "watch.atmo.comment.listRecords", @@ -17,13 +17,11 @@ export const contrail = createPublicServiceClient({ "watch.atmo.list.listRecords", "watch.atmo.listItem.getRecord", "watch.atmo.listItem.listRecords", - "watch.atmo.profile.getRecord", - "watch.atmo.profile.listRecords", "watch.atmo.review.getRecord", "watch.atmo.review.listRecords", ], collections: [ - "social.popfeed.actor.profile", + "app.bsky.actor.profile", "social.popfeed.feed.comment", "social.popfeed.feed.like", "social.popfeed.feed.list", diff --git a/src/lib/contrail/lexicons/app/bsky/actor/profile.json b/src/lib/contrail/lexicons/app/bsky/actor/profile.json new file mode 100644 index 0000000..0a799fb --- /dev/null +++ b/src/lib/contrail/lexicons/app/bsky/actor/profile.json @@ -0,0 +1,75 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "description": "A declaration of a Bluesky account profile.", + "key": "literal:self", + "record": { + "properties": { + "avatar": { + "accept": [ + "image/jpeg", + "image/png" + ], + "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "maxSize": 1000000, + "type": "blob" + }, + "banner": { + "accept": [ + "image/jpeg", + "image/png" + ], + "description": "Larger horizontal image to display behind profile view.", + "maxSize": 1000000, + "type": "blob" + }, + "createdAt": { + "format": "datetime", + "type": "string" + }, + "description": { + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560, + "type": "string" + }, + "displayName": { + "maxGraphemes": 64, + "maxLength": 640, + "type": "string" + }, + "joinedViaStarterPack": { + "ref": "com.atproto.repo.strongRef", + "type": "ref" + }, + "labels": { + "description": "Self-label values, specific to the Bluesky application, on the overall account.", + "refs": [ + "com.atproto.label.defs#selfLabels" + ], + "type": "union" + }, + "pinnedPost": { + "ref": "com.atproto.repo.strongRef", + "type": "ref" + }, + "pronouns": { + "description": "Free-form pronouns text.", + "maxGraphemes": 20, + "maxLength": 200, + "type": "string" + }, + "website": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "type": "record" + } + }, + "id": "app.bsky.actor.profile", + "lexicon": 1 +} diff --git a/src/lib/contrail/lexicons/com/atproto/label/defs.json b/src/lib/contrail/lexicons/com/atproto/label/defs.json new file mode 100644 index 0000000..6c0baa8 --- /dev/null +++ b/src/lib/contrail/lexicons/com/atproto/label/defs.json @@ -0,0 +1,190 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "label": { + "description": "Metadata tag on an atproto resource (eg, repo or record).", + "properties": { + "cid": { + "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", + "format": "cid", + "type": "string" + }, + "cts": { + "description": "Timestamp when this label was created.", + "format": "datetime", + "type": "string" + }, + "exp": { + "description": "Timestamp at which this label expires (no longer applies).", + "format": "datetime", + "type": "string" + }, + "neg": { + "description": "If true, this is a negation label, overwriting a previous label.", + "type": "boolean" + }, + "sig": { + "description": "Signature of dag-cbor encoded label.", + "type": "bytes" + }, + "src": { + "description": "DID of the actor who created this label.", + "format": "did", + "type": "string" + }, + "uri": { + "description": "AT URI of the record, repository (account), or other resource that this label applies to.", + "format": "uri", + "type": "string" + }, + "val": { + "description": "The short string name of the value or type of this label.", + "maxLength": 128, + "type": "string" + }, + "ver": { + "description": "The AT Protocol version of the label object.", + "type": "integer" + } + }, + "required": [ + "cts", + "src", + "uri", + "val" + ], + "type": "object" + }, + "labelValue": { + "knownValues": [ + "!hide", + "!no-unauthenticated", + "!warn", + "bot", + "graphic-media", + "nudity", + "porn", + "sexual" + ], + "type": "string" + }, + "labelValueDefinition": { + "description": "Declares a label value and its expected interpretations and behaviors.", + "properties": { + "adultOnly": { + "description": "Does the user need to have adult content enabled in order to configure this label?", + "type": "boolean" + }, + "blurs": { + "description": "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", + "knownValues": [ + "content", + "media", + "none" + ], + "type": "string" + }, + "defaultSetting": { + "default": "warn", + "description": "The default setting for this label.", + "knownValues": [ + "hide", + "ignore", + "warn" + ], + "type": "string" + }, + "identifier": { + "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", + "maxGraphemes": 100, + "maxLength": 100, + "type": "string" + }, + "locales": { + "items": { + "ref": "#labelValueDefinitionStrings", + "type": "ref" + }, + "type": "array" + }, + "severity": { + "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", + "knownValues": [ + "alert", + "inform", + "none" + ], + "type": "string" + } + }, + "required": [ + "blurs", + "identifier", + "locales", + "severity" + ], + "type": "object" + }, + "labelValueDefinitionStrings": { + "description": "Strings which describe the label in the UI, localized into a specific language.", + "properties": { + "description": { + "description": "A longer description of what the label means and why it might be applied.", + "maxGraphemes": 10000, + "maxLength": 100000, + "type": "string" + }, + "lang": { + "description": "The code of the language these strings are written in.", + "format": "language", + "type": "string" + }, + "name": { + "description": "A short human-readable name for the label.", + "maxGraphemes": 64, + "maxLength": 640, + "type": "string" + } + }, + "required": [ + "description", + "lang", + "name" + ], + "type": "object" + }, + "selfLabel": { + "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", + "properties": { + "val": { + "description": "The short string name of the value or type of this label.", + "maxLength": 128, + "type": "string" + } + }, + "required": [ + "val" + ], + "type": "object" + }, + "selfLabels": { + "description": "Metadata tags on an atproto record, published by the author within the record.", + "properties": { + "values": { + "items": { + "ref": "#selfLabel", + "type": "ref" + }, + "maxLength": 10, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + } + }, + "id": "com.atproto.label.defs", + "lexicon": 1 +} diff --git a/src/lib/contrail/lexicons/com/atproto/repo/strongRef.json b/src/lib/contrail/lexicons/com/atproto/repo/strongRef.json new file mode 100644 index 0000000..ee2c652 --- /dev/null +++ b/src/lib/contrail/lexicons/com/atproto/repo/strongRef.json @@ -0,0 +1,25 @@ +{ + "$type": "com.atproto.lexicon.schema", + "defs": { + "main": { + "properties": { + "cid": { + "format": "cid", + "type": "string" + }, + "uri": { + "format": "at-uri", + "type": "string" + } + }, + "required": [ + "cid", + "uri" + ], + "type": "object" + } + }, + "description": "A URI with a content-hash fingerprint.", + "id": "com.atproto.repo.strongRef", + "lexicon": 1 +} diff --git a/src/lib/contrail/lexicons/watch/atmo/comment/getRecord.json b/src/lib/contrail/lexicons/watch/atmo/comment/getRecord.json index 24f2aeb..1ca1ff8 100644 --- a/src/lib/contrail/lexicons/watch/atmo/comment/getRecord.json +++ b/src/lib/contrail/lexicons/watch/atmo/comment/getRecord.json @@ -95,7 +95,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/comment/listRecords.json b/src/lib/contrail/lexicons/watch/atmo/comment/listRecords.json index b8dda53..6f4bcb7 100644 --- a/src/lib/contrail/lexicons/watch/atmo/comment/listRecords.json +++ b/src/lib/contrail/lexicons/watch/atmo/comment/listRecords.json @@ -80,7 +80,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/getProfile.json b/src/lib/contrail/lexicons/watch/atmo/getProfile.json index 2ba86f0..9e449da 100644 --- a/src/lib/contrail/lexicons/watch/atmo/getProfile.json +++ b/src/lib/contrail/lexicons/watch/atmo/getProfile.json @@ -58,7 +58,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/like/getRecord.json b/src/lib/contrail/lexicons/watch/atmo/like/getRecord.json index 3c7c6ab..c970c39 100644 --- a/src/lib/contrail/lexicons/watch/atmo/like/getRecord.json +++ b/src/lib/contrail/lexicons/watch/atmo/like/getRecord.json @@ -95,7 +95,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/like/listRecords.json b/src/lib/contrail/lexicons/watch/atmo/like/listRecords.json index c3cb7ce..faba832 100644 --- a/src/lib/contrail/lexicons/watch/atmo/like/listRecords.json +++ b/src/lib/contrail/lexicons/watch/atmo/like/listRecords.json @@ -80,7 +80,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/list/getRecord.json b/src/lib/contrail/lexicons/watch/atmo/list/getRecord.json index bbb60cd..8ef33e3 100644 --- a/src/lib/contrail/lexicons/watch/atmo/list/getRecord.json +++ b/src/lib/contrail/lexicons/watch/atmo/list/getRecord.json @@ -95,7 +95,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/list/listRecords.json b/src/lib/contrail/lexicons/watch/atmo/list/listRecords.json index 07d8a9b..a5b9556 100644 --- a/src/lib/contrail/lexicons/watch/atmo/list/listRecords.json +++ b/src/lib/contrail/lexicons/watch/atmo/list/listRecords.json @@ -80,7 +80,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/listItem/getRecord.json b/src/lib/contrail/lexicons/watch/atmo/listItem/getRecord.json index 7087dbb..deaa964 100644 --- a/src/lib/contrail/lexicons/watch/atmo/listItem/getRecord.json +++ b/src/lib/contrail/lexicons/watch/atmo/listItem/getRecord.json @@ -95,7 +95,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/listItem/listRecords.json b/src/lib/contrail/lexicons/watch/atmo/listItem/listRecords.json index 58acdaa..7863228 100644 --- a/src/lib/contrail/lexicons/watch/atmo/listItem/listRecords.json +++ b/src/lib/contrail/lexicons/watch/atmo/listItem/listRecords.json @@ -80,7 +80,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/review/getRecord.json b/src/lib/contrail/lexicons/watch/atmo/review/getRecord.json index e78cdaa..53b09a3 100644 --- a/src/lib/contrail/lexicons/watch/atmo/review/getRecord.json +++ b/src/lib/contrail/lexicons/watch/atmo/review/getRecord.json @@ -95,7 +95,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/lexicons/watch/atmo/review/listRecords.json b/src/lib/contrail/lexicons/watch/atmo/review/listRecords.json index cab01d0..85193cb 100644 --- a/src/lib/contrail/lexicons/watch/atmo/review/listRecords.json +++ b/src/lib/contrail/lexicons/watch/atmo/review/listRecords.json @@ -80,7 +80,8 @@ "type": "string" }, "value": { - "type": "unknown" + "ref": "app.bsky.actor.profile#main", + "type": "ref" } }, "required": [ diff --git a/src/lib/contrail/types/index.ts b/src/lib/contrail/types/index.ts index b5da30d..15e1fe1 100644 --- a/src/lib/contrail/types/index.ts +++ b/src/lib/contrail/types/index.ts @@ -1,3 +1,6 @@ +export * as AppBskyActorProfile from "./types/app/bsky/actor/profile.js"; +export * as ComAtprotoLabelDefs from "./types/com/atproto/label/defs.js"; +export * as ComAtprotoRepoStrongRef from "./types/com/atproto/repo/strongRef.js"; export * as SocialPopfeedActorProfile from "./types/social/popfeed/actor/profile.js"; export * as SocialPopfeedFeedComment from "./types/social/popfeed/feed/comment.js"; export * as SocialPopfeedFeedLike from "./types/social/popfeed/feed/like.js"; diff --git a/src/lib/contrail/types/types/app/bsky/actor/profile.ts b/src/lib/contrail/types/types/app/bsky/actor/profile.ts new file mode 100644 index 0000000..1b1574e --- /dev/null +++ b/src/lib/contrail/types/types/app/bsky/actor/profile.ts @@ -0,0 +1,98 @@ +import type {} from '@atcute/lexicons'; +import * as v from '@atcute/lexicons/validations'; +import type {} from '@atcute/lexicons/ambient'; +import * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.js"; +import * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.js"; + +const _mainSchema = /*#__PURE__*/ v.record( + /*#__PURE__*/ v.literal("self"), + /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.literal("app.bsky.actor.profile"), + /** + * Small image to be displayed next to posts from account. AKA, 'profile picture' + * @accept image/jpeg, image/png + * @maxSize 1000000 + */ + "avatar": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.blob(), + [ + /*#__PURE__*/ v.blobSize(1000000), + /*#__PURE__*/ v.blobAccept(["image/jpeg", "image/png"]) + ] + )), + /** + * Larger horizontal image to display behind profile view. + * @accept image/jpeg, image/png + * @maxSize 1000000 + */ + "banner": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.blob(), + [ + /*#__PURE__*/ v.blobSize(1000000), + /*#__PURE__*/ v.blobAccept(["image/jpeg", "image/png"]) + ] + )), + "createdAt": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), + /** + * Free-form profile description text. + * @maxLength 2560 + * @maxGraphemes 256 + */ + "description": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [ + /*#__PURE__*/ v.stringLength(0, 2560), + /*#__PURE__*/ v.stringGraphemes(0, 256) + ] + )), + /** + * @maxLength 640 + * @maxGraphemes 64 + */ + "displayName": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [ + /*#__PURE__*/ v.stringLength(0, 640), + /*#__PURE__*/ v.stringGraphemes(0, 64) + ] + )), + get "joinedViaStarterPack"() { + return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema) + }, + /** + * Self-label values, specific to the Bluesky application, on the overall account. + */ + get "labels"() { + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([ComAtprotoLabelDefs.selfLabelsSchema])) + }, + get "pinnedPost"() { + return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema) + }, + /** + * Free-form pronouns text. + * @maxLength 200 + * @maxGraphemes 20 + */ + "pronouns": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [ + /*#__PURE__*/ v.stringLength(0, 200), + /*#__PURE__*/ v.stringGraphemes(0, 20) + ] + )), + "website": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), + } + ) +); +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} +export const mainSchema = _mainSchema as mainSchema; + +export interface Main extends v.InferInput {} +declare module '@atcute/lexicons/ambient' { + interface Records { + "app.bsky.actor.profile": mainSchema; + } +} diff --git a/src/lib/contrail/types/types/com/atproto/label/defs.ts b/src/lib/contrail/types/types/com/atproto/label/defs.ts new file mode 100644 index 0000000..1614d05 --- /dev/null +++ b/src/lib/contrail/types/types/com/atproto/label/defs.ts @@ -0,0 +1,184 @@ +import type {} from '@atcute/lexicons'; +import * as v from '@atcute/lexicons/validations'; + +const _labelSchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("com.atproto.label.defs#label")), + /** + * Optionally, CID specifying the specific version of 'uri' resource this label applies to. + */ + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + /** + * Timestamp when this label was created. + */ + "cts": /*#__PURE__*/ v.datetimeString(), + /** + * Timestamp at which this label expires (no longer applies). + */ + "exp": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), + /** + * If true, this is a negation label, overwriting a previous label. + */ + "neg": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + /** + * Signature of dag-cbor encoded label. + */ + "sig": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.bytes()), + /** + * DID of the actor who created this label. + */ + "src": /*#__PURE__*/ v.didString(), + /** + * AT URI of the record, repository (account), or other resource that this label applies to. + */ + "uri": /*#__PURE__*/ v.genericUriString(), + /** + * The short string name of the value or type of this label. + * @maxLength 128 + */ + "val": /*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [/*#__PURE__*/ v.stringLength(0, 128)] + ), + /** + * The AT Protocol version of the label object. + */ + "ver": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), + } +); +const _labelValueSchema = /*#__PURE__*/ v.string<"!hide" | "!no-unauthenticated" | "!warn" | "bot" | "graphic-media" | "nudity" | "porn" | "sexual" | (string & {})>(); +const _labelValueDefinitionSchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("com.atproto.label.defs#labelValueDefinition")), + /** + * Does the user need to have adult content enabled in order to configure this label? + */ + "adultOnly": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), + /** + * What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. + */ + "blurs": /*#__PURE__*/ v.string<"content" | "media" | "none" | (string & {})>(), + /** + * The default setting for this label. + * @default "warn" + */ + "defaultSetting": /*#__PURE__*/ v.optional( + /*#__PURE__*/ v.string<"hide" | "ignore" | "warn" | (string & {})>(), + "warn" + ), + /** + * The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). + * @maxLength 100 + * @maxGraphemes 100 + */ + "identifier": /*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [ + /*#__PURE__*/ v.stringLength(0, 100), + /*#__PURE__*/ v.stringGraphemes(0, 100) + ] + ), + get "locales"() { + return /*#__PURE__*/ v.array(labelValueDefinitionStringsSchema) + }, + /** + * How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. + */ + "severity": /*#__PURE__*/ v.string<"alert" | "inform" | "none" | (string & {})>(), + } +); +const _labelValueDefinitionStringsSchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("com.atproto.label.defs#labelValueDefinitionStrings")), + /** + * A longer description of what the label means and why it might be applied. + * @maxLength 100000 + * @maxGraphemes 10000 + */ + "description": /*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [ + /*#__PURE__*/ v.stringLength(0, 100000), + /*#__PURE__*/ v.stringGraphemes(0, 10000) + ] + ), + /** + * The code of the language these strings are written in. + */ + "lang": /*#__PURE__*/ v.languageCodeString(), + /** + * A short human-readable name for the label. + * @maxLength 640 + * @maxGraphemes 64 + */ + "name": /*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [ + /*#__PURE__*/ v.stringLength(0, 640), + /*#__PURE__*/ v.stringGraphemes(0, 64) + ] + ), + } +); +const _selfLabelSchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("com.atproto.label.defs#selfLabel")), + /** + * The short string name of the value or type of this label. + * @maxLength 128 + */ + "val": /*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.string(), + [/*#__PURE__*/ v.stringLength(0, 128)] + ), + } +); +const _selfLabelsSchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("com.atproto.label.defs#selfLabels")), + /** + * @maxLength 10 + */ + get "values"() { + return /*#__PURE__*/ v.constrain( + /*#__PURE__*/ v.array(selfLabelSchema), + [/*#__PURE__*/ v.arrayLength(0, 10)] + ) + }, + } +); +type label$schematype = typeof _labelSchema; +type labelValue$schematype = typeof _labelValueSchema; +type labelValueDefinition$schematype = typeof _labelValueDefinitionSchema; +type labelValueDefinitionStrings$schematype = typeof _labelValueDefinitionStringsSchema; +type selfLabel$schematype = typeof _selfLabelSchema; +type selfLabels$schematype = typeof _selfLabelsSchema; + +export interface labelSchema extends label$schematype {} + +export interface labelValueSchema extends labelValue$schematype {} + +export interface labelValueDefinitionSchema extends labelValueDefinition$schematype {} + +export interface labelValueDefinitionStringsSchema extends labelValueDefinitionStrings$schematype {} + +export interface selfLabelSchema extends selfLabel$schematype {} + +export interface selfLabelsSchema extends selfLabels$schematype {} +export const labelSchema = _labelSchema as labelSchema; +export const labelValueSchema = _labelValueSchema as labelValueSchema; +export const labelValueDefinitionSchema = _labelValueDefinitionSchema as labelValueDefinitionSchema; +export const labelValueDefinitionStringsSchema = _labelValueDefinitionStringsSchema as labelValueDefinitionStringsSchema; +export const selfLabelSchema = _selfLabelSchema as selfLabelSchema; +export const selfLabelsSchema = _selfLabelsSchema as selfLabelsSchema; + +export interface Label extends v.InferInput {} +export type LabelValue = v.InferInput; + +export interface LabelValueDefinition extends v.InferInput {} + +export interface LabelValueDefinitionStrings extends v.InferInput {} + +export interface SelfLabel extends v.InferInput {} + +export interface SelfLabels extends v.InferInput {} diff --git a/src/lib/contrail/types/types/com/atproto/repo/strongRef.ts b/src/lib/contrail/types/types/com/atproto/repo/strongRef.ts new file mode 100644 index 0000000..020515e --- /dev/null +++ b/src/lib/contrail/types/types/com/atproto/repo/strongRef.ts @@ -0,0 +1,14 @@ +import type {} from '@atcute/lexicons'; +import * as v from '@atcute/lexicons/validations'; + +const _mainSchema = /*#__PURE__*/ v.object({ + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("com.atproto.repo.strongRef")), + "cid": /*#__PURE__*/ v.cidString(), + "uri": /*#__PURE__*/ v.resourceUriString(), +}); +type main$schematype = typeof _mainSchema; + +export interface mainSchema extends main$schematype {} +export const mainSchema = _mainSchema as mainSchema; + +export interface Main extends v.InferInput {} diff --git a/src/lib/contrail/types/types/watch/atmo/comment/getRecord.ts b/src/lib/contrail/types/types/watch/atmo/comment/getRecord.ts index e623b3c..a1b909f 100644 --- a/src/lib/contrail/types/types/watch/atmo/comment/getRecord.ts +++ b/src/lib/contrail/types/types/watch/atmo/comment/getRecord.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedComment from "../../../social/popfeed/feed/comment.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -39,16 +40,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.comment.getRecord#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.comment.getRecord#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); type main$schematype = typeof _mainSchema; type profileEntry$schematype = typeof _profileEntrySchema; diff --git a/src/lib/contrail/types/types/watch/atmo/comment/listRecords.ts b/src/lib/contrail/types/types/watch/atmo/comment/listRecords.ts index 0fce879..5f40d07 100644 --- a/src/lib/contrail/types/types/watch/atmo/comment/listRecords.ts +++ b/src/lib/contrail/types/types/watch/atmo/comment/listRecords.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedComment from "../../../social/popfeed/feed/comment.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -47,16 +48,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.comment.listRecords#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.comment.listRecords#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); const _recordSchema = /*#__PURE__*/ v.object( { "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.comment.listRecords#record")), diff --git a/src/lib/contrail/types/types/watch/atmo/getProfile.ts b/src/lib/contrail/types/types/watch/atmo/getProfile.ts index 7d93fb1..34c071c 100644 --- a/src/lib/contrail/types/types/watch/atmo/getProfile.ts +++ b/src/lib/contrail/types/types/watch/atmo/getProfile.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../app/bsky/actor/profile.js"; const _mainSchema = /*#__PURE__*/ v.query( "watch.atmo.getProfile", @@ -20,16 +21,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.getProfile#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.getProfile#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); type main$schematype = typeof _mainSchema; type profileEntry$schematype = typeof _profileEntrySchema; diff --git a/src/lib/contrail/types/types/watch/atmo/like/getRecord.ts b/src/lib/contrail/types/types/watch/atmo/like/getRecord.ts index a73796d..de7d405 100644 --- a/src/lib/contrail/types/types/watch/atmo/like/getRecord.ts +++ b/src/lib/contrail/types/types/watch/atmo/like/getRecord.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedLike from "../../../social/popfeed/feed/like.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -39,16 +40,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.like.getRecord#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.like.getRecord#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); type main$schematype = typeof _mainSchema; type profileEntry$schematype = typeof _profileEntrySchema; diff --git a/src/lib/contrail/types/types/watch/atmo/like/listRecords.ts b/src/lib/contrail/types/types/watch/atmo/like/listRecords.ts index b4fc5fc..6879137 100644 --- a/src/lib/contrail/types/types/watch/atmo/like/listRecords.ts +++ b/src/lib/contrail/types/types/watch/atmo/like/listRecords.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedLike from "../../../social/popfeed/feed/like.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -47,16 +48,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.like.listRecords#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.like.listRecords#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); const _recordSchema = /*#__PURE__*/ v.object( { "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.like.listRecords#record")), diff --git a/src/lib/contrail/types/types/watch/atmo/list/getRecord.ts b/src/lib/contrail/types/types/watch/atmo/list/getRecord.ts index efbe30b..77073a1 100644 --- a/src/lib/contrail/types/types/watch/atmo/list/getRecord.ts +++ b/src/lib/contrail/types/types/watch/atmo/list/getRecord.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedList from "../../../social/popfeed/feed/list.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -39,16 +40,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.list.getRecord#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.list.getRecord#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); type main$schematype = typeof _mainSchema; type profileEntry$schematype = typeof _profileEntrySchema; diff --git a/src/lib/contrail/types/types/watch/atmo/list/listRecords.ts b/src/lib/contrail/types/types/watch/atmo/list/listRecords.ts index 537a1eb..856c311 100644 --- a/src/lib/contrail/types/types/watch/atmo/list/listRecords.ts +++ b/src/lib/contrail/types/types/watch/atmo/list/listRecords.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedList from "../../../social/popfeed/feed/list.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -47,16 +48,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.list.listRecords#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.list.listRecords#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); const _recordSchema = /*#__PURE__*/ v.object( { "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.list.listRecords#record")), diff --git a/src/lib/contrail/types/types/watch/atmo/listItem/getRecord.ts b/src/lib/contrail/types/types/watch/atmo/listItem/getRecord.ts index 3ac28a9..5345d8d 100644 --- a/src/lib/contrail/types/types/watch/atmo/listItem/getRecord.ts +++ b/src/lib/contrail/types/types/watch/atmo/listItem/getRecord.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedListItem from "../../../social/popfeed/feed/listItem.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -39,16 +40,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.listItem.getRecord#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.listItem.getRecord#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); type main$schematype = typeof _mainSchema; type profileEntry$schematype = typeof _profileEntrySchema; diff --git a/src/lib/contrail/types/types/watch/atmo/listItem/listRecords.ts b/src/lib/contrail/types/types/watch/atmo/listItem/listRecords.ts index ff8d1d1..42bfae5 100644 --- a/src/lib/contrail/types/types/watch/atmo/listItem/listRecords.ts +++ b/src/lib/contrail/types/types/watch/atmo/listItem/listRecords.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedListItem from "../../../social/popfeed/feed/listItem.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -47,16 +48,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.listItem.listRecords#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.listItem.listRecords#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); const _recordSchema = /*#__PURE__*/ v.object( { "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.listItem.listRecords#record")), diff --git a/src/lib/contrail/types/types/watch/atmo/review/getRecord.ts b/src/lib/contrail/types/types/watch/atmo/review/getRecord.ts index 0aa4d3b..06c29eb 100644 --- a/src/lib/contrail/types/types/watch/atmo/review/getRecord.ts +++ b/src/lib/contrail/types/types/watch/atmo/review/getRecord.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedReview from "../../../social/popfeed/feed/review.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -39,16 +40,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.review.getRecord#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.review.getRecord#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); type main$schematype = typeof _mainSchema; type profileEntry$schematype = typeof _profileEntrySchema; diff --git a/src/lib/contrail/types/types/watch/atmo/review/listRecords.ts b/src/lib/contrail/types/types/watch/atmo/review/listRecords.ts index fe44e51..e539642 100644 --- a/src/lib/contrail/types/types/watch/atmo/review/listRecords.ts +++ b/src/lib/contrail/types/types/watch/atmo/review/listRecords.ts @@ -1,6 +1,7 @@ import type {} from '@atcute/lexicons'; import * as v from '@atcute/lexicons/validations'; import type {} from '@atcute/lexicons/ambient'; +import * as AppBskyActorProfile from "../../../app/bsky/actor/profile.js"; import * as SocialPopfeedFeedReview from "../../../social/popfeed/feed/review.js"; const _mainSchema = /*#__PURE__*/ v.query( @@ -47,16 +48,20 @@ const _mainSchema = /*#__PURE__*/ v.query( } } ); -const _profileEntrySchema = /*#__PURE__*/ v.object({ - "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.review.listRecords#profileEntry")), - "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), - "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), - "did": /*#__PURE__*/ v.didString(), - "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), - "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), - "value": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), -}); +const _profileEntrySchema = /*#__PURE__*/ v.object( + { + "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.review.listRecords#profileEntry")), + "cid": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), + "collection": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nsidString()), + "did": /*#__PURE__*/ v.didString(), + "handle": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "rkey": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), + "uri": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), + get "value"() { + return /*#__PURE__*/ v.optional(AppBskyActorProfile.mainSchema) + }, + } +); const _recordSchema = /*#__PURE__*/ v.object( { "$type": /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal("watch.atmo.review.listRecords#record")), diff --git a/src/routes/(app)/+layout.server.ts b/src/routes/(app)/+layout.server.ts new file mode 100644 index 0000000..e484482 --- /dev/null +++ b/src/routes/(app)/+layout.server.ts @@ -0,0 +1,5 @@ +import type { LayoutServerLoad } from './$types'; + +export const load: LayoutServerLoad = ({ locals }) => ({ + did: locals.did +}); diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index cc59869..2845d60 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -5,7 +5,7 @@ import Footer from './_components/Footer.svelte'; import ReviewDialog from './_components/ReviewDialog.svelte'; - let { children } = $props(); + let { data, children } = $props(); onMount(() => reviewLibrary.load()); @@ -17,5 +17,5 @@