|
|
|
@ -18,12 +18,12 @@ securityDefinitions:
|
|
|
|
|
name: access_token
|
|
|
|
|
in: query
|
|
|
|
|
paths:
|
|
|
|
|
"/user/{userId}/config/{configType}":
|
|
|
|
|
"/user/{userId}/account_data/{type}":
|
|
|
|
|
put:
|
|
|
|
|
summary: Set some config for the user.
|
|
|
|
|
summary: Set some account_data for the user.
|
|
|
|
|
description: |-
|
|
|
|
|
Set some config for the client. This config is only visible to the user
|
|
|
|
|
that set the config. The config will be synced to clients in the
|
|
|
|
|
Set some account_data for the client. This config is only visible to the user
|
|
|
|
|
that set the account_data. The config will be synced to clients in the
|
|
|
|
|
top-level ``account_data``.
|
|
|
|
|
security:
|
|
|
|
|
- accessToken: []
|
|
|
|
@ -33,36 +33,36 @@ paths:
|
|
|
|
|
name: userId
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The id of the user to set config for. The access token must be
|
|
|
|
|
The id of the user to set account_data for. The access token must be
|
|
|
|
|
authorized to make requests for this user id.
|
|
|
|
|
x-example: "@alice:example.com"
|
|
|
|
|
- in: path
|
|
|
|
|
type: string
|
|
|
|
|
name: configType
|
|
|
|
|
name: type
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The type of the config to set. Custom types should be namespaced to
|
|
|
|
|
The type of the account_data to set. Custom types should be namespaced to
|
|
|
|
|
avoid clashes.
|
|
|
|
|
x-example: "org.example.custom.config"
|
|
|
|
|
- in: body
|
|
|
|
|
name: content
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The content of the config
|
|
|
|
|
The content of the account_data
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
example: |-
|
|
|
|
|
{"custom_config_key": "custom_config_value"}
|
|
|
|
|
{"custom_account_data_key": "custom_config_value"}
|
|
|
|
|
responses:
|
|
|
|
|
200:
|
|
|
|
|
description:
|
|
|
|
|
The config was successfully added.
|
|
|
|
|
"/user/{userId}/rooms/{roomId}/config/{configType}":
|
|
|
|
|
The account_data was successfully added.
|
|
|
|
|
"/user/{userId}/rooms/{roomId}/account_data/{type}":
|
|
|
|
|
put:
|
|
|
|
|
summary: Set some config for the user.
|
|
|
|
|
summary: Set some account_data for the user.
|
|
|
|
|
description: |-
|
|
|
|
|
Set some config for the client on a given room. This config is only
|
|
|
|
|
visible to the user that set the config. The config will be synced to
|
|
|
|
|
Set some account_data for the client on a given room. This config is only
|
|
|
|
|
visible to the user that set the account_data. The config will be synced to
|
|
|
|
|
clients in the per-room ``account_data``.
|
|
|
|
|
security:
|
|
|
|
|
- accessToken: []
|
|
|
|
@ -72,7 +72,7 @@ paths:
|
|
|
|
|
name: userId
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The id of the user to set config for. The access token must be
|
|
|
|
|
The id of the user to set account_data for. The access token must be
|
|
|
|
|
authorized to make requests for this user id.
|
|
|
|
|
x-example: "@alice:example.com"
|
|
|
|
|
- in: path
|
|
|
|
@ -80,26 +80,26 @@ paths:
|
|
|
|
|
name: roomId
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The id of the room to set config on.
|
|
|
|
|
The id of the room to set account_data on.
|
|
|
|
|
x-example: "!726s6s6q:example.com"
|
|
|
|
|
- in: path
|
|
|
|
|
type: string
|
|
|
|
|
name: configType
|
|
|
|
|
name: type
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The type of the config to set. Custom types should be namespaced to
|
|
|
|
|
avoid clashes.
|
|
|
|
|
The type of the account_data to set. Custom types should be
|
|
|
|
|
namespaced to avoid clashes.
|
|
|
|
|
x-example: "org.example.custom.room.config"
|
|
|
|
|
- in: body
|
|
|
|
|
name: content
|
|
|
|
|
required: true
|
|
|
|
|
description: |-
|
|
|
|
|
The content of the config
|
|
|
|
|
The content of the account_data
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
example: |-
|
|
|
|
|
{"custom_config_key": "custom_config_value"}
|
|
|
|
|
{"custom_account_data_key": "custom_account_data_value"}
|
|
|
|
|
responses:
|
|
|
|
|
200:
|
|
|
|
|
description:
|
|
|
|
|
The config was successfully added.
|
|
|
|
|
The account_data was successfully added.
|