appwrite 26.0.0 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +16 -2
- data/lib/appwrite/enums/authentication_factor.rb +1 -0
- data/lib/appwrite/enums/build_runtime.rb +1 -0
- data/lib/appwrite/enums/database_status.rb +11 -0
- data/lib/appwrite/enums/database_type.rb +3 -0
- data/lib/appwrite/enums/embedding_model.rb +10 -0
- data/lib/appwrite/enums/invalidation_type.rb +9 -0
- data/lib/appwrite/enums/organization_key_scopes.rb +2 -0
- data/lib/appwrite/enums/project_key_scopes.rb +5 -0
- data/lib/appwrite/enums/project_policy_id.rb +1 -0
- data/lib/appwrite/enums/runtime.rb +1 -0
- data/lib/appwrite/models/activity_event.rb +58 -3
- data/lib/appwrite/models/app.rb +152 -0
- data/lib/appwrite/models/app_installation.rb +72 -0
- data/lib/appwrite/models/app_installation_list.rb +32 -0
- data/lib/appwrite/models/app_key.rb +67 -0
- data/lib/appwrite/models/app_key_list.rb +32 -0
- data/lib/appwrite/models/app_scope.rb +47 -0
- data/lib/appwrite/models/app_scope_list.rb +32 -0
- data/lib/appwrite/models/app_secret.rb +67 -0
- data/lib/appwrite/models/app_secret_list.rb +32 -0
- data/lib/appwrite/models/app_secret_plaintext.rb +67 -0
- data/lib/appwrite/models/apps_list.rb +32 -0
- data/lib/appwrite/models/billing_plan.rb +9 -4
- data/lib/appwrite/models/billing_plan_addon.rb +6 -6
- data/lib/appwrite/models/billing_plan_addon_details.rb +1 -1
- data/lib/appwrite/models/database.rb +35 -6
- data/lib/appwrite/models/database_migration.rb +102 -0
- data/lib/appwrite/models/database_migration_list.rb +32 -0
- data/lib/appwrite/models/database_status.rb +92 -0
- data/lib/appwrite/models/database_status_connections.rb +32 -0
- data/lib/appwrite/models/database_status_replica.rb +42 -0
- data/lib/appwrite/models/database_status_volume.rb +42 -0
- data/lib/appwrite/models/dedicated_database.rb +262 -0
- data/lib/appwrite/models/dedicated_database_member.rb +42 -0
- data/lib/appwrite/models/dedicated_database_operation.rb +77 -0
- data/lib/appwrite/models/dedicated_database_operation_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +62 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +67 -0
- data/lib/appwrite/models/dedicated_database_specification_list.rb +37 -0
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +42 -0
- data/lib/appwrite/models/embedding.rb +42 -0
- data/lib/appwrite/models/embedding_list.rb +32 -0
- data/lib/appwrite/models/file.rb +10 -0
- data/lib/appwrite/models/mfa_challenge_secret.rb +47 -0
- data/lib/appwrite/models/mfa_factors.rb +8 -3
- data/lib/appwrite/models/oauth2_approve.rb +27 -0
- data/lib/appwrite/models/oauth2_authorize.rb +32 -0
- data/lib/appwrite/models/oauth2_consent.rb +72 -0
- data/lib/appwrite/models/oauth2_consent_list.rb +32 -0
- data/lib/appwrite/models/oauth2_consent_token.rb +77 -0
- data/lib/appwrite/models/oauth2_consent_token_list.rb +32 -0
- data/lib/appwrite/models/oauth2_device_authorization.rb +52 -0
- data/lib/appwrite/models/oauth2_grant.rb +82 -0
- data/lib/appwrite/models/oauth2_organization.rb +27 -0
- data/lib/appwrite/models/oauth2_organization_list.rb +32 -0
- data/lib/appwrite/models/oauth2_par.rb +32 -0
- data/lib/appwrite/models/oauth2_project.rb +37 -0
- data/lib/appwrite/models/oauth2_project_list.rb +32 -0
- data/lib/appwrite/models/oauth2_reject.rb +27 -0
- data/lib/appwrite/models/oauth2_token.rb +57 -0
- data/lib/appwrite/models/organization.rb +12 -12
- data/lib/appwrite/models/policy_mfa_factors.rb +47 -0
- data/lib/appwrite/models/project.rb +15 -0
- data/lib/appwrite/models/project_auth_method.rb +3 -3
- data/lib/appwrite/models/proxy_invalidation.rb +42 -0
- data/lib/appwrite/models/usage_billing_plan.rb +9 -9
- data/lib/appwrite/services/account.rb +210 -33
- data/lib/appwrite/services/activities.rb +1 -1
- data/lib/appwrite/services/apps.rb +855 -0
- data/lib/appwrite/services/backups.rb +31 -12
- data/lib/appwrite/services/databases.rb +4 -4
- data/lib/appwrite/services/embeddings.rb +48 -0
- data/lib/appwrite/services/functions.rb +1 -1
- data/lib/appwrite/services/oauth2.rb +525 -0
- data/lib/appwrite/services/organization.rb +168 -0
- data/lib/appwrite/services/project.rb +54 -57
- data/lib/appwrite/services/proxy.rb +44 -0
- data/lib/appwrite/services/sites.rb +4 -2
- data/lib/appwrite/services/storage.rb +4 -2
- data/lib/appwrite/services/tables_db.rb +378 -6
- data/lib/appwrite/services/teams.rb +198 -0
- data/lib/appwrite/services/users.rb +38 -0
- data/lib/appwrite.rb +50 -0
- metadata +52 -2
|
@@ -0,0 +1,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
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class Oauth2Organization
|
|
6
|
+
attr_reader :id
|
|
7
|
+
|
|
8
|
+
def initialize(
|
|
9
|
+
id:
|
|
10
|
+
)
|
|
11
|
+
@id = id
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.from(map:)
|
|
15
|
+
Oauth2Organization.new(
|
|
16
|
+
id: map["$id"]
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def to_map
|
|
21
|
+
{
|
|
22
|
+
"$id": @id
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
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
|
|
@@ -46,7 +46,7 @@ module Appwrite
|
|
|
46
46
|
name:,
|
|
47
47
|
total:,
|
|
48
48
|
prefs:,
|
|
49
|
-
billing_budget
|
|
49
|
+
billing_budget: ,
|
|
50
50
|
budget_alerts:,
|
|
51
51
|
billing_plan:,
|
|
52
52
|
billing_plan_id:,
|
|
@@ -55,23 +55,23 @@ module Appwrite
|
|
|
55
55
|
billing_start_date:,
|
|
56
56
|
billing_current_invoice_date:,
|
|
57
57
|
billing_next_invoice_date:,
|
|
58
|
-
billing_trial_start_date
|
|
58
|
+
billing_trial_start_date: ,
|
|
59
59
|
billing_trial_days:,
|
|
60
60
|
billing_aggregation_id:,
|
|
61
61
|
billing_invoice_id:,
|
|
62
62
|
payment_method_id:,
|
|
63
|
-
billing_address_id
|
|
64
|
-
backup_payment_method_id
|
|
63
|
+
billing_address_id: ,
|
|
64
|
+
backup_payment_method_id: ,
|
|
65
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
|
|
66
|
+
remarks: ,
|
|
67
|
+
agreement_baa: ,
|
|
68
|
+
program_manager_name: ,
|
|
69
|
+
program_manager_calendar: ,
|
|
70
|
+
program_discord_channel_name: ,
|
|
71
|
+
program_discord_channel_url: ,
|
|
72
72
|
billing_limits: ,
|
|
73
|
-
billing_plan_downgrade
|
|
74
|
-
billing_tax_id
|
|
73
|
+
billing_plan_downgrade: ,
|
|
74
|
+
billing_tax_id: ,
|
|
75
75
|
marked_for_deletion:,
|
|
76
76
|
platform:,
|
|
77
77
|
projects:
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class PolicyMfaFactors
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :totp
|
|
8
|
+
attr_reader :email
|
|
9
|
+
attr_reader :phone
|
|
10
|
+
attr_reader :custom
|
|
11
|
+
|
|
12
|
+
def initialize(
|
|
13
|
+
id:,
|
|
14
|
+
totp:,
|
|
15
|
+
email:,
|
|
16
|
+
phone:,
|
|
17
|
+
custom:
|
|
18
|
+
)
|
|
19
|
+
@id = id
|
|
20
|
+
@totp = totp
|
|
21
|
+
@email = email
|
|
22
|
+
@phone = phone
|
|
23
|
+
@custom = custom
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from(map:)
|
|
27
|
+
PolicyMfaFactors.new(
|
|
28
|
+
id: map["$id"],
|
|
29
|
+
totp: map["totp"],
|
|
30
|
+
email: map["email"],
|
|
31
|
+
phone: map["phone"],
|
|
32
|
+
custom: map["custom"]
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def to_map
|
|
37
|
+
{
|
|
38
|
+
"$id": @id,
|
|
39
|
+
"totp": @totp,
|
|
40
|
+
"email": @email,
|
|
41
|
+
"phone": @phone,
|
|
42
|
+
"custom": @custom
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -30,16 +30,19 @@ module Appwrite
|
|
|
30
30
|
attr_reader :protocols
|
|
31
31
|
attr_reader :blocks
|
|
32
32
|
attr_reader :console_accessed_at
|
|
33
|
+
attr_reader :waf_enabled
|
|
33
34
|
attr_reader :billing_limits
|
|
34
35
|
attr_reader :o_auth2_server_enabled
|
|
35
36
|
attr_reader :o_auth2_server_authorization_url
|
|
36
37
|
attr_reader :o_auth2_server_scopes
|
|
37
38
|
attr_reader :o_auth2_server_default_scopes
|
|
39
|
+
attr_reader :o_auth2_server_installation_scopes
|
|
38
40
|
attr_reader :o_auth2_server_authorization_details_types
|
|
39
41
|
attr_reader :o_auth2_server_access_token_duration
|
|
40
42
|
attr_reader :o_auth2_server_refresh_token_duration
|
|
41
43
|
attr_reader :o_auth2_server_public_access_token_duration
|
|
42
44
|
attr_reader :o_auth2_server_public_refresh_token_duration
|
|
45
|
+
attr_reader :o_auth2_server_installation_access_token_duration
|
|
43
46
|
attr_reader :o_auth2_server_confidential_pkce
|
|
44
47
|
attr_reader :o_auth2_server_verification_url
|
|
45
48
|
attr_reader :o_auth2_server_user_code_length
|
|
@@ -75,16 +78,19 @@ module Appwrite
|
|
|
75
78
|
protocols:,
|
|
76
79
|
blocks:,
|
|
77
80
|
console_accessed_at:,
|
|
81
|
+
waf_enabled:,
|
|
78
82
|
billing_limits: ,
|
|
79
83
|
o_auth2_server_enabled: ,
|
|
80
84
|
o_auth2_server_authorization_url: ,
|
|
81
85
|
o_auth2_server_scopes: ,
|
|
82
86
|
o_auth2_server_default_scopes: ,
|
|
87
|
+
o_auth2_server_installation_scopes: ,
|
|
83
88
|
o_auth2_server_authorization_details_types: ,
|
|
84
89
|
o_auth2_server_access_token_duration: ,
|
|
85
90
|
o_auth2_server_refresh_token_duration: ,
|
|
86
91
|
o_auth2_server_public_access_token_duration: ,
|
|
87
92
|
o_auth2_server_public_refresh_token_duration: ,
|
|
93
|
+
o_auth2_server_installation_access_token_duration: ,
|
|
88
94
|
o_auth2_server_confidential_pkce: ,
|
|
89
95
|
o_auth2_server_verification_url: ,
|
|
90
96
|
o_auth2_server_user_code_length: ,
|
|
@@ -119,16 +125,19 @@ module Appwrite
|
|
|
119
125
|
@protocols = protocols
|
|
120
126
|
@blocks = blocks
|
|
121
127
|
@console_accessed_at = console_accessed_at
|
|
128
|
+
@waf_enabled = waf_enabled
|
|
122
129
|
@billing_limits = billing_limits
|
|
123
130
|
@o_auth2_server_enabled = o_auth2_server_enabled
|
|
124
131
|
@o_auth2_server_authorization_url = o_auth2_server_authorization_url
|
|
125
132
|
@o_auth2_server_scopes = o_auth2_server_scopes
|
|
126
133
|
@o_auth2_server_default_scopes = o_auth2_server_default_scopes
|
|
134
|
+
@o_auth2_server_installation_scopes = o_auth2_server_installation_scopes
|
|
127
135
|
@o_auth2_server_authorization_details_types = o_auth2_server_authorization_details_types
|
|
128
136
|
@o_auth2_server_access_token_duration = o_auth2_server_access_token_duration
|
|
129
137
|
@o_auth2_server_refresh_token_duration = o_auth2_server_refresh_token_duration
|
|
130
138
|
@o_auth2_server_public_access_token_duration = o_auth2_server_public_access_token_duration
|
|
131
139
|
@o_auth2_server_public_refresh_token_duration = o_auth2_server_public_refresh_token_duration
|
|
140
|
+
@o_auth2_server_installation_access_token_duration = o_auth2_server_installation_access_token_duration
|
|
132
141
|
@o_auth2_server_confidential_pkce = o_auth2_server_confidential_pkce
|
|
133
142
|
@o_auth2_server_verification_url = o_auth2_server_verification_url
|
|
134
143
|
@o_auth2_server_user_code_length = o_auth2_server_user_code_length
|
|
@@ -166,16 +175,19 @@ module Appwrite
|
|
|
166
175
|
protocols: map["protocols"].map { |it| ProjectProtocol.from(map: it) },
|
|
167
176
|
blocks: map["blocks"].map { |it| Block.from(map: it) },
|
|
168
177
|
console_accessed_at: map["consoleAccessedAt"],
|
|
178
|
+
waf_enabled: map["wafEnabled"],
|
|
169
179
|
billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]),
|
|
170
180
|
o_auth2_server_enabled: map["oAuth2ServerEnabled"],
|
|
171
181
|
o_auth2_server_authorization_url: map["oAuth2ServerAuthorizationUrl"],
|
|
172
182
|
o_auth2_server_scopes: map["oAuth2ServerScopes"],
|
|
173
183
|
o_auth2_server_default_scopes: map["oAuth2ServerDefaultScopes"],
|
|
184
|
+
o_auth2_server_installation_scopes: map["oAuth2ServerInstallationScopes"],
|
|
174
185
|
o_auth2_server_authorization_details_types: map["oAuth2ServerAuthorizationDetailsTypes"],
|
|
175
186
|
o_auth2_server_access_token_duration: map["oAuth2ServerAccessTokenDuration"],
|
|
176
187
|
o_auth2_server_refresh_token_duration: map["oAuth2ServerRefreshTokenDuration"],
|
|
177
188
|
o_auth2_server_public_access_token_duration: map["oAuth2ServerPublicAccessTokenDuration"],
|
|
178
189
|
o_auth2_server_public_refresh_token_duration: map["oAuth2ServerPublicRefreshTokenDuration"],
|
|
190
|
+
o_auth2_server_installation_access_token_duration: map["oAuth2ServerInstallationAccessTokenDuration"],
|
|
179
191
|
o_auth2_server_confidential_pkce: map["oAuth2ServerConfidentialPkce"],
|
|
180
192
|
o_auth2_server_verification_url: map["oAuth2ServerVerificationUrl"],
|
|
181
193
|
o_auth2_server_user_code_length: map["oAuth2ServerUserCodeLength"],
|
|
@@ -214,16 +226,19 @@ module Appwrite
|
|
|
214
226
|
"protocols": @protocols.map { |it| it.to_map },
|
|
215
227
|
"blocks": @blocks.map { |it| it.to_map },
|
|
216
228
|
"consoleAccessedAt": @console_accessed_at,
|
|
229
|
+
"wafEnabled": @waf_enabled,
|
|
217
230
|
"billingLimits": @billing_limits&.to_map,
|
|
218
231
|
"oAuth2ServerEnabled": @o_auth2_server_enabled,
|
|
219
232
|
"oAuth2ServerAuthorizationUrl": @o_auth2_server_authorization_url,
|
|
220
233
|
"oAuth2ServerScopes": @o_auth2_server_scopes,
|
|
221
234
|
"oAuth2ServerDefaultScopes": @o_auth2_server_default_scopes,
|
|
235
|
+
"oAuth2ServerInstallationScopes": @o_auth2_server_installation_scopes,
|
|
222
236
|
"oAuth2ServerAuthorizationDetailsTypes": @o_auth2_server_authorization_details_types,
|
|
223
237
|
"oAuth2ServerAccessTokenDuration": @o_auth2_server_access_token_duration,
|
|
224
238
|
"oAuth2ServerRefreshTokenDuration": @o_auth2_server_refresh_token_duration,
|
|
225
239
|
"oAuth2ServerPublicAccessTokenDuration": @o_auth2_server_public_access_token_duration,
|
|
226
240
|
"oAuth2ServerPublicRefreshTokenDuration": @o_auth2_server_public_refresh_token_duration,
|
|
241
|
+
"oAuth2ServerInstallationAccessTokenDuration": @o_auth2_server_installation_access_token_duration,
|
|
227
242
|
"oAuth2ServerConfidentialPkce": @o_auth2_server_confidential_pkce,
|
|
228
243
|
"oAuth2ServerVerificationUrl": @o_auth2_server_verification_url,
|
|
229
244
|
"oAuth2ServerUserCodeLength": @o_auth2_server_user_code_length,
|
|
@@ -32,9 +32,9 @@ module Appwrite
|
|
|
32
32
|
|
|
33
33
|
def validate_id(id)
|
|
34
34
|
valid_id = [
|
|
35
|
-
Appwrite::Enums::ProjectAuthMethodId::
|
|
36
|
-
Appwrite::Enums::ProjectAuthMethodId::
|
|
37
|
-
Appwrite::Enums::ProjectAuthMethodId::
|
|
35
|
+
Appwrite::Enums::ProjectAuthMethodId::EMAIL_PASSWORD,
|
|
36
|
+
Appwrite::Enums::ProjectAuthMethodId::MAGIC_URL,
|
|
37
|
+
Appwrite::Enums::ProjectAuthMethodId::EMAIL_OTP,
|
|
38
38
|
Appwrite::Enums::ProjectAuthMethodId::ANONYMOUS,
|
|
39
39
|
Appwrite::Enums::ProjectAuthMethodId::INVITES,
|
|
40
40
|
Appwrite::Enums::ProjectAuthMethodId::JWT,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class ProxyInvalidation
|
|
6
|
+
attr_reader :domain
|
|
7
|
+
attr_reader :type
|
|
8
|
+
attr_reader :reference
|
|
9
|
+
attr_reader :status
|
|
10
|
+
|
|
11
|
+
def initialize(
|
|
12
|
+
domain:,
|
|
13
|
+
type:,
|
|
14
|
+
reference:,
|
|
15
|
+
status:
|
|
16
|
+
)
|
|
17
|
+
@domain = domain
|
|
18
|
+
@type = type
|
|
19
|
+
@reference = reference
|
|
20
|
+
@status = status
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from(map:)
|
|
24
|
+
ProxyInvalidation.new(
|
|
25
|
+
domain: map["domain"],
|
|
26
|
+
type: map["type"],
|
|
27
|
+
reference: map["reference"],
|
|
28
|
+
status: map["status"]
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def to_map
|
|
33
|
+
{
|
|
34
|
+
"domain": @domain,
|
|
35
|
+
"type": @type,
|
|
36
|
+
"reference": @reference,
|
|
37
|
+
"status": @status
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -18,15 +18,15 @@ module Appwrite
|
|
|
18
18
|
def initialize(
|
|
19
19
|
bandwidth:,
|
|
20
20
|
executions:,
|
|
21
|
-
member
|
|
21
|
+
member: ,
|
|
22
22
|
realtime:,
|
|
23
23
|
realtime_messages:,
|
|
24
|
-
realtime_bandwidth
|
|
24
|
+
realtime_bandwidth: ,
|
|
25
25
|
storage:,
|
|
26
26
|
users:,
|
|
27
27
|
gb_hours:,
|
|
28
28
|
image_transformations:,
|
|
29
|
-
credits:
|
|
29
|
+
credits:
|
|
30
30
|
)
|
|
31
31
|
@bandwidth = bandwidth
|
|
32
32
|
@executions = executions
|
|
@@ -45,15 +45,15 @@ module Appwrite
|
|
|
45
45
|
UsageBillingPlan.new(
|
|
46
46
|
bandwidth: AdditionalResource.from(map: map["bandwidth"]),
|
|
47
47
|
executions: AdditionalResource.from(map: map["executions"]),
|
|
48
|
-
member: AdditionalResource.from(map: map["member"]),
|
|
48
|
+
member: map["member"].nil? ? nil : AdditionalResource.from(map: map["member"]),
|
|
49
49
|
realtime: AdditionalResource.from(map: map["realtime"]),
|
|
50
50
|
realtime_messages: AdditionalResource.from(map: map["realtimeMessages"]),
|
|
51
|
-
realtime_bandwidth: AdditionalResource.from(map: map["realtimeBandwidth"]),
|
|
51
|
+
realtime_bandwidth: map["realtimeBandwidth"].nil? ? nil : AdditionalResource.from(map: map["realtimeBandwidth"]),
|
|
52
52
|
storage: AdditionalResource.from(map: map["storage"]),
|
|
53
53
|
users: AdditionalResource.from(map: map["users"]),
|
|
54
54
|
gb_hours: AdditionalResource.from(map: map["GBHours"]),
|
|
55
55
|
image_transformations: AdditionalResource.from(map: map["imageTransformations"]),
|
|
56
|
-
credits: AdditionalResource.from(map: map["credits"])
|
|
56
|
+
credits: map["credits"].nil? ? nil : AdditionalResource.from(map: map["credits"])
|
|
57
57
|
)
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -61,15 +61,15 @@ module Appwrite
|
|
|
61
61
|
{
|
|
62
62
|
"bandwidth": @bandwidth.to_map,
|
|
63
63
|
"executions": @executions.to_map,
|
|
64
|
-
"member": @member
|
|
64
|
+
"member": @member&.to_map,
|
|
65
65
|
"realtime": @realtime.to_map,
|
|
66
66
|
"realtimeMessages": @realtime_messages.to_map,
|
|
67
|
-
"realtimeBandwidth": @realtime_bandwidth
|
|
67
|
+
"realtimeBandwidth": @realtime_bandwidth&.to_map,
|
|
68
68
|
"storage": @storage.to_map,
|
|
69
69
|
"users": @users.to_map,
|
|
70
70
|
"GBHours": @gb_hours.to_map,
|
|
71
71
|
"imageTransformations": @image_transformations.to_map,
|
|
72
|
-
"credits": @credits
|
|
72
|
+
"credits": @credits&.to_map
|
|
73
73
|
}
|
|
74
74
|
end
|
|
75
75
|
end
|