appwrite 30.0.1 → 30.2.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +58 -24
  3. data/lib/appwrite/enums/appwrite_migration_resource.rb +47 -0
  4. data/lib/appwrite/enums/build_runtime.rb +4 -0
  5. data/lib/appwrite/enums/environment_resource.rb +40 -0
  6. data/lib/appwrite/enums/firebase_migration_resource.rb +16 -0
  7. data/lib/appwrite/enums/n_host_migration_resource.rb +17 -0
  8. data/lib/appwrite/enums/o_auth_provider.rb +2 -0
  9. data/lib/appwrite/enums/on_duplicate.rb +9 -0
  10. data/lib/appwrite/enums/project_key_scopes.rb +6 -0
  11. data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -0
  12. data/lib/appwrite/enums/project_policy_id.rb +2 -0
  13. data/lib/appwrite/enums/runtime.rb +4 -0
  14. data/lib/appwrite/enums/supabase_migration_resource.rb +17 -0
  15. data/lib/appwrite/models/activity_event.rb +9 -4
  16. data/lib/appwrite/models/billing_plan.rb +15 -0
  17. data/lib/appwrite/models/device.rb +58 -0
  18. data/lib/appwrite/models/environment.rb +48 -0
  19. data/lib/appwrite/models/environment_list.rb +33 -0
  20. data/lib/appwrite/models/migration.rb +128 -0
  21. data/lib/appwrite/models/migration_list.rb +33 -0
  22. data/lib/appwrite/models/o_auth2_vipps.rb +43 -0
  23. data/lib/appwrite/models/organization.rb +16 -1
  24. data/lib/appwrite/models/policy_account_devices.rb +33 -0
  25. data/lib/appwrite/models/policy_deny_realtime_guests.rb +33 -0
  26. data/lib/appwrite/models/project.rb +10 -0
  27. data/lib/appwrite/models/proxy_rule.rb +11 -1
  28. data/lib/appwrite/models/session.rb +6 -1
  29. data/lib/appwrite/models/waf_rule_bypass.rb +8 -3
  30. data/lib/appwrite/models/waf_rule_challenge.rb +5 -0
  31. data/lib/appwrite/models/waf_rule_deny.rb +8 -3
  32. data/lib/appwrite/models/waf_rule_rate_limit.rb +5 -0
  33. data/lib/appwrite/models/waf_rule_redirect.rb +5 -0
  34. data/lib/appwrite/services/account.rb +175 -20
  35. data/lib/appwrite/services/activities.rb +1 -1
  36. data/lib/appwrite/services/advisor.rb +5 -5
  37. data/lib/appwrite/services/apps.rb +25 -25
  38. data/lib/appwrite/services/avatars.rb +3 -3
  39. data/lib/appwrite/services/backups.rb +6 -6
  40. data/lib/appwrite/services/databases.rb +157 -157
  41. data/lib/appwrite/services/documents_db.rb +63 -63
  42. data/lib/appwrite/services/domains.rb +77 -77
  43. data/lib/appwrite/services/functions.rb +33 -33
  44. data/lib/appwrite/services/messaging.rb +30 -30
  45. data/lib/appwrite/services/migrations.rb +653 -0
  46. data/lib/appwrite/services/mongo.rb +37 -37
  47. data/lib/appwrite/services/mysql.rb +40 -40
  48. data/lib/appwrite/services/oauth2.rb +14 -14
  49. data/lib/appwrite/services/organization.rb +17 -17
  50. data/lib/appwrite/services/postgresql.rb +44 -44
  51. data/lib/appwrite/services/presences.rb +4 -4
  52. data/lib/appwrite/services/project.rb +321 -47
  53. data/lib/appwrite/services/proxy.rb +157 -4
  54. data/lib/appwrite/services/sites.rb +32 -32
  55. data/lib/appwrite/services/storage.rb +19 -19
  56. data/lib/appwrite/services/tables_db.rb +169 -169
  57. data/lib/appwrite/services/teams.rb +23 -23
  58. data/lib/appwrite/services/tokens.rb +7 -7
  59. data/lib/appwrite/services/users.rb +50 -50
  60. data/lib/appwrite/services/vectors_db.rb +55 -55
  61. data/lib/appwrite/services/waf.rb +97 -45
  62. data/lib/appwrite/services/webhooks.rb +4 -4
  63. data/lib/appwrite.rb +17 -0
  64. metadata +17 -2
