appwrite 11.0.2 → 13.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,6 +11,7 @@ module Appwrite
11
11
  attr_reader :resource_type
12
12
  attr_reader :entrypoint
13
13
  attr_reader :size
14
+ attr_reader :build_size
14
15
  attr_reader :build_id
15
16
  attr_reader :activate
16
17
  attr_reader :status
@@ -36,6 +37,7 @@ module Appwrite
36
37
  resource_type:,
37
38
  entrypoint:,
38
39
  size:,
40
+ build_size:,
39
41
  build_id:,
40
42
  activate:,
41
43
  status:,
@@ -60,6 +62,7 @@ module Appwrite
60
62
  @resource_type = resource_type
61
63
  @entrypoint = entrypoint
62
64
  @size = size
65
+ @build_size = build_size
63
66
  @build_id = build_id
64
67
  @activate = activate
65
68
  @status = status
@@ -87,6 +90,7 @@ module Appwrite
87
90
  resource_type: map["resourceType"],
88
91
  entrypoint: map["entrypoint"],
89
92
  size: map["size"],
93
+ build_size: map["buildSize"],
90
94
  build_id: map["buildId"],
91
95
  activate: map["activate"],
92
96
  status: map["status"],
@@ -115,6 +119,7 @@ module Appwrite
115
119
  "resourceType": @resource_type,
116
120
  "entrypoint": @entrypoint,
117
121
  "size": @size,
122
+ "buildSize": @build_size,
118
123
  "buildId": @build_id,
119
124
  "activate": @activate,
120
125
  "status": @status,
@@ -19,6 +19,7 @@ module Appwrite
19
19
  attr_reader :logs
20
20
  attr_reader :errors
21
21
  attr_reader :duration
22
+ attr_reader :scheduled_at
22
23
 
23
24
  def initialize(
24
25
  id:,
@@ -36,7 +37,8 @@ module Appwrite
36
37
  response_headers:,
37
38
  logs:,
38
39
  errors:,
39
- duration:
40
+ duration:,
41
+ scheduled_at:
40
42
  )
41
43
  @id = id
42
44
  @created_at = created_at
@@ -54,6 +56,7 @@ module Appwrite
54
56
  @logs = logs
55
57
  @errors = errors
56
58
  @duration = duration
59
+ @scheduled_at = scheduled_at
57
60
  end
58
61
 
59
62
  def self.from(map:)
@@ -73,7 +76,8 @@ module Appwrite
73
76
  response_headers: map["responseHeaders"].map { |it| Headers.from(map: it) },
74
77
  logs: map["logs"],
75
78
  errors: map["errors"],
76
- duration: map["duration"]
79
+ duration: map["duration"],
80
+ scheduled_at: map["scheduledAt"]
77
81
  )
78
82
  end
79
83
 
@@ -94,7 +98,8 @@ module Appwrite
94
98
  "responseHeaders": @response_headers.map { |it| it.to_map },
95
99
  "logs": @logs,
96
100
  "errors": @errors,
97
- "duration": @duration
101
+ "duration": @duration,
102
+ "scheduledAt": @scheduled_at
98
103
  }
99
104
  end
100
105
  end
@@ -13,6 +13,7 @@ module Appwrite
13
13
  attr_reader :logging
14
14
  attr_reader :runtime
15
15
  attr_reader :deployment
16
+ attr_reader :scopes
16
17
  attr_reader :vars
17
18
  attr_reader :events
18
19
  attr_reader :schedule
@@ -25,6 +26,7 @@ module Appwrite
25
26
  attr_reader :provider_branch
26
27
  attr_reader :provider_root_directory
27
28
  attr_reader :provider_silent_mode
29
+ attr_reader :specification
28
30
 
