Skip to content

Commit 5fdd3de

Browse files
committed
fix: minor bugs
1 parent e53eac0 commit 5fdd3de

File tree

16 files changed

+64
-47
lines changed

16 files changed

+64
-47
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Appwrite PHP SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?style=flat-square&v=1)
4-
![Version](https://img.shields.io/badge/api%20version-1.5.4-blue.svg?style=flat-square&v=1)
4+
![Version](https://img.shields.io/badge/api%20version-1.5.6-blue.svg?style=flat-square&v=1)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

docs/account.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ PATCH https://cloud.appwrite.io/v1/account/mfa
112112
POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
113113
```
114114

115-
** Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator) method. **
115+
** Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method. **
116116

117117
### Parameters
118118

@@ -126,7 +126,7 @@ POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
126126
PUT https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
127127
```
128128

129-
** Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#addAuthenticator) method. **
129+
** Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. add **
130130

131131
### Parameters
132132

docs/avatars.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When one dimension is specified and the other is 0, the image is scaled with pre
3434

3535
| Field Name | Type | Description | Default |
3636
| --- | --- | --- | --- |
37-
| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, censosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro. | |
37+
| code | string | **Required** Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro. | |
3838
| width | integer | Image width. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
3939
| height | integer | Image height. Pass an integer between 0 to 2000. Defaults to 100. | 100 |
4040
| quality | integer | Image quality. Pass an integer between 0 to 100. Defaults to 100. | 100 |

docs/examples/messaging/update-email.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ $result = $messaging->updateEmail(
2121
html: false, // optional
2222
cc: [], // optional
2323
bcc: [], // optional
24-
scheduledAt: '' // optional
24+
scheduledAt: '', // optional
25+
attachments: [] // optional
2526
);

docs/messaging.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ POST https://cloud.appwrite.io/v1/messaging/messages/email
3535
| targets | array | List of Targets IDs. | [] |
3636
| cc | array | Array of target IDs to be added as CC. | [] |
3737
| bcc | array | Array of target IDs to be added as BCC. | [] |
38-
| attachments | array | Array of compound bucket IDs to file IDs to be attached to the email. | [] |
38+
| attachments | array | Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>. | [] |
3939
| draft | boolean | Is message a draft | |
4040
| html | boolean | Is content of type HTML | |
4141
| scheduledAt | string | Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. | |
@@ -64,6 +64,7 @@ PATCH https://cloud.appwrite.io/v1/messaging/messages/email/{messageId}
6464
| cc | array | Array of target IDs to be added as CC. | |
6565
| bcc | array | Array of target IDs to be added as BCC. | |
6666
| scheduledAt | string | Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. | |
67+
| attachments | array | Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>. | |
6768

6869
## Create push notification
6970

@@ -85,7 +86,7 @@ POST https://cloud.appwrite.io/v1/messaging/messages/push
8586
| targets | array | List of Targets IDs. | [] |
8687
| data | object | Additional Data for push notification. | {} |
8788
| action | string | Action for push notification. | |
88-
| image | string | Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. | |
89+
| image | string | Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>. | |
8990
| icon | string | Icon for push notification. Available only for Android and Web Platform. | |
9091
| sound | string | Sound for push notification. Available only for Android and IOS Platform. | |
9192
| color | string | Color for push notification. Available only for Android Platform. | |
@@ -115,7 +116,7 @@ PATCH https://cloud.appwrite.io/v1/messaging/messages/push/{messageId}
115116
| body | string | Body for push notification. | |
116117
| data | object | Additional Data for push notification. | {} |
117118
| action | string | Action for push notification. | |
118-
| image | string | Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. | |
119+
| image | string | Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>. | |
119120
| icon | string | Icon for push notification. Available only for Android and Web platforms. | |
120121
| sound | string | Sound for push notification. Available only for Android and iOS platforms. | |
121122
| color | string | Color for push notification. Available only for Android platforms. | |

docs/users.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,8 @@ DELETE https://cloud.appwrite.io/v1/users/{userId}/targets/{targetId}
601601
POST https://cloud.appwrite.io/v1/users/{userId}/tokens
602602
```
603603

604-
** Returns a token with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [PUT /account/sessions/custom](https://appwrite.io/docs/references/cloud/client-web/account#updateCustomSession) endpoint to complete the login process. **
604+
** Returns a token with a secret key for creating a session. Use the user ID and secret and submit a request to the [PUT /account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process.
605+
**
605606

606607
### Parameters
607608

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 $headers = [
3939
'content-type' => '',
40-
'user-agent' => 'AppwritePHPSDK/11.0.1 ()',
40+
'user-agent' => 'AppwritePHPSDK/11.0.2 ()',
4141
'x-sdk-name'=> 'PHP',
4242
'x-sdk-platform'=> 'server',
4343
'x-sdk-language'=> 'php',
44-
'x-sdk-version'=> '11.0.1',
44+
'x-sdk-version'=> '11.0.2',
4545
];
4646

4747
/**

src/Appwrite/Enums/CreditCard.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class CreditCard implements JsonSerializable
99
private static CreditCard $AMERICANEXPRESS;
1010
private static CreditCard $ARGENCARD;
1111
private static CreditCard $CABAL;
12-
private static CreditCard $CONSOSUD;
12+
private static CreditCard $CENCOSUD;
1313
private static CreditCard $DINERSCLUB;
1414
private static CreditCard $DISCOVER;
1515
private static CreditCard $ELO;
@@ -61,12 +61,12 @@ public static function CABAL(): CreditCard
6161
}
6262
return self::$CABAL;
6363
}
64-
public static function CONSOSUD(): CreditCard
64+
public static function CENCOSUD(): CreditCard
6565
{
66-
if (!isset(self::$CONSOSUD)) {
67-
self::$CONSOSUD = new CreditCard('censosud');
66+
if (!isset(self::$CENCOSUD)) {
67+
self::$CENCOSUD = new CreditCard('cencosud');
6868
}
69-
return self::$CONSOSUD;
69+
return self::$CENCOSUD;
7070
}
7171
public static function DINERSCLUB(): CreditCard
7272
{

src/Appwrite/Enums/Flag.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class Flag implements JsonSerializable
147147
private static Flag $PALAU;
148148
private static Flag $PAPUANEWGUINEA;
149149
private static Flag $POLAND;
150+
private static Flag $FRENCHPOLYNESIA;
150151
private static Flag $NORTHKOREA;
151152
private static Flag $PORTUGAL;
152153
private static Flag $PARAGUAY;
@@ -1205,6 +1206,13 @@ public static function POLAND(): Flag
12051206
}
12061207
return self::$POLAND;
12071208
}
1209+
public static function FRENCHPOLYNESIA(): Flag
1210+
{
1211+
if (!isset(self::$FRENCHPOLYNESIA)) {
1212+
self::$FRENCHPOLYNESIA = new Flag('pf');
1213+
}
1214+
return self::$FRENCHPOLYNESIA;
1215+
}
12081216
public static function NORTHKOREA(): Flag
12091217
{
12101218
if (!isset(self::$NORTHKOREA)) {

src/Appwrite/Enums/Runtime.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Runtime implements JsonSerializable
2525
private static Runtime $PYTHON310;
2626
private static Runtime $PYTHON311;
2727
private static Runtime $PYTHON312;
28+
private static Runtime $PYTHONML311;
2829
private static Runtime $DENO140;
2930
private static Runtime $DART215;
3031
private static Runtime $DART216;
@@ -201,6 +202,13 @@ public static function PYTHON312(): Runtime
201202
}
202203
return self::$PYTHON312;
203204
}
205+
public static function PYTHONML311(): Runtime
206+
{
207+
if (!isset(self::$PYTHONML311)) {
208+
self::$PYTHONML311 = new Runtime('python-ml-3.11');
209+
}
210+
return self::$PYTHONML311;
211+
}
204212
public static function DENO140(): Runtime
205213
{
206214
if (!isset(self::$DENO140)) {

0 commit comments

Comments
 (0)