appwrite 8.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +2 -2
  3. data/lib/appwrite/models/attribute_boolean.rb +5 -0
  4. data/lib/appwrite/models/attribute_datetime.rb +5 -0
  5. data/lib/appwrite/models/attribute_email.rb +5 -0
  6. data/lib/appwrite/models/attribute_enum.rb +5 -0
  7. data/lib/appwrite/models/attribute_float.rb +5 -0
  8. data/lib/appwrite/models/attribute_integer.rb +5 -0
  9. data/lib/appwrite/models/attribute_ip.rb +5 -0
  10. data/lib/appwrite/models/attribute_relationship.rb +5 -0
  11. data/lib/appwrite/models/attribute_string.rb +5 -0
  12. data/lib/appwrite/models/attribute_url.rb +5 -0
  13. data/lib/appwrite/models/database.rb +8 -3
  14. data/lib/appwrite/models/deployment.rb +63 -13
  15. data/lib/appwrite/models/execution.rb +40 -20
  16. data/lib/appwrite/models/function.rb +53 -13
  17. data/lib/appwrite/models/headers.rb +32 -0
  18. data/lib/appwrite/models/health_status.rb +5 -0
  19. data/lib/appwrite/models/identity.rb +72 -0
  20. data/lib/appwrite/models/identity_list.rb +32 -0
  21. data/lib/appwrite/models/index.rb +5 -0
  22. data/lib/appwrite/models/locale_code.rb +32 -0
  23. data/lib/appwrite/models/locale_code_list.rb +32 -0
  24. data/lib/appwrite/models/user.rb +13 -3
  25. data/lib/appwrite/models/variable.rb +10 -5
  26. data/lib/appwrite/services/account.rb +105 -50
  27. data/lib/appwrite/services/avatars.rb +14 -14
  28. data/lib/appwrite/services/databases.rb +106 -94
  29. data/lib/appwrite/services/functions.rb +149 -63
  30. data/lib/appwrite/services/graphql.rb +4 -4
  31. data/lib/appwrite/services/health.rb +71 -22
  32. data/lib/appwrite/services/locale.rb +39 -14
  33. data/lib/appwrite/services/storage.rb +33 -31
  34. data/lib/appwrite/services/teams.rb +28 -27
  35. data/lib/appwrite/services/users.rb +148 -50
  36. data/lib/appwrite.rb +5 -0
  37. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9887f972b6c4397ea1d2ec97bed57443f2d52df1beb4a2b6096d6d50a2942fdc
4
- data.tar.gz: 5ff79e810868231c637b4d23145787db5300fe2230b205dfbcb2eb4c58e3f644
3
+ metadata.gz: d9f3fda23d3f2943c0e41b560c3195f13c0130105d18a790c4e1110b02daea6f
4
+ data.tar.gz: 31c3ce255470e07986dadc415966b73859f4fff1e1de4d93a90bdf608d7e0e3c
5
5
  SHA512:
6
- metadata.gz: 5e6fe6ffc1354374f05f88e7f5a7885d6f61535a545b87d5d664d6af9fa2c3d4399869d7308463a69b04fa94803342ff2c47f9141440ad26264c2e4659a789a8
7
- data.tar.gz: 4f097152d343fe3bceaa7c7423d475359e46f26e546885233bc18636dcfa5db656e01deaa4b66df8c5df41b46e6c02648819898685d8bccaaac67e7ded4bcb53
6
+ metadata.gz: ebf9c4fae105faa4bc971bcdcf05197b8b4f1b8481cb138ae10c9632575136f662c992bc907aca7bb2cf84ea725a832fc41e3cdc750385c07441a642a4722816
7
+ data.tar.gz: 5a69deb9c936e526e7e88b3466246ae246132f8710a7b95b2c1d43d208ddbacff301b8b93f3b1031e755b13cca2535893235ee5097c02122e3c58a49f4c59217
@@ -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'=> '8.0.0',
19
- 'X-Appwrite-Response-Format' => '1.0.0'
18
+ 'x-sdk-version'=> '9.0.0',
19
+ 'X-Appwrite-Response-Format' => '1.4.0'
20
20
  }
21
21
  @endpoint = 'https://HOSTNAME/v1'
22
22
  end
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :default
@@ -14,6 +15,7 @@ module Appwrite
14
15
  key:,
15
16
  type:,
16
17
  status:,
