appwrite 11.0.1 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +54 -76
  3. data/lib/appwrite/enums/credit_card.rb +1 -1
  4. data/lib/appwrite/enums/flag.rb +1 -0
  5. data/lib/appwrite/enums/image_format.rb +1 -0
  6. data/lib/appwrite/enums/name.rb +1 -2
  7. data/lib/appwrite/enums/runtime.rb +5 -0
  8. data/lib/appwrite/models/attribute_boolean.rb +10 -0
  9. data/lib/appwrite/models/attribute_datetime.rb +10 -0
  10. data/lib/appwrite/models/attribute_email.rb +10 -0
  11. data/lib/appwrite/models/attribute_enum.rb +10 -0
  12. data/lib/appwrite/models/attribute_float.rb +10 -0
  13. data/lib/appwrite/models/attribute_integer.rb +10 -0
  14. data/lib/appwrite/models/attribute_ip.rb +10 -0
  15. data/lib/appwrite/models/attribute_relationship.rb +10 -0
  16. data/lib/appwrite/models/attribute_string.rb +10 -0
  17. data/lib/appwrite/models/attribute_url.rb +10 -0
  18. data/lib/appwrite/models/build.rb +67 -0
  19. data/lib/appwrite/models/deployment.rb +5 -0
  20. data/lib/appwrite/models/document.rb +4 -9
  21. data/lib/appwrite/models/document_list.rb +1 -2
  22. data/lib/appwrite/models/execution.rb +8 -3
  23. data/lib/appwrite/models/function.rb +13 -3
  24. data/lib/appwrite/models/index.rb +13 -3
  25. data/lib/appwrite/models/mfa_factors.rb +8 -3
  26. data/lib/appwrite/models/preferences.rb +4 -9
  27. data/lib/appwrite/models/runtime.rb +5 -0
  28. data/lib/appwrite/models/session.rb +5 -0
  29. data/lib/appwrite/models/specification.rb +42 -0
  30. data/lib/appwrite/models/specification_list.rb +32 -0
  31. data/lib/appwrite/multipart.rb +127 -0
  32. data/lib/appwrite/payload.rb +94 -0
  33. data/lib/appwrite/services/account.rb +54 -61
  34. data/lib/appwrite/services/avatars.rb +24 -22
  35. data/lib/appwrite/services/databases.rb +136 -114
  36. data/lib/appwrite/services/functions.rb +174 -72
  37. data/lib/appwrite/services/graphql.rb +2 -2
  38. data/lib/appwrite/services/health.rb +15 -15
  39. data/lib/appwrite/services/messaging.rb +230 -228
  40. data/lib/appwrite/services/storage.rb +40 -40
  41. data/lib/appwrite/services/teams.rb +19 -19
  42. data/lib/appwrite/services/users.rb +108 -72
  43. data/lib/appwrite.rb +5 -1
  44. metadata +7 -3
  45. data/lib/appwrite/input_file.rb +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bca03eb7af675e72f241faee81443dd471831f3e7835c9f7bb32f83979a9266
4
- data.tar.gz: 14612cd69df877ead2f82c0e0e9c9eaf423b1f059d6221570a9a285bd2f91189
3
+ metadata.gz: 2733bae7c4a103195636bb346e5d8c9a8022d12f42d079f1799172fd67c97ec7
4
+ data.tar.gz: 652bb227dc4274ecd755b7b6889a76f617f0784dc9207cca03c32d76d137e0b4
5
5
  SHA512:
6
- metadata.gz: a5afccd0969e11345fb06bf9f6857624f98a852d1359a685fe659245d490ff7a03351747b37173a9cb9030a326ee0b275c1ccee911c9cbc9509878c7c7479ac2
7
- data.tar.gz: 8083c9e4416972961fc58af0b7a5328b72fb7e3e67f792bef5c7b8a4e04fc3600ae2e6c007e2bdf7093f4418ca34321f00b82428ed4a5514ff8096a06588a90f
6
+ metadata.gz: 1bbc1d00d072f1e36747697c9d0eeacd885d17441363f221c679fc202a6a0d4cac966bea7dde4c2ad01fb0efd70fe0c102138cfad79b591ced0de57bedfdffc4
7
+ data.tar.gz: 0efe6d1408fa0c4b8a0962f3f76ccb8e80f5eec3d1f449f12a099d00ce7e93688ae1698fd53d3d1a55e23fa52f9f34d9720be9bb47c44c6c6e827e97dff7143a
@@ -15,8 +15,8 @@ module Appwrite
15
15
  'x-sdk-name'=> 'Ruby',