29
31
  def initialize(
30
32
  id:,
@@ -37,6 +39,7 @@ module Appwrite
37
39
  logging:,
38
40
  runtime:,
39
41
  deployment:,
42
+ scopes:,
40
43
  vars:,
41
44
  events:,
42
45
  schedule:,
@@ -48,7 +51,8 @@ module Appwrite
48
51
  provider_repository_id:,
49
52
  provider_branch:,
50
53
  provider_root_directory:,
51
- provider_silent_mode:
54
+ provider_silent_mode:,
55
+ specification:
52
56
  )
53
57
  @id = id
54
58
  @created_at = created_at
@@ -60,6 +64,7 @@ module Appwrite
60
64
  @logging = logging
61
65
  @runtime = runtime
62
66
  @deployment = deployment
67
+ @scopes = scopes
63
68
  @vars = vars
64
69
  @events = events
65
70
  @schedule = schedule
@@ -72,6 +77,7 @@ module Appwrite
72
77
  @provider_branch = provider_branch
73
78
  @provider_root_directory = provider_root_directory
74
79
  @provider_silent_mode = provider_silent_mode
80
+ @specification = specification
75
81
  end
76
82
 
77
83
  def self.from(map:)
@@ -86,6 +92,7 @@ module Appwrite
86
92
  logging: map["logging"],
87
93
  runtime: map["runtime"],
88
94
  deployment: map["deployment"],
95
+ scopes: map["scopes"],
89
96
  vars: map["vars"].map { |it| Variable.from(map: it) },
90
97
  events: map["events"],
91
98
  schedule: map["schedule"],
@@ -97,7 +104,8 @@ module Appwrite
97
104
  provider_repository_id: map["providerRepositoryId"],
98
105
  provider_branch: map["providerBranch"],
99
106
  provider_root_directory: map["providerRootDirectory"],
100
- provider_silent_mode: map["providerSilentMode"]
107
+ provider_silent_mode: map["providerSilentMode"],
108
+ specification: map["specification"]
101
109
  )
102
110
  end
103
111
 
@@ -113,6 +121,7 @@ module Appwrite
113
121
  "logging": @logging,
114
122
  "runtime": @runtime,
115
123
  "deployment": @deployment,
124
+ "scopes": @scopes,
116
125
  "vars": @vars.map { |it| it.to_map },
117
126
  "events": @events,
118
127
  "schedule": @schedule,
@@ -124,7 +133,8 @@ module Appwrite
124
133
  "providerRepositoryId": @provider_repository_id,
125
134
  "providerBranch": @provider_branch,
126
135
  "providerRootDirectory": @provider_root_directory,
127
- "providerSilentMode": @provider_silent_mode
136
+ "providerSilentMode": @provider_silent_mode,
137
+ "specification": @specification
128
138
  }
129
139
  end
130
140
  end
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :attributes
11
11
  attr_reader :orders
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
 
13
15
  def initialize(
14
16
  key:,
@@ -16,7 +18,9 @@ module Appwrite
16
18
  status:,
17
19
  error:,
18
20
  attributes:,
19
- orders:
21
+ orders: ,
22
+ created_at:,
23
+ updated_at:
20
24
  )
21
25
  @key = key
22
26
  @type = type
@@ -24,6 +28,8 @@ module Appwrite
24
28
  @error = error
25
29
  @attributes = attributes
26
30
  @orders = orders
31
+ @created_at = created_at
32
+ @updated_at = updated_at
27
33
  end
28
34
 
29
35
  def self.from(map:)
@@ -33,7 +39,9 @@ module Appwrite
33
39
  status: map["status"],
34
40
  error: map["error"],
35
41
  attributes: map["attributes"],
36
- orders: map["orders"]
42
+ orders: map["orders"],
43
+ created_at: map["$createdAt"],
44
+ updated_at: map["$updatedAt"]
37
45
  )
38
46
  end
39
47
 
@@ -44,7 +52,9 @@ module Appwrite
44
52
  "status": @status,
45
53
  "error": @error,
46
54
  "attributes": @attributes,
