This repository has been archived on 2022-03-07. You can view files and clone it, but cannot push or open issues or pull requests.
hotpocket/scripts/schema/config.yaml
2022-02-20 14:43:11 +00:00

110 lines
3.1 KiB
YAML

title: config.yaml
type: object
required: [ access_token, user_id, base_url, synapse_base_url, keyring, policy_rooms, actions ]
properties:
base_url:
type: string
example: http://127.0.0.1:3080/_matrix
format: uri
pattern: ^https?://.+/_matrix$
synapse_base_url:
type: string
example: http://127.0.0.1:3880/_synapse
format: uri
pattern: ^https?://.+/_synapse$
keyring:
type: string
example: ./keyring.gpg
access_token:
type: string
dry_run:
type: boolean
user_id:
comment: 'The user_id tied to the access_token. Used for room shutdowns'
type: string
pattern: '@[\w\-]+:.+'
policy_rooms:
type: array
items:
type: string
pattern: '![\w\-]+:.+'
actions:
type: array
items:
type: object
oneOf:
- required: [ tag ]
properties:
tag: { type: string, pattern: ^\w+$ }
- required: [ tags ]
properties:
tags:
type: array
items: [ { type: string, pattern: ^\w+$ } ]
anyOf:
- required: [ user ]
- required: [ room ]
properties:
user:
properties:
archive:
properties:
media:
comment: 'Save a copy of the identifiers for the last 255 media uploads by this user to disk. This does not save the actual uploads'
type: boolean
rooms:
comment: 'Save a copy of all rooms this user was participating in to disk.'
type: boolean
deactivate:
type: boolean
comment: 'Deactivate the User'
notify:
comment: 'Create an audit log in the audit room about the user.'
type: boolean
quarantine:
comment: 'Quarantine all media uploaded by the user.'
type: boolean
# TODO: Add mjolnir list forwarding
room:
properties:
archive:
properties:
media:
comment: 'Save a copy of the identifiers for the last 255 media uploads in this room to disk. This does not save the actual uploads'
type: boolean
members:
comment: 'Save a copy of all users that were participating in this room to disk.'
type: boolean
delist:
comment: 'Remove the room from the room directory.'
type: boolean
notify:
comment: 'Create an audit log in the audit room about this room.'
type: boolean
reason:
comment: 'For shutdown. A publically visible reason.'
type: string
shutdown:
comment: 'Shutdown the room'
type: boolean
silent:
comment: 'For shutdown. If a notice room should not be created for the closed room.'
type: boolean
quarantine:
comment: 'Quarantine all media uploaded in the room.'
type: boolean