Skip to content

Commit 7d7d2bd

Browse files
authored
Merge pull request #3 from CyberfusionNL/1.71.0
Version 1.71.0
2 parents 011d1b9 + 4e73f94 commit 7d7d2bd

15 files changed

+54
-13
lines changed

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
77
cluster API. See the changelog of the [cluster API](https://cluster-api.cyberfusion.nl/redoc#section/Changelog) for
88
detailed information.
99

10+
## [1.71.0]
11+
12+
### Added
13+
14+
- Add the `expiresIn` attribute to tokens.
15+
- Add the `description` attribute to clusters.
16+
17+
### Changed
18+
19+
- Update to [API version 1.143](https://cluster-api.cyberfusion.nl/redoc#section/Changelog/1.143-2022-10-19).
20+
- Add max length to `CmsInstallation` (`database_user_password` + `admin_password`) and `CmsConfigurationConstant` (`value`)
21+
- Remove min length validation from strings.
22+
23+
## [1.70.0]
24+
25+
### Changed
26+
27+
- Renamed package and namespace.
28+
1029
## [1.69.1]
1130

1231
### Fixed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Client for the [Cyberfusion Cluster API](https://cluster-api.cyberfusion.nl/).
44

5-
This client was built for and tested on the **1.142** version of the API.
5+
This client was built for and tested on the **1.143** version of the API.
66

77
## Support
88

src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Client implements ClientContract
2020
{
2121
private const CONNECT_TIMEOUT = 60;
2222
private const TIMEOUT = 180;
23-
private const VERSION = '1.70';
23+
private const VERSION = '1.71';
2424
private const USER_AGENT = 'cyberfusion-cluster-api-client/' . self::VERSION;
2525

2626
private Configuration $configuration;

src/Models/BorgRepository.php

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public function setPassphrase(string $passphrase): BorgRepository
5151
{
5252
Validator::value($passphrase)
5353
->maxLength(255)
54-
->minLength(1)
5554
->validate();
5655

5756
$this->passphrase = $passphrase;

src/Models/Certificate.php

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ public function getCommonNames(): array
4040
public function setCommonNames(array $commonNames): Certificate
4141
{
4242
Validator::value($commonNames)
43-
->minLength(1)
4443
->unique()
4544
->validate();
4645

src/Models/Cluster.php

+15
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Cluster extends ClusterModel implements Model
2222
private ?bool $malwareToolkitScansEnabled = null;
2323
private ?bool $bubblewrapToolkitEnabled = null;
2424
private ?bool $syncToolkitEnabled = null;
25+
private ?string $description = null;
2526
private ?int $id = null;
2627
private ?string $createdAt = null;
2728
private ?string $updatedAt = null;
@@ -206,6 +207,18 @@ public function setSyncToolkitEnabled(?bool $syncToolkitEnabled): Cluster
206207
return $this;
207208
}
208209

210+
public function getDescription(): ?string
211+
{
212+
return $this->description;
213+
}
214+
215+
public function setDescription(?string $description): Cluster
216+
{
217+
$this->description = $description;
218+
219+
return $this;
220+
}
221+
209222
public function getId(): ?int
210223
{
211224
return $this->id;
@@ -260,6 +273,7 @@ public function fromArray(array $data): Cluster
260273
->setMalwareToolkitScansEnabled(Arr::get($data, 'malware_toolkit_scans_enabled'))
261274
->setBubblewrapToolkitEnabled(Arr::get($data, 'bubblewrap_toolkit_enabled'))
262275
->setSyncToolkitEnabled(Arr::get($data, 'sync_toolkit_enabled'))
276+
->setDescription(Arr::get($data, 'description'))
263277
->setId(Arr::get($data, 'id'))
264278
->setCreatedAt(Arr::get($data, 'created_at'))
265279
->setUpdatedAt(Arr::get($data, 'updated_at'));
@@ -283,6 +297,7 @@ public function toArray(): array
283297
'malware_toolkit_scans_enabled' => $this->isMalwareToolkitScansEnabled(),
284298
'bubblewrap_toolkit_enabled' => $this->isBubblewrapToolkitEnabled(),
285299
'sync_toolkit_enabled' => $this->isSyncToolkitEnabled(),
300+
'description' => $this->getDescription(),
286301
'id' => $this->getId(),
287302
'created_at' => $this->getCreatedAt(),
288303
'updated_at' => $this->getUpdatedAt(),

src/Models/CmsConfigurationConstant.php

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function setName(string $name): CmsConfigurationConstant
2121
{
2222
Validator::value($name)
2323
->valueIn(CmsConfigurationConstantName::AVAILABLE)
24+
->maxLength(255)
2425
->validate();
2526

2627
$this->name = $name;

src/Models/CmsInstallation.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getDatabaseUserPassword(): string
6262
public function setDatabaseUserPassword(string $databaseUserPassword): CmsInstallation
6363
{
6464
Validator::value($databaseUserPassword)
65-
->minLength(1)
65+
->maxLength(255)
6666
->validate();
6767

6868
$this->databaseUserPassword = $databaseUserPassword;
@@ -178,7 +178,7 @@ public function getAdminPassword(): string
178178
public function setAdminPassword(string $adminPassword): CmsInstallation
179179
{
180180
Validator::value($adminPassword)
181-
->minLength(1)
181+
->maxLength(255)
182182
->validate();
183183

184184
$this->adminPassword = $adminPassword;

src/Models/Cron.php

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function getCommand(): string
4848
public function setCommand(string $command): Cron
4949
{
5050
Validator::value($command)
51-
->minLength(1)
5251
->maxLength(65535)
5352
->validate();
5453

src/Models/DatabaseUser.php

-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public function getHashedPassword(): ?string
6464
public function setPassword(string $password): DatabaseUser
6565
{
6666
Validator::value($password)
67-
->minLength(1)
6867
->maxLength(255)
6968
->validate();
7069

src/Models/MailAlias.php

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public function setForwardEmailAddresses(array $forwardEmailAddresses): MailAlia
4242
{
4343
Validator::value($forwardEmailAddresses)
4444
->unique()
45-
->minLength(1)
4645
->validate();
4746

4847
$this->forwardEmailAddresses = $forwardEmailAddresses;

src/Models/TaskCollection.php

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function getDescription(): string
3939
public function setDescription(string $description): TaskCollection
4040
{
4141
Validator::value($description)
42-
->minLength(1)
4342
->maxLength(255)
4443
->validate();
4544

src/Models/TaskResult.php

-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public function getDescription(): string
3838
public function setDescription(string $description): TaskResult
3939
{
4040
Validator::value($description)
41-
->minLength(1)
4241
->maxLength(65535)
4342
->validate();
4443

@@ -55,7 +54,6 @@ public function getMessage(): string
5554
public function setMessage(string $message): TaskResult
5655
{
5756
Validator::value($message)
58-
->minLength(1)
5957
->maxLength(65535)
6058
->validate();
6159

src/Models/Token.php

+15
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Token extends ClusterModel implements Model
99
{
1010
private string $accessToken;
1111
private string $tokenType;
12+
private int $expiresIn;
1213

1314
public function getAccessToken(): string
1415
{
@@ -22,6 +23,18 @@ public function setAccessToken(string $accessToken): Token
2223
return $this;
2324
}
2425

26+
public function getExpiresIn(): int
27+
{
28+
return $this->expiresIn;
29+
}
30+
31+
public function setExpiresIn(int $expiresIn): Token
32+
{
33+
$this->expiresIn = $expiresIn;
34+
35+
return $this;
36+
}
37+
2538
public function getTokenType(): string
2639
{
2740
return $this->tokenType;
@@ -38,13 +51,15 @@ public function fromArray(array $data): Token
3851
{
3952
return $this
4053
->setAccessToken(Arr::get($data, 'access_token', ''))
54+
->setExpiresIn(Arr::get($data, 'expires_in', ''))
4155
->setTokenType(Arr::get($data, 'token_type', ''));
4256
}
4357

4458
public function toArray(): array
4559
{
4660
return [
4761
'access_token' => $this->getAccessToken(),
62+
'expires_in' => $this->getExpiresIn(),
4863
'token_type' => $this->getTokenType(),
4964
];
5065
}

src/Models/UrlRedirect.php

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function setDestinationUrl(string $destinationUrl): UrlRedirect
6060
{
6161
Validator::value($destinationUrl)
6262
->maxLength(2083)
63-
->minLength(1)
6463
->validate();
6564

6665
$this->destinationUrl = $destinationUrl;

0 commit comments

Comments
 (0)