refactor(types): WithSig -> Signed

This commit is contained in:
oxalica 2024-09-13 03:30:02 -04:00
parent 73eb441a26
commit 93d1589730
7 changed files with 39 additions and 39 deletions

View file

@ -13,7 +13,7 @@ paths:
This endpoint is for server-side-event dispatching.
Once connected, client must send a JSON text message of type
`WithSig-Auth` for authentication.
`Signed-Auth` for authentication.
If server does not close it immediately, it means success.
Since OAPI does not support WebSocket interface, we use request and
@ -88,7 +88,7 @@ paths:
in: header
description: Optional proof of membership for private rooms.
schema:
$ref: '#/components/schemas/WithSig-Auth'
$ref: '#/components/schemas/Signed-Auth'
responses:
200:
@ -119,7 +119,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/WithSig-CreateRoom'
$ref: '#/components/schemas/Signed-CreateRoom'
responses:
200:
@ -159,7 +159,7 @@ paths:
in: header
description: Optional proof of membership for private rooms.
schema:
$ref: '#/components/schemas/WithSig-Auth'
$ref: '#/components/schemas/Signed-Auth'
responses:
200:
@ -185,7 +185,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/WithSig-RoomAdmin'
$ref: '#/components/schemas/Signed-RoomAdmin'
responses:
204:
@ -244,7 +244,7 @@ paths:
in: header
description: Optional proof of membership for private rooms.
schema:
$ref: '#/components/schemas/WithSig-Auth'
$ref: '#/components/schemas/Signed-Auth'
- name: top
in: query
@ -284,7 +284,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/WithSig-Chat'
$ref: '#/components/schemas/Signed-Chat'
responses:
200:
@ -325,7 +325,7 @@ paths:
required: true
description: Proof of membership for private rooms.
schema:
$ref: '#/components/schemas/WithSig-Auth'
$ref: '#/components/schemas/Signed-Auth'
responses:
204:
@ -345,14 +345,14 @@ components:
schemas:
WSClientToServer:
anyOf:
- $ref: '#/components/schemas/WithSig-Auth'
- $ref: '#/components/schemas/Signed-Auth'
WSServerToClient:
anyOf:
- type: object
properties:
chat:
$ref: '#/components/schemas/WithSig-Chat'
$ref: '#/components/schemas/Signed-Chat'
- type: object
properties:
@ -401,7 +401,7 @@ components:
type: integer
format: int64
last_msg:
$ref: '#/components/schemas/WithMsgId-WithSig-Chat'
$ref: '#/components/schemas/WithMsgId-Signed-Chat'
last_seen_cid:
description: The `cid` of the last chat being marked as seen.
type: string
@ -440,7 +440,7 @@ components:
description: Room messages in reversed server-received time order.
type: array
items:
$ref: '#/components/schemas/WithMsgId-WithSig-Chat'
$ref: '#/components/schemas/WithMsgId-Signed-Chat'
skip_token:
description: The token for fetching the next page.
type: string
@ -481,7 +481,7 @@ components:
description: Link target.
WithSig-Auth:
Signed-Auth:
type: object
properties:
sig:
@ -499,7 +499,7 @@ components:
type: string
const: 'auth'
WithSig-RoomAdmin:
Signed-RoomAdmin:
type: object
properties:
sig:
@ -551,7 +551,7 @@ components:
timestamp: 1724966284
user: 83ce46ced47ec0391c64846cbb6c507250ead4985b6a044d68751edc46015dd7
WithSig-Chat:
Signed-Chat:
type: object
properties:
sig:
@ -583,16 +583,16 @@ components:
timestamp: 1724966284
user: 83ce46ced47ec0391c64846cbb6c507250ead4985b6a044d68751edc46015dd7
WithMsgId-WithSig-Chat:
WithMsgId-Signed-Chat:
allOf:
- $ref: '#/components/schemas/WithSig-Chat'
- $ref: '#/components/schemas/Signed-Chat'
- type: object
properties:
cid:
type: string
description: An opaque server-specific identifier.
WithSig-CreateRoom:
Signed-CreateRoom:
type: object
properties:
sig: