@antiraid-core/kittycat
API reference for @antiraid-core/kittycat
@antiraid-core/kittycat
Types
Permission
!nocheck
Permission type
Raw Type
--!nocheck
--- Permission type
type Permission = {
--- Namespace of the permission
namespace: string,
--- Permission of the permission
perm: string,
--- Whether the permission is negated
negator: boolean
}
Prop | Type | Description |
---|---|---|
namespace | Namespace of the permission | |
perm | Permission of the permission | |
negator | Whether the permission is negated |
PartialStaffPosition
PartialStaffPosition type
Raw Type
--- PartialStaffPosition type
type PartialStaffPosition = {
id: string,
index: number,
perms: {Permission}
}
Prop | Type | Description |
---|---|---|
id | - | |
index | - | |
perms | - |
StaffPermissions
StaffPermissions type
Raw Type
--- StaffPermissions type
type StaffPermissions = {
user_positions: {PartialStaffPosition},
perm_overrides: {Permission},
resolve: (self: StaffPermissions) -> {Permission}
}
Prop | Type | Description |
---|---|---|
resolve | - | |
user_positions | - | |
perm_overrides | - |
CheckPatchChangesError
Error types
Raw Type
-- Error types
type CheckPatchChangesError = {
type: "NoPermission",
permission: Permission
} | {
type: "LacksNegatorForWildcard",
wildcard: Permission,
negator: Permission
}
Union with variants:
Variant 1
Prop | Type | Description |
---|---|---|
type | 'NoPermission' | - |
permission | - |
Variant 2
Prop | Type | Description |
---|---|---|
type | 'LacksNegatorForWildcard' | - |
wildcard | - | |
negator | - |
Functions
Permission.new
Permission implementation
Function Signature
-- Permission implementation
function Permission.new(namespace: string, perm: string, negator: boolean) -> Permission end
Arguments
namespace
perm
negator
Returns
ret1
Permission.from_string
Function Signature
function Permission.from_string(perm_str) end
Arguments
perm_str
No type specified!!!
Permission.from_tab
Function Signature
function Permission.from_tab(perm: Permission) end
Arguments
perm
Permission.__tostring
Function Signature
function Permission.__tostring(self: Permission) end
PartialStaffPosition.new
PartialStaffPosition implementation
Function Signature
-- PartialStaffPosition implementation
function PartialStaffPosition.new(id: string, index: number, perms: {Permission}) -> PartialStaffPosition end
Arguments
id
index
perms
Returns
ret1
StaffPermissions.new
StaffPermissions implementation
Function Signature
-- StaffPermissions implementation
function StaffPermissions.new(user_positions: {PartialStaffPosition}, perm_overrides: {Permission}) -> StaffPermissions end
Arguments
user_positions
perm_overrides
Returns
ret1
OrderedStrNumTable.new
Function Signature
function OrderedStrNumTable.new() end
OrderedStrNumTable.get
Function Signature
function OrderedStrNumTable.get(self: OrderedStrNumTable, key: string) end
Arguments
key
OrderedStrNumTable.insert
Function Signature
function OrderedStrNumTable.insert(self: OrderedStrNumTable, key: string, value: number) end
Arguments
key
value
OrderedStrNumTable.remove
Function Signature
function OrderedStrNumTable.remove(self: OrderedStrNumTable, key: string) end
Arguments
key
OrderedStrNumTable.iterByInsertionOrder
Function Signature
function OrderedStrNumTable.iterByInsertionOrder(self: OrderedStrNumTable) end
OrderedStrNumTable.clear
Function Signature
function OrderedStrNumTable.clear(self: OrderedStrNumTable) end
StaffPermissions.resolve
Function Signature
function StaffPermissions.resolve(self: StaffPermissions) end
has_perm
Helper functions
Function Signature
-- Helper functions
function has_perm(perms: {Permission}, perm: Permission) end
Arguments
perms
perm
has_perm_str
Function Signature
function has_perm_str(perms: {string}, perm_str: string) end
Arguments
perms
{string}
perm_str
cpce_to_string
Function Signature
function cpce_to_string(err: CheckPatchChangesError?) -> string end
Arguments
err
This field is optional and may not be specified
Returns
ret1
check_patch_changes
Function Signature
function check_patch_changes(manager_perms: {Permission}, current_perms: {Permission}, new_perms: {Permission}) -> (boolean, CheckPatchChangesError?) end
Arguments
manager_perms
current_perms
new_perms
Returns
ret1
ret2
This field is optional and may not be specified
check_patch_changes_str
Function Signature
function check_patch_changes_str(manager_perms: {string}, current_perms: {string}, new_perms: {string}) end
Arguments
manager_perms
{string}
current_perms
{string}
new_perms
{string}
test
Test
Function Signature
-- Test
function test() end
Last updated on