feat: add notification scheduling permission
This commit is contained in:
parent
1378fda7f2
commit
43ac963923
|
|
@ -50,7 +50,7 @@ export interface CapabilityEntry {
|
||||||
pluginId: string;
|
pluginId: string;
|
||||||
status: 'stable' | 'draft' | 'deprecated';
|
status: 'stable' | 'draft' | 'deprecated';
|
||||||
}
|
}
|
||||||
export type Permission = 'vault.read' | 'vault.write' | 'vault.watch' | 'files.read' | 'files.write' | 'files.delete' | 'files.openExternal' | 'workbench.open' | 'storage.namespace' | 'storage.migrations' | 'events.publish' | 'events.subscribe' | 'ui.register' | 'commands.register' | 'network.local' | 'network.remote' | 'process.spawn' | 'secrets.read' | 'secrets.write' | 'sync.participate' | 'browser.receiver.manage';
|
export type Permission = 'vault.read' | 'vault.write' | 'vault.watch' | 'files.read' | 'files.write' | 'files.delete' | 'files.openExternal' | 'workbench.open' | 'storage.namespace' | 'storage.migrations' | 'events.publish' | 'events.subscribe' | 'ui.register' | 'commands.register' | 'network.local' | 'network.remote' | 'process.spawn' | 'secrets.read' | 'secrets.write' | 'sync.participate' | 'browser.receiver.manage' | 'notifications.schedule';
|
||||||
export interface PermissionEntry {
|
export interface PermissionEntry {
|
||||||
name: Permission;
|
name: Permission;
|
||||||
description: string;
|
description: string;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -126,7 +126,8 @@
|
||||||
"secrets.read",
|
"secrets.read",
|
||||||
"secrets.write",
|
"secrets.write",
|
||||||
"sync.participate",
|
"sync.participate",
|
||||||
"browser.receiver.manage"
|
"browser.receiver.manage",
|
||||||
|
"notifications.schedule"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"minItems": 1
|
"minItems": 1
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
{ "name": "secrets.read", "description": "Read secrets from the secret store", "dangerous": true },
|
{ "name": "secrets.read", "description": "Read secrets from the secret store", "dangerous": true },
|
||||||
{ "name": "secrets.write", "description": "Write secrets to the secret store", "dangerous": true },
|
{ "name": "secrets.write", "description": "Write secrets to the secret store", "dangerous": true },
|
||||||
{ "name": "sync.participate", "description": "Participate in vault sync", "dangerous": true },
|
{ "name": "sync.participate", "description": "Participate in vault sync", "dangerous": true },
|
||||||
{ "name": "browser.receiver.manage", "description": "View and rotate the local browser receiver pairing token", "dangerous": true }
|
{ "name": "browser.receiver.manage", "description": "View and rotate the local browser receiver pairing token", "dangerous": true },
|
||||||
|
{ "name": "notifications.schedule", "description": "Replace the plugin's scheduled native notifications", "dangerous": false }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,9 @@ describe('VerstakPluginAPI contract', () => {
|
||||||
const permissionEnum = ((manifestSchema as any).properties.permissions.items.enum || []) as string[];
|
const permissionEnum = ((manifestSchema as any).properties.permissions.items.enum || []) as string[];
|
||||||
|
|
||||||
expect(permissions).toContainEqual(expect.objectContaining({ name: 'browser.receiver.manage', dangerous: true }));
|
expect(permissions).toContainEqual(expect.objectContaining({ name: 'browser.receiver.manage', dangerous: true }));
|
||||||
|
expect(permissions).toContainEqual(expect.objectContaining({ name: 'notifications.schedule', dangerous: false }));
|
||||||
expect(permissionEnum).toContain('browser.receiver.manage');
|
expect(permissionEnum).toContain('browser.receiver.manage');
|
||||||
|
expect(permissionEnum).toContain('notifications.schedule');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('file.changed schema documents watcher refresh payload', () => {
|
test('file.changed schema documents watcher refresh payload', () => {
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@ export type Permission =
|
||||||
| 'secrets.read'
|
| 'secrets.read'
|
||||||
| 'secrets.write'
|
| 'secrets.write'
|
||||||
| 'sync.participate'
|
| 'sync.participate'
|
||||||
| 'browser.receiver.manage';
|
| 'browser.receiver.manage'
|
||||||
|
| 'notifications.schedule';
|
||||||
|
|
||||||
export interface PermissionEntry {
|
export interface PermissionEntry {
|
||||||
name: Permission;
|
name: Permission;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue