Skip to content

Commit

Permalink
Update video openapi Spec
Browse files Browse the repository at this point in the history
  • Loading branch information
stream-ci-zz committed Feb 19, 2024
1 parent 0e58036 commit 9fe260b
Show file tree
Hide file tree
Showing 12 changed files with 325 additions and 115 deletions.
2 changes: 1 addition & 1 deletion openapi/chat-openapi-clientside.json

Large diffs are not rendered by default.

93 changes: 49 additions & 44 deletions openapi/chat-openapi-clientside.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3358,6 +3358,11 @@ components:
type: object
Label:
properties:
harm_labels:
items:
type: string
type: array
x-stream-index: "003"
name:
type: string
x-stream-index: "001"
Expand Down Expand Up @@ -4122,7 +4127,7 @@ components:
type: array
x-stream-index: "001.002"
type:
default: notification.thread_message_new
default: message.new
type: string
x-stream-index: "004.001"
user:
Expand Down Expand Up @@ -7357,45 +7362,6 @@ components:
- channel_count
- unread_count
type: object
UnreadCountsResponse:
nullable: true
properties:
channel_type:
items:
$ref: '#/components/schemas/UnreadCountsChannelType'
type: array
x-stream-index: "004"
channels:
items:
$ref: '#/components/schemas/UnreadCountsChannel'
type: array
x-stream-index: "003"
duration:
description: Duration of the request in human-readable format
title: Duration
type: string
x-stream-index: "006.001"
threads:
items:
$ref: '#/components/schemas/UnreadCountsThread'
type: array
x-stream-index: "005"
total_unread_count:
format: int32
type: integer
x-stream-index: "001"
total_unread_threads_count:
format: int32
type: integer
x-stream-index: "002"
required:
- total_unread_count
- total_unread_threads_count
- channels
- channel_type
- threads
- duration
type: object
UnreadCountsThread:
properties:
last_read:
Expand Down Expand Up @@ -8507,6 +8473,45 @@ components:
- $ref: '#/components/schemas/UserUpdatedEvent'
- $ref: '#/components/schemas/UserWatchingStartEvent'
- $ref: '#/components/schemas/UserWatchingStopEvent'
WrappedUnreadCountsResponse:
nullable: true
properties:
channel_type:
items:
$ref: '#/components/schemas/UnreadCountsChannelType'
type: array
x-stream-index: "001.004"
channels:
items:
$ref: '#/components/schemas/UnreadCountsChannel'
type: array
x-stream-index: "001.003"
duration:
description: Duration of the request in human-readable format
title: Duration
type: string
x-stream-index: "002.001"
threads:
items:
$ref: '#/components/schemas/UnreadCountsThread'
type: array
x-stream-index: "001.005"
total_unread_count:
format: int32
type: integer
x-stream-index: "001.001"
total_unread_threads_count:
format: int32
type: integer
x-stream-index: "001.002"
required:
- total_unread_count
- total_unread_threads_count
- channels
- channel_type
- threads
- duration
type: object
XiaomiConfigFields:
properties:
enabled:
Expand Down Expand Up @@ -8565,7 +8570,7 @@ components:
type: apiKey
info:
title: Stream API
version: v98.2.0
version: v98.2.1-prev-next-messages-crdb.1
openapi: 3.0.3
paths:
/app:
Expand Down Expand Up @@ -11352,14 +11357,14 @@ paths:
/unread:
get:
description: |
UnreadCount counts
Fetch unread counts for a single user
operationId: UnreadCounts
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/UnreadCountsResponse'
$ref: '#/components/schemas/WrappedUnreadCountsResponse'
description: Successful response
"400":
content:
Expand All @@ -11373,7 +11378,7 @@ paths:
schema:
$ref: '#/components/schemas/APIError'
description: Too many requests
summary: UnreadCount counts
summary: Unread counts
tags:
- Channels
/users:
Expand Down
2 changes: 1 addition & 1 deletion openapi/chat-openapi.json

Large diffs are not rendered by default.