@@ -17,6 +17,7 @@ module Appwrite
17
17
  attr_reader :enabled
18
18
  attr_reader :conditions
19
19
  attr_reader :config
20
+ attr_reader :schedule
20
21
 
21
22
  def initialize(
22
23
  id:,
@@ -32,7 +33,8 @@ module Appwrite
32
33
  priority:,
33
34
  enabled:,
34
35
  conditions:,
35
- config:
36
+ config:,
37
+ schedule: nil
36
38
  )
37
39
  @id = id
38
40
  @created_at = created_at
@@ -48,6 +50,7 @@ module Appwrite
48
50
  @enabled = enabled
49
51
  @conditions = conditions
50
52
  @config = config
53
+ @schedule = schedule
51
54
  end
52
55
 
53
56
  def self.from(map:)
@@ -66,7 +69,8 @@ module Appwrite
66
69
  priority: map["priority"],
67
70
  enabled: map["enabled"],
68
71
  conditions: map["conditions"],
69
- config: map["config"]
72
+ config: map["config"],
73
+ schedule: map["schedule"]
70
74
  )
71
75
  end
72
76
 
@@ -85,7 +89,8 @@ module Appwrite
85
89
  "priority": @priority,
86
90
  "enabled": @enabled,
87
91
  "conditions": @conditions,
88
- "config": @config
92
+ "config": @config,
93
+ "schedule": @schedule
89
94
  }
90
95
  end
91
96
 
@@ -17,6 +17,7 @@ module Appwrite
17
17
  attr_reader :enabled
18
18
  attr_reader :conditions
19
19
  attr_reader :config
20
+ attr_reader :schedule
20
21
  attr_reader :limit
21
22
  attr_reader :interval
22
23
  attr_reader :key
@@ -38,6 +39,7 @@ module Appwrite
38
39
  enabled:,
39
40
  conditions:,
40
41
  config:,
42
+ schedule: nil,
41
43
  limit:,
42
44
  interval:,
43
45
  key:,
@@ -58,6 +60,7 @@ module Appwrite
58
60
  @enabled = enabled
59
61
  @conditions = conditions
60
62
  @config = config
63
+ @schedule = schedule
61
64
  @limit = limit
62
65
  @interval = interval
63
66
  @key = key
@@ -82,6 +85,7 @@ module Appwrite
82
85
  enabled: map["enabled"],
83
86
  conditions: map["conditions"],
84
87
  config: map["config"],
88
+ schedule: map["schedule"],
85
89
  limit: map["limit"],
86
90
  interval: map["interval"],
87
91
  key: map["key"],
@@ -106,6 +110,7 @@ module Appwrite
106
110
  "enabled": @enabled,
107
111
  "conditions": @conditions,
108
112
  "config": @config,
113
+ "schedule": @schedule,
109
114
  "limit": @limit,
110
115
  "interval": @interval,
111
116
  "key": @key,
@@ -17,6 +17,7 @@ module Appwrite
17
17
  attr_reader :enabled
18
18
  attr_reader :conditions
19
19
  attr_reader :config
20
+ attr_reader :schedule
20
21
  attr_reader :location
21
22
  attr_reader :status_code
22
23
 
@@ -35,6 +36,7 @@ module Appwrite
35
36
  enabled:,
36
37
  conditions:,
37
38
  config:,
39
+ schedule: nil,
38
40
  location:,
39
41
  status_code:
40
42
  )
@@ -52,6 +54,7 @@ module Appwrite
52
54
  @enabled = enabled
53
55
  @conditions = conditions
54
56
  @config = config
57
+ @schedule = schedule
55
58
  @location = location
56
59
  @status_code = status_code
57
60
  end
@@ -73,6 +76,7 @@ module Appwrite
73
76
  enabled: map["enabled"],
74
77
  conditions: map["conditions"],
75
78
  config: map["config"],
79
+ schedule: map["schedule"],
76
80
  location: map["location"],
77
81
  status_code: map["statusCode"]
78
82
  )
@@ -94,6 +98,7 @@ module Appwrite
94
98
  "enabled": @enabled,
