Remove references to device-specific push rules.

This commit is contained in:
Patrick Cloke 2024-06-04 21:08:51 -04:00
parent e15a36b0a1
commit 437fad3467

View file

@ -16,228 +16,214 @@ info:
title: Matrix Client-Server Push Rules API title: Matrix Client-Server Push Rules API
version: 1.0.0 version: 1.0.0
paths: paths:
/pushrules/: /pushrules/global/:
get: get:
summary: Retrieve all push rulesets. summary: Retrieve all push rules.
description: |- description: |-
Retrieve all push rulesets for this user. Clients can "drill-down" on Retrieve all push rules for this user.
the rulesets by suffixing a `scope` to this path e.g.
`/pushrules/global/`. This will return a subset of this data under the
specified key e.g. the `global` key.
operationId: getPushRules operationId: getPushRules
security: security:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
responses: responses:
"200": "200":
description: All the push rulesets for this user. description: All the push rules for this user.
content: content:
application/json: application/json:
schema: schema:
type: object $ref: definitions/push_ruleset.yaml
required:
- global
properties:
global:
type: object
description: The global ruleset.
title: Ruleset
allOf:
- $ref: definitions/push_ruleset.yaml
examples: examples:
response: response:
value: { value: {
"global": { "content": [
"content": [ {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "sound",
"set_tweak": "sound", "value": "default"
"value": "default" },
}, {
{ "set_tweak": "highlight"
"set_tweak": "highlight" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "pattern": "alice",
"pattern": "alice", "rule_id": ".m.rule.contains_user_name"
"rule_id": ".m.rule.contains_user_name" }
} ],
], "override": [
"override": [ {
{ "actions": [],
"actions": [], "conditions": [],
"conditions": [], "default": true,
"default": true, "enabled": false,
"enabled": false, "rule_id": ".m.rule.master"
"rule_id": ".m.rule.master" },
}, {
{ "actions": [],
"actions": [], "conditions": [
"conditions": [ {
{ "key": "content.msgtype",
"key": "content.msgtype", "kind": "event_match",
"kind": "event_match", "pattern": "m.notice"
"pattern": "m.notice" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.suppress_notices"
"rule_id": ".m.rule.suppress_notices" }
} ],
], "room": [],
"room": [], "sender": [],
"sender": [], "underride": [
"underride": [ {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "sound",
"set_tweak": "sound", "value": "ring"
"value": "ring" },
}, {
{ "set_tweak": "highlight",
"set_tweak": "highlight", "value": false
"value": false }
} ],
], "conditions": [
"conditions": [ {
{ "key": "type",
"key": "type", "kind": "event_match",
"kind": "event_match", "pattern": "m.call.invite"
"pattern": "m.call.invite" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.call"
"rule_id": ".m.rule.call" },
}, {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "sound",
"set_tweak": "sound", "value": "default"
"value": "default" },
}, {
{ "set_tweak": "highlight"
"set_tweak": "highlight" }
} ],
], "conditions": [
"conditions": [ {
{ "kind": "contains_display_name"
"kind": "contains_display_name" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.contains_display_name"
"rule_id": ".m.rule.contains_display_name" },
}, {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "sound",
"set_tweak": "sound", "value": "default"
"value": "default" },
}, {
{ "set_tweak": "highlight",
"set_tweak": "highlight", "value": false
"value": false }
} ],
], "conditions": [
"conditions": [ {
{ "kind": "room_member_count",
"kind": "room_member_count", "is": "2"
"is": "2" },
}, {
{ "kind": "event_match",
"kind": "event_match", "key": "type",
"key": "type", "pattern": "m.room.message"
"pattern": "m.room.message" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.room_one_to_one"
"rule_id": ".m.rule.room_one_to_one" },
}, {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "sound",
"set_tweak": "sound", "value": "default"
"value": "default" },
}, {
{ "set_tweak": "highlight",
"set_tweak": "highlight", "value": false
"value": false }
} ],
], "conditions": [
"conditions": [ {
{ "key": "type",
"key": "type", "kind": "event_match",
"kind": "event_match", "pattern": "m.room.member"
"pattern": "m.room.member" },
}, {
{ "key": "content.membership",
"key": "content.membership", "kind": "event_match",
"kind": "event_match", "pattern": "invite"
"pattern": "invite" },
}, {
{ "key": "state_key",
"key": "state_key", "kind": "event_match",
"kind": "event_match", "pattern": "@alice:example.com"
"pattern": "@alice:example.com" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.invite_for_me"
"rule_id": ".m.rule.invite_for_me" },
}, {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "highlight",
"set_tweak": "highlight", "value": false
"value": false }
} ],
], "conditions": [
"conditions": [ {
{ "key": "type",
"key": "type", "kind": "event_match",
"kind": "event_match", "pattern": "m.room.member"
"pattern": "m.room.member" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.member_event"
"rule_id": ".m.rule.member_event" },
}, {
{ "actions": [
"actions": [ "notify",
"notify", {
{ "set_tweak": "highlight",
"set_tweak": "highlight", "value": false
"value": false }
} ],
], "conditions": [
"conditions": [ {
{ "key": "type",
"key": "type", "kind": "event_match",
"kind": "event_match", "pattern": "m.room.message"
"pattern": "m.room.message" }
} ],
], "default": true,
"default": true, "enabled": true,
"enabled": true, "rule_id": ".m.rule.message"
"rule_id": ".m.rule.message" }
} ]
]
}
} }
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}": "/pushrules/global/{kind}/{ruleId}":
get: get:
summary: Retrieve a push rule. summary: Retrieve a push rule.
description: Retrieve a single specified push rule. description: Retrieve a single specified push rule.
@ -246,13 +232,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -318,13 +297,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -395,13 +367,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -523,7 +488,7 @@ paths:
$ref: definitions/errors/rate_limited.yaml $ref: definitions/errors/rate_limited.yaml
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/enabled": "/pushrules/global/{kind}/{ruleId}/enabled":
get: get:
summary: Get whether a push rule is enabled summary: Get whether a push rule is enabled
description: This endpoint gets whether the specified push rule is enabled. description: This endpoint gets whether the specified push rule is enabled.
@ -532,15 +497,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: |-
Either `global` or `device/<profile_tag>` to specify global
rules or device rules for the given `profile_tag`.
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -604,13 +560,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -674,7 +623,7 @@ paths:
} }
tags: tags:
- Push notifications - Push notifications
"/pushrules/{scope}/{kind}/{ruleId}/actions": "/pushrules/global/{kind}/{ruleId}/actions":
get: get:
summary: The actions for a push rule summary: The actions for a push rule
description: This endpoint get the actions for the specified push rule. description: This endpoint get the actions for the specified push rule.
@ -683,15 +632,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: |-
Either `global` or `device/<profile_tag>` to specify global
rules or device rules for the given `profile_tag`.
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true
@ -764,13 +704,6 @@ paths:
- accessTokenQuery: [] - accessTokenQuery: []
- accessTokenBearer: [] - accessTokenBearer: []
parameters: parameters:
- in: path
name: scope
required: true
description: "`global` to specify global rules."
example: global
schema:
type: string
- in: path - in: path
name: kind name: kind
required: true required: true