Skip to content

Commit 17c42fd

Browse files
fix(notification): Add permission commands for Actions (#1459)
* Add the permission commands * Add changes file
1 parent b18a03a commit 17c42fd

File tree

10 files changed

+95
-4
lines changed

10 files changed

+95
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"notification": patch
3+
---
4+
5+
Add `register_action_types` and `register_listener` permission command, so that new Action types can be registered and used on Android.

examples/api/src-tauri/gen/schemas/desktop-schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5356,6 +5356,20 @@
53565356
"notification:allow-notify"
53575357
]
53585358
},
5359+
{
5360+
"description": "notification:allow-register-action-types -> Enables the register_action_types command without any pre-configured scope.",
5361+
"type": "string",
5362+
"enum": [
5363+
"notification:allow-register-action-types"
5364+
]
5365+
},
5366+
{
5367+
"description": "notification:allow-register-listener -> Enables the register_listener command without any pre-configured scope.",
5368+
"type": "string",
5369+
"enum": [
5370+
"notification:allow-register-listener"
5371+
]
5372+
},
53595373
{
53605374
"description": "notification:allow-request-permission -> Enables the request_permission command without any pre-configured scope.",
53615375
"type": "string",
@@ -5377,6 +5391,20 @@
53775391
"notification:deny-notify"
53785392
]
53795393
},
5394+
{
5395+
"description": "notification:deny-register-action-types -> Denies the register_action_types command without any pre-configured scope.",
5396+
"type": "string",
5397+
"enum": [
5398+
"notification:deny-register-action-types"
5399+
]
5400+
},
5401+
{
5402+
"description": "notification:deny-register-listener -> Denies the register_listener command without any pre-configured scope.",
5403+
"type": "string",
5404+
"enum": [
5405+
"notification:deny-register-listener"
5406+
]
5407+
},
53805408
{
53815409
"description": "notification:deny-request-permission -> Denies the request_permission command without any pre-configured scope.",
53825410
"type": "string",

plugins/deep-link/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/log/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/notification/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// SPDX-License-Identifier: MIT
44

5-
const COMMANDS: &[&str] = &["notify", "request_permission", "is_permission_granted"];
5+
const COMMANDS: &[&str] = &["notify", "request_permission", "is_permission_granted", "register_action_types", "register_listener"];
66

77
fn main() {
88
if let Err(error) = tauri_plugin::Builder::new(COMMANDS)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-register-action-types"
7+
description = "Enables the register_action_types command without any pre-configured scope."
8+
commands.allow = ["register_action_types"]
9+
10+
[[permission]]
11+
identifier = "deny-register-action-types"
12+
description = "Denies the register_action_types command without any pre-configured scope."
13+
commands.deny = ["register_action_types"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Automatically generated - DO NOT EDIT!
2+
3+
"$schema" = "../../schemas/schema.json"
4+
5+
[[permission]]
6+
identifier = "allow-register-listener"
7+
description = "Enables the register_listener command without any pre-configured scope."
8+
commands.allow = ["register_listener"]
9+
10+
[[permission]]
11+
identifier = "deny-register-listener"
12+
description = "Denies the register_listener command without any pre-configured scope."
13+
commands.deny = ["register_listener"]

plugins/notification/permissions/autogenerated/reference.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
|`deny-is-permission-granted`|Denies the is_permission_granted command without any pre-configured scope.|
55
|`allow-notify`|Enables the notify command without any pre-configured scope.|
66
|`deny-notify`|Denies the notify command without any pre-configured scope.|
7+
|`allow-register-action-types`|Enables the register_action_types command without any pre-configured scope.|
8+
|`deny-register-action-types`|Denies the register_action_types command without any pre-configured scope.|
9+
|`allow-register-listener`|Enables the register_listener command without any pre-configured scope.|
10+
|`deny-register-listener`|Denies the register_listener command without any pre-configured scope.|
711
|`allow-request-permission`|Enables the request_permission command without any pre-configured scope.|
812
|`deny-request-permission`|Denies the request_permission command without any pre-configured scope.|
913
|`default`|Allows requesting permission, checking permission state and sending notifications|

plugins/notification/permissions/schemas/schema.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,34 @@
322322
"deny-notify"
323323
]
324324
},
325+
{
326+
"description": "allow-register-action-types -> Enables the register_action_types command without any pre-configured scope.",
327+
"type": "string",
328+
"enum": [
329+
"allow-register-action-types"
330+
]
331+
},
332+
{
333+
"description": "deny-register-action-types -> Denies the register_action_types command without any pre-configured scope.",
334+
"type": "string",
335+
"enum": [
336+
"deny-register-action-types"
337+
]
338+
},
339+
{
340+
"description": "allow-register-listener -> Enables the register_listener command without any pre-configured scope.",
341+
"type": "string",
342+
"enum": [
343+
"allow-register-listener"
344+
]
345+
},
346+
{
347+
"description": "deny-register-listener -> Denies the register_listener command without any pre-configured scope.",
348+
"type": "string",
349+
"enum": [
350+
"deny-register-listener"
351+
]
352+
},
325353
{
326354
"description": "allow-request-permission -> Enables the request_permission command without any pre-configured scope.",
327355
"type": "string",

plugins/store/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)