95
99
  "conditions": @conditions,
96
100
  "config": @config,
101
+ "schedule": @schedule,
97
102
  "location": @location,
98
103
  "statusCode": @status_code
99
104
  }
@@ -131,7 +131,7 @@ module Appwrite
131
131
  end
132
132
 
133
133
  api_path = '/account/consents/{consentId}'
134
- .gsub('{consentId}', consent_id)
134
+ .gsub('{consentId}', @client.encode_path(consent_id))
135
135
 
136
136
  api_params = {}
137
137
 
@@ -164,7 +164,7 @@ module Appwrite
164
164
  end
165
165
 
166
166
  api_path = '/account/consents/{consentId}'
167
- .gsub('{consentId}', consent_id)
167
+ .gsub('{consentId}', @client.encode_path(consent_id))
168
168
 
169
169
  api_params = {}
170
170
 
@@ -201,7 +201,7 @@ module Appwrite
201
201
  end
202
202
 
203
203
  api_path = '/account/consents/{consentId}/tokens'
204
- .gsub('{consentId}', consent_id)
204
+ .gsub('{consentId}', @client.encode_path(consent_id))
205
205
 
206
206
  api_params = {
207
207
  queries: queries,
@@ -242,8 +242,8 @@ module Appwrite
242
242
  end
243
243
 
244
244
  api_path = '/account/consents/{consentId}/tokens/{tokenId}'
245
- .gsub('{consentId}', consent_id)
246
- .gsub('{tokenId}', token_id)
245
+ .gsub('{consentId}', @client.encode_path(consent_id))
246
+ .gsub('{tokenId}', @client.encode_path(token_id))
247
247
 
248
248
  api_params = {}
249
249
 
@@ -282,8 +282,8 @@ module Appwrite
282
282
  end
283
283
 
284
284
  api_path = '/account/consents/{consentId}/tokens/{tokenId}'
285
- .gsub('{consentId}', consent_id)
286
- .gsub('{tokenId}', token_id)
285
+ .gsub('{consentId}', @client.encode_path(consent_id))
286
+ .gsub('{tokenId}', @client.encode_path(token_id))
287
287
 
288
288
  api_params = {}
289
289
 
@@ -301,6 +301,161 @@ module Appwrite
301
301
  )
302
302
  end
303
303
 
