class InnerRange::Integriti
- InnerRange::Integriti
- PlaceOS::Driver
- Reference
- Object
Included Modules
- PlaceOS::Driver::Interface::DoorSecurity
- PlaceOS::Driver::Interface::GuestBuildingAccess
Defined in:
inner_range/integriti.crinner_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"} of String => String
Class Method Summary
Macro Summary
Instance Method Summary
- #add_entry(type : String, fields : UpdateFields, return_object : Bool = false)
-
#add_or_update(payload : String, return_object : Bool = false)
This is the only way to add or update a database entry...
- #add_to_collection(type : String, id : String, property_name : String, payload : String)
-
#api_version : String
http://20.213.104.2:80/restapi/ApiVersion/v2 - #area(id : Int64 | String)
-
#areas(site_id : Int32 | Nil = nil)
roughly zones in a building
- #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)
- #build_filter(filter : Filter) : String
- #card(id : String)
- #card_templates(site_id : Int32 | Nil = nil)
- #cards(site_id : Int32 | Nil = nil, user_id : String | Nil = nil, template : String | Nil = nil, number : String | Nil = nil)
- #cf_email : String
- #cf_origo : String
- #cf_phone : String
- #cf_virtual_card : String
- #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
- #create_user(name : String, email : String, phone : String | Nil = nil, site_id : String | Int64 | Nil = nil) : String
- #default_partition_id : Int32
- #default_site_id : Int32
- #default_unlock_time : Int32
- #delete_permission(user_id : String, permission_id : String)
- #door(id : Int64 | String)
- #door_list : Array(Door)
-
#doors(site_id : Int32 | Nil = nil)
doors on a site
- #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
-
#grant_guest_access(name : String, email : String, starting : Int64, ending : Int64) : AccessDetails
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
-
#guest_access_configured? : Bool
return true if we can grant guest access
- #guest_access_group : String
- #guest_card_template : String
- #has_virtual_card? : Bool
- #managed_users_in_group(group_address : String) : Hash(String, String)
- #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)
- #on_load
- #on_update
- #partition(id : Int64 | String)
-
#partitions(parent_id : Int32 | Nil = nil)
doors on a site
- #permission_group(id : Int64 | String)
- #permission_groups(site_id : Int32 | Nil = nil) : Array(PermissionGroup)
- #remove_from_collection(type : String, id : String, property_name : String, payload : String)
- #remove_virtual_card : Nil
- #request_virtual_card : Nil
-
#revoke_guest_access(details : JSON::Any)
delete the permission from user
-
#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
-
#set_user_primary_permission_group(user_id : String, permission_group_id : String | Nil)
sets or unsets the Permission Group
- #site(id : Int64 | String)
-
#sites : Array(Site)
roughly analogous to buildings
- #system_info
- #template(address : String)
-
#unlock(door_id : String) : Bool | Nil
true for success, false for failed, nil for not supported
-
#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})
- #user(id : Int64 | String)
- #user_id_lookup(email : String) : Array(String)
- #user_permissions(user_id : String | Nil = nil, group_id : String | Nil = nil, externally_managed : Bool | Nil = nil) : Array(UserPermission)
-
#users(site_id : Int32 | Nil = nil, email : String | Nil = nil)
users in a site
Class Method Detail
Macro Detail
Instance Method Detail
This is the only way to add or update a database entry...
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
return true if we can grant guest access
sets or unsets the user associated with this card
sets or unsets the Permission Group
true for success, false for failed, nil for not supported
use this to update fields in various models, like: update_entry(type: "User", id: "U5", fields: {cf_HasMobileCredential: true})