doorflow 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +222 -316
- data/bin/post-generate +3 -1
- data/doorflow.gemspec +1 -1
- data/lib/doorflow-api/api/accounts_api.rb +1 -1
- data/lib/doorflow-api/api/admission_requests_api.rb +2 -2
- data/lib/doorflow-api/api/card_designs_api.rb +347 -0
- data/lib/doorflow-api/api/card_template_types_api.rb +350 -0
- data/lib/doorflow-api/api/card_templates_api.rb +811 -0
- data/lib/doorflow-api/api/channels_api.rb +11 -11
- data/lib/doorflow-api/api/credential_types_api.rb +1 -1
- data/lib/doorflow-api/api/credentials_api.rb +6 -6
- data/lib/doorflow-api/api/element_sessions_api.rb +90 -0
- data/lib/doorflow-api/api/events_api.rb +2 -2
- data/lib/doorflow-api/api/group_reservations_api.rb +68 -5
- data/lib/doorflow-api/api/groups_api.rb +1 -1
- data/lib/doorflow-api/api/notification_rules_api.rb +7 -7
- data/lib/doorflow-api/api/oauth_api.rb +1 -1
- data/lib/doorflow-api/api/people_api.rb +7 -7
- data/lib/doorflow-api/api/reservations_api.rb +5 -5
- data/lib/doorflow-api/api/roles_api.rb +1 -1
- data/lib/doorflow-api/api/sites_api.rb +1 -1
- data/lib/doorflow-api/api/sync_api.rb +4 -4
- data/lib/doorflow-api/api_client.rb +8 -4
- data/lib/doorflow-api/api_error.rb +9 -14
- data/lib/doorflow-api/api_model_base.rb +1 -1
- data/lib/doorflow-api/configuration.rb +1 -1
- data/lib/doorflow-api/models/account.rb +1 -1
- data/lib/doorflow-api/models/account_passport.rb +1 -1
- data/lib/doorflow-api/models/account_reseller.rb +1 -1
- data/lib/doorflow-api/models/account_sync.rb +1 -1
- data/lib/doorflow-api/models/account_user.rb +1 -1
- data/lib/doorflow-api/models/admission_request.rb +1 -1
- data/lib/doorflow-api/models/admission_request_door_controller.rb +1 -1
- data/lib/doorflow-api/models/admission_request_person.rb +1 -1
- data/lib/doorflow-api/models/admit_channel202_response.rb +1 -1
- data/lib/doorflow-api/models/admit_person202_response.rb +1 -1
- data/lib/doorflow-api/models/admit_person403_response.rb +1 -1
- data/lib/doorflow-api/models/admit_person_request.rb +1 -1
- data/lib/doorflow-api/models/auto_unlock_channel400_response.rb +1 -1
- data/lib/doorflow-api/models/auto_unlock_channel_request.rb +1 -1
- data/lib/doorflow-api/models/card_design.rb +243 -0
- data/lib/doorflow-api/models/card_design_image_back.rb +179 -0
- data/lib/doorflow-api/models/card_design_image_front.rb +179 -0
- data/lib/doorflow-api/models/card_design_input.rb +181 -0
- data/lib/doorflow-api/models/card_template.rb +475 -0
- data/lib/doorflow-api/models/card_template_input.rb +147 -0
- data/lib/doorflow-api/models/card_template_input_card_template.rb +347 -0
- data/lib/doorflow-api/models/card_template_type.rb +321 -0
- data/lib/doorflow-api/models/card_template_type_input.rb +147 -0
- data/lib/doorflow-api/models/card_template_type_input_card_template_type.rb +251 -0
- data/lib/doorflow-api/models/card_template_type_input_card_template_type_non_printable_zones_inner.rb +183 -0
- data/lib/doorflow-api/models/card_template_type_non_printable_zones_inner.rb +188 -0
- data/lib/doorflow-api/models/channel.rb +1 -1
- data/lib/doorflow-api/models/channel_auto_unlock.rb +1 -1
- data/lib/doorflow-api/models/channel_lockdown.rb +1 -1
- data/lib/doorflow-api/models/channel_lockdown_aux_lockdown.rb +1 -1
- data/lib/doorflow-api/models/channel_lockdown_card_lockdown.rb +1 -1
- data/lib/doorflow-api/models/channel_lockdown_rex_lockdown.rb +1 -1
- data/lib/doorflow-api/models/channel_mode.rb +1 -1
- data/lib/doorflow-api/models/channel_sync.rb +5 -2
- data/lib/doorflow-api/models/{create_credential422_response.rb → create_card_design422_response.rb} +5 -5
- data/lib/doorflow-api/models/{create_credential422_response_errors.rb → create_card_design422_response_errors.rb} +4 -4
- data/lib/doorflow-api/models/credential.rb +4 -4
- data/lib/doorflow-api/models/credential_input.rb +1 -1
- data/lib/doorflow-api/models/credential_input_person_credential.rb +1 -1
- data/lib/doorflow-api/models/credential_type.rb +1 -1
- data/lib/doorflow-api/models/credential_update_input.rb +1 -1
- data/lib/doorflow-api/models/credential_update_input_person_credential.rb +1 -1
- data/lib/doorflow-api/models/{delete_group_reservation200_response.rb → delete_card_design200_response.rb} +4 -4
- data/lib/doorflow-api/models/delete_card_template_type409_response.rb +147 -0
- data/lib/doorflow-api/models/element_session.rb +192 -0
- data/lib/doorflow-api/models/element_session_config.rb +265 -0
- data/lib/doorflow-api/models/element_session_error.rb +199 -0
- data/lib/doorflow-api/models/element_session_input.rb +271 -0
- data/lib/doorflow-api/models/element_session_member.rb +186 -0
- data/lib/doorflow-api/models/error.rb +1 -1
- data/lib/doorflow-api/models/event.rb +1 -1
- data/lib/doorflow-api/models/get_access_token200_response.rb +1 -1
- data/lib/doorflow-api/models/get_access_token400_response.rb +1 -1
- data/lib/doorflow-api/models/get_access_token401_response.rb +1 -1
- data/lib/doorflow-api/models/get_admission_request401_response.rb +1 -1
- data/lib/doorflow-api/models/get_admission_request403_response.rb +1 -1
- data/lib/doorflow-api/models/get_admission_request404_response.rb +1 -1
- data/lib/doorflow-api/models/get_admission_request500_response.rb +1 -1
- data/lib/doorflow-api/models/get_token_info200_response.rb +1 -1
- data/lib/doorflow-api/models/get_token_info200_response_application.rb +1 -1
- data/lib/doorflow-api/models/get_token_info401_response.rb +1 -1
- data/lib/doorflow-api/models/group.rb +1 -1
- data/lib/doorflow-api/models/group_reservation.rb +1 -1
- data/lib/doorflow-api/models/group_reservation_input.rb +1 -1
- data/lib/doorflow-api/models/group_reservation_input_group_reservation.rb +1 -1
- data/lib/doorflow-api/models/initiate_sync429_response.rb +1 -1
- data/lib/doorflow-api/models/linked_file.rb +217 -0
- data/lib/doorflow-api/models/list_events400_response.rb +1 -1
- data/lib/doorflow-api/models/lockdown_channel_request.rb +1 -1
- data/lib/doorflow-api/models/notification_rule.rb +1 -1
- data/lib/doorflow-api/models/notification_rule_actions_inner.rb +1 -1
- data/lib/doorflow-api/models/notification_rule_conditions_inner.rb +1 -1
- data/lib/doorflow-api/models/notification_rule_events_inner.rb +1 -1
- data/lib/doorflow-api/models/notification_rule_input.rb +1 -1
- data/lib/doorflow-api/models/person.rb +30 -8
- data/lib/doorflow-api/models/person_input.rb +1 -1
- data/lib/doorflow-api/models/reservation.rb +1 -1
- data/lib/doorflow-api/models/reservation_input.rb +1 -1
- data/lib/doorflow-api/models/revoke_token403_response.rb +1 -1
- data/lib/doorflow-api/models/role.rb +1 -1
- data/lib/doorflow-api/models/site.rb +1 -1
- data/lib/doorflow-api/models/site_site_ips_inner.rb +1 -1
- data/lib/doorflow-api/models/unlock_channel_request.rb +1 -1
- data/lib/doorflow-api/version.rb +2 -2
- data/lib/doorflow-api.rb +28 -9
- data/lib/doorflow.rb +7 -2
- metadata +43 -164
- data/spec/api/admission_requests_api_spec.rb +0 -47
- data/spec/api/channels_api_spec.rb +0 -174
- data/spec/api/credential_types_api_spec.rb +0 -49
- data/spec/api/group_reservations_api_spec.rb +0 -75
- data/spec/api/oauth_api_spec.rb +0 -97
- data/spec/doorflow/client_spec.rb +0 -109
- data/spec/doorflow/webhooks/event_spec.rb +0 -117
- data/spec/doorflow/webhooks/handler_spec.rb +0 -154
- data/spec/doorflow/webhooks/signature_verifier_spec.rb +0 -210
- data/spec/doorflow/webhooks/support.rb +0 -18
- data/spec/doorflow_spec.rb +0 -22
- data/spec/fixtures/vcr_cassettes/channel/list.yml +0 -70
- data/spec/fixtures/vcr_cassettes/channel/retrieve.yml +0 -131
- data/spec/fixtures/vcr_cassettes/person/auto_pagination.yml +0 -87
- data/spec/fixtures/vcr_cassettes/person/create.yml +0 -64
- data/spec/fixtures/vcr_cassettes/person/delete.yml +0 -125
- data/spec/fixtures/vcr_cassettes/person/list.yml +0 -90
- data/spec/fixtures/vcr_cassettes/person/not_found.yml +0 -62
- data/spec/fixtures/vcr_cassettes/person/retrieve.yml +0 -136
- data/spec/fixtures/vcr_cassettes/person/update.yml +0 -260
- data/spec/fixtures/vcr_cassettes/person/validation_error.yml +0 -62
- data/spec/integration/channel_spec.rb +0 -88
- data/spec/integration/person_spec.rb +0 -99
- data/spec/models/account_passport_spec.rb +0 -42
- data/spec/models/account_reseller_spec.rb +0 -60
- data/spec/models/account_sync_spec.rb +0 -52
- data/spec/models/account_user_spec.rb +0 -54
- data/spec/models/admission_request_door_controller_spec.rb +0 -42
- data/spec/models/admission_request_person_spec.rb +0 -42
- data/spec/models/admission_request_spec.rb +0 -82
- data/spec/models/admit_channel202_response_spec.rb +0 -46
- data/spec/models/admit_person202_response_spec.rb +0 -46
- data/spec/models/admit_person403_response_spec.rb +0 -42
- data/spec/models/admit_person_request_spec.rb +0 -36
- data/spec/models/auto_unlock_channel400_response_spec.rb +0 -42
- data/spec/models/auto_unlock_channel_request_spec.rb +0 -36
- data/spec/models/channel_auto_unlock_spec.rb +0 -42
- data/spec/models/channel_lockdown_aux_lockdown_spec.rb +0 -36
- data/spec/models/channel_lockdown_card_lockdown_spec.rb +0 -36
- data/spec/models/channel_lockdown_rex_lockdown_spec.rb +0 -36
- data/spec/models/channel_lockdown_spec.rb +0 -54
- data/spec/models/channel_mode_spec.rb +0 -52
- data/spec/models/channel_sync_spec.rb +0 -46
- data/spec/models/create_credential422_response_errors_spec.rb +0 -48
- data/spec/models/create_credential422_response_spec.rb +0 -42
- data/spec/models/credential_input_person_credential_spec.rb +0 -48
- data/spec/models/credential_input_spec.rb +0 -36
- data/spec/models/credential_spec.rb +0 -86
- data/spec/models/credential_update_input_person_credential_spec.rb +0 -36
- data/spec/models/credential_update_input_spec.rb +0 -36
- data/spec/models/delete_group_reservation200_response_spec.rb +0 -36
- data/spec/models/error_spec.rb +0 -42
- data/spec/models/get_access_token200_response_spec.rb +0 -66
- data/spec/models/get_access_token400_response_spec.rb +0 -46
- data/spec/models/get_access_token401_response_spec.rb +0 -42
- data/spec/models/get_admission_request401_response_spec.rb +0 -42
- data/spec/models/get_admission_request403_response_spec.rb +0 -42
- data/spec/models/get_admission_request404_response_spec.rb +0 -42
- data/spec/models/get_admission_request500_response_spec.rb +0 -42
- data/spec/models/get_token_info200_response_application_spec.rb +0 -36
- data/spec/models/get_token_info200_response_spec.rb +0 -66
- data/spec/models/get_token_info401_response_spec.rb +0 -42
- data/spec/models/group_reservation_input_group_reservation_spec.rb +0 -54
- data/spec/models/group_reservation_input_spec.rb +0 -36
- data/spec/models/group_reservation_spec.rb +0 -82
- data/spec/models/initiate_sync429_response_spec.rb +0 -52
- data/spec/models/list_events400_response_spec.rb +0 -42
- data/spec/models/lockdown_channel_request_spec.rb +0 -48
- data/spec/models/notification_rule_actions_inner_spec.rb +0 -48
- data/spec/models/notification_rule_conditions_inner_spec.rb +0 -48
- data/spec/models/notification_rule_events_inner_spec.rb +0 -42
- data/spec/models/notification_rule_input_spec.rb +0 -60
- data/spec/models/person_input_spec.rb +0 -180
- data/spec/models/reservation_input_spec.rb +0 -60
- data/spec/models/revoke_token403_response_spec.rb +0 -42
- data/spec/models/site_site_ips_inner_spec.rb +0 -36
- data/spec/models/unlock_channel_request_spec.rb +0 -36
- data/spec/resources/credential_bugs_spec.rb +0 -115
- data/spec/spec_helper.rb +0 -160
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 998fa428f7fa2cbc86e02bc5e66e9c3e374ffbfbd86d0485d38c7d62076d286a
|
|
4
|
+
data.tar.gz: 65b27b95b93409a780ecbea5aa32dc4093d10de58b812683c739fb37ccc72dcb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 145ce4a6d8c974aff90445cc4a8cd998a8687d8c3eeee8dfc4da2a23569277ea59a88b0acbf06ca3ad207097c8dc7c5b93130978f863ce977db2323a490dcdf7
|
|
7
|
+
data.tar.gz: bd1287c579c430ed4f0078075ed40b43b8c30eada111f5c9a4f5524d4d0c69dc62907db7fbc76097f599cd4f0420610ac1fdd162146525091150f462a1d86481
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.0] - 2026-07-24
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `Credential#status` accepts `added_to_wallet` for PassFlow credentials added to a wallet, with `wallet_type` (`apple`/`google`) — previously raised `ArgumentError` during deserialisation
|
|
12
|
+
- Element session support: `client.admin_sessions` / `client.member_sessions` proxies and `ElementSessionResource`
|
|
13
|
+
- New endpoints from the current OpenAPI spec: card designs, card templates, element sessions, admission requests, notification rules, sync
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- `DoorFlow.api_base=` no longer drops an explicit port (e.g. `http://localhost:3000`)
|
|
17
|
+
- Gem is built as `doorflow` (matching the published gem name) rather than `doorflow-api`
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
- Stale models no longer produced by generation: `CreateCredential422Response`, `CreateCredential422ResponseErrors`, `DeleteGroupReservation200Response`
|
|
21
|
+
|
|
8
22
|
## [1.0.0] - 2025-02-04
|
|
9
23
|
|
|
10
24
|
### Added
|
data/README.md
CHANGED
|
@@ -1,356 +1,262 @@
|
|
|
1
|
-
#
|
|
1
|
+
# doorflow-api
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
applications written in Ruby.
|
|
3
|
+
DoorFlow - the Ruby gem for the DoorFlow API
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Access control and door management API for DoorFlow
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
- API version: 3.0
|
|
10
|
+
- Package version: 1.1.0
|
|
11
|
+
- Generator version: 7.24.0
|
|
12
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
|
+
For more information, please visit [https://doorflow.com](https://doorflow.com)
|
|
13
14
|
|
|
14
15
|
## Installation
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
gem install doorflow-api
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Or add to your Gemfile:
|
|
23
|
-
|
|
24
|
-
```ruby
|
|
25
|
-
gem 'doorflow-api'
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Usage
|
|
29
|
-
|
|
30
|
-
The gem uses OAuth 2.0 for authentication. You'll need to [create an OAuth application](https://developer.doorflow.com/applications)
|
|
31
|
-
in your DoorFlow developer account to get client credentials.
|
|
32
|
-
|
|
33
|
-
```ruby
|
|
34
|
-
require 'doorflow-api'
|
|
35
|
-
|
|
36
|
-
# Set up OAuth authentication
|
|
37
|
-
auth = DoorFlow::Auth::DoorFlowAuth.new(
|
|
38
|
-
client_id: ENV['DOORFLOW_CLIENT_ID'],
|
|
39
|
-
client_secret: ENV['DOORFLOW_CLIENT_SECRET'],
|
|
40
|
-
redirect_uri: 'http://localhost:3000/callback',
|
|
41
|
-
storage: DoorFlow::Auth::FileTokenStorage.new('./tokens.json')
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
# First run: redirect user to authorize
|
|
45
|
-
unless auth.authenticated?
|
|
46
|
-
url, state = auth.authorization_url
|
|
47
|
-
# Store state in session, redirect user to url
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# After callback: exchange code for tokens
|
|
51
|
-
auth.handle_callback(code: params[:code], state: params[:state], expected_state: session[:state])
|
|
52
|
-
|
|
53
|
-
# Create a client with your auth object
|
|
54
|
-
client = DoorFlow::Client.new(auth: auth)
|
|
55
|
-
|
|
56
|
-
# Now you can use the API
|
|
57
|
-
people = client.people.list
|
|
58
|
-
puts people.data.map { |p| p.email }
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### People
|
|
62
|
-
|
|
63
|
-
```ruby
|
|
64
|
-
# List all people
|
|
65
|
-
people = client.people.list
|
|
66
|
-
|
|
67
|
-
# With pagination
|
|
68
|
-
people = client.people.list(page: 1, per_page: 50)
|
|
17
|
+
### Build a gem
|
|
69
18
|
|
|
70
|
-
|
|
71
|
-
client.people.list.auto_paging_each do |person|
|
|
72
|
-
puts person.email
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
# Find by email
|
|
76
|
-
people = client.people.list(email: 'alice@example.com')
|
|
77
|
-
|
|
78
|
-
# Get a specific person
|
|
79
|
-
person = client.people.retrieve(123)
|
|
19
|
+
To build the Ruby code into a gem:
|
|
80
20
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
first_name: 'Alice',
|
|
84
|
-
last_name: 'Smith',
|
|
85
|
-
email: 'alice@example.com',
|
|
86
|
-
group_ids: [1, 2]
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
# Update a person
|
|
90
|
-
person.update(department: 'Engineering')
|
|
91
|
-
|
|
92
|
-
# Delete a person
|
|
93
|
-
person.delete
|
|
21
|
+
```shell
|
|
22
|
+
gem build doorflow-api.gemspec
|
|
94
23
|
```
|
|
95
24
|
|
|
96
|
-
|
|
25
|
+
Then either install the gem locally:
|
|
97
26
|
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
channels = client.channels.list
|
|
101
|
-
|
|
102
|
-
# Get a specific channel
|
|
103
|
-
channel = client.channels.retrieve(123)
|
|
104
|
-
|
|
105
|
-
# Unlock a door momentarily
|
|
106
|
-
channel.admit
|
|
107
|
-
|
|
108
|
-
# Unlock for a specific person
|
|
109
|
-
channel.admit_person(person_id)
|
|
27
|
+
```shell
|
|
28
|
+
gem install ./doorflow-1.1.0.gem
|
|
110
29
|
```
|
|
111
30
|
|
|
112
|
-
|
|
31
|
+
(for development, run `gem install --dev ./doorflow-1.1.0.gem` to install the development dependencies)
|
|
113
32
|
|
|
114
|
-
|
|
115
|
-
# List credential types available in your account
|
|
116
|
-
types = client.credential_types.list
|
|
33
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
117
34
|
|
|
118
|
-
|
|
119
|
-
credentials = client.credentials.list
|
|
35
|
+
Finally add this to the Gemfile:
|
|
120
36
|
|
|
121
|
-
|
|
122
|
-
credential = client.credentials.create(
|
|
123
|
-
person_id: 123,
|
|
124
|
-
credential_type_id: 1,
|
|
125
|
-
value: '12345678'
|
|
126
|
-
)
|
|
37
|
+
gem 'doorflow-api', '~> 1.1.0'
|
|
127
38
|
|
|
128
|
-
|
|
129
|
-
credential.delete
|
|
130
|
-
```
|
|
39
|
+
### Install from Git
|
|
131
40
|
|
|
132
|
-
|
|
41
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
|
133
42
|
|
|
134
|
-
|
|
135
|
-
# List all groups
|
|
136
|
-
groups = client.groups.list
|
|
137
|
-
```
|
|
43
|
+
gem 'doorflow-api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
|
138
44
|
|
|
139
|
-
###
|
|
45
|
+
### Include the Ruby code directly
|
|
140
46
|
|
|
141
|
-
|
|
142
|
-
# List recent access events
|
|
143
|
-
events = client.events.list(start_date: (Time.now - 86400).iso8601)
|
|
47
|
+
Include the Ruby code directly using `-I` as follows:
|
|
144
48
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
puts "#{event.person_name} at #{event.channel_name}"
|
|
148
|
-
end
|
|
49
|
+
```shell
|
|
50
|
+
ruby -Ilib script.rb
|
|
149
51
|
```
|
|
150
52
|
|
|
151
|
-
##
|
|
53
|
+
## Getting Started
|
|
152
54
|
|
|
153
|
-
|
|
55
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
154
56
|
|
|
155
57
|
```ruby
|
|
58
|
+
# Load the gem
|
|
156
59
|
require 'doorflow-api'
|
|
157
60
|
|
|
158
|
-
#
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
# 1. Generate authorization URL and redirect user
|
|
167
|
-
get '/auth/doorflow' do
|
|
168
|
-
url, state = auth.authorization_url
|
|
169
|
-
session[:oauth_state] = state
|
|
170
|
-
redirect url
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
# 2. Handle callback after user authorizes
|
|
174
|
-
get '/callback' do
|
|
175
|
-
auth.handle_callback(
|
|
176
|
-
code: params[:code],
|
|
177
|
-
state: params[:state],
|
|
178
|
-
expected_state: session[:oauth_state]
|
|
179
|
-
)
|
|
180
|
-
redirect '/dashboard'
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# 3. Use the API - tokens refresh automatically
|
|
184
|
-
get '/dashboard' do
|
|
185
|
-
client = DoorFlow::Client.new(auth: auth)
|
|
186
|
-
people = client.people.list
|
|
187
|
-
erb :dashboard, locals: { people: people }
|
|
188
|
-
end
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
## Configuration
|
|
192
|
-
|
|
193
|
-
| Option | Default | Description |
|
|
194
|
-
| ------ | ------- | ----------- |
|
|
195
|
-
| `client_id` | Required | Your DoorFlow OAuth client ID |
|
|
196
|
-
| `client_secret` | `nil` | Your OAuth client secret (optional for PKCE) |
|
|
197
|
-
| `redirect_uri` | Required | The redirect URI registered with your OAuth application |
|
|
198
|
-
| `storage` | Required | Token storage implementation |
|
|
199
|
-
| `scopes` | `['account.person', 'account.channel.readonly', 'account.event.access.readonly']` | OAuth scopes to request |
|
|
200
|
-
| `refresh_buffer_seconds` | `300` | Seconds before expiry to trigger automatic token refresh |
|
|
201
|
-
| `base_path` | `'https://api.doorflow.com'` | DoorFlow API base URL |
|
|
202
|
-
|
|
203
|
-
## Token Storage
|
|
204
|
-
|
|
205
|
-
The gem includes `FileTokenStorage` for simple file-based token persistence:
|
|
206
|
-
|
|
207
|
-
```ruby
|
|
208
|
-
storage = DoorFlow::Auth::FileTokenStorage.new('./tokens.json')
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
For production, subclass `DoorFlow::Auth::TokenStorage` to use your preferred storage:
|
|
212
|
-
|
|
213
|
-
```ruby
|
|
214
|
-
class DatabaseTokenStorage < DoorFlow::Auth::TokenStorage
|
|
215
|
-
def initialize(user)
|
|
216
|
-
@user = user
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
def load
|
|
220
|
-
return nil unless @user.doorflow_tokens
|
|
221
|
-
to_stored_tokens(@user.doorflow_tokens)
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
def save(tokens)
|
|
225
|
-
@user.update!(doorflow_tokens: tokens.to_h)
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
def clear
|
|
229
|
-
@user.update!(doorflow_tokens: nil)
|
|
230
|
-
end
|
|
231
|
-
end
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
## PKCE for Public Clients
|
|
235
|
-
|
|
236
|
-
For applications that cannot securely store a client secret:
|
|
237
|
-
|
|
238
|
-
```ruby
|
|
239
|
-
auth = DoorFlow::Auth::DoorFlowAuth.new(
|
|
240
|
-
client_id: ENV['DOORFLOW_CLIENT_ID'],
|
|
241
|
-
redirect_uri: 'http://localhost:3000/callback',
|
|
242
|
-
storage: storage
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
# Generate authorization URL with PKCE
|
|
246
|
-
url, state, code_verifier = auth.authorization_url(use_pkce: true)
|
|
247
|
-
|
|
248
|
-
# Store both state and code_verifier
|
|
249
|
-
session[:oauth_state] = state
|
|
250
|
-
session[:oauth_verifier] = code_verifier
|
|
251
|
-
|
|
252
|
-
# In callback handler
|
|
253
|
-
auth.handle_callback(
|
|
254
|
-
code: params[:code],
|
|
255
|
-
state: params[:state],
|
|
256
|
-
expected_state: session[:oauth_state],
|
|
257
|
-
code_verifier: session[:oauth_verifier]
|
|
258
|
-
)
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
## Webhooks
|
|
262
|
-
|
|
263
|
-
DoorFlow sends webhooks to notify your application of events:
|
|
264
|
-
|
|
265
|
-
```ruby
|
|
266
|
-
handler = DoorFlow::Webhooks.handler(secret: ENV['DOORFLOW_WEBHOOK_SECRET'])
|
|
267
|
-
|
|
268
|
-
handler.on('Event.CREATE') do |event|
|
|
269
|
-
puts "Access event: #{event.resource_id}"
|
|
270
|
-
end
|
|
271
|
-
|
|
272
|
-
handler.on('PersonCredential.UPDATE') do |event|
|
|
273
|
-
puts "Credential updated: #{event.resource_id}"
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
handler.on('*') do |event|
|
|
277
|
-
# Catch-all for any event type
|
|
278
|
-
AuditLog.create!(event_data: event.to_h)
|
|
61
|
+
# Setup authorization
|
|
62
|
+
DoorFlow.configure do |config|
|
|
63
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
|
64
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
|
65
|
+
# Configure a proc to get access tokens in lieu of the static access_token configuration
|
|
66
|
+
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
|
|
67
|
+
# Configure faraday connection
|
|
68
|
+
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
|
|
279
69
|
end
|
|
280
70
|
|
|
281
|
-
|
|
282
|
-
class WebhooksController < ApplicationController
|
|
283
|
-
skip_before_action :verify_authenticity_token
|
|
284
|
-
|
|
285
|
-
def create
|
|
286
|
-
handler.handle(
|
|
287
|
-
payload: request.raw_post,
|
|
288
|
-
signature: request.headers['Signature'],
|
|
289
|
-
timestamp: request.headers['Timestamp']
|
|
290
|
-
)
|
|
291
|
-
head :ok
|
|
292
|
-
rescue DoorFlow::Webhooks::SignatureError
|
|
293
|
-
head :unauthorized
|
|
294
|
-
end
|
|
295
|
-
end
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
### Event Patterns
|
|
71
|
+
api_instance = DoorFlow::AccountsApi.new
|
|
299
72
|
|
|
300
|
-
| Pattern | Description |
|
|
301
|
-
|---------|-------------|
|
|
302
|
-
| `Event.CREATE` | New access event |
|
|
303
|
-
| `Event.UPDATE` | Access event updated |
|
|
304
|
-
| `Event.DELETE` | Access event deleted |
|
|
305
|
-
| `PersonCredential.CREATE` | New credential added |
|
|
306
|
-
| `PersonCredential.UPDATE` | Credential updated |
|
|
307
|
-
| `PersonCredential.DELETE` | Credential deleted |
|
|
308
|
-
| `Person.*` | Any person action |
|
|
309
|
-
| `*` | Catch-all |
|
|
310
|
-
|
|
311
|
-
## Error Handling
|
|
312
|
-
|
|
313
|
-
```ruby
|
|
314
73
|
begin
|
|
315
|
-
|
|
74
|
+
#Get current account details
|
|
75
|
+
result = api_instance.get_account
|
|
76
|
+
p result
|
|
316
77
|
rescue DoorFlow::ApiError => e
|
|
317
|
-
puts "
|
|
318
|
-
puts "Status: #{e.code}"
|
|
319
|
-
end
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
## Thread Safety & Multi-Tenant Support
|
|
323
|
-
|
|
324
|
-
The `DoorFlow::Client` class is designed for thread safety and multi-tenant applications. Each client instance maintains its own configuration and authentication state:
|
|
325
|
-
|
|
326
|
-
```ruby
|
|
327
|
-
# Each tenant gets their own client instance
|
|
328
|
-
def doorflow_client
|
|
329
|
-
@doorflow_client ||= DoorFlow::Client.new(auth: current_tenant_auth)
|
|
78
|
+
puts "Exception when calling AccountsApi->get_account: #{e}"
|
|
330
79
|
end
|
|
331
80
|
|
|
332
|
-
# Or pass auth to each request
|
|
333
|
-
client = DoorFlow::Client.new(auth: current_user.doorflow_auth)
|
|
334
|
-
people = client.people.list
|
|
335
81
|
```
|
|
336
82
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
#
|
|
344
|
-
DoorFlow.
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
83
|
+
## Documentation for API Endpoints
|
|
84
|
+
|
|
85
|
+
All URIs are relative to *https://api.doorflow.com*
|
|
86
|
+
|
|
87
|
+
Class | Method | HTTP request | Description
|
|
88
|
+
------------ | ------------- | ------------- | -------------
|
|
89
|
+
*DoorFlow::AccountsApi* | [**get_account**](docs/AccountsApi.md#get_account) | **GET** /api/3/account | Get current account details
|
|
90
|
+
*DoorFlow::AdmissionRequestsApi* | [**get_admission_request**](docs/AdmissionRequestsApi.md#get_admission_request) | **GET** /api/3/admission_requests/{id} | Get admission request status
|
|
91
|
+
*DoorFlow::CardDesignsApi* | [**create_card_design**](docs/CardDesignsApi.md#create_card_design) | **POST** /api/3/card_designs | Create card design
|
|
92
|
+
*DoorFlow::CardDesignsApi* | [**delete_card_design**](docs/CardDesignsApi.md#delete_card_design) | **DELETE** /api/3/card_designs/{id} | Delete card design
|
|
93
|
+
*DoorFlow::CardDesignsApi* | [**get_card_design**](docs/CardDesignsApi.md#get_card_design) | **GET** /api/3/card_designs/{id} | Get card design
|
|
94
|
+
*DoorFlow::CardDesignsApi* | [**list_card_designs**](docs/CardDesignsApi.md#list_card_designs) | **GET** /api/3/card_designs | List card designs
|
|
95
|
+
*DoorFlow::CardDesignsApi* | [**update_card_design**](docs/CardDesignsApi.md#update_card_design) | **PUT** /api/3/card_designs/{id} | Update card design
|
|
96
|
+
*DoorFlow::CardTemplateTypesApi* | [**create_card_template_type**](docs/CardTemplateTypesApi.md#create_card_template_type) | **POST** /api/3/card_template_types | Create card template type
|
|
97
|
+
*DoorFlow::CardTemplateTypesApi* | [**delete_card_template_type**](docs/CardTemplateTypesApi.md#delete_card_template_type) | **DELETE** /api/3/card_template_types/{code} | Delete card template type
|
|
98
|
+
*DoorFlow::CardTemplateTypesApi* | [**get_card_template_type**](docs/CardTemplateTypesApi.md#get_card_template_type) | **GET** /api/3/card_template_types/{code} | Get card template type
|
|
99
|
+
*DoorFlow::CardTemplateTypesApi* | [**list_card_template_types**](docs/CardTemplateTypesApi.md#list_card_template_types) | **GET** /api/3/card_template_types | List card template types
|
|
100
|
+
*DoorFlow::CardTemplateTypesApi* | [**update_card_template_type**](docs/CardTemplateTypesApi.md#update_card_template_type) | **PUT** /api/3/card_template_types/{code} | Update card template type
|
|
101
|
+
*DoorFlow::CardTemplatesApi* | [**create_card_template**](docs/CardTemplatesApi.md#create_card_template) | **POST** /api/3/card_templates | Create card template
|
|
102
|
+
*DoorFlow::CardTemplatesApi* | [**delete_card_template**](docs/CardTemplatesApi.md#delete_card_template) | **DELETE** /api/3/card_templates/{id} | Delete card template (hard-delete)
|
|
103
|
+
*DoorFlow::CardTemplatesApi* | [**delete_card_template_background_image**](docs/CardTemplatesApi.md#delete_card_template_background_image) | **DELETE** /api/3/card_templates/{id}/background_image/{side} | Delete background image
|
|
104
|
+
*DoorFlow::CardTemplatesApi* | [**delete_card_template_file**](docs/CardTemplatesApi.md#delete_card_template_file) | **DELETE** /api/3/card_templates/{id}/files/{file_uuid} | Delete linked file
|
|
105
|
+
*DoorFlow::CardTemplatesApi* | [**get_card_template**](docs/CardTemplatesApi.md#get_card_template) | **GET** /api/3/card_templates/{id} | Get card template
|
|
106
|
+
*DoorFlow::CardTemplatesApi* | [**get_card_template_background_image**](docs/CardTemplatesApi.md#get_card_template_background_image) | **GET** /api/3/card_templates/{id}/background_image/{side} | Get background image
|
|
107
|
+
*DoorFlow::CardTemplatesApi* | [**list_card_template_files**](docs/CardTemplatesApi.md#list_card_template_files) | **GET** /api/3/card_templates/{id}/files | List linked files
|
|
108
|
+
*DoorFlow::CardTemplatesApi* | [**list_card_templates**](docs/CardTemplatesApi.md#list_card_templates) | **GET** /api/3/card_templates | List card templates
|
|
109
|
+
*DoorFlow::CardTemplatesApi* | [**update_card_template**](docs/CardTemplatesApi.md#update_card_template) | **PUT** /api/3/card_templates/{id} | Update card template
|
|
110
|
+
*DoorFlow::CardTemplatesApi* | [**update_card_template_background_image**](docs/CardTemplatesApi.md#update_card_template_background_image) | **PUT** /api/3/card_templates/{id}/background_image/{side} | Upload background image
|
|
111
|
+
*DoorFlow::CardTemplatesApi* | [**upload_card_template_file**](docs/CardTemplatesApi.md#upload_card_template_file) | **PUT** /api/3/card_templates/{id}/files/{file_uuid} | Upload or replace linked file
|
|
112
|
+
*DoorFlow::ChannelsApi* | [**admit_channel**](docs/ChannelsApi.md#admit_channel) | **POST** /api/3/channels/{id}/admit | Admit through channel (any person)
|
|
113
|
+
*DoorFlow::ChannelsApi* | [**admit_person**](docs/ChannelsApi.md#admit_person) | **POST** /api/3/channels/{id}/admit_person | Admit specific person through channel
|
|
114
|
+
*DoorFlow::ChannelsApi* | [**auto_unlock_channel**](docs/ChannelsApi.md#auto_unlock_channel) | **POST** /api/3/channels/{id}/auto_unlock | Set auto-unlock shift
|
|
115
|
+
*DoorFlow::ChannelsApi* | [**get_channel**](docs/ChannelsApi.md#get_channel) | **GET** /api/3/channels/{id} | Get channel details
|
|
116
|
+
*DoorFlow::ChannelsApi* | [**list_channels**](docs/ChannelsApi.md#list_channels) | **GET** /api/3/channels | List channels (door controllers)
|
|
117
|
+
*DoorFlow::ChannelsApi* | [**lockdown_channel**](docs/ChannelsApi.md#lockdown_channel) | **POST** /api/3/channels/{id}/lockdown | Enable lockdown mode
|
|
118
|
+
*DoorFlow::ChannelsApi* | [**normal_channel**](docs/ChannelsApi.md#normal_channel) | **POST** /api/3/channels/{id}/normal | Return channel to normal mode
|
|
119
|
+
*DoorFlow::ChannelsApi* | [**regenerate_encryption_key**](docs/ChannelsApi.md#regenerate_encryption_key) | **POST** /api/3/channels/{id}/regenerate_encryption_key | Regenerate encryption key
|
|
120
|
+
*DoorFlow::ChannelsApi* | [**remove_encryption_key**](docs/ChannelsApi.md#remove_encryption_key) | **POST** /api/3/channels/{id}/remove_encryption_key | Remove encryption key
|
|
121
|
+
*DoorFlow::ChannelsApi* | [**unlock_channel**](docs/ChannelsApi.md#unlock_channel) | **POST** /api/3/channels/{id}/unlock | Unlock channel (unlock mode)
|
|
122
|
+
*DoorFlow::ChannelsApi* | [**unlockdown_channel**](docs/ChannelsApi.md#unlockdown_channel) | **POST** /api/3/channels/{id}/unlockdown | Disable lockdown mode
|
|
123
|
+
*DoorFlow::CredentialTypesApi* | [**list_credential_types**](docs/CredentialTypesApi.md#list_credential_types) | **GET** /api/3/credential_types | List credential types
|
|
124
|
+
*DoorFlow::CredentialsApi* | [**create_credential**](docs/CredentialsApi.md#create_credential) | **POST** /api/3/people/{person_id}/credentials | Create credential
|
|
125
|
+
*DoorFlow::CredentialsApi* | [**delete_credential**](docs/CredentialsApi.md#delete_credential) | **DELETE** /api/3/people/{person_id}/credentials/{id} | Delete credential
|
|
126
|
+
*DoorFlow::CredentialsApi* | [**get_credential**](docs/CredentialsApi.md#get_credential) | **GET** /api/3/people/{person_id}/credentials/{id} | Get credential details
|
|
127
|
+
*DoorFlow::CredentialsApi* | [**list_all_credentials**](docs/CredentialsApi.md#list_all_credentials) | **GET** /api/3/credentials | List all credentials
|
|
128
|
+
*DoorFlow::CredentialsApi* | [**list_person_credentials**](docs/CredentialsApi.md#list_person_credentials) | **GET** /api/3/people/{person_id}/credentials | List person credentials
|
|
129
|
+
*DoorFlow::CredentialsApi* | [**update_credential**](docs/CredentialsApi.md#update_credential) | **PUT** /api/3/people/{person_id}/credentials/{id} | Update credential
|
|
130
|
+
*DoorFlow::ElementSessionsApi* | [**create_element_session**](docs/ElementSessionsApi.md#create_element_session) | **POST** /api/3/element_sessions | Create an Elements widget session
|
|
131
|
+
*DoorFlow::EventsApi* | [**get_event**](docs/EventsApi.md#get_event) | **GET** /api/3/events/{id} | Get event details
|
|
132
|
+
*DoorFlow::EventsApi* | [**list_events**](docs/EventsApi.md#list_events) | **GET** /api/3/events | List events
|
|
133
|
+
*DoorFlow::GroupReservationsApi* | [**create_group_reservation**](docs/GroupReservationsApi.md#create_group_reservation) | **POST** /api/3/group_reservations | Create group reservation
|
|
134
|
+
*DoorFlow::GroupReservationsApi* | [**delete_group_reservation**](docs/GroupReservationsApi.md#delete_group_reservation) | **DELETE** /api/3/group_reservations/{id} | Delete group reservation
|
|
135
|
+
*DoorFlow::GroupReservationsApi* | [**get_group_reservation**](docs/GroupReservationsApi.md#get_group_reservation) | **GET** /api/3/group_reservations/{id} | Get group reservation
|
|
136
|
+
*DoorFlow::GroupReservationsApi* | [**list_group_reservations**](docs/GroupReservationsApi.md#list_group_reservations) | **GET** /api/3/group_reservations | List group reservations
|
|
137
|
+
*DoorFlow::GroupsApi* | [**list_groups**](docs/GroupsApi.md#list_groups) | **GET** /api/3/groups | List groups
|
|
138
|
+
*DoorFlow::NotificationRulesApi* | [**create_notification_rule**](docs/NotificationRulesApi.md#create_notification_rule) | **POST** /api/3/notification_rules | Create notification rule
|
|
139
|
+
*DoorFlow::NotificationRulesApi* | [**delete_notification_rule**](docs/NotificationRulesApi.md#delete_notification_rule) | **DELETE** /api/3/notification_rules/{id} | Delete notification rule
|
|
140
|
+
*DoorFlow::NotificationRulesApi* | [**get_notification_rule**](docs/NotificationRulesApi.md#get_notification_rule) | **GET** /api/3/notification_rules/{id} | Get notification rule details
|
|
141
|
+
*DoorFlow::NotificationRulesApi* | [**list_notification_rules**](docs/NotificationRulesApi.md#list_notification_rules) | **GET** /api/3/notification_rules | List notification rules
|
|
142
|
+
*DoorFlow::NotificationRulesApi* | [**update_notification_rule**](docs/NotificationRulesApi.md#update_notification_rule) | **PUT** /api/3/notification_rules/{id} | Update notification rule
|
|
143
|
+
*DoorFlow::OauthApi* | [**authorize_o_auth**](docs/OauthApi.md#authorize_o_auth) | **GET** /oauth/authorize | Authorization endpoint
|
|
144
|
+
*DoorFlow::OauthApi* | [**get_access_token**](docs/OauthApi.md#get_access_token) | **POST** /oauth/token | Obtain access token
|
|
145
|
+
*DoorFlow::OauthApi* | [**get_token_info**](docs/OauthApi.md#get_token_info) | **GET** /oauth/token/info | Get token information
|
|
146
|
+
*DoorFlow::OauthApi* | [**revoke_token**](docs/OauthApi.md#revoke_token) | **POST** /oauth/revoke | Revoke access token or refresh token
|
|
147
|
+
*DoorFlow::PeopleApi* | [**create_person**](docs/PeopleApi.md#create_person) | **POST** /api/3/people | Create person
|
|
148
|
+
*DoorFlow::PeopleApi* | [**delete_person**](docs/PeopleApi.md#delete_person) | **DELETE** /api/3/people/{id} | Delete person
|
|
149
|
+
*DoorFlow::PeopleApi* | [**get_person**](docs/PeopleApi.md#get_person) | **GET** /api/3/people/{id} | Get person details
|
|
150
|
+
*DoorFlow::PeopleApi* | [**list_people**](docs/PeopleApi.md#list_people) | **GET** /api/3/people | List people
|
|
151
|
+
*DoorFlow::PeopleApi* | [**update_person**](docs/PeopleApi.md#update_person) | **PUT** /api/3/people/{id} | Update person
|
|
152
|
+
*DoorFlow::ReservationsApi* | [**create_reservation**](docs/ReservationsApi.md#create_reservation) | **POST** /api/3/reservations | Create reservation
|
|
153
|
+
*DoorFlow::ReservationsApi* | [**delete_reservation**](docs/ReservationsApi.md#delete_reservation) | **DELETE** /api/3/reservations/{id} | Delete reservation
|
|
154
|
+
*DoorFlow::ReservationsApi* | [**list_reservations**](docs/ReservationsApi.md#list_reservations) | **GET** /api/3/reservations | List reservations
|
|
155
|
+
*DoorFlow::RolesApi* | [**list_roles**](docs/RolesApi.md#list_roles) | **GET** /api/3/roles | List roles
|
|
156
|
+
*DoorFlow::SitesApi* | [**list_sites**](docs/SitesApi.md#list_sites) | **GET** /api/3/sites | List sites
|
|
157
|
+
*DoorFlow::SyncApi* | [**initiate_sync**](docs/SyncApi.md#initiate_sync) | **POST** /api/3/sync | Initiate sync
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## Documentation for Models
|
|
161
|
+
|
|
162
|
+
- [DoorFlow::Account](docs/Account.md)
|
|
163
|
+
- [DoorFlow::AccountPassport](docs/AccountPassport.md)
|
|
164
|
+
- [DoorFlow::AccountReseller](docs/AccountReseller.md)
|
|
165
|
+
- [DoorFlow::AccountSync](docs/AccountSync.md)
|
|
166
|
+
- [DoorFlow::AccountUser](docs/AccountUser.md)
|
|
167
|
+
- [DoorFlow::AdmissionRequest](docs/AdmissionRequest.md)
|
|
168
|
+
- [DoorFlow::AdmissionRequestDoorController](docs/AdmissionRequestDoorController.md)
|
|
169
|
+
- [DoorFlow::AdmissionRequestPerson](docs/AdmissionRequestPerson.md)
|
|
170
|
+
- [DoorFlow::AdmitChannel202Response](docs/AdmitChannel202Response.md)
|
|
171
|
+
- [DoorFlow::AdmitPerson202Response](docs/AdmitPerson202Response.md)
|
|
172
|
+
- [DoorFlow::AdmitPerson403Response](docs/AdmitPerson403Response.md)
|
|
173
|
+
- [DoorFlow::AdmitPersonRequest](docs/AdmitPersonRequest.md)
|
|
174
|
+
- [DoorFlow::AutoUnlockChannel400Response](docs/AutoUnlockChannel400Response.md)
|
|
175
|
+
- [DoorFlow::AutoUnlockChannelRequest](docs/AutoUnlockChannelRequest.md)
|
|
176
|
+
- [DoorFlow::CardDesign](docs/CardDesign.md)
|
|
177
|
+
- [DoorFlow::CardDesignImageBack](docs/CardDesignImageBack.md)
|
|
178
|
+
- [DoorFlow::CardDesignImageFront](docs/CardDesignImageFront.md)
|
|
179
|
+
- [DoorFlow::CardDesignInput](docs/CardDesignInput.md)
|
|
180
|
+
- [DoorFlow::CardTemplate](docs/CardTemplate.md)
|
|
181
|
+
- [DoorFlow::CardTemplateInput](docs/CardTemplateInput.md)
|
|
182
|
+
- [DoorFlow::CardTemplateInputCardTemplate](docs/CardTemplateInputCardTemplate.md)
|
|
183
|
+
- [DoorFlow::CardTemplateType](docs/CardTemplateType.md)
|
|
184
|
+
- [DoorFlow::CardTemplateTypeInput](docs/CardTemplateTypeInput.md)
|
|
185
|
+
- [DoorFlow::CardTemplateTypeInputCardTemplateType](docs/CardTemplateTypeInputCardTemplateType.md)
|
|
186
|
+
- [DoorFlow::CardTemplateTypeInputCardTemplateTypeNonPrintableZonesInner](docs/CardTemplateTypeInputCardTemplateTypeNonPrintableZonesInner.md)
|
|
187
|
+
- [DoorFlow::CardTemplateTypeNonPrintableZonesInner](docs/CardTemplateTypeNonPrintableZonesInner.md)
|
|
188
|
+
- [DoorFlow::Channel](docs/Channel.md)
|
|
189
|
+
- [DoorFlow::ChannelAutoUnlock](docs/ChannelAutoUnlock.md)
|
|
190
|
+
- [DoorFlow::ChannelLockdown](docs/ChannelLockdown.md)
|
|
191
|
+
- [DoorFlow::ChannelLockdownAuxLockdown](docs/ChannelLockdownAuxLockdown.md)
|
|
192
|
+
- [DoorFlow::ChannelLockdownCardLockdown](docs/ChannelLockdownCardLockdown.md)
|
|
193
|
+
- [DoorFlow::ChannelLockdownRexLockdown](docs/ChannelLockdownRexLockdown.md)
|
|
194
|
+
- [DoorFlow::ChannelMode](docs/ChannelMode.md)
|
|
195
|
+
- [DoorFlow::ChannelSync](docs/ChannelSync.md)
|
|
196
|
+
- [DoorFlow::CreateCardDesign422Response](docs/CreateCardDesign422Response.md)
|
|
197
|
+
- [DoorFlow::CreateCardDesign422ResponseErrors](docs/CreateCardDesign422ResponseErrors.md)
|
|
198
|
+
- [DoorFlow::Credential](docs/Credential.md)
|
|
199
|
+
- [DoorFlow::CredentialInput](docs/CredentialInput.md)
|
|
200
|
+
- [DoorFlow::CredentialInputPersonCredential](docs/CredentialInputPersonCredential.md)
|
|
201
|
+
- [DoorFlow::CredentialType](docs/CredentialType.md)
|
|
202
|
+
- [DoorFlow::CredentialUpdateInput](docs/CredentialUpdateInput.md)
|
|
203
|
+
- [DoorFlow::CredentialUpdateInputPersonCredential](docs/CredentialUpdateInputPersonCredential.md)
|
|
204
|
+
- [DoorFlow::DeleteCardDesign200Response](docs/DeleteCardDesign200Response.md)
|
|
205
|
+
- [DoorFlow::DeleteCardTemplateType409Response](docs/DeleteCardTemplateType409Response.md)
|
|
206
|
+
- [DoorFlow::ElementSession](docs/ElementSession.md)
|
|
207
|
+
- [DoorFlow::ElementSessionConfig](docs/ElementSessionConfig.md)
|
|
208
|
+
- [DoorFlow::ElementSessionError](docs/ElementSessionError.md)
|
|
209
|
+
- [DoorFlow::ElementSessionInput](docs/ElementSessionInput.md)
|
|
210
|
+
- [DoorFlow::ElementSessionMember](docs/ElementSessionMember.md)
|
|
211
|
+
- [DoorFlow::Error](docs/Error.md)
|
|
212
|
+
- [DoorFlow::Event](docs/Event.md)
|
|
213
|
+
- [DoorFlow::GetAccessToken200Response](docs/GetAccessToken200Response.md)
|
|
214
|
+
- [DoorFlow::GetAccessToken400Response](docs/GetAccessToken400Response.md)
|
|
215
|
+
- [DoorFlow::GetAccessToken401Response](docs/GetAccessToken401Response.md)
|
|
216
|
+
- [DoorFlow::GetAdmissionRequest401Response](docs/GetAdmissionRequest401Response.md)
|
|
217
|
+
- [DoorFlow::GetAdmissionRequest403Response](docs/GetAdmissionRequest403Response.md)
|
|
218
|
+
- [DoorFlow::GetAdmissionRequest404Response](docs/GetAdmissionRequest404Response.md)
|
|
219
|
+
- [DoorFlow::GetAdmissionRequest500Response](docs/GetAdmissionRequest500Response.md)
|
|
220
|
+
- [DoorFlow::GetTokenInfo200Response](docs/GetTokenInfo200Response.md)
|
|
221
|
+
- [DoorFlow::GetTokenInfo200ResponseApplication](docs/GetTokenInfo200ResponseApplication.md)
|
|
222
|
+
- [DoorFlow::GetTokenInfo401Response](docs/GetTokenInfo401Response.md)
|
|
223
|
+
- [DoorFlow::Group](docs/Group.md)
|
|
224
|
+
- [DoorFlow::GroupReservation](docs/GroupReservation.md)
|
|
225
|
+
- [DoorFlow::GroupReservationInput](docs/GroupReservationInput.md)
|
|
226
|
+
- [DoorFlow::GroupReservationInputGroupReservation](docs/GroupReservationInputGroupReservation.md)
|
|
227
|
+
- [DoorFlow::InitiateSync429Response](docs/InitiateSync429Response.md)
|
|
228
|
+
- [DoorFlow::LinkedFile](docs/LinkedFile.md)
|
|
229
|
+
- [DoorFlow::ListEvents400Response](docs/ListEvents400Response.md)
|
|
230
|
+
- [DoorFlow::LockdownChannelRequest](docs/LockdownChannelRequest.md)
|
|
231
|
+
- [DoorFlow::NotificationRule](docs/NotificationRule.md)
|
|
232
|
+
- [DoorFlow::NotificationRuleActionsInner](docs/NotificationRuleActionsInner.md)
|
|
233
|
+
- [DoorFlow::NotificationRuleConditionsInner](docs/NotificationRuleConditionsInner.md)
|
|
234
|
+
- [DoorFlow::NotificationRuleEventsInner](docs/NotificationRuleEventsInner.md)
|
|
235
|
+
- [DoorFlow::NotificationRuleInput](docs/NotificationRuleInput.md)
|
|
236
|
+
- [DoorFlow::Person](docs/Person.md)
|
|
237
|
+
- [DoorFlow::PersonInput](docs/PersonInput.md)
|
|
238
|
+
- [DoorFlow::Reservation](docs/Reservation.md)
|
|
239
|
+
- [DoorFlow::ReservationInput](docs/ReservationInput.md)
|
|
240
|
+
- [DoorFlow::RevokeToken403Response](docs/RevokeToken403Response.md)
|
|
241
|
+
- [DoorFlow::Role](docs/Role.md)
|
|
242
|
+
- [DoorFlow::Site](docs/Site.md)
|
|
243
|
+
- [DoorFlow::SiteSiteIpsInner](docs/SiteSiteIpsInner.md)
|
|
244
|
+
- [DoorFlow::UnlockChannelRequest](docs/UnlockChannelRequest.md)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
## Documentation for Authorization
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
Authentication schemes defined for the API:
|
|
251
|
+
### OAuth2
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
- **Type**: OAuth
|
|
255
|
+
- **Flow**: accessCode
|
|
256
|
+
- **Authorization URL**: /oauth/authorize
|
|
257
|
+
- **Scopes**: N/A
|
|
258
|
+
|
|
259
|
+
### basicAuth
|
|
260
|
+
|
|
261
|
+
- **Type**: HTTP basic authentication
|
|
355
262
|
|
|
356
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
data/bin/post-generate
CHANGED
|
@@ -21,7 +21,9 @@ wrapper_files = [
|
|
|
21
21
|
'lib/doorflow/resources/person.rb',
|
|
22
22
|
'lib/doorflow/resources/reservation.rb',
|
|
23
23
|
'lib/doorflow/resources/role.rb',
|
|
24
|
-
'lib/doorflow/resources/site.rb'
|
|
24
|
+
'lib/doorflow/resources/site.rb',
|
|
25
|
+
'lib/doorflow/resources/element_session.rb',
|
|
26
|
+
'lib/doorflow/client/element_sessions_proxy.rb'
|
|
25
27
|
]
|
|
26
28
|
|
|
27
29
|
missing_files = wrapper_files.reject { |f| File.exist?(f) }
|
data/doorflow.gemspec
CHANGED
|
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
|
|
|
35
35
|
"rubygems_mfa_required" => "true"
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
s.add_runtime_dependency 'base64', '~> 0.2'
|
|
38
39
|
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
|
|
39
40
|
s.add_runtime_dependency 'faraday-multipart', '~> 1.0'
|
|
40
41
|
s.add_runtime_dependency 'marcel', '~> 1.0'
|
|
@@ -49,7 +50,6 @@ Gem::Specification.new do |s|
|
|
|
49
50
|
s.add_development_dependency 'rdoc', '~> 6.7'
|
|
50
51
|
|
|
51
52
|
s.files = Dir.glob("{lib,bin}/**/*") + %w[README.md LICENSE CHANGELOG.md doorflow.gemspec]
|
|
52
|
-
s.test_files = Dir.glob("spec/**/*")
|
|
53
53
|
s.executables = []
|
|
54
54
|
s.require_paths = ["lib"]
|
|
55
55
|
end
|