appwrite 25.1.0 → 26.0.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.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +18 -4
- data/lib/appwrite/enums/billing_plan_group.rb +9 -0
- data/lib/appwrite/enums/database_status.rb +9 -0
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth_provider.rb +1 -0
- data/lib/appwrite/enums/organization_key_scopes.rb +4 -0
- data/lib/appwrite/enums/project_key_scopes.rb +7 -2
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +1 -0
- data/lib/appwrite/enums/project_policy_id.rb +1 -0
- data/lib/appwrite/enums/project_service_id.rb +1 -0
- data/lib/appwrite/models/activity_event.rb +3 -73
- data/lib/appwrite/models/additional_resource.rb +52 -0
- data/lib/appwrite/models/backup_policy.rb +5 -0
- data/lib/appwrite/models/billing_plan.rb +379 -0
- data/lib/appwrite/models/billing_plan_addon.rb +32 -0
- data/lib/appwrite/models/billing_plan_addon_details.rb +62 -0
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +117 -0
- data/lib/appwrite/models/billing_plan_limits.rb +32 -0
- data/lib/appwrite/models/billing_plan_supported_addons.rb +37 -0
- data/lib/appwrite/models/block.rb +5 -0
- data/lib/appwrite/models/database.rb +19 -0
- data/lib/appwrite/models/locale.rb +58 -3
- data/lib/appwrite/models/membership.rb +5 -0
- data/lib/appwrite/models/o_auth2_appwrite.rb +42 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +13 -3
- data/lib/appwrite/models/organization.rb +197 -0
- data/lib/appwrite/models/policy_deny_corporate_email.rb +32 -0
- data/lib/appwrite/models/policy_membership_privacy.rb +8 -3
- data/lib/appwrite/models/program.rb +67 -0
- data/lib/appwrite/models/project.rb +46 -11
- data/lib/appwrite/models/usage_billing_plan.rb +77 -0
- data/lib/appwrite/models/user.rb +25 -0
- data/lib/appwrite/query.rb +13 -1
- data/lib/appwrite/services/account.rb +42 -1
- data/lib/appwrite/services/activities.rb +2 -0
- data/lib/appwrite/services/advisor.rb +4 -0
- data/lib/appwrite/services/avatars.rb +8 -0
- data/lib/appwrite/services/backups.rb +25 -1
- data/lib/appwrite/services/databases.rb +107 -0
- data/lib/appwrite/services/functions.rb +30 -4
- data/lib/appwrite/services/graphql.rb +2 -0
- data/lib/appwrite/services/locale.rb +8 -0
- data/lib/appwrite/services/messaging.rb +42 -136
- data/lib/appwrite/services/organization.rb +268 -3
- data/lib/appwrite/services/presences.rb +4 -0
- data/lib/appwrite/services/project.rb +190 -9
- data/lib/appwrite/services/proxy.rb +7 -0
- data/lib/appwrite/services/sites.rb +25 -1
- data/lib/appwrite/services/storage.rb +11 -0
- data/lib/appwrite/services/tables_db.rb +68 -1
- data/lib/appwrite/services/teams.rb +11 -0
- data/lib/appwrite/services/tokens.rb +4 -0
- data/lib/appwrite/services/users.rb +38 -1
- data/lib/appwrite/services/webhooks.rb +5 -0
- data/lib/appwrite.rb +16 -15
- metadata +18 -17
- data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
- data/lib/appwrite/enums/health_check_status.rb +0 -8
- data/lib/appwrite/enums/health_queue_name.rb +0 -19
- data/lib/appwrite/models/health_antivirus.rb +0 -49
- data/lib/appwrite/models/health_certificate.rb +0 -52
- data/lib/appwrite/models/health_queue.rb +0 -27
- data/lib/appwrite/models/health_status.rb +0 -53
- data/lib/appwrite/models/health_status_list.rb +0 -32
- data/lib/appwrite/models/health_time.rb +0 -37
- data/lib/appwrite/models/usage_event.rb +0 -72
- data/lib/appwrite/models/usage_event_list.rb +0 -32
- data/lib/appwrite/models/usage_gauge.rb +0 -47
- data/lib/appwrite/models/usage_gauge_list.rb +0 -32
- data/lib/appwrite/services/health.rb +0 -681
- data/lib/appwrite/services/usage.rb +0 -88
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a98589c4711b73704142a881aa5557531fe64568b384863acde2515b859b4d02
|
|
4
|
+
data.tar.gz: 30ad6133e6b2e48d8cf623feb89d599f716cba7734493334a54e5ee366891c93
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 90f23c7c48e5cb73cf9cf8404062cec4094673e79151b7f440ec657d84d72e363ee5523f8e8cc472a1f9d764ed68c1656169dc5f8578f13994ae7f456598991a
|
|
7
|
+
data.tar.gz: 7f11755dbcf35959f7227cbba73131e21566d7f6c096633d1a9dd369afaf3a312a466dd8e239b80e567f8356cedeb2034d86cf2b44d38db4a23147b03bc8ce74
|
data/lib/appwrite/client.rb
CHANGED
|
@@ -15,7 +15,7 @@ module Appwrite
|
|
|
15
15
|
'x-sdk-name'=> 'Ruby',
|
|
16
16
|
'x-sdk-platform'=> 'server',
|
|
17
17
|
'x-sdk-language'=> 'ruby',
|
|
18
|
-
'x-sdk-version'=> '
|
|
18
|
+
'x-sdk-version'=> '26.0.0',
|
|
19
19
|
'X-Appwrite-Response-Format' => '1.9.5'
|
|
20
20
|
}
|
|
21
21
|
@endpoint = 'https://cloud.appwrite.io/v1'
|
|
@@ -63,6 +63,20 @@ module Appwrite
|
|
|
63
63
|
self
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
# Set Bearer
|
|
67
|
+
#
|
|
68
|
+
# The OAuth access token to authenticate with
|
|
69
|
+
#
|
|
70
|
+
# @param [String] value The value to set for the Bearer header
|
|
71
|
+
#
|
|
72
|
+
# @return [self]
|
|
73
|
+
def set_bearer(value)
|
|
74
|
+
add_header('authorization', "Bearer #{value}")
|
|
75
|
+
@config['bearer'] = value
|
|
76
|
+
|
|
77
|
+
self
|
|
78
|
+
end
|
|
79
|
+
|
|
66
80
|
# Set Locale
|
|
67
81
|
#
|
|
68
82
|
# @param [String] value The value to set for the Locale header
|
|
@@ -133,7 +147,7 @@ module Appwrite
|
|
|
133
147
|
|
|
134
148
|
# Set ImpersonateUserId
|
|
135
149
|
#
|
|
136
|
-
# Impersonate a user by ID
|
|
150
|
+
# Impersonate a user by ID
|
|
137
151
|
#
|
|
138
152
|
# @param [String] value The value to set for the ImpersonateUserId header
|
|
139
153
|
#
|
|
@@ -147,7 +161,7 @@ module Appwrite
|
|
|
147
161
|
|
|
148
162
|
# Set ImpersonateUserEmail
|
|
149
163
|
#
|
|
150
|
-
# Impersonate a user by email
|
|
164
|
+
# Impersonate a user by email
|
|
151
165
|
#
|
|
152
166
|
# @param [String] value The value to set for the ImpersonateUserEmail header
|
|
153
167
|
#
|
|
@@ -161,7 +175,7 @@ module Appwrite
|
|
|
161
175
|
|
|
162
176
|
# Set ImpersonateUserPhone
|
|
163
177
|
#
|
|
164
|
-
# Impersonate a user by phone
|
|
178
|
+
# Impersonate a user by phone
|
|
165
179
|
#
|
|
166
180
|
# @param [String] value The value to set for the ImpersonateUserPhone header
|
|
167
181
|
#
|
|
@@ -7,6 +7,10 @@ module Appwrite
|
|
|
7
7
|
DEVKEYS_WRITE = 'devKeys.write'
|
|
8
8
|
ORGANIZATION_KEYS_READ = 'organization.keys.read'
|
|
9
9
|
ORGANIZATION_KEYS_WRITE = 'organization.keys.write'
|
|
10
|
+
ORGANIZATION_MEMBERSHIPS_READ = 'organization.memberships.read'
|
|
11
|
+
ORGANIZATION_MEMBERSHIPS_WRITE = 'organization.memberships.write'
|
|
12
|
+
ORGANIZATION_READ = 'organization.read'
|
|
13
|
+
ORGANIZATION_WRITE = 'organization.write'
|
|
10
14
|
DOMAINS_READ = 'domains.read'
|
|
11
15
|
DOMAINS_WRITE = 'domains.write'
|
|
12
16
|
KEYS_READ = 'keys.read'
|
|
@@ -13,10 +13,12 @@ module Appwrite
|
|
|
13
13
|
POLICIES_WRITE = 'policies.write'
|
|
14
14
|
PROJECT_POLICIES_READ = 'project.policies.read'
|
|
15
15
|
PROJECT_POLICIES_WRITE = 'project.policies.write'
|
|
16
|
+
PROJECT_OAUTH2_READ = 'project.oauth2.read'
|
|
17
|
+
PROJECT_OAUTH2_WRITE = 'project.oauth2.write'
|
|
16
18
|
TEMPLATES_READ = 'templates.read'
|
|
17
19
|
TEMPLATES_WRITE = 'templates.write'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
STAGES_READ = 'stages.read'
|
|
21
|
+
STAGES_WRITE = 'stages.write'
|
|
20
22
|
USERS_READ = 'users.read'
|
|
21
23
|
USERS_WRITE = 'users.write'
|
|
22
24
|
SESSIONS_READ = 'sessions.read'
|
|
@@ -91,11 +93,14 @@ module Appwrite
|
|
|
91
93
|
ARCHIVES_WRITE = 'archives.write'
|
|
92
94
|
RESTORATIONS_READ = 'restorations.read'
|
|
93
95
|
RESTORATIONS_WRITE = 'restorations.write'
|
|
96
|
+
DEDICATEDDATABASES_EXECUTE = 'dedicatedDatabases.execute'
|
|
94
97
|
DOMAINS_READ = 'domains.read'
|
|
95
98
|
DOMAINS_WRITE = 'domains.write'
|
|
96
99
|
EVENTS_READ = 'events.read'
|
|
97
100
|
APPS_READ = 'apps.read'
|
|
98
101
|
APPS_WRITE = 'apps.write'
|
|
102
|
+
OAUTH2_READ = 'oauth2.read'
|
|
103
|
+
OAUTH2_WRITE = 'oauth2.write'
|
|
99
104
|
USAGE_READ = 'usage.read'
|
|
100
105
|
end
|
|
101
106
|
end
|
|
@@ -21,20 +21,6 @@ module Appwrite
|
|
|
21
21
|
attr_reader :project_id
|
|
22
22
|
attr_reader :team_id
|
|
23
23
|
attr_reader :hostname
|
|
24
|
-
attr_reader :os_code
|
|
25
|
-
attr_reader :os_name
|
|
26
|
-
attr_reader :os_version
|
|
27
|
-
attr_reader :client_type
|
|
28
|
-
attr_reader :client_code
|
|
29
|
-
attr_reader :client_name
|
|
30
|
-
attr_reader :client_version
|
|
31
|
-
attr_reader :client_engine
|
|
32
|
-
attr_reader :client_engine_version
|
|
33
|
-
attr_reader :device_name
|
|
34
|
-
attr_reader :device_brand
|
|
35
|
-
attr_reader :device_model
|
|
36
|
-
attr_reader :country_code
|
|
37
|
-
attr_reader :country_name
|
|
38
24
|
|
|
39
25
|
def initialize(
|
|
40
26
|
id:,
|
|
@@ -54,21 +40,7 @@ module Appwrite
|
|
|
54
40
|
time:,
|
|
55
41
|
project_id:,
|
|
56
42
|
team_id:,
|
|
57
|
-
hostname
|
|
58
|
-
os_code:,
|
|
59
|
-
os_name:,
|
|
60
|
-
os_version:,
|
|
61
|
-
client_type:,
|
|
62
|
-
client_code:,
|
|
63
|
-
client_name:,
|
|
64
|
-
client_version:,
|
|
65
|
-
client_engine:,
|
|
66
|
-
client_engine_version:,
|
|
67
|
-
device_name:,
|
|
68
|
-
device_brand:,
|
|
69
|
-
device_model:,
|
|
70
|
-
country_code:,
|
|
71
|
-
country_name:
|
|
43
|
+
hostname:
|
|
72
44
|
)
|
|
73
45
|
@id = id
|
|
74
46
|
@actor_type = actor_type
|
|
@@ -88,20 +60,6 @@ module Appwrite
|
|
|
88
60
|
@project_id = project_id
|
|
89
61
|
@team_id = team_id
|
|
90
62
|
@hostname = hostname
|
|
91
|
-
@os_code = os_code
|
|
92
|
-
@os_name = os_name
|
|
93
|
-
@os_version = os_version
|
|
94
|
-
@client_type = client_type
|
|
95
|
-
@client_code = client_code
|
|
96
|
-
@client_name = client_name
|
|
97
|
-
@client_version = client_version
|
|
98
|
-
@client_engine = client_engine
|
|
99
|
-
@client_engine_version = client_engine_version
|
|
100
|
-
@device_name = device_name
|
|
101
|
-
@device_brand = device_brand
|
|
102
|
-
@device_model = device_model
|
|
103
|
-
@country_code = country_code
|
|
104
|
-
@country_name = country_name
|
|
105
63
|
end
|
|
106
64
|
|
|
107
65
|
def self.from(map:)
|
|
@@ -123,21 +81,7 @@ module Appwrite
|
|
|
123
81
|
time: map["time"],
|
|
124
82
|
project_id: map["projectId"],
|
|
125
83
|
team_id: map["teamId"],
|
|
126
|
-
hostname: map["hostname"]
|
|
127
|
-
os_code: map["osCode"],
|
|
128
|
-
os_name: map["osName"],
|
|
129
|
-
os_version: map["osVersion"],
|
|
130
|
-
client_type: map["clientType"],
|
|
131
|
-
client_code: map["clientCode"],
|
|
132
|
-
client_name: map["clientName"],
|
|
133
|
-
client_version: map["clientVersion"],
|
|
134
|
-
client_engine: map["clientEngine"],
|
|
135
|
-
client_engine_version: map["clientEngineVersion"],
|
|
136
|
-
device_name: map["deviceName"],
|
|
137
|
-
device_brand: map["deviceBrand"],
|
|
138
|
-
device_model: map["deviceModel"],
|
|
139
|
-
country_code: map["countryCode"],
|
|
140
|
-
country_name: map["countryName"]
|
|
84
|
+
hostname: map["hostname"]
|
|
141
85
|
)
|
|
142
86
|
end
|
|
143
87
|
|
|
@@ -160,21 +104,7 @@ module Appwrite
|
|
|
160
104
|
"time": @time,
|
|
161
105
|
"projectId": @project_id,
|
|
162
106
|
"teamId": @team_id,
|
|
163
|
-
"hostname": @hostname
|
|
164
|
-
"osCode": @os_code,
|
|
165
|
-
"osName": @os_name,
|
|
166
|
-
"osVersion": @os_version,
|
|
167
|
-
"clientType": @client_type,
|
|
168
|
-
"clientCode": @client_code,
|
|
169
|
-
"clientName": @client_name,
|
|
170
|
-
"clientVersion": @client_version,
|
|
171
|
-
"clientEngine": @client_engine,
|
|
172
|
-
"clientEngineVersion": @client_engine_version,
|
|
173
|
-
"deviceName": @device_name,
|
|
174
|
-
"deviceBrand": @device_brand,
|
|
175
|
-
"deviceModel": @device_model,
|
|
176
|
-
"countryCode": @country_code,
|
|
177
|
-
"countryName": @country_name
|
|
107
|
+
"hostname": @hostname
|
|
178
108
|
}
|
|
179
109
|
end
|
|
180
110
|
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class AdditionalResource
|
|
6
|
+
attr_reader :name
|
|
7
|
+
attr_reader :unit
|
|
8
|
+
attr_reader :currency
|
|
9
|
+
attr_reader :price
|
|
10
|
+
attr_reader :value
|
|
11
|
+
attr_reader :invoice_desc
|
|
12
|
+
|
|
13
|
+
def initialize(
|
|
14
|
+
name:,
|
|
15
|
+
unit:,
|
|
16
|
+
currency:,
|
|
17
|
+
price:,
|
|
18
|
+
value:,
|
|
19
|
+
invoice_desc:
|
|
20
|
+
)
|
|
21
|
+
@name = name
|
|
22
|
+
@unit = unit
|
|
23
|
+
@currency = currency
|
|
24
|
+
@price = price
|
|
25
|
+
@value = value
|
|
26
|
+
@invoice_desc = invoice_desc
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from(map:)
|
|
30
|
+
AdditionalResource.new(
|
|
31
|
+
name: map["name"],
|
|
32
|
+
unit: map["unit"],
|
|
33
|
+
currency: map["currency"],
|
|
34
|
+
price: map["price"],
|
|
35
|
+
value: map["value"],
|
|
36
|
+
invoice_desc: map["invoiceDesc"]
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_map
|
|
41
|
+
{
|
|
42
|
+
"name": @name,
|
|
43
|
+
"unit": @unit,
|
|
44
|
+
"currency": @currency,
|
|
45
|
+
"price": @price,
|
|
46
|
+
"value": @value,
|
|
47
|
+
"invoiceDesc": @invoice_desc
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -13,6 +13,7 @@ module Appwrite
|
|
|
13
13
|
attr_reader :resource_type
|
|
14
14
|
attr_reader :retention
|
|
15
15
|
attr_reader :schedule
|
|
16
|
+
attr_reader :type
|
|
16
17
|
attr_reader :enabled
|
|
17
18
|
|
|
18
19
|
def initialize(
|
|
@@ -26,6 +27,7 @@ module Appwrite
|
|
|
26
27
|
resource_type: ,
|
|
27
28
|
retention:,
|
|
28
29
|
schedule:,
|
|
30
|
+
type:,
|
|
29
31
|
enabled:
|
|
30
32
|
)
|
|
31
33
|
@id = id
|
|
@@ -38,6 +40,7 @@ module Appwrite
|
|
|
38
40
|
@resource_type = resource_type
|
|
39
41
|
@retention = retention
|
|
40
42
|
@schedule = schedule
|
|
43
|
+
@type = type
|
|
41
44
|
@enabled = enabled
|
|
42
45
|
end
|
|
43
46
|
|
|
@@ -53,6 +56,7 @@ module Appwrite
|
|
|
53
56
|
resource_type: map["resourceType"],
|
|
54
57
|
retention: map["retention"],
|
|
55
58
|
schedule: map["schedule"],
|
|
59
|
+
type: map["type"],
|
|
56
60
|
enabled: map["enabled"]
|
|
57
61
|
)
|
|
58
62
|
end
|
|
@@ -69,6 +73,7 @@ module Appwrite
|
|
|
69
73
|
"resourceType": @resource_type,
|
|
70
74
|
"retention": @retention,
|
|
71
75
|
"schedule": @schedule,
|
|
76
|
+
"type": @type,
|
|
72
77
|
"enabled": @enabled
|
|
73
78
|
}
|
|
74
79
|
end
|