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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +18 -4
  3. data/lib/appwrite/enums/billing_plan_group.rb +9 -0
  4. data/lib/appwrite/enums/database_status.rb +9 -0
  5. data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +10 -0
  6. data/lib/appwrite/enums/o_auth_provider.rb +1 -0
  7. data/lib/appwrite/enums/organization_key_scopes.rb +4 -0
  8. data/lib/appwrite/enums/project_key_scopes.rb +7 -2
  9. data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +10 -0
  10. data/lib/appwrite/enums/project_o_auth_provider_id.rb +1 -0
  11. data/lib/appwrite/enums/project_policy_id.rb +1 -0
  12. data/lib/appwrite/enums/project_service_id.rb +1 -0
  13. data/lib/appwrite/models/activity_event.rb +3 -73
  14. data/lib/appwrite/models/additional_resource.rb +52 -0
  15. data/lib/appwrite/models/backup_policy.rb +5 -0
  16. data/lib/appwrite/models/billing_plan.rb +379 -0
  17. data/lib/appwrite/models/billing_plan_addon.rb +32 -0
  18. data/lib/appwrite/models/billing_plan_addon_details.rb +62 -0
  19. data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +117 -0
  20. data/lib/appwrite/models/billing_plan_limits.rb +32 -0
  21. data/lib/appwrite/models/billing_plan_supported_addons.rb +37 -0
  22. data/lib/appwrite/models/block.rb +5 -0
  23. data/lib/appwrite/models/database.rb +19 -0
  24. data/lib/appwrite/models/locale.rb +58 -3
  25. data/lib/appwrite/models/membership.rb +5 -0
  26. data/lib/appwrite/models/o_auth2_appwrite.rb +42 -0
  27. data/lib/appwrite/models/o_auth2_oidc.rb +13 -3
  28. data/lib/appwrite/models/organization.rb +197 -0
  29. data/lib/appwrite/models/policy_deny_corporate_email.rb +32 -0
  30. data/lib/appwrite/models/policy_membership_privacy.rb +8 -3
  31. data/lib/appwrite/models/program.rb +67 -0
  32. data/lib/appwrite/models/project.rb +46 -11
  33. data/lib/appwrite/models/usage_billing_plan.rb +77 -0
  34. data/lib/appwrite/models/user.rb +25 -0
  35. data/lib/appwrite/query.rb +13 -1
  36. data/lib/appwrite/services/account.rb +42 -1
  37. data/lib/appwrite/services/activities.rb +2 -0
  38. data/lib/appwrite/services/advisor.rb +4 -0
  39. data/lib/appwrite/services/avatars.rb +8 -0
  40. data/lib/appwrite/services/backups.rb +25 -1
  41. data/lib/appwrite/services/databases.rb +107 -0
  42. data/lib/appwrite/services/functions.rb +30 -4
  43. data/lib/appwrite/services/graphql.rb +2 -0
  44. data/lib/appwrite/services/locale.rb +8 -0
  45. data/lib/appwrite/services/messaging.rb +42 -136
  46. data/lib/appwrite/services/organization.rb +268 -3
  47. data/lib/appwrite/services/presences.rb +4 -0
  48. data/lib/appwrite/services/project.rb +190 -9
  49. data/lib/appwrite/services/proxy.rb +7 -0
  50. data/lib/appwrite/services/sites.rb +25 -1
  51. data/lib/appwrite/services/storage.rb +11 -0
  52. data/lib/appwrite/services/tables_db.rb +68 -1
  53. data/lib/appwrite/services/teams.rb +11 -0
  54. data/lib/appwrite/services/tokens.rb +4 -0
  55. data/lib/appwrite/services/users.rb +38 -1
  56. data/lib/appwrite/services/webhooks.rb +5 -0
  57. data/lib/appwrite.rb +16 -15
  58. metadata +18 -17
  59. data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
  60. data/lib/appwrite/enums/health_check_status.rb +0 -8
  61. data/lib/appwrite/enums/health_queue_name.rb +0 -19
  62. data/lib/appwrite/models/health_antivirus.rb +0 -49
  63. data/lib/appwrite/models/health_certificate.rb +0 -52
  64. data/lib/appwrite/models/health_queue.rb +0 -27
  65. data/lib/appwrite/models/health_status.rb +0 -53
  66. data/lib/appwrite/models/health_status_list.rb +0 -32
  67. data/lib/appwrite/models/health_time.rb +0 -37
  68. data/lib/appwrite/models/usage_event.rb +0 -72
  69. data/lib/appwrite/models/usage_event_list.rb +0 -32
  70. data/lib/appwrite/models/usage_gauge.rb +0 -47
  71. data/lib/appwrite/models/usage_gauge_list.rb +0 -32
  72. data/lib/appwrite/services/health.rb +0 -681
  73. data/lib/appwrite/services/usage.rb +0 -88
