diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7958347 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,36 @@ +name: Publish + +run-name: Publish ${{ github.ref_name }} + +on: + push: + tags: + - v* + +jobs: + release: + name: GitHub Releases + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate release notes + id: changelog + run: | + mkdir tmp + outfile=tmp/changelog.txt + echo "outfile=${outfile}" >> $GITHUB_OUTPUT + npx standard-changelog@^2.0.0 --release-count 2 --infile $outfile.tmp --outfile $outfile.tmp + sed '1,3d' $outfile.tmp > $outfile + + - name: Create GitHub release + uses: softprops/action-gh-release@v1 + with: + token: ${{ secrets.GH_TOKEN }} + prerelease: ${{ contains(github.ref_name, '-') }} + files: "" + body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }} diff --git a/src/Objects/AcsCredential.php b/src/Objects/AcsCredential.php new file mode 100644 index 0000000..7d1fa6e --- /dev/null +++ b/src/Objects/AcsCredential.php @@ -0,0 +1,65 @@ +acs_credential_id, + acs_user_id: $json->acs_user_id ?? null, + acs_credential_pool_id: $json->acs_credential_pool_id ?? null, + acs_system_id: $json->acs_system_id, + parent_acs_credential_id: $json->parent_acs_credential_id ?? null, + display_name: $json->display_name, + code: $json->code ?? null, + access_method: $json->access_method, + external_type: $json->external_type ?? null, + external_type_display_name: $json->external_type_display_name ?? null, + created_at: $json->created_at, + workspace_id: $json->workspace_id, + starts_at: $json->starts_at ?? null, + ends_at: $json->ends_at ?? null, + errors: array_map( + fn ($e) => AcsCredentialErrors::from_json($e), + $json->errors ?? [] + ), + warnings: array_map( + fn ($w) => AcsCredentialWarnings::from_json($w), + $json->warnings ?? [] + ), + is_multi_phone_sync_credential: $json->is_multi_phone_sync_credential ?? null, + visionline_metadata: isset($json->visionline_metadata) ? AcsCredentialVisionlineMetadata::from_json($json->visionline_metadata) : null, + ); + } + + + + public function __construct( + public string $acs_credential_id, + public string | null $acs_user_id, + public string | null $acs_credential_pool_id, + public string $acs_system_id, + public string | null $parent_acs_credential_id, + public string $display_name, + public string | null $code, + public string $access_method, + public string | null $external_type, + public string | null $external_type_display_name, + public string $created_at, + public string $workspace_id, + public string | null $starts_at, + public string | null $ends_at, + public array $errors, + public array $warnings, + public bool | null $is_multi_phone_sync_credential, + public AcsCredentialVisionlineMetadata | null $visionline_metadata, + ) { + } + +} diff --git a/src/Objects/AcsCredentialErrors.php b/src/Objects/AcsCredentialErrors.php new file mode 100644 index 0000000..daece48 --- /dev/null +++ b/src/Objects/AcsCredentialErrors.php @@ -0,0 +1,29 @@ +error_code, + message: $json->message, + created_at: $json->created_at ?? null, + ); + } + + + + public function __construct( + public string $error_code, + public string $message, + public string | null $created_at, + ) { + } + +} diff --git a/src/Objects/AcsCredentialPool.php b/src/Objects/AcsCredentialPool.php new file mode 100644 index 0000000..53251ec --- /dev/null +++ b/src/Objects/AcsCredentialPool.php @@ -0,0 +1,37 @@ +acs_credential_pool_id, + acs_system_id: $json->acs_system_id, + display_name: $json->display_name, + external_type: $json->external_type, + external_type_display_name: $json->external_type_display_name, + created_at: $json->created_at, + workspace_id: $json->workspace_id, + ); + } + + + + public function __construct( + public string $acs_credential_pool_id, + public string $acs_system_id, + public string $display_name, + public string $external_type, + public string $external_type_display_name, + public string $created_at, + public string $workspace_id, + ) { + } + +} diff --git a/src/Objects/AcsCredentialProvisioningAutomation.php b/src/Objects/AcsCredentialProvisioningAutomation.php new file mode 100644 index 0000000..d2cf7ee --- /dev/null +++ b/src/Objects/AcsCredentialProvisioningAutomation.php @@ -0,0 +1,33 @@ +acs_credential_provisioning_automation_id, + credential_manager_acs_system_id: $json->credential_manager_acs_system_id, + user_identity_id: $json->user_identity_id, + created_at: $json->created_at, + workspace_id: $json->workspace_id, + ); + } + + + + public function __construct( + public string $acs_credential_provisioning_automation_id, + public string $credential_manager_acs_system_id, + public string $user_identity_id, + public string $created_at, + public string $workspace_id, + ) { + } + +} diff --git a/src/Objects/AcsCredentialVisionlineMetadata.php b/src/Objects/AcsCredentialVisionlineMetadata.php new file mode 100644 index 0000000..bb99509 --- /dev/null +++ b/src/Objects/AcsCredentialVisionlineMetadata.php @@ -0,0 +1,29 @@ +joiner_acs_credential_ids ?? null, + guest_acs_entrance_ids: $json->guest_acs_entrance_ids ?? null, + common_acs_entrance_ids: $json->common_acs_entrance_ids ?? null, + ); + } + + + + public function __construct( + public array | null $joiner_acs_credential_ids, + public array | null $guest_acs_entrance_ids, + public array | null $common_acs_entrance_ids, + ) { + } + +} diff --git a/src/Objects/AcsCredentialWarnings.php b/src/Objects/AcsCredentialWarnings.php new file mode 100644 index 0000000..0e2b955 --- /dev/null +++ b/src/Objects/AcsCredentialWarnings.php @@ -0,0 +1,29 @@ +warning_code, + message: $json->message, + created_at: $json->created_at ?? null, + ); + } + + + + public function __construct( + public string $warning_code, + public string $message, + public string | null $created_at, + ) { + } + +} diff --git a/src/Objects/AcsEntrance.php b/src/Objects/AcsEntrance.php new file mode 100644 index 0000000..f988068 --- /dev/null +++ b/src/Objects/AcsEntrance.php @@ -0,0 +1,35 @@ +acs_entrance_id, + display_name: $json->display_name, + acs_system_id: $json->acs_system_id, + created_at: $json->created_at, + latch_metadata: isset($json->latch_metadata) ? AcsEntranceLatchMetadata::from_json($json->latch_metadata) : null, + visionline_metadata: isset($json->visionline_metadata) ? AcsEntranceVisionlineMetadata::from_json($json->visionline_metadata) : null, + ); + } + + + + public function __construct( + public string $acs_entrance_id, + public string $display_name, + public string $acs_system_id, + public string $created_at, + public AcsEntranceLatchMetadata | null $latch_metadata, + public AcsEntranceVisionlineMetadata | null $visionline_metadata, + ) { + } + +} diff --git a/src/Objects/AcsEntranceLatchMetadata.php b/src/Objects/AcsEntranceLatchMetadata.php new file mode 100644 index 0000000..063d1b5 --- /dev/null +++ b/src/Objects/AcsEntranceLatchMetadata.php @@ -0,0 +1,31 @@ +accessibility_type, + name: $json->name, + type: $json->type, + is_connected: $json->is_connected, + ); + } + + + + public function __construct( + public string $accessibility_type, + public string $name, + public string $type, + public bool $is_connected, + ) { + } + +} diff --git a/src/Objects/AcsEntranceProfiles.php b/src/Objects/AcsEntranceProfiles.php new file mode 100644 index 0000000..b9e0d5e --- /dev/null +++ b/src/Objects/AcsEntranceProfiles.php @@ -0,0 +1,27 @@ +visionline_door_profile_id, + visionline_door_profile_type: $json->visionline_door_profile_type, + ); + } + + + + public function __construct( + public string $visionline_door_profile_id, + public string $visionline_door_profile_type, + ) { + } + +} diff --git a/src/Objects/AcsEntranceVisionlineMetadata.php b/src/Objects/AcsEntranceVisionlineMetadata.php new file mode 100644 index 0000000..9451ff1 --- /dev/null +++ b/src/Objects/AcsEntranceVisionlineMetadata.php @@ -0,0 +1,32 @@ +door_name, + door_category: $json->door_category, + profiles: array_map( + fn ($p) => AcsEntranceProfiles::from_json($p), + $json->profiles ?? [] + ), + ); + } + + + + public function __construct( + public string $door_name, + public string $door_category, + public array | null $profiles, + ) { + } + +} diff --git a/src/Objects/AcsSystem.php b/src/Objects/AcsSystem.php index 8a0c952..dfb99ca 100644 --- a/src/Objects/AcsSystem.php +++ b/src/Objects/AcsSystem.php @@ -12,10 +12,10 @@ public static function from_json(mixed $json): AcsSystem|null } return new self( acs_system_id: $json->acs_system_id, - external_type: $json->external_type, - external_type_display_name: $json->external_type_display_name, - system_type: $json->system_type, - system_type_display_name: $json->system_type_display_name, + external_type: $json->external_type ?? null, + external_type_display_name: $json->external_type_display_name ?? null, + system_type: $json->system_type ?? null, + system_type_display_name: $json->system_type_display_name ?? null, name: $json->name, created_at: $json->created_at, workspace_id: $json->workspace_id, @@ -30,10 +30,10 @@ public static function from_json(mixed $json): AcsSystem|null public function __construct( public string $acs_system_id, - public string $external_type, - public string $external_type_display_name, - public string $system_type, - public string $system_type_display_name, + public string | null $external_type, + public string | null $external_type_display_name, + public string | null $system_type, + public string | null $system_type_display_name, public string $name, public string $created_at, public string $workspace_id, diff --git a/src/Objects/AcsUser.php b/src/Objects/AcsUser.php index 6609b6c..5bf8d4e 100644 --- a/src/Objects/AcsUser.php +++ b/src/Objects/AcsUser.php @@ -22,6 +22,7 @@ public static function from_json(mixed $json): AcsUser|null is_suspended: $json->is_suspended, access_schedule: isset($json->access_schedule) ? AcsUserAccessSchedule::from_json($json->access_schedule) : null, user_identity_id: $json->user_identity_id ?? null, + user_identity_full_name: $json->user_identity_full_name ?? null, user_identity_email_address: $json->user_identity_email_address ?? null, user_identity_phone_number: $json->user_identity_phone_number ?? null, full_name: $json->full_name ?? null, @@ -45,6 +46,7 @@ public function __construct( public bool $is_suspended, public AcsUserAccessSchedule | null $access_schedule, public string | null $user_identity_id, + public string | null $user_identity_full_name, public string | null $user_identity_email_address, public string | null $user_identity_phone_number, public string | null $full_name, diff --git a/src/Objects/ConnectWebview.php b/src/Objects/ConnectWebview.php index 20adb4f..2ad3216 100644 --- a/src/Objects/ConnectWebview.php +++ b/src/Objects/ConnectWebview.php @@ -12,15 +12,15 @@ public static function from_json(mixed $json): ConnectWebview|null } return new self( connect_webview_id: $json->connect_webview_id, + workspace_id: $json->workspace_id, + created_at: $json->created_at, connected_account_id: $json->connected_account_id ?? null, url: $json->url, - workspace_id: $json->workspace_id, device_selection_mode: $json->device_selection_mode, accepted_providers: $json->accepted_providers, accepted_devices: $json->accepted_devices, - any_provider_allowed: $json->any_provider_allowed, any_device_allowed: $json->any_device_allowed, - created_at: $json->created_at, + any_provider_allowed: $json->any_provider_allowed, login_successful: $json->login_successful, status: $json->status, custom_redirect_url: $json->custom_redirect_url ?? null, @@ -37,15 +37,15 @@ public static function from_json(mixed $json): ConnectWebview|null public function __construct( public string $connect_webview_id, + public string $workspace_id, + public string $created_at, public string | null $connected_account_id, public string $url, - public string $workspace_id, public string $device_selection_mode, public array $accepted_providers, public array $accepted_devices, - public bool $any_provider_allowed, public bool $any_device_allowed, - public string $created_at, + public bool $any_provider_allowed, public bool $login_successful, public string $status, public string | null $custom_redirect_url, diff --git a/src/Objects/ConnectedAccount.php b/src/Objects/ConnectedAccount.php index 025ac61..f95b93d 100644 --- a/src/Objects/ConnectedAccount.php +++ b/src/Objects/ConnectedAccount.php @@ -18,7 +18,7 @@ public static function from_json(mixed $json): ConnectedAccount|null account_type_display_name: $json->account_type_display_name, errors: $json->errors ?? null, warnings: $json->warnings ?? null, - custom_metadata: $json->custom_metadata ?? null, + custom_metadata: $json->custom_metadata, automatically_manage_new_devices: $json->automatically_manage_new_devices, ); } diff --git a/src/Objects/Device.php b/src/Objects/Device.php index 40b63a6..498c451 100644 --- a/src/Objects/Device.php +++ b/src/Objects/Device.php @@ -30,7 +30,7 @@ public static function from_json(mixed $json): Device|null ), created_at: $json->created_at, is_managed: $json->is_managed, - custom_metadata: $json->custom_metadata ?? null, + custom_metadata: $json->custom_metadata, can_remotely_unlock: $json->can_remotely_unlock ?? null, can_remotely_lock: $json->can_remotely_lock ?? null, can_program_online_access_codes: $json->can_program_online_access_codes ?? null, diff --git a/src/Objects/DeviceAccessoryKeypad.php b/src/Objects/DeviceAccessoryKeypad.php index 516c87e..f4b6c77 100644 --- a/src/Objects/DeviceAccessoryKeypad.php +++ b/src/Objects/DeviceAccessoryKeypad.php @@ -12,6 +12,7 @@ public static function from_json(mixed $json): DeviceAccessoryKeypad|null } return new self( is_connected: $json->is_connected, + battery: isset($json->battery) ? DeviceBattery::from_json($json->battery) : null, ); } @@ -19,6 +20,7 @@ public static function from_json(mixed $json): DeviceAccessoryKeypad|null public function __construct( public bool $is_connected, + public DeviceBattery | null $battery, ) { } diff --git a/src/Objects/DeviceBattery.php b/src/Objects/DeviceBattery.php index 91f14c7..8c07a19 100644 --- a/src/Objects/DeviceBattery.php +++ b/src/Objects/DeviceBattery.php @@ -12,7 +12,6 @@ public static function from_json(mixed $json): DeviceBattery|null } return new self( level: $json->level, - status: $json->status, ); } @@ -20,7 +19,6 @@ public static function from_json(mixed $json): DeviceBattery|null public function __construct( public int $level, - public string $status, ) { } diff --git a/src/Objects/DeviceIgloohomeMetadata.php b/src/Objects/DeviceIgloohomeMetadata.php index 002f521..5799310 100644 --- a/src/Objects/DeviceIgloohomeMetadata.php +++ b/src/Objects/DeviceIgloohomeMetadata.php @@ -15,6 +15,7 @@ public static function from_json(mixed $json): DeviceIgloohomeMetadata|null device_name: $json->device_name, bridge_id: $json->bridge_id ?? null, bridge_name: $json->bridge_name ?? null, + keypad_id: $json->keypad_id ?? null, ); } @@ -25,6 +26,7 @@ public function __construct( public string $device_name, public string | null $bridge_id, public string | null $bridge_name, + public string | null $keypad_id, ) { } diff --git a/src/Objects/DeviceNukiMetadata.php b/src/Objects/DeviceNukiMetadata.php index e52354a..25a35ca 100644 --- a/src/Objects/DeviceNukiMetadata.php +++ b/src/Objects/DeviceNukiMetadata.php @@ -14,6 +14,8 @@ public static function from_json(mixed $json): DeviceNukiMetadata|null device_id: $json->device_id, device_name: $json->device_name, keypad_battery_critical: $json->keypad_battery_critical ?? null, + keypad_paired: $json->keypad_paired ?? null, + keypad_2_paired: $json->keypad_2_paired ?? null, ); } @@ -23,6 +25,8 @@ public function __construct( public string $device_id, public string $device_name, public bool | null $keypad_battery_critical, + public bool | null $keypad_paired, + public bool | null $keypad_2_paired, ) { } diff --git a/src/Objects/DeviceWyzeMetadata.php b/src/Objects/DeviceWyzeMetadata.php index 6573d79..b78084e 100644 --- a/src/Objects/DeviceWyzeMetadata.php +++ b/src/Objects/DeviceWyzeMetadata.php @@ -17,6 +17,8 @@ public static function from_json(mixed $json): DeviceWyzeMetadata|null product_type: $json->product_type, product_model: $json->product_model, device_info_model: $json->device_info_model, + keypad_uuid: $json->keypad_uuid ?? null, + locker_status_hardlock: $json->locker_status_hardlock ?? null, ); } @@ -29,6 +31,8 @@ public function __construct( public string $product_type, public string $product_model, public string $device_info_model, + public string | null $keypad_uuid, + public int | null $locker_status_hardlock, ) { } diff --git a/src/Objects/Network.php b/src/Objects/Network.php new file mode 100644 index 0000000..d144fcf --- /dev/null +++ b/src/Objects/Network.php @@ -0,0 +1,31 @@ +network_id, + workspace_id: $json->workspace_id, + display_name: $json->display_name, + created_at: $json->created_at, + ); + } + + + + public function __construct( + public string $network_id, + public string $workspace_id, + public string $display_name, + public string $created_at, + ) { + } + +} diff --git a/src/Objects/Phone.php b/src/Objects/Phone.php index 9f6a348..a07d9d4 100644 --- a/src/Objects/Phone.php +++ b/src/Objects/Phone.php @@ -29,7 +29,7 @@ public static function from_json(mixed $json): Phone|null ), created_at: $json->created_at, is_managed: $json->is_managed, - custom_metadata: $json->custom_metadata ?? null, + custom_metadata: $json->custom_metadata, can_remotely_unlock: $json->can_remotely_unlock ?? null, can_remotely_lock: $json->can_remotely_lock ?? null, can_program_online_access_codes: $json->can_program_online_access_codes ?? null, diff --git a/src/Objects/UnmanagedDeviceAccessoryKeypad.php b/src/Objects/UnmanagedDeviceAccessoryKeypad.php new file mode 100644 index 0000000..53e6385 --- /dev/null +++ b/src/Objects/UnmanagedDeviceAccessoryKeypad.php @@ -0,0 +1,27 @@ +is_connected, + battery: isset($json->battery) ? UnmanagedDeviceBattery::from_json($json->battery) : null, + ); + } + + + + public function __construct( + public bool $is_connected, + public UnmanagedDeviceBattery | null $battery, + ) { + } + +} diff --git a/src/Objects/UnmanagedDeviceBattery.php b/src/Objects/UnmanagedDeviceBattery.php index 3e4c6d8..d42332d 100644 --- a/src/Objects/UnmanagedDeviceBattery.php +++ b/src/Objects/UnmanagedDeviceBattery.php @@ -12,7 +12,6 @@ public static function from_json(mixed $json): UnmanagedDeviceBattery|null } return new self( level: $json->level, - status: $json->status, ); } @@ -20,7 +19,6 @@ public static function from_json(mixed $json): UnmanagedDeviceBattery|null public function __construct( public int $level, - public string $status, ) { } diff --git a/src/Objects/UnmanagedDeviceProperties.php b/src/Objects/UnmanagedDeviceProperties.php index 5a2321d..7047a15 100644 --- a/src/Objects/UnmanagedDeviceProperties.php +++ b/src/Objects/UnmanagedDeviceProperties.php @@ -11,6 +11,7 @@ public static function from_json(mixed $json): UnmanagedDeviceProperties|null return null; } return new self( + accessory_keypad: isset($json->accessory_keypad) ? UnmanagedDeviceAccessoryKeypad::from_json($json->accessory_keypad) : null, name: $json->name, online: $json->online, manufacturer: $json->manufacturer ?? null, @@ -27,6 +28,7 @@ public static function from_json(mixed $json): UnmanagedDeviceProperties|null public function __construct( + public UnmanagedDeviceAccessoryKeypad | null $accessory_keypad, public string $name, public bool $online, public string | null $manufacturer, diff --git a/src/Objects/UserIdentity.php b/src/Objects/UserIdentity.php new file mode 100644 index 0000000..f4f2ad1 --- /dev/null +++ b/src/Objects/UserIdentity.php @@ -0,0 +1,39 @@ +user_identity_id, + user_identity_key: $json->user_identity_key ?? null, + email_address: $json->email_address ?? null, + phone_number: $json->phone_number ?? null, + display_name: $json->display_name, + full_name: $json->full_name ?? null, + created_at: $json->created_at, + workspace_id: $json->workspace_id, + ); + } + + + + public function __construct( + public string $user_identity_id, + public string | null $user_identity_key, + public string | null $email_address, + public string | null $phone_number, + public string $display_name, + public string | null $full_name, + public string $created_at, + public string $workspace_id, + ) { + } + +} diff --git a/src/SeamClient.php b/src/SeamClient.php index 9a7f677..18a09b3 100644 --- a/src/SeamClient.php +++ b/src/SeamClient.php @@ -20,8 +20,14 @@ use Seam\Objects\AcsSystem; use Seam\Objects\AcsAccessGroup; use Seam\Objects\AcsUser; +use Seam\Objects\AcsEntrance; +use Seam\Objects\AcsCredentialProvisioningAutomation; +use Seam\Objects\AcsCredentialPool; +use Seam\Objects\AcsCredential; use Seam\Objects\EnrollmentAutomation; use Seam\Objects\Phone; +use Seam\Objects\UserIdentity; +use Seam\Objects\Network; use GuzzleHttp\Client as HTTPClient; use \Exception as Exception; @@ -1706,46 +1712,46 @@ public function __construct(SeamClient $seam) public function get( string $network_id - ): void { + ): Network { $request_payload = []; if ($network_id !== null) { $request_payload["network_id"] = $network_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/networks/get", json: $request_payload, - + inner_object: "network", ); - + return Network::from_json($res); } public function list( - ): void { + ): array { $request_payload = []; - $this->seam->request( + $res = $this->seam->request( "POST", "/networks/list", json: $request_payload, - + inner_object: "networks", ); - + return array_map(fn ($r) => Network::from_json($r), $res); } } @@ -2200,7 +2206,7 @@ public function create( string $email_address = null, string $phone_number = null, string $full_name = null - ): void { + ): UserIdentity { $request_payload = []; if ($user_identity_key !== null) { @@ -2216,18 +2222,18 @@ public function create( $request_payload["full_name"] = $full_name; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/create", json: $request_payload, - + inner_object: "user_identity", ); - + return UserIdentity::from_json($res); } public function delete( @@ -2256,7 +2262,7 @@ public function delete( public function get( string $user_identity_id = null, string $user_identity_key = null - ): void { + ): UserIdentity { $request_payload = []; if ($user_identity_id !== null) { @@ -2266,18 +2272,18 @@ public function get( $request_payload["user_identity_key"] = $user_identity_key; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/get", json: $request_payload, - + inner_object: "user_identity", ); - + return UserIdentity::from_json($res); } public function grant_access_to_device( @@ -2309,14 +2315,14 @@ public function grant_access_to_device( public function list( string $credential_manager_acs_system_id = null - ): void { + ): array { $request_payload = []; if ($credential_manager_acs_system_id !== null) { $request_payload["credential_manager_acs_system_id"] = $credential_manager_acs_system_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/list", json: $request_payload, @@ -2327,76 +2333,76 @@ public function list( - + return array_map(fn ($r) => UserIdentity::from_json($r), $res); } public function list_accessible_devices( string $user_identity_id - ): void { + ): array { $request_payload = []; if ($user_identity_id !== null) { $request_payload["user_identity_id"] = $user_identity_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/list_accessible_devices", json: $request_payload, - + inner_object: "devices", ); - + return array_map(fn ($r) => Device::from_json($r), $res); } public function list_acs_systems( string $user_identity_id - ): void { + ): array { $request_payload = []; if ($user_identity_id !== null) { $request_payload["user_identity_id"] = $user_identity_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/list_acs_systems", json: $request_payload, - + inner_object: "acs_systems", ); - + return array_map(fn ($r) => AcsSystem::from_json($r), $res); } public function list_acs_users( string $user_identity_id - ): void { + ): array { $request_payload = []; if ($user_identity_id !== null) { $request_payload["user_identity_id"] = $user_identity_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/list_acs_users", json: $request_payload, - + inner_object: "acs_users", ); - + return array_map(fn ($r) => AcsUser::from_json($r), $res); } public function remove_acs_user( @@ -2645,7 +2651,7 @@ public function create( bool $is_sandbox = null, string $webview_primary_button_color = null, string $webview_logo_shape = null - ): void { + ): Workspace { $request_payload = []; if ($name !== null) { @@ -2664,18 +2670,18 @@ public function create( $request_payload["webview_logo_shape"] = $webview_logo_shape; } - $this->seam->request( + $res = $this->seam->request( "POST", "/workspaces/create", json: $request_payload, - + inner_object: "workspace", ); - + return Workspace::from_json($res); } public function get( @@ -3010,31 +3016,31 @@ public function add_user( public function get( string $acs_access_group_id - ): void { + ): AcsAccessGroup { $request_payload = []; if ($acs_access_group_id !== null) { $request_payload["acs_access_group_id"] = $acs_access_group_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/access_groups/get", json: $request_payload, - + inner_object: "acs_access_group", ); - + return AcsAccessGroup::from_json($res); } public function list( string $acs_system_id = null, string $acs_user_id = null - ): void { + ): array { $request_payload = []; if ($acs_system_id !== null) { @@ -3044,41 +3050,41 @@ public function list( $request_payload["acs_user_id"] = $acs_user_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/access_groups/list", json: $request_payload, - + inner_object: "acs_access_groups", ); - + return array_map(fn ($r) => AcsAccessGroup::from_json($r), $res); } public function list_users( string $acs_access_group_id - ): void { + ): array { $request_payload = []; if ($acs_access_group_id !== null) { $request_payload["acs_access_group_id"] = $acs_access_group_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/access_groups/list_users", json: $request_payload, - + inner_object: "acs_users", ); - + return array_map(fn ($r) => AcsUser::from_json($r), $res); } public function remove_user( @@ -3148,25 +3154,25 @@ public function __construct(SeamClient $seam) public function list( string $acs_system_id - ): void { + ): array { $request_payload = []; if ($acs_system_id !== null) { $request_payload["acs_system_id"] = $acs_system_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/credential_pools/list", json: $request_payload, - + inner_object: "acs_credential_pools", ); - + return array_map(fn ($r) => AcsCredentialPool::from_json($r), $res); } } @@ -3188,7 +3194,7 @@ public function launch( string $acs_credential_pool_id = null, bool $create_credential_manager_user = null, string $credential_manager_acs_user_id = null - ): void { + ): AcsCredentialProvisioningAutomation { $request_payload = []; if ($user_identity_id !== null) { @@ -3207,18 +3213,18 @@ public function launch( $request_payload["credential_manager_acs_user_id"] = $credential_manager_acs_user_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/credential_provisioning_automations/launch", json: $request_payload, - + inner_object: "acs_credential_provisioning_automation", ); - + return AcsCredentialProvisioningAutomation::from_json($res); } } @@ -3271,7 +3277,7 @@ public function create( mixed $visionline_metadata = null, string $starts_at = null, string $ends_at = null - ): void { + ): AcsCredential { $request_payload = []; if ($acs_user_id !== null) { @@ -3302,18 +3308,18 @@ public function create( $request_payload["ends_at"] = $ends_at; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/credentials/create", json: $request_payload, - + inner_object: "acs_credential", ); - + return AcsCredential::from_json($res); } public function delete( @@ -3341,25 +3347,25 @@ public function delete( public function get( string $acs_credential_id - ): void { + ): AcsCredential { $request_payload = []; if ($acs_credential_id !== null) { $request_payload["acs_credential_id"] = $acs_credential_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/credentials/get", json: $request_payload, - + inner_object: "acs_credential", ); - + return AcsCredential::from_json($res); } public function list( @@ -3367,7 +3373,7 @@ public function list( string $acs_system_id = null, string $user_identity_id = null, bool $is_multi_phone_sync_credential = null - ): void { + ): array { $request_payload = []; if ($acs_user_id !== null) { @@ -3383,18 +3389,18 @@ public function list( $request_payload["is_multi_phone_sync_credential"] = $is_multi_phone_sync_credential; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/credentials/list", json: $request_payload, - + inner_object: "acs_credentials", ); - + return array_map(fn ($r) => AcsCredential::from_json($r), $res); } public function unassign( @@ -3466,25 +3472,25 @@ public function __construct(SeamClient $seam) public function get( string $acs_entrance_id - ): void { + ): AcsEntrance { $request_payload = []; if ($acs_entrance_id !== null) { $request_payload["acs_entrance_id"] = $acs_entrance_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/entrances/get", json: $request_payload, - + inner_object: "acs_entrance", ); - + return AcsEntrance::from_json($res); } public function grant_access( @@ -3517,7 +3523,7 @@ public function grant_access( public function list( string $acs_system_id = null, string $acs_credential_id = null - ): void { + ): array { $request_payload = []; if ($acs_system_id !== null) { @@ -3527,24 +3533,24 @@ public function list( $request_payload["acs_credential_id"] = $acs_credential_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/entrances/list", json: $request_payload, - + inner_object: "acs_entrances", ); - + return array_map(fn ($r) => AcsEntrance::from_json($r), $res); } public function list_credentials_with_access( string $acs_entrance_id, array $include_if = null - ): void { + ): array { $request_payload = []; if ($acs_entrance_id !== null) { @@ -3554,18 +3560,18 @@ public function list_credentials_with_access( $request_payload["include_if"] = $include_if; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/entrances/list_credentials_with_access", json: $request_payload, - + inner_object: "acs_credentials", ); - + return array_map(fn ($r) => AcsCredential::from_json($r), $res); } } @@ -3583,48 +3589,48 @@ public function __construct(SeamClient $seam) public function get( string $acs_system_id - ): void { + ): AcsSystem { $request_payload = []; if ($acs_system_id !== null) { $request_payload["acs_system_id"] = $acs_system_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/systems/get", json: $request_payload, - + inner_object: "acs_system", ); - + return AcsSystem::from_json($res); } public function list( string $connected_account_id = null - ): void { + ): array { $request_payload = []; if ($connected_account_id !== null) { $request_payload["connected_account_id"] = $connected_account_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/systems/list", json: $request_payload, - + inner_object: "acs_systems", ); - + return array_map(fn ($r) => AcsSystem::from_json($r), $res); } } @@ -3676,7 +3682,7 @@ public function create( string $email = null, string $phone_number = null, string $email_address = null - ): void { + ): AcsUser { $request_payload = []; if ($acs_system_id !== null) { @@ -3704,18 +3710,18 @@ public function create( $request_payload["email_address"] = $email_address; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/users/create", json: $request_payload, - + inner_object: "acs_user", ); - + return AcsUser::from_json($res); } public function delete( @@ -3743,25 +3749,25 @@ public function delete( public function get( string $acs_user_id - ): void { + ): AcsUser { $request_payload = []; if ($acs_user_id !== null) { $request_payload["acs_user_id"] = $acs_user_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/users/get", json: $request_payload, - + inner_object: "acs_user", ); - + return AcsUser::from_json($res); } public function list( @@ -3769,7 +3775,7 @@ public function list( string $user_identity_phone_number = null, string $user_identity_email_address = null, string $acs_system_id = null - ): void { + ): array { $request_payload = []; if ($user_identity_id !== null) { @@ -3785,41 +3791,41 @@ public function list( $request_payload["acs_system_id"] = $acs_system_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/users/list", json: $request_payload, - + inner_object: "acs_users", ); - + return array_map(fn ($r) => AcsUser::from_json($r), $res); } public function list_accessible_entrances( string $acs_user_id - ): void { + ): array { $request_payload = []; if ($acs_user_id !== null) { $request_payload["acs_user_id"] = $acs_user_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/acs/users/list_accessible_entrances", json: $request_payload, - + inner_object: "acs_entrances", ); - + return array_map(fn ($r) => AcsEntrance::from_json($r), $res); } public function remove_from_access_group( @@ -4750,25 +4756,25 @@ public function delete( public function get( string $enrollment_automation_id - ): void { + ): EnrollmentAutomation { $request_payload = []; if ($enrollment_automation_id !== null) { $request_payload["enrollment_automation_id"] = $enrollment_automation_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/enrollment_automations/get", json: $request_payload, - + inner_object: "enrollment_automation", ); - + return EnrollmentAutomation::from_json($res); } public function launch( @@ -4800,7 +4806,7 @@ public function launch( "POST", "/user_identities/enrollment_automations/launch", json: $request_payload, - + inner_object: "enrollment_automation", ); @@ -4812,25 +4818,25 @@ public function launch( public function list( string $user_identity_id - ): void { + ): array { $request_payload = []; if ($user_identity_id !== null) { $request_payload["user_identity_id"] = $user_identity_id; } - $this->seam->request( + $res = $this->seam->request( "POST", "/user_identities/enrollment_automations/list", json: $request_payload, - + inner_object: "enrollment_automations", ); - + return array_map(fn ($r) => EnrollmentAutomation::from_json($r), $res); } }