120 changes: 110 additions & 10 deletions openapi/chat-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4621,6 +4621,11 @@ components:
type: object
Label:
properties:
harm_labels:
items:
type: string
type: array
x-stream-index: "003"
name:
type: string
x-stream-index: "001"
Expand Down Expand Up @@ -8237,6 +8242,35 @@ components:
- target_id
- target_ids
type: object
UnreadCountsBatchRequest:
nullable: true
properties:
user_ids:
items:
type: string
maximum: 100
type: array
x-stream-index: "001"
required:
- user_ids
type: object
UnreadCountsBatchResponse:
nullable: true
properties:
counts_by_user:
additionalProperties:
$ref: '#/components/schemas/UnreadCountsResponse'
type: object
x-stream-index: "001"
duration:
description: Duration of the request in human-readable format
title: Duration
type: string
x-stream-index: "002.001"
required:
- counts_by_user
- duration
type: object
UnreadCountsChannel:
properties:
channel_id:
Expand Down Expand Up @@ -8286,11 +8320,6 @@ components:
$ref: '#/components/schemas/UnreadCountsChannel'
type: array
x-stream-index: "003"
duration:
description: Duration of the request in human-readable format
title: Duration
type: string
x-stream-index: "006.001"
threads:
items:
$ref: '#/components/schemas/UnreadCountsThread'
Expand All @@ -8310,7 +8339,6 @@ components:
- channels
- channel_type
- threads
- duration
type: object
UnreadCountsThread:
properties:
Expand Down Expand Up @@ -9620,6 +9648,45 @@ components:
title: Event
type: object
x-stream-docs-page-id: event_object
WrappedUnreadCountsResponse:
nullable: true
properties:
channel_type:
items:
$ref: '#/components/schemas/UnreadCountsChannelType'
type: array
x-stream-index: "001.004"
channels:
items:
$ref: '#/components/schemas/UnreadCountsChannel'
type: array
x-stream-index: "001.003"
duration:
description: Duration of the request in human-readable format
title: Duration
type: string
x-stream-index: "002.001"
threads:
items:
$ref: '#/components/schemas/UnreadCountsThread'
type: array
x-stream-index: "001.005"
total_unread_count:
format: int32
type: integer
x-stream-index: "001.001"
total_unread_threads_count:
format: int32
type: integer
x-stream-index: "001.002"
required:
- total_unread_count
- total_unread_threads_count
- channels
- channel_type
- threads
- duration
type: object
XiaomiConfigFields:
properties:
enabled:
Expand Down Expand Up @@ -9691,7 +9758,7 @@ components:
type: apiKey
info:
title: Stream API
version: v98.2.0
version: v98.2.1-prev-next-messages-crdb.1
openapi: 3.0.3
paths:
/app:
Expand Down Expand Up @@ -13639,14 +13706,47 @@ paths:
/unread:
get:
description: |
UnreadCount counts
Fetch unread counts for a single user
operationId: UnreadCounts
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/UnreadCountsResponse'
$ref: '#/components/schemas/WrappedUnreadCountsResponse'
description: Successful response
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/APIError'
description: Bad request
"429":
content:
application/json:
schema:
$ref: '#/components/schemas/APIError'
description: Too many requests
summary: Unread counts
tags:
- Channels
/unread_batch:
post:
description: |
Fetch unread counts in batch for multiple users in one call
operationId: UnreadCountsBatch
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UnreadCountsBatchRequest'
required: true
responses:
"201":
content:
application/json:
schema:
$ref: '#/components/schemas/UnreadCountsBatchResponse'
description: Successful response
"400":
content:
Expand All @@ -13660,7 +13760,7 @@ paths:
schema:
$ref: '#/components/schemas/APIError'
description: Too many requests
summary: UnreadCount counts
summary: Batch unread counts
tags:
- Channels
/users:
Expand Down
2 changes: 1 addition & 1 deletion openapi/clientside-api.json

Large diffs are not rendered by default.

Loading

0 comments on commit 9fe260b

Please sign in to comment.