From 69c73a5bf9b441bceb9bee96dfb40cd196c9463f Mon Sep 17 00:00:00 2001 From: rafael Date: Sun, 1 Dec 2024 15:11:44 -0300 Subject: [PATCH] codegen --- packages/api/src/client/index.ts | 24 ++++++++++ packages/api/src/client/lexicons.ts | 32 +++++++++++++- .../subscription/getSubscriptionFeatures.ts | 33 ++++++++++++++ packages/bsky/src/lexicon/index.ts | 22 ++++++++++ packages/bsky/src/lexicon/lexicons.ts | 32 +++++++++++++- .../subscription/getSubscriptionFeatures.ts | 44 +++++++++++++++++++ packages/ozone/src/lexicon/index.ts | 22 ++++++++++ packages/ozone/src/lexicon/lexicons.ts | 32 +++++++++++++- .../subscription/getSubscriptionFeatures.ts | 44 +++++++++++++++++++ packages/pds/src/lexicon/index.ts | 22 ++++++++++ packages/pds/src/lexicon/lexicons.ts | 32 +++++++++++++- .../subscription/getSubscriptionFeatures.ts | 44 +++++++++++++++++++ 12 files changed, 375 insertions(+), 8 deletions(-) create mode 100644 packages/api/src/client/types/app/bsky/subscription/getSubscriptionFeatures.ts create mode 100644 packages/bsky/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts create mode 100644 packages/ozone/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts create mode 100644 packages/pds/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts diff --git a/packages/api/src/client/index.ts b/packages/api/src/client/index.ts index 9ee329fe593..50a7fe750ef 100644 --- a/packages/api/src/client/index.ts +++ b/packages/api/src/client/index.ts @@ -162,6 +162,7 @@ import * as AppBskyNotificationPutPreferences from './types/app/bsky/notificatio import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush' import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen' import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet' +import * as AppBskySubscriptionGetSubscriptionFeatures from './types/app/bsky/subscription/getSubscriptionFeatures' import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs' import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig' import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators' @@ -389,6 +390,7 @@ export * as AppBskyNotificationPutPreferences from './types/app/bsky/notificatio export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush' export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen' export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet' +export * as AppBskySubscriptionGetSubscriptionFeatures from './types/app/bsky/subscription/getSubscriptionFeatures' export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs' export * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig' export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators' @@ -1487,6 +1489,7 @@ export class AppBskyNS { labeler: AppBskyLabelerNS notification: AppBskyNotificationNS richtext: AppBskyRichtextNS + subscription: AppBskySubscriptionNS unspecced: AppBskyUnspeccedNS video: AppBskyVideoNS @@ -1499,6 +1502,7 @@ export class AppBskyNS { this.labeler = new AppBskyLabelerNS(client) this.notification = new AppBskyNotificationNS(client) this.richtext = new AppBskyRichtextNS(client) + this.subscription = new AppBskySubscriptionNS(client) this.unspecced = new AppBskyUnspeccedNS(client) this.video = new AppBskyVideoNS(client) } @@ -3034,6 +3038,26 @@ export class AppBskyRichtextNS { } } +export class AppBskySubscriptionNS { + _client: XrpcClient + + constructor(client: XrpcClient) { + this._client = client + } + + getSubscriptionFeatures( + params?: AppBskySubscriptionGetSubscriptionFeatures.QueryParams, + opts?: AppBskySubscriptionGetSubscriptionFeatures.CallOptions, + ): Promise { + return this._client.call( + 'app.bsky.subscription.getSubscriptionFeatures', + params, + undefined, + opts, + ) + } +} + export class AppBskyUnspeccedNS { _client: XrpcClient diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index 2d99e7afe0e..920293285dc 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -9214,6 +9214,31 @@ export const schemaDict = { }, }, }, + AppBskySubscriptionGetSubscriptionFeatures: { + lexicon: 1, + id: 'app.bsky.subscription.getSubscriptionFeatures', + defs: { + main: { + type: 'query', + description: + 'Enumerate feature flags related to subscriptions for the requesting account. Requires auth.', + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['customProfileColor'], + properties: { + customProfileColor: { + type: 'boolean', + description: + 'Indicates to client apps to allow the requesting account to customize the profile color.', + }, + }, + }, + }, + }, + }, + }, AppBskyUnspeccedDefs: { lexicon: 1, id: 'app.bsky.unspecced.defs', @@ -13489,8 +13514,9 @@ export const schemaDict = { }, }, }, -} -export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[] +} as const satisfies Record + +export const schemas = Object.values(schemaDict) export const lexicons: Lexicons = new Lexicons(schemas) export const ids = { ComAtprotoAdminDefs: 'com.atproto.admin.defs', @@ -13663,6 +13689,8 @@ export const ids = { AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush', AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen', AppBskyRichtextFacet: 'app.bsky.richtext.facet', + AppBskySubscriptionGetSubscriptionFeatures: + 'app.bsky.subscription.getSubscriptionFeatures', AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs', AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig', AppBskyUnspeccedGetPopularFeedGenerators: diff --git a/packages/api/src/client/types/app/bsky/subscription/getSubscriptionFeatures.ts b/packages/api/src/client/types/app/bsky/subscription/getSubscriptionFeatures.ts new file mode 100644 index 00000000000..e09634c7a41 --- /dev/null +++ b/packages/api/src/client/types/app/bsky/subscription/getSubscriptionFeatures.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { HeadersMap, XRPCError } from '@atproto/xrpc' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { isObj, hasProp } from '../../../../util' +import { lexicons } from '../../../../lexicons' +import { CID } from 'multiformats/cid' + +export interface QueryParams {} + +export type InputSchema = undefined + +export interface OutputSchema { + /** Indicates to client apps to allow the requesting account to customize the profile color. */ + customProfileColor: boolean + [k: string]: unknown +} + +export interface CallOptions { + signal?: AbortSignal + headers?: HeadersMap +} + +export interface Response { + success: boolean + headers: HeadersMap + data: OutputSchema +} + +export function toKnownErr(e: any) { + return e +} diff --git a/packages/bsky/src/lexicon/index.ts b/packages/bsky/src/lexicon/index.ts index 7a8a13149ed..dfa32de5b77 100644 --- a/packages/bsky/src/lexicon/index.ts +++ b/packages/bsky/src/lexicon/index.ts @@ -136,6 +136,7 @@ import * as AppBskyNotificationListNotifications from './types/app/bsky/notifica import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences' import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush' import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen' +import * as AppBskySubscriptionGetSubscriptionFeatures from './types/app/bsky/subscription/getSubscriptionFeatures' import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig' import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators' import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton' @@ -1157,6 +1158,7 @@ export class AppBskyNS { labeler: AppBskyLabelerNS notification: AppBskyNotificationNS richtext: AppBskyRichtextNS + subscription: AppBskySubscriptionNS unspecced: AppBskyUnspeccedNS video: AppBskyVideoNS @@ -1169,6 +1171,7 @@ export class AppBskyNS { this.labeler = new AppBskyLabelerNS(server) this.notification = new AppBskyNotificationNS(server) this.richtext = new AppBskyRichtextNS(server) + this.subscription = new AppBskySubscriptionNS(server) this.unspecced = new AppBskyUnspeccedNS(server) this.video = new AppBskyVideoNS(server) } @@ -1802,6 +1805,25 @@ export class AppBskyRichtextNS { } } +export class AppBskySubscriptionNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getSubscriptionFeatures( + cfg: ConfigOf< + AV, + AppBskySubscriptionGetSubscriptionFeatures.Handler>, + AppBskySubscriptionGetSubscriptionFeatures.HandlerReqCtx> + >, + ) { + const nsid = 'app.bsky.subscription.getSubscriptionFeatures' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + export class AppBskyUnspeccedNS { _server: Server diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index abfa42121c7..2e4e513b3a4 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -9214,6 +9214,31 @@ export const schemaDict = { }, }, }, + AppBskySubscriptionGetSubscriptionFeatures: { + lexicon: 1, + id: 'app.bsky.subscription.getSubscriptionFeatures', + defs: { + main: { + type: 'query', + description: + 'Enumerate feature flags related to subscriptions for the requesting account. Requires auth.', + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['customProfileColor'], + properties: { + customProfileColor: { + type: 'boolean', + description: + 'Indicates to client apps to allow the requesting account to customize the profile color.', + }, + }, + }, + }, + }, + }, + }, AppBskyUnspeccedDefs: { lexicon: 1, id: 'app.bsky.unspecced.defs', @@ -10728,8 +10753,9 @@ export const schemaDict = { }, }, }, -} -export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[] +} as const satisfies Record + +export const schemas = Object.values(schemaDict) export const lexicons: Lexicons = new Lexicons(schemas) export const ids = { ComAtprotoAdminDefs: 'com.atproto.admin.defs', @@ -10902,6 +10928,8 @@ export const ids = { AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush', AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen', AppBskyRichtextFacet: 'app.bsky.richtext.facet', + AppBskySubscriptionGetSubscriptionFeatures: + 'app.bsky.subscription.getSubscriptionFeatures', AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs', AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig', AppBskyUnspeccedGetPopularFeedGenerators: diff --git a/packages/bsky/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts b/packages/bsky/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts new file mode 100644 index 00000000000..54e51416915 --- /dev/null +++ b/packages/bsky/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts @@ -0,0 +1,44 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined + +export interface OutputSchema { + /** Indicates to client apps to allow the requesting account to customize the profile color. */ + customProfileColor: boolean + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/packages/ozone/src/lexicon/index.ts b/packages/ozone/src/lexicon/index.ts index b4c27f52018..122dac2d96d 100644 --- a/packages/ozone/src/lexicon/index.ts +++ b/packages/ozone/src/lexicon/index.ts @@ -136,6 +136,7 @@ import * as AppBskyNotificationListNotifications from './types/app/bsky/notifica import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences' import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush' import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen' +import * as AppBskySubscriptionGetSubscriptionFeatures from './types/app/bsky/subscription/getSubscriptionFeatures' import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig' import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators' import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton' @@ -1200,6 +1201,7 @@ export class AppBskyNS { labeler: AppBskyLabelerNS notification: AppBskyNotificationNS richtext: AppBskyRichtextNS + subscription: AppBskySubscriptionNS unspecced: AppBskyUnspeccedNS video: AppBskyVideoNS @@ -1212,6 +1214,7 @@ export class AppBskyNS { this.labeler = new AppBskyLabelerNS(server) this.notification = new AppBskyNotificationNS(server) this.richtext = new AppBskyRichtextNS(server) + this.subscription = new AppBskySubscriptionNS(server) this.unspecced = new AppBskyUnspeccedNS(server) this.video = new AppBskyVideoNS(server) } @@ -1845,6 +1848,25 @@ export class AppBskyRichtextNS { } } +export class AppBskySubscriptionNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getSubscriptionFeatures( + cfg: ConfigOf< + AV, + AppBskySubscriptionGetSubscriptionFeatures.Handler>, + AppBskySubscriptionGetSubscriptionFeatures.HandlerReqCtx> + >, + ) { + const nsid = 'app.bsky.subscription.getSubscriptionFeatures' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + export class AppBskyUnspeccedNS { _server: Server diff --git a/packages/ozone/src/lexicon/lexicons.ts b/packages/ozone/src/lexicon/lexicons.ts index 2d99e7afe0e..920293285dc 100644 --- a/packages/ozone/src/lexicon/lexicons.ts +++ b/packages/ozone/src/lexicon/lexicons.ts @@ -9214,6 +9214,31 @@ export const schemaDict = { }, }, }, + AppBskySubscriptionGetSubscriptionFeatures: { + lexicon: 1, + id: 'app.bsky.subscription.getSubscriptionFeatures', + defs: { + main: { + type: 'query', + description: + 'Enumerate feature flags related to subscriptions for the requesting account. Requires auth.', + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['customProfileColor'], + properties: { + customProfileColor: { + type: 'boolean', + description: + 'Indicates to client apps to allow the requesting account to customize the profile color.', + }, + }, + }, + }, + }, + }, + }, AppBskyUnspeccedDefs: { lexicon: 1, id: 'app.bsky.unspecced.defs', @@ -13489,8 +13514,9 @@ export const schemaDict = { }, }, }, -} -export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[] +} as const satisfies Record + +export const schemas = Object.values(schemaDict) export const lexicons: Lexicons = new Lexicons(schemas) export const ids = { ComAtprotoAdminDefs: 'com.atproto.admin.defs', @@ -13663,6 +13689,8 @@ export const ids = { AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush', AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen', AppBskyRichtextFacet: 'app.bsky.richtext.facet', + AppBskySubscriptionGetSubscriptionFeatures: + 'app.bsky.subscription.getSubscriptionFeatures', AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs', AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig', AppBskyUnspeccedGetPopularFeedGenerators: diff --git a/packages/ozone/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts b/packages/ozone/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts new file mode 100644 index 00000000000..54e51416915 --- /dev/null +++ b/packages/ozone/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts @@ -0,0 +1,44 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined + +export interface OutputSchema { + /** Indicates to client apps to allow the requesting account to customize the profile color. */ + customProfileColor: boolean + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput diff --git a/packages/pds/src/lexicon/index.ts b/packages/pds/src/lexicon/index.ts index b4c27f52018..122dac2d96d 100644 --- a/packages/pds/src/lexicon/index.ts +++ b/packages/pds/src/lexicon/index.ts @@ -136,6 +136,7 @@ import * as AppBskyNotificationListNotifications from './types/app/bsky/notifica import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences' import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush' import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen' +import * as AppBskySubscriptionGetSubscriptionFeatures from './types/app/bsky/subscription/getSubscriptionFeatures' import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig' import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators' import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton' @@ -1200,6 +1201,7 @@ export class AppBskyNS { labeler: AppBskyLabelerNS notification: AppBskyNotificationNS richtext: AppBskyRichtextNS + subscription: AppBskySubscriptionNS unspecced: AppBskyUnspeccedNS video: AppBskyVideoNS @@ -1212,6 +1214,7 @@ export class AppBskyNS { this.labeler = new AppBskyLabelerNS(server) this.notification = new AppBskyNotificationNS(server) this.richtext = new AppBskyRichtextNS(server) + this.subscription = new AppBskySubscriptionNS(server) this.unspecced = new AppBskyUnspeccedNS(server) this.video = new AppBskyVideoNS(server) } @@ -1845,6 +1848,25 @@ export class AppBskyRichtextNS { } } +export class AppBskySubscriptionNS { + _server: Server + + constructor(server: Server) { + this._server = server + } + + getSubscriptionFeatures( + cfg: ConfigOf< + AV, + AppBskySubscriptionGetSubscriptionFeatures.Handler>, + AppBskySubscriptionGetSubscriptionFeatures.HandlerReqCtx> + >, + ) { + const nsid = 'app.bsky.subscription.getSubscriptionFeatures' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } +} + export class AppBskyUnspeccedNS { _server: Server diff --git a/packages/pds/src/lexicon/lexicons.ts b/packages/pds/src/lexicon/lexicons.ts index 2d99e7afe0e..920293285dc 100644 --- a/packages/pds/src/lexicon/lexicons.ts +++ b/packages/pds/src/lexicon/lexicons.ts @@ -9214,6 +9214,31 @@ export const schemaDict = { }, }, }, + AppBskySubscriptionGetSubscriptionFeatures: { + lexicon: 1, + id: 'app.bsky.subscription.getSubscriptionFeatures', + defs: { + main: { + type: 'query', + description: + 'Enumerate feature flags related to subscriptions for the requesting account. Requires auth.', + output: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['customProfileColor'], + properties: { + customProfileColor: { + type: 'boolean', + description: + 'Indicates to client apps to allow the requesting account to customize the profile color.', + }, + }, + }, + }, + }, + }, + }, AppBskyUnspeccedDefs: { lexicon: 1, id: 'app.bsky.unspecced.defs', @@ -13489,8 +13514,9 @@ export const schemaDict = { }, }, }, -} -export const schemas: LexiconDoc[] = Object.values(schemaDict) as LexiconDoc[] +} as const satisfies Record + +export const schemas = Object.values(schemaDict) export const lexicons: Lexicons = new Lexicons(schemas) export const ids = { ComAtprotoAdminDefs: 'com.atproto.admin.defs', @@ -13663,6 +13689,8 @@ export const ids = { AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush', AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen', AppBskyRichtextFacet: 'app.bsky.richtext.facet', + AppBskySubscriptionGetSubscriptionFeatures: + 'app.bsky.subscription.getSubscriptionFeatures', AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs', AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig', AppBskyUnspeccedGetPopularFeedGenerators: diff --git a/packages/pds/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts b/packages/pds/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts new file mode 100644 index 00000000000..54e51416915 --- /dev/null +++ b/packages/pds/src/lexicon/types/app/bsky/subscription/getSubscriptionFeatures.ts @@ -0,0 +1,44 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import express from 'express' +import { ValidationResult, BlobRef } from '@atproto/lexicon' +import { lexicons } from '../../../../lexicons' +import { isObj, hasProp } from '../../../../util' +import { CID } from 'multiformats/cid' +import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server' + +export interface QueryParams {} + +export type InputSchema = undefined + +export interface OutputSchema { + /** Indicates to client apps to allow the requesting account to customize the profile color. */ + customProfileColor: boolean + [k: string]: unknown +} + +export type HandlerInput = undefined + +export interface HandlerSuccess { + encoding: 'application/json' + body: OutputSchema + headers?: { [key: string]: string } +} + +export interface HandlerError { + status: number + message?: string +} + +export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough +export type HandlerReqCtx = { + auth: HA + params: QueryParams + input: HandlerInput + req: express.Request + res: express.Response +} +export type Handler = ( + ctx: HandlerReqCtx, +) => Promise | HandlerOutput