appwrite 8.0.0 → 9.0.1
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.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +4 -4
- data/lib/appwrite/models/attribute_boolean.rb +5 -0
- data/lib/appwrite/models/attribute_datetime.rb +5 -0
- data/lib/appwrite/models/attribute_email.rb +5 -0
- data/lib/appwrite/models/attribute_enum.rb +5 -0
- data/lib/appwrite/models/attribute_float.rb +5 -0
- data/lib/appwrite/models/attribute_integer.rb +5 -0
- data/lib/appwrite/models/attribute_ip.rb +5 -0
- data/lib/appwrite/models/attribute_relationship.rb +5 -0
- data/lib/appwrite/models/attribute_string.rb +5 -0
- data/lib/appwrite/models/attribute_url.rb +5 -0
- data/lib/appwrite/models/database.rb +8 -3
- data/lib/appwrite/models/deployment.rb +63 -13
- data/lib/appwrite/models/execution.rb +40 -20
- data/lib/appwrite/models/function.rb +53 -13
- data/lib/appwrite/models/headers.rb +32 -0
- data/lib/appwrite/models/health_status.rb +5 -0
- data/lib/appwrite/models/identity.rb +72 -0
- data/lib/appwrite/models/identity_list.rb +32 -0
- data/lib/appwrite/models/index.rb +5 -0
- data/lib/appwrite/models/locale_code.rb +32 -0
- data/lib/appwrite/models/locale_code_list.rb +32 -0
- data/lib/appwrite/models/user.rb +13 -3
- data/lib/appwrite/models/variable.rb +10 -5
- data/lib/appwrite/role.rb +56 -0
- data/lib/appwrite/services/account.rb +185 -130
- data/lib/appwrite/services/avatars.rb +42 -42
- data/lib/appwrite/services/databases.rb +274 -262
- data/lib/appwrite/services/functions.rb +229 -143
- data/lib/appwrite/services/graphql.rb +12 -12
- data/lib/appwrite/services/health.rb +111 -62
- data/lib/appwrite/services/locale.rb +67 -42
- data/lib/appwrite/services/storage.rb +85 -83
- data/lib/appwrite/services/teams.rb +80 -79
- data/lib/appwrite/services/users.rb +248 -150
- data/lib/appwrite.rb +5 -0
- metadata +7 -2
@@ -13,26 +13,26 @@ module Appwrite
|
|
13
13
|
#
|
14
14
|
# @return [Any]
|
15
15
|
def query(query:)
|
16
|
-
|
16
|
+
api_path = '/graphql'
|
17
17
|
|
18
18
|
if query.nil?
|
19
19
|
raise Appwrite::Exception.new('Missing required parameter: "query"')
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
api_params = {
|
23
23
|
query: query,
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
api_headers = {
|
27
27
|
"x-sdk-graphql": 'true',
|
28
28
|
"content-type": 'application/json',
|
29
29
|
}
|
30
30
|
|
31
31
|
@client.call(
|
32
32
|
method: 'POST',
|
33
|
-
path:
|
34
|
-
headers:
|
35
|
-
params:
|
33
|
+
path: api_path,
|
34
|
+
headers: api_headers,
|
35
|
+
params: api_params,
|
36
36
|
)
|
37
37
|
end
|
38
38
|
|
@@ -43,26 +43,26 @@ module Appwrite
|
|
43
43
|
#
|
44
44
|
# @return [Any]
|
45
45
|
def mutation(query:)
|
46
|
-
|
46
|
+
api_path = '/graphql/mutation'
|
47
47
|
|
48
48
|
if query.nil?
|
49
49
|
raise Appwrite::Exception.new('Missing required parameter: "query"')
|
50
50
|
end
|
51
51
|
|
52
|
-
|
52
|
+
api_params = {
|
53
53
|
query: query,
|
54
54
|
}
|
55
55
|
|
56
|
-
|
56
|
+
api_headers = {
|
57
57
|
"x-sdk-graphql": 'true',
|
58
58
|
"content-type": 'application/json',
|
59
59
|
}
|
60
60
|
|
61
61
|
@client.call(
|
62
62
|
method: 'POST',
|
63
|
-
path:
|
64
|
-
headers:
|
65
|
-
params:
|
63
|
+
path: api_path,
|
64
|
+
headers: api_headers,
|
65
|
+
params: api_params,
|
66
66
|
)
|
67
67
|
end
|
68
68
|
|
@@ -12,20 +12,20 @@ module Appwrite
|
|
12
12
|
#
|
13
13
|
# @return [HealthStatus]
|
14
14
|
def get()
|
15
|
-
|
15
|
+
api_path = '/health'
|
16
16
|
|
17
|
-
|
17
|
+
api_params = {
|
18
18
|
}
|
19
19
|
|
20
|
-
|
20
|
+
api_headers = {
|
21
21
|
"content-type": 'application/json',
|
22
22
|
}
|
23
23
|
|
24
24
|
@client.call(
|
25
25
|
method: 'GET',
|
26
|
-
path:
|
27
|
-
headers:
|
28
|
-
params:
|
26
|
+
path: api_path,
|
27
|
+
headers: api_headers,
|
28
|
+
params: api_params,
|
29
29
|
response_type: Models::HealthStatus
|
30
30
|
)
|
31
31
|
end
|
@@ -36,69 +36,118 @@ module Appwrite
|
|
36
36
|
#
|
37
37
|
# @return [HealthAntivirus]
|
38
38
|
def get_antivirus()
|
39
|
-
|
39
|
+
api_path = '/health/anti-virus'
|
40
40
|
|
41
|
-
|
41
|
+
api_params = {
|
42
42
|
}
|
43
43
|
|
44
|
-
|
44
|
+
api_headers = {
|
45
45
|
"content-type": 'application/json',
|
46
46
|
}
|
47
47
|
|
48
48
|
@client.call(
|
49
49
|
method: 'GET',
|
50
|
-
path:
|
51
|
-
headers:
|
52
|
-
params:
|
50
|
+
path: api_path,
|
51
|
+
headers: api_headers,
|
52
|
+
params: api_params,
|
53
53
|
response_type: Models::HealthAntivirus
|
54
54
|
)
|
55
55
|
end
|
56
56
|
|
57
57
|
|
58
|
-
# Check the Appwrite in-memory cache
|
58
|
+
# Check the Appwrite in-memory cache servers are up and connection is
|
59
59
|
# successful.
|
60
60
|
#
|
61
61
|
#
|
62
62
|
# @return [HealthStatus]
|
63
63
|
def get_cache()
|
64
|
-
|
64
|
+
api_path = '/health/cache'
|
65
65
|
|
66
|
-
|
66
|
+
api_params = {
|
67
67
|
}
|
68
68
|
|
69
|
-
|
69
|
+
api_headers = {
|
70
70
|
"content-type": 'application/json',
|
71
71
|
}
|
72
72
|
|
73
73
|
@client.call(
|
74
74
|
method: 'GET',
|
75
|
-
path:
|
76
|
-
headers:
|
77
|
-
params:
|
75
|
+
path: api_path,
|
76
|
+
headers: api_headers,
|
77
|
+
params: api_params,
|
78
78
|
response_type: Models::HealthStatus
|
79
79
|
)
|
80
80
|
end
|
81
81
|
|
82
82
|
|
83
|
-
# Check the Appwrite database
|
83
|
+
# Check the Appwrite database servers are up and connection is successful.
|
84
84
|
#
|
85
85
|
#
|
86
86
|
# @return [HealthStatus]
|
87
87
|
def get_db()
|
88
|
-
|
88
|
+
api_path = '/health/db'
|
89
89
|
|
90
|
-
|
90
|
+
api_params = {
|
91
91
|
}
|
92
92
|
|
93
|
-
|
93
|
+
api_headers = {
|
94
94
|
"content-type": 'application/json',
|
95
95
|
}
|
96
96
|
|
97
97
|
@client.call(
|
98
98
|
method: 'GET',
|
99
|
-
path:
|
100
|
-
headers:
|
101
|
-
params:
|
99
|
+
path: api_path,
|
100
|
+
headers: api_headers,
|
101
|
+
params: api_params,
|
102
|
+
response_type: Models::HealthStatus
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
# Check the Appwrite pub-sub servers are up and connection is successful.
|
108
|
+
#
|
109
|
+
#
|
110
|
+
# @return [HealthStatus]
|
111
|
+
def get_pub_sub()
|
112
|
+
api_path = '/health/pubsub'
|
113
|
+
|
114
|
+
api_params = {
|
115
|
+
}
|
116
|
+
|
117
|
+
api_headers = {
|
118
|
+
"content-type": 'application/json',
|
119
|
+
}
|
120
|
+
|
121
|
+
@client.call(
|
122
|
+
method: 'GET',
|
123
|
+
path: api_path,
|
124
|
+
headers: api_headers,
|
125
|
+
params: api_params,
|
126
|
+
response_type: Models::HealthStatus
|
127
|
+
)
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
# Check the Appwrite queue messaging servers are up and connection is
|
132
|
+
# successful.
|
133
|
+
#
|
134
|
+
#
|
135
|
+
# @return [HealthStatus]
|
136
|
+
def get_queue()
|
137
|
+
api_path = '/health/queue'
|
138
|
+
|
139
|
+
api_params = {
|
140
|
+
}
|
141
|
+
|
142
|
+
api_headers = {
|
143
|
+
"content-type": 'application/json',
|
144
|
+
}
|
145
|
+
|
146
|
+
@client.call(
|
147
|
+
method: 'GET',
|
148
|
+
path: api_path,
|
149
|
+
headers: api_headers,
|
150
|
+
params: api_params,
|
102
151
|
response_type: Models::HealthStatus
|
103
152
|
)
|
104
153
|
end
|
@@ -111,20 +160,20 @@ module Appwrite
|
|
111
160
|
#
|
112
161
|
# @return [HealthQueue]
|
113
162
|
def get_queue_certificates()
|
114
|
-
|
163
|
+
api_path = '/health/queue/certificates'
|
115
164
|
|
116
|
-
|
165
|
+
api_params = {
|
117
166
|
}
|
118
167
|
|
119
|
-
|
168
|
+
api_headers = {
|
120
169
|
"content-type": 'application/json',
|
121
170
|
}
|
122
171
|
|
123
172
|
@client.call(
|
124
173
|
method: 'GET',
|
125
|
-
path:
|
126
|
-
headers:
|
127
|
-
params:
|
174
|
+
path: api_path,
|
175
|
+
headers: api_headers,
|
176
|
+
params: api_params,
|
128
177
|
response_type: Models::HealthQueue
|
129
178
|
)
|
130
179
|
end
|
@@ -135,20 +184,20 @@ module Appwrite
|
|
135
184
|
#
|
136
185
|
# @return [HealthQueue]
|
137
186
|
def get_queue_functions()
|
138
|
-
|
187
|
+
api_path = '/health/queue/functions'
|
139
188
|
|
140
|
-
|
189
|
+
api_params = {
|
141
190
|
}
|
142
191
|
|
143
|
-
|
192
|
+
api_headers = {
|
144
193
|
"content-type": 'application/json',
|
145
194
|
}
|
146
195
|
|
147
196
|
@client.call(
|
148
197
|
method: 'GET',
|
149
|
-
path:
|
150
|
-
headers:
|
151
|
-
params:
|
198
|
+
path: api_path,
|
199
|
+
headers: api_headers,
|
200
|
+
params: api_params,
|
152
201
|
response_type: Models::HealthQueue
|
153
202
|
)
|
154
203
|
end
|
@@ -160,20 +209,20 @@ module Appwrite
|
|
160
209
|
#
|
161
210
|
# @return [HealthQueue]
|
162
211
|
def get_queue_logs()
|
163
|
-
|
212
|
+
api_path = '/health/queue/logs'
|
164
213
|
|
165
|
-
|
214
|
+
api_params = {
|
166
215
|
}
|
167
216
|
|
168
|
-
|
217
|
+
api_headers = {
|
169
218
|
"content-type": 'application/json',
|
170
219
|
}
|
171
220
|
|
172
221
|
@client.call(
|
173
222
|
method: 'GET',
|
174
|
-
path:
|
175
|
-
headers:
|
176
|
-
params:
|
223
|
+
path: api_path,
|
224
|
+
headers: api_headers,
|
225
|
+
params: api_params,
|
177
226
|
response_type: Models::HealthQueue
|
178
227
|
)
|
179
228
|
end
|
@@ -185,20 +234,20 @@ module Appwrite
|
|
185
234
|
#
|
186
235
|
# @return [HealthQueue]
|
187
236
|
def get_queue_webhooks()
|
188
|
-
|
237
|
+
api_path = '/health/queue/webhooks'
|
189
238
|
|
190
|
-
|
239
|
+
api_params = {
|
191
240
|
}
|
192
241
|
|
193
|
-
|
242
|
+
api_headers = {
|
194
243
|
"content-type": 'application/json',
|
195
244
|
}
|
196
245
|
|
197
246
|
@client.call(
|
198
247
|
method: 'GET',
|
199
|
-
path:
|
200
|
-
headers:
|
201
|
-
params:
|
248
|
+
path: api_path,
|
249
|
+
headers: api_headers,
|
250
|
+
params: api_params,
|
202
251
|
response_type: Models::HealthQueue
|
203
252
|
)
|
204
253
|
end
|
@@ -209,20 +258,20 @@ module Appwrite
|
|
209
258
|
#
|
210
259
|
# @return [HealthStatus]
|
211
260
|
def get_storage_local()
|
212
|
-
|
261
|
+
api_path = '/health/storage/local'
|
213
262
|
|
214
|
-
|
263
|
+
api_params = {
|
215
264
|
}
|
216
265
|
|
217
|
-
|
266
|
+
api_headers = {
|
218
267
|
"content-type": 'application/json',
|
219
268
|
}
|
220
269
|
|
221
270
|
@client.call(
|
222
271
|
method: 'GET',
|
223
|
-
path:
|
224
|
-
headers:
|
225
|
-
params:
|
272
|
+
path: api_path,
|
273
|
+
headers: api_headers,
|
274
|
+
params: api_params,
|
226
275
|
response_type: Models::HealthStatus
|
227
276
|
)
|
228
277
|
end
|
@@ -239,20 +288,20 @@ module Appwrite
|
|
239
288
|
#
|
240
289
|
# @return [HealthTime]
|
241
290
|
def get_time()
|
242
|
-
|
291
|
+
api_path = '/health/time'
|
243
292
|
|
244
|
-
|
293
|
+
api_params = {
|
245
294
|
}
|
246
295
|
|
247
|
-
|
296
|
+
api_headers = {
|
248
297
|
"content-type": 'application/json',
|
249
298
|
}
|
250
299
|
|
251
300
|
@client.call(
|
252
301
|
method: 'GET',
|
253
|
-
path:
|
254
|
-
headers:
|
255
|
-
params:
|
302
|
+
path: api_path,
|
303
|
+
headers: api_headers,
|
304
|
+
params: api_params,
|
256
305
|
response_type: Models::HealthTime
|
257
306
|
)
|
258
307
|
end
|
@@ -17,45 +17,70 @@ module Appwrite
|
|
17
17
|
#
|
18
18
|
# @return [Locale]
|
19
19
|
def get()
|
20
|
-
|
20
|
+
api_path = '/locale'
|
21
21
|
|
22
|
-
|
22
|
+
api_params = {
|
23
23
|
}
|
24
24
|
|
25
|
-
|
25
|
+
api_headers = {
|
26
26
|
"content-type": 'application/json',
|
27
27
|
}
|
28
28
|
|
29
29
|
@client.call(
|
30
30
|
method: 'GET',
|
31
|
-
path:
|
32
|
-
headers:
|
33
|
-
params:
|
31
|
+
path: api_path,
|
32
|
+
headers: api_headers,
|
33
|
+
params: api_params,
|
34
34
|
response_type: Models::Locale
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
38
|
|
39
|
+
# List of all locale codes in [ISO
|
40
|
+
# 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
41
|
+
#
|
42
|
+
#
|
43
|
+
# @return [LocaleCodeList]
|
44
|
+
def list_codes()
|
45
|
+
api_path = '/locale/codes'
|
46
|
+
|
47
|
+
api_params = {
|
48
|
+
}
|
49
|
+
|
50
|
+
api_headers = {
|
51
|
+
"content-type": 'application/json',
|
52
|
+
}
|
53
|
+
|
54
|
+
@client.call(
|
55
|
+
method: 'GET',
|
56
|
+
path: api_path,
|
57
|
+
headers: api_headers,
|
58
|
+
params: api_params,
|
59
|
+
response_type: Models::LocaleCodeList
|
60
|
+
)
|
61
|
+
end
|
62
|
+
|
63
|
+
|
39
64
|
# List of all continents. You can use the locale header to get the data in a
|
40
65
|
# supported language.
|
41
66
|
#
|
42
67
|
#
|
43
68
|
# @return [ContinentList]
|
44
69
|
def list_continents()
|
45
|
-
|
70
|
+
api_path = '/locale/continents'
|
46
71
|
|
47
|
-
|
72
|
+
api_params = {
|
48
73
|
}
|
49
74
|
|
50
|
-
|
75
|
+
api_headers = {
|
51
76
|
"content-type": 'application/json',
|
52
77
|
}
|
53
78
|
|
54
79
|
@client.call(
|
55
80
|
method: 'GET',
|
56
|
-
path:
|
57
|
-
headers:
|
58
|
-
params:
|
81
|
+
path: api_path,
|
82
|
+
headers: api_headers,
|
83
|
+
params: api_params,
|
59
84
|
response_type: Models::ContinentList
|
60
85
|
)
|
61
86
|
end
|
@@ -67,20 +92,20 @@ module Appwrite
|
|
67
92
|
#
|
68
93
|
# @return [CountryList]
|
69
94
|
def list_countries()
|
70
|
-
|
95
|
+
api_path = '/locale/countries'
|
71
96
|
|
72
|
-
|
97
|
+
api_params = {
|
73
98
|
}
|
74
99
|
|
75
|
-
|
100
|
+
api_headers = {
|
76
101
|
"content-type": 'application/json',
|
77
102
|
}
|
78
103
|
|
79
104
|
@client.call(
|
80
105
|
method: 'GET',
|
81
|
-
path:
|
82
|
-
headers:
|
83
|
-
params:
|
106
|
+
path: api_path,
|
107
|
+
headers: api_headers,
|
108
|
+
params: api_params,
|
84
109
|
response_type: Models::CountryList
|
85
110
|
)
|
86
111
|
end
|
@@ -92,20 +117,20 @@ module Appwrite
|
|
92
117
|
#
|
93
118
|
# @return [CountryList]
|
94
119
|
def list_countries_eu()
|
95
|
-
|
120
|
+
api_path = '/locale/countries/eu'
|
96
121
|
|
97
|
-
|
122
|
+
api_params = {
|
98
123
|
}
|
99
124
|
|
100
|
-
|
125
|
+
api_headers = {
|
101
126
|
"content-type": 'application/json',
|
102
127
|
}
|
103
128
|
|
104
129
|
@client.call(
|
105
130
|
method: 'GET',
|
106
|
-
path:
|
107
|
-
headers:
|
108
|
-
params:
|
131
|
+
path: api_path,
|
132
|
+
headers: api_headers,
|
133
|
+
params: api_params,
|
109
134
|
response_type: Models::CountryList
|
110
135
|
)
|
111
136
|
end
|
@@ -117,20 +142,20 @@ module Appwrite
|
|
117
142
|
#
|
118
143
|
# @return [PhoneList]
|
119
144
|
def list_countries_phones()
|
120
|
-
|
145
|
+
api_path = '/locale/countries/phones'
|
121
146
|
|
122
|
-
|
147
|
+
api_params = {
|
123
148
|
}
|
124
149
|
|
125
|
-
|
150
|
+
api_headers = {
|
126
151
|
"content-type": 'application/json',
|
127
152
|
}
|
128
153
|
|
129
154
|
@client.call(
|
130
155
|
method: 'GET',
|
131
|
-
path:
|
132
|
-
headers:
|
133
|
-
params:
|
156
|
+
path: api_path,
|
157
|
+
headers: api_headers,
|
158
|
+
params: api_params,
|
134
159
|
response_type: Models::PhoneList
|
135
160
|
)
|
136
161
|
end
|
@@ -143,20 +168,20 @@ module Appwrite
|
|
143
168
|
#
|
144
169
|
# @return [CurrencyList]
|
145
170
|
def list_currencies()
|
146
|
-
|
171
|
+
api_path = '/locale/currencies'
|
147
172
|
|
148
|
-
|
173
|
+
api_params = {
|
149
174
|
}
|
150
175
|
|
151
|
-
|
176
|
+
api_headers = {
|
152
177
|
"content-type": 'application/json',
|
153
178
|
}
|
154
179
|
|
155
180
|
@client.call(
|
156
181
|
method: 'GET',
|
157
|
-
path:
|
158
|
-
headers:
|
159
|
-
params:
|
182
|
+
path: api_path,
|
183
|
+
headers: api_headers,
|
184
|
+
params: api_params,
|
160
185
|
response_type: Models::CurrencyList
|
161
186
|
)
|
162
187
|
end
|
@@ -168,20 +193,20 @@ module Appwrite
|
|
168
193
|
#
|
169
194
|
# @return [LanguageList]
|
170
195
|
def list_languages()
|
171
|
-
|
196
|
+
api_path = '/locale/languages'
|
172
197
|
|
173
|
-
|
198
|
+
api_params = {
|
174
199
|
}
|
175
200
|
|
176
|
-
|
201
|
+
api_headers = {
|
177
202
|
"content-type": 'application/json',
|
178
203
|
}
|
179
204
|
|
180
205
|
@client.call(
|
181
206
|
method: 'GET',
|
182
|
-
path:
|
183
|
-
headers:
|
184
|
-
params:
|
207
|
+
path: api_path,
|
208
|
+
headers: api_headers,
|
209
|
+
params: api_params,
|
185
210
|
response_type: Models::LanguageList
|
186
211
|
)
|
187
212
|
end
|