16
16
  'x-sdk-platform'=> 'server',
17
17
  'x-sdk-language'=> 'ruby',
18
- 'x-sdk-version'=> '11.0.1',
19
- 'X-Appwrite-Response-Format' => '1.5.0'
18
+ 'x-sdk-version'=> '13.0.0',
19
+ 'x-appwrite-response-format' => '1.6.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
22
22
  end
@@ -24,8 +24,7 @@ module Appwrite
24
24
  # Set Project
25
25
  #
26
26
  # Your project ID
27
- #
28
- # @param [String] value The value to set for the Project header
27
+ # # @param [String] value The value to set for the Project header
29
28
  #
30
29
  # @return [self]
31
30
  def set_project(value)
@@ -37,8 +36,7 @@ module Appwrite
37
36
  # Set Key
38
37
  #
39
38
  # Your secret API key
40
- #
41
- # @param [String] value The value to set for the Key header
39
+ # # @param [String] value The value to set for the Key header
42
40
  #
43
41
  # @return [self]
44
42
  def set_key(value)
@@ -50,8 +48,7 @@ module Appwrite
50
48
  # Set JWT
51
49
  #
52
50
  # Your secret JSON Web Token
53
- #
54
- # @param [String] value The value to set for the JWT header
51
+ # # @param [String] value The value to set for the JWT header
55
52
  #
56
53
  # @return [self]
57
54
  def set_jwt(value)
@@ -74,8 +71,7 @@ module Appwrite
74
71
  # Set Session
75
72
  #
76
73
  # The user session to authenticate with
77
- #
78
- # @param [String] value The value to set for the Session header
74
+ # # @param [String] value The value to set for the Session header
79
75
  #
80
76
  # @return [self]
81
77
  def set_session(value)
@@ -87,8 +83,7 @@ module Appwrite
87
83
  # Set ForwardedUserAgent
88
84
  #
89
85
  # The user agent string of the client that made the request
90
- #
91
- # @param [String] value The value to set for the ForwardedUserAgent header
86
+ # # @param [String] value The value to set for the ForwardedUserAgent header
92
87
  #
93
88
  # @return [self]
94
89
  def set_forwarded_user_agent(value)
@@ -119,7 +114,6 @@ module Appwrite
119
114
  self
120
115
  end
121
116
 
122
-
123
117
  # Add Header
124
118
  #
125
119
  # @param [String] key The key for the header to add
@@ -162,20 +156,9 @@ module Appwrite
162
156
  on_progress: nil,
163
157
  response_type: nil
164
158
  )
165
- input_file = params[param_name.to_sym]
159
+ payload = params[param_name.to_sym]
166
160
 
