appwrite 25.1.0 → 26.1.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 (109) 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 +20 -0
  5. data/lib/appwrite/enums/database_type.rb +3 -0
  6. data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +10 -0
  7. data/lib/appwrite/enums/o_auth_provider.rb +1 -0
  8. data/lib/appwrite/enums/organization_key_scopes.rb +6 -0
  9. data/lib/appwrite/enums/project_key_scopes.rb +10 -2
  10. data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +10 -0
  11. data/lib/appwrite/enums/project_o_auth_provider_id.rb +1 -0
  12. data/lib/appwrite/enums/project_policy_id.rb +1 -0
  13. data/lib/appwrite/enums/project_service_id.rb +1 -0
  14. data/lib/appwrite/models/activity_event.rb +55 -70
  15. data/lib/appwrite/models/additional_resource.rb +52 -0
  16. data/lib/appwrite/models/app.rb +152 -0
  17. data/lib/appwrite/models/app_installation.rb +72 -0
  18. data/lib/appwrite/models/app_installation_list.rb +32 -0
  19. data/lib/appwrite/models/app_key.rb +67 -0
  20. data/lib/appwrite/models/{usage_gauge_list.rb → app_key_list.rb} +7 -7
  21. data/lib/appwrite/models/app_scope.rb +47 -0
  22. data/lib/appwrite/models/{usage_event_list.rb → app_scope_list.rb} +7 -7
  23. data/lib/appwrite/models/app_secret.rb +67 -0
  24. data/lib/appwrite/models/{health_status_list.rb → app_secret_list.rb} +7 -7
  25. data/lib/appwrite/models/app_secret_plaintext.rb +67 -0
  26. data/lib/appwrite/models/apps_list.rb +32 -0
  27. data/lib/appwrite/models/backup_policy.rb +5 -0
  28. data/lib/appwrite/models/billing_plan.rb +384 -0
  29. data/lib/appwrite/models/billing_plan_addon.rb +32 -0
  30. data/lib/appwrite/models/billing_plan_addon_details.rb +62 -0
  31. data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +117 -0
  32. data/lib/appwrite/models/billing_plan_limits.rb +32 -0
  33. data/lib/appwrite/models/billing_plan_supported_addons.rb +37 -0
  34. data/lib/appwrite/models/block.rb +5 -0
  35. data/lib/appwrite/models/database.rb +54 -6
  36. data/lib/appwrite/models/database_status.rb +62 -0
  37. data/lib/appwrite/models/database_status_connections.rb +32 -0
  38. data/lib/appwrite/models/database_status_replica.rb +42 -0
  39. data/lib/appwrite/models/database_status_volume.rb +42 -0
  40. data/lib/appwrite/models/dedicated_database.rb +267 -0
  41. data/lib/appwrite/models/dedicated_database_member.rb +42 -0
  42. data/lib/appwrite/models/dedicated_database_replicas.rb +37 -0
  43. data/lib/appwrite/models/dedicated_database_specification.rb +67 -0
  44. data/lib/appwrite/models/dedicated_database_specification_list.rb +37 -0
  45. data/lib/appwrite/models/dedicated_database_specification_pricing.rb +47 -0
  46. data/lib/appwrite/models/locale.rb +58 -3
  47. data/lib/appwrite/models/membership.rb +5 -0
  48. data/lib/appwrite/models/o_auth2_appwrite.rb +42 -0
  49. data/lib/appwrite/models/o_auth2_oidc.rb +13 -3
  50. data/lib/appwrite/models/oauth2_approve.rb +27 -0
  51. data/lib/appwrite/models/oauth2_authorize.rb +32 -0
  52. data/lib/appwrite/models/oauth2_consent.rb +72 -0
  53. data/lib/appwrite/models/oauth2_consent_list.rb +32 -0
  54. data/lib/appwrite/models/oauth2_consent_token.rb +77 -0
  55. data/lib/appwrite/models/oauth2_consent_token_list.rb +32 -0
  56. data/lib/appwrite/models/oauth2_device_authorization.rb +52 -0
  57. data/lib/appwrite/models/oauth2_grant.rb +82 -0
  58. data/lib/appwrite/models/{health_queue.rb → oauth2_organization.rb} +7 -7
  59. data/lib/appwrite/models/oauth2_organization_list.rb +32 -0
  60. data/lib/appwrite/models/oauth2_par.rb +32 -0
  61. data/lib/appwrite/models/oauth2_project.rb +37 -0
  62. data/lib/appwrite/models/oauth2_project_list.rb +32 -0
  63. data/lib/appwrite/models/oauth2_reject.rb +27 -0
  64. data/lib/appwrite/models/oauth2_token.rb +57 -0
  65. data/lib/appwrite/models/organization.rb +197 -0
  66. data/lib/appwrite/models/policy_deny_corporate_email.rb +32 -0
  67. data/lib/appwrite/models/policy_membership_privacy.rb +8 -3
  68. data/lib/appwrite/models/program.rb +67 -0
  69. data/lib/appwrite/models/project.rb +56 -11
  70. data/lib/appwrite/models/project_auth_method.rb +3 -3
  71. data/lib/appwrite/models/usage_billing_plan.rb +77 -0
  72. data/lib/appwrite/models/user.rb +25 -0
  73. data/lib/appwrite/query.rb +13 -1
  74. data/lib/appwrite/services/account.rb +251 -1
  75. data/lib/appwrite/services/activities.rb +2 -0
  76. data/lib/appwrite/services/advisor.rb +4 -0
  77. data/lib/appwrite/services/apps.rb +813 -0
  78. data/lib/appwrite/services/avatars.rb +8 -0
  79. data/lib/appwrite/services/backups.rb +38 -1
  80. data/lib/appwrite/services/databases.rb +107 -0
  81. data/lib/appwrite/services/functions.rb +30 -4
  82. data/lib/appwrite/services/graphql.rb +2 -0
  83. data/lib/appwrite/services/locale.rb +8 -0
  84. data/lib/appwrite/services/messaging.rb +42 -136
  85. data/lib/appwrite/services/oauth2.rb +525 -0
  86. data/lib/appwrite/services/organization.rb +436 -3
  87. data/lib/appwrite/services/presences.rb +4 -0
  88. data/lib/appwrite/services/project.rb +192 -9
  89. data/lib/appwrite/services/proxy.rb +7 -0
  90. data/lib/appwrite/services/sites.rb +28 -2
  91. data/lib/appwrite/services/storage.rb +11 -0
  92. data/lib/appwrite/services/tables_db.rb +201 -2
  93. data/lib/appwrite/services/teams.rb +209 -0
  94. data/lib/appwrite/services/tokens.rb +4 -0
  95. data/lib/appwrite/services/users.rb +38 -1
  96. data/lib/appwrite/services/webhooks.rb +5 -0
  97. data/lib/appwrite.rb +54 -15
  98. metadata +56 -17
  99. data/lib/appwrite/enums/health_antivirus_status.rb +0 -9
  100. data/lib/appwrite/enums/health_check_status.rb +0 -8
  101. data/lib/appwrite/enums/health_queue_name.rb +0 -19
  102. data/lib/appwrite/models/health_antivirus.rb +0 -49
  103. data/lib/appwrite/models/health_certificate.rb +0 -52
  104. data/lib/appwrite/models/health_status.rb +0 -53
  105. data/lib/appwrite/models/health_time.rb +0 -37
  106. data/lib/appwrite/models/usage_event.rb +0 -72
  107. data/lib/appwrite/models/usage_gauge.rb +0 -47
  108. data/lib/appwrite/services/health.rb +0 -681
  109. data/lib/appwrite/services/usage.rb +0 -88
