appwrite 30.0.1 → 30.2.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 +58 -24
- data/lib/appwrite/enums/appwrite_migration_resource.rb +47 -0
- data/lib/appwrite/enums/build_runtime.rb +4 -0
- data/lib/appwrite/enums/environment_resource.rb +40 -0
- data/lib/appwrite/enums/firebase_migration_resource.rb +16 -0
- data/lib/appwrite/enums/n_host_migration_resource.rb +17 -0
- data/lib/appwrite/enums/o_auth_provider.rb +2 -0
- data/lib/appwrite/enums/on_duplicate.rb +9 -0
- data/lib/appwrite/enums/project_key_scopes.rb +6 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -0
- data/lib/appwrite/enums/project_policy_id.rb +2 -0
- data/lib/appwrite/enums/runtime.rb +4 -0
- data/lib/appwrite/enums/supabase_migration_resource.rb +17 -0
- data/lib/appwrite/models/activity_event.rb +9 -4
- data/lib/appwrite/models/billing_plan.rb +15 -0
- data/lib/appwrite/models/device.rb +58 -0
- data/lib/appwrite/models/environment.rb +48 -0
- data/lib/appwrite/models/environment_list.rb +33 -0
- data/lib/appwrite/models/migration.rb +128 -0
- data/lib/appwrite/models/migration_list.rb +33 -0
- data/lib/appwrite/models/o_auth2_vipps.rb +43 -0
- data/lib/appwrite/models/organization.rb +16 -1
- data/lib/appwrite/models/policy_account_devices.rb +33 -0
- data/lib/appwrite/models/policy_deny_realtime_guests.rb +33 -0
- data/lib/appwrite/models/project.rb +10 -0
- data/lib/appwrite/models/proxy_rule.rb +11 -1
- data/lib/appwrite/models/session.rb +6 -1
- data/lib/appwrite/models/waf_rule_bypass.rb +8 -3
- data/lib/appwrite/models/waf_rule_challenge.rb +5 -0
- data/lib/appwrite/models/waf_rule_deny.rb +8 -3
- data/lib/appwrite/models/waf_rule_rate_limit.rb +5 -0
- data/lib/appwrite/models/waf_rule_redirect.rb +5 -0
- data/lib/appwrite/services/account.rb +175 -20
- data/lib/appwrite/services/activities.rb +1 -1
- data/lib/appwrite/services/advisor.rb +5 -5
- data/lib/appwrite/services/apps.rb +25 -25
- data/lib/appwrite/services/avatars.rb +3 -3
- data/lib/appwrite/services/backups.rb +6 -6
- data/lib/appwrite/services/databases.rb +157 -157
- data/lib/appwrite/services/documents_db.rb +63 -63
- data/lib/appwrite/services/domains.rb +77 -77
- data/lib/appwrite/services/functions.rb +33 -33
- data/lib/appwrite/services/messaging.rb +30 -30
- data/lib/appwrite/services/migrations.rb +653 -0
- data/lib/appwrite/services/mongo.rb +37 -37
- data/lib/appwrite/services/mysql.rb +40 -40
- data/lib/appwrite/services/oauth2.rb +14 -14
- data/lib/appwrite/services/organization.rb +17 -17
- data/lib/appwrite/services/postgresql.rb +44 -44
- data/lib/appwrite/services/presences.rb +4 -4
- data/lib/appwrite/services/project.rb +321 -47
- data/lib/appwrite/services/proxy.rb +157 -4
- data/lib/appwrite/services/sites.rb +32 -32
- data/lib/appwrite/services/storage.rb +19 -19
- data/lib/appwrite/services/tables_db.rb +169 -169
- data/lib/appwrite/services/teams.rb +23 -23
- data/lib/appwrite/services/tokens.rb +7 -7
- data/lib/appwrite/services/users.rb +50 -50
- data/lib/appwrite/services/vectors_db.rb +55 -55
- data/lib/appwrite/services/waf.rb +97 -45
- data/lib/appwrite/services/webhooks.rb +4 -4
- data/lib/appwrite.rb +17 -0
- metadata +17 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class EnvironmentList
|
|
6
|
+
attr_reader :total
|
|
7
|
+
attr_reader :environments
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
total:,
|
|
11
|
+
environments:
|
|
12
|
+
)
|
|
13
|
+
@total = total
|
|
14
|
+
@environments = environments
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
map = { "total" => 0, "environments" => [] }.merge(map)
|
|
19
|
+
EnvironmentList.new(
|
|
20
|
+
total: map["total"],
|
|
21
|
+
environments: map["environments"].map { |it| Environment.from(map: it) }
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_map
|
|
26
|
+
{
|
|
27
|
+
"total": @total,
|
|
28
|
+
"environments": @environments.map { |it| it.to_map }
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class Migration
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :updated_at
|
|
9
|
+
attr_reader :status
|
|
10
|
+
attr_reader :stage
|
|
11
|
+
attr_reader :source
|
|
12
|
+
attr_reader :destination
|
|
13
|
+
attr_reader :resources
|
|
14
|
+
attr_reader :resource_id
|
|
15
|
+
attr_reader :resource_internal_id
|
|
16
|
+
attr_reader :resource_type
|
|
17
|
+
attr_reader :parent_resource_id
|
|
18
|
+
attr_reader :parent_resource_internal_id
|
|
19
|
+
attr_reader :parent_resource_type
|
|
20
|
+
attr_reader :destination_resource_id
|
|
21
|
+
attr_reader :destination_resource_internal_id
|
|
22
|
+
attr_reader :destination_resource_type
|
|
23
|
+
attr_reader :status_counters
|
|
24
|
+
attr_reader :resource_data
|
|
25
|
+
attr_reader :errors
|
|
26
|
+
attr_reader :options
|
|
27
|
+
|
|
28
|
+
def initialize(
|
|
29
|
+
id:,
|
|
30
|
+
created_at:,
|
|
31
|
+
updated_at:,
|
|
32
|
+
status:,
|
|
33
|
+
stage:,
|
|
34
|
+
source:,
|
|
35
|
+
destination:,
|
|
36
|
+
resources:,
|
|
37
|
+
resource_id:,
|
|
38
|
+
resource_internal_id:,
|
|
39
|
+
resource_type:,
|
|
40
|
+
parent_resource_id:,
|
|
41
|
+
parent_resource_internal_id:,
|
|
42
|
+
parent_resource_type:,
|
|
43
|
+
destination_resource_id:,
|
|
44
|
+
destination_resource_internal_id:,
|
|
45
|
+
destination_resource_type:,
|
|
46
|
+
status_counters:,
|
|
47
|
+
resource_data:,
|
|
48
|
+
errors:,
|
|
49
|
+
options:
|
|
50
|
+
)
|
|
51
|
+
@id = id
|
|
52
|
+
@created_at = created_at
|
|
53
|
+
@updated_at = updated_at
|
|
54
|
+
@status = status
|
|
55
|
+
@stage = stage
|
|
56
|
+
@source = source
|
|
57
|
+
@destination = destination
|
|
58
|
+
@resources = resources
|
|
59
|
+
@resource_id = resource_id
|
|
60
|
+
@resource_internal_id = resource_internal_id
|
|
61
|
+
@resource_type = resource_type
|
|
62
|
+
@parent_resource_id = parent_resource_id
|
|
63
|
+
@parent_resource_internal_id = parent_resource_internal_id
|
|
64
|
+
@parent_resource_type = parent_resource_type
|
|
65
|
+
@destination_resource_id = destination_resource_id
|
|
66
|
+
@destination_resource_internal_id = destination_resource_internal_id
|
|
67
|
+
@destination_resource_type = destination_resource_type
|
|
68
|
+
@status_counters = status_counters
|
|
69
|
+
@resource_data = resource_data
|
|
70
|
+
@errors = errors
|
|
71
|
+
@options = options
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def self.from(map:)
|
|
75
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "status" => "", "stage" => "", "source" => "", "destination" => "Appwrite", "resources" => [], "resourceId" => "", "resourceInternalId" => "", "resourceType" => "", "parentResourceId" => "", "parentResourceInternalId" => "", "parentResourceType" => "", "destinationResourceId" => "", "destinationResourceInternalId" => "", "destinationResourceType" => "", "statusCounters" => {}, "resourceData" => [], "errors" => [], "options" => {} }.merge(map)
|
|
76
|
+
Migration.new(
|
|
77
|
+
id: map["$id"],
|
|
78
|
+
created_at: map["$createdAt"],
|
|
79
|
+
updated_at: map["$updatedAt"],
|
|
80
|
+
status: map["status"],
|
|
81
|
+
stage: map["stage"],
|
|
82
|
+
source: map["source"],
|
|
83
|
+
destination: map["destination"],
|
|
84
|
+
resources: map["resources"],
|
|
85
|
+
resource_id: map["resourceId"],
|
|
86
|
+
resource_internal_id: map["resourceInternalId"],
|
|
87
|
+
resource_type: map["resourceType"],
|
|
88
|
+
parent_resource_id: map["parentResourceId"],
|
|
89
|
+
parent_resource_internal_id: map["parentResourceInternalId"],
|
|
90
|
+
parent_resource_type: map["parentResourceType"],
|
|
91
|
+
destination_resource_id: map["destinationResourceId"],
|
|
92
|
+
destination_resource_internal_id: map["destinationResourceInternalId"],
|
|
93
|
+
destination_resource_type: map["destinationResourceType"],
|
|
94
|
+
status_counters: map["statusCounters"],
|
|
95
|
+
resource_data: map["resourceData"],
|
|
96
|
+
errors: map["errors"],
|
|
97
|
+
options: map["options"]
|
|
98
|
+
)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def to_map
|
|
102
|
+
{
|
|
103
|
+
"$id": @id,
|
|
104
|
+
"$createdAt": @created_at,
|
|
105
|
+
"$updatedAt": @updated_at,
|
|
106
|
+
"status": @status,
|
|
107
|
+
"stage": @stage,
|
|
108
|
+
"source": @source,
|
|
109
|
+
"destination": @destination,
|
|
110
|
+
"resources": @resources,
|
|
111
|
+
"resourceId": @resource_id,
|
|
112
|
+
"resourceInternalId": @resource_internal_id,
|
|
113
|
+
"resourceType": @resource_type,
|
|
114
|
+
"parentResourceId": @parent_resource_id,
|
|
115
|
+
"parentResourceInternalId": @parent_resource_internal_id,
|
|
116
|
+
"parentResourceType": @parent_resource_type,
|
|
117
|
+
"destinationResourceId": @destination_resource_id,
|
|
118
|
+
"destinationResourceInternalId": @destination_resource_internal_id,
|
|
119
|
+
"destinationResourceType": @destination_resource_type,
|
|
120
|
+
"statusCounters": @status_counters,
|
|
121
|
+
"resourceData": @resource_data,
|
|
122
|
+
"errors": @errors,
|
|
123
|
+
"options": @options
|
|
124
|
+
}
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class MigrationList
|
|
6
|
+
attr_reader :total
|
|
7
|
+
attr_reader :migrations
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
total:,
|
|
11
|
+
migrations:
|
|
12
|
+
)
|
|
13
|
+
@total = total
|
|
14
|
+
@migrations = migrations
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
map = { "total" => 0, "migrations" => [] }.merge(map)
|
|
19
|
+
MigrationList.new(
|
|
20
|
+
total: map["total"],
|
|
21
|
+
migrations: map["migrations"].map { |it| Migration.from(map: it) }
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_map
|
|
26
|
+
{
|
|
27
|
+
"total": @total,
|
|
28
|
+
"migrations": @migrations.map { |it| it.to_map }
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Vipps
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
attr_reader :client_id
|
|
9
|
+
attr_reader :client_secret
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
id:,
|
|
13
|
+
enabled:,
|
|
14
|
+
client_id:,
|
|
15
|
+
client_secret:
|
|
16
|
+
)
|
|
17
|
+
@id = id
|
|
18
|
+
@enabled = enabled
|
|
19
|
+
@client_id = client_id
|
|
20
|
+
@client_secret = client_secret
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
map = { "$id" => "", "enabled" => false, "clientId" => "", "clientSecret" => "" }.merge(map)
|
|
25
|
+
OAuth2Vipps.new(
|
|
26
|
+
id: map["$id"],
|
|
27
|
+
enabled: map["enabled"],
|
|
28
|
+
client_id: map["clientId"],
|
|
29
|
+
client_secret: map["clientSecret"]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_map
|
|
34
|
+
{
|
|
35
|
+
"$id": @id,
|
|
36
|
+
"enabled": @enabled,
|
|
37
|
+
"clientId": @client_id,
|
|
38
|
+
"clientSecret": @client_secret
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -11,6 +11,8 @@ module Appwrite
|
|
|
11
11
|
attr_reader :prefs
|
|
12
12
|
attr_reader :billing_budget
|
|
13
13
|
attr_reader :budget_alerts
|
|
14
|
+
attr_reader :budget_notify
|
|
15
|
+
attr_reader :budget_critical
|
|
14
16
|
attr_reader :billing_plan
|
|
15
17
|
attr_reader :billing_plan_id
|
|
16
18
|
attr_reader :billing_plan_details
|
|
@@ -32,6 +34,7 @@ module Appwrite
|
|
|
32
34
|
attr_reader :program_manager_calendar
|
|
33
35
|
attr_reader :program_discord_channel_name
|
|
34
36
|
attr_reader :program_discord_channel_url
|
|
37
|
+
attr_reader :education_expires_at
|
|
35
38
|
attr_reader :billing_limits
|
|
36
39
|
attr_reader :billing_plan_downgrade
|
|
37
40
|
attr_reader :billing_tax_id
|
|
@@ -48,6 +51,8 @@ module Appwrite
|
|
|
48
51
|
prefs:,
|
|
49
52
|
billing_budget: nil,
|
|
50
53
|
budget_alerts:,
|
|
54
|
+
budget_notify:,
|
|
55
|
+
budget_critical:,
|
|
51
56
|
billing_plan:,
|
|
52
57
|
billing_plan_id:,
|
|
53
58
|
billing_plan_details:,
|
|
@@ -69,6 +74,7 @@ module Appwrite
|
|
|
69
74
|
program_manager_calendar: nil,
|
|
70
75
|
program_discord_channel_name: nil,
|
|
71
76
|
program_discord_channel_url: nil,
|
|
77
|
+
education_expires_at: nil,
|
|
72
78
|
billing_limits: nil,
|
|
73
79
|
billing_plan_downgrade: nil,
|
|
74
80
|
billing_tax_id: nil,
|
|
@@ -84,6 +90,8 @@ module Appwrite
|
|
|
84
90
|
@prefs = prefs
|
|
85
91
|
@billing_budget = billing_budget
|
|
86
92
|
@budget_alerts = budget_alerts
|
|
93
|
+
@budget_notify = budget_notify
|
|
94
|
+
@budget_critical = budget_critical
|
|
87
95
|
@billing_plan = billing_plan
|
|
88
96
|
@billing_plan_id = billing_plan_id
|
|
89
97
|
@billing_plan_details = billing_plan_details
|
|
@@ -105,6 +113,7 @@ module Appwrite
|
|
|
105
113
|
@program_manager_calendar = program_manager_calendar
|
|
106
114
|
@program_discord_channel_name = program_discord_channel_name
|
|
107
115
|
@program_discord_channel_url = program_discord_channel_url
|
|
116
|
+
@education_expires_at = education_expires_at
|
|
108
117
|
@billing_limits = billing_limits
|
|
109
118
|
@billing_plan_downgrade = billing_plan_downgrade
|
|
110
119
|
@billing_tax_id = billing_tax_id
|
|
@@ -114,7 +123,7 @@ module Appwrite
|
|
|
114
123
|
end
|
|
115
124
|
|
|
116
125
|
def self.from(map:)
|
|
117
|
-
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "total" => 0, "budgetAlerts" => [75], "billingPlan" => "tier-0", "billingPlanId" => "tier-0", "billingEmail" => "", "status" => "draft", "markedForDeletion" => false, "platform" => "appwrite", "projects" => [] }.merge(map)
|
|
126
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "total" => 0, "budgetAlerts" => [75], "budgetNotify" => ["owner", "billing"], "budgetCritical" => [], "billingPlan" => "tier-0", "billingPlanId" => "tier-0", "billingEmail" => "", "status" => "draft", "markedForDeletion" => false, "platform" => "appwrite", "projects" => [] }.merge(map)
|
|
118
127
|
Organization.new(
|
|
119
128
|
id: map["$id"],
|
|
120
129
|
created_at: map["$createdAt"],
|
|
@@ -124,6 +133,8 @@ module Appwrite
|
|
|
124
133
|
prefs: Preferences.from(map: map["prefs"]),
|
|
125
134
|
billing_budget: map["billingBudget"],
|
|
126
135
|
budget_alerts: map["budgetAlerts"],
|
|
136
|
+
budget_notify: map["budgetNotify"],
|
|
137
|
+
budget_critical: map["budgetCritical"],
|
|
127
138
|
billing_plan: map["billingPlan"],
|
|
128
139
|
billing_plan_id: map["billingPlanId"],
|
|
129
140
|
billing_plan_details: BillingPlan.from(map: map["billingPlanDetails"]),
|
|
@@ -145,6 +156,7 @@ module Appwrite
|
|
|
145
156
|
program_manager_calendar: map["programManagerCalendar"],
|
|
146
157
|
program_discord_channel_name: map["programDiscordChannelName"],
|
|
147
158
|
program_discord_channel_url: map["programDiscordChannelUrl"],
|
|
159
|
+
education_expires_at: map["educationExpiresAt"],
|
|
148
160
|
billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]),
|
|
149
161
|
billing_plan_downgrade: map["billingPlanDowngrade"],
|
|
150
162
|
billing_tax_id: map["billingTaxId"],
|
|
@@ -164,6 +176,8 @@ module Appwrite
|
|
|
164
176
|
"prefs": @prefs.to_map,
|
|
165
177
|
"billingBudget": @billing_budget,
|
|
166
178
|
"budgetAlerts": @budget_alerts,
|
|
179
|
+
"budgetNotify": @budget_notify,
|
|
180
|
+
"budgetCritical": @budget_critical,
|
|
167
181
|
"billingPlan": @billing_plan,
|
|
168
182
|
"billingPlanId": @billing_plan_id,
|
|
169
183
|
"billingPlanDetails": @billing_plan_details.to_map,
|
|
@@ -185,6 +199,7 @@ module Appwrite
|
|
|
185
199
|
"programManagerCalendar": @program_manager_calendar,
|
|
186
200
|
"programDiscordChannelName": @program_discord_channel_name,
|
|
187
201
|
"programDiscordChannelUrl": @program_discord_channel_url,
|
|
202
|
+
"educationExpiresAt": @education_expires_at,
|
|
188
203
|
"billingLimits": @billing_limits&.to_map,
|
|
189
204
|
"billingPlanDowngrade": @billing_plan_downgrade,
|
|
190
205
|
"billingTaxId": @billing_tax_id,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class PolicyAccountDevices
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
id:,
|
|
11
|
+
enabled:
|
|
12
|
+
)
|
|
13
|
+
@id = id
|
|
14
|
+
@enabled = enabled
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
map = { "$id" => "", "enabled" => true }.merge(map)
|
|
19
|
+
PolicyAccountDevices.new(
|
|
20
|
+
id: map["$id"],
|
|
21
|
+
enabled: map["enabled"]
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_map
|
|
26
|
+
{
|
|
27
|
+
"$id": @id,
|
|
28
|
+
"enabled": @enabled
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class PolicyDenyRealtimeGuests
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :enabled
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
id:,
|
|
11
|
+
enabled:
|
|
12
|
+
)
|
|
13
|
+
@id = id
|
|
14
|
+
@enabled = enabled
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
map = { "$id" => "", "enabled" => false }.merge(map)
|
|
19
|
+
PolicyDenyRealtimeGuests.new(
|
|
20
|
+
id: map["$id"],
|
|
21
|
+
enabled: map["enabled"]
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_map
|
|
26
|
+
{
|
|
27
|
+
"$id": @id,
|
|
28
|
+
"enabled": @enabled
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -22,6 +22,7 @@ module Appwrite
|
|
|
22
22
|
attr_reader :ping_count
|
|
23
23
|
attr_reader :pinged_at
|
|
24
24
|
attr_reader :labels
|
|
25
|
+
attr_reader :prefs
|
|
25
26
|
attr_reader :status
|
|
26
27
|
attr_reader :onboarding
|
|
27
28
|
attr_reader :auth_methods
|
|
@@ -31,6 +32,7 @@ module Appwrite
|
|
|
31
32
|
attr_reader :console_accessed_at
|
|
32
33
|
attr_reader :waf_enabled
|
|
33
34
|
attr_reader :parent_id
|
|
35
|
+
attr_reader :environment_id
|
|
34
36
|
attr_reader :billing_limits
|
|
35
37
|
attr_reader :first_accessed_at
|
|
36
38
|
attr_reader :mcp_accessed_at
|
|
@@ -72,6 +74,7 @@ module Appwrite
|
|
|
72
74
|
ping_count:,
|
|
73
75
|
pinged_at:,
|
|
74
76
|
labels:,
|
|
77
|
+
prefs: nil,
|
|
75
78
|
status:,
|
|
76
79
|
onboarding:,
|
|
77
80
|
auth_methods:,
|
|
@@ -81,6 +84,7 @@ module Appwrite
|
|
|
81
84
|
console_accessed_at:,
|
|
82
85
|
waf_enabled: false,
|
|
83
86
|
parent_id: nil,
|
|
87
|
+
environment_id: nil,
|
|
84
88
|
billing_limits: nil,
|
|
85
89
|
first_accessed_at: nil,
|
|
86
90
|
mcp_accessed_at: nil,
|
|
@@ -121,6 +125,7 @@ module Appwrite
|
|
|
121
125
|
@ping_count = ping_count
|
|
122
126
|
@pinged_at = pinged_at
|
|
123
127
|
@labels = labels
|
|
128
|
+
@prefs = prefs
|
|
124
129
|
@status = status
|
|
125
130
|
@onboarding = onboarding
|
|
126
131
|
@auth_methods = auth_methods
|
|
@@ -130,6 +135,7 @@ module Appwrite
|
|
|
130
135
|
@console_accessed_at = console_accessed_at
|
|
131
136
|
@waf_enabled = waf_enabled
|
|
132
137
|
@parent_id = parent_id
|
|
138
|
+
@environment_id = environment_id
|
|
133
139
|
@billing_limits = billing_limits
|
|
134
140
|
@first_accessed_at = first_accessed_at
|
|
135
141
|
@mcp_accessed_at = mcp_accessed_at
|
|
@@ -174,6 +180,7 @@ module Appwrite
|
|
|
174
180
|
ping_count: map["pingCount"],
|
|
175
181
|
pinged_at: map["pingedAt"],
|
|
176
182
|
labels: map["labels"],
|
|
183
|
+
prefs: map["prefs"].nil? ? nil : Preferences.from(map: map["prefs"]),
|
|
177
184
|
status: map["status"],
|
|
178
185
|
onboarding: map["onboarding"],
|
|
179
186
|
auth_methods: map["authMethods"].map { |it| ProjectAuthMethod.from(map: it) },
|
|
@@ -183,6 +190,7 @@ module Appwrite
|
|
|
183
190
|
console_accessed_at: map["consoleAccessedAt"],
|
|
184
191
|
waf_enabled: map["wafEnabled"],
|
|
185
192
|
parent_id: map["parentId"],
|
|
193
|
+
environment_id: map["environmentId"],
|
|
186
194
|
billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]),
|
|
187
195
|
first_accessed_at: map["firstAccessedAt"],
|
|
188
196
|
mcp_accessed_at: map["mcpAccessedAt"],
|
|
@@ -227,6 +235,7 @@ module Appwrite
|
|
|
227
235
|
"pingCount": @ping_count,
|
|
228
236
|
"pingedAt": @pinged_at,
|
|
229
237
|
"labels": @labels,
|
|
238
|
+
"prefs": @prefs&.to_map,
|
|
230
239
|
"status": @status,
|
|
231
240
|
"onboarding": @onboarding,
|
|
232
241
|
"authMethods": @auth_methods.map { |it| it.to_map },
|
|
@@ -236,6 +245,7 @@ module Appwrite
|
|
|
236
245
|
"consoleAccessedAt": @console_accessed_at,
|
|
237
246
|
"wafEnabled": @waf_enabled,
|
|
238
247
|
"parentId": @parent_id,
|
|
248
|
+
"environmentId": @environment_id,
|
|
239
249
|
"billingLimits": @billing_limits&.to_map,
|
|
240
250
|
"firstAccessedAt": @first_accessed_at,
|
|
241
251
|
"mcpAccessedAt": @mcp_accessed_at,
|
|
@@ -18,6 +18,8 @@ module Appwrite
|
|
|
18
18
|
attr_reader :status
|
|
19
19
|
attr_reader :logs
|
|
20
20
|
attr_reader :renew_at
|
|
21
|
+
attr_reader :expire_at
|
|
22
|
+
attr_reader :certificate_status
|
|
21
23
|
attr_reader :protocol
|
|
22
24
|
|
|
23
25
|
def initialize(
|
|
@@ -36,6 +38,8 @@ module Appwrite
|
|
|
36
38
|
status:,
|
|
37
39
|
logs:,
|
|
38
40
|
renew_at:,
|
|
41
|
+
expire_at:,
|
|
42
|
+
certificate_status:,
|
|
39
43
|
protocol:
|
|
40
44
|
)
|
|
41
45
|
@id = id
|
|
@@ -53,11 +57,13 @@ module Appwrite
|
|
|
53
57
|
@status = validate_status(status)
|
|
54
58
|
@logs = logs
|
|
55
59
|
@renew_at = renew_at
|
|
60
|
+
@expire_at = expire_at
|
|
61
|
+
@certificate_status = certificate_status
|
|
56
62
|
@protocol = validate_protocol(protocol)
|
|
57
63
|
end
|
|
58
64
|
|
|
59
65
|
def self.from(map:)
|
|
60
|
-
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "domain" => "", "type" => "", "trigger" => "", "redirectUrl" => "", "redirectStatusCode" => 301, "deploymentId" => "", "deploymentResourceId" => "", "deploymentVcsProviderBranch" => "", "status" => "unverified", "logs" => "", "protocol" => "http" }.merge(map)
|
|
66
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "domain" => "", "type" => "", "trigger" => "", "redirectUrl" => "", "redirectStatusCode" => 301, "deploymentId" => "", "deploymentResourceId" => "", "deploymentVcsProviderBranch" => "", "status" => "unverified", "logs" => "", "expireAt" => "", "certificateStatus" => "", "protocol" => "http" }.merge(map)
|
|
61
67
|
ProxyRule.new(
|
|
62
68
|
id: map["$id"],
|
|
63
69
|
created_at: map["$createdAt"],
|
|
@@ -74,6 +80,8 @@ module Appwrite
|
|
|
74
80
|
status: map["status"],
|
|
75
81
|
logs: map["logs"],
|
|
76
82
|
renew_at: map["renewAt"],
|
|
83
|
+
expire_at: map["expireAt"],
|
|
84
|
+
certificate_status: map["certificateStatus"],
|
|
77
85
|
protocol: map["protocol"]
|
|
78
86
|
)
|
|
79
87
|
end
|
|
@@ -95,6 +103,8 @@ module Appwrite
|
|
|
95
103
|
"status": @status,
|
|
96
104
|
"logs": @logs,
|
|
97
105
|
"renewAt": @renew_at,
|
|
106
|
+
"expireAt": @expire_at,
|
|
107
|
+
"certificateStatus": @certificate_status,
|
|
98
108
|
"protocol": @protocol
|
|
99
109
|
}
|
|
100
110
|
end
|
|
@@ -7,6 +7,7 @@ module Appwrite
|
|
|
7
7
|
attr_reader :created_at
|
|
8
8
|
attr_reader :updated_at
|
|
9
9
|
attr_reader :user_id
|
|
10
|
+
attr_reader :user_name
|
|
10
11
|
attr_reader :expire
|
|
11
12
|
attr_reader :provider
|
|
12
13
|
attr_reader :provider_uid
|
|
@@ -38,6 +39,7 @@ module Appwrite
|
|
|
38
39
|
created_at:,
|
|
39
40
|
updated_at:,
|
|
40
41
|
user_id:,
|
|
42
|
+
user_name:,
|
|
41
43
|
expire:,
|
|
42
44
|
provider:,
|
|
43
45
|
provider_uid:,
|
|
@@ -68,6 +70,7 @@ module Appwrite
|
|
|
68
70
|
@created_at = created_at
|
|
69
71
|
@updated_at = updated_at
|
|
70
72
|
@user_id = user_id
|
|
73
|
+
@user_name = user_name
|
|
71
74
|
@expire = expire
|
|
72
75
|
@provider = provider
|
|
73
76
|
@provider_uid = provider_uid
|
|
@@ -96,12 +99,13 @@ module Appwrite
|
|
|
96
99
|
end
|
|
97
100
|
|
|
98
101
|
def self.from(map:)
|
|
99
|
-
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "userId" => "", "expire" => "", "provider" => "", "providerUid" => "", "providerAccessToken" => "", "providerAccessTokenExpiry" => "", "providerRefreshToken" => "", "ip" => "", "osCode" => "", "osName" => "", "osVersion" => "", "clientType" => "", "clientCode" => "", "clientName" => "", "clientVersion" => "", "clientEngine" => "", "clientEngineVersion" => "", "deviceName" => "", "deviceBrand" => "", "deviceModel" => "", "countryCode" => "", "countryName" => "", "current" => false, "factors" => [], "secret" => "", "mfaUpdatedAt" => "" }.merge(map)
|
|
102
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "userId" => "", "userName" => "", "expire" => "", "provider" => "", "providerUid" => "", "providerAccessToken" => "", "providerAccessTokenExpiry" => "", "providerRefreshToken" => "", "ip" => "", "osCode" => "", "osName" => "", "osVersion" => "", "clientType" => "", "clientCode" => "", "clientName" => "", "clientVersion" => "", "clientEngine" => "", "clientEngineVersion" => "", "deviceName" => "", "deviceBrand" => "", "deviceModel" => "", "countryCode" => "", "countryName" => "", "current" => false, "factors" => [], "secret" => "", "mfaUpdatedAt" => "" }.merge(map)
|
|
100
103
|
Session.new(
|
|
101
104
|
id: map["$id"],
|
|
102
105
|
created_at: map["$createdAt"],
|
|
103
106
|
updated_at: map["$updatedAt"],
|
|
104
107
|
user_id: map["userId"],
|
|
108
|
+
user_name: map["userName"],
|
|
105
109
|
expire: map["expire"],
|
|
106
110
|
provider: map["provider"],
|
|
107
111
|
provider_uid: map["providerUid"],
|
|
@@ -136,6 +140,7 @@ module Appwrite
|
|
|
136
140
|
"$createdAt": @created_at,
|
|
137
141
|
"$updatedAt": @updated_at,
|
|
138
142
|
"userId": @user_id,
|
|
143
|
+
"userName": @user_name,
|
|
139
144
|
"expire": @expire,
|
|
140
145
|
"provider": @provider,
|
|
141
146
|
"providerUid": @provider_uid,
|
|
@@ -17,6 +17,7 @@ module Appwrite
|
|
|
17
17
|
attr_reader :enabled
|
|
18
18
|
attr_reader :conditions
|
|
19
19
|
attr_reader :config
|
|
20
|
+
attr_reader :schedule
|
|
20
21
|
|
|
21
22
|
def initialize(
|
|
22
23
|
id:,
|
|
@@ -32,7 +33,8 @@ module Appwrite
|
|
|
32
33
|
priority:,
|
|
33
34
|
enabled:,
|
|
34
35
|
conditions:,
|
|
35
|
-
config
|
|
36
|
+
config:,
|
|
37
|
+
schedule: nil
|
|
36
38
|
)
|
|
37
39
|
@id = id
|
|
38
40
|
@created_at = created_at
|
|
@@ -48,6 +50,7 @@ module Appwrite
|
|
|
48
50
|
@enabled = enabled
|
|
49
51
|
@conditions = conditions
|
|
50
52
|
@config = config
|
|
53
|
+
@schedule = schedule
|
|
51
54
|
end
|
|
52
55
|
|
|
53
56
|
def self.from(map:)
|
|
@@ -66,7 +69,8 @@ module Appwrite
|
|
|
66
69
|
priority: map["priority"],
|
|
67
70
|
enabled: map["enabled"],
|
|
68
71
|
conditions: map["conditions"],
|
|
69
|
-
config: map["config"]
|
|
72
|
+
config: map["config"],
|
|
73
|
+
schedule: map["schedule"]
|
|
70
74
|
)
|
|
71
75
|
end
|
|
72
76
|
|
|
@@ -85,7 +89,8 @@ module Appwrite
|
|
|
85
89
|
"priority": @priority,
|
|
86
90
|
"enabled": @enabled,
|
|
87
91
|
"conditions": @conditions,
|
|
88
|
-
"config": @config
|
|
92
|
+
"config": @config,
|
|
93
|
+
"schedule": @schedule
|
|
89
94
|
}
|
|
90
95
|
end
|
|
91
96
|
|
|
@@ -17,6 +17,7 @@ module Appwrite
|
|
|
17
17
|
attr_reader :enabled
|
|
18
18
|
attr_reader :conditions
|
|
19
19
|
attr_reader :config
|
|
20
|
+
attr_reader :schedule
|
|
20
21
|
attr_reader :challenge_type
|
|
21
22
|
attr_reader :difficulty
|
|
22
23
|
attr_reader :ttl
|
|
@@ -36,6 +37,7 @@ module Appwrite
|
|
|
36
37
|
enabled:,
|
|
37
38
|
conditions:,
|
|
38
39
|
config:,
|
|
40
|
+
schedule: nil,
|
|
39
41
|
challenge_type:,
|
|
40
42
|
difficulty:,
|
|
41
43
|
ttl:
|
|
@@ -54,6 +56,7 @@ module Appwrite
|
|
|
54
56
|
@enabled = enabled
|
|
55
57
|
@conditions = conditions
|
|
56
58
|
@config = config
|
|
59
|
+
@schedule = schedule
|
|
57
60
|
@challenge_type = challenge_type
|
|
58
61
|
@difficulty = difficulty
|
|
59
62
|
@ttl = ttl
|
|
@@ -76,6 +79,7 @@ module Appwrite
|
|
|
76
79
|
enabled: map["enabled"],
|
|
77
80
|
conditions: map["conditions"],
|
|
78
81
|
config: map["config"],
|
|
82
|
+
schedule: map["schedule"],
|
|
79
83
|
challenge_type: map["challengeType"],
|
|
80
84
|
difficulty: map["difficulty"],
|
|
81
85
|
ttl: map["ttl"]
|
|
@@ -98,6 +102,7 @@ module Appwrite
|
|
|
98
102
|
"enabled": @enabled,
|
|
99
103
|
"conditions": @conditions,
|
|
100
104
|
"config": @config,
|
|
105
|
+
"schedule": @schedule,
|
|
101
106
|
"challengeType": @challenge_type,
|
|
102
107
|
"difficulty": @difficulty,
|
|
103
108
|
"ttl": @ttl
|