18
+ error:,
17
19
  required:,
18
20
  array: ,
19
21
  default:
@@ -21,6 +23,7 @@ module Appwrite
21
23
  @key = key
22
24
  @type = type
23
25
  @status = status
26
+ @error = error
24
27
  @required = required
25
28
  @array = array
26
29
  @default = default
@@ -31,6 +34,7 @@ module Appwrite
31
34
  key: map["key"],
32
35
  type: map["type"],
33
36
  status: map["status"],
37
+ error: map["error"],
34
38
  required: map["required"],
35
39
  array: map["array"],
36
40
  default: map["default"]
@@ -42,6 +46,7 @@ module Appwrite
42
46
  "key": @key,
43
47
  "type": @type,
44
48
  "status": @status,
49
+ "error": @error,
45
50
  "required": @required,
46
51
  "array": @array,
47
52
  "default": @default
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :format
@@ -15,6 +16,7 @@ module Appwrite
15
16
  key:,
16
17
  type:,
17
18
  status:,
19
+ error:,
18
20
  required:,
19
21
  array: ,
20
22
  format:,
@@ -23,6 +25,7 @@ module Appwrite
23
25
  @key = key
24
26
  @type = type
25
27
  @status = status
28
+ @error = error
26
29
  @required = required
27
30
  @array = array
28
31
  @format = format
@@ -34,6 +37,7 @@ module Appwrite
34
37
  key: map["key"],
35
38
  type: map["type"],
36
39
  status: map["status"],
40
+ error: map["error"],
37
41
  required: map["required"],
38
42
  array: map["array"],
39
43
  format: map["format"],
@@ -46,6 +50,7 @@ module Appwrite
46
50
  "key": @key,
47
51
  "type": @type,
48
52
  "status": @status,
53
+ "error": @error,
49
54
  "required": @required,
50
55
  "array": @array,
51
56
  "format": @format,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :format
@@ -15,6 +16,7 @@ module Appwrite
15
16
  key:,
16
17
  type:,
17
18
  status:,
19
+ error:,
18
20
  required:,
19
21
  array: ,
20
22
  format:,
@@ -23,6 +25,7 @@ module Appwrite
23
25
  @key = key
24
26
  @type = type
25
27
  @status = status
28
+ @error = error
26
29
  @required = required
27
30
  @array = array
28
31
  @format = format
@@ -34,6 +37,7 @@ module Appwrite
34
37
  key: map["key"],
35
38
  type: map["type"],
36
39
  status: map["status"],
40
+ error: map["error"],
37
41
  required: map["required"],
38
42
  array: map["array"],
39
43
  format: map["format"],
@@ -46,6 +50,7 @@ module Appwrite
46
50
  "key": @key,
47
51
  "type": @type,
48
52
  "status": @status,
53
+ "error": @error,
49
54
  "required": @required,
50
55
  "array": @array,
51
56
  "format": @format,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :elements
@@ -16,6 +17,7 @@ module Appwrite
16
17
  key:,
17
18
  type:,
18
19
  status:,
20
+ error:,
19
21
  required:,
20
22
  array: ,
21
23
  elements:,
@@ -25,6 +27,7 @@ module Appwrite
25
27
  @key = key
26
28
  @type = type
27
29
  @status = status
30
+ @error = error
28
31
  @required = required
29
32
  @array = array
30
33
  @elements = elements
@@ -37,6 +40,7 @@ module Appwrite
37
40
  key: map["key"],
38
41
  type: map["type"],
39
42
  status: map["status"],
43
+ error: map["error"],
40
44
  required: map["required"],
41
45
  array: map["array"],
42
46
  elements: map["elements"],
@@ -50,6 +54,7 @@ module Appwrite
50
54
  "key": @key,
51
55
  "type": @type,
52
56
  "status": @status,
57
+ "error": @error,
53
58
  "required": @required,
54
59
  "array": @array,
55
60
  "elements": @elements,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :min
@@ -16,6 +17,7 @@ module Appwrite
16
17
  key:,
17
18
  type:,
18
19
  status:,
20
+ error:,
19
21
  required:,
20
22
  array: ,
21
23
  min: ,
@@ -25,6 +27,7 @@ module Appwrite
25
27
  @key = key
26
28
  @type = type
27
29
  @status = status
30
+ @error = error
28
31
  @required = required
29
32
  @array = array
30
33
  @min = min