@@ -0,0 +1,52 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2DeviceAuthorization
6
+ attr_reader :device_code
7
+ attr_reader :user_code
8
+ attr_reader :verification_uri
9
+ attr_reader :verification_uri_complete
10
+ attr_reader :expires_in
11
+ attr_reader :interval
12
+
13
+ def initialize(
14
+ device_code:,
15
+ user_code:,
16
+ verification_uri:,
17
+ verification_uri_complete:,
18
+ expires_in:,
19
+ interval:
20
+ )
21
+ @device_code = device_code
22
+ @user_code = user_code
23
+ @verification_uri = verification_uri
24
+ @verification_uri_complete = verification_uri_complete
25
+ @expires_in = expires_in
26
+ @interval = interval
27
+ end
28
+
29
+ def self.from(map:)
30
+ Oauth2DeviceAuthorization.new(
31
+ device_code: map["device_code"],
32
+ user_code: map["user_code"],
33
+ verification_uri: map["verification_uri"],
34
+ verification_uri_complete: map["verification_uri_complete"],
35
+ expires_in: map["expires_in"],
36
+ interval: map["interval"]
37
+ )
38
+ end
39
+
40
+ def to_map
41
+ {
42
+ "device_code": @device_code,
43
+ "user_code": @user_code,
44
+ "verification_uri": @verification_uri,
45
+ "verification_uri_complete": @verification_uri_complete,
46
+ "expires_in": @expires_in,
47
+ "interval": @interval
48
+ }
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,82 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2Grant
6
+ attr_reader :id
7
+ attr_reader :created_at
8
+ attr_reader :updated_at
9
+ attr_reader :user_id
10
+ attr_reader :app_id
11
+ attr_reader :scopes
12
+ attr_reader :resources
13
+ attr_reader :authorization_details
14
+ attr_reader :prompt
15
+ attr_reader :redirect_uri
16
+ attr_reader :auth_time
17
+ attr_reader :expire
18
+
19
+ def initialize(
20
+ id:,
21
+ created_at:,
22
+ updated_at:,
23
+ user_id:,
24
+ app_id:,
25
+ scopes:,
26
+ resources:,
27
+ authorization_details:,
28
+ prompt:,
29
+ redirect_uri:,
30
+ auth_time:,
31
+ expire:
32
+ )
33
+ @id = id
34
+ @created_at = created_at
35
+ @updated_at = updated_at
36
+ @user_id = user_id
37
+ @app_id = app_id
38
+ @scopes = scopes
39
+ @resources = resources
40
+ @authorization_details = authorization_details
41
+ @prompt = prompt
42
+ @redirect_uri = redirect_uri
43
+ @auth_time = auth_time
44
+ @expire = expire
45
+ end
46
+
47
+ def self.from(map:)
48
+ Oauth2Grant.new(
49
+ id: map["$id"],
50
+ created_at: map["$createdAt"],
51
+ updated_at: map["$updatedAt"],
52
+ user_id: map["userId"],
53
+ app_id: map["appId"],
54
+ scopes: map["scopes"],
55
+ resources: map["resources"],
56
+ authorization_details: map["authorizationDetails"],
57
+ prompt: map["prompt"],
58
+ redirect_uri: map["redirectUri"],
59
+ auth_time: map["authTime"],
60
+ expire: map["expire"]
61
+ )
62
+ end
63
+
64
+ def to_map
65
+ {
66
+ "$id": @id,
67
+ "$createdAt": @created_at,
68
+ "$updatedAt": @updated_at,
69
+ "userId": @user_id,
70
+ "appId": @app_id,
71
+ "scopes": @scopes,
72
+ "resources": @resources,
73
+ "authorizationDetails": @authorization_details,
74
+ "prompt": @prompt,
75
+ "redirectUri": @redirect_uri,
76
+ "authTime": @auth_time,
77
+ "expire": @expire
78
+ }
79
+ end
80
+ end
81
+ end
82
+ end
@@ -2,24 +2,24 @@
2
2
 
