Skip to main content

Interface: XRPCMethodWithMeta<TParams, TInput, TOutput>

Defined in: src/api/xrpc/types.ts:167

Extended XRPC method with metadata for route registration.

Extends​

Type Parameters​

• TParams = unknown

Query/input parameters type

• TInput = unknown

Request body type (procedures only)

• TOutput = unknown

Response body type

Properties​

auth?​

optional auth: boolean | "optional"

Defined in: src/api/xrpc/types.ts:115

Authentication requirement.

Remarks​

  • true: Authentication required (401 if not authenticated)
  • false: No authentication required (public endpoint)
  • 'optional': Authentication optional (different behavior for authed users)

Default Value​

false

Inherited from​

XRPCMethod.auth


description?​

optional description: string

Defined in: src/api/xrpc/types.ts:177

Human-readable description


handler()​

handler: (ctx) => Promise<XRPCResponse<TOutput>>

Defined in: src/api/xrpc/types.ts:120

Handler function implementing the method logic.

Parameters​

ctx​

XRPCContext<TParams, TInput>

Returns​

Promise<XRPCResponse<TOutput>>

Inherited from​

XRPCMethod.handler


lexicon?​

optional lexicon: {} | {}

Defined in: src/api/xrpc/types.ts:103

Lexicon definition for this method (optional if using NSID lookup).

Inherited from​

XRPCMethod.lexicon


nsid​

nsid: string

Defined in: src/api/xrpc/types.ts:173

NSID of the method (e.g., 'pub.chive.eprint.getSubmission')


rateLimit?​

optional rateLimit: RateLimitTier

Defined in: src/api/xrpc/types.ts:175

Rate limit tier


type?​

optional type: "query" | "procedure"

Defined in: src/api/xrpc/types.ts:98

Method type: query (GET) or procedure (POST).

Default Value​

'query'

Inherited from​

XRPCMethod.type