@@ -37,6 +40,7 @@ module Appwrite
37
40
  key: map["key"],
38
41
  type: map["type"],
39
42
  status: map["status"],
43
+ error: map["error"],
40
44
  required: map["required"],
41
45
  array: map["array"],
42
46
  min: map["min"],
@@ -50,6 +54,7 @@ module Appwrite
50
54
  "key": @key,
51
55
  "type": @type,
52
56
  "status": @status,
57
+ "error": @error,
53
58
  "required": @required,
54
59
  "array": @array,
55
60
  "min": @min,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :min
@@ -16,6 +17,7 @@ module Appwrite
16
17
  key:,
17
18
  type:,
18
19
  status:,
20
+ error:,
19
21
  required:,
20
22
  array: ,
21
23
  min: ,
@@ -25,6 +27,7 @@ module Appwrite
25
27
  @key = key
26
28
  @type = type
27
29
  @status = status
30
+ @error = error
28
31
  @required = required
29
32
  @array = array
30
33
  @min = min
@@ -37,6 +40,7 @@ module Appwrite
37
40
  key: map["key"],
38
41
  type: map["type"],
39
42
  status: map["status"],
43
+ error: map["error"],
40
44
  required: map["required"],
41
45
  array: map["array"],
42
46
  min: map["min"],
@@ -50,6 +54,7 @@ module Appwrite
50
54
  "key": @key,
51
55
  "type": @type,
52
56
  "status": @status,
57
+ "error": @error,
53
58
  "required": @required,
54
59
  "array": @array,
55
60
  "min": @min,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :format
@@ -15,6 +16,7 @@ module Appwrite
15
16
  key:,
16
17
  type:,
17
18
  status:,
19
+ error:,
18
20
  required:,
19
21
  array: ,
20
22
  format:,
@@ -23,6 +25,7 @@ module Appwrite
23
25
  @key = key
24
26
  @type = type
25
27
  @status = status
28
+ @error = error
26
29
  @required = required
27
30
  @array = array
28
31
  @format = format
@@ -34,6 +37,7 @@ module Appwrite
34
37
  key: map["key"],
35
38
  type: map["type"],
36
39
  status: map["status"],
40
+ error: map["error"],
37
41
  required: map["required"],
38
42
  array: map["array"],
39
43
  format: map["format"],
@@ -46,6 +50,7 @@ module Appwrite
46
50
  "key": @key,
47
51
  "type": @type,
48
52
  "status": @status,
53
+ "error": @error,
49
54
  "required": @required,
50
55
  "array": @array,
51
56
  "format": @format,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :related_collection
@@ -19,6 +20,7 @@ module Appwrite
19
20
  key:,
20
21
  type:,
21
22
  status:,
23
+ error:,
22
24
  required:,
23
25
  array: ,
24
26
  related_collection:,
@@ -31,6 +33,7 @@ module Appwrite
31
33
  @key = key
32
34
  @type = type
33
35
  @status = status
36
+ @error = error
34
37
  @required = required
35
38
  @array = array
36
39
  @related_collection = related_collection
@@ -46,6 +49,7 @@ module Appwrite
46
49
  key: map["key"],
47
50
  type: map["type"],
48
51
  status: map["status"],
52
+ error: map["error"],
49
53
  required: map["required"],
50
54
  array: map["array"],
51
55
  related_collection: map["relatedCollection"],
@@ -62,6 +66,7 @@ module Appwrite
62
66
  "key": @key,
63
67
  "type": @type,
64
68
  "status": @status,
69
+ "error": @error,
65
70
  "required": @required,
66
71
  "array": @array,
67
72
  "relatedCollection": @related_collection,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :size
@@ -15,6 +16,7 @@ module Appwrite
15
16
  key:,
16
17
  type:,
17
18
  status:,
19
+ error:,
18
20
  required:,
19
21
  array: ,
20
22
  size:,
@@ -23,6 +25,7 @@ module Appwrite
23
25
  @key = key
24
26
  @type = type
25
27
  @status = status
28
+ @error = error
26
29
  @required = required
27
30
  @array = array
28
31
  @size = size
@@ -34,6 +37,7 @@ module Appwrite
34
37
  key: map["key"],
35
38
  type: map["type"],
36
39
  status: map["status"],
40
+ error: map["error"],
37
41
  required: map["required"],
38
42
  array: map["array"],
39
43
  size: map["size"],