@@ -6,6 +6,7 @@ module Appwrite
6
6
  attr_reader :created_at
7
7
  attr_reader :resource_type
8
8
  attr_reader :resource_id
9
+ attr_reader :mode
9
10
  attr_reader :reason
10
11
  attr_reader :expired_at
11
12
  attr_reader :project_name
@@ -18,6 +19,7 @@ module Appwrite
18
19
  created_at:,
19
20
  resource_type:,
20
21
  resource_id:,
22
+ mode:,
21
23
  reason: ,
22
24
  expired_at: ,
23
25
  project_name:,
@@ -29,6 +31,7 @@ module Appwrite
29
31
  @created_at = created_at
30
32
  @resource_type = resource_type
31
33
  @resource_id = resource_id
34
+ @mode = mode
32
35
  @reason = reason
33
36
  @expired_at = expired_at
34
37
  @project_name = project_name
@@ -43,6 +46,7 @@ module Appwrite
43
46
  created_at: map["$createdAt"],
44
47
  resource_type: map["resourceType"],
45
48
  resource_id: map["resourceId"],
49
+ mode: map["mode"],
46
50
  reason: map["reason"],
47
51
  expired_at: map["expiredAt"],
48
52
  project_name: map["projectName"],
@@ -58,6 +62,7 @@ module Appwrite
58
62
  "$createdAt": @created_at,
59
63
  "resourceType": @resource_type,
60
64
  "resourceId": @resource_id,
65
+ "mode": @mode,
61
66
  "reason": @reason,
62
67
  "expiredAt": @expired_at,
63
68
  "projectName": @project_name,
@@ -9,6 +9,7 @@ module Appwrite
9
9
  attr_reader :updated_at
10
10
  attr_reader :enabled
11
11
  attr_reader :type
12
+ attr_reader :status
12
13
  attr_reader :policies
13
14
  attr_reader :archives
14
15
 
@@ -19,6 +20,7 @@ module Appwrite
19
20
  updated_at:,
20
21
  enabled:,
21
22
  type:,
23
+ status: ,
22
24
  policies:,
23
25
  archives:
24
26
  )
@@ -28,6 +30,7 @@ module Appwrite
28
30
  @updated_at = updated_at
29
31
  @enabled = enabled
30
32
  @type = validate_type(type)
33
+ @status = status.nil? ? status : validate_status(status)
31
34
  @policies = policies
32
35
  @archives = archives
33
36
  end
@@ -40,6 +43,7 @@ module Appwrite
40
43
  updated_at: map["$updatedAt"],
41
44
  enabled: map["enabled"],
42
45
  type: map["type"],
46
+ status: map["status"],
43
47
  policies: map["policies"].map { |it| BackupPolicy.from(map: it) },
44
48
  archives: map["archives"].map { |it| BackupArchive.from(map: it) }
45
49
  )
@@ -53,6 +57,7 @@ module Appwrite
53
57
  "$updatedAt": @updated_at,
54
58
  "enabled": @enabled,
55
59
  "type": @type,
60
+ "status": @status,
56
61
  "policies": @policies.map { |it| it.to_map },
