forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addReservedHandle lexicon (bluesky-social#3056)
* addReservedHandle lexicon * addReservedHandle codegen * changeset * Add empty object output * Empty object output codegen
- Loading branch information
1 parent
21fd024
commit 2e7aa21
Showing
14 changed files
with
382 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@atproto/api": patch | ||
--- | ||
|
||
Add com.atproto.temp.addReservedHandle lexicon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": {} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/api/src/client/types/com/atproto/temp/addReservedHandle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/bsky/src/lexicon/types/com/atproto/temp/addReservedHandle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<HA extends HandlerAuth = never> = { | ||
auth: HA | ||
params: QueryParams | ||
input: HandlerInput | ||
req: express.Request | ||
res: express.Response | ||
} | ||
export type Handler<HA extends HandlerAuth = never> = ( | ||
ctx: HandlerReqCtx<HA>, | ||
) => Promise<HandlerOutput> | HandlerOutput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/ozone/src/lexicon/types/com/atproto/temp/addReservedHandle.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<HA extends HandlerAuth = never> = { | ||
auth: HA | ||
params: QueryParams | ||
input: HandlerInput | ||
req: express.Request | ||
res: express.Response | ||
} | ||
export type Handler<HA extends HandlerAuth = never> = ( | ||
ctx: HandlerReqCtx<HA>, | ||
) => Promise<HandlerOutput> | HandlerOutput |
Oops, something went wrong.