react-native-appwrite 0.10.0 → 0.10.1
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/publish.yml +1 -1
- package/CHANGELOG.md +5 -0
- package/dist/cjs/sdk.js +161 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +161 -1
- package/dist/esm/sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/image-format.ts +1 -0
- package/src/services/avatars.ts +35 -0
- package/src/services/databases.ts +4 -0
- package/src/services/storage.ts +15 -0
- package/types/enums/image-format.d.ts +2 -1
- package/types/services/databases.d.ts +4 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "react-native-appwrite",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "0.10.
|
|
5
|
+
"version": "0.10.1",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/src/client.ts
CHANGED
package/src/services/avatars.ts
CHANGED
|
@@ -387,6 +387,11 @@ export class Avatars extends Service {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
390
|
+
payload['project'] = this.client.config.project;
|
|
391
|
+
|
|
392
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
393
|
+
uri.searchParams.append(key, value);
|
|
394
|
+
}
|
|
390
395
|
|
|
391
396
|
return uri;
|
|
392
397
|
}
|
|
@@ -426,6 +431,11 @@ export class Avatars extends Service {
|
|
|
426
431
|
}
|
|
427
432
|
|
|
428
433
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
434
|
+
payload['project'] = this.client.config.project;
|
|
435
|
+
|
|
436
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
437
|
+
uri.searchParams.append(key, value);
|
|
438
|
+
}
|
|
429
439
|
|
|
430
440
|
return uri;
|
|
431
441
|
}
|
|
@@ -449,6 +459,11 @@ export class Avatars extends Service {
|
|
|
449
459
|
}
|
|
450
460
|
|
|
451
461
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
462
|
+
payload['project'] = this.client.config.project;
|
|
463
|
+
|
|
464
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
465
|
+
uri.searchParams.append(key, value);
|
|
466
|
+
}
|
|
452
467
|
|
|
453
468
|
return uri;
|
|
454
469
|
}
|
|
@@ -489,6 +504,11 @@ export class Avatars extends Service {
|
|
|
489
504
|
}
|
|
490
505
|
|
|
491
506
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
507
|
+
payload['project'] = this.client.config.project;
|
|
508
|
+
|
|
509
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
510
|
+
uri.searchParams.append(key, value);
|
|
511
|
+
}
|
|
492
512
|
|
|
493
513
|
return uri;
|
|
494
514
|
}
|
|
@@ -529,6 +549,11 @@ export class Avatars extends Service {
|
|
|
529
549
|
}
|
|
530
550
|
|
|
531
551
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
552
|
+
payload['project'] = this.client.config.project;
|
|
553
|
+
|
|
554
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
555
|
+
uri.searchParams.append(key, value);
|
|
556
|
+
}
|
|
532
557
|
|
|
533
558
|
return uri;
|
|
534
559
|
}
|
|
@@ -579,6 +604,11 @@ export class Avatars extends Service {
|
|
|
579
604
|
}
|
|
580
605
|
|
|
581
606
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
607
|
+
payload['project'] = this.client.config.project;
|
|
608
|
+
|
|
609
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
610
|
+
uri.searchParams.append(key, value);
|
|
611
|
+
}
|
|
582
612
|
|
|
583
613
|
return uri;
|
|
584
614
|
}
|
|
@@ -616,6 +646,11 @@ export class Avatars extends Service {
|
|
|
616
646
|
}
|
|
617
647
|
|
|
618
648
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
649
|
+
payload['project'] = this.client.config.project;
|
|
650
|
+
|
|
651
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
652
|
+
uri.searchParams.append(key, value);
|
|
653
|
+
}
|
|
619
654
|
|
|
620
655
|
return uri;
|
|
621
656
|
}
|
|
@@ -133,6 +133,10 @@ export class Databases extends Service {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not
|
|
137
|
+
* yet officially supported. It may be subject to breaking changes or removal
|
|
138
|
+
* in future versions.
|
|
139
|
+
*
|
|
136
140
|
* Create or update a Document. Before using this route, you should create a
|
|
137
141
|
* new collection resource using either a [server
|
|
138
142
|
* integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
package/src/services/storage.ts
CHANGED
|
@@ -442,6 +442,11 @@ export class Storage extends Service {
|
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
445
|
+
payload['project'] = this.client.config.project;
|
|
446
|
+
|
|
447
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
448
|
+
uri.searchParams.append(key, value);
|
|
449
|
+
}
|
|
445
450
|
|
|
446
451
|
return uri;
|
|
447
452
|
}
|
|
@@ -523,6 +528,11 @@ export class Storage extends Service {
|
|
|
523
528
|
}
|
|
524
529
|
|
|
525
530
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
531
|
+
payload['project'] = this.client.config.project;
|
|
532
|
+
|
|
533
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
534
|
+
uri.searchParams.append(key, value);
|
|
535
|
+
}
|
|
526
536
|
|
|
527
537
|
return uri;
|
|
528
538
|
}
|
|
@@ -547,6 +557,11 @@ export class Storage extends Service {
|
|
|
547
557
|
}
|
|
548
558
|
|
|
549
559
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
560
|
+
payload['project'] = this.client.config.project;
|
|
561
|
+
|
|
562
|
+
for (const [key, value] of Object.entries(Service.flatten(payload))) {
|
|
563
|
+
uri.searchParams.append(key, value);
|
|
564
|
+
}
|
|
550
565
|
|
|
551
566
|
return uri;
|
|
552
567
|
}
|
|
@@ -42,6 +42,10 @@ export declare class Databases extends Service {
|
|
|
42
42
|
*/
|
|
43
43
|
getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
|
|
44
44
|
/**
|
|
45
|
+
* **WARNING: Experimental Feature** - This endpoint is experimental and not
|
|
46
|
+
* yet officially supported. It may be subject to breaking changes or removal
|
|
47
|
+
* in future versions.
|
|
48
|
+
*
|
|
45
49
|
* Create or update a Document. Before using this route, you should create a
|
|
46
50
|
* new collection resource using either a [server
|
|
47
51
|
* integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|