Skip to content

Commit 064ff63

Browse files
authored
Merge pull request #47 from appwrite/dev
feat: PHP SDK update for version 17.2.0
2 parents d2260f6 + 019bfe5 commit 064ff63

File tree

11 files changed

+584
-2
lines changed

11 files changed

+584
-2
lines changed

src/Appwrite/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class Client
3737
*/
3838
protected array $headers = [
3939
'content-type' => '',
40-
'user-agent' => 'AppwritePHPSDK/17.1.0 ()',
40+
'user-agent' => 'AppwritePHPSDK/17.2.0 ()',
4141
'x-sdk-name'=> 'PHP',
4242
'x-sdk-platform'=> 'server',
4343
'x-sdk-language'=> 'php',
44-
'x-sdk-version'=> '17.1.0',
44+
'x-sdk-version'=> '17.2.0',
4545
];
4646

4747
/**
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class AttributeStatus implements JsonSerializable
8+
{
9+
private static AttributeStatus $AVAILABLE;
10+
private static AttributeStatus $PROCESSING;
11+
private static AttributeStatus $DELETING;
12+
private static AttributeStatus $STUCK;
13+
private static AttributeStatus $FAILED;
14+
15+
private string $value;
16+
17+
private function __construct(string $value)
18+
{
19+
$this->value = $value;
20+
}
21+
22+
public function __toString(): string
23+
{
24+
return $this->value;
25+
}
26+
27+
public function jsonSerialize(): string
28+
{
29+
return $this->value;
30+
}
31+
32+
public static function AVAILABLE(): AttributeStatus
33+
{
34+
if (!isset(self::$AVAILABLE)) {
35+
self::$AVAILABLE = new AttributeStatus('available');
36+
}
37+
return self::$AVAILABLE;
38+
}
39+
public static function PROCESSING(): AttributeStatus
40+
{
41+
if (!isset(self::$PROCESSING)) {
42+
self::$PROCESSING = new AttributeStatus('processing');
43+
}
44+
return self::$PROCESSING;
45+
}
46+
public static function DELETING(): AttributeStatus
47+
{
48+
if (!isset(self::$DELETING)) {
49+
self::$DELETING = new AttributeStatus('deleting');
50+
}
51+
return self::$DELETING;
52+
}
53+
public static function STUCK(): AttributeStatus
54+
{
55+
if (!isset(self::$STUCK)) {
56+
self::$STUCK = new AttributeStatus('stuck');
57+
}
58+
return self::$STUCK;
59+
}
60+
public static function FAILED(): AttributeStatus
61+
{
62+
if (!isset(self::$FAILED)) {
63+
self::$FAILED = new AttributeStatus('failed');
64+
}
65+
return self::$FAILED;
66+
}
67+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class ColumnStatus implements JsonSerializable
8+
{
9+
private static ColumnStatus $AVAILABLE;
10+
private static ColumnStatus $PROCESSING;
11+
private static ColumnStatus $DELETING;
12+
private static ColumnStatus $STUCK;
13+
private static ColumnStatus $FAILED;
14+
15+
private string $value;
16+
17+
private function __construct(string $value)
18+
{
19+
$this->value = $value;
20+
}
21+
22+
public function __toString(): string
23+
{
24+
return $this->value;
25+
}
26+
27+
public function jsonSerialize(): string
28+
{
29+
return $this->value;
30+
}
31+
32+
public static function AVAILABLE(): ColumnStatus
33+
{
34+
if (!isset(self::$AVAILABLE)) {
35+
self::$AVAILABLE = new ColumnStatus('available');
36+
}
37+
return self::$AVAILABLE;
38+
}
39+
public static function PROCESSING(): ColumnStatus
40+
{
41+
if (!isset(self::$PROCESSING)) {
42+
self::$PROCESSING = new ColumnStatus('processing');
43+
}
44+
return self::$PROCESSING;
45+
}
46+
public static function DELETING(): ColumnStatus
47+
{
48+
if (!isset(self::$DELETING)) {
49+
self::$DELETING = new ColumnStatus('deleting');
50+
}
51+
return self::$DELETING;
52+
}
53+
public static function STUCK(): ColumnStatus
54+
{
55+
if (!isset(self::$STUCK)) {
56+
self::$STUCK = new ColumnStatus('stuck');
57+
}
58+
return self::$STUCK;
59+
}
60+
public static function FAILED(): ColumnStatus
61+
{
62+
if (!isset(self::$FAILED)) {
63+
self::$FAILED = new ColumnStatus('failed');
64+
}
65+
return self::$FAILED;
66+
}
67+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class DatabaseType implements JsonSerializable
8+
{
9+
private static DatabaseType $LEGACY;
10+
private static DatabaseType $TABLESDB;
11+
12+
private string $value;
13+
14+
private function __construct(string $value)
15+
{
16+
$this->value = $value;
17+
}
18+
19+
public function __toString(): string
20+
{
21+
return $this->value;
22+
}
23+
24+
public function jsonSerialize(): string
25+
{
26+
return $this->value;
27+
}
28+
29+
public static function LEGACY(): DatabaseType
30+
{
31+
if (!isset(self::$LEGACY)) {
32+
self::$LEGACY = new DatabaseType('legacy');
33+
}
34+
return self::$LEGACY;
35+
}
36+
public static function TABLESDB(): DatabaseType
37+
{
38+
if (!isset(self::$TABLESDB)) {
39+
self::$TABLESDB = new DatabaseType('tablesdb');
40+
}
41+
return self::$TABLESDB;
42+
}
43+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class DeploymentStatus implements JsonSerializable
8+
{
9+
private static DeploymentStatus $WAITING;
10+
private static DeploymentStatus $PROCESSING;
11+
private static DeploymentStatus $BUILDING;
12+
private static DeploymentStatus $READY;
13+
private static DeploymentStatus $FAILED;
14+
15+
private string $value;
16+
17+
private function __construct(string $value)
18+
{
19+
$this->value = $value;
20+
}
21+
22+
public function __toString(): string
23+
{
24+
return $this->value;
25+
}
26+
27+
public function jsonSerialize(): string
28+
{
29+
return $this->value;
30+
}
31+
32+
public static function WAITING(): DeploymentStatus
33+
{
34+
if (!isset(self::$WAITING)) {
35+
self::$WAITING = new DeploymentStatus('waiting');
36+
}
37+
return self::$WAITING;
38+
}
39+
public static function PROCESSING(): DeploymentStatus
40+
{
41+
if (!isset(self::$PROCESSING)) {
42+
self::$PROCESSING = new DeploymentStatus('processing');
43+
}
44+
return self::$PROCESSING;
45+
}
46+
public static function BUILDING(): DeploymentStatus
47+
{
48+
if (!isset(self::$BUILDING)) {
49+
self::$BUILDING = new DeploymentStatus('building');
50+
}
51+
return self::$BUILDING;
52+
}
53+
public static function READY(): DeploymentStatus
54+
{
55+
if (!isset(self::$READY)) {
56+
self::$READY = new DeploymentStatus('ready');
57+
}
58+
return self::$READY;
59+
}
60+
public static function FAILED(): DeploymentStatus
61+
{
62+
if (!isset(self::$FAILED)) {
63+
self::$FAILED = new DeploymentStatus('failed');
64+
}
65+
return self::$FAILED;
66+
}
67+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class ExecutionStatus implements JsonSerializable
8+
{
9+
private static ExecutionStatus $WAITING;
10+
private static ExecutionStatus $PROCESSING;
11+
private static ExecutionStatus $COMPLETED;
12+
private static ExecutionStatus $FAILED;
13+
14+
private string $value;
15+
16+
private function __construct(string $value)
17+
{
18+
$this->value = $value;
19+
}
20+
21+
public function __toString(): string
22+
{
23+
return $this->value;
24+
}
25+
26+
public function jsonSerialize(): string
27+
{
28+
return $this->value;
29+
}
30+
31+
public static function WAITING(): ExecutionStatus
32+
{
33+
if (!isset(self::$WAITING)) {
34+
self::$WAITING = new ExecutionStatus('waiting');
35+
}
36+
return self::$WAITING;
37+
}
38+
public static function PROCESSING(): ExecutionStatus
39+
{
40+
if (!isset(self::$PROCESSING)) {
41+
self::$PROCESSING = new ExecutionStatus('processing');
42+
}
43+
return self::$PROCESSING;
44+
}
45+
public static function COMPLETED(): ExecutionStatus
46+
{
47+
if (!isset(self::$COMPLETED)) {
48+
self::$COMPLETED = new ExecutionStatus('completed');
49+
}
50+
return self::$COMPLETED;
51+
}
52+
public static function FAILED(): ExecutionStatus
53+
{
54+
if (!isset(self::$FAILED)) {
55+
self::$FAILED = new ExecutionStatus('failed');
56+
}
57+
return self::$FAILED;
58+
}
59+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
namespace Appwrite\Enums;
4+
5+
use JsonSerializable;
6+
7+
class ExecutionTrigger implements JsonSerializable
8+
{
9+
private static ExecutionTrigger $HTTP;
10+
private static ExecutionTrigger $SCHEDULE;
11+
private static ExecutionTrigger $EVENT;
12+
13+
private string $value;
14+
15+
private function __construct(string $value)
16+
{
17+
$this->value = $value;
18+
}
19+
20+
public function __toString(): string
21+
{
22+
return $this->value;
23+
}
24+
25+
public function jsonSerialize(): string
26+
{
27+
return $this->value;
28+
}
29+
30+
public static function HTTP(): ExecutionTrigger
31+
{
32+
if (!isset(self::$HTTP)) {
33+
self::$HTTP = new ExecutionTrigger('http');
34+
}
35+
return self::$HTTP;
36+
}
37+
public static function SCHEDULE(): ExecutionTrigger
38+
{
39+
if (!isset(self::$SCHEDULE)) {
40+
self::$SCHEDULE = new ExecutionTrigger('schedule');
41+
}
42+
return self::$SCHEDULE;
43+
}
44+
public static function EVENT(): ExecutionTrigger
45+
{
46+
if (!isset(self::$EVENT)) {
47+
self::$EVENT = new ExecutionTrigger('event');
48+
}
49+
return self::$EVENT;
50+
}
51+
}

0 commit comments

Comments
 (0)