Skip to content

Commit

Permalink
feat(GET /api/chatrooms/{address}): add missing params
Browse files Browse the repository at this point in the history
  • Loading branch information
bludnic committed Aug 10, 2023
1 parent ef1b3a6 commit 0002ab9
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 2 deletions.
47 changes: 47 additions & 0 deletions specification/chats/GetChatRooms/GetChatRoomsParams.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,54 @@
###############################
######## Path params ##########
###############################

- name: address
in: path
description: ADAMANT address
required: true
schema:
type: string
example: U839357947177758191

###############################
####### Common filters ########
###############################

# senderId
- $ref: '../../common/params/filters/senderId/senderId.yaml'
- $ref: '../../common/params/filters/senderId/andSenderId.yaml'
- $ref: '../../common/params/filters/senderId/orSenderId.yaml'

# recipientId
- $ref: '../../common/params/filters/recipientId/recipientId.yaml'
- $ref: '../../common/params/filters/recipientId/andRecipientId.yaml'
- $ref: '../../common/params/filters/recipientId/orRecipientId.yaml'

###############################
######## Common params ########
###############################

# offset
- $ref: '../../common/params/offset.yaml'

# orderBy
- $ref: '../../common/params/orderBy.yaml'

###############################
## Endpoint specific filters ##
###############################

# userId
- $ref: './params/filters/userId/userId.yaml'
- $ref: './params/filters/userId/andUserId.yaml'
- $ref: './params/filters/userId/orUserId.yaml'

# withoutDirectTransfers
- $ref: './params/filters/withoutDirectTransfers/withoutDirectTransfers.yaml'

###############################
### Endpoint specific params ##
###############################

# limit
- $ref: './params/limit.yaml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: and:userId
in: query
description: |
Filter by senderId/recipientId (`and` operator).
The query will look like `tx.senderId = {userId} OR tx.recipientId = {userId}`.
schema:
type: string
required: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: or:userId
in: query
description: |
Filter by senderId/recipientId (`or` operator).
The query will look like `tx.senderId = {userId} OR tx.recipientId = {userId}`.
schema:
type: string
required: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: userId
in: query
description: |
Filter by senderId/recipientId.
The query will look like `tx.senderId = {userId} OR tx.recipientId = {userId}`.
schema:
type: string
example: U14236667426471084862
required: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: withoutDirectTransfers
in: query
description: When set to `true`, excludes type `0` transactions (direct token transfers) from results. Default is `false`.
schema:
type: boolean
default: false
required: false
8 changes: 8 additions & 0 deletions specification/chats/GetChatRooms/params/limit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: limit
in: query
description: Limit number of transactions in the result
schema:
type: integer
example: 10
default: 25
required: false
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ in: query
description: Filter by recipientId
schema:
type: string
example: U18132012621449491414
required: false
1 change: 0 additions & 1 deletion specification/common/params/filters/senderId/senderId.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ in: query
description: Filter by senderId
schema:
type: string
example: U14236667426471084862
required: false

0 comments on commit 0002ab9

Please sign in to comment.