Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cfa0536
feat(asyncapi): scaffold typespec-asyncapi emitter package
Devon-White Jun 16, 2026
9f2d8a9
feat(asyncapi): add library definition, options, and test harness
Devon-White Jun 16, 2026
3647428
feat(asyncapi): add document types, decorators, and server emission
Devon-White Jun 16, 2026
f601964
feat(asyncapi): resolve service namespace and emit channel
Devon-White Jun 16, 2026
fc7217c
test(asyncapi): cover missing server/channel diagnostics
Devon-White Jun 16, 2026
a60505a
feat(asyncapi): Type→Schema converter with allOf-inheritance polymorp…
Devon-White Jun 16, 2026
ddf6887
feat(asyncapi): synthesize JSON-RPC request/reply envelopes for @rpcM…
Devon-White Jun 16, 2026
e8a97b9
feat(asyncapi): synthesize signalwire.event carrier and receive opera…
Devon-White Jun 16, 2026
028016b
feat(asyncapi): deterministic serialization + self-contained @bearerA…
Devon-White Jun 16, 2026
9e01d92
test(asyncapi): conformance gate via official AsyncAPI CLI (kitchen-s…
Devon-White Jun 16, 2026
77455a0
feat(asyncapi): add WebSocket server/channel bindings
Devon-White Jun 16, 2026
704d601
test(asyncapi): golden snapshot for calling vertical slice
Devon-White Jun 16, 2026
79ca5c8
feat(asyncapi): wire relay calling spec through emitter into fern/api…
Devon-White Jun 16, 2026
314c4df
fix(asyncapi): infer types for enums/discriminator consts, DRY isName…
Devon-White Jun 16, 2026
1afb0b6
feat(asyncapi): emit JSON-Schema constraints, defaults, and examples
Devon-White Jun 16, 2026
023e1ae
feat(asyncapi): handle @encode (decay to wire type + format) and @enc…
Devon-White Jun 16, 2026
a03d6e6
feat(asyncapi): emit deprecated:true for @deprecated properties and m…
Devon-White Jun 16, 2026
9a4516a
refactor(asyncapi): structured AsyncAPISchema type, typed RefFn, fewe…
Devon-White Jun 16, 2026
232da66
feat(asyncapi): per-service output-file + $ref metadata; author signa…
Devon-White Jun 16, 2026
8f35e4c
feat(asyncapi): author full Relay surface — all 71 methods + 26 event…
Devon-White Jun 16, 2026
e21dda5
feat(apis): add Relay AsyncAPI reference tab (api-name: relay) to API…
Devon-White Jun 16, 2026
ee71b09
fix(asyncapi): Relay server is static wss://relay.signalwire.com (dro…
Devon-White Jun 17, 2026
15f25b9
fix(asyncapi): emit channel address "/" so Fern renders the bare WS root
Devon-White Jun 17, 2026
7bfa460
fix(ci): build the typespec-asyncapi emitter before compiling relay s…
Devon-White Jun 17, 2026
a713ec2
feat(apis): split API reference into REST and Relay tabs
Devon-White Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10,238 changes: 10,238 additions & 0 deletions fern/apis/relay/calling.yaml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions fern/apis/relay/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
api:
specs:
- asyncapi: signalwire.yaml
- asyncapi: calling.yaml
- asyncapi: messaging.yaml
- asyncapi: tasking.yaml
- asyncapi: provisioning.yaml
- asyncapi: webrtc.yaml
373 changes: 373 additions & 0 deletions fern/apis/relay/messaging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,373 @@
asyncapi: 3.0.0
info:
title: SignalWire Relay — Messaging
version: 1.0.0
description: |-
The Relay **Messaging** service sends outbound SMS/MMS to PSTN numbers and
delivers inbound-message and delivery-state events. It rides on a connection
established by `signalwire.connect`; messages are routed by **context**.
defaultContentType: application/json
servers:
production:
host: relay.signalwire.com
protocol: wss
description: SignalWire Relay WebSocket endpoint.
security:
- $ref: "#/components/securitySchemes/httpBearer"
bindings:
ws: {}
channels:
messaging:
address: /
title: SignalWire Relay — Messaging
servers:
- $ref: "#/servers/production"
messages:
messagingSendRequest:
$ref: "#/components/messages/messagingSendRequest"
messagingSendResponse:
$ref: "#/components/messages/messagingSendResponse"
receiveEvent:
$ref: "#/components/messages/receiveEvent"
stateEvent:
$ref: "#/components/messages/stateEvent"
bindings:
ws: {}
operations:
messagingSend:
action: send
channel:
$ref: "#/channels/messaging"
title: messaging.send
summary: Send an outbound message
messages:
- $ref: "#/channels/messaging/messages/messagingSendRequest"
reply:
channel:
$ref: "#/channels/messaging"
messages:
- $ref: "#/channels/messaging/messages/messagingSendResponse"
onMessagingEvent:
action: receive
channel:
$ref: "#/channels/messaging"
title: signalwire.event
summary: Asynchronous events pushed by the server over the signalwire.event carrier.
messages:
- $ref: "#/channels/messaging/messages/receiveEvent"
- $ref: "#/channels/messaging/messages/stateEvent"
components:
schemas:
SendParams:
type: object
properties:
context:
type: string
description: The context to receive inbound events for this message.
tags:
type: array
items:
type: string
description: Optional client-defined tags, surfaced for searching in the UI.
region:
type: string
description: |-
Region of the world to originate the message from. Defaults to a value
picked from account preferences or device location.
to_number:
type: string
description: Destination phone number, in E.164 format.
from_number:
type: string
description: Origin phone number, in E.164 format.
body:
type: string
description: |-
Body of the message. Required if `media` is absent; at least one of `body`
or `media` must be present (both may be supplied).
media:
type: array
items:
type: string
description: |-
An array of media URLs to send (MMS). Required if `body` is absent; at
least one of `body` or `media` must be present (both may be supplied).
required:
- context
- to_number
- from_number
MessagingSendRequest:
type: object
required:
- jsonrpc
- id
- method
- params
properties:
jsonrpc:
type: string
const: "2.0"
id:
type: string
format: uuid
method:
type: string
const: messaging.send
params:
$ref: "#/components/schemas/SendParams"
SendResult:
type: object
properties:
code:
type: string
description: Result code (string), e.g. `"200"`, `"400"`, `"404"`.
message:
type: string
description: Human-readable result message.
message_id:
type: string
description: The UUID of the accepted message (present on success).
required:
- code
- message
- message_id
MessagingSendResponse:
type: object
required:
- jsonrpc
- id
properties:
jsonrpc:
type: string
const: "2.0"
id:
type: string
format: uuid
result:
$ref: "#/components/schemas/SendResult"
ReceiveEvent:
type: object
properties:
message_id:
type: string
description: The UUID of the message.
context:
type: string
description: The context the message was set on.
direction:
description: The message's direction. Always `inbound` for this event.
allOf:
- $ref: "#/components/schemas/MessageDirection"
tags:
type: array
items:
type: string
description: Optional client data this message is tagged with.
from_number:
type: string
description: Origin phone number, in E.164 format.
to_number:
type: string
description: Destination phone number, in E.164 format.
body:
type: string
description: Body of the message.
media:
type: array
items:
type: string
description: An array of media URLs included with the message.
segments:
type: integer
format: int32
description: Number of segments the message was split into.
message_state:
type: string
enum:
- received
description: The message state. Always `received` for an inbound message.
required:
- message_id
- context
- direction
- from_number
- to_number
- body
- media
- segments
- message_state
description: An inbound message has been received.
MessageDirection:
type: string
enum:
- inbound
- outbound
ReceiveEventFrame:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
const: "2.0"
method:
type: string
const: signalwire.event
id:
type: string
format: uuid
params:
type: object
required:
- event_type
- params
properties:
event_type:
type: string
const: messaging.receive
event_channel:
type: string
timestamp:
type: number
space_id:
type: string
project_id:
type: string
params:
$ref: "#/components/schemas/ReceiveEvent"
StateEvent:
type: object
properties:
message_id:
type: string
description: The UUID of the message.
context:
type: string
description: The context the message was set on.
direction:
description: The message's direction.
allOf:
- $ref: "#/components/schemas/MessageDirection"
tags:
type: array
items:
type: string
description: Optional client data this message is tagged with.
from_number:
type: string
description: Origin phone number, in E.164 format.
to_number:
type: string
description: Destination phone number, in E.164 format.
body:
type: string
description: Body of the message.
media:
type: array
items:
type: string
description: An array of media URLs included with the message.
segments:
type: integer
format: int32
description: Number of segments the message was split into.
message_state:
description: The new delivery-lifecycle state of the message.
allOf:
- $ref: "#/components/schemas/MessageState"
reason:
type: string
description: Explanation of the state. Present only on `undelivered`/`failed`.
required:
- message_id
- context
- direction
- from_number
- to_number
- body
- media
- segments
- message_state
description: A change in the delivery state of a message.
MessageState:
type: string
enum:
- queued
- initiated
- sent
- delivered
- undelivered
- failed
StateEventFrame:
type: object
required:
- jsonrpc
- method
- id
- params
properties:
jsonrpc:
type: string
const: "2.0"
method:
type: string
const: signalwire.event
id:
type: string
format: uuid
params:
type: object
required:
- event_type
- params
properties:
event_type:
type: string
const: messaging.state
event_channel:
type: string
timestamp:
type: number
space_id:
type: string
project_id:
type: string
params:
$ref: "#/components/schemas/StateEvent"
messages:
messagingSendRequest:
name: messaging.send.request
title: messaging.send request
contentType: application/json
correlationId:
location: $message.payload#/id
payload:
$ref: "#/components/schemas/MessagingSendRequest"
messagingSendResponse:
name: messaging.send.response
title: messaging.send response
contentType: application/json
correlationId:
location: $message.payload#/id
payload:
$ref: "#/components/schemas/MessagingSendResponse"
receiveEvent:
name: messaging.receive
title: messaging.receive event
contentType: application/json
payload:
$ref: "#/components/schemas/ReceiveEventFrame"
stateEvent:
name: messaging.state
title: messaging.state event
contentType: application/json
payload:
$ref: "#/components/schemas/StateEventFrame"
securitySchemes:
httpBearer:
type: http
scheme: bearer
bearerFormat: JWT
Loading
Loading