appwrite 9.0.0 → 10.0.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.
@@ -17,20 +17,20 @@ module Appwrite
17
17
  def list(queries: nil, search: nil)
18
18
  api_path = '/functions'
19
19
 
20
- params = {
20
+ api_params = {
21
21
  queries: queries,
22
22
  search: search,
23
23
  }
24
24
 
25
- headers = {
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: headers,
33
- params: 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
- params = {
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
- headers = {
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: headers,
111
- params: 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
- params = {
124
+ api_params = {
125
125
  }
126
126
 
127
- headers = {
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: headers,
135
- params: 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
- params = {
154
+ api_params = {
155
155
  }
156
156
 
157
- headers = {
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: headers,
165
- params: params,
164
+ headers: api_headers,
165
+ params: api_params,
166
166
  response_type: Models::Function
167
167
  )
168
168
  end
@@ -188,7 +188,7 @@ module Appwrite
188
188
  # @param [String] provider_root_directory Path to function code in the linked repo.
189
189
  #
190
190
  # @return [Function]
191
- def update(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil)
191
+ def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil)
192
192
  api_path = '/functions/{functionId}'
193
193
  .gsub('{functionId}', function_id)
194
194
 
@@ -200,11 +200,7 @@ module Appwrite
200
200
  raise Appwrite::Exception.new('Missing required parameter: "name"')
201
201
  end
202
202
 
203
- if runtime.nil?
204
- raise Appwrite::Exception.new('Missing required parameter: "runtime"')
205
- end
206
-
207
- params = {
203
+ api_params = {
208
204
  name: name,
209
205
  runtime: runtime,
210
206
  execute: execute,
@@ -222,15 +218,15 @@ module Appwrite
222
218
  providerRootDirectory: provider_root_directory,
223
219
  }
224
220
 
225
- headers = {
221
+ api_headers = {
226
222
  "content-type": 'application/json',
227
223
  }
228
224
 
229
225
  @client.call(
230
226
  method: 'PUT',
231
227
  path: api_path,
232
- headers: headers,
233
- params: params,
228
+ headers: api_headers,
229
+ params: api_params,
234
230
  response_type: Models::Function
235
231
  )
236
232
  end
@@ -249,18 +245,18 @@ module Appwrite
249
245
  raise Appwrite::Exception.new('Missing required parameter: "functionId"')
250
246
  end
251
247
 
252
- params = {
248
+ api_params = {
253
249
  }
254
250
 
255
- headers = {
251
+ api_headers = {
256
252
  "content-type": 'application/json',
257
253
  }
258
254
 
259
255
  @client.call(
260
256
  method: 'DELETE',
261
257
  path: api_path,
262
- headers: headers,
263
- params: params,
258
+ headers: api_headers,
259
+ params: api_params,
264
260
  )
265
261
  end
266
262
 
@@ -281,20 +277,20 @@ module Appwrite
281
277
  raise Appwrite::Exception.new('Missing required parameter: "functionId"')
282
278
  end
283
279
 
284
- params = {
280
+ api_params = {
285
281
  queries: queries,
286
282
  search: search,
287
283
  }
288
284
 
289
- headers = {
285
+ api_headers = {
290
286
  "content-type": 'application/json',
291
287
  }
292
288
 
293
289
  @client.call(
294
290
  method: 'GET',
295
291
  path: api_path,
296
- headers: headers,
297
- params: params,
292
+ headers: api_headers,
293
+ params: api_params,
298
294
  response_type: Models::DeploymentList
299
295
  )
300
296
  end
@@ -334,14 +330,14 @@ module Appwrite
334
330
  raise Appwrite::Exception.new('Missing required parameter: "activate"')
335
331
  end
336
332
 
337
- params = {
333
+ api_params = {
338
334
  entrypoint: entrypoint,
339
335
  commands: commands,
340
336
  code: code,
341
337
  activate: activate,
342
338
  }
343
339
 
344
- headers = {
340
+ api_headers = {
345
341
  "content-type": 'multipart/form-data',
346
342
  }
347
343
 
@@ -350,8 +346,8 @@ module Appwrite
350
346
 
351
347
  @client.chunked_upload(
352
348
  path: api_path,
353
- headers: headers,
354
- params: params,
349
+ headers: api_headers,
350
+ params: api_params,
355
351
  param_name: param_name,
356
352
  id_param_name: id_param_name,
357
353
  on_progress: on_progress,
@@ -379,18 +375,18 @@ module Appwrite
379
375
  raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
380
376
  end
381
377
 
382
- params = {
378
+ api_params = {
383
379
  }
384
380
 
385
- headers = {
381
+ api_headers = {
386
382
  "content-type": 'application/json',
387
383
  }
388
384
 
389
385
  @client.call(
390
386
  method: 'GET',
391
387
  path: api_path,
392
- headers: headers,
393
- params: params,
388
+ headers: api_headers,
389
+ params: api_params,
394
390
  response_type: Models::Deployment
395
391
  )
396
392
  end
@@ -417,18 +413,18 @@ module Appwrite
417
413
  raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
418
414
  end
419
415
 
420
- params = {
416
+ api_params = {
421
417
  }
422
418
 
423
- headers = {
419
+ api_headers = {
424
420
  "content-type": 'application/json',
425
421
  }
426
422
 
427
423
  @client.call(
428
424
  method: 'PATCH',
429
425
  path: api_path,
430
- headers: headers,
431
- params: params,
426
+ headers: api_headers,
427
+ params: api_params,
432
428
  response_type: Models::Function
433
429
  )
434
430
  end
@@ -453,18 +449,18 @@ module Appwrite
453
449
  raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
454
450
  end
455
451
 
456
- params = {
452
+ api_params = {
457
453
  }
458
454
 
459
- headers = {
455
+ api_headers = {
460
456
  "content-type": 'application/json',
461
457
  }
462
458
 
463
459
  @client.call(
464
460
  method: 'DELETE',
465
461
  path: api_path,
466
- headers: headers,
467
- params: params,
462
+ headers: api_headers,
463
+ params: api_params,
468
464
  )
469
465
  end
470
466
 
@@ -495,18 +491,18 @@ module Appwrite
495
491
  raise Appwrite::Exception.new('Missing required parameter: "buildId"')
496
492
  end
497
493
 
498
- params = {
494
+ api_params = {
499
495
  }
500
496
 
501
- headers = {
497
+ api_headers = {
502
498
  "content-type": 'application/json',
503
499
  }
504
500
 
505
501
  @client.call(
506
502
  method: 'POST',
507
503
  path: api_path,
508
- headers: headers,
509
- params: params,
504
+ headers: api_headers,
505
+ params: api_params,
510
506
  )
511
507
  end
512
508
 
@@ -530,18 +526,18 @@ module Appwrite
530
526
  raise Appwrite::Exception.new('Missing required parameter: "deploymentId"')
531
527
  end
532
528
 
533
- params = {
529
+ api_params = {
534
530
  }
535
531
 
536
- headers = {
532
+ api_headers = {
537
533
  "content-type": 'application/json',
538
534
  }
539
535
 
540
536
  @client.call(
541
537
  method: 'GET',
542
538
  path: api_path,
543
- headers: headers,
544
- params: params,
539
+ headers: api_headers,
540
+ params: api_params,
545
541
  )
546
542
  end
547
543
 
@@ -562,20 +558,20 @@ module Appwrite
562
558
  raise Appwrite::Exception.new('Missing required parameter: "functionId"')
563
559
  end
564
560
 
565
- params = {
561
+ api_params = {
566
562
  queries: queries,
567
563
  search: search,
568
564
  }
569
565
 
570
- headers = {
566
+ api_headers = {
571
567
  "content-type": 'application/json',
572
568
  }
573
569
 
574
570
  @client.call(
575
571
  method: 'GET',
576
572
  path: api_path,
577
- headers: headers,
578
- params: params,
573
+ headers: api_headers,
574
+ params: api_params,
579
575
  response_type: Models::ExecutionList
580
576
  )
581
577
  end
@@ -602,7 +598,7 @@ module Appwrite
602
598
  raise Appwrite::Exception.new('Missing required parameter: "functionId"')
603
599
  end
604
600
 
605
- params = {
601
+ api_params = {
606
602
  body: body,
607
603
  async: async,
608
604
  path: xpath,
@@ -610,15 +606,15 @@ module Appwrite
610
606
  headers: headers,
611
607
  }
612
608
 
613
- headers = {
609
+ api_headers = {
614
610
  "content-type": 'application/json',
615
611
  }
616
612
 
617
613
  @client.call(
618
614
  method: 'POST',
619
615
  path: api_path,
620
- headers: headers,
621
- params: params,
616
+ headers: api_headers,
617
+ params: api_params,
622
618
  response_type: Models::Execution
623
619
  )
624
620
  end
@@ -643,18 +639,18 @@ module Appwrite
643
639
  raise Appwrite::Exception.new('Missing required parameter: "executionId"')
644
640
  end
645
641
 
646
- params = {
642
+ api_params = {
647
643
  }
648
644
 
649
- headers = {
645
+ api_headers = {
650
646
  "content-type": 'application/json',
651
647
  }
652
648
 
653
649
  @client.call(
654
650
  method: 'GET',
655
651
  path: api_path,
656
- headers: headers,
657
- params: params,
652
+ headers: api_headers,
653
+ params: api_params,
658
654
  response_type: Models::Execution
659
655
  )
660
656
  end
@@ -673,18 +669,18 @@ module Appwrite
673
669
  raise Appwrite::Exception.new('Missing required parameter: "functionId"')
674
670
  end
675
671
 
676
- params = {
672
+ api_params = {
677
673
  }
678
674
 
679
- headers = {
675
+ api_headers = {
680
676
  "content-type": 'application/json',
681
677
  }
682
678
 
683
679
  @client.call(
684
680
  method: 'GET',
685
681
  path: api_path,
686
- headers: headers,
687
- params: params,
682
+ headers: api_headers,
683
+ params: api_params,
688
684
  response_type: Models::VariableList
689
685
  )
690
686
  end
@@ -714,20 +710,20 @@ module Appwrite
714
710
  raise Appwrite::Exception.new('Missing required parameter: "value"')
715
711
  end
716
712
 
717
- params = {
713
+ api_params = {
718
714
  key: key,
719
715
  value: value,
720
716
  }
721
717
 
722
- headers = {
718
+ api_headers = {
723
719
  "content-type": 'application/json',
724
720
  }
725
721
 
726
722
  @client.call(
727
723
  method: 'POST',
728
724
  path: api_path,
729
- headers: headers,
730
- params: params,
725
+ headers: api_headers,
726
+ params: api_params,
731
727
  response_type: Models::Variable
732
728
  )
733
729
  end
@@ -752,18 +748,18 @@ module Appwrite
752
748
  raise Appwrite::Exception.new('Missing required parameter: "variableId"')
753
749
  end
754
750
 
755
- params = {
751
+ api_params = {
756
752
  }
757
753
 
758
- headers = {
754
+ api_headers = {
759
755
  "content-type": 'application/json',
760
756
  }
761
757
 
762
758
  @client.call(
763
759
  method: 'GET',
764
760
  path: api_path,
765
- headers: headers,
766
- params: params,
761
+ headers: api_headers,
762
+ params: api_params,
767
763
  response_type: Models::Variable
768
764
  )
769
765
  end
@@ -794,20 +790,20 @@ module Appwrite
794
790
  raise Appwrite::Exception.new('Missing required parameter: "key"')
795
791
  end
796
792
 
797
- params = {
793
+ api_params = {
798
794
  key: key,
799
795
  value: value,
800
796
  }
801
797
 
802
- headers = {
798
+ api_headers = {
803
799
  "content-type": 'application/json',
804
800
  }
805
801
 
806
802
  @client.call(
807
803
  method: 'PUT',
808
804
  path: api_path,
809
- headers: headers,
810
- params: params,
805
+ headers: api_headers,
806
+ params: api_params,
811
807
  response_type: Models::Variable
812
808
  )
813
809
  end
@@ -832,18 +828,18 @@ module Appwrite
832
828
  raise Appwrite::Exception.new('Missing required parameter: "variableId"')
833
829
  end
834
830
 
835
- params = {
831
+ api_params = {
836
832
  }
837
833
 
838
- headers = {
834
+ api_headers = {
839
835
  "content-type": 'application/json',
840
836
  }
841
837
 
842
838
  @client.call(
843
839
  method: 'DELETE',
844
840
  path: api_path,
845
- headers: headers,
846
- params: params,
841
+ headers: api_headers,
842
+ params: api_params,
847
843
  )
848
844
  end
849
845
 
@@ -19,11 +19,11 @@ module Appwrite
19
19
  raise Appwrite::Exception.new('Missing required parameter: "query"')
20
20
  end
21
21
 
22
- params = {
22
+ api_params = {
23
23
  query: query,
24
24
  }
25
25
 
26
- headers = {
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: headers,
35
- params: 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
- params = {
52
+ api_params = {
53
53
  query: query,
54
54
  }
55
55
 
56
- headers = {
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: headers,
65
- params: params,
64
+ headers: api_headers,
65
+ params: api_params,
66
66
  )
67
67
  end
68
68