appwrite 26.0.0 → 27.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 +16 -2
- data/lib/appwrite/enums/authentication_factor.rb +1 -0
- data/lib/appwrite/enums/build_runtime.rb +1 -0
- data/lib/appwrite/enums/database_status.rb +11 -0
- data/lib/appwrite/enums/database_type.rb +3 -0
- data/lib/appwrite/enums/embedding_model.rb +10 -0
- data/lib/appwrite/enums/invalidation_type.rb +9 -0
- data/lib/appwrite/enums/organization_key_scopes.rb +2 -0
- data/lib/appwrite/enums/project_key_scopes.rb +5 -0
- data/lib/appwrite/enums/project_policy_id.rb +1 -0
- data/lib/appwrite/enums/runtime.rb +1 -0
- data/lib/appwrite/models/activity_event.rb +58 -3
- data/lib/appwrite/models/app.rb +152 -0
- data/lib/appwrite/models/app_installation.rb +72 -0
- data/lib/appwrite/models/app_installation_list.rb +32 -0
- data/lib/appwrite/models/app_key.rb +67 -0
- data/lib/appwrite/models/app_key_list.rb +32 -0
- data/lib/appwrite/models/app_scope.rb +47 -0
- data/lib/appwrite/models/app_scope_list.rb +32 -0
- data/lib/appwrite/models/app_secret.rb +67 -0
- data/lib/appwrite/models/app_secret_list.rb +32 -0
- data/lib/appwrite/models/app_secret_plaintext.rb +67 -0
- data/lib/appwrite/models/apps_list.rb +32 -0
- data/lib/appwrite/models/billing_plan.rb +9 -4
- data/lib/appwrite/models/billing_plan_addon.rb +6 -6
- data/lib/appwrite/models/billing_plan_addon_details.rb +1 -1
- data/lib/appwrite/models/database.rb +35 -6
- data/lib/appwrite/models/database_migration.rb +102 -0
- data/lib/appwrite/models/database_migration_list.rb +32 -0
- data/lib/appwrite/models/database_status.rb +92 -0
- data/lib/appwrite/models/database_status_connections.rb +32 -0
- data/lib/appwrite/models/database_status_replica.rb +42 -0
- data/lib/appwrite/models/database_status_volume.rb +42 -0
- data/lib/appwrite/models/dedicated_database.rb +262 -0
- data/lib/appwrite/models/dedicated_database_member.rb +42 -0
- data/lib/appwrite/models/dedicated_database_operation.rb +77 -0
- data/lib/appwrite/models/dedicated_database_operation_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +62 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +67 -0
- data/lib/appwrite/models/dedicated_database_specification_list.rb +37 -0
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +42 -0
- data/lib/appwrite/models/embedding.rb +42 -0
- data/lib/appwrite/models/embedding_list.rb +32 -0
- data/lib/appwrite/models/file.rb +10 -0
- data/lib/appwrite/models/mfa_challenge_secret.rb +47 -0
- data/lib/appwrite/models/mfa_factors.rb +8 -3
- data/lib/appwrite/models/oauth2_approve.rb +27 -0
- data/lib/appwrite/models/oauth2_authorize.rb +32 -0
- data/lib/appwrite/models/oauth2_consent.rb +72 -0
- data/lib/appwrite/models/oauth2_consent_list.rb +32 -0
- data/lib/appwrite/models/oauth2_consent_token.rb +77 -0
- data/lib/appwrite/models/oauth2_consent_token_list.rb +32 -0
- data/lib/appwrite/models/oauth2_device_authorization.rb +52 -0
- data/lib/appwrite/models/oauth2_grant.rb +82 -0
- data/lib/appwrite/models/oauth2_organization.rb +27 -0
- data/lib/appwrite/models/oauth2_organization_list.rb +32 -0
- data/lib/appwrite/models/oauth2_par.rb +32 -0
- data/lib/appwrite/models/oauth2_project.rb +37 -0
- data/lib/appwrite/models/oauth2_project_list.rb +32 -0
- data/lib/appwrite/models/oauth2_reject.rb +27 -0
- data/lib/appwrite/models/oauth2_token.rb +57 -0
- data/lib/appwrite/models/organization.rb +12 -12
- data/lib/appwrite/models/policy_mfa_factors.rb +47 -0
- data/lib/appwrite/models/project.rb +15 -0
- data/lib/appwrite/models/project_auth_method.rb +3 -3
- data/lib/appwrite/models/proxy_invalidation.rb +42 -0
- data/lib/appwrite/models/usage_billing_plan.rb +9 -9
- data/lib/appwrite/services/account.rb +210 -33
- data/lib/appwrite/services/activities.rb +1 -1
- data/lib/appwrite/services/apps.rb +855 -0
- data/lib/appwrite/services/backups.rb +31 -12
- data/lib/appwrite/services/databases.rb +4 -4
- data/lib/appwrite/services/embeddings.rb +48 -0
- data/lib/appwrite/services/functions.rb +1 -1
- data/lib/appwrite/services/oauth2.rb +525 -0
- data/lib/appwrite/services/organization.rb +168 -0
- data/lib/appwrite/services/project.rb +54 -57
- data/lib/appwrite/services/proxy.rb +44 -0
- data/lib/appwrite/services/sites.rb +4 -2
- data/lib/appwrite/services/storage.rb +4 -2
- data/lib/appwrite/services/tables_db.rb +378 -6
- data/lib/appwrite/services/teams.rb +198 -0
- data/lib/appwrite/services/users.rb +38 -0
- data/lib/appwrite.rb +50 -0
- metadata +52 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DatabaseStatus
|
|
6
|
+
attr_reader :health
|
|
7
|
+
attr_reader :ready
|
|
8
|
+
attr_reader :engine
|
|
9
|
+
attr_reader :version
|
|
10
|
+
attr_reader :uptime
|
|
11
|
+
attr_reader :connections
|
|
12
|
+
attr_reader :sync_mode
|
|
13
|
+
attr_reader :effective_sync_mode
|
|
14
|
+
attr_reader :sync_degraded
|
|
15
|
+
attr_reader :sync_acknowledgements
|
|
16
|
+
attr_reader :sync_standby_count
|
|
17
|
+
attr_reader :sync_state_confirmed
|
|
18
|
+
attr_reader :replicas
|
|
19
|
+
attr_reader :volumes
|
|
20
|
+
|
|
21
|
+
def initialize(
|
|
22
|
+
health:,
|
|
23
|
+
ready:,
|
|
24
|
+
engine:,
|
|
25
|
+
version:,
|
|
26
|
+
uptime:,
|
|
27
|
+
connections:,
|
|
28
|
+
sync_mode:,
|
|
29
|
+
effective_sync_mode: ,
|
|
30
|
+
sync_degraded:,
|
|
31
|
+
sync_acknowledgements:,
|
|
32
|
+
sync_standby_count:,
|
|
33
|
+
sync_state_confirmed: ,
|
|
34
|
+
replicas:,
|
|
35
|
+
volumes:
|
|
36
|
+
)
|
|
37
|
+
@health = health
|
|
38
|
+
@ready = ready
|
|
39
|
+
@engine = engine
|
|
40
|
+
@version = version
|
|
41
|
+
@uptime = uptime
|
|
42
|
+
@connections = connections
|
|
43
|
+
@sync_mode = sync_mode
|
|
44
|
+
@effective_sync_mode = effective_sync_mode
|
|
45
|
+
@sync_degraded = sync_degraded
|
|
46
|
+
@sync_acknowledgements = sync_acknowledgements
|
|
47
|
+
@sync_standby_count = sync_standby_count
|
|
48
|
+
@sync_state_confirmed = sync_state_confirmed
|
|
49
|
+
@replicas = replicas
|
|
50
|
+
@volumes = volumes
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.from(map:)
|
|
54
|
+
DatabaseStatus.new(
|
|
55
|
+
health: map["health"],
|
|
56
|
+
ready: map["ready"],
|
|
57
|
+
engine: map["engine"],
|
|
58
|
+
version: map["version"],
|
|
59
|
+
uptime: map["uptime"],
|
|
60
|
+
connections: DatabaseStatusConnections.from(map: map["connections"]),
|
|
61
|
+
sync_mode: map["syncMode"],
|
|
62
|
+
effective_sync_mode: map["effectiveSyncMode"],
|
|
63
|
+
sync_degraded: map["syncDegraded"],
|
|
64
|
+
sync_acknowledgements: map["syncAcknowledgements"],
|
|
65
|
+
sync_standby_count: map["syncStandbyCount"],
|
|
66
|
+
sync_state_confirmed: map["syncStateConfirmed"],
|
|
67
|
+
replicas: map["replicas"].map { |it| DatabaseStatusReplica.from(map: it) },
|
|
68
|
+
volumes: map["volumes"].map { |it| DatabaseStatusVolume.from(map: it) }
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def to_map
|
|
73
|
+
{
|
|
74
|
+
"health": @health,
|
|
75
|
+
"ready": @ready,
|
|
76
|
+
"engine": @engine,
|
|
77
|
+
"version": @version,
|
|
78
|
+
"uptime": @uptime,
|
|
79
|
+
"connections": @connections.to_map,
|
|
80
|
+
"syncMode": @sync_mode,
|
|
81
|
+
"effectiveSyncMode": @effective_sync_mode,
|
|
82
|
+
"syncDegraded": @sync_degraded,
|
|
83
|
+
"syncAcknowledgements": @sync_acknowledgements,
|
|
84
|
+
"syncStandbyCount": @sync_standby_count,
|
|
85
|
+
"syncStateConfirmed": @sync_state_confirmed,
|
|
86
|
+
"replicas": @replicas.map { |it| it.to_map },
|
|
87
|
+
"volumes": @volumes.map { |it| it.to_map }
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DatabaseStatusConnections
|
|
6
|
+
attr_reader :current
|
|
7
|
+
attr_reader :max
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
current:,
|
|
11
|
+
max:
|
|
12
|
+
)
|
|
13
|
+
@current = current
|
|
14
|
+
@max = max
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
DatabaseStatusConnections.new(
|
|
19
|
+
current: map["current"],
|
|
20
|
+
max: map["max"]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def to_map
|
|
25
|
+
{
|
|
26
|
+
"current": @current,
|
|
27
|
+
"max": @max
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DatabaseStatusReplica
|
|
6
|
+
attr_reader :index
|
|
7
|
+
attr_reader :role
|
|
8
|
+
attr_reader :healthy
|
|
9
|
+
attr_reader :lag_seconds
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
index:,
|
|
13
|
+
role:,
|
|
14
|
+
healthy:,
|
|
15
|
+
lag_seconds:
|
|
16
|
+
)
|
|
17
|
+
@index = index
|
|
18
|
+
@role = role
|
|
19
|
+
@healthy = healthy
|
|
20
|
+
@lag_seconds = lag_seconds
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
DatabaseStatusReplica.new(
|
|
25
|
+
index: map["index"],
|
|
26
|
+
role: map["role"],
|
|
27
|
+
healthy: map["healthy"],
|
|
28
|
+
lag_seconds: map["lagSeconds"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"index": @index,
|
|
35
|
+
"role": @role,
|
|
36
|
+
"healthy": @healthy,
|
|
37
|
+
"lagSeconds": @lag_seconds
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DatabaseStatusVolume
|
|
6
|
+
attr_reader :xpath
|
|
7
|
+
attr_reader :used_percent
|
|
8
|
+
attr_reader :available
|
|
9
|
+
attr_reader :mounted
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
xpath:,
|
|
13
|
+
used_percent:,
|
|
14
|
+
available:,
|
|
15
|
+
mounted:
|
|
16
|
+
)
|
|
17
|
+
@xpath = xpath
|
|
18
|
+
@used_percent = used_percent
|
|
19
|
+
@available = available
|
|
20
|
+
@mounted = mounted
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
DatabaseStatusVolume.new(
|
|
25
|
+
xpath: map["path"],
|
|
26
|
+
used_percent: map["usedPercent"],
|
|
27
|
+
available: map["available"],
|
|
28
|
+
mounted: map["mounted"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"path": @xpath,
|
|
35
|
+
"usedPercent": @used_percent,
|
|
36
|
+
"available": @available,
|
|
37
|
+
"mounted": @mounted
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DedicatedDatabase
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :updated_at
|
|
9
|
+
attr_reader :project_id
|
|
10
|
+
attr_reader :name
|
|
11
|
+
attr_reader :api
|
|
12
|
+
attr_reader :engine
|
|
13
|
+
attr_reader :version
|
|
14
|
+
attr_reader :specification
|
|
15
|
+
attr_reader :backend
|
|
16
|
+
attr_reader :hostname
|
|
17
|
+
attr_reader :connection_port
|
|
18
|
+
attr_reader :connection_user
|
|
19
|
+
attr_reader :connection_password
|
|
20
|
+
attr_reader :connection_string
|
|
21
|
+
attr_reader :ssl
|
|
22
|
+
attr_reader :status
|
|
23
|
+
attr_reader :container_status
|
|
24
|
+
attr_reader :last_accessed_at
|
|
25
|
+
attr_reader :idle_until
|
|
26
|
+
attr_reader :lifecycle_state
|
|
27
|
+
attr_reader :idle_timeout_minutes
|
|
28
|
+
attr_reader :cpu
|
|
29
|
+
attr_reader :memory
|
|
30
|
+
attr_reader :storage
|
|
31
|
+
attr_reader :storage_class
|
|
32
|
+
attr_reader :storage_max_gb
|
|
33
|
+
attr_reader :node_pool
|
|
34
|
+
attr_reader :replicas
|
|
35
|
+
attr_reader :sync_mode
|
|
36
|
+
attr_reader :network_max_connections
|
|
37
|
+
attr_reader :network_idle_timeout_seconds
|
|
38
|
+
attr_reader :network_ip_allowlist
|
|
39
|
+
attr_reader :backup_enabled
|
|
40
|
+
attr_reader :pitr
|
|
41
|
+
attr_reader :pitr_retention_days
|
|
42
|
+
attr_reader :storage_autoscaling
|
|
43
|
+
attr_reader :storage_autoscaling_threshold_percent
|
|
44
|
+
attr_reader :storage_autoscaling_max_gb
|
|
45
|
+
attr_reader :maintenance_window_day
|
|
46
|
+
attr_reader :maintenance_window_hour_utc
|
|
47
|
+
attr_reader :metrics_enabled
|
|
48
|
+
attr_reader :sql_api_enabled
|
|
49
|
+
attr_reader :sql_api_allowed_statements
|
|
50
|
+
attr_reader :sql_api_max_rows
|
|
51
|
+
attr_reader :sql_api_max_bytes
|
|
52
|
+
attr_reader :sql_api_timeout_seconds
|
|
53
|
+
attr_reader :error
|
|
54
|
+
|
|
55
|
+
def initialize(
|
|
56
|
+
id:,
|
|
57
|
+
created_at:,
|
|
58
|
+
updated_at:,
|
|
59
|
+
project_id:,
|
|
60
|
+
name:,
|
|
61
|
+
api:,
|
|
62
|
+
engine:,
|
|
63
|
+
version:,
|
|
64
|
+
specification:,
|
|
65
|
+
backend:,
|
|
66
|
+
hostname:,
|
|
67
|
+
connection_port:,
|
|
68
|
+
connection_user:,
|
|
69
|
+
connection_password:,
|
|
70
|
+
connection_string:,
|
|
71
|
+
ssl:,
|
|
72
|
+
status:,
|
|
73
|
+
container_status:,
|
|
74
|
+
last_accessed_at: ,
|
|
75
|
+
idle_until: ,
|
|
76
|
+
lifecycle_state:,
|
|
77
|
+
idle_timeout_minutes:,
|
|
78
|
+
cpu:,
|
|
79
|
+
memory:,
|
|
80
|
+
storage:,
|
|
81
|
+
storage_class:,
|
|
82
|
+
storage_max_gb:,
|
|
83
|
+
node_pool:,
|
|
84
|
+
replicas:,
|
|
85
|
+
sync_mode:,
|
|
86
|
+
network_max_connections:,
|
|
87
|
+
network_idle_timeout_seconds:,
|
|
88
|
+
network_ip_allowlist:,
|
|
89
|
+
backup_enabled:,
|
|
90
|
+
pitr:,
|
|
91
|
+
pitr_retention_days:,
|
|
92
|
+
storage_autoscaling:,
|
|
93
|
+
storage_autoscaling_threshold_percent:,
|
|
94
|
+
storage_autoscaling_max_gb:,
|
|
95
|
+
maintenance_window_day:,
|
|
96
|
+
maintenance_window_hour_utc:,
|
|
97
|
+
metrics_enabled:,
|
|
98
|
+
sql_api_enabled:,
|
|
99
|
+
sql_api_allowed_statements:,
|
|
100
|
+
sql_api_max_rows:,
|
|
101
|
+
sql_api_max_bytes:,
|
|
102
|
+
sql_api_timeout_seconds:,
|
|
103
|
+
error:
|
|
104
|
+
)
|
|
105
|
+
@id = id
|
|
106
|
+
@created_at = created_at
|
|
107
|
+
@updated_at = updated_at
|
|
108
|
+
@project_id = project_id
|
|
109
|
+
@name = name
|
|
110
|
+
@api = api
|
|
111
|
+
@engine = engine
|
|
112
|
+
@version = version
|
|
113
|
+
@specification = specification
|
|
114
|
+
@backend = backend
|
|
115
|
+
@hostname = hostname
|
|
116
|
+
@connection_port = connection_port
|
|
117
|
+
@connection_user = connection_user
|
|
118
|
+
@connection_password = connection_password
|
|
119
|
+
@connection_string = connection_string
|
|
120
|
+
@ssl = ssl
|
|
121
|
+
@status = status
|
|
122
|
+
@container_status = container_status
|
|
123
|
+
@last_accessed_at = last_accessed_at
|
|
124
|
+
@idle_until = idle_until
|
|
125
|
+
@lifecycle_state = lifecycle_state
|
|
126
|
+
@idle_timeout_minutes = idle_timeout_minutes
|
|
127
|
+
@cpu = cpu
|
|
128
|
+
@memory = memory
|
|
129
|
+
@storage = storage
|
|
130
|
+
@storage_class = storage_class
|
|
131
|
+
@storage_max_gb = storage_max_gb
|
|
132
|
+
@node_pool = node_pool
|
|
133
|
+
@replicas = replicas
|
|
134
|
+
@sync_mode = sync_mode
|
|
135
|
+
@network_max_connections = network_max_connections
|
|
136
|
+
@network_idle_timeout_seconds = network_idle_timeout_seconds
|
|
137
|
+
@network_ip_allowlist = network_ip_allowlist
|
|
138
|
+
@backup_enabled = backup_enabled
|
|
139
|
+
@pitr = pitr
|
|
140
|
+
@pitr_retention_days = pitr_retention_days
|
|
141
|
+
@storage_autoscaling = storage_autoscaling
|
|
142
|
+
@storage_autoscaling_threshold_percent = storage_autoscaling_threshold_percent
|
|
143
|
+
@storage_autoscaling_max_gb = storage_autoscaling_max_gb
|
|
144
|
+
@maintenance_window_day = maintenance_window_day
|
|
145
|
+
@maintenance_window_hour_utc = maintenance_window_hour_utc
|
|
146
|
+
@metrics_enabled = metrics_enabled
|
|
147
|
+
@sql_api_enabled = sql_api_enabled
|
|
148
|
+
@sql_api_allowed_statements = sql_api_allowed_statements
|
|
149
|
+
@sql_api_max_rows = sql_api_max_rows
|
|
150
|
+
@sql_api_max_bytes = sql_api_max_bytes
|
|
151
|
+
@sql_api_timeout_seconds = sql_api_timeout_seconds
|
|
152
|
+
@error = error
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def self.from(map:)
|
|
156
|
+
DedicatedDatabase.new(
|
|
157
|
+
id: map["$id"],
|
|
158
|
+
created_at: map["$createdAt"],
|
|
159
|
+
updated_at: map["$updatedAt"],
|
|
160
|
+
project_id: map["projectId"],
|
|
161
|
+
name: map["name"],
|
|
162
|
+
api: map["api"],
|
|
163
|
+
engine: map["engine"],
|
|
164
|
+
version: map["version"],
|
|
165
|
+
specification: map["specification"],
|
|
166
|
+
backend: map["backend"],
|
|
167
|
+
hostname: map["hostname"],
|
|
168
|
+
connection_port: map["connectionPort"],
|
|
169
|
+
connection_user: map["connectionUser"],
|
|
170
|
+
connection_password: map["connectionPassword"],
|
|
171
|
+
connection_string: map["connectionString"],
|
|
172
|
+
ssl: map["ssl"],
|
|
173
|
+
status: map["status"],
|
|
174
|
+
container_status: map["containerStatus"],
|
|
175
|
+
last_accessed_at: map["lastAccessedAt"],
|
|
176
|
+
idle_until: map["idleUntil"],
|
|
177
|
+
lifecycle_state: map["lifecycleState"],
|
|
178
|
+
idle_timeout_minutes: map["idleTimeoutMinutes"],
|
|
179
|
+
cpu: map["cpu"],
|
|
180
|
+
memory: map["memory"],
|
|
181
|
+
storage: map["storage"],
|
|
182
|
+
storage_class: map["storageClass"],
|
|
183
|
+
storage_max_gb: map["storageMaxGb"],
|
|
184
|
+
node_pool: map["nodePool"],
|
|
185
|
+
replicas: map["replicas"],
|
|
186
|
+
sync_mode: map["syncMode"],
|
|
187
|
+
network_max_connections: map["networkMaxConnections"],
|
|
188
|
+
network_idle_timeout_seconds: map["networkIdleTimeoutSeconds"],
|
|
189
|
+
network_ip_allowlist: map["networkIPAllowlist"],
|
|
190
|
+
backup_enabled: map["backupEnabled"],
|
|
191
|
+
pitr: map["pitr"],
|
|
192
|
+
pitr_retention_days: map["pitrRetentionDays"],
|
|
193
|
+
storage_autoscaling: map["storageAutoscaling"],
|
|
194
|
+
storage_autoscaling_threshold_percent: map["storageAutoscalingThresholdPercent"],
|
|
195
|
+
storage_autoscaling_max_gb: map["storageAutoscalingMaxGb"],
|
|
196
|
+
maintenance_window_day: map["maintenanceWindowDay"],
|
|
197
|
+
maintenance_window_hour_utc: map["maintenanceWindowHourUtc"],
|
|
198
|
+
metrics_enabled: map["metricsEnabled"],
|
|
199
|
+
sql_api_enabled: map["sqlApiEnabled"],
|
|
200
|
+
sql_api_allowed_statements: map["sqlApiAllowedStatements"],
|
|
201
|
+
sql_api_max_rows: map["sqlApiMaxRows"],
|
|
202
|
+
sql_api_max_bytes: map["sqlApiMaxBytes"],
|
|
203
|
+
sql_api_timeout_seconds: map["sqlApiTimeoutSeconds"],
|
|
204
|
+
error: map["error"]
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def to_map
|
|
209
|
+
{
|
|
210
|
+
"$id": @id,
|
|
211
|
+
"$createdAt": @created_at,
|
|
212
|
+
"$updatedAt": @updated_at,
|
|
213
|
+
"projectId": @project_id,
|
|
214
|
+
"name": @name,
|
|
215
|
+
"api": @api,
|
|
216
|
+
"engine": @engine,
|
|
217
|
+
"version": @version,
|
|
218
|
+
"specification": @specification,
|
|
219
|
+
"backend": @backend,
|
|
220
|
+
"hostname": @hostname,
|
|
221
|
+
"connectionPort": @connection_port,
|
|
222
|
+
"connectionUser": @connection_user,
|
|
223
|
+
"connectionPassword": @connection_password,
|
|
224
|
+
"connectionString": @connection_string,
|
|
225
|
+
"ssl": @ssl,
|
|
226
|
+
"status": @status,
|
|
227
|
+
"containerStatus": @container_status,
|
|
228
|
+
"lastAccessedAt": @last_accessed_at,
|
|
229
|
+
"idleUntil": @idle_until,
|
|
230
|
+
"lifecycleState": @lifecycle_state,
|
|
231
|
+
"idleTimeoutMinutes": @idle_timeout_minutes,
|
|
232
|
+
"cpu": @cpu,
|
|
233
|
+
"memory": @memory,
|
|
234
|
+
"storage": @storage,
|
|
235
|
+
"storageClass": @storage_class,
|
|
236
|
+
"storageMaxGb": @storage_max_gb,
|
|
237
|
+
"nodePool": @node_pool,
|
|
238
|
+
"replicas": @replicas,
|
|
239
|
+
"syncMode": @sync_mode,
|
|
240
|
+
"networkMaxConnections": @network_max_connections,
|
|
241
|
+
"networkIdleTimeoutSeconds": @network_idle_timeout_seconds,
|
|
242
|
+
"networkIPAllowlist": @network_ip_allowlist,
|
|
243
|
+
"backupEnabled": @backup_enabled,
|
|
244
|
+
"pitr": @pitr,
|
|
245
|
+
"pitrRetentionDays": @pitr_retention_days,
|
|
246
|
+
"storageAutoscaling": @storage_autoscaling,
|
|
247
|
+
"storageAutoscalingThresholdPercent": @storage_autoscaling_threshold_percent,
|
|
248
|
+
"storageAutoscalingMaxGb": @storage_autoscaling_max_gb,
|
|
249
|
+
"maintenanceWindowDay": @maintenance_window_day,
|
|
250
|
+
"maintenanceWindowHourUtc": @maintenance_window_hour_utc,
|
|
251
|
+
"metricsEnabled": @metrics_enabled,
|
|
252
|
+
"sqlApiEnabled": @sql_api_enabled,
|
|
253
|
+
"sqlApiAllowedStatements": @sql_api_allowed_statements,
|
|
254
|
+
"sqlApiMaxRows": @sql_api_max_rows,
|
|
255
|
+
"sqlApiMaxBytes": @sql_api_max_bytes,
|
|
256
|
+
"sqlApiTimeoutSeconds": @sql_api_timeout_seconds,
|
|
257
|
+
"error": @error
|
|
258
|
+
}
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DedicatedDatabaseMember
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :role
|
|
8
|
+
attr_reader :status
|
|
9
|
+
attr_reader :lag_seconds
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
role:,
|
|
14
|
+
status:,
|
|
15
|
+
lag_seconds:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@role = role
|
|
19
|
+
@status = status
|
|
20
|
+
@lag_seconds = lag_seconds
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
DedicatedDatabaseMember.new(
|
|
25
|
+
id: map["$id"],
|
|
26
|
+
role: map["role"],
|
|
27
|
+
status: map["status"],
|
|
28
|
+
lag_seconds: map["lagSeconds"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"$id": @id,
|
|
35
|
+
"role": @role,
|
|
36
|
+
"status": @status,
|
|
37
|
+
"lagSeconds": @lag_seconds
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DedicatedDatabaseOperation
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :database_id
|
|
9
|
+
attr_reader :type
|
|
10
|
+
attr_reader :status
|
|
11
|
+
attr_reader :attempts
|
|
12
|
+
attr_reader :requested_at
|
|
13
|
+
attr_reader :started_at
|
|
14
|
+
attr_reader :completed_at
|
|
15
|
+
attr_reader :error_code
|
|
16
|
+
attr_reader :error_message
|
|
17
|
+
|
|
18
|
+
def initialize(
|
|
19
|
+
id:,
|
|
20
|
+
created_at:,
|
|
21
|
+
database_id:,
|
|
22
|
+
type:,
|
|
23
|
+
status:,
|
|
24
|
+
attempts:,
|
|
25
|
+
requested_at: ,
|
|
26
|
+
started_at: ,
|
|
27
|
+
completed_at: ,
|
|
28
|
+
error_code:,
|
|
29
|
+
error_message:
|
|
30
|
+
)
|
|
31
|
+
@id = id
|
|
32
|
+
@created_at = created_at
|
|
33
|
+
@database_id = database_id
|
|
34
|
+
@type = type
|
|
35
|
+
@status = status
|
|
36
|
+
@attempts = attempts
|
|
37
|
+
@requested_at = requested_at
|
|
38
|
+
@started_at = started_at
|
|
39
|
+
@completed_at = completed_at
|
|
40
|
+
@error_code = error_code
|
|
41
|
+
@error_message = error_message
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def self.from(map:)
|
|
45
|
+
DedicatedDatabaseOperation.new(
|
|
46
|
+
id: map["$id"],
|
|
47
|
+
created_at: map["$createdAt"],
|
|
48
|
+
database_id: map["databaseId"],
|
|
49
|
+
type: map["type"],
|
|
50
|
+
status: map["status"],
|
|
51
|
+
attempts: map["attempts"],
|
|
52
|
+
requested_at: map["requestedAt"],
|
|
53
|
+
started_at: map["startedAt"],
|
|
54
|
+
completed_at: map["completedAt"],
|
|
55
|
+
error_code: map["errorCode"],
|
|
56
|
+
error_message: map["errorMessage"]
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def to_map
|
|
61
|
+
{
|
|
62
|
+
"$id": @id,
|
|
63
|
+
"$createdAt": @created_at,
|
|
64
|
+
"databaseId": @database_id,
|
|
65
|
+
"type": @type,
|
|
66
|
+
"status": @status,
|
|
67
|
+
"attempts": @attempts,
|
|
68
|
+
"requestedAt": @requested_at,
|
|
69
|
+
"startedAt": @started_at,
|
|
70
|
+
"completedAt": @completed_at,
|
|
71
|
+
"errorCode": @error_code,
|
|
72
|
+
"errorMessage": @error_message
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DedicatedDatabaseOperationList
|
|
6
|
+
attr_reader :total
|
|
7
|
+
attr_reader :operations
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
total:,
|
|
11
|
+
operations:
|
|
12
|
+
)
|
|
13
|
+
@total = total
|
|
14
|
+
@operations = operations
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
DedicatedDatabaseOperationList.new(
|
|
19
|
+
total: map["total"],
|
|
20
|
+
operations: map["operations"].map { |it| DedicatedDatabaseOperation.from(map: it) }
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def to_map
|
|
25
|
+
{
|
|
26
|
+
"total": @total,
|
|
27
|
+
"operations": @operations.map { |it| it.to_map }
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class DedicatedDatabaseReplicas
|
|
6
|
+
attr_reader :replicas
|
|
7
|
+
attr_reader :sync_mode
|
|
8
|
+
attr_reader :effective_sync_mode
|
|
9
|
+
attr_reader :sync_degraded
|
|
10
|
+
attr_reader :sync_acknowledgements
|
|
11
|
+
attr_reader :sync_standby_count
|
|
12
|
+
attr_reader :sync_state_confirmed
|
|
13
|
+
attr_reader :members
|
|
14
|
+
|
|
15
|
+
def initialize(
|
|
16
|
+
replicas:,
|
|
17
|
+
sync_mode:,
|
|
18
|
+
effective_sync_mode: ,
|
|
19
|
+
sync_degraded:,
|
|
20
|
+
sync_acknowledgements:,
|
|
21
|
+
sync_standby_count:,
|
|
22
|
+
sync_state_confirmed: ,
|
|
23
|
+
members:
|
|
24
|
+
)
|
|
25
|
+
@replicas = replicas
|
|
26
|
+
@sync_mode = sync_mode
|
|
27
|
+
@effective_sync_mode = effective_sync_mode
|
|
28
|
+
@sync_degraded = sync_degraded
|
|
29
|
+
@sync_acknowledgements = sync_acknowledgements
|
|
30
|
+
@sync_standby_count = sync_standby_count
|
|
31
|
+
@sync_state_confirmed = sync_state_confirmed
|
|
32
|
+
@members = members
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.from(map:)
|
|
36
|
+
DedicatedDatabaseReplicas.new(
|
|
37
|
+
replicas: map["replicas"],
|
|
38
|
+
sync_mode: map["syncMode"],
|
|
39
|
+
effective_sync_mode: map["effectiveSyncMode"],
|
|
40
|
+
sync_degraded: map["syncDegraded"],
|
|
41
|
+
sync_acknowledgements: map["syncAcknowledgements"],
|
|
42
|
+
sync_standby_count: map["syncStandbyCount"],
|
|
43
|
+
sync_state_confirmed: map["syncStateConfirmed"],
|
|
44
|
+
members: map["members"].map { |it| DedicatedDatabaseMember.from(map: it) }
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def to_map
|
|
49
|
+
{
|
|
50
|
+
"replicas": @replicas,
|
|
51
|
+
"syncMode": @sync_mode,
|
|
52
|
+
"effectiveSyncMode": @effective_sync_mode,
|
|
53
|
+
"syncDegraded": @sync_degraded,
|
|
54
|
+
"syncAcknowledgements": @sync_acknowledgements,
|
|
55
|
+
"syncStandbyCount": @sync_standby_count,
|
|
56
|
+
"syncStateConfirmed": @sync_state_confirmed,
|
|
57
|
+
"members": @members.map { |it| it.to_map }
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|