Skip to content

Commit b0a3ffd

Browse files
authored
Merge pull request #55 from appwrite/dev
2 parents 950112a + 3a9e4e7 commit b0a3ffd

29 files changed

+371
-797
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## 19.0.0
4+
5+
* Rename `VCSDeploymentType` enum to `VCSReferenceType`
6+
* Change `createTemplateDeployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters
7+
* Add `Theme`, `Timezone` and `Output` enums
8+
39
## 18.0.1
410

511
* Fix `TablesDB` service to use correct file name

docs/account.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
182182

183183

184184
```http request
185-
POST https://cloud.appwrite.io/v1/account/mfa/challenge
185+
POST https://cloud.appwrite.io/v1/account/mfa/challenges
186186
```
187187

188188
** Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. **
@@ -195,7 +195,7 @@ POST https://cloud.appwrite.io/v1/account/mfa/challenge
195195

196196

197197
```http request
198-
POST https://cloud.appwrite.io/v1/account/mfa/challenge
198+
POST https://cloud.appwrite.io/v1/account/mfa/challenges
199199
```
200200

201201
** Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method. **
@@ -208,7 +208,7 @@ POST https://cloud.appwrite.io/v1/account/mfa/challenge
208208

209209

210210
```http request
211-
PUT https://cloud.appwrite.io/v1/account/mfa/challenge
211+
PUT https://cloud.appwrite.io/v1/account/mfa/challenges
212212
```
213213

214214
** Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **
@@ -222,7 +222,7 @@ PUT https://cloud.appwrite.io/v1/account/mfa/challenge
222222

223223

224224
```http request
225-
PUT https://cloud.appwrite.io/v1/account/mfa/challenge
225+
PUT https://cloud.appwrite.io/v1/account/mfa/challenges
226226
```
227227

228228
** Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method. **

docs/examples/avatars/get-screenshot.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,26 @@ $avatars = new Avatars($client);
1515

1616
$result = $avatars->getScreenshot(
1717
url: 'https://example.com',
18-
headers: [], // optional
19-
viewportWidth: 1, // optional
20-
viewportHeight: 1, // optional
21-
scale: 0.1, // optional
18+
headers: [
19+
'Authorization' => 'Bearer token123',
20+
'X-Custom-Header' => 'value'
21+
], // optional
22+
viewportWidth: 1920, // optional
23+
viewportHeight: 1080, // optional
24+
scale: 2, // optional
2225
theme: Theme::LIGHT(), // optional
23-
userAgent: '<USER_AGENT>', // optional
24-
fullpage: false, // optional
25-
locale: '<LOCALE>', // optional
26+
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
27+
fullpage: true, // optional
28+
locale: 'en-US', // optional
2629
timezone: Timezone::AFRICAABIDJAN(), // optional
27-
latitude: -90, // optional
28-
longitude: -180, // optional
29-
accuracy: 0, // optional
30-
touch: false, // optional
31-
permissions: [], // optional
32-
sleep: 0, // optional
33-
width: 0, // optional
34-
height: 0, // optional
35-
quality: -1, // optional
30+
latitude: 37.7749, // optional
31+
longitude: -122.4194, // optional
32+
accuracy: 100, // optional
33+
touch: true, // optional
34+
permissions: ["geolocation","notifications"], // optional
35+
sleep: 3, // optional
36+
width: 800, // optional
37+
height: 600, // optional
38+
quality: 85, // optional
3639
output: Output::JPG() // optional
3740
);

docs/examples/functions/create-template-deployment.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use Appwrite\Client;
44
use Appwrite\Services\Functions;
5+
use Appwrite\Enums\TemplateReferenceType;
56
67
$client = (new Client())
78
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -15,6 +16,7 @@ $result = $functions->createTemplateDeployment(
1516
repository: '<REPOSITORY>',
1617
owner: '<OWNER>',
1718
rootDirectory: '<ROOT_DIRECTORY>',
18-
version: '<VERSION>',
19+
type: TemplateReferenceType::COMMIT(),
20+
reference: '<REFERENCE>',
1921
activate: false // optional
2022
);

docs/examples/functions/create-vcs-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use Appwrite\Client;
44
use Appwrite\Services\Functions;
5-
use Appwrite\Enums\VCSDeploymentType;
5+
use Appwrite\Enums\VCSReferenceType;
66
77
$client = (new Client())
88
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -13,7 +13,7 @@ $functions = new Functions($client);
1313

1414
$result = $functions->createVcsDeployment(
1515
functionId: '<FUNCTION_ID>',
16-
type: VCSDeploymentType::BRANCH(),
16+
type: VCSReferenceType::BRANCH(),
1717
reference: '<REFERENCE>',
1818
activate: false // optional
1919
);

docs/examples/sites/create-template-deployment.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use Appwrite\Client;
44
use Appwrite\Services\Sites;
5+
use Appwrite\Enums\TemplateReferenceType;
56
67
$client = (new Client())
78
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -15,6 +16,7 @@ $result = $sites->createTemplateDeployment(
1516
repository: '<REPOSITORY>',
1617
owner: '<OWNER>',
1718
rootDirectory: '<ROOT_DIRECTORY>',
18-
version: '<VERSION>',
19+
type: TemplateReferenceType::BRANCH(),
20+
reference: '<REFERENCE>',
1921
activate: false // optional
2022
);

docs/examples/sites/create-vcs-deployment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use Appwrite\Client;
44
use Appwrite\Services\Sites;
5-
use Appwrite\Enums\VCSDeploymentType;
5+
use Appwrite\Enums\VCSReferenceType;
66
77
$client = (new Client())
88
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -13,7 +13,7 @@ $sites = new Sites($client);
1313

1414
$result = $sites->createVcsDeployment(
1515
siteId: '<SITE_ID>',
16-
type: VCSDeploymentType::BRANCH(),
16+
type: VCSReferenceType::BRANCH(),
1717
reference: '<REFERENCE>',
1818
activate: false // optional
1919
);

docs/examples/storage/create-bucket.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ $result = $storage->createBucket(
2323
allowedFileExtensions: [], // optional
2424
compression: Compression::NONE(), // optional
2525
encryption: false, // optional
26-
antivirus: false // optional
26+
antivirus: false, // optional
27+
transformations: false // optional
2728
);

docs/examples/storage/update-bucket.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ $result = $storage->updateBucket(
2323
allowedFileExtensions: [], // optional
2424
compression: Compression::NONE(), // optional
2525
encryption: false, // optional
26-
antivirus: false // optional
26+
antivirus: false, // optional
27+
transformations: false // optional
2728
);

docs/functions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/p
198198
| repository | string | Repository name of the template. | |
199199
| owner | string | The name of the owner of the template. | |
200200
| rootDirectory | string | Path to function code in the template repo. | |
201-
| version | string | Version (tag) for the repo linked to the function template. | |
201+
| type | string | Type for the reference provided. Can be commit, branch, or tag | |
202+
| reference | string | Reference value, can be a commit hash, branch name, or release tag | |
202203
| activate | boolean | Automatically activate the deployment when it is finished building. | |
203204

204205

0 commit comments

Comments
 (0)