57
62
  "archives": @archives.map { |it| it.to_map }
58
63
  }
@@ -75,6 +80,20 @@ module Appwrite
75
80
  type
76
81
  end
77
82
 
83
+ def validate_status(status)
84
+ valid_status = [
85
+ Appwrite::Enums::DatabaseStatus::PROVISIONING,
86
+ Appwrite::Enums::DatabaseStatus::READY,
87
+ Appwrite::Enums::DatabaseStatus::FAILED,
88
+ ]
89
+
90
+ unless valid_status.include?(status)
91
+ raise ArgumentError, "Invalid " + status + ". Must be one of: " + valid_status.join(', ')
92
+ end
93
+
94
+ status
95
+ end
96
+
78
97
  end
79
98
  end
80
99
  end
@@ -10,6 +10,17 @@ module Appwrite
10
10
  attr_reader :continent
11
11
  attr_reader :eu
12
12
  attr_reader :currency
13
+ attr_reader :city
14
+ attr_reader :time_zone
15
+ attr_reader :postal_code
16
+ attr_reader :latitude
17
+ attr_reader :longitude
18
+ attr_reader :autonomous_system_number
19
+ attr_reader :autonomous_system_organization
20
+ attr_reader :isp
21
+ attr_reader :connection_type
22
+ attr_reader :connection_usage_type
23
+ attr_reader :connection_organization
13
24
 
14
25
  def initialize(
15
26
  ip:,
@@ -18,7 +29,18 @@ module Appwrite
18
29
  continent_code:,
19
30
  continent:,
20
31
  eu:,
21
- currency:
32
+ currency:,
33
+ city: ,
34
+ time_zone: ,
35
+ postal_code: ,
36
+ latitude: ,
37
+ longitude: ,
38
+ autonomous_system_number: ,
39
+ autonomous_system_organization: ,
40
+ isp: ,
41
+ connection_type: ,
42
+ connection_usage_type: ,
43
+ connection_organization:
22
44
  )
23
45
  @ip = ip
24
46
  @country_code = country_code
@@ -27,6 +49,17 @@ module Appwrite
27
49
  @continent = continent
28
50
  @eu = eu
29
51
  @currency = currency
52
+ @city = city
53
+ @time_zone = time_zone
54
+ @postal_code = postal_code
55
+ @latitude = latitude
56
+ @longitude = longitude
57
+ @autonomous_system_number = autonomous_system_number
58
+ @autonomous_system_organization = autonomous_system_organization
59
+ @isp = isp
60
+ @connection_type = connection_type
61
+ @connection_usage_type = connection_usage_type
62
+ @connection_organization = connection_organization
30
63
  end
31
64
 
32
65
  def self.from(map:)
@@ -37,7 +70,18 @@ module Appwrite
37
70
  continent_code: map["continentCode"],
38
71
  continent: map["continent"],
39
72
  eu: map["eu"],
40
- currency: map["currency"]
73
+ currency: map["currency"],
74
+ city: map["city"],
75
+ time_zone: map["timeZone"],
76
+ postal_code: map["postalCode"],
77
+ latitude: map["latitude"],
78
+ longitude: map["longitude"],
79
+ autonomous_system_number: map["autonomousSystemNumber"],
80
+ autonomous_system_organization: map["autonomousSystemOrganization"],
81
+ isp: map["isp"],
82
+ connection_type: map["connectionType"],
83
+ connection_usage_type: map["connectionUsageType"],
84
+ connection_organization: map["connectionOrganization"]
41
85
  )
42
86
  end
43
87
 
@@ -49,7 +93,18 @@ module Appwrite
49
93
  "continentCode": @continent_code,
50
94
  "continent": @continent,
51
95
  "eu": @eu,
