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.
@@ -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) 2024 Appwrite (https://appwrite.io) and individual contributors.
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
  ![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.6.0-blue.svg?style=flat-square)
4
+ ![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square)
5
5
  [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
6
6
  [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
7
7
  [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](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.6.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. If you are on a mobile device you can leave
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
- if (fileId != 'unique()') {
2847
- try {
2848
- response = yield this.client.call('GET', new URL(this.client.config.endpoint + apiPath + '/' + fileId), apiHeaders);
2849
- offset = response.chunksUploaded * Service.CHUNK_SIZE;
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