선적 서류 비치

TypeScript API surface

Declare app endpoints and export OpenAPI-compatible metadata from TypeScript apps.

베타 업데이트됨 2026-06-11 원시 마크다운
문서 내용은 현재 영어로 게시되어 있습니다. 번역이 준비되는 동안 한국어 문서 경로를 탐색할 수 있습니다.
문서 트리

Relpin can describe app-owned endpoints as an API surface. This is useful for Studio inspection, generated reference, and OpenAPI-compatible tooling.

Define an endpoint

import { defineApiEndpoint, defineApiSurface } from '@app-builder-platform/relpin-sdk/api'

const listOrders = defineApiEndpoint({
  method: 'GET',
  path: '/api/orders',
  summary: 'List orders',
  tags: ['orders'],
  responses: [{ status: 200, description: 'Orders returned' }],
})

export const apiSurface = defineApiSurface({
  title: 'Orders app',
  runtime: 'node',
  endpoints: [listOrders],
})

Convert to OpenAPI

The SDK can convert a Relpin API surface to an OpenAPI document. Use this for app-owned endpoints, not as a claim that Relpin exposes a public platform API during beta.

Keep metadata close to routes

When possible, keep route descriptions near the route implementation. That keeps docs and runtime behavior easier to review together.