appwrite 9.0.0 → 9.0.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.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +3 -3
- data/lib/appwrite/role.rb +56 -0
- data/lib/appwrite/services/account.rb +88 -88
- data/lib/appwrite/services/avatars.rb +28 -28
- data/lib/appwrite/services/databases.rb +168 -168
- data/lib/appwrite/services/functions.rb +84 -84
- data/lib/appwrite/services/graphql.rb +8 -8
- data/lib/appwrite/services/health.rb +48 -48
- data/lib/appwrite/services/locale.rb +32 -32
- data/lib/appwrite/services/storage.rb +52 -52
- data/lib/appwrite/services/teams.rb +52 -52
- data/lib/appwrite/services/users.rb +112 -112
- metadata +2 -2
@@ -17,20 +17,20 @@ module Appwrite
|
|
17
17
|
def list(queries: nil, search: nil)
|
18
18
|
api_path = '/functions'
|
19
19
|
|
20
|
-
|
20
|
+
api_params = {
|
21
21
|
queries: queries,
|
22
22
|
search: search,
|
23
23
|
}
|
24
24
|
|
25
|
-
|
25
|
+
api_headers = {
|
26
26
|
"content-type": 'application/json',
|
27
27
|
}
|
28
28
|
|
29
29
|
@client.call(
|
30
30
|
method: 'GET',
|
31
31
|
path: api_path,
|
32
|
-
headers:
|
33
|
-
params:
|
32
|
+
headers: api_headers,
|
33
|
+
params: api_params,
|
34
34
|
response_type: Models::FunctionList
|
35
35
|
)
|
36
36
|
end
|
@@ -77,7 +77,7 @@ module Appwrite
|
|
77
77
|
raise Appwrite::Exception.new('Missing required parameter: "runtime"')
|
78
78
|
end
|
79
79
|
|
80
|
-
|
80
|
+
api_params = {
|
81
81
|
functionId: function_id,
|
82
82
|
name: name,
|
83
83
|
runtime: runtime,
|
@@ -100,15 +100,15 @@ module Appwrite
|
|
100
100
|
templateBranch: template_branch,
|
101
101
|
}
|
102
102
|
|
103
|
-
|
103
|
+
api_headers = {
|
104
104
|
"content-type": 'application/json',
|
105
105
|
}
|
106
106
|
|
107
107
|
@client.call(
|
108
108
|
method: 'POST',
|
109
109
|
path: api_path,
|
110
|
-
headers:
|
111
|
-
params:
|
110
|
+
headers: api_headers,
|
111
|
+
params: api_params,
|
112
112
|
response_type: Models::Function
|
113
113
|
)
|
114
114
|
end
|
@@ -121,18 +121,18 @@ module Appwrite
|
|
121
121
|
def list_runtimes()
|
122
122
|
api_path = '/functions/runtimes'
|
123
123
|
|
124
|
-
|
124
|
+
api_params = {
|
125
125
|
}
|
126
126
|
|
127
|
-
|
127
|
+
api_headers = {
|
128
128
|
"content-type": 'application/json',
|
129
129
|
}
|
130
130
|
|
131
131
|
@client.call(
|
132
132
|
method: 'GET',
|
133
133
|
path: api_path,
|
134
|
-
headers:
|
135
|
-
params:
|
134
|
+
headers: api_headers,
|
135
|
+
params: api_params,
|
136
136
|
response_type: Models::RuntimeList
|
137
137
|
)
|
138
138
|
end
|
@@ -151,18 +151,18 @@ module Appwrite
|
|
151
151
|
raise Appwrite::Exception.new('Missing required parameter: "functionId"')
|
152
152
|
end
|
153
153
|
|
154
|
-
|
154
|
+
api_params = {
|
155
155
|
}
|
156
156
|
|
157
|
-
|
157
|
+
api_headers = {
|
158
158
|
"content-type": 'application/json',
|
159
159
|
}
|
160
160
|
|
161
161
|
@client.call(
|
162
162
|
method: 'GET',
|
163
163
|
path: api_path,
|
164
|
-
headers:
|
165
|
-
params:
|
164
|
+
headers: api_headers,
|
165
|
+
params: api_params,
|
166
166
|
response_type: Models::Function
|
167
167
|
)
|
168
168
|
end
|
@@ -204,7 +204,7 @@ module Appwrite
|
|
204
204
|
raise Appwrite::Exception.new('Missing required parameter: "runtime"')
|
205
205
|
end
|
206
206
|
|
207
|
-
|
207
|
+
api_params = {
|
208
208
|
name: name,
|
209
209
|
runtime: runtime,
|
210
210
|
execute: execute,
|
@@ -222,15 +222,15 @@ module Appwrite
|
|
222
222
|
providerRootDirectory: provider_root_directory,
|
223
223
|
}
|
224
224
|
|
225
|
-
|
225
|
+
api_headers = {
|
226
226
|
"content-type": 'application/json',
|
227
227
|
}
|
228
228
|
|
229
229
|
@client.call(
|
230
230
|
method: 'PUT',
|
231
231
|
path: api_path,
|
232
|
-
headers:
|
233
|
-
params:
|
232
|
+
headers: api_headers,
|
233
|
+
params: api_params,
|
234
234
|
response_type: Models::Function
|
235
235
|
)
|
236
236
|
end
|
@@ -249,18 +249,18 @@ module Appwrite
|
|
249
249
|
raise Appwrite::Exception.new('Missing required parameter: "functionId"')
|
250
250
|
end
|
251
251
|
|
252
|
-
|
252
|
+
api_params = {
|
253
253
|
}
|
254
254
|
|
255
|
-
|
255
|
+
api_headers = {
|
256
256
|
"content-type": 'application/json',
|
257
257
|
}
|
258
258
|
|
259
259
|
@client.call(
|
260
260
|
method: 'DELETE',
|
261
261
|
path: api_path,
|
262
|
-
headers:
|
263
|
-
params:
|
262
|
+
headers: api_headers,
|
263
|
+
params: api_params,
|
264
264
|
)
|
265
265
|
end
|
266
266
|
|
@@ -281,20 +281,20 @@ module Appwrite
|
|
281
281
|
raise Appwrite::Exception.new('Missing required parameter: "functionId"')
|
282
282
|
end
|
283
283
|
|
284
|
-
|
284
|
+
api_params = {
|
285
285
|
queries: queries,
|
286
286
|
search: search,
|
287
287
|
}
|
288
288
|
|
289
|
-
|
289
|
+
api_headers = {
|
290
290
|
"content-type": 'application/json',
|
291
291
|
}
|
292
292
|
|
293
293
|
@client.call(
|
294
294
|
method: 'GET',
|
295
295
|
path: api_path,
|
296
|
-
headers:
|
297
|
-
params:
|
296
|
+
headers: api_headers,
|
297
|
+
params: api_params,
|
298
298
|
response_type: Models::DeploymentList
|
299
299
|
)
|
300
300
|
end
|
@@ -334,14 +334,14 @@ module Appwrite
|
|
334
334
|
raise Appwrite::Exception.new('Missing required parameter: "activate"')
|
335
335
|
end
|
336
336
|
|
337
|
-
|
337
|
+
api_params = {
|
338
338
|
entrypoint: entrypoint,
|
339
339
|
commands: commands,
|
340
340
|
code: code,
|
341
341
|
activate: activate,
|
342
342
|
}
|
343
343
|
|
344
|
-
|
344
|
+
api_headers = {
|
345
345
|
"content-type": 'multipart/form-data',
|
346
346
|
}
|
347
347
|
|
@@ -350,8 +350,8 @@ module Appwrite
|
|
350
350
|
|
351
351
|
@client.chunked_upload(
|
352
352
|
path: api_path,
|
353
|
-
headers:
|
354
|
-
params:
|
353
|
+
headers: api_headers,
|
354
|
+
params: api_params,
|
355
355
|
param_name: param_name,
|
356
356
|
id_param_name: id_param_name,
|
357
357
|
on_progress: on_progress,
|
@@ -379,18 +379,18 @@ module Appwrite
|
|
379
379
|
raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
|
380
380
|
end
|
381
381
|
|
382
|
-
|
382
|
+
api_params = {
|
383
383
|
}
|
384
384
|
|
385
|
-
|
385
|
+
api_headers = {
|
386
386
|
"content-type": 'application/json',
|
387
387
|
}
|
388
388
|
|
389
389
|
@client.call(
|
390
390
|
method: 'GET',
|
391
391
|
path: api_path,
|
392
|
-
headers:
|
393
|
-
params:
|
392
|
+
headers: api_headers,
|
393
|
+
params: api_params,
|
394
394
|
response_type: Models::Deployment
|
395
395
|
)
|
396
396
|
end
|
@@ -417,18 +417,18 @@ module Appwrite
|
|
417
417
|
raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
|
418
418
|
end
|
419
419
|
|
420
|
-
|
420
|
+
api_params = {
|
421
421
|
}
|
422
422
|
|
423
|
-
|
423
|
+
api_headers = {
|
424
424
|
"content-type": 'application/json',
|
425
425
|
}
|
426
426
|
|
427
427
|
@client.call(
|
428
428
|
method: 'PATCH',
|
429
429
|
path: api_path,
|
430
|
-
headers:
|
431
|
-
params:
|
430
|
+
headers: api_headers,
|
431
|
+
params: api_params,
|
432
432
|
response_type: Models::Function
|
433
433
|
)
|
434
434
|
end
|
@@ -453,18 +453,18 @@ module Appwrite
|
|
453
453
|
raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
|
454
454
|
end
|
455
455
|
|
456
|
-
|
456
|
+
api_params = {
|
457
457
|
}
|
458
458
|
|
459
|
-
|
459
|
+
api_headers = {
|
460
460
|
"content-type": 'application/json',
|
461
461
|
}
|
462
462
|
|
463
463
|
@client.call(
|
464
464
|
method: 'DELETE',
|
465
465
|
path: api_path,
|
466
|
-
headers:
|
467
|
-
params:
|
466
|
+
headers: api_headers,
|
467
|
+
params: api_params,
|
468
468
|
)
|
469
469
|
end
|
470
470
|
|
@@ -495,18 +495,18 @@ module Appwrite
|
|
495
495
|
raise Appwrite::Exception.new('Missing required parameter: "buildId"')
|
496
496
|
end
|
497
497
|
|
498
|
-
|
498
|
+
api_params = {
|
499
499
|
}
|
500
500
|
|
501
|
-
|
501
|
+
api_headers = {
|
502
502
|
"content-type": 'application/json',
|
503
503
|
}
|
504
504
|
|
505
505
|
@client.call(
|
506
506
|
method: 'POST',
|
507
507
|
path: api_path,
|
508
|
-
headers:
|
509
|
-
params:
|
508
|
+
headers: api_headers,
|
509
|
+
params: api_params,
|
510
510
|
)
|
511
511
|
end
|
512
512
|
|
@@ -530,18 +530,18 @@ module Appwrite
|
|
530
530
|
raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
|
531
531
|
end
|
532
532
|
|
533
|
-
|
533
|
+
api_params = {
|
534
534
|
}
|
535
535
|
|
536
|
-
|
536
|
+
api_headers = {
|
537
537
|
"content-type": 'application/json',
|
538
538
|
}
|
539
539
|
|
540
540
|
@client.call(
|
541
541
|
method: 'GET',
|
542
542
|
path: api_path,
|
543
|
-
headers:
|
544
|
-
params:
|
543
|
+
headers: api_headers,
|
544
|
+
params: api_params,
|
545
545
|
)
|
546
546
|
end
|
547
547
|
|
@@ -562,20 +562,20 @@ module Appwrite
|
|
562
562
|
raise Appwrite::Exception.new('Missing required parameter: "functionId"')
|
563
563
|
end
|
564
564
|
|
565
|
-
|
565
|
+
api_params = {
|
566
566
|
queries: queries,
|
567
567
|
search: search,
|
568
568
|
}
|
569
569
|
|
570
|
-
|
570
|
+
api_headers = {
|
571
571
|
"content-type": 'application/json',
|
572
572
|
}
|
573
573
|
|
574
574
|
@client.call(
|
575
575
|
method: 'GET',
|
576
576
|
path: api_path,
|
577
|
-
headers:
|
578
|
-
params:
|
577
|
+
headers: api_headers,
|
578
|
+
params: api_params,
|
579
579
|
response_type: Models::ExecutionList
|
580
580
|
)
|
581
581
|
end
|
@@ -602,7 +602,7 @@ module Appwrite
|
|
602
602
|
raise Appwrite::Exception.new('Missing required parameter: "functionId"')
|
603
603
|
end
|
604
604
|
|
605
|
-
|
605
|
+
api_params = {
|
606
606
|
body: body,
|
607
607
|
async: async,
|
608
608
|
path: xpath,
|
@@ -610,15 +610,15 @@ module Appwrite
|
|
610
610
|
headers: headers,
|
611
611
|
}
|
612
612
|
|
613
|
-
|
613
|
+
api_headers = {
|
614
614
|
"content-type": 'application/json',
|
615
615
|
}
|
616
616
|
|
617
617
|
@client.call(
|
618
618
|
method: 'POST',
|
619
619
|
path: api_path,
|
620
|
-
headers:
|
621
|
-
params:
|
620
|
+
headers: api_headers,
|
621
|
+
params: api_params,
|
622
622
|
response_type: Models::Execution
|
623
623
|
)
|
624
624
|
end
|
@@ -643,18 +643,18 @@ module Appwrite
|
|
643
643
|
raise Appwrite::Exception.new('Missing required parameter: "executionId"')
|
644
644
|
end
|
645
645
|
|
646
|
-
|
646
|
+
api_params = {
|
647
647
|
}
|
648
648
|
|
649
|
-
|
649
|
+
api_headers = {
|
650
650
|
"content-type": 'application/json',
|
651
651
|
}
|
652
652
|
|
653
653
|
@client.call(
|
654
654
|
method: 'GET',
|
655
655
|
path: api_path,
|
656
|
-
headers:
|
657
|
-
params:
|
656
|
+
headers: api_headers,
|
657
|
+
params: api_params,
|
658
658
|
response_type: Models::Execution
|
659
659
|
)
|
660
660
|
end
|
@@ -673,18 +673,18 @@ module Appwrite
|
|
673
673
|
raise Appwrite::Exception.new('Missing required parameter: "functionId"')
|
674
674
|
end
|
675
675
|
|
676
|
-
|
676
|
+
api_params = {
|
677
677
|
}
|
678
678
|
|
679
|
-
|
679
|
+
api_headers = {
|
680
680
|
"content-type": 'application/json',
|
681
681
|
}
|
682
682
|
|
683
683
|
@client.call(
|
684
684
|
method: 'GET',
|
685
685
|
path: api_path,
|
686
|
-
headers:
|
687
|
-
params:
|
686
|
+
headers: api_headers,
|
687
|
+
params: api_params,
|
688
688
|
response_type: Models::VariableList
|
689
689
|
)
|
690
690
|
end
|
@@ -714,20 +714,20 @@ module Appwrite
|
|
714
714
|
raise Appwrite::Exception.new('Missing required parameter: "value"')
|
715
715
|
end
|
716
716
|
|
717
|
-
|
717
|
+
api_params = {
|
718
718
|
key: key,
|
719
719
|
value: value,
|
720
720
|
}
|
721
721
|
|
722
|
-
|
722
|
+
api_headers = {
|
723
723
|
"content-type": 'application/json',
|
724
724
|
}
|
725
725
|
|
726
726
|
@client.call(
|
727
727
|
method: 'POST',
|
728
728
|
path: api_path,
|
729
|
-
headers:
|
730
|
-
params:
|
729
|
+
headers: api_headers,
|
730
|
+
params: api_params,
|
731
731
|
response_type: Models::Variable
|
732
732
|
)
|
733
733
|
end
|
@@ -752,18 +752,18 @@ module Appwrite
|
|
752
752
|
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
753
753
|
end
|
754
754
|
|
755
|
-
|
755
|
+
api_params = {
|
756
756
|
}
|
757
757
|
|
758
|
-
|
758
|
+
api_headers = {
|
759
759
|
"content-type": 'application/json',
|
760
760
|
}
|
761
761
|
|
762
762
|
@client.call(
|
763
763
|
method: 'GET',
|
764
764
|
path: api_path,
|
765
|
-
headers:
|
766
|
-
params:
|
765
|
+
headers: api_headers,
|
766
|
+
params: api_params,
|
767
767
|
response_type: Models::Variable
|
768
768
|
)
|
769
769
|
end
|
@@ -794,20 +794,20 @@ module Appwrite
|
|
794
794
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
795
795
|
end
|
796
796
|
|
797
|
-
|
797
|
+
api_params = {
|
798
798
|
key: key,
|
799
799
|
value: value,
|
800
800
|
}
|
801
801
|
|
802
|
-
|
802
|
+
api_headers = {
|
803
803
|
"content-type": 'application/json',
|
804
804
|
}
|
805
805
|
|
806
806
|
@client.call(
|
807
807
|
method: 'PUT',
|
808
808
|
path: api_path,
|
809
|
-
headers:
|
810
|
-
params:
|
809
|
+
headers: api_headers,
|
810
|
+
params: api_params,
|
811
811
|
response_type: Models::Variable
|
812
812
|
)
|
813
813
|
end
|
@@ -832,18 +832,18 @@ module Appwrite
|
|
832
832
|
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
833
833
|
end
|
834
834
|
|
835
|
-
|
835
|
+
api_params = {
|
836
836
|
}
|
837
837
|
|
838
|
-
|
838
|
+
api_headers = {
|
839
839
|
"content-type": 'application/json',
|
840
840
|
}
|
841
841
|
|
842
842
|
@client.call(
|
843
843
|
method: 'DELETE',
|
844
844
|
path: api_path,
|
845
|
-
headers:
|
846
|
-
params:
|
845
|
+
headers: api_headers,
|
846
|
+
params: api_params,
|
847
847
|
)
|
848
848
|
end
|
849
849
|
|
@@ -19,11 +19,11 @@ module Appwrite
|
|
19
19
|
raise Appwrite::Exception.new('Missing required parameter: "query"')
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
api_params = {
|
23
23
|
query: query,
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
api_headers = {
|
27
27
|
"x-sdk-graphql": 'true',
|
28
28
|
"content-type": 'application/json',
|
29
29
|
}
|
@@ -31,8 +31,8 @@ module Appwrite
|
|
31
31
|
@client.call(
|
32
32
|
method: 'POST',
|
33
33
|
path: api_path,
|
34
|
-
headers:
|
35
|
-
params:
|
34
|
+
headers: api_headers,
|
35
|
+
params: api_params,
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
@@ -49,11 +49,11 @@ module Appwrite
|
|
49
49
|
raise Appwrite::Exception.new('Missing required parameter: "query"')
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
api_params = {
|
53
53
|
query: query,
|
54
54
|
}
|
55
55
|
|
56
|
-
|
56
|
+
api_headers = {
|
57
57
|
"x-sdk-graphql": 'true',
|
58
58
|
"content-type": 'application/json',
|
59
59
|
}
|
@@ -61,8 +61,8 @@ module Appwrite
|
|
61
61
|
@client.call(
|
62
62
|
method: 'POST',
|
63
63
|
path: api_path,
|
64
|
-
headers:
|
65
|
-
params:
|
64
|
+
headers: api_headers,
|
65
|
+
params: api_params,
|
66
66
|
)
|
67
67
|
end
|
68
68
|
|