react-native-appwrite 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/autoclose.yml +11 -0
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/cjs/sdk.js +23 -11
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +23 -11
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +5 -3
- package/src/enums/image-format.ts +1 -0
- package/src/services/account.ts +15 -4
- package/src/services/storage.ts +4 -6
- package/types/enums/image-format.d.ts +1 -0
- package/types/services/account.d.ts +15 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: Auto-close External Pull Requests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, reopened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
auto_close:
|
|
9
|
+
uses: appwrite/.github/.github/workflows/autoclose.yml@main
|
|
10
|
+
secrets:
|
|
11
|
+
GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }}
|
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2025 Appwrite (https://appwrite.io) and individual contributors.
|
|
2
2
|
All rights reserved.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Appwrite React Native SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
[](https://twitter.com/appwrite)
|
|
7
7
|
[](https://appwrite.io/discord)
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -99,7 +99,7 @@ class Client {
|
|
|
99
99
|
'x-sdk-name': 'React Native',
|
|
100
100
|
'x-sdk-platform': 'client',
|
|
101
101
|
'x-sdk-language': 'reactnative',
|
|
102
|
-
'x-sdk-version': '0.
|
|
102
|
+
'x-sdk-version': '0.7.0',
|
|
103
103
|
'X-Appwrite-Response-Format': '1.6.0',
|
|
104
104
|
};
|
|
105
105
|
this.realtime = {
|
|
@@ -213,6 +213,8 @@ class Client {
|
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
break;
|
|
216
|
+
case 'pong':
|
|
217
|
+
break; // Handle pong response if needed
|
|
216
218
|
case 'error':
|
|
217
219
|
throw message.data;
|
|
218
220
|
default:
|
|
@@ -1458,6 +1460,11 @@ class Account extends Service {
|
|
|
1458
1460
|
/**
|
|
1459
1461
|
* Create push target
|
|
1460
1462
|
*
|
|
1463
|
+
* Use this endpoint to register a device for push notifications. Provide a
|
|
1464
|
+
* target ID (custom or generated using ID.unique()), a device identifier
|
|
1465
|
+
* (usually a device token), and optionally specify which provider should send
|
|
1466
|
+
* notifications to this target. The target is automatically linked to the
|
|
1467
|
+
* current session and includes device information like brand and model.
|
|
1461
1468
|
*
|
|
1462
1469
|
* @param {string} targetId
|
|
1463
1470
|
* @param {string} identifier
|
|
@@ -1493,6 +1500,11 @@ class Account extends Service {
|
|
|
1493
1500
|
/**
|
|
1494
1501
|
* Update push target
|
|
1495
1502
|
*
|
|
1503
|
+
* Update the currently logged in user's push notification target. You can
|
|
1504
|
+
* modify the target's identifier (device token) and provider ID (token,
|
|
1505
|
+
* email, phone etc.). The target must exist and belong to the current user.
|
|
1506
|
+
* If you change the provider ID, notifications will be sent through the new
|
|
1507
|
+
* messaging provider instead.
|
|
1496
1508
|
*
|
|
1497
1509
|
* @param {string} targetId
|
|
1498
1510
|
* @param {string} identifier
|
|
@@ -1521,6 +1533,9 @@ class Account extends Service {
|
|
|
1521
1533
|
/**
|
|
1522
1534
|
* Delete push target
|
|
1523
1535
|
*
|
|
1536
|
+
* Delete a push notification target for the currently logged in user. After
|
|
1537
|
+
* deletion, the device will no longer receive push notifications. The target
|
|
1538
|
+
* must exist and belong to the current user.
|
|
1524
1539
|
*
|
|
1525
1540
|
* @param {string} targetId
|
|
1526
1541
|
* @throws {AppwriteException}
|
|
@@ -1595,9 +1610,7 @@ class Account extends Service {
|
|
|
1595
1610
|
* [POST
|
|
1596
1611
|
* /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
|
|
1597
1612
|
* endpoint to complete the login process. The link sent to the user's email
|
|
1598
|
-
* address is valid for 1 hour.
|
|
1599
|
-
* the URL parameter empty, so that the login completion will be handled by
|
|
1600
|
-
* your Appwrite instance by default.
|
|
1613
|
+
* address is valid for 1 hour.
|
|
1601
1614
|
*
|
|
1602
1615
|
* A user is limited to 10 active sessions at a time by default. [Learn more
|
|
1603
1616
|
* about session
|
|
@@ -2843,13 +2856,11 @@ class Storage extends Service {
|
|
|
2843
2856
|
};
|
|
2844
2857
|
let offset = 0;
|
|
2845
2858
|
let response = undefined;
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
catch (e) {
|
|
2852
|
-
}
|
|
2859
|
+
try {
|
|
2860
|
+
response = yield this.client.call('GET', new URL(this.client.config.endpoint + apiPath + '/' + fileId), apiHeaders);
|
|
2861
|
+
offset = response.chunksUploaded * Service.CHUNK_SIZE;
|
|
2862
|
+
}
|
|
2863
|
+
catch (e) {
|
|
2853
2864
|
}
|
|
2854
2865
|
let timestamp = new Date().getTime();
|
|
2855
2866
|
while (offset < size) {
|
|
@@ -4048,6 +4059,7 @@ exports.ImageFormat = void 0;
|
|
|
4048
4059
|
ImageFormat["Gif"] = "gif";
|
|
4049
4060
|
ImageFormat["Png"] = "png";
|
|
4050
4061
|
ImageFormat["Webp"] = "webp";
|
|
4062
|
+
ImageFormat["Heic"] = "heic";
|
|
4051
4063
|
ImageFormat["Avif"] = "avif";
|
|
4052
4064
|
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
4053
4065
|
|