167
- case input_file.source_type
168
- when 'path'
169
- size = ::File.size(input_file.path)
170
- when 'string'
171
- size = input_file.data.bytesize
172
- end
173
-
174
- if size < @chunk_size
175
- if input_file.source_type == 'path'
176
- input_file.data = IO.read(input_file.path)
177
- end
178
- params[param_name.to_sym] = input_file
161
+ if payload.size < @chunk_size
179
162
  return call(
180
163
  method: 'POST',
181
164
  path: path,
@@ -199,21 +182,13 @@ module Appwrite
199
182
  offset = chunks_uploaded * @chunk_size
200
183
  end
201
184
 
202
- while offset < size
203
- case input_file.source_type
204
- when 'path'
205
- string = IO.read(input_file.path, @chunk_size, offset)
206
- when 'string'
207
- string = input_file.data.byteslice(offset, [@chunk_size, size - offset].min)
208
- end
209
-
210
- params[param_name.to_sym] = InputFile::from_string(
211
- string,
212
- filename: input_file.filename,
213
- mime_type: input_file.mime_type
185
+ while offset < payload.size
186
+ params[param_name.to_sym] = Payload.from_binary(
187
+ payload.to_binary(offset, [@chunk_size, payload.size - offset].min),
188
+ filename: payload.filename
214
189
  )
215
190
 
216
- headers['content-range'] = "bytes #{offset}-#{[offset + @chunk_size - 1, size - 1].min}/#{size}"
191
+ headers['content-range'] = "bytes #{offset}-#{[offset + @chunk_size - 1, payload.size - 1].min}/#{payload.size}"
217
192
 
218
193
  result = call(
219
194
  method: 'POST',
@@ -230,8 +205,8 @@ module Appwrite
230
205
 
231
206
  on_progress.call({
232
207
  id: result['$id'],
233
- progress: ([offset, size].min).to_f/size.to_f * 100.0,
234
- size_uploaded: [offset, size].min,
208
+ progress: ([offset, payload.size].min).to_f/payload.size.to_f * 100.0,
209
+ size_uploaded: [offset, payload.size].min,
235
210
  chunks_total: result['chunksTotal'],
236
211
  chunks_uploaded: result['chunksUploaded']
237
212
  }) unless on_progress.nil?
@@ -258,18 +233,27 @@ module Appwrite
258
233
  @http.use_ssl = !@self_signed
259
234
  payload = ''
260
235
 
261
- headers = @headers.merge(headers)
236
+ headers = @headers.merge(headers.transform_keys(&:to_s))
262
237
 
263
238
  params.compact!
264
239
 
265
- @boundary = "----A30#3ad1"
266
240
  if method != "GET"
267
- case headers[:'content-type']
241
+ case headers['content-type']
268
242
  when 'application/json'
269
243
  payload = params.to_json
270
244
  when 'multipart/form-data'
271
- payload = "--#{@boundary}\r\n" + encode_form_data(params)
272
- headers[:'content-type'] = "multipart/form-data; boundary=#{@boundary}"
245
+ multipart = MultipartBuilder.new()
246
+
247
+ params.each do |name, value|
248
+ if value.is_a?(Payload)
249
+ multipart.add(name, value.to_s, filename: value.filename)
250
+ else
251
+ multipart.add(name, value)
252
+ end
253
+ end
254
+
255
+ headers['content-type'] = multipart.content_type
256
+ payload = multipart.body
273
257
  else
274
258
  payload = encode(params)
275
259
  end
@@ -281,6 +265,13 @@ module Appwrite
281
265
  raise Appwrite::Exception.new(error.message)
282
266
  end
283
267
 
268
+ warnings = response['x-appwrite-warning']
269
+ if warnings
270
+ warnings.split(';').each do |warning|
271
+ warn "Warning: #{warning}"
272
+ end
273
+ end
274
+
284
275
  location = response['location']
285
276
  if response_type == "location"
286
277
  return location
@@ -292,7 +283,7 @@ module Appwrite
292
283
  return fetch(method, uri, headers, {}, response_type, limit - 1)
293
284
  end
294
285
 
295
- if response.content_type == 'application/json'
286
+ if response.content_type.start_with?('application/json')
296
287
  begin
297
288
  result = JSON.parse(response.body)
298
289
  rescue JSON::ParserError => e
@@ -303,46 +294,33 @@ module Appwrite
303
294
  raise Appwrite::Exception.new(result['message'], result['status'], result['type'], result)
304
295
  end
305
296
 
306
- unless response_type.respond_to?("from")
307
- return result
297
+ if response_type.respond_to?("from")
298
+ return response_type.from(map: result)
308
299
  end
309
300
 
310
- return response_type.from(map: result)
301
+ return result
311
302
  end
312
303
 
313
304
  if response.code.to_i >= 400
314
305
  raise Appwrite::Exception.new(response.body, response.code, response)
315
306
  end
316
307
 
317
- if response.respond_to?("body_permitted?")
318
- return response.body if response.body_permitted?
319
- end
308
+ if response.content_type.start_with?('multipart/form-data')
309
+ multipart = MultipartParser.new(response.body, response['content-type'])
310
+ result = multipart.to_hash
320
311
 
321
- return response
322
- end
323
-
324
- def encode_form_data(value, key=nil)
325
- case value
326
- when Hash
327
- value.map { |k,v| encode_form_data(v,k) }.join
328
- when Array
329
- value.map { |v| encode_form_data(v, "#{key}[]") }.join
330
- when nil
331
- ''
332
- else
333
- post_body = []
334
- if value.instance_of? InputFile
335
- post_body << "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{value.filename}\"\r\n"
336
- post_body << "Content-Type: #{value.mime_type}\r\n\r\n"
337
- post_body << value.data
338
- post_body << "\r\n--#{@boundary}--\r\n"
339
- else
340
- post_body << "Content-Disposition: form-data; name=\"#{key}\"\r\n\r\n"
341
- post_body << "#{value.to_s}"
342
- post_body << "\r\n--#{@boundary}\r\n"
312
+ if response_type.respond_to?("from")
313
+ return response_type.from(map: result)
343
314
  end
344
- post_body.join
315
+
316
+ return result
317
+ end
318
+
319
+ if response.class.body_permitted?
320
+ return response.body
345
321
  end
322
+
323
+ return response
346
324
  end
347
325
 
348
326
  def encode(value, key = nil)
@@ -4,7 +4,7 @@ module Appwrite
4
4
  AMERICAN_EXPRESS = 'amex'
5
5
  ARGENCARD = 'argencard'
6
6
  CABAL = 'cabal'
7
- CONSOSUD = 'censosud'
7
+ CENCOSUD = 'cencosud'
8
8
  DINERS_CLUB = 'diners'
9
9
  DISCOVER = 'discover'
10
10
  ELO = 'elo'
@@ -142,6 +142,7 @@ module Appwrite
142
142
  PALAU = 'pw'
143
143
  PAPUA_NEW_GUINEA = 'pg'
144
144
  POLAND = 'pl'
145
+ FRENCH_POLYNESIA = 'pf'
145
146
  NORTH_KOREA = 'kp'
146
147
  PORTUGAL = 'pt'
147
148
  PARAGUAY = 'py'
@@ -6,6 +6,7 @@ module Appwrite
6
6
  GIF = 'gif'
7
7
  PNG = 'png'
8
8
  WEBP = 'webp'
9
+ AVIF = 'avif'
9
10
  end
10
11
  end
11
12
  end
@@ -8,12 +8,11 @@ module Appwrite
8
8
  V1_FUNCTIONS = 'v1-functions'
9
9
  V1_USAGE = 'v1-usage'
10
10
  V1_USAGE_DUMP = 'v1-usage-dump'
11
- WEBHOOKSV1 = 'webhooksv1'
11
+ V1_WEBHOOKS = 'v1-webhooks'
12
12
  V1_CERTIFICATES = 'v1-certificates'
13
13
  V1_BUILDS = 'v1-builds'
14
14
  V1_MESSAGING = 'v1-messaging'
15
15
  V1_MIGRATIONS = 'v1-migrations'
16
- HAMSTERV1 = 'hamsterv1'
17
16
  end
18
17
  end
19
18
  end
@@ -20,6 +20,10 @@ module Appwrite
20
20
  PYTHON_3_10 = 'python-3.10'
21
21
  PYTHON_3_11 = 'python-3.11'
22
22
  PYTHON_3_12 = 'python-3.12'
23
+ PYTHON_ML_3_11 = 'python-ml-3.11'
24
+ DENO_1_21 = 'deno-1.21'
25
+ DENO_1_24 = 'deno-1.24'
26
+ DENO_1_35 = 'deno-1.35'
23
27
  DENO_1_40 = 'deno-1.40'
24
28
  DART_2_15 = 'dart-2.15'
25
29
  DART_2_16 = 'dart-2.16'
@@ -45,6 +49,7 @@ module Appwrite
45
49
  CPP_17 = 'cpp-17'
46
50
  CPP_20 = 'cpp-20'
47
51
  BUN_1_0 = 'bun-1.0'
52
+ GO_1_23 = 'go-1.23'
48
53
  end
49
54
  end
50
55
  end
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :default
13
15
 
14
16
  def initialize(
@@ -18,6 +20,8 @@ module Appwrite
18
20
  error:,
19
21
  required:,
20
22
  array: ,
23
+ created_at:,
24
+ updated_at:,
21
25
  default:
22
26
  )
23
27
  @key = key
@@ -26,6 +30,8 @@ module Appwrite
26
30
  @error = error
27
31
  @required = required
28
32
  @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
29
35
  @default = default
30
36
  end
31
37
 
@@ -37,6 +43,8 @@ module Appwrite
37
43
  error: map["error"],
38
44
  required: map["required"],
39
45
  array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
40
48
  default: map["default"]
41
49
  )
42
50
  end
@@ -49,6 +57,8 @@ module Appwrite
49
57
  "error": @error,
50
58
  "required": @required,
51
59
  "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
52
62
  "default": @default
53
63
  }
54
64
  end
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :format
13
15
  attr_reader :default
14
16
 
@@ -19,6 +21,8 @@ module Appwrite
19
21
  error:,
20
22
  required:,
21
23
  array: ,
24
+ created_at:,
25
+ updated_at:,
22
26
  format:,
23
27
  default:
24
28
  )