52
- "currency": @currency
96
+ "currency": @currency,
97
+ "city": @city,
98
+ "timeZone": @time_zone,
99
+ "postalCode": @postal_code,
100
+ "latitude": @latitude,
101
+ "longitude": @longitude,
102
+ "autonomousSystemNumber": @autonomous_system_number,
103
+ "autonomousSystemOrganization": @autonomous_system_organization,
104
+ "isp": @isp,
105
+ "connectionType": @connection_type,
106
+ "connectionUsageType": @connection_usage_type,
107
+ "connectionOrganization": @connection_organization
53
108
  }
54
109
  end
55
110
  end
@@ -16,6 +16,7 @@ module Appwrite
16
16
  attr_reader :joined
17
17
  attr_reader :confirm
18
18
  attr_reader :mfa
19
+ attr_reader :user_accessed_at
19
20
  attr_reader :roles
20
21
 
21
22
  def initialize(
@@ -32,6 +33,7 @@ module Appwrite
32
33
  joined:,
33
34
  confirm:,
34
35
  mfa:,
36
+ user_accessed_at:,
35
37
  roles:
36
38
  )
37
39
  @id = id
@@ -47,6 +49,7 @@ module Appwrite
47
49
  @joined = joined
48
50
  @confirm = confirm
49
51
  @mfa = mfa
52
+ @user_accessed_at = user_accessed_at
50
53
  @roles = roles
51
54
  end
52
55
 
@@ -65,6 +68,7 @@ module Appwrite
65
68
  joined: map["joined"],
66
69
  confirm: map["confirm"],
67
70
  mfa: map["mfa"],
71
+ user_accessed_at: map["userAccessedAt"],
68
72
  roles: map["roles"]
69
73
  )
70
74
  end
@@ -84,6 +88,7 @@ module Appwrite
84
88
  "joined": @joined,
85
89
  "confirm": @confirm,
86
90
  "mfa": @mfa,
91
+ "userAccessedAt": @user_accessed_at,
87
92
  "roles": @roles
88
93
  }
89
94
  end
@@ -0,0 +1,42 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class OAuth2Appwrite
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
+ OAuth2Appwrite.new(
25
+ id: map["$id"],
26
+ enabled: map["enabled"],
27
+ client_id: map["clientId"],
28
+ client_secret: map["clientSecret"]
29
+ )
30
+ end
31
+
32
+ def to_map
33
+ {
34
+ "$id": @id,
35
+ "enabled": @enabled,
36
+ "clientId": @client_id,
37
+ "clientSecret": @client_secret
38
+ }
39
+ end
40
+ end
41
+ end
42
+ end
@@ -11,6 +11,8 @@ module Appwrite
11
11
  attr_reader :authorization_url
12
12
  attr_reader :token_url
13
13
  attr_reader :user_info_url
14
+ attr_reader :prompt
15
+ attr_reader :max_age
14
16
 
15
17
  def initialize(
16
18
  id:,
@@ -20,7 +22,9 @@ module Appwrite
20
22
  well_known_url:,
21
23
  authorization_url:,
22
24
  token_url:,
23
- user_info_url:
25
+ user_info_url:,
26
+ prompt:,
27
+ max_age:
24
28
  )
25
29
  @id = id
26
30
  @enabled = enabled
@@ -30,6 +34,8 @@ module Appwrite
30
34
  @authorization_url = authorization_url
31
35
  @token_url = token_url
32
36
  @user_info_url = user_info_url
37
+ @prompt = prompt
38
+ @max_age = max_age
33
39
  end
34
40
 
35
41
  def self.from(map:)
@@ -41,7 +47,9 @@ module Appwrite
41
47
  well_known_url: map["wellKnownURL"],
42
48
  authorization_url: map["authorizationURL"],
43
49
  token_url: map["tokenURL"],
44
- user_info_url: map["userInfoURL"]
50
+ user_info_url: map["userInfoURL"],
51
+ prompt: map["prompt"],
52
+ max_age: map["maxAge"]
45
53
  )
46
54
  end
47
55
 
@@ -54,7 +62,9 @@ module Appwrite
54
62
  "wellKnownURL": @well_known_url,
55
63
  "authorizationURL": @authorization_url,
56
64
  "tokenURL": @token_url,
