Skip to content

Commit d2a9159

Browse files
authored
Merge pull request #82 from appwrite/dev
2 parents 9d5bb42 + ec20ef2 commit d2a9159

28 files changed

+424
-108
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,26 @@ on:
55
types: [published]
66
workflow_dispatch:
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
publish:
1014
runs-on: ubuntu-latest
1115

1216
steps:
1317
- uses: actions/checkout@v4
1418

15-
# Setup Node.js environment
1619
- name: Use Node.js
1720
uses: actions/setup-node@v4
1821
with:
19-
node-version: '20.x'
22+
node-version: '22'
2023
registry-url: 'https://registry.npmjs.org'
2124

22-
# Determine release tag based on the tag name
25+
- name: Update npm to latest version for OIDC support
26+
run: npm install -g npm@latest
27+
2328
- name: Determine release tag
2429
id: release_tag
2530
run: |
@@ -29,14 +34,10 @@ jobs:
2934
echo "tag=latest" >> "$GITHUB_OUTPUT"
3035
fi
3136
32-
# Install dependencies (if any) and build your project (if necessary)
3337
- name: Install dependencies and build
3438
run: |
3539
npm install
3640
npm run build
3741
38-
# Publish to NPM with the appropriate tag
3942
- name: Publish
40-
run: npm publish --tag ${{ steps.release_tag.outputs.tag }}
41-
env:
42-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_NO_ORG }}
43+
run: npm publish --provenance --access public --tag ${{ steps.release_tag.outputs.tag }}

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+
## 0.20.0
4+
5+
* Add array-based enum parameters (e.g., `permissions: BrowserPermission[]`).
6+
* Breaking change: `Output` enum has been removed; use `ImageFormat` instead.
7+
* Add `Channel` helpers for Realtime.
8+
39
## 0.19.0
410

511
* Add `getScreenshot` method to `Avatars` service

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
1+
Copyright (c) 2026 Appwrite (https://appwrite.io) and individual contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Appwrite React Native SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-react-native.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.8.0-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.8.1-blue.svg?style=flat-square)
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)
88

99
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-react-native/releases).**
1010

11-
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the React Native SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
11+
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the React Native SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1212

1313
![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)
1414

docs/examples/account/create-jwt.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const client = new Client()
66

77
const account = new Account(client);
88

9-
const result = await account.createJWT();
9+
const result = await account.createJWT({
10+
duration: 0 // optional
11+
});
1012

1113
console.log(result);

docs/examples/avatars/get-screenshot.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Client, Avatars, Theme, Timezone, Output } from "react-native-appwrite";
1+
import { Client, Avatars, Theme, Timezone, BrowserPermission, ImageFormat } from "react-native-appwrite";
22

33
const client = new Client()
44
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
@@ -15,21 +15,21 @@ const result = avatars.getScreenshot({
1515
viewportWidth: 1920, // optional
1616
viewportHeight: 1080, // optional
1717
scale: 2, // optional
18-
theme: Theme.Light, // optional
18+
theme: Theme.Dark, // optional
1919
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15', // optional
2020
fullpage: true, // optional
2121
locale: 'en-US', // optional
22-
timezone: Timezone.AfricaAbidjan, // optional
22+
timezone: Timezone.AmericaNewYork, // optional
2323
latitude: 37.7749, // optional
2424
longitude: -122.4194, // optional
2525
accuracy: 100, // optional
2626
touch: true, // optional
27-
permissions: ["geolocation","notifications"], // optional
27+
permissions: [BrowserPermission.Geolocation, BrowserPermission.Notifications], // optional
2828
sleep: 3, // optional
2929
width: 800, // optional
3030
height: 600, // optional
3131
quality: 85, // optional
32-
output: Output.Jpg // optional
32+
output: ImageFormat.Jpeg // optional
3333
});
3434

3535
console.log(result);

docs/examples/databases/update-document.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const result = await databases.updateDocument({
1010
databaseId: '<DATABASE_ID>',
1111
collectionId: '<COLLECTION_ID>',
1212
documentId: '<DOCUMENT_ID>',
13-
data: {}, // optional
13+
data: {
14+
"username": "walter.obrien",
15+
"email": "walter.obrien@example.com",
16+
"fullName": "Walter O'Brien",
17+
"age": 33,
18+
"isAdmin": false
19+
}, // optional
1420
permissions: ["read("any")"], // optional
1521
transactionId: '<TRANSACTION_ID>' // optional
1622
});

docs/examples/databases/upsert-document.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const result = await databases.upsertDocument({
1010
databaseId: '<DATABASE_ID>',
1111
collectionId: '<COLLECTION_ID>',
1212
documentId: '<DOCUMENT_ID>',
13-
data: {},
13+
data: {
14+
"username": "walter.obrien",
15+
"email": "walter.obrien@example.com",
16+
"fullName": "Walter O'Brien",
17+
"age": 30,
18+
"isAdmin": false
19+
}, // optional
1420
permissions: ["read("any")"], // optional
1521
transactionId: '<TRANSACTION_ID>' // optional
1622
});

docs/examples/tablesdb/update-row.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const result = await tablesDB.updateRow({
1010
databaseId: '<DATABASE_ID>',
1111
tableId: '<TABLE_ID>',
1212
rowId: '<ROW_ID>',
13-
data: {}, // optional
13+
data: {
14+
"username": "walter.obrien",
15+
"email": "walter.obrien@example.com",
16+
"fullName": "Walter O'Brien",
17+
"age": 33,
18+
"isAdmin": false
19+
}, // optional
1420
permissions: ["read("any")"], // optional
1521
transactionId: '<TRANSACTION_ID>' // optional
1622
});

docs/examples/tablesdb/upsert-row.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ const result = await tablesDB.upsertRow({
1010
databaseId: '<DATABASE_ID>',
1111
tableId: '<TABLE_ID>',
1212
rowId: '<ROW_ID>',
13-
data: {}, // optional
13+
data: {
14+
"username": "walter.obrien",
15+
"email": "walter.obrien@example.com",
16+
"fullName": "Walter O'Brien",
17+
"age": 33,
18+
"isAdmin": false
19+
}, // optional
1420
permissions: ["read("any")"], // optional
1521
transactionId: '<TRANSACTION_ID>' // optional
1622
});

0 commit comments

Comments
 (0)