···24 /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */
25 fullsize: string
26 /** Alt text description of the image, for accessibility. */
27- alt: string
28- aspectRatio?: SocialGrainDefs.AspectRatio
29 exif?: ExifView
30 gallery?: GalleryState
31}
···4243export interface ExifView {
44 $type?: 'social.grain.photo.defs#exifView'
45- uri?: string
46- cid?: string
47 photo: string
048 createdAt: string
49 dateTimeOriginal?: string
50 exposureTime?: string
···24 /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */
25 fullsize: string
26 /** Alt text description of the image, for accessibility. */
27+ alt?: string
28+ aspectRatio: SocialGrainDefs.AspectRatio
29 exif?: ExifView
30 gallery?: GalleryState
31}
···4243export interface ExifView {
44 $type?: 'social.grain.photo.defs#exifView'
45+ uri: string
46+ cid: string
47 photo: string
48+ record: { [_ in string]: unknown }
49 createdAt: string
50 dateTimeOriginal?: string
51 exposureTime?: string
···1+/**
2+ * GENERATED CODE - DO NOT MODIFY
3+ */
4+import stream from "node:stream";
5+import { HandlerAuth, HandlerPipeThrough } from "npm:@atproto/xrpc-server";
6+import express from "npm:express";
7+import { validate as _validate } from "../../../../lexicons.ts";
8+import { is$typed as _is$typed } from "../../../../util.ts";
9+10+const is$typed = _is$typed,
11+ validate = _validate;
12+const id = "social.grain.photo.uploadPhoto";
13+14+export interface QueryParams {}
15+16+export type InputSchema = string | Uint8Array | Blob;
17+18+export interface OutputSchema {
19+ /** AT URI of the created photo */
20+ photoUri?: string;
21+}
22+23+export interface HandlerInput {
24+ encoding: "*/*";
25+ body: stream.Readable;
26+}
27+28+export interface HandlerSuccess {
29+ encoding: "application/json";
30+ body: OutputSchema;
31+ headers?: { [key: string]: string };
32+}
33+34+export interface HandlerError {
35+ status: number;
36+ message?: string;
37+}
38+39+export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
40+export type HandlerReqCtx<HA extends HandlerAuth = never> = {
41+ auth: HA;
42+ params: QueryParams;
43+ input: HandlerInput;
44+ req: express.Request;
45+ res: express.Response;
46+ resetRouteRateLimits: () => Promise<void>;
47+};
48+export type Handler<HA extends HandlerAuth = never> = (
49+ ctx: HandlerReqCtx<HA>,
50+) => Promise<HandlerOutput> | HandlerOutput;
+1-1
notifications/deno.json
···7 "start": "deno run -A ./main.ts",
8 "dev": "deno run \"dev:*\"",
9 "dev:server": "deno run -A --env-file --watch ./main.ts",
10- "codegen": "deno run -A jsr:@bigmoves/bff-cli@0.3.0-beta.42 lexgen"
11 },
12 "nodeModulesDir": "auto"
13}
···7 "start": "deno run -A ./main.ts",
8 "dev": "deno run \"dev:*\"",
9 "dev:server": "deno run -A --env-file --watch ./main.ts",
10+ "codegen": "deno run -A jsr:@bigmoves/bff-cli@0.3.0-beta.57 lexgen --lexicon-dir=../lexicons"
11 },
12 "nodeModulesDir": "auto"
13}
···1-{
2- "lexicon": 1,
3- "id": "app.bsky.feed.postgate",
4- "defs": {
5- "main": {
6- "key": "tid",
7- "type": "record",
8- "record": {
9- "type": "object",
10- "required": [
11- "post",
12- "createdAt"
13- ],
14- "properties": {
15- "post": {
16- "type": "string",
17- "format": "at-uri",
18- "description": "Reference (AT-URI) to the post record."
19- },
20- "createdAt": {
21- "type": "string",
22- "format": "datetime"
23- },
24- "embeddingRules": {
25- "type": "array",
26- "items": {
27- "refs": [
28- "#disableRule"
29- ],
30- "type": "union"
31- },
32- "maxLength": 5,
33- "description": "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed."
34- },
35- "detachedEmbeddingUris": {
36- "type": "array",
37- "items": {
38- "type": "string",
39- "format": "at-uri"
40- },
41- "maxLength": 50,
42- "description": "List of AT-URIs embedding this post that the author has detached from."
43- }
44- }
45- },
46- "description": "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository."
47- },
48- "disableRule": {
49- "type": "object",
50- "properties": {},
51- "description": "Disables embedding of this post."
52- }
53- }
54-}
···1-{
2- "lexicon": 1,
3- "id": "com.atproto.label.defs",
4- "defs": {
5- "label": {
6- "type": "object",
7- "required": [
8- "src",
9- "uri",
10- "val",
11- "cts"
12- ],
13- "properties": {
14- "cid": {
15- "type": "string",
16- "format": "cid",
17- "description": "Optionally, CID specifying the specific version of 'uri' resource this label applies to."
18- },
19- "cts": {
20- "type": "string",
21- "format": "datetime",
22- "description": "Timestamp when this label was created."
23- },
24- "exp": {
25- "type": "string",
26- "format": "datetime",
27- "description": "Timestamp at which this label expires (no longer applies)."
28- },
29- "neg": {
30- "type": "boolean",
31- "description": "If true, this is a negation label, overwriting a previous label."
32- },
33- "sig": {
34- "type": "bytes",
35- "description": "Signature of dag-cbor encoded label."
36- },
37- "src": {
38- "type": "string",
39- "format": "did",
40- "description": "DID of the actor who created this label."
41- },
42- "uri": {
43- "type": "string",
44- "format": "uri",
45- "description": "AT URI of the record, repository (account), or other resource that this label applies to."
46- },
47- "val": {
48- "type": "string",
49- "maxLength": 128,
50- "description": "The short string name of the value or type of this label."
51- },
52- "ver": {
53- "type": "integer",
54- "description": "The AT Protocol version of the label object."
55- }
56- },
57- "description": "Metadata tag on an atproto resource (eg, repo or record)."
58- },
59- "selfLabel": {
60- "type": "object",
61- "required": [
62- "val"
63- ],
64- "properties": {
65- "val": {
66- "type": "string",
67- "maxLength": 128,
68- "description": "The short string name of the value or type of this label."
69- }
70- },
71- "description": "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel."
72- },
73- "labelValue": {
74- "type": "string",
75- "knownValues": [
76- "!hide",
77- "!no-promote",
78- "!warn",
79- "!no-unauthenticated",
80- "dmca-violation",
81- "doxxing",
82- "porn",
83- "sexual",
84- "nudity",
85- "nsfl",
86- "gore"
87- ]
88- },
89- "selfLabels": {
90- "type": "object",
91- "required": [
92- "values"
93- ],
94- "properties": {
95- "values": {
96- "type": "array",
97- "items": {
98- "ref": "#selfLabel",
99- "type": "ref"
100- },
101- "maxLength": 10
102- }
103- },
104- "description": "Metadata tags on an atproto record, published by the author within the record."
105- },
106- "labelValueDefinition": {
107- "type": "object",
108- "required": [
109- "identifier",
110- "severity",
111- "blurs",
112- "locales"
113- ],
114- "properties": {
115- "blurs": {
116- "type": "string",
117- "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.",
118- "knownValues": [
119- "content",
120- "media",
121- "none"
122- ]
123- },
124- "locales": {
125- "type": "array",
126- "items": {
127- "ref": "#labelValueDefinitionStrings",
128- "type": "ref"
129- }
130- },
131- "severity": {
132- "type": "string",
133- "description": "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",
134- "knownValues": [
135- "inform",
136- "alert",
137- "none"
138- ]
139- },
140- "adultOnly": {
141- "type": "boolean",
142- "description": "Does the user need to have adult content enabled in order to configure this label?"
143- },
144- "identifier": {
145- "type": "string",
146- "maxLength": 100,
147- "description": "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",
148- "maxGraphemes": 100
149- },
150- "defaultSetting": {
151- "type": "string",
152- "default": "warn",
153- "description": "The default setting for this label.",
154- "knownValues": [
155- "ignore",
156- "warn",
157- "hide"
158- ]
159- }
160- },
161- "description": "Declares a label value and its expected interpretations and behaviors."
162- },
163- "labelValueDefinitionStrings": {
164- "type": "object",
165- "required": [
166- "lang",
167- "name",
168- "description"
169- ],
170- "properties": {
171- "lang": {
172- "type": "string",
173- "format": "language",
174- "description": "The code of the language these strings are written in."
175- },
176- "name": {
177- "type": "string",
178- "maxLength": 640,
179- "description": "A short human-readable name for the label.",
180- "maxGraphemes": 64
181- },
182- "description": {
183- "type": "string",
184- "maxLength": 100000,
185- "description": "A longer description of what the label means and why it might be applied.",
186- "maxGraphemes": 10000
187- }
188- },
189- "description": "Strings which describe the label in the UI, localized into a specific language."
190- }
191- }
192-}
···1-{
2- "lexicon": 1,
3- "id": "social.grain.labeler.service",
4- "defs": {
5- "main": {
6- "type": "record",
7- "description": "A declaration of the existence of labeler service.",
8- "key": "literal:self",
9- "record": {
10- "type": "object",
11- "required": ["policies", "createdAt"],
12- "properties": {
13- "policies": {
14- "type": "ref",
15- "ref": "app.bsky.labeler.defs#labelerPolicies"
16- },
17- "labels": {
18- "type": "union",
19- "refs": ["com.atproto.label.defs#selfLabels"]
20- },
21- "createdAt": { "type": "string", "format": "datetime" },
22- "reasonTypes": {
23- "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",
24- "type": "array",
25- "items": {
26- "type": "ref",
27- "ref": "com.atproto.moderation.defs#reasonType"
28- }
29- },
30- "subjectTypes": {
31- "description": "The set of subject types (account, record, etc) this service accepts reports on.",
32- "type": "array",
33- "items": {
34- "type": "ref",
35- "ref": "com.atproto.moderation.defs#subjectType"
36- }
37- },
38- "subjectCollections": {
39- "type": "array",
40- "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",
41- "items": { "type": "string", "format": "nsid" }
42- }
43- }
44- }
45- }
46- }
47-}