2024-03-25 09:13:52 +01:00

219 lines
3.7 KiB
YAML

WakuPeer:
type: object
required:
- multiaddr
- protocols
properties:
multiaddr:
type: string
protocols:
type: array
items:
type: object
required:
- protocol
- connected
properties:
protocol:
type: string
connected:
type: boolean
WakuInfo:
type: object
properties:
listenAddresses:
type: array
items:
type: string
enrUri:
type: string
required:
- listenAddresses
PubsubTopic:
type: string
ContentTopic:
type: string
FilterLegacySubscribeRequest:
type: object
properties:
contentFilters:
type: array
items:
$ref: '#/ContentTopic'
pubsubTopic:
$ref: "#/PubsubTopic"
required:
- contentFilters
FilterGetMessagesResponse:
type: array
items:
$ref: '#/WakuMessage'
FilterSubscribeRequest:
type: object
properties:
requestId:
type: string
contentFilters:
type: array
items:
$ref: '#/ContentTopic'
pubsubTopic:
$ref: "#/PubsubTopic"
required:
- requestId
- contentFilters
- pubsubTopic
FilterUnsubscribeRequest:
type: object
properties:
requestId:
type: string
contentFilters:
type: array
items:
$ref: '#/ContentTopic'
pubsubTopic:
$ref: "#/PubsubTopic"
required:
- requestId
- contentFilters
FilterUnsubscribeAllRequest:
type: object
properties:
requestId:
type: string
required:
- requestId
FilterSubscriptionResponse:
type: object
properties:
requestId:
type: string
statusDesc:
type: string
required:
- requestId
WakuMessage:
type: object
properties:
payload:
type: string
format: byte
contentTopic:
$ref: '#/ContentTopic'
version:
type: integer
format: int32
timestamp:
type: integer
format: int64
ephemeral:
type: boolean
meta:
type: string
format: byte
required:
- payload
- contentTopic
PushRequest:
type: object
properties:
pubsubTopic:
$ref: '#/PubsubTopic'
message:
$ref: '#/WakuMessage'
required:
- message
## TODO: Check if it can be tunneled into the one WakuMessage structure
## mainly because of Relay post message request can break in client code
RelayWakuMessage:
type: object
properties:
payload:
type: string
format: byte
contentTopic:
$ref: '#/ContentTopic'
version:
type: number
timestamp:
type: number
ephemeral:
type: boolean
meta:
type: string
format: byte
required:
- payload
RelayGetMessagesResponse:
type: array
items:
$ref: '#/RelayWakuMessage'
RelayPostMessagesRequest:
$ref: '#/RelayWakuMessage'
StoreResponse:
type: object
properties:
messages:
type: array
items:
$ref: '#/WakuMessage'
cursor:
$ref: '#/HistoryCursor'
error_message:
type: string
required:
- messages
HistoryCursor:
type: object
properties:
pubsubTopic:
type: string
senderTime:
type: string
storeTime:
type: string
digest:
type: string
required:
- pubsubTopic
- senderTime
- storeTime
- digest
FilterSubscription:
type: object
required:
- peerId
- filterCriteria
properties:
peerId:
type: string
filterCriteria:
type: array
items:
type: object
required:
- pubsubTopic
- contentTopic
properties:
pubsubTopic:
type: string
contentTopic:
type: string