appwrite 30.0.1 → 30.1.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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +44 -24
  3. data/lib/appwrite/enums/appwrite_migration_resource.rb +46 -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/on_duplicate.rb +9 -0
  9. data/lib/appwrite/enums/project_policy_id.rb +1 -0
  10. data/lib/appwrite/enums/runtime.rb +4 -0
  11. data/lib/appwrite/enums/supabase_migration_resource.rb +17 -0
  12. data/lib/appwrite/models/billing_plan.rb +15 -0
  13. data/lib/appwrite/models/migration.rb +128 -0
  14. data/lib/appwrite/models/migration_list.rb +33 -0
  15. data/lib/appwrite/models/policy_deny_realtime_guests.rb +33 -0
  16. data/lib/appwrite/services/account.rb +19 -19
  17. data/lib/appwrite/services/activities.rb +1 -1
  18. data/lib/appwrite/services/advisor.rb +5 -5
  19. data/lib/appwrite/services/apps.rb +25 -25
  20. data/lib/appwrite/services/avatars.rb +3 -3
  21. data/lib/appwrite/services/backups.rb +6 -6
  22. data/lib/appwrite/services/databases.rb +157 -157
  23. data/lib/appwrite/services/documents_db.rb +63 -63
  24. data/lib/appwrite/services/domains.rb +77 -77
  25. data/lib/appwrite/services/functions.rb +33 -33
  26. data/lib/appwrite/services/messaging.rb +30 -30
  27. data/lib/appwrite/services/migrations.rb +653 -0
  28. data/lib/appwrite/services/mongo.rb +37 -37
  29. data/lib/appwrite/services/mysql.rb +40 -40
  30. data/lib/appwrite/services/oauth2.rb +14 -14
  31. data/lib/appwrite/services/organization.rb +17 -17
  32. data/lib/appwrite/services/postgresql.rb +44 -44
  33. data/lib/appwrite/services/presences.rb +4 -4
  34. data/lib/appwrite/services/project.rb +105 -28
  35. data/lib/appwrite/services/proxy.rb +3 -3
  36. data/lib/appwrite/services/sites.rb +32 -32
  37. data/lib/appwrite/services/storage.rb +17 -17
  38. data/lib/appwrite/services/tables_db.rb +169 -169
  39. data/lib/appwrite/services/teams.rb +23 -23
  40. data/lib/appwrite/services/tokens.rb +7 -7
  41. data/lib/appwrite/services/users.rb +50 -50
  42. data/lib/appwrite/services/vectors_db.rb +55 -55
  43. data/lib/appwrite/services/waf.rb +57 -35
  44. data/lib/appwrite/services/webhooks.rb +4 -4
  45. data/lib/appwrite.rb +12 -0
  46. metadata +12 -2
@@ -72,7 +72,7 @@ module Appwrite
72
72
  end
73
73
 
74
74
  api_path = '/project/auth-methods/{methodId}'
75
- .gsub('{methodId}', method_id)
75
+ .gsub('{methodId}', @client.encode_path(method_id))
76
76
 
