diff --git a/package-lock.json b/package-lock.json index 24f08ea..40be9af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "devDependencies": { "@prettier/plugin-php": "^0.24.0", "@seamapi/nextlove-sdk-generator": "^1.19.6", - "@seamapi/types": "1.694.0", + "@seamapi/types": "1.700.0", "del": "^7.1.0", "prettier": "^3.0.0" } @@ -456,9 +456,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.694.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.694.0.tgz", - "integrity": "sha512-/3x5iWWVMKguQexMyCNSJF7NWF+HIa7lzSIlBVJq2bPxpWoZDmpZS24ntxRzA6thecjc/LbmseMebSCmXPNZLA==", + "version": "1.700.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.700.0.tgz", + "integrity": "sha512-EnuGUjBRtPaL/b/Smessj5O1SZNtBBycVHReWF75eC9hC9GhaLCJvbrF9e1tr+OP7Y5vDm4e4wotwMUFuSJEHQ==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 6bdd9c3..b3d32fa 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@prettier/plugin-php": "^0.24.0", "@seamapi/nextlove-sdk-generator": "^1.19.6", - "@seamapi/types": "1.694.0", + "@seamapi/types": "1.700.0", "del": "^7.1.0", "prettier": "^3.0.0" } diff --git a/src/Objects/AccessGrant.php b/src/Objects/AccessGrant.php index 2080f31..4ae2b38 100644 --- a/src/Objects/AccessGrant.php +++ b/src/Objects/AccessGrant.php @@ -14,6 +14,10 @@ public static function from_json(mixed $json): AccessGrant|null access_method_ids: $json->access_method_ids, created_at: $json->created_at, display_name: $json->display_name, + errors: array_map( + fn($e) => AccessGrantErrors::from_json($e), + $json->errors ?? [], + ), location_ids: $json->location_ids, requested_access_methods: array_map( fn($r) => AccessGrantRequestedAccessMethods::from_json($r), @@ -42,6 +46,7 @@ public function __construct( public array $access_method_ids, public string $created_at, public string $display_name, + public array $errors, public array $location_ids, public array $requested_access_methods, public array $space_ids, diff --git a/src/Objects/AccessGrantErrors.php b/src/Objects/AccessGrantErrors.php new file mode 100644 index 0000000..5e0ea23 --- /dev/null +++ b/src/Objects/AccessGrantErrors.php @@ -0,0 +1,24 @@ +created_at, + error_code: $json->error_code, + message: $json->message, + ); + } + + public function __construct( + public string $created_at, + public string $error_code, + public string $message, + ) {} +}