@@ -28,6 +32,8 @@ module Appwrite
28
32
  @error = error
29
33
  @required = required
30
34
  @array = array
35
+ @created_at = created_at
36
+ @updated_at = updated_at
31
37
  @format = format
32
38
  @default = default
33
39
  end
@@ -40,6 +46,8 @@ module Appwrite
40
46
  error: map["error"],
41
47
  required: map["required"],
42
48
  array: map["array"],
49
+ created_at: map["$createdAt"],
50
+ updated_at: map["$updatedAt"],
43
51
  format: map["format"],
44
52
  default: map["default"]
45
53
  )
@@ -53,6 +61,8 @@ module Appwrite
53
61
  "error": @error,
54
62
  "required": @required,
55
63
  "array": @array,
64
+ "$createdAt": @created_at,
65
+ "$updatedAt": @updated_at,
56
66
  "format": @format,
57
67
  "default": @default
58
68
  }
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :format
13
15
  attr_reader :default
14
16
 
@@ -19,6 +21,8 @@ module Appwrite
19
21
  error:,
20
22
  required:,
21
23
  array: ,
24
+ created_at:,
25
+ updated_at:,
22
26
  format:,
23
27
  default:
24
28
  )
@@ -28,6 +32,8 @@ module Appwrite
28
32
  @error = error