77
77
  api_params = {
78
78
  enabled: enabled,
@@ -129,13 +129,23 @@ module Appwrite
129
129
  # project in the same organization and region, with its own resources and
130
130
  # users. Its usage is billed under the project it belongs to.
131
131
  #
132
+ # Pass `resources` to copy the project into the environment. The environment
133
+ # is returned at once and the copy runs as a migration of the environment,
134
+ # listed by its migrations routes and announced on its `migrations.*`
135
+ # realtime events; a resource whose ID can be chosen keeps it. Users are
136
+ # copied newest first and at most 90 of them, so the environment keeps room
137
+ # under its limit of 100 users for test accounts, and the memberships of
138
+ # users left behind are not copied.
139
+ #
132
140
  # @param [String] environment_id Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
133
141
  # @param [String] name Environment name. Max length: 128 chars.
142
+ # @param [Array] resources Resources to copy from the project into the environment, by type. A structural type such as `database`, `table`, `column`, `index`, `bucket`, `team`, `function` or `site` copies the structure and its settings; `row`, `file`, `user`, `membership`, `deployment` and `site-deployment` copy what it holds. A function or site is copied with its active deployment; add `deployment` or `site-deployment` to copy every deployment. Users are copied newest first and at most 90 of them, leaving room under the limit of 100 users of an environment for test accounts; the memberships of users left behind are not copied. Leave empty for an empty environment. Maximum of 100 types.
134
143
  #
135
144
  # @return [Project]
136
145
  def create_environment(
137
146
  environment_id:,
138
- name:
147
+ name:,
148
+ resources: nil
139
149
  )
140
150
  if environment_id.nil?
141
151
  raise Appwrite::Exception.new('Missing required parameter: "environmentId"')
@@ -150,6 +160,7 @@ module Appwrite
150
160
  api_params = {
151
161
  environmentId: environment_id,
152
162
  name: name,
163
+ resources: resources,
153
164
  }
154
165
 
155
166
  api_headers = {
@@ -180,7 +191,7 @@ module Appwrite
180
191
  end
181
192
 
182
193
  api_path = '/project/environments/{environmentId}'
183
- .gsub('{environmentId}', environment_id)
194
+ .gsub('{environmentId}', @client.encode_path(environment_id))
184
195
 
185
196
  api_params = {}
186
197
 
@@ -217,7 +228,7 @@ module Appwrite
217
228
  end
218
229
 
219
230
  api_path = '/project/environments/{environmentId}'
220
- .gsub('{environmentId}', environment_id)
231
+ .gsub('{environmentId}', @client.encode_path(environment_id))
221
232
 
222
233
  api_params = {
223
234
  name: name,
@@ -251,7 +262,7 @@ module Appwrite
251
262
  end
252
263
 
253
264
  api_path = '/project/environments/{environmentId}'
254
- .gsub('{environmentId}', environment_id)
265
+ .gsub('{environmentId}', @client.encode_path(environment_id))
255
266
 
256
267
  api_params = {}
257
268
 
@@ -357,7 +368,7 @@ module Appwrite
357
368
  end
358
369
 
359
370
  api_path = '/project/keys/{keyId}'
360
- .gsub('{keyId}', key_id)
371
+ .gsub('{keyId}', @client.encode_path(key_id))
361
372
 
362
373
  api_params = {}
363
374
 
@@ -405,7 +416,7 @@ module Appwrite
405
416
  end
406
417
 
407
418
  api_path = '/project/keys/{keyId}'
408
- .gsub('{keyId}', key_id)
419
+ .gsub('{keyId}', @client.encode_path(key_id))
409
420
 
410
421
  api_params = {
411
422
  name: name,
@@ -443,7 +454,7 @@ module Appwrite
443
454
  end
444
455
 
445
456
  api_path = '/project/keys/{keyId}'
446
- .gsub('{keyId}', key_id)
457
+ .gsub('{keyId}', @client.encode_path(key_id))
447
458
 
448
459
  api_params = {}
449
460
 
@@ -582,7 +593,7 @@ module Appwrite
582
593
  end
583
594
 
584
595
  api_path = '/project/mock-phones/{number}'
585
- .gsub('{number}', number)
596
+ .gsub('{number}', @client.encode_path(number))
586
597
 
587
598
  api_params = {}
588
599
 
@@ -620,7 +631,7 @@ module Appwrite
620
631
  end
621
632
 
622
633
  api_path = '/project/mock-phones/{number}'
623
- .gsub('{number}', number)
634
+ .gsub('{number}', @client.encode_path(number))
624
635
 
625
636
  api_params = {
626
637
  otp: otp,
@@ -655,7 +666,7 @@ module Appwrite
655
666
  end
656
667
 
657
668
  api_path = '/project/mock-phones/{number}'
658
- .gsub('{number}', number)
669
+ .gsub('{number}', @client.encode_path(number))
659
670
 
660
671
  api_params = {}
661
672
 
@@ -2607,7 +2618,7 @@ module Appwrite
2607
2618
  end
2608
2619
 
2609
2620
  api_path = '/project/oauth2/{providerId}'
2610
- .gsub('{providerId}', provider_id)
2621
+ .gsub('{providerId}', @client.encode_path(provider_id))
2611
2622
 
2612
2623
  api_params = {}
2613
2624
 
@@ -2972,7 +2983,7 @@ module Appwrite
2972
2983
  end
2973
2984
 
2974
2985
  api_path = '/project/platforms/android/{platformId}'
2975
- .gsub('{platformId}', platform_id)
2986
+ .gsub('{platformId}', @client.encode_path(platform_id))
2976
2987
 
2977
2988
  api_params = {
2978
2989
  name: name,
@@ -3070,7 +3081,7 @@ module Appwrite
3070
3081
  end
3071
3082
 
3072
3083
  api_path = '/project/platforms/apple/{platformId}'
3073
- .gsub('{platformId}', platform_id)
3084
+ .gsub('{platformId}', @client.encode_path(platform_id))
3074
3085
 
3075
3086
  api_params = {
3076
3087
  name: name,
@@ -3167,7 +3178,7 @@ module Appwrite
3167
3178
  end
3168
3179
 
3169
3180
  api_path = '/project/platforms/linux/{platformId}'
3170
- .gsub('{platformId}', platform_id)
3181
+ .gsub('{platformId}', @client.encode_path(platform_id))
3171
3182
 
3172
3183
  api_params = {
3173
3184
  name: name,
@@ -3264,7 +3275,7 @@ module Appwrite
3264
3275
  end
3265
3276
 
3266
3277
  api_path = '/project/platforms/web/{platformId}'
3267
- .gsub('{platformId}', platform_id)
3278
+ .gsub('{platformId}', @client.encode_path(platform_id))
3268
3279
 
3269
3280
  api_params = {
3270
3281
  name: name,
@@ -3361,7 +3372,7 @@ module Appwrite
3361
3372
  end
3362
3373
 
3363
3374
  api_path = '/project/platforms/windows/{platformId}'
3364
- .gsub('{platformId}', platform_id)
3375
+ .gsub('{platformId}', @client.encode_path(platform_id))
3365
3376
 
3366
3377
  api_params = {
3367
3378
  name: name,
@@ -3397,7 +3408,7 @@ module Appwrite
3397
3408
  end
3398
3409
 
3399
3410
  api_path = '/project/platforms/{platformId}'
3400
- .gsub('{platformId}', platform_id)
3411
+ .gsub('{platformId}', @client.encode_path(platform_id))
3401
3412
 
3402
3413
  api_params = {}
3403
3414
 
@@ -3459,7 +3470,7 @@ module Appwrite
3459
3470
  end
3460
3471
 
3461
3472
  api_path = '/project/platforms/{platformId}'
3462
- .gsub('{platformId}', platform_id)
3473
+ .gsub('{platformId}', @client.encode_path(platform_id))
3463
3474
 
3464
3475
  api_params = {}
3465
3476
 
@@ -3644,6 +3655,41 @@ module Appwrite
3644
3655
  )
3645
3656
  end
3646
3657
 
3658
+ # Configures if guests, connections without a signed-in user, may subscribe
3659
+ # to realtime channels. When enabled, a guest can still connect and sign in
3660
+ # over the connection, but cannot subscribe until it does.
3661
+ #
3662
+ # @param [] enabled Set whether or not to stop guests from subscribing to realtime channels.
3663
+ #
3664
+ # @return [Project]
3665
+ def update_deny_realtime_guests_policy(
3666
+ enabled:
3667
+ )
3668
+ if enabled.nil?
3669
+ raise Appwrite::Exception.new('Missing required parameter: "enabled"')
3670
+ end
3671
+
3672
+ api_path = '/project/policies/deny-realtime-guests'
3673
+
3674
+ api_params = {
3675
+ enabled: enabled,
3676
+ }
3677
+
3678
+ api_headers = {
3679
+ "X-Appwrite-Project": @client.get_config('project'),
3680
+ "content-type": 'application/json',
3681
+ "accept": 'application/json',
3682
+ }
3683
+
3684
+ @client.call(
3685
+ method: 'PATCH',
3686
+ path: api_path,
3687
+ headers: api_headers,
3688
+ params: api_params,
3689
+ response_type: Models::Project
3690
+ )
3691
+ end
3692
+
3647
3693
  # Updating this policy allows you to control if team members can see other
3648
3694
  # members information. When enabled, all team members can see ID, name,
3649
3695
  # email, phone number, and MFA status of other members..
@@ -4201,9 +4247,9 @@ module Appwrite
4201
4247
  # Get a policy by its unique ID. This endpoint returns the current
4202
4248
  # configuration for the requested project policy.
4203
4249
  #
4204
- # @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, password-rotation, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email, passkey.
4250
+ # @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, password-rotation, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email, deny-realtime-guests, passkey.
4205
4251
  #
4206
- # @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicyPasswordPwned, PolicyPasswordRotation, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail, PolicyPasskey]
4252
+ # @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicyPasswordPwned, PolicyPasswordRotation, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail, PolicyDenyRealtimeGuests, PolicyPasskey]
4207
4253
  def get_policy(
4208
4254
  policy_id:
4209
4255
  )
@@ -4212,7 +4258,7 @@ module Appwrite
4212
4258
  end
4213
4259
 
4214
4260
  api_path = '/project/policies/{policyId}'
4215
- .gsub('{policyId}', policy_id)
4261
+ .gsub('{policyId}', @client.encode_path(policy_id))
4216
4262
 
4217
4263
  api_params = {}
4218
4264
 
@@ -4317,6 +4363,11 @@ module Appwrite
4317
4363
  return Models::PolicyDenyCorporateEmail.from(map: response)
4318
4364
  end
4319
4365
 
4366
+ if response['$id'] == 'deny-realtime-guests'
4367
+
4368
+ return Models::PolicyDenyRealtimeGuests.from(map: response)
4369
+ end
4370
+
4320
4371
  if response['$id'] == 'passkey'
4321
4372
 
4322
4373
  return Models::PolicyPasskey.from(map: response)
@@ -4345,7 +4396,7 @@ module Appwrite
4345
4396
  end
4346
4397
 
4347
4398
  api_path = '/project/protocols/{protocolId}'
4348
- .gsub('{protocolId}', protocol_id)
4399
+ .gsub('{protocolId}', @client.encode_path(protocol_id))
4349
4400
 
4350
4401
  api_params = {
4351
4402
  enabled: enabled,
@@ -4386,7 +4437,7 @@ module Appwrite
4386
4437
  end
4387
4438
 
4388
4439
  api_path = '/project/services/{serviceId}'
4389
- .gsub('{serviceId}', service_id)
4440
+ .gsub('{serviceId}', @client.encode_path(service_id))
4390
4441
 
4391
4442
  api_params = {
4392
4443
  enabled: enabled,
@@ -4407,6 +4458,32 @@ module Appwrite
4407
4458
  )
4408
4459
  end
4409
4460
 
4461
+ # Delete all sessions in the project. Any session created before this request
4462
+ # will be invalidated immediately: users will be signed out of every active
4463
+ # client (web, mobile, server SDKs, JWTs), and will be able to sign in again
4464
+ # afterwards. API keys are not affected by this action.
4465
+ #
4466
+ #
4467
+ # @return []
4468
+ def delete_sessions()
4469
+ api_path = '/project/sessions'
4470
+
4471
+ api_params = {}
4472
+
4473
+ api_headers = {
4474
+ "X-Appwrite-Project": @client.get_config('project'),
4475
+ "content-type": 'application/json',
4476
+ "accept": 'application/json',
4477
+ }
4478
+
4479
+ @client.call(
4480
+ method: 'DELETE',
4481
+ path: api_path,
4482
+ headers: api_headers,
4483
+ params: api_params,
4484
+ )
4485
+ end
4486
+
4410
4487
  # Update the SMTP configuration for your project. Use this endpoint to
4411
4488
  # configure your project's SMTP provider with your custom settings for
4412
4489
  # sending transactional emails.
@@ -4602,7 +4679,7 @@ module Appwrite
4602
4679
  end
4603
4680
 
4604
4681
  api_path = '/project/templates/email/{templateId}'
4605
- .gsub('{templateId}', template_id)
4682
+ .gsub('{templateId}', @client.encode_path(template_id))
4606
4683
 
4607
4684
  api_params = {
4608
4685
  locale: locale,
@@ -4720,7 +4797,7 @@ module Appwrite
4720
4797
  end
4721
4798
 
4722
4799
  api_path = '/project/variables/{variableId}'
4723
- .gsub('{variableId}', variable_id)
4800
+ .gsub('{variableId}', @client.encode_path(variable_id))
4724
4801
 
4725
4802
  api_params = {}
4726
4803
 
@@ -4759,7 +4836,7 @@ module Appwrite
4759
4836
  end
4760
4837
 
4761
4838
  api_path = '/project/variables/{variableId}'
4762
- .gsub('{variableId}', variable_id)
4839
+ .gsub('{variableId}', @client.encode_path(variable_id))
4763
4840
 
4764
4841
  api_params = {
4765
4842
  key: key,
@@ -4796,7 +4873,7 @@ module Appwrite
4796
4873
  end
4797
4874
 
4798
4875
  api_path = '/project/variables/{variableId}'
4799
- .gsub('{variableId}', variable_id)
4876
+ .gsub('{variableId}', @client.encode_path(variable_id))
4800
4877
 
4801
4878
  api_params = {}
4802
4879
 
@@ -337,7 +337,7 @@ module Appwrite
337
337
  end
338
338
 
339
339
  api_path = '/proxy/rules/{ruleId}'
340
- .gsub('{ruleId}', rule_id)
340
+ .gsub('{ruleId}', @client.encode_path(rule_id))
341
341
 
342
342
  api_params = {}
343
343
 
@@ -368,7 +368,7 @@ module Appwrite
368
368
  end
369
369
 
370
370
  api_path = '/proxy/rules/{ruleId}'
371
- .gsub('{ruleId}', rule_id)
371
+ .gsub('{ruleId}', @client.encode_path(rule_id))
372
372
 
373
373
  api_params = {}
374
374
 
@@ -402,7 +402,7 @@ module Appwrite
402
402
  end
403
403
 
404
404
  api_path = '/proxy/rules/{ruleId}/status'
405
- .gsub('{ruleId}', rule_id)
405
+ .gsub('{ruleId}', @client.encode_path(rule_id))
406
406
 
407
407
  api_params = {}
408
408
 
@@ -65,7 +65,7 @@ module Appwrite
65
65
  # @param [Array] provider_paths List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
66
66
  # @param [String] build_specification Build specification for the site deployments.
67
67
  # @param [String] runtime_specification Runtime specification for the SSR executions.
68
- # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
68
+ # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 keeps all deployments unless the server applies a default retention.
69
69
  # @param [Array] scopes List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
70
70
  # @param [String] description Optional description for the site.
71
71
  #
@@ -231,7 +231,7 @@ module Appwrite
231
231
  end
232
232
 
233
233
  api_path = '/sites/{siteId}'
234
- .gsub('{siteId}', site_id)
234
+ .gsub('{siteId}', @client.encode_path(site_id))
235
235
 
236
236
  api_params = {}
237
237
 
@@ -273,7 +273,7 @@ module Appwrite
273
273
  # @param [Array] provider_paths List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
274
274
  # @param [String] build_specification Build specification for the site deployments.
275
275
  # @param [String] runtime_specification Runtime specification for the SSR executions.
276
- # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
276
+ # @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 keeps all deployments unless the server applies a default retention.
277
277
  # @param [Array] scopes List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
278
278
  # @param [String] description Optional description for the site.
279
279
  #
@@ -318,7 +318,7 @@ module Appwrite
318
318
  end
319
319
 
320
320
  api_path = '/sites/{siteId}'
321
- .gsub('{siteId}', site_id)
321
+ .gsub('{siteId}', @client.encode_path(site_id))
322
322
 
323
323
  api_params = {
324
324
  name: name,
@@ -375,7 +375,7 @@ module Appwrite
375
375
  end
376
376
 
377
377
  api_path = '/sites/{siteId}'
378
- .gsub('{siteId}', site_id)
378
+ .gsub('{siteId}', @client.encode_path(site_id))
379
379
 
380
380
  api_params = {}
381
381
 
@@ -413,7 +413,7 @@ module Appwrite
413
413
  end
414
414
 
415
415
  api_path = '/sites/{siteId}/deployment'
416
- .gsub('{siteId}', site_id)
416
+ .gsub('{siteId}', @client.encode_path(site_id))
417
417
 
418
418
  api_params = {
419
419
  deploymentId: deployment_id,
@@ -454,7 +454,7 @@ module Appwrite
454
454
  end
455
455
 
456
456
  api_path = '/sites/{siteId}/deployments'
457
- .gsub('{siteId}', site_id)
457
+ .gsub('{siteId}', @client.encode_path(site_id))
458
458
 
459
459
  api_params = {
460
460
  queries: queries,
@@ -506,7 +506,7 @@ module Appwrite
506
506
  end
507
507
 
508
508
  api_path = '/sites/{siteId}/deployments'
509
- .gsub('{siteId}', site_id)
509
+ .gsub('{siteId}', @client.encode_path(site_id))
510
510
 
511
511
  api_params = {
512
512
  installCommand: install_command,
@@ -560,7 +560,7 @@ module Appwrite
560
560
  end
561
561
 
562
562
  api_path = '/sites/{siteId}/deployments/duplicate'
563
- .gsub('{siteId}', site_id)
563
+ .gsub('{siteId}', @client.encode_path(site_id))
564
564
 
565
565
  api_params = {
566
566
  deploymentId: deployment_id,
@@ -630,7 +630,7 @@ module Appwrite
630
630
  end
631
631
 
632
632
  api_path = '/sites/{siteId}/deployments/template'
633
- .gsub('{siteId}', site_id)
633
+ .gsub('{siteId}', @client.encode_path(site_id))
634
634
 
635
635
  api_params = {
636
636
  repository: repository,
@@ -685,7 +685,7 @@ module Appwrite
685
685
  end
686
686
 
687
687
  api_path = '/sites/{siteId}/deployments/vcs'
688
- .gsub('{siteId}', site_id)
688
+ .gsub('{siteId}', @client.encode_path(site_id))
689
689
 
690
690
  api_params = {
691
691
  type: type,
@@ -727,8 +727,8 @@ module Appwrite
727
727
  end
728
728
 
729
729
  api_path = '/sites/{siteId}/deployments/{deploymentId}'
730
- .gsub('{siteId}', site_id)
731
- .gsub('{deploymentId}', deployment_id)
730
+ .gsub('{siteId}', @client.encode_path(site_id))
731
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
732
732
 
733
733
  api_params = {}
734
734
 
@@ -765,8 +765,8 @@ module Appwrite
765
765
  end
766
766
 
767
767
  api_path = '/sites/{siteId}/deployments/{deploymentId}'
768
- .gsub('{siteId}', site_id)
769
- .gsub('{deploymentId}', deployment_id)
768
+ .gsub('{siteId}', @client.encode_path(site_id))
769
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
770
770
 
771
771
  api_params = {}
772
772
 
@@ -809,8 +809,8 @@ module Appwrite
809
809
  end
810
810
 
811
811
  api_path = '/sites/{siteId}/deployments/{deploymentId}/download'
812
- .gsub('{siteId}', site_id)
813
- .gsub('{deploymentId}', deployment_id)
812
+ .gsub('{siteId}', @client.encode_path(site_id))
813
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
814
814
 
815
815
  api_params = {
816
816
  type: type,
@@ -853,8 +853,8 @@ module Appwrite
853
853
  end
854
854
 
855
855
  api_path = '/sites/{siteId}/deployments/{deploymentId}/status'
856
- .gsub('{siteId}', site_id)
857
- .gsub('{deploymentId}', deployment_id)
856
+ .gsub('{siteId}', @client.encode_path(site_id))
857
+ .gsub('{deploymentId}', @client.encode_path(deployment_id))
858
858
 
859
859
  api_params = {}
860
860
 
@@ -891,7 +891,7 @@ module Appwrite
891
891
  end
892
892
 
893
893
  api_path = '/sites/{siteId}/logs'
894
- .gsub('{siteId}', site_id)
894
+ .gsub('{siteId}', @client.encode_path(site_id))
895
895
 
896
896
  api_params = {
897
897
  queries: queries,
@@ -931,8 +931,8 @@ module Appwrite
931
931
  end
932
932
 
933
933
  api_path = '/sites/{siteId}/logs/{logId}'
934
- .gsub('{siteId}', site_id)
935
- .gsub('{logId}', log_id)
934
+ .gsub('{siteId}', @client.encode_path(site_id))
935
+ .gsub('{logId}', @client.encode_path(log_id))
936
936
 
937
937
  api_params = {}
938
938
 
@@ -969,8 +969,8 @@ module Appwrite
969
969
  end
970
970
 
971
971
  api_path = '/sites/{siteId}/logs/{logId}'
972
- .gsub('{siteId}', site_id)
973
- .gsub('{logId}', log_id)
972
+ .gsub('{siteId}', @client.encode_path(site_id))
973
+ .gsub('{logId}', @client.encode_path(log_id))
974
974
 
975
975
  api_params = {}
976
976
 
@@ -1005,7 +1005,7 @@ module Appwrite
1005
1005
  end
1006
1006
 
1007
1007
  api_path = '/sites/{siteId}/variables'
1008
- .gsub('{siteId}', site_id)
1008
+ .gsub('{siteId}', @client.encode_path(site_id))
1009
1009
 
1010
1010
  api_params = {
1011
1011
  queries: queries,
@@ -1062,7 +1062,7 @@ module Appwrite
1062
1062
  end
1063
1063
 
1064
1064
  api_path = '/sites/{siteId}/variables'
1065
- .gsub('{siteId}', site_id)
1065
+ .gsub('{siteId}', @client.encode_path(site_id))
1066
1066
 
1067
1067
  api_params = {
1068
1068
  variableId: variable_id,
@@ -1106,8 +1106,8 @@ module Appwrite
1106
1106
  end
1107
1107
 
1108
1108
  api_path = '/sites/{siteId}/variables/{variableId}'
1109
- .gsub('{siteId}', site_id)
1110
- .gsub('{variableId}', variable_id)
1109
+ .gsub('{siteId}', @client.encode_path(site_id))
1110
+ .gsub('{variableId}', @client.encode_path(variable_id))
1111
1111
 
1112
1112
  api_params = {}
1113
1113
 
@@ -1152,8 +1152,8 @@ module Appwrite
1152
1152
  end
1153
1153
 
1154
1154
  api_path = '/sites/{siteId}/variables/{variableId}'
1155
- .gsub('{siteId}', site_id)
1156
- .gsub('{variableId}', variable_id)
1155
+ .gsub('{siteId}', @client.encode_path(site_id))
1156
+ .gsub('{variableId}', @client.encode_path(variable_id))
1157
1157
 
1158
1158
  api_params = {
1159
1159
  key: key,
@@ -1196,8 +1196,8 @@ module Appwrite
1196
1196
  end
1197
1197
 
1198
1198
  api_path = '/sites/{siteId}/variables/{variableId}'
1199
- .gsub('{siteId}', site_id)
1200
- .gsub('{variableId}', variable_id)
1199
+ .gsub('{siteId}', @client.encode_path(site_id))
1200
+ .gsub('{variableId}', @client.encode_path(variable_id))
1201
1201
 
1202
1202
  api_params = {}
1203
1203