304
+ # Create an account switching device. A device is a container, scoped to one
305
+ # browser or app install, that holds multiple sessions and tracks which one
306
+ # is active. Once a device exists, session creation endpoints attach the new
307
+ # session to it automatically, so a single browser can stay signed in to
308
+ # several accounts and switch between them. A device holds at most one
309
+ # session per user: signing in again as a user it already holds replaces that
310
+ # user's session. The device lives as long as its newest session.
311
+ #
312
+ # The device secret is returned in a cookie. Run this on app start: if the
313
+ # browser already has a valid device, the existing one is returned with the
314
+ # same status code instead of an error, so it is always safe to call.
315
+ #
316
+ # Every session that joins the device rotates the device secret and re-issues
317
+ # the cookie, so an earlier copy of the secret stops working. A client that
318
+ # keeps the secret itself, rather than relying on the cookie, must replace it
319
+ # from each session response.
320
+ #
321
+ #
322
+ # @return [Device]
323
+ def create_device()
324
+ api_path = '/account/devices'
325
+
326
+ api_params = {}
327
+
328
+ api_headers = {
329
+ "X-Appwrite-Project": @client.get_config('project'),
330
+ "content-type": 'application/json',
331
+ "accept": 'application/json',
332
+ }
333
+
334
+ @client.call(
335
+ method: 'POST',
336
+ path: api_path,
337
+ headers: api_headers,
338
+ params: api_params,
339
+ response_type: Models::Device
340
+ )
341
+ end
342
+
343
+ # Get the account switching device for the current browser, including every
344
+ # session it holds, the name of the user each session belongs to, and the ID
345
+ # of the active session. Use the string 'current' to reference the current
346
+ # browser's device.
347
+ #
348
+ # @param [String] device_id Device ID. Use the string 'current' to reference the device of the current browser.
349
+ #
350
+ # @return [Device]
351
+ def get_device(
352
+ device_id:
353
+ )
354
+ if device_id.nil? || device_id == ''
355
+ raise Appwrite::Exception.new('Missing required parameter: "deviceId"')
356
+ end
357
+
358
+ api_path = '/account/devices/{deviceId}'
359
+ .gsub('{deviceId}', @client.encode_path(device_id))
360
+
361
+ api_params = {}
362
+
363
+ api_headers = {
364
+ "X-Appwrite-Project": @client.get_config('project'),
365
+ "accept": 'application/json',
366
+ }
367
+
368
+ @client.call(
369
+ method: 'GET',
370
+ path: api_path,
371
+ headers: api_headers,
372
+ params: api_params,
373
+ response_type: Models::Device
374
+ )
375
+ end
376
+
377
+ # Delete the account switching device for the current browser. Every session
378
+ # the device holds is signed out, each firing its own session delete event,
379
+ # the device is removed, and both the device and session cookies are cleared.
380
+ # Use the string 'current' to reference the current browser's device.
381
+ #
382
+ # @param [String] device_id Device ID. Use the string 'current' to reference the device of the current browser.
383
+ #
384
+ # @return []
385
+ def delete_device(
386
+ device_id:
387
+ )
388
+ if device_id.nil? || device_id == ''
389
+ raise Appwrite::Exception.new('Missing required parameter: "deviceId"')
390
+ end
391
+
392
+ api_path = '/account/devices/{deviceId}'
393
+ .gsub('{deviceId}', @client.encode_path(device_id))
394
+
395
+ api_params = {}
396
+
397
+ api_headers = {
398
+ "X-Appwrite-Project": @client.get_config('project'),
399
+ "content-type": 'application/json',
400
+ "accept": 'application/json',
401
+ }
402
+
403
+ @client.call(
404
+ method: 'DELETE',
405
+ path: api_path,
406
+ headers: api_headers,
407
+ params: api_params,
408
+ )
409
+ end
410
+
411
+ # Switch the active account on an account switching device to one of the
412
+ # sessions it holds. The chosen session becomes active and its secret is
413
+ # written to the browser's session cookie, so subsequent requests
414
+ # authenticate as that account. Use the string 'current' to reference the
415
+ # current browser's device.
416
+ #
417
+ # Switching rotates the chosen session's secret. Any other holder of that
418
+ # session, such as a copy kept elsewhere, stops working, so a session should
419
+ # not be shared across devices.
420
+ #
421
+ # @param [String] device_id Device ID. Use the string 'current' to reference the device of the current browser.
422
+ # @param [String] session_id ID of the session, held by the device, to make active.
423
+ #
424
+ # @return [Session]
425
+ def update_device_session(
426
+ device_id:,
427
+ session_id:
428
+ )
429
+ if device_id.nil? || device_id == ''
430
+ raise Appwrite::Exception.new('Missing required parameter: "deviceId"')
431
+ end
432
+
433
+ if session_id.nil?
434
+ raise Appwrite::Exception.new('Missing required parameter: "sessionId"')
435
+ end
436
+
437
+ api_path = '/account/devices/{deviceId}/session'
438
+ .gsub('{deviceId}', @client.encode_path(device_id))
439
+
440
+ api_params = {
441
+ sessionId: session_id,
442
+ }
443
+
444
+ api_headers = {
445
+ "X-Appwrite-Project": @client.get_config('project'),
446
+ "content-type": 'application/json',
447
+ "accept": 'application/json',
448
+ }
449
+
450
+ @client.call(
451
+ method: 'PATCH',
452
+ path: api_path,
453
+ headers: api_headers,
454
+ params: api_params,
455
+ response_type: Models::Session
456
+ )
457
+ end
458
+
304
459
  # Update currently logged in user account email address. After changing user
305
460
  # address, the user confirmation status will get reset. A new confirmation
306
461
  # email is not sent automatically however you can use the send confirmation
@@ -392,7 +547,7 @@ module Appwrite
392
547
  end
393
548
 
394
549
  api_path = '/account/identities/{identityId}'
395
- .gsub('{identityId}', identity_id)
550
+ .gsub('{identityId}', @client.encode_path(identity_id))
396
551
 
397
552
  api_params = {}
398
553
 
@@ -490,7 +645,7 @@ module Appwrite
490
645
  end
491
646
 