@@ -46,6 +50,7 @@ module Appwrite
46
50
  "key": @key,
47
51
  "type": @type,
48
52
  "status": @status,
53
+ "error": @error,
49
54
  "required": @required,
50
55
  "array": @array,
51
56
  "size": @size,
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :key
7
7
  attr_reader :type
8
8
  attr_reader :status
9
+ attr_reader :error
9
10
  attr_reader :required
10
11
  attr_reader :array
11
12
  attr_reader :format
@@ -15,6 +16,7 @@ module Appwrite
15
16
  key:,
16
17
  type:,
17
18
  status:,
19
+ error:,
18
20
  required:,
19
21
  array: ,
20
22
  format:,
@@ -23,6 +25,7 @@ module Appwrite
23
25
  @key = key
24
26
  @type = type
25
27
  @status = status
28
+ @error = error
26
29
  @required = required
27
30
  @array = array
28
31
  @format = format
@@ -34,6 +37,7 @@ module Appwrite
34
37
  key: map["key"],
35
38
  type: map["type"],
36
39
  status: map["status"],
40
+ error: map["error"],
37
41
  required: map["required"],
38
42
  array: map["array"],
39
43
  format: map["format"],
@@ -46,6 +50,7 @@ module Appwrite
46
50
  "key": @key,
47
51
  "type": @type,
48
52
  "status": @status,
53
+ "error": @error,
49
54
  "required": @required,
50
55
  "array": @array,
51
56
  "format": @format,
@@ -7,17 +7,20 @@ module Appwrite
7
7
  attr_reader :name
8
8
  attr_reader :created_at
9
9
  attr_reader :updated_at
10
+ attr_reader :enabled
10
11
 
11
12
  def initialize(
12
13
  id:,
13
14
  name:,
14
15
  created_at:,
15
- updated_at:
16
+ updated_at:,
17
+ enabled:
16
18
  )
17
19
  @id = id
18
20
  @name = name
19
21
  @created_at = created_at
20
22
  @updated_at = updated_at
23
+ @enabled = enabled
21
24
  end
22
25
 
23
26
  def self.from(map:)
@@ -25,7 +28,8 @@ module Appwrite
25
28
  id: map["$id"],
26
29
  name: map["name"],
27
30
  created_at: map["$createdAt"],
28
- updated_at: map["$updatedAt"]
31
+ updated_at: map["$updatedAt"],
32
+ enabled: map["enabled"]
29
33
  )
30
34
  end
31
35
 
@@ -34,7 +38,8 @@ module Appwrite
34
38
  "$id": @id,
35
39
  "name": @name,
36
40
  "$createdAt": @created_at,
37
- "$updatedAt": @updated_at
41
+ "$updatedAt": @updated_at,
42
+ "enabled": @enabled
38
43
  }
39
44
  end
40
45
  end
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :id
7
7
  attr_reader :created_at
8
8
  attr_reader :updated_at
9
+ attr_reader :type
9
10
  attr_reader :resource_id
10
11
  attr_reader :resource_type
11
12
  attr_reader :entrypoint
@@ -13,14 +14,24 @@ module Appwrite
13
14
  attr_reader :build_id
14
15
  attr_reader :activate
15
16
  attr_reader :status
16
- attr_reader :build_stdout
17
- attr_reader :build_stderr
17
+ attr_reader :build_logs
18
18
  attr_reader :build_time
19
+ attr_reader :provider_repository_name
20
+ attr_reader :provider_repository_owner
21
+ attr_reader :provider_repository_url
22
+ attr_reader :provider_branch
23
+ attr_reader :provider_commit_hash
24
+ attr_reader :provider_commit_author_url
25
+ attr_reader :provider_commit_author
26
+ attr_reader :provider_commit_message
27
+ attr_reader :provider_commit_url
28
+ attr_reader :provider_branch_url
19
29
 
20
30
  def initialize(
21
31
  id:,
22
32
  created_at:,
23
33
  updated_at:,
34
+ type:,
24
35
  resource_id:,
25
36
  resource_type:,
26
37
  entrypoint:,
@@ -28,13 +39,23 @@ module Appwrite
28
39
  build_id:,
29
40
  activate:,
30
41
  status:,
31
- build_stdout:,
32
- build_stderr:,
33
- build_time:
42
+ build_logs:,
43
+ build_time:,
44
+ provider_repository_name:,
45
+ provider_repository_owner:,
46
+ provider_repository_url:,
47
+ provider_branch:,
48
+ provider_commit_hash:,
49
+ provider_commit_author_url:,
50
+ provider_commit_author:,
51
+ provider_commit_message:,
52
+ provider_commit_url:,
53
+ provider_branch_url:
34
54
  )
