class InnerRange::Integriti

Included Modules

Defined in:

inner_range/integriti.cr
inner_range/integriti_hid_virtual_pass.cr

Constant Summary

PERMISSION_REGEX = /ID\:\s+(?<id>[a-f0-9\-]+)\s+added/
PROPS = {"SystemInfo" => "ProductEdition,ProductVersion,ProtocolVersion", "RemoveResult" => "NumberOfItemsRemoved,Message", "AddResult" => "NumberOfItemsAdded,Message", "AddOrUpdateResult" => "ID,Address,Message", "PermissionGroup" => "attr_PartitionID,SiteName,SiteID,ID,Name,Address", "SiteKeyword" => "ID,Name,PartitionID", "Area" => "ID,Name,Site", "Partition" => "ID,Name,ParentId,PartitionId,ShortName", "User" => "ID,Name,SiteID,SiteName,Address,attr_PartitionID,cf_origo,cf_phone,cf_email,PrimaryPermissionGroup", "FullUser" => "ID,Name,Site,Address,attr_PartitionID,cf_origo,cf_phone,cf_email,PrimaryPermissionGroup", "UserPermission" => "ID,What,ManagedByActiveDirectory,User,Deny,Expired", "CardFormat" => "ID,Name,SiteID,SiteName,Notes,Address,Site", "CardTemplate" => "ID,Name,SiteID,SiteName,Notes,Address,SiteCodeNumber,Site,Format", "Card" => "ID,Name,CardNumberNumeric,CardNumber,CardData,CardSerialNumber,IssueNumber,State,ExpiryDateTime,StartDateTime,LastUsed,CloudCredentialId,CloudCredentialType,CloudCredentialPoolId,CloudCredentialInvitationId,CloudCredentialInvitationCode,CloudCredentialCommunicationHandler,ManagedByActiveDirectory,Site,User,CardType", "Door" => "ID,Name,Site", "Review" => "ID,Text,UTCTimeGenerated,Type,Transition"} of String => String
TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%9N"

Class Method Summary

Macro Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Macro Detail

macro check(response) #

[View source]
macro define_xml_type(klass, keys, lookup = nil, &block) #

[View source]

Instance Method Detail

def add_entry(type : String, fields : UpdateFields, return_object : Bool = false) #

[View source]
def add_or_update(payload : String, return_object : Bool = false) #

This is the only way to add or update a database entry...


[View source]
def add_to_collection(type : String, id : String, property_name : String, payload : String) #

[View source]
def api_version : String #

http://20.213.104.2:80/restapi/ApiVersion/v2


[View source]
def area(id : Int64 | String) #

[View source]
def areas(site_id : Int32 | Nil = nil) #

roughly zones in a building


[View source]
def assign_card_to_user(user_id : String, card_template : String, card_number : String, partition_id : Int32 | Nil = nil, site_id : Int32 | Nil = nil, externally_managed : Bool = true) #

[View source]
def build_filter(filter : Filter) : String #

[View source]
def card(id : String) #

[View source]
def card_templates(site_id : Int32 | Nil = nil) #

[View source]
def cards(site_id : Int32 | Nil = nil, user_id : String | Nil = nil, template : String | Nil = nil, number : String | Nil = nil) #

[View source]
def cf_email : String #

[View source]
def cf_origo : String #

[View source]
def cf_phone : String #

[View source]
def cf_virtual_card : String #

[View source]
def create_card(card_number : String | Int64, user_id : String | Nil = nil, partition_id : String | Int32 | Nil = nil, site_id : String | Int64 | Nil = nil, card_template : String | Nil = nil, externally_managed : Bool | Nil = nil) : String #

[View source]
def create_user(name : String, email : String, phone : String | Nil = nil, site_id : String | Int64 | Nil = nil) : String #

[View source]
def default_partition_id : Int32 #

[View source]
def default_site_id : Int32 #

[View source]
def default_unlock_time : Int32 #

[View source]
def delete_permission(user_id : String, permission_id : String) #

[View source]
def door(id : Int64 | String) #

[View source]
def door_list : Array(Door) #

[View source]
def doors(site_id : Int32 | Nil = nil) #

doors on a site


[View source]
def grant_access(name : String, email : String, group_id : String, starting : Int64 | Nil = nil, ending : Int64 | Nil = nil, partition_id : Int32 | Nil = nil, site_id : Int32 | Nil = nil, externally_managed : Bool = true) : AccessDetails #

[View source]
def grant_guest_access(name : String, email : String, starting : Int64, ending : Int64) : AccessDetails #
Description copied from module PlaceOS::Driver::Interface::GuestBuildingAccess

a function for granting guests access to a building should return a payload that can be encoded into a QR code the response is expected to be hexstring


[View source]
def guest_access_configured? : Bool #
Description copied from module PlaceOS::Driver::Interface::GuestBuildingAccess

return true if we can grant guest access


[View source]
def guest_access_group : String #

[View source]
def guest_card_template : String #

[View source]
def has_virtual_card? : Bool #

[View source]
def long_poll_seconds : Int32 #

[View source]
def managed_users_in_group(group_address : String) : Hash(String, String) #

[View source]
def modify_user_permissions(user_id : String, group_id : String, partition_id : String | Int32 | Nil = nil, add : Bool = true, externally_managed : Bool = true, expires_at : Int64 | Nil = nil, valid_from : Int64 | Nil = nil) #

[View source]
def on_update #

[View source]
def partition(id : Int64 | String) #

[View source]
def partitions(parent_id : Int32 | Nil = nil) #

doors on a site


[View source]
def permission_group(id : Int64 | String) #

[View source]
def permission_groups(site_id : Int32 | Nil = nil) : Array(PermissionGroup) #

[View source]
def remove_from_collection(type : String, id : String, property_name : String, payload : String) #

[View source]
def remove_virtual_card : Nil #

[View source]
def request_virtual_card : Nil #

[View source]
def review_access(filter : Filter, long_poll : Bool = false, after : String | Int64 | Time | Nil = nil, page_limit : Int64 | Nil = nil) : Array(Review) #

[View source]
def review_predefined_access(query_id : String | Int64, long_poll : Bool = false, after : String | Int64 | Time | Nil = nil, page_limit : Int64 | Nil = nil) : Array(Review) #

[View source]
def revoke_guest_access(details : JSON::Any) #

delete the permission from user


[View source]
def set_card_user(card_id : String, user_id : String | Nil, partition_id : String | Int32 | Nil = nil) #

sets or unsets the user associated with this card


[View source]
def set_user_primary_permission_group(user_id : String, permission_group_id : String | Nil) #

sets or unsets the Permission Group


[View source]
def site(id : Int64 | String) #

[View source]
def sites : Array(Site) #

roughly analogous to buildings


[View source]
def system_info #

[View source]
def template(address : String) #

[View source]
def unlock(door_id : String) : Bool | Nil #
Description copied from module PlaceOS::Driver::Interface::DoorSecurity

true for success, false for failed, nil for not supported


[View source]
def update_entry(type : String, id : String, fields : UpdateFields, attribute : String = "Address", return_object : Bool = false) #

use this to update fields in various models, like: update_entry(type: "User", id: "U5", fields: {cf_HasMobileCredential: true})


[View source]
def user(id : Int64 | String) #

[View source]
def user_id_lookup(email : String) : Array(String) #

[View source]
def user_permissions(user_id : String | Nil = nil, group_id : String | Nil = nil, externally_managed : Bool | Nil = nil) : Array(UserPermission) #

[View source]
def users(site_id : Int32 | Nil = nil, email : String | Nil = nil) #

users in a site


[View source]