appwrite 30.1.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c35d8e3c83824afd1e8d35c31bbbfdb33f310a134ff0afbe30fb057e381f2fd
4
- data.tar.gz: cdd1bc7c83964371ded48d9cfd0e5c90180f3800afee237a93a51b46355a9a77
3
+ metadata.gz: 601bdd8efcaeb72e627279eaba209d2a02d82f97e8b3bf23df456b3c3f18b1ed
4
+ data.tar.gz: b089b522b9fbc1e4e7cc2b1bcf5940e3329e072c7fda7cd65e3c1ce0cc02c710
5
5
  SHA512:
6
- metadata.gz: c79caca1aae3712262e673ec9783d45ff5b8ae0ebb228f6f72d16c7bb07560dc3175165b360e963e5a5ddab5b788a9b9deee8561e8474cccd22b6c78bcbfc3f6
7
- data.tar.gz: f33310aa668ff3bec30525a8d4c9056fb5578c52ae98976113aa2c36ad478f771f343284509b658242b41c454b35dc361bafd50599bce81ebd239eaad18d58c6
6
+ metadata.gz: 8ba045900879bfccd121a62f1fd976f0d9d676d7cd9a225f70b11007a66b77228bde3dea8cace3ff50f35a77ff7a28bb9f915ab1c96523d661bc6f2c1e95e71a
7
+ data.tar.gz: 94cdc3ed9ae3879a30b172b376d0698c23c9ee98e402859de2aeae8998be917b37c2430398b5d5258c1fea384737b1ceb60fca25b2bb7798da14d63b660d36a9
@@ -14,8 +14,8 @@ module Appwrite
14
14
  'x-sdk-name' => 'Ruby',
15
15
  'x-sdk-platform' => 'server',
16
16
  'x-sdk-language' => 'ruby',
17
- 'x-sdk-version' => '30.1.0',
18
- 'X-Appwrite-Response-Format' => '2.6.2'
17
+ 'x-sdk-version' => '30.2.0',
18
+ 'X-Appwrite-Response-Format' => '2.7.1'
19
19
  }
20
20
  @endpoint = 'https://cloud.appwrite.io/v1'
21
21
  @config = {}
@@ -102,6 +102,20 @@ module Appwrite
102
102
  self
103
103
  end
104
104
 
105
+ # Set Environment
106
+ #
107
+ # The ID of the project environment to act in, alongside the project ID. Used with Appwrite Cloud projects that have environments.
108
+ #
109
+ # @param [String] value The value to set for the Environment header
110
+ #
111
+ # @return [self]
112
+ def set_environment(value)
113
+ add_header('x-appwrite-environment', value)
114
+ @config['environment'] = value
115
+
116
+ self
117
+ end
118
+
105
119
  # Set Session
106
120
  #
107
121
  # The user session to authenticate with
@@ -37,6 +37,7 @@ module Appwrite
37
37
  PROJECT_VARIABLE = 'project-variable'
38
38
  PROJECT_PROTOCOLS = 'project-protocols'
39
39
  PROJECT_LABELS = 'project-labels'
40
+ PROJECT_PREFERENCES = 'project-preferences'
40
41
  PROJECT_SERVICES = 'project-services'
41
42
  PROJECT_EMAIL_TEMPLATE = 'project-email-template'
42
43
  PROJECT_ENVIRONMENT = 'project-environment'
@@ -43,6 +43,8 @@ module Appwrite
43
43
  TRADESHIFT = 'tradeshift'
44
44
  TRADESHIFTBOX = 'tradeshiftBox'
45
45
  TWITCH = 'twitch'
46
+ VIPPS = 'vipps'
47
+ VIPPSSANDBOX = 'vippsSandbox'
46
48
  WEBFLOW = 'webflow'
47
49
  WORDPRESS = 'wordpress'
48
50
  X = 'x'
@@ -89,6 +89,10 @@ module Appwrite
89
89
  RULES_WRITE = 'rules.write'