57
- "userInfoURL": @user_info_url
65
+ "userInfoURL": @user_info_url,
66
+ "prompt": @prompt,
67
+ "maxAge": @max_age
58
68
  }
59
69
  end
60
70
  end
@@ -0,0 +1,197 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Organization
6
+ attr_reader :id
7
+ attr_reader :created_at
8
+ attr_reader :updated_at
9
+ attr_reader :name
10
+ attr_reader :total
11
+ attr_reader :prefs
12
+ attr_reader :billing_budget
13
+ attr_reader :budget_alerts
14
+ attr_reader :billing_plan
15
+ attr_reader :billing_plan_id
16
+ attr_reader :billing_plan_details
17
+ attr_reader :billing_email
18
+ attr_reader :billing_start_date
19
+ attr_reader :billing_current_invoice_date
20
+ attr_reader :billing_next_invoice_date
21
+ attr_reader :billing_trial_start_date
22
+ attr_reader :billing_trial_days
23
+ attr_reader :billing_aggregation_id
24
+ attr_reader :billing_invoice_id
25
+ attr_reader :payment_method_id
26
+ attr_reader :billing_address_id
27
+ attr_reader :backup_payment_method_id
28
+ attr_reader :status
29
+ attr_reader :remarks
30
+ attr_reader :agreement_baa
31
+ attr_reader :program_manager_name
32
+ attr_reader :program_manager_calendar
33
+ attr_reader :program_discord_channel_name
34
+ attr_reader :program_discord_channel_url
35
+ attr_reader :billing_limits
36
+ attr_reader :billing_plan_downgrade
37
+ attr_reader :billing_tax_id
38
+ attr_reader :marked_for_deletion
39
+ attr_reader :platform
40
+ attr_reader :projects
41
+
42
+ def initialize(
43
+ id:,
44
+ created_at:,
45
+ updated_at:,
46
+ name:,
47
+ total:,
48
+ prefs:,
49
+ billing_budget:,
50
+ budget_alerts:,
51
+ billing_plan:,
52
+ billing_plan_id:,
53
+ billing_plan_details:,
54
+ billing_email:,
55
+ billing_start_date:,
56
+ billing_current_invoice_date:,
57
+ billing_next_invoice_date:,
58
+ billing_trial_start_date:,
59
+ billing_trial_days:,
60
+ billing_aggregation_id:,
61
+ billing_invoice_id:,
62
+ payment_method_id:,
63
+ billing_address_id:,
64
+ backup_payment_method_id:,
65
+ status:,
66
+ remarks:,
67
+ agreement_baa:,
68
+ program_manager_name:,
69
+ program_manager_calendar:,
70
+ program_discord_channel_name:,
71
+ program_discord_channel_url:,
72
+ billing_limits: ,
73
+ billing_plan_downgrade:,
74
+ billing_tax_id:,
75
+ marked_for_deletion:,
76
+ platform:,
77
+ projects:
78
+ )
79
+ @id = id
80
+ @created_at = created_at
81
+ @updated_at = updated_at
82
+ @name = name
83
+ @total = total
84
+ @prefs = prefs
85
+ @billing_budget = billing_budget
86
+ @budget_alerts = budget_alerts
87
+ @billing_plan = billing_plan
88
+ @billing_plan_id = billing_plan_id
89
+ @billing_plan_details = billing_plan_details
90
+ @billing_email = billing_email
91
+ @billing_start_date = billing_start_date
92
+ @billing_current_invoice_date = billing_current_invoice_date
93
+ @billing_next_invoice_date = billing_next_invoice_date
94
+ @billing_trial_start_date = billing_trial_start_date
95
+ @billing_trial_days = billing_trial_days
96
+ @billing_aggregation_id = billing_aggregation_id
97
+ @billing_invoice_id = billing_invoice_id
98
+ @payment_method_id = payment_method_id
99
+ @billing_address_id = billing_address_id
100
+ @backup_payment_method_id = backup_payment_method_id
101
+ @status = status
102
+ @remarks = remarks
103
+ @agreement_baa = agreement_baa
104
+ @program_manager_name = program_manager_name
105
+ @program_manager_calendar = program_manager_calendar
106
+ @program_discord_channel_name = program_discord_channel_name
107
+ @program_discord_channel_url = program_discord_channel_url
108
+ @billing_limits = billing_limits
109
+ @billing_plan_downgrade = billing_plan_downgrade
110
+ @billing_tax_id = billing_tax_id
111
+ @marked_for_deletion = marked_for_deletion
112
+ @platform = platform
113
+ @projects = projects
114
+ end
115
+
116
+ def self.from(map:)
117
+ Organization.new(
118
+ id: map["$id"],
119
+ created_at: map["$createdAt"],
120
+ updated_at: map["$updatedAt"],
121
+ name: map["name"],
122
+ total: map["total"],
123
+ prefs: Preferences.from(map: map["prefs"]),
124
+ billing_budget: map["billingBudget"],
125
+ budget_alerts: map["budgetAlerts"],
126
+ billing_plan: map["billingPlan"],
127
+ billing_plan_id: map["billingPlanId"],
128
+ billing_plan_details: BillingPlan.from(map: map["billingPlanDetails"]),
129
+ billing_email: map["billingEmail"],
130
+ billing_start_date: map["billingStartDate"],
131
+ billing_current_invoice_date: map["billingCurrentInvoiceDate"],
132
+ billing_next_invoice_date: map["billingNextInvoiceDate"],
133
+ billing_trial_start_date: map["billingTrialStartDate"],
134
+ billing_trial_days: map["billingTrialDays"],
135
+ billing_aggregation_id: map["billingAggregationId"],
136
+ billing_invoice_id: map["billingInvoiceId"],
137
+ payment_method_id: map["paymentMethodId"],
138
+ billing_address_id: map["billingAddressId"],
139
+ backup_payment_method_id: map["backupPaymentMethodId"],
140
+ status: map["status"],
141
+ remarks: map["remarks"],
142
+ agreement_baa: map["agreementBAA"],
143
+ program_manager_name: map["programManagerName"],
144
+ program_manager_calendar: map["programManagerCalendar"],
145
+ program_discord_channel_name: map["programDiscordChannelName"],
146
+ program_discord_channel_url: map["programDiscordChannelUrl"],
147
+ billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]),
148
+ billing_plan_downgrade: map["billingPlanDowngrade"],
149
+ billing_tax_id: map["billingTaxId"],
150
+ marked_for_deletion: map["markedForDeletion"],
151
+ platform: map["platform"],
152
+ projects: map["projects"]
153
+ )
154
+ end
155
+
156
+ def to_map
157
+ {
158
+ "$id": @id,
159
+ "$createdAt": @created_at,
160
+ "$updatedAt": @updated_at,
161
+ "name": @name,
162
+ "total": @total,
163
+ "prefs": @prefs.to_map,
164
+ "billingBudget": @billing_budget,
165
+ "budgetAlerts": @budget_alerts,
166
+ "billingPlan": @billing_plan,
167
+ "billingPlanId": @billing_plan_id,
168
+ "billingPlanDetails": @billing_plan_details.to_map,
169
+ "billingEmail": @billing_email,
170
+ "billingStartDate": @billing_start_date,
171
+ "billingCurrentInvoiceDate": @billing_current_invoice_date,
172
+ "billingNextInvoiceDate": @billing_next_invoice_date,
173
+ "billingTrialStartDate": @billing_trial_start_date,
174
+ "billingTrialDays": @billing_trial_days,
175
+ "billingAggregationId": @billing_aggregation_id,
176
+ "billingInvoiceId": @billing_invoice_id,
177
+ "paymentMethodId": @payment_method_id,
178
+ "billingAddressId": @billing_address_id,
179
+ "backupPaymentMethodId": @backup_payment_method_id,
180
+ "status": @status,
181
+ "remarks": @remarks,
182
+ "agreementBAA": @agreement_baa,
183
+ "programManagerName": @program_manager_name,
184
+ "programManagerCalendar": @program_manager_calendar,
185
+ "programDiscordChannelName": @program_discord_channel_name,
186
+ "programDiscordChannelUrl": @program_discord_channel_url,
187
+ "billingLimits": @billing_limits&.to_map,
188
+ "billingPlanDowngrade": @billing_plan_downgrade,
189
+ "billingTaxId": @billing_tax_id,
190
+ "markedForDeletion": @marked_for_deletion,
191
+ "platform": @platform,
192
+ "projects": @projects
193
+ }
194
+ end
195
+ end
196
+ end
197
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class PolicyDenyCorporateEmail
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
+ PolicyDenyCorporateEmail.new(
19
+ id: map["$id"],
20
+ enabled: map["enabled"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "$id": @id,
27
+ "enabled": @enabled
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -9,6 +9,7 @@ module Appwrite
9
9
  attr_reader :user_phone
10
10
  attr_reader :user_name
11
11
  attr_reader :user_mfa
12
+ attr_reader :user_accessed_at
12
13
 
13
14
  def initialize(
14
15
  id:,
@@ -16,7 +17,8 @@ module Appwrite
16
17
  user_email:,
17
18
  user_phone:,
18
19
  user_name:,
19
- user_mfa:
20
+ user_mfa:,
21
+ user_accessed_at:
20
22
  )
21
23
  @id = id
22
24
  @user_id = user_id
@@ -24,6 +26,7 @@ module Appwrite
24
26
  @user_phone = user_phone
25
27
  @user_name = user_name
26
28
  @user_mfa = user_mfa
29
+ @user_accessed_at = user_accessed_at
27
30
  end
28
31
 
29
32
  def self.from(map:)
@@ -33,7 +36,8 @@ module Appwrite
33
36
  user_email: map["userEmail"],
34
37
  user_phone: map["userPhone"],
35
38
  user_name: map["userName"],
36
- user_mfa: map["userMFA"]
39
+ user_mfa: map["userMFA"],
40
+ user_accessed_at: map["userAccessedAt"]
37
41
  )
38
42
  end
39
43
 
@@ -44,7 +48,8 @@ module Appwrite
44
48
  "userEmail": @user_email,
45
49
  "userPhone": @user_phone,
46
50
  "userName": @user_name,
47
- "userMFA": @user_mfa
51
+ "userMFA": @user_mfa,
52
+ "userAccessedAt": @user_accessed_at
48
53
  }
