appwrite 24.2.0 → 25.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 +1 -1
- data/lib/appwrite/enums/backup_services.rb +1 -0
- data/lib/appwrite/enums/{theme.rb → browser_theme.rb} +1 -1
- data/lib/appwrite/enums/build_runtime.rb +2 -3
- data/lib/appwrite/enums/{name.rb → health_queue_name.rb} +1 -1
- data/lib/appwrite/enums/organization_key_scopes.rb +16 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +0 -2
- data/lib/appwrite/enums/project_policy_id.rb +3 -0
- data/lib/appwrite/enums/region.rb +12 -0
- data/lib/appwrite/enums/runtime.rb +2 -3
- data/lib/appwrite/enums/status_code.rb +4 -4
- data/lib/appwrite/models/activity_event.rb +20 -20
- data/lib/appwrite/models/function.rb +10 -0
- data/lib/appwrite/models/policy_deny_aliased_email.rb +32 -0
- data/lib/appwrite/models/policy_deny_disposable_email.rb +32 -0
- data/lib/appwrite/models/policy_deny_free_email.rb +32 -0
- data/lib/appwrite/models/presence.rb +2 -6
- data/lib/appwrite/models/presence_list.rb +0 -4
- data/lib/appwrite/models/project_list.rb +32 -0
- data/lib/appwrite/models/site.rb +10 -0
- data/lib/appwrite/models/usage_gauge.rb +13 -3
- data/lib/appwrite/services/avatars.rb +1 -1
- data/lib/appwrite/services/functions.rb +10 -2
- data/lib/appwrite/services/health.rb +1 -1
- data/lib/appwrite/services/organization.rb +349 -0
- data/lib/appwrite/services/presences.rb +1 -1
- data/lib/appwrite/services/project.rb +66 -51
- data/lib/appwrite/services/sites.rb +10 -2
- data/lib/appwrite/services/usage.rb +10 -10
- data/lib/appwrite.rb +12 -6
- metadata +11 -5
- data/lib/appwrite/enums/scopes.rb +0 -100
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dfd2490881b125f29ab7d8d65ac5934317484bfbc15a0793f512f3cc9d464d76
|
|
4
|
+
data.tar.gz: 7880fbf970bb0fd2a39da4e2a9ffa1435628f1525f9dbcd1ab37ab8a67752c57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c8dc0aeb0e1670c64ab2f605b6fefc7185a523dac9597982db580794ebf13f06d6c6481383cc635a68fdc247ec800f72eb081fc9f828e873ce255ef0cd8e4b6d
|
|
7
|
+
data.tar.gz: b322e85c4907fd3bc68501b3cef4272e877696edb0efc4d53168bb648782a7e951bae8eb7999c088daa7755e8483f0c38b634ff51be965166270dba87be1f7ff
|
data/lib/appwrite/client.rb
CHANGED
|
@@ -32,9 +32,6 @@ module Appwrite
|
|
|
32
32
|
PYTHON_ML_3_11 = 'python-ml-3.11'
|
|
33
33
|
PYTHON_ML_3_12 = 'python-ml-3.12'
|
|
34
34
|
PYTHON_ML_3_13 = 'python-ml-3.13'
|
|
35
|
-
DENO_1_21 = 'deno-1.21'
|
|
36
|
-
DENO_1_24 = 'deno-1.24'
|
|
37
|
-
DENO_1_35 = 'deno-1.35'
|
|
38
35
|
DENO_1_40 = 'deno-1.40'
|
|
39
36
|
DENO_1_46 = 'deno-1.46'
|
|
40
37
|
DENO_2_0 = 'deno-2.0'
|
|
@@ -53,6 +50,7 @@ module Appwrite
|
|
|
53
50
|
DART_3_9 = 'dart-3.9'
|
|
54
51
|
DART_3_10 = 'dart-3.10'
|
|
55
52
|
DART_3_11 = 'dart-3.11'
|
|
53
|
+
DART_3_12 = 'dart-3.12'
|
|
56
54
|
DOTNET_6_0 = 'dotnet-6.0'
|
|
57
55
|
DOTNET_7_0 = 'dotnet-7.0'
|
|
58
56
|
DOTNET_8_0 = 'dotnet-8.0'
|
|
@@ -93,6 +91,7 @@ module Appwrite
|
|
|
93
91
|
FLUTTER_3_35 = 'flutter-3.35'
|
|
94
92
|
FLUTTER_3_38 = 'flutter-3.38'
|
|
95
93
|
FLUTTER_3_41 = 'flutter-3.41'
|
|
94
|
+
FLUTTER_3_44 = 'flutter-3.44'
|
|
96
95
|
end
|
|
97
96
|
end
|
|
98
97
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Appwrite
|
|
2
|
+
module Enums
|
|
3
|
+
module OrganizationKeyScopes
|
|
4
|
+
PROJECTS_READ = 'projects.read'
|
|
5
|
+
PROJECTS_WRITE = 'projects.write'
|
|
6
|
+
DEVKEYS_READ = 'devKeys.read'
|
|
7
|
+
DEVKEYS_WRITE = 'devKeys.write'
|
|
8
|
+
ORGANIZATION_KEYS_READ = 'organization.keys.read'
|
|
9
|
+
ORGANIZATION_KEYS_WRITE = 'organization.keys.write'
|
|
10
|
+
DOMAINS_READ = 'domains.read'
|
|
11
|
+
DOMAINS_WRITE = 'domains.write'
|
|
12
|
+
KEYS_READ = 'keys.read'
|
|
13
|
+
KEYS_WRITE = 'keys.write'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -10,6 +10,9 @@ module Appwrite
|
|
|
10
10
|
SESSION_LIMIT = 'session-limit'
|
|
11
11
|
USER_LIMIT = 'user-limit'
|
|
12
12
|
MEMBERSHIP_PRIVACY = 'membership-privacy'
|
|
13
|
+
DENY_ALIASED_EMAIL = 'deny-aliased-email'
|
|
14
|
+
DENY_DISPOSABLE_EMAIL = 'deny-disposable-email'
|
|
15
|
+
DENY_FREE_EMAIL = 'deny-free-email'
|
|
13
16
|
end
|
|
14
17
|
end
|
|
15
18
|
end
|
|
@@ -32,9 +32,6 @@ module Appwrite
|
|
|
32
32
|
PYTHON_ML_3_11 = 'python-ml-3.11'
|
|
33
33
|
PYTHON_ML_3_12 = 'python-ml-3.12'
|
|
34
34
|
PYTHON_ML_3_13 = 'python-ml-3.13'
|
|
35
|
-
DENO_1_21 = 'deno-1.21'
|
|
36
|
-
DENO_1_24 = 'deno-1.24'
|
|
37
|
-
DENO_1_35 = 'deno-1.35'
|
|
38
35
|
DENO_1_40 = 'deno-1.40'
|
|
39
36
|
DENO_1_46 = 'deno-1.46'
|
|
40
37
|
DENO_2_0 = 'deno-2.0'
|
|
@@ -53,6 +50,7 @@ module Appwrite
|
|
|
53
50
|
DART_3_9 = 'dart-3.9'
|
|
54
51
|
DART_3_10 = 'dart-3.10'
|
|
55
52
|
DART_3_11 = 'dart-3.11'
|
|
53
|
+
DART_3_12 = 'dart-3.12'
|
|
56
54
|
DOTNET_6_0 = 'dotnet-6.0'
|
|
57
55
|
DOTNET_7_0 = 'dotnet-7.0'
|
|
58
56
|
DOTNET_8_0 = 'dotnet-8.0'
|
|
@@ -93,6 +91,7 @@ module Appwrite
|
|
|
93
91
|
FLUTTER_3_35 = 'flutter-3.35'
|
|
94
92
|
FLUTTER_3_38 = 'flutter-3.38'
|
|
95
93
|
FLUTTER_3_41 = 'flutter-3.41'
|
|
94
|
+
FLUTTER_3_44 = 'flutter-3.44'
|
|
96
95
|
end
|
|
97
96
|
end
|
|
98
97
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module Appwrite
|
|
2
2
|
module Enums
|
|
3
3
|
module StatusCode
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
MOVEDPERMANENTLY = '301'
|
|
5
|
+
FOUND = '302'
|
|
6
|
+
TEMPORARYREDIRECT = '307'
|
|
7
|
+
PERMANENTREDIRECT = '308'
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -4,10 +4,10 @@ module Appwrite
|
|
|
4
4
|
module Models
|
|
5
5
|
class ActivityEvent
|
|
6
6
|
attr_reader :id
|
|
7
|
-
attr_reader :
|
|
8
|
-
attr_reader :
|
|
9
|
-
attr_reader :
|
|
10
|
-
attr_reader :
|
|
7
|
+
attr_reader :actor_type
|
|
8
|
+
attr_reader :actor_id
|
|
9
|
+
attr_reader :actor_email
|
|
10
|
+
attr_reader :actor_name
|
|
11
11
|
attr_reader :resource_parent
|
|
12
12
|
attr_reader :resource_type
|
|
13
13
|
attr_reader :resource_id
|
|
@@ -38,10 +38,10 @@ module Appwrite
|
|
|
38
38
|
|
|
39
39
|
def initialize(
|
|
40
40
|
id:,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
actor_type:,
|
|
42
|
+
actor_id:,
|
|
43
|
+
actor_email:,
|
|
44
|
+
actor_name:,
|
|
45
45
|
resource_parent:,
|
|
46
46
|
resource_type:,
|
|
47
47
|
resource_id:,
|
|
@@ -71,10 +71,10 @@ module Appwrite
|
|
|
71
71
|
country_name:
|
|
72
72
|
)
|
|
73
73
|
@id = id
|
|
74
|
-
@
|
|
75
|
-
@
|
|
76
|
-
@
|
|
77
|
-
@
|
|
74
|
+
@actor_type = actor_type
|
|
75
|
+
@actor_id = actor_id
|
|
76
|
+
@actor_email = actor_email
|
|
77
|
+
@actor_name = actor_name
|
|
78
78
|
@resource_parent = resource_parent
|
|
79
79
|
@resource_type = resource_type
|
|
80
80
|
@resource_id = resource_id
|
|
@@ -107,10 +107,10 @@ module Appwrite
|
|
|
107
107
|
def self.from(map:)
|
|
108
108
|
ActivityEvent.new(
|
|
109
109
|
id: map["$id"],
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
actor_type: map["actorType"],
|
|
111
|
+
actor_id: map["actorId"],
|
|
112
|
+
actor_email: map["actorEmail"],
|
|
113
|
+
actor_name: map["actorName"],
|
|
114
114
|
resource_parent: map["resourceParent"],
|
|
115
115
|
resource_type: map["resourceType"],
|
|
116
116
|
resource_id: map["resourceId"],
|
|
@@ -144,10 +144,10 @@ module Appwrite
|
|
|
144
144
|
def to_map
|
|
145
145
|
{
|
|
146
146
|
"$id": @id,
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
147
|
+
"actorType": @actor_type,
|
|
148
|
+
"actorId": @actor_id,
|
|
149
|
+
"actorEmail": @actor_email,
|
|
150
|
+
"actorName": @actor_name,
|
|
151
151
|
"resourceParent": @resource_parent,
|
|
152
152
|
"resourceType": @resource_type,
|
|
153
153
|
"resourceId": @resource_id,
|
|
@@ -31,6 +31,8 @@ module Appwrite
|
|
|
31
31
|
attr_reader :provider_branch
|
|
32
32
|
attr_reader :provider_root_directory
|
|
33
33
|
attr_reader :provider_silent_mode
|
|
34
|
+
attr_reader :provider_branches
|
|
35
|
+
attr_reader :provider_paths
|
|
34
36
|
attr_reader :build_specification
|
|
35
37
|
attr_reader :runtime_specification
|
|
36
38
|
|
|
@@ -63,6 +65,8 @@ module Appwrite
|
|
|
63
65
|
provider_branch:,
|
|
64
66
|
provider_root_directory:,
|
|
65
67
|
provider_silent_mode:,
|
|
68
|
+
provider_branches:,
|
|
69
|
+
provider_paths:,
|
|
66
70
|
build_specification:,
|
|
67
71
|
runtime_specification:
|
|
68
72
|
)
|
|
@@ -94,6 +98,8 @@ module Appwrite
|
|
|
94
98
|
@provider_branch = provider_branch
|
|
95
99
|
@provider_root_directory = provider_root_directory
|
|
96
100
|
@provider_silent_mode = provider_silent_mode
|
|
101
|
+
@provider_branches = provider_branches
|
|
102
|
+
@provider_paths = provider_paths
|
|
97
103
|
@build_specification = build_specification
|
|
98
104
|
@runtime_specification = runtime_specification
|
|
99
105
|
end
|
|
@@ -128,6 +134,8 @@ module Appwrite
|
|
|
128
134
|
provider_branch: map["providerBranch"],
|
|
129
135
|
provider_root_directory: map["providerRootDirectory"],
|
|
130
136
|
provider_silent_mode: map["providerSilentMode"],
|
|
137
|
+
provider_branches: map["providerBranches"],
|
|
138
|
+
provider_paths: map["providerPaths"],
|
|
131
139
|
build_specification: map["buildSpecification"],
|
|
132
140
|
runtime_specification: map["runtimeSpecification"]
|
|
133
141
|
)
|
|
@@ -163,6 +171,8 @@ module Appwrite
|
|
|
163
171
|
"providerBranch": @provider_branch,
|
|
164
172
|
"providerRootDirectory": @provider_root_directory,
|
|
165
173
|
"providerSilentMode": @provider_silent_mode,
|
|
174
|
+
"providerBranches": @provider_branches,
|
|
175
|
+
"providerPaths": @provider_paths,
|
|
166
176
|
"buildSpecification": @build_specification,
|
|
167
177
|
"runtimeSpecification": @runtime_specification
|
|
168
178
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class PolicyDenyAliasedEmail
|
|
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
|
+
PolicyDenyAliasedEmail.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
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class PolicyDenyDisposableEmail
|
|
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
|
+
PolicyDenyDisposableEmail.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
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class PolicyDenyFreeEmail
|
|
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
|
+
PolicyDenyFreeEmail.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
|
|
@@ -22,7 +22,7 @@ module Appwrite
|
|
|
22
22
|
status: ,
|
|
23
23
|
source:,
|
|
24
24
|
expires_at: ,
|
|
25
|
-
metadata:
|
|
25
|
+
metadata:
|
|
26
26
|
)
|
|
27
27
|
@id = id
|
|
28
28
|
@created_at = created_at
|
|
@@ -45,7 +45,7 @@ module Appwrite
|
|
|
45
45
|
status: map["status"],
|
|
46
46
|
source: map["source"],
|
|
47
47
|
expires_at: map["expiresAt"],
|
|
48
|
-
metadata: map["metadata"]
|
|
48
|
+
metadata: map["metadata"]
|
|
49
49
|
)
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -62,10 +62,6 @@ module Appwrite
|
|
|
62
62
|
"metadata": @metadata
|
|
63
63
|
}
|
|
64
64
|
end
|
|
65
|
-
|
|
66
|
-
def convert_to(from_json)
|
|
67
|
-
from_json.call(metadata)
|
|
68
|
-
end
|
|
69
65
|
end
|
|
70
66
|
end
|
|
71
67
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class ProjectList
|
|
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
|
+
ProjectList.new(
|
|
19
|
+
total: map["total"],
|
|
20
|
+
projects: map["projects"].map { |it| Project.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
|
data/lib/appwrite/models/site.rb
CHANGED
|
@@ -30,6 +30,8 @@ module Appwrite
|
|
|
30
30
|
attr_reader :provider_branch
|
|
31
31
|
attr_reader :provider_root_directory
|
|
32
32
|
attr_reader :provider_silent_mode
|
|
33
|
+
attr_reader :provider_branches
|
|
34
|
+
attr_reader :provider_paths
|
|
33
35
|
attr_reader :build_specification
|
|
34
36
|
attr_reader :runtime_specification
|
|
35
37
|
attr_reader :build_runtime
|
|
@@ -64,6 +66,8 @@ module Appwrite
|
|
|
64
66
|
provider_branch:,
|
|
65
67
|
provider_root_directory:,
|
|
66
68
|
provider_silent_mode:,
|
|
69
|
+
provider_branches:,
|
|
70
|
+
provider_paths:,
|
|
67
71
|
build_specification:,
|
|
68
72
|
runtime_specification:,
|
|
69
73
|
build_runtime:,
|
|
@@ -97,6 +101,8 @@ module Appwrite
|
|
|
97
101
|
@provider_branch = provider_branch
|
|
98
102
|
@provider_root_directory = provider_root_directory
|
|
99
103
|
@provider_silent_mode = provider_silent_mode
|
|
104
|
+
@provider_branches = provider_branches
|
|
105
|
+
@provider_paths = provider_paths
|
|
100
106
|
@build_specification = build_specification
|
|
101
107
|
@runtime_specification = runtime_specification
|
|
102
108
|
@build_runtime = build_runtime
|
|
@@ -133,6 +139,8 @@ module Appwrite
|
|
|
133
139
|
provider_branch: map["providerBranch"],
|
|
134
140
|
provider_root_directory: map["providerRootDirectory"],
|
|
135
141
|
provider_silent_mode: map["providerSilentMode"],
|
|
142
|
+
provider_branches: map["providerBranches"],
|
|
143
|
+
provider_paths: map["providerPaths"],
|
|
136
144
|
build_specification: map["buildSpecification"],
|
|
137
145
|
runtime_specification: map["runtimeSpecification"],
|
|
138
146
|
build_runtime: map["buildRuntime"],
|
|
@@ -170,6 +178,8 @@ module Appwrite
|
|
|
170
178
|
"providerBranch": @provider_branch,
|
|
171
179
|
"providerRootDirectory": @provider_root_directory,
|
|
172
180
|
"providerSilentMode": @provider_silent_mode,
|
|
181
|
+
"providerBranches": @provider_branches,
|
|
182
|
+
"providerPaths": @provider_paths,
|
|
173
183
|
"buildSpecification": @build_specification,
|
|
174
184
|
"runtimeSpecification": @runtime_specification,
|
|
175
185
|
"buildRuntime": @build_runtime,
|
|
@@ -6,22 +6,30 @@ module Appwrite
|
|
|
6
6
|
attr_reader :metric
|
|
7
7
|
attr_reader :value
|
|
8
8
|
attr_reader :time
|
|
9
|
+
attr_reader :resource_type
|
|
10
|
+
attr_reader :resource_id
|
|
9
11
|
|
|
10
12
|
def initialize(
|
|
11
13
|
metric:,
|
|
12
14
|
value:,
|
|
13
|
-
time
|
|
15
|
+
time:,
|
|
16
|
+
resource_type:,
|
|
17
|
+
resource_id:
|
|
14
18
|
)
|
|
15
19
|
@metric = metric
|
|
16
20
|
@value = value
|
|
17
21
|
@time = time
|
|
22
|
+
@resource_type = resource_type
|
|
23
|
+
@resource_id = resource_id
|
|
18
24
|
end
|
|
19
25
|
|
|
20
26
|
def self.from(map:)
|
|
21
27
|
UsageGauge.new(
|
|
22
28
|
metric: map["metric"],
|
|
23
29
|
value: map["value"],
|
|
24
|
-
time: map["time"]
|
|
30
|
+
time: map["time"],
|
|
31
|
+
resource_type: map["resourceType"],
|
|
32
|
+
resource_id: map["resourceId"]
|
|
25
33
|
)
|
|
26
34
|
end
|
|
27
35
|
|
|
@@ -29,7 +37,9 @@ module Appwrite
|
|
|
29
37
|
{
|
|
30
38
|
"metric": @metric,
|
|
31
39
|
"value": @value,
|
|
32
|
-
"time": @time
|
|
40
|
+
"time": @time,
|
|
41
|
+
"resourceType": @resource_type,
|
|
42
|
+
"resourceId": @resource_id
|
|
33
43
|
}
|
|
34
44
|
end
|
|
35
45
|
end
|
|
@@ -305,7 +305,7 @@ module Appwrite
|
|
|
305
305
|
# @param [Integer] viewport_width Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.
|
|
306
306
|
# @param [Integer] viewport_height Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.
|
|
307
307
|
# @param [Float] scale Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.
|
|
308
|
-
# @param [
|
|
308
|
+
# @param [BrowserTheme] theme Browser theme. Pass "light" or "dark". Defaults to "light".
|
|
309
309
|
# @param [String] user_agent Custom user agent string. Defaults to browser default.
|
|
310
310
|
# @param [] fullpage Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.
|
|
311
311
|
# @param [String] locale Browser locale (e.g., "en-US", "fr-FR"). Defaults to browser default.
|
|
@@ -59,12 +59,14 @@ module Appwrite
|
|
|
59
59
|
# @param [String] provider_branch Production branch for the repo linked to the function.
|
|
60
60
|
# @param [] provider_silent_mode Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
61
61
|
# @param [String] provider_root_directory Path to function code in the linked repo.
|
|
62
|
+
# @param [Array] provider_branches List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
|
|
63
|
+
# @param [Array] provider_paths List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
|
|
62
64
|
# @param [String] build_specification Build specification for the function deployments.
|
|
63
65
|
# @param [String] runtime_specification Runtime specification for the function executions.
|
|
64
66
|
# @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
65
67
|
#
|
|
66
68
|
# @return [Function]
|
|
67
|
-
def create(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
|
|
69
|
+
def create(function_id:, name:, runtime:, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, provider_branches: nil, provider_paths: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
|
|
68
70
|
api_path = '/functions'
|
|
69
71
|
|
|
70
72
|
if function_id.nil?
|
|
@@ -97,6 +99,8 @@ module Appwrite
|
|
|
97
99
|
providerBranch: provider_branch,
|
|
98
100
|
providerSilentMode: provider_silent_mode,
|
|
99
101
|
providerRootDirectory: provider_root_directory,
|
|
102
|
+
providerBranches: provider_branches,
|
|
103
|
+
providerPaths: provider_paths,
|
|
100
104
|
buildSpecification: build_specification,
|
|
101
105
|
runtimeSpecification: runtime_specification,
|
|
102
106
|
deploymentRetention: deployment_retention,
|
|
@@ -210,12 +214,14 @@ module Appwrite
|
|
|
210
214
|
# @param [String] provider_branch Production branch for the repo linked to the function
|
|
211
215
|
# @param [] provider_silent_mode Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
212
216
|
# @param [String] provider_root_directory Path to function code in the linked repo.
|
|
217
|
+
# @param [Array] provider_branches List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
|
|
218
|
+
# @param [Array] provider_paths List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
|
|
213
219
|
# @param [String] build_specification Build specification for the function deployments.
|
|
214
220
|
# @param [String] runtime_specification Runtime specification for the function executions.
|
|
215
221
|
# @param [Integer] deployment_retention Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
216
222
|
#
|
|
217
223
|
# @return [Function]
|
|
218
|
-
def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
|
|
224
|
+
def update(function_id:, name:, runtime: nil, execute: nil, events: nil, schedule: nil, timeout: nil, enabled: nil, logging: nil, entrypoint: nil, commands: nil, scopes: nil, installation_id: nil, provider_repository_id: nil, provider_branch: nil, provider_silent_mode: nil, provider_root_directory: nil, provider_branches: nil, provider_paths: nil, build_specification: nil, runtime_specification: nil, deployment_retention: nil)
|
|
219
225
|
api_path = '/functions/{functionId}'
|
|
220
226
|
.gsub('{functionId}', function_id)
|
|
221
227
|
|
|
@@ -244,6 +250,8 @@ module Appwrite
|
|
|
244
250
|
providerBranch: provider_branch,
|
|
245
251
|
providerSilentMode: provider_silent_mode,
|
|
246
252
|
providerRootDirectory: provider_root_directory,
|
|
253
|
+
providerBranches: provider_branches,
|
|
254
|
+
providerPaths: provider_paths,
|
|
247
255
|
buildSpecification: build_specification,
|
|
248
256
|
runtimeSpecification: runtime_specification,
|
|
249
257
|
deploymentRetention: deployment_retention,
|
|
@@ -314,7 +314,7 @@ module Appwrite
|
|
|
314
314
|
# Returns the amount of failed jobs in a given queue.
|
|
315
315
|
#
|
|
316
316
|
#
|
|
317
|
-
# @param [
|
|
317
|
+
# @param [HealthQueueName] name The name of the queue
|
|
318
318
|
# @param [Integer] threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
319
319
|
#
|
|
320
320
|
# @return [HealthQueue]
|