90
90
  WEBHOOKS_READ = 'webhooks.read'
91
91
  WEBHOOKS_WRITE = 'webhooks.write'
92
+ MONITORS_READ = 'monitors.read'
93
+ MONITORS_WRITE = 'monitors.write'
94
+ ALERTS_READ = 'alerts.read'
95
+ ALERTS_WRITE = 'alerts.write'
92
96
  LOCALE_READ = 'locale.read'
93
97
  AVATARS_READ = 'avatars.read'
94
98
  AVATARS_WRITE = 'avatars.write'
@@ -104,6 +108,8 @@ module Appwrite
104
108
  INSIGHTS_WRITE = 'insights.write'
105
109
  REPORTS_READ = 'reports.read'
106
110
  REPORTS_WRITE = 'reports.write'
111
+ REVIEWS_READ = 'reviews.read'
112
+ REVIEWS_WRITE = 'reviews.write'
107
113
  PRESENCES_READ = 'presences.read'
108
114
  PRESENCES_WRITE = 'presences.write'
109
115
  DEDICATEDDATABASES_EXECUTE = 'dedicatedDatabases.execute'
@@ -43,6 +43,8 @@ module Appwrite
43
43
  TRADESHIFT = 'tradeshift'
44
44
  TRADESHIFTBOX = 'tradeshiftBox'
45
45
  TWITCH = 'twitch'
46
+ VIPPS = 'vipps'
47
+ VIPPSSANDBOX = 'vippsSandbox'
46
48
  WEBFLOW = 'webflow'
47
49
  WORDPRESS = 'wordpress'
48
50
  X = 'x'
@@ -20,6 +20,7 @@ module Appwrite
20
20
  DENY_CORPORATE_EMAIL = 'deny-corporate-email'
21
21
  DENY_REALTIME_GUESTS = 'deny-realtime-guests'
22
22
  PASSKEY = 'passkey'
23
+ ACCOUNT_DEVICES = 'account-devices'
23
24
  end
24
25
  end
25
26
  end
@@ -32,6 +32,7 @@ module Appwrite
32
32
  attr_reader :hostname
33
33
  attr_reader :sdk
34
34
  attr_reader :sdk_version
35
+ attr_reader :reason
35
36
 
36
37
  def initialize(
37
38
  id:,
@@ -62,7 +63,8 @@ module Appwrite
62
63
  team_id:,
63
64
  hostname:,
64
65
  sdk:,
65
- sdk_version:
66
+ sdk_version:,
67
+ reason:
66
68
  )
67
69
  @id = id
68
70
  @actor_type = actor_type
@@ -93,10 +95,11 @@ module Appwrite
93
95
  @hostname = hostname
94
96
  @sdk = sdk
95
97
  @sdk_version = sdk_version
98
+ @reason = reason
96
99
  end
97
100
 
98
101
  def self.from(map:)
99
- map = { "$id" => "", "actorType" => "", "actorId" => "", "actorEmail" => "", "actorName" => "", "resourceParent" => "", "resourceType" => "", "resourceId" => "", "resource" => "", "event" => "", "userAgent" => "", "ip" => "", "mode" => "", "country" => "", "continentCode" => "", "city" => "", "subdivisions" => "", "isp" => "", "autonomousSystemNumber" => "", "autonomousSystemOrganization" => "", "connectionType" => "", "connectionUsageType" => "", "connectionOrganization" => "", "time" => "", "projectId" => "", "teamId" => "", "hostname" => "", "sdk" => "", "sdkVersion" => "" }.merge(map)
102
+ map = { "$id" => "", "actorType" => "", "actorId" => "", "actorEmail" => "", "actorName" => "", "resourceParent" => "", "resourceType" => "", "resourceId" => "", "resource" => "", "event" => "", "userAgent" => "", "ip" => "", "mode" => "", "country" => "", "continentCode" => "", "city" => "", "subdivisions" => "", "isp" => "", "autonomousSystemNumber" => "", "autonomousSystemOrganization" => "", "connectionType" => "", "connectionUsageType" => "", "connectionOrganization" => "", "time" => "", "projectId" => "", "teamId" => "", "hostname" => "", "sdk" => "", "sdkVersion" => "", "reason" => "" }.merge(map)
100
103
  ActivityEvent.new(
101
104
  id: map["$id"],
102
105
  actor_type: map["actorType"],
@@ -126,7 +129,8 @@ module Appwrite
126
129
  team_id: map["teamId"],
127
130
  hostname: map["hostname"],
128
131
  sdk: map["sdk"],
129
- sdk_version: map["sdkVersion"]
132
+ sdk_version: map["sdkVersion"],
133
+ reason: map["reason"]
130
134
  )