29
33
  @required = required
30
34
  @array = array
35
+ @created_at = created_at
36
+ @updated_at = updated_at
31
37
  @format = format
32
38
  @default = default
33
39
  end
@@ -40,6 +46,8 @@ module Appwrite
40
46
  error: map["error"],
41
47
  required: map["required"],
42
48
  array: map["array"],
49
+ created_at: map["$createdAt"],
50
+ updated_at: map["$updatedAt"],
43
51
  format: map["format"],
44
52
  default: map["default"]
45
53
  )
@@ -53,6 +61,8 @@ module Appwrite
53
61
  "error": @error,
54
62
  "required": @required,
55
63
  "array": @array,
64
+ "$createdAt": @created_at,
65
+ "$updatedAt": @updated_at,
56
66
  "format": @format,
57
67
  "default": @default
58
68
  }
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :elements
13
15
  attr_reader :format
14
16
  attr_reader :default
@@ -20,6 +22,8 @@ module Appwrite
20
22
  error:,
21
23
  required:,
22
24
  array: ,
25
+ created_at:,
26
+ updated_at:,
23
27
  elements:,
24
28
  format:,
25
29
  default:
@@ -30,6 +34,8 @@ module Appwrite
30
34
  @error = error
31
35
  @required = required
32
36
  @array = array
37
+ @created_at = created_at
38
+ @updated_at = updated_at
33
39
  @elements = elements
34
40
  @format = format
35
41
  @default = default
@@ -43,6 +49,8 @@ module Appwrite
43
49
  error: map["error"],
44
50
  required: map["required"],
45
51
  array: map["array"],
52
+ created_at: map["$createdAt"],
53
+ updated_at: map["$updatedAt"],
46
54
  elements: map["elements"],
47
55
  format: map["format"],
48
56
  default: map["default"]
@@ -57,6 +65,8 @@ module Appwrite
57
65
  "error": @error,
58
66
  "required": @required,
59
67
  "array": @array,
68
+ "$createdAt": @created_at,
69
+ "$updatedAt": @updated_at,
60
70
  "elements": @elements,
61
71
  "format": @format,
62
72
  "default": @default
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :min
13
15
  attr_reader :max
14
16
  attr_reader :default
@@ -20,6 +22,8 @@ module Appwrite
20
22
  error:,
21
23
  required:,
22
24
  array: ,
25
+ created_at:,
26
+ updated_at:,
23
27
  min: ,
24
28
  max: ,
25
29
  default:
@@ -30,6 +34,8 @@ module Appwrite
30
34
  @error = error
31
35
  @required = required
32
36
  @array = array
37
+ @created_at = created_at
38
+ @updated_at = updated_at
33
39
  @min = min
34
40
  @max = max
35
41
  @default = default
@@ -43,6 +49,8 @@ module Appwrite
43
49
  error: map["error"],
44
50
  required: map["required"],
45
51
  array: map["array"],
52
+ created_at: map["$createdAt"],
53
+ updated_at: map["$updatedAt"],
46
54
  min: map["min"],
47
55
  max: map["max"],
48
56
  default: map["default"]
