diff --git a/.changeset/late-eels-jam.md b/.changeset/late-eels-jam.md new file mode 100644 index 00000000000..65cab507ef2 --- /dev/null +++ b/.changeset/late-eels-jam.md @@ -0,0 +1,5 @@ +--- +"@atproto/api": patch +--- + +Add com.atproto.temp.addReservedHandle lexicon diff --git a/lexicons/com/atproto/temp/addReservedHandle.json b/lexicons/com/atproto/temp/addReservedHandle.json new file mode 100644 index 00000000000..a8b1aac9b0a --- /dev/null +++ b/lexicons/com/atproto/temp/addReservedHandle.json @@ -0,0 +1,27 @@ +{ + "lexicon": 1, + "id": "com.atproto.temp.addReservedHandle", + "defs": { + "main": { + "type": "procedure", + "description": "Add a handle to the set of reserved handles.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["handle"], + "properties": { + "handle": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + } + } + } +} diff --git a/packages/api/src/client/index.ts b/packages/api/src/client/index.ts index e9b1b3e059a..9ee329fe593 100644 --- a/packages/api/src/client/index.ts +++ b/packages/api/src/client/index.ts @@ -81,6 +81,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos' +import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle' import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue' import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels' import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification' @@ -307,6 +308,7 @@ export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos' +export * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle' export * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue' export * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels' export * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification' @@ -1417,6 +1419,18 @@ export class ComAtprotoTempNS { this._client = client } + addReservedHandle( + data?: ComAtprotoTempAddReservedHandle.InputSchema, + opts?: ComAtprotoTempAddReservedHandle.CallOptions, + ): Promise { + return this._client.call( + 'com.atproto.temp.addReservedHandle', + opts?.qp, + data, + opts, + ) + } + checkSignupQueue( params?: ComAtprotoTempCheckSignupQueue.QueryParams, opts?: ComAtprotoTempCheckSignupQueue.CallOptions, diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index af6d524641c..dbb06b20bd6 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -3959,6 +3959,35 @@ export const schemaDict = { }, }, }, + ComAtprotoTempAddReservedHandle: { + lexicon: 1, + id: 'com.atproto.temp.addReservedHandle', + defs: { + main: { + type: 'procedure', + description: 'Add a handle to the set of reserved handles.', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['handle'], + properties: { + handle: { + type: 'string', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: {}, + }, + }, + }, + }, + }, ComAtprotoTempCheckSignupQueue: { lexicon: 1, id: 'com.atproto.temp.checkSignupQueue', @@ -13545,6 +13574,7 @@ export const ids = { ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate', ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl', ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos', + ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle', ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue', ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels', ComAtprotoTempRequestPhoneVerification: diff --git a/packages/api/src/client/types/com/atproto/temp/addReservedHandle.ts b/packages/api/src/client/types/com/atproto/temp/addReservedHandle.ts new file mode 100644 index 00000000000..e86337519ee --- /dev/null +++ b/packages/api/src/client/types/com/atproto/temp/addReservedHandle.ts @@ -0,0 +1,36 @@ +/** + * 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 interface InputSchema { + handle: string + [k: string]: unknown +} + +export interface OutputSchema { + [k: string]: unknown +} + +export interface CallOptions { + signal?: AbortSignal + headers?: HeadersMap + qp?: QueryParams + encoding?: 'application/json' +} + +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 0eb29893730..7a8a13149ed 100644 --- a/packages/bsky/src/lexicon/index.ts +++ b/packages/bsky/src/lexicon/index.ts @@ -80,6 +80,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos' +import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle' import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue' import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels' import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification' @@ -1092,6 +1093,17 @@ export class ComAtprotoTempNS { this._server = server } + addReservedHandle( + cfg: ConfigOf< + AV, + ComAtprotoTempAddReservedHandle.Handler>, + ComAtprotoTempAddReservedHandle.HandlerReqCtx> + >, + ) { + const nsid = 'com.atproto.temp.addReservedHandle' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + checkSignupQueue( cfg: ConfigOf< AV, diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index d564ae8824a..8897212dcb8 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -3959,6 +3959,35 @@ export const schemaDict = { }, }, }, + ComAtprotoTempAddReservedHandle: { + lexicon: 1, + id: 'com.atproto.temp.addReservedHandle', + defs: { + main: { + type: 'procedure', + description: 'Add a handle to the set of reserved handles.', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['handle'], + properties: { + handle: { + type: 'string', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: {}, + }, + }, + }, + }, + }, ComAtprotoTempCheckSignupQueue: { lexicon: 1, id: 'com.atproto.temp.checkSignupQueue', @@ -10784,6 +10813,7 @@ export const ids = { ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate', ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl', ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos', + ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle', ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue', ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels', ComAtprotoTempRequestPhoneVerification: diff --git a/packages/bsky/src/lexicon/types/com/atproto/temp/addReservedHandle.ts b/packages/bsky/src/lexicon/types/com/atproto/temp/addReservedHandle.ts new file mode 100644 index 00000000000..b884cb08998 --- /dev/null +++ b/packages/bsky/src/lexicon/types/com/atproto/temp/addReservedHandle.ts @@ -0,0 +1,48 @@ +/** + * 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 interface InputSchema { + handle: string + [k: string]: unknown +} + +export interface OutputSchema { + [k: string]: unknown +} + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +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 7bcf0756578..b4c27f52018 100644 --- a/packages/ozone/src/lexicon/index.ts +++ b/packages/ozone/src/lexicon/index.ts @@ -80,6 +80,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos' +import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle' import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue' import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels' import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification' @@ -1135,6 +1136,17 @@ export class ComAtprotoTempNS { this._server = server } + addReservedHandle( + cfg: ConfigOf< + AV, + ComAtprotoTempAddReservedHandle.Handler>, + ComAtprotoTempAddReservedHandle.HandlerReqCtx> + >, + ) { + const nsid = 'com.atproto.temp.addReservedHandle' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + checkSignupQueue( cfg: ConfigOf< AV, diff --git a/packages/ozone/src/lexicon/lexicons.ts b/packages/ozone/src/lexicon/lexicons.ts index af6d524641c..dbb06b20bd6 100644 --- a/packages/ozone/src/lexicon/lexicons.ts +++ b/packages/ozone/src/lexicon/lexicons.ts @@ -3959,6 +3959,35 @@ export const schemaDict = { }, }, }, + ComAtprotoTempAddReservedHandle: { + lexicon: 1, + id: 'com.atproto.temp.addReservedHandle', + defs: { + main: { + type: 'procedure', + description: 'Add a handle to the set of reserved handles.', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['handle'], + properties: { + handle: { + type: 'string', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: {}, + }, + }, + }, + }, + }, ComAtprotoTempCheckSignupQueue: { lexicon: 1, id: 'com.atproto.temp.checkSignupQueue', @@ -13545,6 +13574,7 @@ export const ids = { ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate', ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl', ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos', + ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle', ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue', ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels', ComAtprotoTempRequestPhoneVerification: diff --git a/packages/ozone/src/lexicon/types/com/atproto/temp/addReservedHandle.ts b/packages/ozone/src/lexicon/types/com/atproto/temp/addReservedHandle.ts new file mode 100644 index 00000000000..b884cb08998 --- /dev/null +++ b/packages/ozone/src/lexicon/types/com/atproto/temp/addReservedHandle.ts @@ -0,0 +1,48 @@ +/** + * 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 interface InputSchema { + handle: string + [k: string]: unknown +} + +export interface OutputSchema { + [k: string]: unknown +} + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +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 7bcf0756578..b4c27f52018 100644 --- a/packages/pds/src/lexicon/index.ts +++ b/packages/pds/src/lexicon/index.ts @@ -80,6 +80,7 @@ import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos' import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate' import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl' import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos' +import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle' import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue' import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels' import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification' @@ -1135,6 +1136,17 @@ export class ComAtprotoTempNS { this._server = server } + addReservedHandle( + cfg: ConfigOf< + AV, + ComAtprotoTempAddReservedHandle.Handler>, + ComAtprotoTempAddReservedHandle.HandlerReqCtx> + >, + ) { + const nsid = 'com.atproto.temp.addReservedHandle' // @ts-ignore + return this._server.xrpc.method(nsid, cfg) + } + checkSignupQueue( cfg: ConfigOf< AV, diff --git a/packages/pds/src/lexicon/lexicons.ts b/packages/pds/src/lexicon/lexicons.ts index af6d524641c..dbb06b20bd6 100644 --- a/packages/pds/src/lexicon/lexicons.ts +++ b/packages/pds/src/lexicon/lexicons.ts @@ -3959,6 +3959,35 @@ export const schemaDict = { }, }, }, + ComAtprotoTempAddReservedHandle: { + lexicon: 1, + id: 'com.atproto.temp.addReservedHandle', + defs: { + main: { + type: 'procedure', + description: 'Add a handle to the set of reserved handles.', + input: { + encoding: 'application/json', + schema: { + type: 'object', + required: ['handle'], + properties: { + handle: { + type: 'string', + }, + }, + }, + }, + output: { + encoding: 'application/json', + schema: { + type: 'object', + properties: {}, + }, + }, + }, + }, + }, ComAtprotoTempCheckSignupQueue: { lexicon: 1, id: 'com.atproto.temp.checkSignupQueue', @@ -13545,6 +13574,7 @@ export const ids = { ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate', ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl', ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos', + ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle', ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue', ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels', ComAtprotoTempRequestPhoneVerification: diff --git a/packages/pds/src/lexicon/types/com/atproto/temp/addReservedHandle.ts b/packages/pds/src/lexicon/types/com/atproto/temp/addReservedHandle.ts new file mode 100644 index 00000000000..b884cb08998 --- /dev/null +++ b/packages/pds/src/lexicon/types/com/atproto/temp/addReservedHandle.ts @@ -0,0 +1,48 @@ +/** + * 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 interface InputSchema { + handle: string + [k: string]: unknown +} + +export interface OutputSchema { + [k: string]: unknown +} + +export interface HandlerInput { + encoding: 'application/json' + body: InputSchema +} + +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