131
135
  end
132
136
 
@@ -160,7 +164,8 @@ module Appwrite
160
164
  "teamId": @team_id,
161
165
  "hostname": @hostname,
162
166
  "sdk": @sdk,
163
- "sdkVersion": @sdk_version
167
+ "sdkVersion": @sdk_version,
168
+ "reason": @reason
164
169
  }
165
170
  end
166
171
  end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Device
6
+ attr_reader :id
7
+ attr_reader :created_at
8
+ attr_reader :updated_at
9
+ attr_reader :expire
10
+ attr_reader :active_session_id
11
+ attr_reader :sessions
12
+ attr_reader :secret
13
+
14
+ def initialize(
15
+ id:,
16
+ created_at:,
17
+ updated_at:,
18
+ expire:,
19
+ active_session_id:,
20
+ sessions:,
21
+ secret:
22
+ )
23
+ @id = id
24
+ @created_at = created_at
25
+ @updated_at = updated_at
26
+ @expire = expire
27
+ @active_session_id = active_session_id
28
+ @sessions = sessions
29
+ @secret = secret
30
+ end
31
+
32
+ def self.from(map:)
33
+ map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "expire" => "", "activeSessionId" => "", "sessions" => [], "secret" => "" }.merge(map)
34
+ Device.new(
35
+ id: map["$id"],
36
+ created_at: map["$createdAt"],
37
+ updated_at: map["$updatedAt"],
38
+ expire: map["expire"],
39
+ active_session_id: map["activeSessionId"],
40
+ sessions: map["sessions"].map { |it| Session.from(map: it) },
41
+ secret: map["secret"]
42
+ )
43
+ end
44
+
45
+ def to_map
46
+ {
47
+ "$id": @id,
48
+ "$createdAt": @created_at,
49
+ "$updatedAt": @updated_at,
50
+ "expire": @expire,
51
+ "activeSessionId": @active_session_id,
52
+ "sessions": @sessions.map { |it| it.to_map },
53
+ "secret": @secret
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Environment
6
+ attr_reader :id
7
+ attr_reader :created_at
8
+ attr_reader :updated_at
9
+ attr_reader :project_id
10
+ attr_reader :name
11
+
12
+ def initialize(
13
+ id:,
14
+ created_at:,
15
+ updated_at:,
16
+ project_id:,
17
+ name:
18
+ )
19
+ @id = id
20
+ @created_at = created_at
21
+ @updated_at = updated_at
22
+ @project_id = project_id
23
+ @name = name
24
+ end
25
+
26
+ def self.from(map:)
27
+ map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "projectId" => "", "name" => "" }.merge(map)
28
+ Environment.new(
29
+ id: map["$id"],
30
+ created_at: map["$createdAt"],
31
+ updated_at: map["$updatedAt"],
32
+ project_id: map["projectId"],
33
+ name: map["name"]
34
+ )
35
+ end
36
+
37
+ def to_map
38
+ {
39
+ "$id": @id,
40
+ "$createdAt": @created_at,
41
+ "$updatedAt": @updated_at,
42
+ "projectId": @project_id,
43
+ "name": @name
44
+ }
45
+ end
46
+ end
47
+ end
48
+ end
@@ -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,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
@@ -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,