ciam-commons
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,2 @@ | ||
/// <reference types="screeps" /> | ||
export declare namespace Check { | ||
@@ -36,2 +37,23 @@ const objectIdRegex: RegExp; | ||
} | ||
interface CheckRequest { | ||
type: 'user' | 'role' | 'discordUser'; | ||
id: string; | ||
required: Array<string>; | ||
/** | ||
* Any additional permissions to give the subject while checking. | ||
* For example: If we specify ['*'] as additional permissions then all checks will always pass, | ||
* even if the subject does not have the required permissions. Because when they are checked, | ||
* the '*' flag is temporarily added to the subjects permissions. | ||
*/ | ||
additional: Array<string>; | ||
includeMissing: boolean; | ||
} | ||
interface CheckResult { | ||
passed: boolean; | ||
/** | ||
* If the user did not have any missing permissions, and the 'includeMissing' field was set to true in | ||
* the request then this field will have all the permissions the subject was missing, otherwise undefined/null | ||
*/ | ||
missing: Array<Flag> | undefined; | ||
} | ||
} |
{ | ||
"name": "ciam-commons", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Common types and functions for CIAM", | ||
@@ -5,0 +5,0 @@ "scripts": { |
7337
167