49
54
  end
50
55
  end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Program
6
+ attr_reader :id
7
+ attr_reader :title
8
+ attr_reader :description
9
+ attr_reader :tag
10
+ attr_reader :icon
11
+ attr_reader :url
12
+ attr_reader :active
13
+ attr_reader :external
14
+ attr_reader :billing_plan_id
15
+
16
+ def initialize(
17
+ id:,
18
+ title:,
19
+ description:,
20
+ tag:,
21
+ icon:,
22
+ url:,
23
+ active:,
24
+ external:,
25
+ billing_plan_id:
26
+ )
27
+ @id = id
28
+ @title = title
29
+ @description = description
30
+ @tag = tag
31
+ @icon = icon
32
+ @url = url
33
+ @active = active
34
+ @external = external
35
+ @billing_plan_id = billing_plan_id
36
+ end
37
+
38
+ def self.from(map:)
39
+ Program.new(
40
+ id: map["$id"],
41
+ title: map["title"],
42
+ description: map["description"],
43
+ tag: map["tag"],
44
+ icon: map["icon"],
45
+ url: map["url"],
46
+ active: map["active"],
47
+ external: map["external"],
48
+ billing_plan_id: map["billingPlanId"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "$id": @id,
55
+ "title": @title,
56
+ "description": @description,
57
+ "tag": @tag,
58
+ "icon": @icon,
59
+ "url": @url,
60
+ "active": @active,
61
+ "external": @external,
62
+ "billingPlanId": @billing_plan_id
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end