@@ -57,6 +65,8 @@ module Appwrite
57
65
  "error": @error,
58
66
  "required": @required,
59
67
  "array": @array,
68
+ "$createdAt": @created_at,
69
+ "$updatedAt": @updated_at,
60
70
  "min": @min,
61
71
  "max": @max,
62
72
  "default": @default
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :min
13
15
  attr_reader :max
14
16
  attr_reader :default
@@ -20,6 +22,8 @@ module Appwrite
20
22
  error:,
21
23
  required:,
22
24
  array: ,
25
+ created_at:,
26
+ updated_at:,
23
27
  min: ,
24
28
  max: ,
25
29
  default:
@@ -30,6 +34,8 @@ module Appwrite
30
34
  @error = error
31
35
  @required = required
32
36
  @array = array
37
+ @created_at = created_at
38
+ @updated_at = updated_at
33
39
  @min = min
34
40
  @max = max
35
41
  @default = default
@@ -43,6 +49,8 @@ module Appwrite
43
49
  error: map["error"],
44
50
  required: map["required"],
45
51
  array: map["array"],
52
+ created_at: map["$createdAt"],
53
+ updated_at: map["$updatedAt"],
46
54
  min: map["min"],
47
55
  max: map["max"],
48
56
  default: map["default"]
@@ -57,6 +65,8 @@ module Appwrite
57
65
  "error": @error,
58
66
  "required": @required,
59
67
  "array": @array,
68
+ "$createdAt": @created_at,
69
+ "$updatedAt": @updated_at,
60
70
  "min": @min,
61
71
  "max": @max,
62
72
  "default": @default
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :format
13
15
  attr_reader :default
14
16
 
@@ -19,6 +21,8 @@ module Appwrite
19
21
  error:,
20
22
  required:,
21
23
  array: ,
24
+ created_at:,
25
+ updated_at:,
22
26
  format:,
23
27
  default:
24
28
  )
@@ -28,6 +32,8 @@ module Appwrite
28
32
  @error = error
29
33
  @required = required
30
34
  @array = array
35
+ @created_at = created_at
36
+ @updated_at = updated_at
31
37
  @format = format
32
38
  @default = default
33
39
  end
@@ -40,6 +46,8 @@ module Appwrite
40
46
  error: map["error"],
41
47
  required: map["required"],
42
48
  array: map["array"],
49
+ created_at: map["$createdAt"],
50
+ updated_at: map["$updatedAt"],
43
51
  format: map["format"],
44
52
  default: map["default"]
45
53
  )
@@ -53,6 +61,8 @@ module Appwrite
53
61
  "error": @error,
54
62
  "required": @required,
55
63
  "array": @array,
64
+ "$createdAt": @created_at,
65
+ "$updatedAt": @updated_at,
56
66
  "format": @format,
57
67
  "default": @default
58
68
  }
@@ -9,6 +9,8 @@ module Appwrite
9
9
  attr_reader :error
10
10
  attr_reader :required
11
11
  attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
12
14
  attr_reader :related_collection
13
15
  attr_reader :relation_type
14
16
  attr_reader :two_way
@@ -23,6 +25,8 @@ module Appwrite
23
25
  error:,
24
26
  required:,
25
27
  array: ,
28
+ created_at:,
29
+ updated_at:,
26
30
  related_collection:,
27
31
  relation_type:,
28
32
  two_way:,
@@ -36,6 +40,8 @@ module Appwrite
36
40
  @error = error
37
41
  @required = required
38
42
  @array = array
43
+ @created_at = created_at
44
+ @updated_at = updated_at
39
45
  @related_collection = related_collection
40
46
  @relation_type = relation_type
41
47
  @two_way = two_way
@@ -52,6 +58,8 @@ module Appwrite
52
58
  error: map["error"],
53
59
  required: map["required"],
54
60
  array: map["array"],
61
+ created_at: map["$createdAt"],
62
+ updated_at: map["$updatedAt"],
55
63
  related_collection: map["relatedCollection"],
56
64
  relation_type: map["relationType"],
57
65
  two_way: map["twoWay"],
@@ -69,6 +77,8 @@ module Appwrite
69
77
  "error": @error,
70
78
  "required": @required,
71
79
  "array": @array,
80
+ "$createdAt": @created_at,
81
+ "$updatedAt": @updated_at,
72
82
  "relatedCollection": @related_collection,
73
83
  "relationType": @relation_type,
74
84
  "twoWay": @two_way,