Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ruby formatter #452

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: '^1.23.2'
- name: Install standardrb
run: gem install standard -v 1.31.0
- name: Install syntax_tree
run: gem install syntax_tree -v 6.2.0
- name: Normalize package-lock.json
run: npm install
- name: Generate docs
Expand Down
5 changes: 4 additions & 1 deletion docs/api/acs/access_groups/add_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ None
#### Request

```ruby
seam.acs.access_groups.add_user(acs_access_group_id: "44444444-4444-4444-4444-444444444444", acs_user_id: "33333333-3333-3333-3333-333333333333")
seam.acs.access_groups.add_user(
acs_access_group_id: "44444444-4444-4444-4444-444444444444",
acs_user_id: "33333333-3333-3333-3333-333333333333",
)
```

#### Response
Expand Down
13 changes: 12 additions & 1 deletion docs/api/acs/access_groups/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@ seam.acs.access_groups.get(acs_access_group_id: "44444444-4444-4444-4444-4444444
#### Response

```ruby
{"acs_access_group_id" => "44444444-4444-4444-4444-444444444444", "name" => "Lobby Access", "display_name" => "Lobby Access", "access_group_type_display_name" => "PTI access level", "access_group_type" => "pti_access_level", "external_type" => "pti_access_level", "external_type_display_name" => "PTI access level", "acs_system_id" => "11111111-1111-1111-1111-111111111111", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2023-11-30T06:27:15.437Z"}
{
"acs_access_group_id" => "44444444-4444-4444-4444-444444444444",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrii-balitskyi When I use a GitHub codespace to run Ruby, I don't think I see "=>" in the responses. I also don't think I see commas separating the prop-value pairs in the responses. Does that matter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok. @razor-x and I agreed on using the hash arrow syntax for Ruby responses, similar to JSON.

"name" => "Lobby Access",
"display_name" => "Lobby Access",
"access_group_type_display_name" => "PTI access level",
"access_group_type" => "pti_access_level",
"external_type" => "pti_access_level",
"external_type_display_name" => "PTI access level",
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2023-11-30T06:27:15.437Z",
}
```
{% endtab %}

Expand Down
20 changes: 18 additions & 2 deletions docs/api/acs/access_groups/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,29 @@ seam.acs.access_groups.list(
#### Request

```ruby
seam.acs.access_groups.list(acs_system_id: "11111111-1111-1111-1111-111111111111", acs_user_id: "33333333-3333-3333-3333-333333333333")
seam.acs.access_groups.list(
acs_system_id: "11111111-1111-1111-1111-111111111111",
acs_user_id: "33333333-3333-3333-3333-333333333333",
)
```

#### Response

```ruby
[{"acs_access_group_id" => "44444444-4444-4444-4444-444444444444", "name" => "Lobby Access", "display_name" => "Lobby Access", "access_group_type_display_name" => "PTI access level", "access_group_type" => "pti_access_level", "external_type" => "pti_access_level", "external_type_display_name" => "PTI access level", "acs_system_id" => "11111111-1111-1111-1111-111111111111", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2023-11-30T06:27:15.437Z"}]
[
{
"acs_access_group_id" => "44444444-4444-4444-4444-444444444444",
"name" => "Lobby Access",
"display_name" => "Lobby Access",
"access_group_type_display_name" => "PTI access level",
"access_group_type" => "pti_access_level",
"external_type" => "pti_access_level",
"external_type_display_name" => "PTI access level",
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2023-11-30T06:27:15.437Z",
},
]
```
{% endtab %}

Expand Down
15 changes: 13 additions & 2 deletions docs/api/acs/access_groups/list_accessible_entrances.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,24 @@ seam.acs.access_groups.list_accessible_entrances(
#### Request

```ruby
seam.acs.access_groups.list_accessible_entrances(acs_access_group_id: "44444444-4444-4444-4444-444444444444")
seam.acs.access_groups.list_accessible_entrances(
acs_access_group_id: "44444444-4444-4444-4444-444444444444",
)
```

#### Response

```ruby
[{"acs_entrance_id" => "66666666-6666-6666-6666-666666666666", "name" => "Main Entrance", "display_name" => "Main Entrance", "acs_system_id" => "11111111-1111-1111-1111-111111111111", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2024-10-15T12:00:00.000Z"}]
[
{
"acs_entrance_id" => "66666666-6666-6666-6666-666666666666",
"name" => "Main Entrance",
"display_name" => "Main Entrance",
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2024-10-15T12:00:00.000Z",
},
]
```
{% endtab %}

Expand Down
23 changes: 22 additions & 1 deletion docs/api/acs/access_groups/list_users.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,28 @@ seam.acs.access_groups.list_users(acs_access_group_id: "44444444-4444-4444-4444-
#### Response

```ruby
[{"acs_user_id" => "33333333-3333-3333-3333-333333333333", "display_name" => "Jane Doe", "full_name" => "Jane Doe", "email" => "[email protected]", "email_address" => "[email protected]", "phone_number" => "+15555550100", "acs_system_id" => "11111111-1111-1111-1111-111111111111", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2024-04-05T07:14:28.531Z", "is_suspended" => false, "access_schedule" => {starts_at: "2024-03-01T10:40:00.000Z", ends_at: "2024-03-04T10:40:00.000Z"}, "user_identity_id" => "22222222-2222-2222-2222-222222222222", "user_identity_full_name" => "Jane Doe", "user_identity_email_address" => "[email protected]", "user_identity_phone_number" => "+15555550100"}]
[
{
"acs_user_id" => "33333333-3333-3333-3333-333333333333",
"display_name" => "Jane Doe",
"full_name" => "Jane Doe",
"email" => "[email protected]",
"email_address" => "[email protected]",
"phone_number" => "+15555550100",
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2024-04-05T07:14:28.531Z",
"is_suspended" => false,
"access_schedule" => {
starts_at: "2024-03-01T10:40:00.000Z",
ends_at: "2024-03-04T10:40:00.000Z",
},
"user_identity_id" => "22222222-2222-2222-2222-222222222222",
"user_identity_full_name" => "Jane Doe",
"user_identity_email_address" => "[email protected]",
"user_identity_phone_number" => "+15555550100",
},
]
```
{% endtab %}

Expand Down
5 changes: 4 additions & 1 deletion docs/api/acs/access_groups/remove_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ None
#### Request

```ruby
seam.acs.access_groups.remove_user(acs_access_group_id: "44444444-4444-4444-4444-444444444444", acs_user_id: "33333333-3333-3333-3333-333333333333")
seam.acs.access_groups.remove_user(
acs_access_group_id: "44444444-4444-4444-4444-444444444444",
acs_user_id: "33333333-3333-3333-3333-333333333333",
)
```

#### Response
Expand Down
5 changes: 4 additions & 1 deletion docs/api/acs/credentials/assign.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ None
#### Request

```ruby
seam.acs.credentials.assign(acs_user_id: "33333333-3333-3333-3333-333333333333", acs_credential_id: "66666666-6666-6666-6666-666666666666")
seam.acs.credentials.assign(
acs_user_id: "33333333-3333-3333-3333-333333333333",
acs_credential_id: "66666666-6666-6666-6666-666666666666",
)
```

#### Response
Expand Down
25 changes: 23 additions & 2 deletions docs/api/acs/credentials/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,34 @@ AcsCredential(
#### Request

```ruby
seam.acs.credentials.create(acs_user_id: "33333333-3333-3333-3333-333333333333", access_method: "mobile_key", allowed_acs_entrance_ids: ["55555555-5555-5555-5555-555555555555", "55555555-5555-5555-5555-000000000000"], credential_manager_acs_system_id: "88888888-8888-8888-8888-888888888888", is_multi_phone_sync_credential: true, starts_at: "2024-03-01T10:40:00Z", ends_at: "2024-03-04T10:40:00Z")
seam.acs.credentials.create(
acs_user_id: "33333333-3333-3333-3333-333333333333",
access_method: "mobile_key",
allowed_acs_entrance_ids: %w[
55555555-5555-5555-5555-555555555555
55555555-5555-5555-5555-000000000000
],
credential_manager_acs_system_id: "88888888-8888-8888-8888-888888888888",
is_multi_phone_sync_credential: true,
starts_at: "2024-03-01T10:40:00Z",
ends_at: "2024-03-04T10:40:00Z",
)
```

#### Response

```ruby
{"acs_credential_id" => "99999999-9999-9999-9999-999999999999", "acs_user_id" => "33333333-3333-3333-3333-333333333333", "display_name" => "Multi Phone Sync Credential", "code" => nil, "acs_system_id" => "88888888-8888-8888-8888-888888888888", "access_method" => "mobile_key", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2024-04-12T03:56:22.396Z", "is_multi_phone_sync_credential" => true}
{
"acs_credential_id" => "99999999-9999-9999-9999-999999999999",
"acs_user_id" => "33333333-3333-3333-3333-333333333333",
"display_name" => "Multi Phone Sync Credential",
"code" => nil,
"acs_system_id" => "88888888-8888-8888-8888-888888888888",
"access_method" => "mobile_key",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2024-04-12T03:56:22.396Z",
"is_multi_phone_sync_credential" => true,
}
```
{% endtab %}

Expand Down
12 changes: 11 additions & 1 deletion docs/api/acs/credentials/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,17 @@ seam.acs.credentials.get(acs_credential_id: "66666666-6666-6666-6666-66666666666
#### Response

```ruby
{"acs_credential_id" => "99999999-9999-9999-9999-999999999999", "acs_user_id" => "33333333-3333-3333-3333-333333333333", "display_name" => "Multi Phone Sync Credential", "code" => nil, "acs_system_id" => "11111111-1111-1111-1111-111111111111", "access_method" => "mobile_key", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2024-04-12T03:56:22.396Z", "is_multi_phone_sync_credential" => true}
{
"acs_credential_id" => "99999999-9999-9999-9999-999999999999",
"acs_user_id" => "33333333-3333-3333-3333-333333333333",
"display_name" => "Multi Phone Sync Credential",
"code" => nil,
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"access_method" => "mobile_key",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2024-04-12T03:56:22.396Z",
"is_multi_phone_sync_credential" => true,
}
```
{% endtab %}

Expand Down
21 changes: 19 additions & 2 deletions docs/api/acs/credentials/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,30 @@ seam.acs.credentials.list(
#### Request

```ruby
seam.acs.credentials.list(acs_user_id: "33333333-3333-3333-3333-333333333333", acs_system_id: "11111111-1111-1111-1111-111111111111", user_identity_id: "22222222-2222-2222-2222-222222222222", is_multi_phone_sync_credential: true)
seam.acs.credentials.list(
acs_user_id: "33333333-3333-3333-3333-333333333333",
acs_system_id: "11111111-1111-1111-1111-111111111111",
user_identity_id: "22222222-2222-2222-2222-222222222222",
is_multi_phone_sync_credential: true,
)
```

#### Response

```ruby
[{"acs_credential_id" => "99999999-9999-9999-9999-999999999999", "acs_user_id" => "33333333-3333-3333-3333-333333333333", "display_name" => "Multi Phone Sync Credential", "code" => nil, "acs_system_id" => "11111111-1111-1111-1111-111111111111", "access_method" => "mobile_key", "workspace_id" => "00000000-0000-0000-0000-000000000000", "created_at" => "2024-04-12T03:56:22.396Z", "is_multi_phone_sync_credential" => true}]
[
{
"acs_credential_id" => "99999999-9999-9999-9999-999999999999",
"acs_user_id" => "33333333-3333-3333-3333-333333333333",
"display_name" => "Multi Phone Sync Credential",
"code" => nil,
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"access_method" => "mobile_key",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"created_at" => "2024-04-12T03:56:22.396Z",
"is_multi_phone_sync_credential" => true,
},
]
```
{% endtab %}

Expand Down
20 changes: 18 additions & 2 deletions docs/api/acs/credentials/list_accessible_entrances.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,29 @@ seam.acs.credentials.list_accessible_entrances(
#### Request

```ruby
seam.acs.credentials.list_accessible_entrances(acs_credential_id: "66666666-6666-6666-6666-666666666666")
seam.acs.credentials.list_accessible_entrances(
acs_credential_id: "66666666-6666-6666-6666-666666666666",
)
```

#### Response

```ruby
[{"acs_entrance_id" => "55555555-5555-5555-5555-555555555555", "acs_system_id" => "11111111-1111-1111-1111-111111111111", "workspace_id" => "00000000-0000-0000-0000-000000000000", "visionline_metadata" => {profiles: [{visionline_door_profile_id: "Guest Door", visionline_door_profile_type: "BLE"}], door_name: "Guest Lock 2", door_category: "guest"}, "latch_metadata" => nil, "display_name" => "Guest Lock 2", "created_at" => "2024-03-26T14:31:18.979Z"}]
[
{
"acs_entrance_id" => "55555555-5555-5555-5555-555555555555",
"acs_system_id" => "11111111-1111-1111-1111-111111111111",
"workspace_id" => "00000000-0000-0000-0000-000000000000",
"visionline_metadata" => {
profiles: [{ visionline_door_profile_id: "Guest Door", visionline_door_profile_type: "BLE" }],
door_name: "Guest Lock 2",
door_category: "guest",
},
"latch_metadata" => nil,
"display_name" => "Guest Lock 2",
"created_at" => "2024-03-26T14:31:18.979Z",
},
]
```
{% endtab %}

Expand Down
5 changes: 4 additions & 1 deletion docs/api/acs/credentials/unassign.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ None
#### Request

```ruby
seam.acs.credentials.unassign(acs_user_id: "33333333-3333-3333-3333-333333333333", acs_credential_id: "66666666-6666-6666-6666-666666666666")
seam.acs.credentials.unassign(
acs_user_id: "33333333-3333-3333-3333-333333333333",
acs_credential_id: "66666666-6666-6666-6666-666666666666",
)
```

#### Response
Expand Down
7 changes: 6 additions & 1 deletion docs/api/acs/entrances/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ seam.acs.entrances.get(acs_entrance_id: "123e4567-e89b-12d3-a456-426614174000")
#### Response

```ruby
{"acs_system_id" => "123e4567-e89b-12d3-a456-426614174000", "acs_entrance_id" => "123e4567-e89b-12d3-a456-426614174000", "created_at" => "2024-04-05T07:57:05.323Z", "display_name" => "text"}
{
"acs_system_id" => "123e4567-e89b-12d3-a456-426614174000",
"acs_entrance_id" => "123e4567-e89b-12d3-a456-426614174000",
"created_at" => "2024-04-05T07:57:05.323Z",
"display_name" => "text",
}
```
{% endtab %}

Expand Down
11 changes: 9 additions & 2 deletions docs/api/acs/entrances/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,20 @@ seam.acs.entrances.list()
#### Request

```ruby
seam.acs.entrances.list
seam.acs.entrances.list()
```

#### Response

```ruby
[{"acs_system_id" => "123e4567-e89b-12d3-a456-426614174000", "acs_entrance_id" => "123e4567-e89b-12d3-a456-426614174000", "created_at" => "2024-04-05T07:57:05.323Z", "display_name" => "text"}]
[
{
"acs_system_id" => "123e4567-e89b-12d3-a456-426614174000",
"acs_entrance_id" => "123e4567-e89b-12d3-a456-426614174000",
"created_at" => "2024-04-05T07:57:05.323Z",
"display_name" => "text",
},
]
```
{% endtab %}

Expand Down
29 changes: 27 additions & 2 deletions docs/api/acs/entrances/list_credentials_with_access.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,38 @@ seam.acs.entrances.list_credentials_with_access(
#### Request

```ruby
seam.acs.entrances.list_credentials_with_access(acs_entrance_id: "123e4567-e89b-12d3-a456-426614174000")
seam.acs.entrances.list_credentials_with_access(
acs_entrance_id: "123e4567-e89b-12d3-a456-426614174000",
)
```

#### Response

```ruby
[{"acs_credential_id" => "123e4567-e89b-12d3-a456-426614174000", "acs_user_id" => "123e4567-e89b-12d3-a456-426614174000", "acs_credential_pool_id" => "123e4567-e89b-12d3-a456-426614174000", "acs_system_id" => "123e4567-e89b-12d3-a456-426614174000", "parent_acs_credential_id" => "123e4567-e89b-12d3-a456-426614174000", "display_name" => "text", "code" => "text", "card_number" => "text", "is_issued" => false, "issued_at" => "2024-10-15T12:54:04.155Z", "access_method" => "code", "external_type" => "pti_card", "external_type_display_name" => "text", "created_at" => "2024-10-15T12:54:04.155Z", "workspace_id" => "123e4567-e89b-12d3-a456-426614174000", "starts_at" => "text", "ends_at" => "text", "is_multi_phone_sync_credential" => false, "is_latest_desired_state_synced_with_provider" => false, "latest_desired_state_synced_with_provider_at" => "2024-10-15T12:54:04.155Z"}]
[
{
"acs_credential_id" => "123e4567-e89b-12d3-a456-426614174000",
"acs_user_id" => "123e4567-e89b-12d3-a456-426614174000",
"acs_credential_pool_id" => "123e4567-e89b-12d3-a456-426614174000",
"acs_system_id" => "123e4567-e89b-12d3-a456-426614174000",
"parent_acs_credential_id" => "123e4567-e89b-12d3-a456-426614174000",
"display_name" => "text",
"code" => "text",
"card_number" => "text",
"is_issued" => false,
"issued_at" => "2024-10-15T12:54:04.155Z",
"access_method" => "code",
"external_type" => "pti_card",
"external_type_display_name" => "text",
"created_at" => "2024-10-15T12:54:04.155Z",
"workspace_id" => "123e4567-e89b-12d3-a456-426614174000",
"starts_at" => "text",
"ends_at" => "text",
"is_multi_phone_sync_credential" => false,
"is_latest_desired_state_synced_with_provider" => false,
"latest_desired_state_synced_with_provider_at" => "2024-10-15T12:54:04.155Z",
},
]
```
{% endtab %}

Expand Down
2 changes: 1 addition & 1 deletion docs/api/acs/systems/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ seam.acs.systems.get(acs_system_id: "8d7e0b3a-b889-49a7-9164-4b71a0506a33")
#### Response

```ruby
[{"acs_system_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33"}]
[{ "acs_system_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33" }]
```
{% endtab %}

Expand Down
2 changes: 1 addition & 1 deletion docs/api/acs/systems/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ seam.acs.systems.list(connected_account_id: "123e4567-e89b-12d3-a456-42661417400
#### Response

```ruby
[{"acs_system_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33"}]
[{ "acs_system_id" => "8d7e0b3a-b889-49a7-9164-4b71a0506a33" }]
```
{% endtab %}

Expand Down
Loading
Loading