3
3
  module Appwrite
4
4
  module Models
5
- class HealthQueue
6
- attr_reader :size
5
+ class Oauth2Organization
6
+ attr_reader :id
7
7
 
8
8
  def initialize(
9
- size:
9
+ id:
10
10
  )
11
- @size = size
11
+ @id = id
12
12
  end
13
13
 
14
14
  def self.from(map:)
15
- HealthQueue.new(
16
- size: map["size"]
15
+ Oauth2Organization.new(
16
+ id: map["$id"]
17
17
  )
18
18
  end
19
19
 
20
20
  def to_map
21
21
  {
22
- "size": @size
22
+ "$id": @id
23
23
  }
24
24
  end
25
25
  end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2OrganizationList
6
+ attr_reader :total
7
+ attr_reader :organizations
8
+
9
+ def initialize(
10
+ total:,
11
+ organizations:
12
+ )
13
+ @total = total
14
+ @organizations = organizations
15
+ end
16
+
17
+ def self.from(map:)
18
+ Oauth2OrganizationList.new(
19
+ total: map["total"],
20
+ organizations: map["organizations"].map { |it| Oauth2Organization.from(map: it) }
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "total": @total,
27
+ "organizations": @organizations.map { |it| it.to_map }
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2PAR
6
+ attr_reader :request_uri
7
+ attr_reader :expires_in
8
+
9
+ def initialize(
10
+ request_uri:,
11
+ expires_in:
12
+ )
13
+ @request_uri = request_uri
14
+ @expires_in = expires_in
15
+ end
16
+
17
+ def self.from(map:)
18
+ Oauth2PAR.new(
19
+ request_uri: map["request_uri"],
20
+ expires_in: map["expires_in"]
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "request_uri": @request_uri,
27
+ "expires_in": @expires_in
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,37 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2Project
6
+ attr_reader :id
7
+ attr_reader :region
8
+ attr_reader :endpoint
9
+
10
+ def initialize(
11
+ id:,
12
+ region:,
13
+ endpoint:
14
+ )
15
+ @id = id
16
+ @region = region
17
+ @endpoint = endpoint
18
+ end
19
+
20
+ def self.from(map:)
21
+ Oauth2Project.new(
22
+ id: map["$id"],
23
+ region: map["region"],
24
+ endpoint: map["endpoint"]
25
+ )
26
+ end
27
+
28
+ def to_map
29
+ {
30
+ "$id": @id,
31
+ "region": @region,
32
+ "endpoint": @endpoint
33
+ }
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,32 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2ProjectList
6
+ attr_reader :total
7
+ attr_reader :projects
8
+
9
+ def initialize(
10
+ total:,
11
+ projects:
12
+ )
13
+ @total = total
14
+ @projects = projects
15
+ end
16
+
17
+ def self.from(map:)
18
+ Oauth2ProjectList.new(
19
+ total: map["total"],
20
+ projects: map["projects"].map { |it| Oauth2Project.from(map: it) }
21
+ )
22
+ end
23
+
24
+ def to_map
25
+ {
26
+ "total": @total,
27
+ "projects": @projects.map { |it| it.to_map }
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,27 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2Reject
6
+ attr_reader :redirect_url
7
+
8
+ def initialize(
9
+ redirect_url:
10
+ )
11
+ @redirect_url = redirect_url
12
+ end
13
+
14
+ def self.from(map:)
15
+ Oauth2Reject.new(
16
+ redirect_url: map["redirectUrl"]
17
+ )
18
+ end
19
+
20
+ def to_map
21
+ {
22
+ "redirectUrl": @redirect_url
23
+ }
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,57 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class Oauth2Token
6
+ attr_reader :access_token
7
+ attr_reader :token_type
8
+ attr_reader :expires_in
9
+ attr_reader :refresh_token
10
+ attr_reader :scope
11
+ attr_reader :authorization_details
12
+ attr_reader :id_token
13
+
14
+ def initialize(
15
+ access_token:,
16
+ token_type:,
17
+ expires_in:,
18
+ refresh_token:,
19
+ scope:,
20
+ authorization_details: ,
21
+ id_token:
22
+ )
23
+ @access_token = access_token
24
+ @token_type = token_type
25
+ @expires_in = expires_in
26
+ @refresh_token = refresh_token
27
+ @scope = scope
28
+ @authorization_details = authorization_details
29
+ @id_token = id_token
30
+ end
31
+
32
+ def self.from(map:)
33
+ Oauth2Token.new(
34
+ access_token: map["access_token"],
35
+ token_type: map["token_type"],
36
+ expires_in: map["expires_in"],
37
+ refresh_token: map["refresh_token"],
38
+ scope: map["scope"],
39
+ authorization_details: map["authorization_details"],
40
+ id_token: map["id_token"]
41
+ )
42
+ end
43
+
44
+ def to_map
45
+ {
46
+ "access_token": @access_token,
47
+ "token_type": @token_type,
48
+ "expires_in": @expires_in,
49
+ "refresh_token": @refresh_token,
50
+ "scope": @scope,
51
+ "authorization_details": @authorization_details,
52
+ "id_token": @id_token
53
+ }
54
+ end
55
+ end
56
+ end
57
+ 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