react-native-appwrite 0.7.4 → 0.9.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/dist/esm/sdk.js CHANGED
@@ -77,8 +77,8 @@ class Client {
77
77
  'x-sdk-name': 'React Native',
78
78
  'x-sdk-platform': 'client',
79
79
  'x-sdk-language': 'reactnative',
80
- 'x-sdk-version': '0.7.4',
81
- 'X-Appwrite-Response-Format': '1.6.0',
80
+ 'x-sdk-version': '0.9.0',
81
+ 'X-Appwrite-Response-Format': '1.7.0',
82
82
  };
83
83
  this.realtime = {
84
84
  socket: undefined,
@@ -2120,11 +2120,10 @@ class Functions extends Service {
2120
2120
  *
2121
2121
  * @param {string} functionId
2122
2122
  * @param {string[]} queries
2123
- * @param {string} search
2124
2123
  * @throws {AppwriteException}
2125
2124
  * @returns {Promise}
2126
2125
  */
2127
- listExecutions(functionId, queries, search) {
2126
+ listExecutions(functionId, queries) {
2128
2127
  if (typeof functionId === 'undefined') {
2129
2128
  throw new AppwriteException('Missing required parameter: "functionId"');
2130
2129
  }
@@ -2133,9 +2132,6 @@ class Functions extends Service {
2133
2132
  if (typeof queries !== 'undefined') {
2134
2133
  payload['queries'] = queries;
2135
2134
  }
2136
- if (typeof search !== 'undefined') {
2137
- payload['search'] = search;
2138
- }
2139
2135
  const uri = new URL(this.client.config.endpoint + apiPath);
2140
2136
  return this.client.call('get', uri, {}, payload);
2141
2137
  }
@@ -2642,10 +2638,11 @@ class Storage extends Service {
2642
2638
  *
2643
2639
  * @param {string} bucketId
2644
2640
  * @param {string} fileId
2641
+ * @param {string} token
2645
2642
  * @throws {AppwriteException}
2646
2643
  * @returns {URL}
2647
2644
  */
2648
- getFileDownload(bucketId, fileId) {
2645
+ getFileDownload(bucketId, fileId, token) {
2649
2646
  if (typeof bucketId === 'undefined') {
2650
2647
  throw new AppwriteException('Missing required parameter: "bucketId"');
2651
2648
  }
@@ -2654,6 +2651,9 @@ class Storage extends Service {
2654
2651
  }
2655
2652
  const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
2656
2653
  const payload = {};
2654
+ if (typeof token !== 'undefined') {
2655
+ payload['token'] = token;
2656
+ }
2657
2657
  const uri = new URL(this.client.config.endpoint + apiPath);
2658
2658
  payload['project'] = this.client.config.project;
2659
2659
  for (const [key, value] of Object.entries(Service.flatten(payload))) {
@@ -2681,10 +2681,11 @@ class Storage extends Service {
2681
2681
  * @param {number} rotation
2682
2682
  * @param {string} background
2683
2683
  * @param {ImageFormat} output
2684
+ * @param {string} token
2684
2685
  * @throws {AppwriteException}
2685
2686
  * @returns {URL}
2686
2687
  */
2687
- getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output) {
2688
+ getFilePreview(bucketId, fileId, width, height, gravity, quality, borderWidth, borderColor, borderRadius, opacity, rotation, background, output, token) {
2688
2689
  if (typeof bucketId === 'undefined') {
2689
2690
  throw new AppwriteException('Missing required parameter: "bucketId"');
2690
2691
  }
@@ -2726,6 +2727,9 @@ class Storage extends Service {
2726
2727
  if (typeof output !== 'undefined') {
2727
2728
  payload['output'] = output;
2728
2729
  }
2730
+ if (typeof token !== 'undefined') {
2731
+ payload['token'] = token;
2732
+ }
2729
2733
  const uri = new URL(this.client.config.endpoint + apiPath);
2730
2734
  payload['project'] = this.client.config.project;
2731
2735
  for (const [key, value] of Object.entries(Service.flatten(payload))) {
@@ -2740,10 +2744,11 @@ class Storage extends Service {
2740
2744
  *
2741
2745
  * @param {string} bucketId
2742
2746
  * @param {string} fileId
2747
+ * @param {string} token
2743
2748
  * @throws {AppwriteException}
2744
2749
  * @returns {URL}
2745
2750
  */
2746
- getFileView(bucketId, fileId) {
2751
+ getFileView(bucketId, fileId, token) {
2747
2752
  if (typeof bucketId === 'undefined') {
2748
2753
  throw new AppwriteException('Missing required parameter: "bucketId"');
2749
2754
  }
@@ -2752,6 +2757,9 @@ class Storage extends Service {
2752
2757
  }
2753
2758
  const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);
2754
2759
  const payload = {};
2760
+ if (typeof token !== 'undefined') {
2761
+ payload['token'] = token;
2762
+ }
2755
2763
  const uri = new URL(this.client.config.endpoint + apiPath);
2756
2764
  payload['project'] = this.client.config.project;
2757
2765
  for (const [key, value] of Object.entries(Service.flatten(payload))) {
@@ -3641,7 +3649,6 @@ var ImageFormat;
3641
3649
  (function (ImageFormat) {
3642
3650
  ImageFormat["Jpg"] = "jpg";
3643
3651
  ImageFormat["Jpeg"] = "jpeg";
3644
- ImageFormat["Gif"] = "gif";
3645
3652
  ImageFormat["Png"] = "png";
3646
3653
  ImageFormat["Webp"] = "webp";
3647
3654
  ImageFormat["Heic"] = "heic";