47
- "orders": @orders
55
+ "orders": @orders,
56
+ "$createdAt": @created_at,
57
+ "$updatedAt": @updated_at
48
58
  }
49
59
  end
50
60
  end
@@ -4,6 +4,7 @@ module Appwrite
4
4
  module Models
5
5
  class Runtime
6
6
  attr_reader :id
7
+ attr_reader :key
7
8
  attr_reader :name
8
9
  attr_reader :version
9
10
  attr_reader :base
@@ -13,6 +14,7 @@ module Appwrite
13
14
 
14
15
  def initialize(
15
16
  id:,
17
+ key:,
16
18
  name:,
17
19
  version:,
18
20
  base:,
@@ -21,6 +23,7 @@ module Appwrite
21
23
  supports:
22
24
  )
23
25
  @id = id
26
+ @key = key
24
27
  @name = name
25
28
  @version = version
26
29
  @base = base
@@ -32,6 +35,7 @@ module Appwrite
32
35
  def self.from(map:)
33
36
  Runtime.new(
34
37
  id: map["$id"],
38
+ key: map["key"],
35
39
  name: map["name"],
36
40
  version: map["version"],
37
41
  base: map["base"],
@@ -44,6 +48,7 @@ module Appwrite
44
48
  def to_map
45
49
  {
46
50
  "$id": @id,
51
+ "key": @key,
47
52
  "name": @name,
48
53
  "version": @version,
49
54
  "base": @base,
@@ -0,0 +1,42 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Specification
6
+ attr_reader :memory
7
+ attr_reader :cpus
8
+ attr_reader :enabled
9
+ attr_reader :slug
10
+
11
+ def initialize(
12
+ memory:,
13
+ cpus:,
14
+ enabled:,
15
+ slug:
16
+ )
17
+ @memory = memory
18
+ @cpus = cpus
19
+ @enabled = enabled
20
+ @slug = slug
21
+ end
22
+
23
+ def self.from(map:)
24
+ Specification.new(
25
+ memory: map["memory"],
26
+ cpus: map["cpus"],
27
+ enabled: map["enabled"],
28
+ slug: map["slug"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "memory": @memory,
35
+ "cpus": @cpus,
36
+ "enabled": @enabled,
37
+ "slug": @slug
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class SpecificationList
6
+ attr_reader :total
7
+ attr_reader :specifications
8
+
9
+ def initialize(
10
+ total:,
11
+ specifications:
12
+ )
13
+ @total = total
14
+ @specifications = specifications
15
+ end
16
+
17
+ def self.from(map:)
18
+ SpecificationList.new(
19
+ total: map["total"],
20
+ specifications: map["specifications"].map { |it| Specification.from(map: it) }
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "total": @total,
27
+ "specifications": @specifications.map { |it| it.to_map }
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -11,6 +11,7 @@ module Appwrite
11
11
  attr_reader :provider_id
12
12
  attr_reader :provider_type
13
13
  attr_reader :identifier
14
+ attr_reader :expired
14
15
 
15
16
  def initialize(
16
17
  id:,
@@ -20,7 +21,8 @@ module Appwrite
20
21
  user_id:,
21
22
  provider_id: ,
22
23
  provider_type:,
23
- identifier:
24
+ identifier:,
25
+ expired:
24
26
  )
25
27
  @id = id
26
28
  @created_at = created_at
@@ -30,6 +32,7 @@ module Appwrite
30
32
  @provider_id = provider_id
31
33
  @provider_type = provider_type
32
34
  @identifier = identifier
35
+ @expired = expired
33
36
  end
34
37
 
35
38
  def self.from(map:)
@@ -41,7 +44,8 @@ module Appwrite
41
44
  user_id: map["userId"],
42
45
  provider_id: map["providerId"],
43
46
  provider_type: map["providerType"],
44
- identifier: map["identifier"]
47
+ identifier: map["identifier"],
48
+ expired: map["expired"]
45
49
  )
46
50
  end
47
51
 
@@ -54,7 +58,8 @@ module Appwrite
54
58
  "userId": @user_id,
55
59
  "providerId": @provider_id,
56
60
  "providerType": @provider_type,
57
- "identifier": @identifier
61
+ "identifier": @identifier,
62
+ "expired": @expired
58
63
  }
59
64
  end
60
65
  end
@@ -188,7 +188,7 @@ module Appwrite
188
188
  #
189
189
  # @return [Jwt]
190
190
  def create_jwt()
191
- api_path = '/account/jwt'
191
+ api_path = '/account/jwts'
192
192
 
193
193
  api_params = {
194
194
  }
@@ -299,7 +299,7 @@ module Appwrite
299
299
 
300
300
  # Verify an authenticator app after adding it using the [add
301
301
  # authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator)
302
- # method. add
302
+ # method.
303
303
  #
304
304
  # @param [AuthenticatorType] type Type of authenticator.
305
305
  # @param [String] otp Valid verification token.
@@ -338,10 +338,9 @@ module Appwrite
338
338
  # Delete an authenticator for a user by ID.
339
339
  #
340
340
  # @param [AuthenticatorType] type Type of authenticator.
341
- # @param [String] otp Valid verification token.
342
341
  #
343
342
  # @return []
344
- def delete_mfa_authenticator(type:, otp:)
343
+ def delete_mfa_authenticator(type:)
345
344
  api_path = '/account/mfa/authenticators/{type}'
346
345
  .gsub('{type}', type)
347
346
 
@@ -349,12 +348,7 @@ module Appwrite
349
348
  raise Appwrite::Exception.new('Missing required parameter: "type"')
350
349
  end
351
350
 
352
- if otp.nil?
353
- raise Appwrite::Exception.new('Missing required parameter: "otp"')
354
- end
355
-
356
351
  api_params = {
357
- otp: otp,
358
352
  }
359
353
 
360
354
  api_headers = {
@@ -97,6 +97,7 @@ module Appwrite
97
97
  # Use this endpoint to fetch the favorite icon (AKA favicon) of any remote
98
98
  # website URL.
99
99
  #
100
+ # This endpoint does not follow HTTP redirects.
100
101
  #
101
102
  # @param [String] url Website URL which you want to fetch the favicon from.
102
103
  #
@@ -179,6 +180,7 @@ module Appwrite
179
180
  # image at source quality. If dimensions are not specified, the default size
180
181
  # of image returned is 400x400px.
181
182
  #
183
+ # This endpoint does not follow HTTP redirects.
182
184
  #
183
185
  # @param [String] url Image URL which you want to crop.
184
186
  # @param [Integer] width Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.
@@ -480,9 +480,10 @@ module Appwrite
480
480
  # @param [String] key Attribute Key.
481
481
  # @param [] required Is attribute required?
482
482
  # @param [] default Default value for attribute when not provided. Cannot be set when attribute is required.
483
+ # @param [String] new_key New attribute key.
483
484
  #
484
485
  # @return [AttributeBoolean]
485
- def update_boolean_attribute(database_id:, collection_id:, key:, required:, default:)
486
+ def update_boolean_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
486
487
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'
487
488
  .gsub('{databaseId}', database_id)
488
489
  .gsub('{collectionId}', collection_id)
@@ -511,6 +512,7 @@ module Appwrite
511
512
  api_params = {
512
513
  required: required,
513
514
  default: default,
515
+ newKey: new_key,
514
516
  }
515
517
 
516
518
  api_headers = {
@@ -587,9 +589,10 @@ module Appwrite
587
589
  # @param [String] key Attribute Key.
588
590
  # @param [] required Is attribute required?
589
591
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
592
+ # @param [String] new_key New attribute key.
590
593
  #
591
594
  # @return [AttributeDatetime]
592
- def update_datetime_attribute(database_id:, collection_id:, key:, required:, default:)
595
+ def update_datetime_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
593
596
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'
594
597
  .gsub('{databaseId}', database_id)
595
598
  .gsub('{collectionId}', collection_id)
@@ -618,6 +621,7 @@ module Appwrite
618
621
  api_params = {
619
622
  required: required,
620
623
  default: default,
624
+ newKey: new_key,
621
625
  }
622
626
 
623
627
  api_headers = {
@@ -696,9 +700,10 @@ module Appwrite
696
700
  # @param [String] key Attribute Key.
697
701
  # @param [] required Is attribute required?
698
702
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
703
+ # @param [String] new_key New attribute key.
699
704
  #
700
705
  # @return [AttributeEmail]
701
- def update_email_attribute(database_id:, collection_id:, key:, required:, default:)
706
+ def update_email_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
702
707
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'
703
708
  .gsub('{databaseId}', database_id)
704
709
  .gsub('{collectionId}', collection_id)
@@ -727,6 +732,7 @@ module Appwrite
727
732
  api_params = {
728
733
  required: required,
729
734
  default: default,
735
+ newKey: new_key,
730
736
  }
731
737
 
732
738
  api_headers = {
@@ -813,9 +819,10 @@ module Appwrite
813
819
  # @param [Array] elements Array of elements in enumerated type. Uses length of longest element to determine size. Maximum of 100 elements are allowed, each 255 characters long.
814
820
  # @param [] required Is attribute required?
815
821
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
822
+ # @param [String] new_key New attribute key.
816
823
  #
817
824
  # @return [AttributeEnum]
818
- def update_enum_attribute(database_id:, collection_id:, key:, elements:, required:, default:)
825
+ def update_enum_attribute(database_id:, collection_id:, key:, elements:, required:, default:, new_key: nil)
819
826
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'
820
827
  .gsub('{databaseId}', database_id)
821
828
  .gsub('{collectionId}', collection_id)
@@ -849,6 +856,7 @@ module Appwrite
849
856
  elements: elements,
850
857
  required: required,
851
858
  default: default,
859
+ newKey: new_key,
852
860
  }
853
861
 
854
862
  api_headers = {
@@ -934,9 +942,10 @@ module Appwrite
934
942
  # @param [Float] min Minimum value to enforce on new documents
935
943
  # @param [Float] max Maximum value to enforce on new documents
936
944
  # @param [Float] default Default value for attribute when not provided. Cannot be set when attribute is required.
945
+ # @param [String] new_key New attribute key.
937
946
  #
938
947
  # @return [AttributeFloat]
939
- def update_float_attribute(database_id:, collection_id:, key:, required:, min:, max:, default:)
948
+ def update_float_attribute(database_id:, collection_id:, key:, required:, min:, max:, default:, new_key: nil)
940
949
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'
941
950
  .gsub('{databaseId}', database_id)
942
951
  .gsub('{collectionId}', collection_id)
@@ -975,6 +984,7 @@ module Appwrite
975
984
  min: min,
976
985
  max: max,
977
986
  default: default,
987
+ newKey: new_key,
978
988
  }
979
989
 
980
990
  api_headers = {
@@ -1060,9 +1070,10 @@ module Appwrite
1060
1070
  # @param [Integer] min Minimum value to enforce on new documents
1061
1071
  # @param [Integer] max Maximum value to enforce on new documents
1062
1072
  # @param [Integer] default Default value for attribute when not provided. Cannot be set when attribute is required.
1073
+ # @param [String] new_key New attribute key.
1063
1074
  #
1064
1075
  # @return [AttributeInteger]
1065
- def update_integer_attribute(database_id:, collection_id:, key:, required:, min:, max:, default:)
1076
+ def update_integer_attribute(database_id:, collection_id:, key:, required:, min:, max:, default:, new_key: nil)
1066
1077
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'
1067
1078
  .gsub('{databaseId}', database_id)
1068
1079
  .gsub('{collectionId}', collection_id)
@@ -1101,6 +1112,7 @@ module Appwrite
1101
1112
  min: min,
1102
1113
  max: max,
1103
1114
  default: default,
1115
+ newKey: new_key,
1104
1116
  }
1105
1117
 
1106
1118
  api_headers = {
@@ -1179,9 +1191,10 @@ module Appwrite
1179
1191
  # @param [String] key Attribute Key.
1180
1192
  # @param [] required Is attribute required?
1181
1193
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
1194
+ # @param [String] new_key New attribute key.
1182
1195
  #
1183
1196
  # @return [AttributeIp]
1184
- def update_ip_attribute(database_id:, collection_id:, key:, required:, default:)
1197
+ def update_ip_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
1185
1198
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'
1186
1199
  .gsub('{databaseId}', database_id)
1187
1200
  .gsub('{collectionId}', collection_id)
@@ -1210,6 +1223,7 @@ module Appwrite
1210
1223
  api_params = {
1211
1224
  required: required,
1212
1225
  default: default,
1226
+ newKey: new_key,
1213
1227
  }
1214
1228
 
1215
1229
  api_headers = {
@@ -1354,9 +1368,11 @@ module Appwrite
1354
1368
  # @param [String] key Attribute Key.
1355
1369
  # @param [] required Is attribute required?
1356
1370
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
1371
+ # @param [Integer] size Maximum size of the string attribute.
1372
+ # @param [String] new_key New attribute key.
1357
1373
  #
1358
1374
  # @return [AttributeString]
1359
- def update_string_attribute(database_id:, collection_id:, key:, required:, default:)
1375
+ def update_string_attribute(database_id:, collection_id:, key:, required:, default:, size: nil, new_key: nil)
1360
1376
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'
1361
1377
  .gsub('{databaseId}', database_id)
1362
1378
  .gsub('{collectionId}', collection_id)
@@ -1385,6 +1401,8 @@ module Appwrite
1385
1401
  api_params = {
1386
1402
  required: required,
1387
1403
  default: default,
1404
+ size: size,
1405
+ newKey: new_key,
1388
1406
  }
1389
1407
 
1390
1408
  api_headers = {
@@ -1463,9 +1481,10 @@ module Appwrite
1463
1481
  # @param [String] key Attribute Key.
1464
1482
  # @param [] required Is attribute required?
1465
1483
  # @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
1484
+ # @param [String] new_key New attribute key.
1466
1485
  #
1467
1486
  # @return [AttributeUrl]
1468
- def update_url_attribute(database_id:, collection_id:, key:, required:, default:)
1487
+ def update_url_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
1469
1488
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'
1470
1489
  .gsub('{databaseId}', database_id)
1471
1490
  .gsub('{collectionId}', collection_id)
@@ -1494,6 +1513,7 @@ module Appwrite
1494
1513
  api_params = {
1495
1514
  required: required,
1496
1515
  default: default,
1516
+ newKey: new_key,
1497
1517
  }
1498
1518
 
1499
1519
  api_headers = {
@@ -1600,9 +1620,10 @@ module Appwrite
1600
1620
  # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1601
1621
  # @param [String] key Attribute Key.
1602
1622
  # @param [RelationMutate] on_delete Constraints option
1623
+ # @param [String] new_key New attribute key.
1603
1624
  #
1604
1625
  # @return [AttributeRelationship]
1605
- def update_relationship_attribute(database_id:, collection_id:, key:, on_delete: nil)
1626
+ def update_relationship_attribute(database_id:, collection_id:, key:, on_delete: nil, new_key: nil)
1606
1627
  api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'
1607
1628
  .gsub('{databaseId}', database_id)
1608
1629
  .gsub('{collectionId}', collection_id)
@@ -1622,6 +1643,7 @@ module Appwrite
1622
1643
 
1623
1644
  api_params = {
1624
1645
  onDelete: on_delete,
1646
+ newKey: new_key,
1625
1647
  }
1626
1648
 
1627
1649
  api_headers = {