492
647
  api_path = '/account/mfa/authenticators/{type}'
493
- .gsub('{type}', type)
648
+ .gsub('{type}', @client.encode_path(type))
494
649
 
495
650
  api_params = {}
496
651
 
@@ -530,7 +685,7 @@ module Appwrite
530
685
  end
531
686
 
532
687
  api_path = '/account/mfa/authenticators/{type}'
533
- .gsub('{type}', type)
688
+ .gsub('{type}', @client.encode_path(type))
534
689
 
535
690
  api_params = {
536
691
  otp: otp,
@@ -564,7 +719,7 @@ module Appwrite
564
719
  end
565
720
 
566
721
  api_path = '/account/mfa/authenticators/{type}'
567
- .gsub('{type}', type)
722
+ .gsub('{type}', @client.encode_path(type))
568
723
 
569
724
  api_params = {}
570
725
 
@@ -882,7 +1037,7 @@ module Appwrite
882
1037
  end
883
1038
 
884
1039
  api_path = '/account/passkeys/{passkeyId}'
885
- .gsub('{passkeyId}', passkey_id)
1040
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
886
1041
 
887
1042
  api_params = {}
888
1043
 
@@ -919,7 +1074,7 @@ module Appwrite
919
1074
  end
920
1075
 
921
1076
  api_path = '/account/passkeys/{passkeyId}'
922
- .gsub('{passkeyId}', passkey_id)
1077
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
923
1078
 
924
1079
  api_params = {
925
1080
  name: name,
@@ -956,7 +1111,7 @@ module Appwrite
956
1111
  end
957
1112
 
958
1113
  api_path = '/account/passkeys/{passkeyId}'
959
- .gsub('{passkeyId}', passkey_id)
1114
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
960
1115
 
961
1116
  api_params = {}
962
1117
 
@@ -997,7 +1152,7 @@ module Appwrite
997
1152
  end
998
1153
 
999
1154
  api_path = '/account/passkeys/{passkeyId}/verification'
1000
- .gsub('{passkeyId}', passkey_id)
1155
+ .gsub('{passkeyId}', @client.encode_path(passkey_id))
1001
1156
 
1002
1157
  api_params = {
1003
1158
  credential: credential,
@@ -1759,7 +1914,7 @@ module Appwrite
1759
1914
  end
1760
1915
 
1761
1916
  api_path = '/account/sessions/{sessionId}'
1762
- .gsub('{sessionId}', session_id)
1917
+ .gsub('{sessionId}', @client.encode_path(session_id))
1763
1918
 
1764
1919
  api_params = {}
1765
1920
 
@@ -1792,7 +1947,7 @@ module Appwrite
1792
1947
  end
1793
1948
 
1794
1949
  api_path = '/account/sessions/{sessionId}'
1795
- .gsub('{sessionId}', session_id)
1950
+ .gsub('{sessionId}', @client.encode_path(session_id))
1796
1951
 
1797
1952
  api_params = {}
1798
1953
 
@@ -1828,7 +1983,7 @@ module Appwrite
1828
1983
  end
1829
1984
 
1830
1985
  api_path = '/account/sessions/{sessionId}'
1831
- .gsub('{sessionId}', session_id)
1986
+ .gsub('{sessionId}', @client.encode_path(session_id))
1832
1987
 
1833
1988
  api_params = {}
1834
1989
 
@@ -2006,7 +2161,7 @@ module Appwrite
2006
2161
  # about session
2007
2162
  # limits](https://appwrite.io/docs/authentication-security#limits).
2008
2163
  #
2009
- # @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
2164
+ # @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, vipps, vippsSandbox, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
2010
2165
  # @param [String] success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
2011
2166
  # @param [String] failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
2012
2167
  # @param [Array] scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
@@ -2025,7 +2180,7 @@ module Appwrite
2025
2180
  end
2026
2181
 
2027
2182
  api_path = '/account/tokens/oauth2/{provider}'
2028
- .gsub('{provider}', provider)
2183
+ .gsub('{provider}', @client.encode_path(provider))
2029
2184
 
2030
2185
  api_params = {
2031
2186
  success: success,
@@ -51,7 +51,7 @@ module Appwrite
51
51
  end
52
52
 
53
53
  api_path = '/activities/events/{eventId}'
54
- .gsub('{eventId}', event_id)
54
+ .gsub('{eventId}', @client.encode_path(event_id))
55
55
 
56
56
  api_params = {}
57
57
 
@@ -54,7 +54,7 @@ module Appwrite
54
54
  end
55
55
 
56
56
  api_path = '/reports/{reportId}'
57
- .gsub('{reportId}', report_id)
57
+ .gsub('{reportId}', @client.encode_path(report_id))
58
58
 
59
59
  api_params = {}
60
60
 
@@ -87,7 +87,7 @@ module Appwrite
87
87
  end
88
88
 
89
89
  api_path = '/reports/{reportId}'
90
- .gsub('{reportId}', report_id)
90
+ .gsub('{reportId}', @client.encode_path(report_id))
91
91
 
92
92
  api_params = {}
93
93
 
@@ -124,7 +124,7 @@ module Appwrite
124
124
  end
125
125
 
126
126
  api_path = '/reports/{reportId}/insights'
127
- .gsub('{reportId}', report_id)
127
+ .gsub('{reportId}', @client.encode_path(report_id))
128
128
 
129
129
  api_params = {
130
130
  queries: queries,
@@ -165,8 +165,8 @@ module Appwrite
165
165
  end
166
166
 
167
167
  api_path = '/reports/{reportId}/insights/{insightId}'
168
- .gsub('{reportId}', report_id)
169
- .gsub('{insightId}', insight_id)
168
+ .gsub('{reportId}', @client.encode_path(report_id))
169
+ .gsub('{insightId}', @client.encode_path(insight_id))
170
170
 
171
171
  api_params = {}
172
172
 
@@ -191,7 +191,7 @@ module Appwrite
191
191
  end
192
192
 
193
193
  api_path = '/apps/{appId}'
194
- .gsub('{appId}', app_id)
194
+ .gsub('{appId}', @client.encode_path(app_id))
195
195
 
196
196
  api_params = {}
197
197
 
@@ -264,7 +264,7 @@ module Appwrite
264
264
  end
265
265
 
266
266
  api_path = '/apps/{appId}'
267
- .gsub('{appId}', app_id)
267
+ .gsub('{appId}', @client.encode_path(app_id))
268
268
 
269
269
  api_params = {
270
270
  name: name,
@@ -316,7 +316,7 @@ module Appwrite
316
316
  end
317
317
 
318
318
  api_path = '/apps/{appId}'
319
- .gsub('{appId}', app_id)
319
+ .gsub('{appId}', @client.encode_path(app_id))
320
320
 
321
321
  api_params = {}
322
322
 
@@ -353,7 +353,7 @@ module Appwrite
353
353
  end
354
354
 
355
355
  api_path = '/apps/{appId}/installations'
356
- .gsub('{appId}', app_id)
356
+ .gsub('{appId}', @client.encode_path(app_id))
357
357
 
358
358
  api_params = {
359
359
  queries: queries,
@@ -395,8 +395,8 @@ module Appwrite
395
395
  end
396
396
 
397
397
  api_path = '/apps/{appId}/installations/{installationId}'
398
- .gsub('{appId}', app_id)
399
- .gsub('{installationId}', installation_id)
398
+ .gsub('{appId}', @client.encode_path(app_id))
399
+ .gsub('{installationId}', @client.encode_path(installation_id))
400
400
 
401
401
  api_params = {}
402
402
 
@@ -435,8 +435,8 @@ module Appwrite
435
435
  end
436
436
 
437
437
  api_path = '/apps/{appId}/installations/{installationId}'
438
- .gsub('{appId}', app_id)
439
- .gsub('{installationId}', installation_id)
438
+ .gsub('{appId}', @client.encode_path(app_id))
439
+ .gsub('{installationId}', @client.encode_path(installation_id))
440
440
 
441
441
  api_params = {}
442
442
 
@@ -480,8 +480,8 @@ module Appwrite
480
480
  end
481
481
 
482
482
  api_path = '/apps/{appId}/installations/{installationId}/tokens'
483
- .gsub('{appId}', app_id)
484
- .gsub('{installationId}', installation_id)
483
+ .gsub('{appId}', @client.encode_path(app_id))
484
+ .gsub('{installationId}', @client.encode_path(installation_id))
485
485
 
486
486
  api_params = {}
487
487
 
@@ -517,7 +517,7 @@ module Appwrite
517
517
  end
518
518
 
519
519
  api_path = '/apps/{appId}/keys'
520
- .gsub('{appId}', app_id)
520
+ .gsub('{appId}', @client.encode_path(app_id))
521
521
 
522
522
  api_params = {
523
523
  queries: queries,
@@ -553,7 +553,7 @@ module Appwrite
553
553
  end
554
554
 
555
555
  api_path = '/apps/{appId}/keys'
556
- .gsub('{appId}', app_id)
556
+ .gsub('{appId}', @client.encode_path(app_id))
557
557
 
558
558
  api_params = {}
559
559
 
@@ -591,8 +591,8 @@ module Appwrite
591
591
  end
592
592
 
593
593
  api_path = '/apps/{appId}/keys/{keyId}'
594
- .gsub('{appId}', app_id)
595
- .gsub('{keyId}', key_id)
594
+ .gsub('{appId}', @client.encode_path(app_id))
595
+ .gsub('{keyId}', @client.encode_path(key_id))
596
596
 
597
597
  api_params = {}
598
598
 
@@ -629,8 +629,8 @@ module Appwrite
629
629
  end
630
630
 
631
631
  api_path = '/apps/{appId}/keys/{keyId}'
632
- .gsub('{appId}', app_id)
633
- .gsub('{keyId}', key_id)
632
+ .gsub('{appId}', @client.encode_path(app_id))
633
+ .gsub('{keyId}', @client.encode_path(key_id))
634
634
 
635
635
  api_params = {}
636
636
 
@@ -669,7 +669,7 @@ module Appwrite
669
669
  end
670
670
 
671
671
  api_path = '/apps/{appId}/labels'
672
- .gsub('{appId}', app_id)
672
+ .gsub('{appId}', @client.encode_path(app_id))
673
673
 
674
674
  api_params = {
675
675
  labels: labels,
@@ -707,7 +707,7 @@ module Appwrite
707
707
  end
708
708
 
709
709
  api_path = '/apps/{appId}/secrets'
710
- .gsub('{appId}', app_id)
710
+ .gsub('{appId}', @client.encode_path(app_id))
711
711
 
712
712
  api_params = {
713
713
  queries: queries,
@@ -741,7 +741,7 @@ module Appwrite
741
741
  end
742
742
 
743
743
  api_path = '/apps/{appId}/secrets'
744
- .gsub('{appId}', app_id)
744
+ .gsub('{appId}', @client.encode_path(app_id))
745
745
 
746
746
  api_params = {}
747
747
 
@@ -779,8 +779,8 @@ module Appwrite
779
779
  end
780
780
 
781
781
  api_path = '/apps/{appId}/secrets/{secretId}'
782
- .gsub('{appId}', app_id)
783
- .gsub('{secretId}', secret_id)
782
+ .gsub('{appId}', @client.encode_path(app_id))
783
+ .gsub('{secretId}', @client.encode_path(secret_id))
784
784
 
785
785
  api_params = {}
786
786
 
@@ -817,8 +817,8 @@ module Appwrite
817
817
  end
818
818
 
819
819
  api_path = '/apps/{appId}/secrets/{secretId}'
820
- .gsub('{appId}', app_id)
821
- .gsub('{secretId}', secret_id)
820
+ .gsub('{appId}', @client.encode_path(app_id))
821
+ .gsub('{secretId}', @client.encode_path(secret_id))
822
822
 
823
823
  api_params = {}
824
824
 
@@ -855,7 +855,7 @@ module Appwrite
855
855
  end
856
856
 
857
857
  api_path = '/apps/{appId}/team'
858
- .gsub('{appId}', app_id)
858
+ .gsub('{appId}', @client.encode_path(app_id))
859
859
 
860
860
  api_params = {
861
861
  teamId: team_id,
@@ -889,7 +889,7 @@ module Appwrite
889
889
  end
890
890
 
891
891
  api_path = '/apps/{appId}/tokens'
892
- .gsub('{appId}', app_id)
892
+ .gsub('{appId}', @client.encode_path(app_id))
893
893
 
894
894
  api_params = {}
895
895