35
55
  @id = id
36
56
  @created_at = created_at
37
57
  @updated_at = updated_at
58
+ @type = type
38
59
  @resource_id = resource_id
39
60
  @resource_type = resource_type
40
61
  @entrypoint = entrypoint
@@ -42,9 +63,18 @@ module Appwrite
42
63
  @build_id = build_id
43
64
  @activate = activate
44
65
  @status = status
45
- @build_stdout = build_stdout
46
- @build_stderr = build_stderr
66
+ @build_logs = build_logs
47
67
  @build_time = build_time
68
+ @provider_repository_name = provider_repository_name
69
+ @provider_repository_owner = provider_repository_owner
70
+ @provider_repository_url = provider_repository_url
71
+ @provider_branch = provider_branch
72
+ @provider_commit_hash = provider_commit_hash
73
+ @provider_commit_author_url = provider_commit_author_url
74
+ @provider_commit_author = provider_commit_author
75
+ @provider_commit_message = provider_commit_message
76
+ @provider_commit_url = provider_commit_url
77
+ @provider_branch_url = provider_branch_url
48
78
  end
49
79
 
50
80
  def self.from(map:)
@@ -52,6 +82,7 @@ module Appwrite
52
82
  id: map["$id"],
53
83
  created_at: map["$createdAt"],
54
84
  updated_at: map["$updatedAt"],
85
+ type: map["type"],
55
86
  resource_id: map["resourceId"],
56
87
  resource_type: map["resourceType"],
57
88
  entrypoint: map["entrypoint"],
@@ -59,9 +90,18 @@ module Appwrite
59
90
  build_id: map["buildId"],
60
91
  activate: map["activate"],
61
92
  status: map["status"],
62
- build_stdout: map["buildStdout"],
63
- build_stderr: map["buildStderr"],
64
- build_time: map["buildTime"]
93
+ build_logs: map["buildLogs"],
94
+ build_time: map["buildTime"],
95
+ provider_repository_name: map["providerRepositoryName"],
96
+ provider_repository_owner: map["providerRepositoryOwner"],
97
+ provider_repository_url: map["providerRepositoryUrl"],
98
+ provider_branch: map["providerBranch"],
99
+ provider_commit_hash: map["providerCommitHash"],
100
+ provider_commit_author_url: map["providerCommitAuthorUrl"],
101
+ provider_commit_author: map["providerCommitAuthor"],
102
+ provider_commit_message: map["providerCommitMessage"],
103
+ provider_commit_url: map["providerCommitUrl"],
104
+ provider_branch_url: map["providerBranchUrl"]
65
105
  )
66
106
  end
67
107
 
@@ -70,6 +110,7 @@ module Appwrite
70
110
  "$id": @id,
71
111
  "$createdAt": @created_at,
72
112
  "$updatedAt": @updated_at,
113
+ "type": @type,
73
114
  "resourceId": @resource_id,
74
115
  "resourceType": @resource_type,
75
116
  "entrypoint": @entrypoint,
@@ -77,9 +118,18 @@ module Appwrite
77
118
  "buildId": @build_id,
78
119
  "activate": @activate,
79
120
  "status": @status,
80
- "buildStdout": @build_stdout,
81
- "buildStderr": @build_stderr,
82
- "buildTime": @build_time
121
+ "buildLogs": @build_logs,
122
+ "buildTime": @build_time,
123
+ "providerRepositoryName": @provider_repository_name,
124
+ "providerRepositoryOwner": @provider_repository_owner,
125
+ "providerRepositoryUrl": @provider_repository_url,
126
+ "providerBranch": @provider_branch,
127
+ "providerCommitHash": @provider_commit_hash,
128
+ "providerCommitAuthorUrl": @provider_commit_author_url,
129
+ "providerCommitAuthor": @provider_commit_author,
130
+ "providerCommitMessage": @provider_commit_message,
131
+ "providerCommitUrl": @provider_commit_url,
132
+ "providerBranchUrl": @provider_branch_url
83
133
  }
84
134
  end
85
135
  end