appwrite 28.3.1 → 28.4.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 +20 -4
- data/lib/appwrite/enums/billing_plan_group.rb +2 -0
- data/lib/appwrite/enums/build_runtime.rb +2 -0
- data/lib/appwrite/enums/databases_index_type.rb +1 -0
- data/lib/appwrite/enums/domain_registration_type.rb +10 -0
- data/lib/appwrite/enums/domain_transfer_status_enum.rb +14 -0
- data/lib/appwrite/enums/framework.rb +1 -0
- data/lib/appwrite/enums/id_token_provider.rb +8 -0
- data/lib/appwrite/enums/image_gravity.rb +1 -0
- data/lib/appwrite/enums/o_auth2_auth0_prompt.rb +9 -0
- data/lib/appwrite/enums/o_auth2_discord_prompt.rb +8 -0
- data/lib/appwrite/enums/o_auth2_github_prompt.rb +7 -0
- data/lib/appwrite/enums/o_auth2_kakao_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth2_microsoft_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth2_okta_prompt.rb +9 -0
- data/lib/appwrite/enums/o_auth2_salesforce_prompt.rb +8 -0
- data/lib/appwrite/enums/o_auth2_zoho_prompt.rb +7 -0
- data/lib/appwrite/enums/o_auth_provider.rb +3 -0
- data/lib/appwrite/enums/project_email_template_id.rb +2 -0
- data/lib/appwrite/enums/project_key_scopes.rb +4 -0
- data/lib/appwrite/enums/project_o_auth2_auth0_prompt.rb +9 -0
- data/lib/appwrite/enums/project_o_auth2_discord_prompt.rb +8 -0
- data/lib/appwrite/enums/project_o_auth2_git_hub_prompt.rb +7 -0
- data/lib/appwrite/enums/project_o_auth2_kakao_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth2_microsoft_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth2_okta_prompt.rb +9 -0
- data/lib/appwrite/enums/project_o_auth2_salesforce_prompt.rb +8 -0
- data/lib/appwrite/enums/project_o_auth2_zoho_prompt.rb +7 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +3 -0
- data/lib/appwrite/enums/project_policy_id.rb +2 -0
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -0
- data/lib/appwrite/enums/runtime.rb +2 -0
- data/lib/appwrite/enums/tables_db_index_type.rb +1 -0
- data/lib/appwrite/enums/waf_rule_action.rb +11 -0
- data/lib/appwrite/models/account.rb +143 -0
- data/lib/appwrite/models/billing_plan.rb +12 -0
- data/lib/appwrite/models/dedicated_database.rb +15 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +20 -0
- data/lib/appwrite/models/dns_record.rb +83 -0
- data/lib/appwrite/models/dns_records_list.rb +33 -0
- data/lib/appwrite/models/domain.rb +109 -0
- data/lib/appwrite/models/domain_price.rb +63 -0
- data/lib/appwrite/models/domain_prices_list.rb +33 -0
- data/lib/appwrite/models/domain_transfer_status.rb +59 -0
- data/lib/appwrite/models/domains_list.rb +33 -0
- data/lib/appwrite/models/identity.rb +8 -3
- data/lib/appwrite/models/o_auth2_apple.rb +13 -3
- data/lib/appwrite/models/o_auth2_auth0.rb +23 -0
- data/lib/appwrite/models/o_auth2_discord.rb +25 -3
- data/lib/appwrite/models/o_auth2_github.rb +24 -3
- data/lib/appwrite/models/o_auth2_google.rb +17 -5
- data/lib/appwrite/models/o_auth2_kakao.rb +67 -0
- data/lib/appwrite/models/o_auth2_microsoft.rb +24 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +4 -2
- data/lib/appwrite/models/o_auth2_okta.rb +23 -0
- data/lib/appwrite/models/o_auth2_salesforce.rb +25 -3
- data/lib/appwrite/models/o_auth2_tik_tok.rb +43 -0
- data/lib/appwrite/models/o_auth2_webflow.rb +43 -0
- data/lib/appwrite/models/o_auth2_zoho.rb +24 -3
- data/lib/appwrite/models/oauth2_introspection.rb +83 -0
- data/lib/appwrite/models/platform_android.rb +8 -3
- data/lib/appwrite/models/policy_password_pwned.rb +43 -0
- data/lib/appwrite/models/policy_password_rotation.rb +38 -0
- data/lib/appwrite/models/project.rb +15 -0
- data/lib/appwrite/models/project_service.rb +1 -0
- data/lib/appwrite/models/proxy_rule.rb +1 -0
- data/lib/appwrite/models/topic.rb +13 -3
- data/lib/appwrite/models/user.rb +5 -0
- data/lib/appwrite/models/waf_rule_bypass.rb +111 -0
- data/lib/appwrite/models/waf_rule_challenge.rb +126 -0
- data/lib/appwrite/models/waf_rule_deny.rb +111 -0
- data/lib/appwrite/models/waf_rule_list.rb +33 -0
- data/lib/appwrite/models/waf_rule_rate_limit.rb +136 -0
- data/lib/appwrite/models/waf_rule_redirect.rb +121 -0
- data/lib/appwrite/services/account.rb +301 -5
- data/lib/appwrite/services/avatars.rb +71 -0
- data/lib/appwrite/services/databases.rb +4 -1
- data/lib/appwrite/services/documents_db.rb +4 -1
- data/lib/appwrite/services/domains.rb +2318 -0
- data/lib/appwrite/services/functions.rb +11 -3
- data/lib/appwrite/services/locale.rb +49 -14
- data/lib/appwrite/services/messaging.rb +130 -6
- data/lib/appwrite/services/oauth2.rb +45 -0
- data/lib/appwrite/services/organization.rb +225 -0
- data/lib/appwrite/services/project.rb +439 -15
- data/lib/appwrite/services/sites.rb +11 -3
- data/lib/appwrite/services/tables_db.rb +4 -1
- data/lib/appwrite/services/teams.rb +4 -1
- data/lib/appwrite/services/vectors_db.rb +4 -1
- data/lib/appwrite/services/waf.rb +859 -0
- data/lib/appwrite.rb +42 -0
- metadata +44 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class WafRuleDeny
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :updated_at
|
|
9
|
+
attr_reader :name
|
|
10
|
+
attr_reader :description
|
|
11
|
+
attr_reader :team_id
|
|
12
|
+
attr_reader :project_id
|
|
13
|
+
attr_reader :resource_type
|
|
14
|
+
attr_reader :resource_id
|
|
15
|
+
attr_reader :action
|
|
16
|
+
attr_reader :priority
|
|
17
|
+
attr_reader :enabled
|
|
18
|
+
attr_reader :conditions
|
|
19
|
+
attr_reader :config
|
|
20
|
+
|
|
21
|
+
def initialize(
|
|
22
|
+
id:,
|
|
23
|
+
created_at:,
|
|
24
|
+
updated_at:,
|
|
25
|
+
name:,
|
|
26
|
+
description:,
|
|
27
|
+
team_id:,
|
|
28
|
+
project_id:,
|
|
29
|
+
resource_type:,
|
|
30
|
+
resource_id:,
|
|
31
|
+
action:,
|
|
32
|
+
priority:,
|
|
33
|
+
enabled:,
|
|
34
|
+
conditions:,
|
|
35
|
+
config:
|
|
36
|
+
)
|
|
37
|
+
@id = id
|
|
38
|
+
@created_at = created_at
|
|
39
|
+
@updated_at = updated_at
|
|
40
|
+
@name = name
|
|
41
|
+
@description = description
|
|
42
|
+
@team_id = team_id
|
|
43
|
+
@project_id = project_id
|
|
44
|
+
@resource_type = resource_type
|
|
45
|
+
@resource_id = resource_id
|
|
46
|
+
@action = validate_action(action)
|
|
47
|
+
@priority = priority
|
|
48
|
+
@enabled = enabled
|
|
49
|
+
@conditions = conditions
|
|
50
|
+
@config = config
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.from(map:)
|
|
54
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "description" => "", "teamId" => "", "projectId" => "", "resourceType" => "api", "resourceId" => "", "priority" => 0, "enabled" => true, "conditions" => [], "config" => {} }.merge(map)
|
|
55
|
+
WafRuleDeny.new(
|
|
56
|
+
id: map["$id"],
|
|
57
|
+
created_at: map["$createdAt"],
|
|
58
|
+
updated_at: map["$updatedAt"],
|
|
59
|
+
name: map["name"],
|
|
60
|
+
description: map["description"],
|
|
61
|
+
team_id: map["teamId"],
|
|
62
|
+
project_id: map["projectId"],
|
|
63
|
+
resource_type: map["resourceType"],
|
|
64
|
+
resource_id: map["resourceId"],
|
|
65
|
+
action: map["action"],
|
|
66
|
+
priority: map["priority"],
|
|
67
|
+
enabled: map["enabled"],
|
|
68
|
+
conditions: map["conditions"],
|
|
69
|
+
config: map["config"]
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def to_map
|
|
74
|
+
{
|
|
75
|
+
"$id": @id,
|
|
76
|
+
"$createdAt": @created_at,
|
|
77
|
+
"$updatedAt": @updated_at,
|
|
78
|
+
"name": @name,
|
|
79
|
+
"description": @description,
|
|
80
|
+
"teamId": @team_id,
|
|
81
|
+
"projectId": @project_id,
|
|
82
|
+
"resourceType": @resource_type,
|
|
83
|
+
"resourceId": @resource_id,
|
|
84
|
+
"action": @action,
|
|
85
|
+
"priority": @priority,
|
|
86
|
+
"enabled": @enabled,
|
|
87
|
+
"conditions": @conditions,
|
|
88
|
+
"config": @config
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
private
|
|
93
|
+
|
|
94
|
+
def validate_action(action)
|
|
95
|
+
valid_action = [
|
|
96
|
+
Appwrite::Enums::WafRuleAction::BYPASS,
|
|
97
|
+
Appwrite::Enums::WafRuleAction::DENY,
|
|
98
|
+
Appwrite::Enums::WafRuleAction::CHALLENGE,
|
|
99
|
+
Appwrite::Enums::WafRuleAction::RATELIMIT,
|
|
100
|
+
Appwrite::Enums::WafRuleAction::REDIRECT,
|
|
101
|
+
]
|
|
102
|
+
|
|
103
|
+
unless valid_action.include?(action)
|
|
104
|
+
raise ArgumentError, "Invalid " + action + ". Must be one of: " + valid_action.join(', ')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
action
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class WafRuleList
|
|
6
|
+
attr_reader :total
|
|
7
|
+
attr_reader :rules
|
|
8
|
+
|
|
9
|
+
def initialize(
|
|
10
|
+
total:,
|
|
11
|
+
rules:
|
|
12
|
+
)
|
|
13
|
+
@total = total
|
|
14
|
+
@rules = rules
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def self.from(map:)
|
|
18
|
+
map = { "total" => 0, "rules" => [] }.merge(map)
|
|
19
|
+
WafRuleList.new(
|
|
20
|
+
total: map["total"],
|
|
21
|
+
rules: map["rules"]
|
|
22
|
+
)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def to_map
|
|
26
|
+
{
|
|
27
|
+
"total": @total,
|
|
28
|
+
"rules": @rules
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class WafRuleRateLimit
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :updated_at
|
|
9
|
+
attr_reader :name
|
|
10
|
+
attr_reader :description
|
|
11
|
+
attr_reader :team_id
|
|
12
|
+
attr_reader :project_id
|
|
13
|
+
attr_reader :resource_type
|
|
14
|
+
attr_reader :resource_id
|
|
15
|
+
attr_reader :action
|
|
16
|
+
attr_reader :priority
|
|
17
|
+
attr_reader :enabled
|
|
18
|
+
attr_reader :conditions
|
|
19
|
+
attr_reader :config
|
|
20
|
+
attr_reader :limit
|
|
21
|
+
attr_reader :interval
|
|
22
|
+
attr_reader :key
|
|
23
|
+
attr_reader :strategy
|
|
24
|
+
attr_reader :max_bucket_size
|
|
25
|
+
|
|
26
|
+
def initialize(
|
|
27
|
+
id:,
|
|
28
|
+
created_at:,
|
|
29
|
+
updated_at:,
|
|
30
|
+
name:,
|
|
31
|
+
description:,
|
|
32
|
+
team_id:,
|
|
33
|
+
project_id:,
|
|
34
|
+
resource_type:,
|
|
35
|
+
resource_id:,
|
|
36
|
+
action:,
|
|
37
|
+
priority:,
|
|
38
|
+
enabled:,
|
|
39
|
+
conditions:,
|
|
40
|
+
config:,
|
|
41
|
+
limit:,
|
|
42
|
+
interval:,
|
|
43
|
+
key:,
|
|
44
|
+
strategy:,
|
|
45
|
+
max_bucket_size:
|
|
46
|
+
)
|
|
47
|
+
@id = id
|
|
48
|
+
@created_at = created_at
|
|
49
|
+
@updated_at = updated_at
|
|
50
|
+
@name = name
|
|
51
|
+
@description = description
|
|
52
|
+
@team_id = team_id
|
|
53
|
+
@project_id = project_id
|
|
54
|
+
@resource_type = resource_type
|
|
55
|
+
@resource_id = resource_id
|
|
56
|
+
@action = validate_action(action)
|
|
57
|
+
@priority = priority
|
|
58
|
+
@enabled = enabled
|
|
59
|
+
@conditions = conditions
|
|
60
|
+
@config = config
|
|
61
|
+
@limit = limit
|
|
62
|
+
@interval = interval
|
|
63
|
+
@key = key
|
|
64
|
+
@strategy = strategy
|
|
65
|
+
@max_bucket_size = max_bucket_size
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def self.from(map:)
|
|
69
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "description" => "", "teamId" => "", "projectId" => "", "resourceType" => "api", "resourceId" => "", "priority" => 0, "enabled" => true, "conditions" => [], "config" => {}, "limit" => 100, "interval" => 3600, "key" => "ip", "strategy" => "fixedWindow", "maxBucketSize" => 0 }.merge(map)
|
|
70
|
+
WafRuleRateLimit.new(
|
|
71
|
+
id: map["$id"],
|
|
72
|
+
created_at: map["$createdAt"],
|
|
73
|
+
updated_at: map["$updatedAt"],
|
|
74
|
+
name: map["name"],
|
|
75
|
+
description: map["description"],
|
|
76
|
+
team_id: map["teamId"],
|
|
77
|
+
project_id: map["projectId"],
|
|
78
|
+
resource_type: map["resourceType"],
|
|
79
|
+
resource_id: map["resourceId"],
|
|
80
|
+
action: map["action"],
|
|
81
|
+
priority: map["priority"],
|
|
82
|
+
enabled: map["enabled"],
|
|
83
|
+
conditions: map["conditions"],
|
|
84
|
+
config: map["config"],
|
|
85
|
+
limit: map["limit"],
|
|
86
|
+
interval: map["interval"],
|
|
87
|
+
key: map["key"],
|
|
88
|
+
strategy: map["strategy"],
|
|
89
|
+
max_bucket_size: map["maxBucketSize"]
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def to_map
|
|
94
|
+
{
|
|
95
|
+
"$id": @id,
|
|
96
|
+
"$createdAt": @created_at,
|
|
97
|
+
"$updatedAt": @updated_at,
|
|
98
|
+
"name": @name,
|
|
99
|
+
"description": @description,
|
|
100
|
+
"teamId": @team_id,
|
|
101
|
+
"projectId": @project_id,
|
|
102
|
+
"resourceType": @resource_type,
|
|
103
|
+
"resourceId": @resource_id,
|
|
104
|
+
"action": @action,
|
|
105
|
+
"priority": @priority,
|
|
106
|
+
"enabled": @enabled,
|
|
107
|
+
"conditions": @conditions,
|
|
108
|
+
"config": @config,
|
|
109
|
+
"limit": @limit,
|
|
110
|
+
"interval": @interval,
|
|
111
|
+
"key": @key,
|
|
112
|
+
"strategy": @strategy,
|
|
113
|
+
"maxBucketSize": @max_bucket_size
|
|
114
|
+
}
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
private
|
|
118
|
+
|
|
119
|
+
def validate_action(action)
|
|
120
|
+
valid_action = [
|
|
121
|
+
Appwrite::Enums::WafRuleAction::BYPASS,
|
|
122
|
+
Appwrite::Enums::WafRuleAction::DENY,
|
|
123
|
+
Appwrite::Enums::WafRuleAction::CHALLENGE,
|
|
124
|
+
Appwrite::Enums::WafRuleAction::RATELIMIT,
|
|
125
|
+
Appwrite::Enums::WafRuleAction::REDIRECT,
|
|
126
|
+
]
|
|
127
|
+
|
|
128
|
+
unless valid_action.include?(action)
|
|
129
|
+
raise ArgumentError, "Invalid " + action + ". Must be one of: " + valid_action.join(', ')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
action
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class WafRuleRedirect
|
|
6
|
+
attr_reader :id
|
|
7
|
+
attr_reader :created_at
|
|
8
|
+
attr_reader :updated_at
|
|
9
|
+
attr_reader :name
|
|
10
|
+
attr_reader :description
|
|
11
|
+
attr_reader :team_id
|
|
12
|
+
attr_reader :project_id
|
|
13
|
+
attr_reader :resource_type
|
|
14
|
+
attr_reader :resource_id
|
|
15
|
+
attr_reader :action
|
|
16
|
+
attr_reader :priority
|
|
17
|
+
attr_reader :enabled
|
|
18
|
+
attr_reader :conditions
|
|
19
|
+
attr_reader :config
|
|
20
|
+
attr_reader :location
|
|
21
|
+
attr_reader :status_code
|
|
22
|
+
|
|
23
|
+
def initialize(
|
|
24
|
+
id:,
|
|
25
|
+
created_at:,
|
|
26
|
+
updated_at:,
|
|
27
|
+
name:,
|
|
28
|
+
description:,
|
|
29
|
+
team_id:,
|
|
30
|
+
project_id:,
|
|
31
|
+
resource_type:,
|
|
32
|
+
resource_id:,
|
|
33
|
+
action:,
|
|
34
|
+
priority:,
|
|
35
|
+
enabled:,
|
|
36
|
+
conditions:,
|
|
37
|
+
config:,
|
|
38
|
+
location:,
|
|
39
|
+
status_code:
|
|
40
|
+
)
|
|
41
|
+
@id = id
|
|
42
|
+
@created_at = created_at
|
|
43
|
+
@updated_at = updated_at
|
|
44
|
+
@name = name
|
|
45
|
+
@description = description
|
|
46
|
+
@team_id = team_id
|
|
47
|
+
@project_id = project_id
|
|
48
|
+
@resource_type = resource_type
|
|
49
|
+
@resource_id = resource_id
|
|
50
|
+
@action = validate_action(action)
|
|
51
|
+
@priority = priority
|
|
52
|
+
@enabled = enabled
|
|
53
|
+
@conditions = conditions
|
|
54
|
+
@config = config
|
|
55
|
+
@location = location
|
|
56
|
+
@status_code = status_code
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def self.from(map:)
|
|
60
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "description" => "", "teamId" => "", "projectId" => "", "resourceType" => "api", "resourceId" => "", "priority" => 0, "enabled" => true, "conditions" => [], "config" => {}, "location" => "/", "statusCode" => 302 }.merge(map)
|
|
61
|
+
WafRuleRedirect.new(
|
|
62
|
+
id: map["$id"],
|
|
63
|
+
created_at: map["$createdAt"],
|
|
64
|
+
updated_at: map["$updatedAt"],
|
|
65
|
+
name: map["name"],
|
|
66
|
+
description: map["description"],
|
|
67
|
+
team_id: map["teamId"],
|
|
68
|
+
project_id: map["projectId"],
|
|
69
|
+
resource_type: map["resourceType"],
|
|
70
|
+
resource_id: map["resourceId"],
|
|
71
|
+
action: map["action"],
|
|
72
|
+
priority: map["priority"],
|
|
73
|
+
enabled: map["enabled"],
|
|
74
|
+
conditions: map["conditions"],
|
|
75
|
+
config: map["config"],
|
|
76
|
+
location: map["location"],
|
|
77
|
+
status_code: map["statusCode"]
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def to_map
|
|
82
|
+
{
|
|
83
|
+
"$id": @id,
|
|
84
|
+
"$createdAt": @created_at,
|
|
85
|
+
"$updatedAt": @updated_at,
|
|
86
|
+
"name": @name,
|
|
87
|
+
"description": @description,
|
|
88
|
+
"teamId": @team_id,
|
|
89
|
+
"projectId": @project_id,
|
|
90
|
+
"resourceType": @resource_type,
|
|
91
|
+
"resourceId": @resource_id,
|
|
92
|
+
"action": @action,
|
|
93
|
+
"priority": @priority,
|
|
94
|
+
"enabled": @enabled,
|
|
95
|
+
"conditions": @conditions,
|
|
96
|
+
"config": @config,
|
|
97
|
+
"location": @location,
|
|
98
|
+
"statusCode": @status_code
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
private
|
|
103
|
+
|
|
104
|
+
def validate_action(action)
|
|
105
|
+
valid_action = [
|
|
106
|
+
Appwrite::Enums::WafRuleAction::BYPASS,
|
|
107
|
+
Appwrite::Enums::WafRuleAction::DENY,
|
|
108
|
+
Appwrite::Enums::WafRuleAction::CHALLENGE,
|
|
109
|
+
Appwrite::Enums::WafRuleAction::RATELIMIT,
|
|
110
|
+
Appwrite::Enums::WafRuleAction::REDIRECT,
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
unless valid_action.include?(action)
|
|
114
|
+
raise ArgumentError, "Invalid " + action + ". Must be one of: " + valid_action.join(', ')
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
action
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|