appwrite 30.2.0 → 30.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 +2 -2
- data/lib/appwrite/enums/image_format.rb +1 -0
- data/lib/appwrite/enums/o_auth_provider.rb +14 -0
- data/lib/appwrite/enums/project_auth_method_id.rb +1 -0
- data/lib/appwrite/enums/project_key_scopes.rb +6 -0
- data/lib/appwrite/enums/project_ldap_encryption.rb +9 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +14 -0
- data/lib/appwrite/models/domain_price.rb +8 -3
- data/lib/appwrite/models/o_auth2_atlassian.rb +43 -0
- data/lib/appwrite/models/o_auth2_instagram.rb +43 -0
- data/lib/appwrite/models/o_auth2_line.rb +43 -0
- data/lib/appwrite/models/o_auth2_linear.rb +43 -0
- data/lib/appwrite/models/o_auth2_naver.rb +43 -0
- data/lib/appwrite/models/o_auth2_netlify.rb +43 -0
- data/lib/appwrite/models/o_auth2_patreon.rb +43 -0
- data/lib/appwrite/models/o_auth2_railway.rb +43 -0
- data/lib/appwrite/models/o_auth2_reddit.rb +43 -0
- data/lib/appwrite/models/o_auth2_roblox.rb +43 -0
- data/lib/appwrite/models/o_auth2_strava.rb +43 -0
- data/lib/appwrite/models/o_auth2_vercel.rb +43 -0
- data/lib/appwrite/models/o_auth2_vk.rb +43 -0
- data/lib/appwrite/models/o_auth2_work_os.rb +43 -0
- data/lib/appwrite/models/project.rb +81 -1
- data/lib/appwrite/models/project_auth_method.rb +1 -0
- data/lib/appwrite/models/site.rb +14 -4
- data/lib/appwrite/services/account.rb +51 -1
- data/lib/appwrite/services/avatars.rb +5 -2
- data/lib/appwrite/services/domains.rb +5 -4
- data/lib/appwrite/services/messaging.rb +208 -0
- data/lib/appwrite/services/project.rb +706 -2
- data/lib/appwrite/services/sites.rb +44 -0
- data/lib/appwrite/services/storage.rb +5 -2
- data/lib/appwrite.rb +15 -0
- metadata +17 -2
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Strava
|
|
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
|
+
map = { "$id" => "", "enabled" => false, "clientId" => "", "clientSecret" => "" }.merge(map)
|
|
25
|
+
OAuth2Strava.new(
|
|
26
|
+
id: map["$id"],
|
|
27
|
+
enabled: map["enabled"],
|
|
28
|
+
client_id: map["clientId"],
|
|
29
|
+
client_secret: map["clientSecret"]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_map
|
|
34
|
+
{
|
|
35
|
+
"$id": @id,
|
|
36
|
+
"enabled": @enabled,
|
|
37
|
+
"clientId": @client_id,
|
|
38
|
+
"clientSecret": @client_secret
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Vercel
|
|
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
|
+
map = { "$id" => "", "enabled" => false, "clientId" => "", "clientSecret" => "" }.merge(map)
|
|
25
|
+
OAuth2Vercel.new(
|
|
26
|
+
id: map["$id"],
|
|
27
|
+
enabled: map["enabled"],
|
|
28
|
+
client_id: map["clientId"],
|
|
29
|
+
client_secret: map["clientSecret"]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_map
|
|
34
|
+
{
|
|
35
|
+
"$id": @id,
|
|
36
|
+
"enabled": @enabled,
|
|
37
|
+
"clientId": @client_id,
|
|
38
|
+
"clientSecret": @client_secret
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2VK
|
|
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
|
+
map = { "$id" => "", "enabled" => false, "clientId" => "", "clientSecret" => "" }.merge(map)
|
|
25
|
+
OAuth2VK.new(
|
|
26
|
+
id: map["$id"],
|
|
27
|
+
enabled: map["enabled"],
|
|
28
|
+
client_id: map["clientId"],
|
|
29
|
+
client_secret: map["clientSecret"]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_map
|
|
34
|
+
{
|
|
35
|
+
"$id": @id,
|
|
36
|
+
"enabled": @enabled,
|
|
37
|
+
"clientId": @client_id,
|
|
38
|
+
"clientSecret": @client_secret
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2WorkOS
|
|
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
|
+
map = { "$id" => "", "enabled" => false, "clientId" => "", "clientSecret" => "" }.merge(map)
|
|
25
|
+
OAuth2WorkOS.new(
|
|
26
|
+
id: map["$id"],
|
|
27
|
+
enabled: map["enabled"],
|
|
28
|
+
client_id: map["clientId"],
|
|
29
|
+
client_secret: map["clientSecret"]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_map
|
|
34
|
+
{
|
|
35
|
+
"$id": @id,
|
|
36
|
+
"enabled": @enabled,
|
|
37
|
+
"clientId": @client_id,
|
|
38
|
+
"clientSecret": @client_secret
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -19,6 +19,22 @@ module Appwrite
|
|
|
19
19
|
attr_reader :smtp_username
|
|
20
20
|
attr_reader :smtp_password
|
|
21
21
|
attr_reader :smtp_secure
|
|
22
|
+
attr_reader :ldap_enabled
|
|
23
|
+
attr_reader :ldap_hosts
|
|
24
|
+
attr_reader :ldap_port
|
|
25
|
+
attr_reader :ldap_encryption
|
|
26
|
+
attr_reader :ldap_verification
|
|
27
|
+
attr_reader :ldap_certificate
|
|
28
|
+
attr_reader :ldap_timeout
|
|
29
|
+
attr_reader :ldap_base_dn
|
|
30
|
+
attr_reader :ldap_bind_dn
|
|
31
|
+
attr_reader :ldap_bind_password
|
|
32
|
+
attr_reader :ldap_user_filter
|
|
33
|
+
attr_reader :ldap_required_group_dn
|
|
34
|
+
attr_reader :ldap_id_attribute
|
|
35
|
+
attr_reader :ldap_email_attribute
|
|
36
|
+
attr_reader :ldap_name_attribute
|
|
37
|
+
attr_reader :ldap_phone_attribute
|
|
22
38
|
attr_reader :ping_count
|
|
23
39
|
attr_reader :pinged_at
|
|
24
40
|
attr_reader :labels
|
|
@@ -71,6 +87,22 @@ module Appwrite
|
|
|
71
87
|
smtp_username:,
|
|
72
88
|
smtp_password:,
|
|
73
89
|
smtp_secure:,
|
|
90
|
+
ldap_enabled:,
|
|
91
|
+
ldap_hosts:,
|
|
92
|
+
ldap_port:,
|
|
93
|
+
ldap_encryption:,
|
|
94
|
+
ldap_verification:,
|
|
95
|
+
ldap_certificate:,
|
|
96
|
+
ldap_timeout:,
|
|
97
|
+
ldap_base_dn:,
|
|
98
|
+
ldap_bind_dn:,
|
|
99
|
+
ldap_bind_password:,
|
|
100
|
+
ldap_user_filter:,
|
|
101
|
+
ldap_required_group_dn:,
|
|
102
|
+
ldap_id_attribute:,
|
|
103
|
+
ldap_email_attribute:,
|
|
104
|
+
ldap_name_attribute:,
|
|
105
|
+
ldap_phone_attribute:,
|
|
74
106
|
ping_count:,
|
|
75
107
|
pinged_at:,
|
|
76
108
|
labels:,
|
|
@@ -122,6 +154,22 @@ module Appwrite
|
|
|
122
154
|
@smtp_username = smtp_username
|
|
123
155
|
@smtp_password = smtp_password
|
|
124
156
|
@smtp_secure = smtp_secure
|
|
157
|
+
@ldap_enabled = ldap_enabled
|
|
158
|
+
@ldap_hosts = ldap_hosts
|
|
159
|
+
@ldap_port = ldap_port
|
|
160
|
+
@ldap_encryption = ldap_encryption
|
|
161
|
+
@ldap_verification = ldap_verification
|
|
162
|
+
@ldap_certificate = ldap_certificate
|
|
163
|
+
@ldap_timeout = ldap_timeout
|
|
164
|
+
@ldap_base_dn = ldap_base_dn
|
|
165
|
+
@ldap_bind_dn = ldap_bind_dn
|
|
166
|
+
@ldap_bind_password = ldap_bind_password
|
|
167
|
+
@ldap_user_filter = ldap_user_filter
|
|
168
|
+
@ldap_required_group_dn = ldap_required_group_dn
|
|
169
|
+
@ldap_id_attribute = ldap_id_attribute
|
|
170
|
+
@ldap_email_attribute = ldap_email_attribute
|
|
171
|
+
@ldap_name_attribute = ldap_name_attribute
|
|
172
|
+
@ldap_phone_attribute = ldap_phone_attribute
|
|
125
173
|
@ping_count = ping_count
|
|
126
174
|
@pinged_at = pinged_at
|
|
127
175
|
@labels = labels
|
|
@@ -159,7 +207,7 @@ module Appwrite
|
|
|
159
207
|
end
|
|
160
208
|
|
|
161
209
|
def self.from(map:)
|
|
162
|
-
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "teamId" => "", "region" => "fra", "smtpEnabled" => false, "smtpSenderName" => "", "smtpSenderEmail" => "", "smtpReplyToName" => "", "smtpReplyToEmail" => "", "smtpHost" => "", "smtpPort" => 0, "smtpUsername" => "", "smtpPassword" => "", "smtpSecure" => "", "pingCount" => 0, "pingedAt" => "", "labels" => [], "status" => "active", "onboarding" => {}, "authMethods" => [], "services" => [], "protocols" => [], "blocks" => [], "consoleAccessedAt" => "" }.merge(map)
|
|
210
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "teamId" => "", "region" => "fra", "smtpEnabled" => false, "smtpSenderName" => "", "smtpSenderEmail" => "", "smtpReplyToName" => "", "smtpReplyToEmail" => "", "smtpHost" => "", "smtpPort" => 0, "smtpUsername" => "", "smtpPassword" => "", "smtpSecure" => "", "ldapEnabled" => false, "ldapHosts" => [], "ldapPort" => 636, "ldapEncryption" => "ldaps", "ldapVerification" => true, "ldapCertificate" => "", "ldapTimeout" => 10, "ldapBaseDn" => "", "ldapBindDn" => "", "ldapBindPassword" => "", "ldapUserFilter" => "(uid={username})", "ldapRequiredGroupDn" => "", "ldapIdAttribute" => "entryUUID", "ldapEmailAttribute" => "mail", "ldapNameAttribute" => "cn", "ldapPhoneAttribute" => "", "pingCount" => 0, "pingedAt" => "", "labels" => [], "status" => "active", "onboarding" => {}, "authMethods" => [], "services" => [], "protocols" => [], "blocks" => [], "consoleAccessedAt" => "" }.merge(map)
|
|
163
211
|
Project.new(
|
|
164
212
|
id: map["$id"],
|
|
165
213
|
created_at: map["$createdAt"],
|
|
@@ -177,6 +225,22 @@ module Appwrite
|
|
|
177
225
|
smtp_username: map["smtpUsername"],
|
|
178
226
|
smtp_password: map["smtpPassword"],
|
|
179
227
|
smtp_secure: map["smtpSecure"],
|
|
228
|
+
ldap_enabled: map["ldapEnabled"],
|
|
229
|
+
ldap_hosts: map["ldapHosts"],
|
|
230
|
+
ldap_port: map["ldapPort"],
|
|
231
|
+
ldap_encryption: map["ldapEncryption"],
|
|
232
|
+
ldap_verification: map["ldapVerification"],
|
|
233
|
+
ldap_certificate: map["ldapCertificate"],
|
|
234
|
+
ldap_timeout: map["ldapTimeout"],
|
|
235
|
+
ldap_base_dn: map["ldapBaseDn"],
|
|
236
|
+
ldap_bind_dn: map["ldapBindDn"],
|
|
237
|
+
ldap_bind_password: map["ldapBindPassword"],
|
|
238
|
+
ldap_user_filter: map["ldapUserFilter"],
|
|
239
|
+
ldap_required_group_dn: map["ldapRequiredGroupDn"],
|
|
240
|
+
ldap_id_attribute: map["ldapIdAttribute"],
|
|
241
|
+
ldap_email_attribute: map["ldapEmailAttribute"],
|
|
242
|
+
ldap_name_attribute: map["ldapNameAttribute"],
|
|
243
|
+
ldap_phone_attribute: map["ldapPhoneAttribute"],
|
|
180
244
|
ping_count: map["pingCount"],
|
|
181
245
|
pinged_at: map["pingedAt"],
|
|
182
246
|
labels: map["labels"],
|
|
@@ -232,6 +296,22 @@ module Appwrite
|
|
|
232
296
|
"smtpUsername": @smtp_username,
|
|
233
297
|
"smtpPassword": @smtp_password,
|
|
234
298
|
"smtpSecure": @smtp_secure,
|
|
299
|
+
"ldapEnabled": @ldap_enabled,
|
|
300
|
+
"ldapHosts": @ldap_hosts,
|
|
301
|
+
"ldapPort": @ldap_port,
|
|
302
|
+
"ldapEncryption": @ldap_encryption,
|
|
303
|
+
"ldapVerification": @ldap_verification,
|
|
304
|
+
"ldapCertificate": @ldap_certificate,
|
|
305
|
+
"ldapTimeout": @ldap_timeout,
|
|
306
|
+
"ldapBaseDn": @ldap_base_dn,
|
|
307
|
+
"ldapBindDn": @ldap_bind_dn,
|
|
308
|
+
"ldapBindPassword": @ldap_bind_password,
|
|
309
|
+
"ldapUserFilter": @ldap_user_filter,
|
|
310
|
+
"ldapRequiredGroupDn": @ldap_required_group_dn,
|
|
311
|
+
"ldapIdAttribute": @ldap_id_attribute,
|
|
312
|
+
"ldapEmailAttribute": @ldap_email_attribute,
|
|
313
|
+
"ldapNameAttribute": @ldap_name_attribute,
|
|
314
|
+
"ldapPhoneAttribute": @ldap_phone_attribute,
|
|
235
315
|
"pingCount": @ping_count,
|
|
236
316
|
"pingedAt": @pinged_at,
|
|
237
317
|
"labels": @labels,
|
data/lib/appwrite/models/site.rb
CHANGED
|
@@ -39,6 +39,8 @@ module Appwrite
|
|
|
39
39
|
attr_reader :build_runtime
|
|
40
40
|
attr_reader :adapter
|
|
41
41
|
attr_reader :fallback_file
|
|
42
|
+
attr_reader :analytics_enabled
|
|
43
|
+
attr_reader :analytics_property_id
|
|
42
44
|
|
|
43
45
|
def initialize(
|
|
44
46
|
id:,
|
|
@@ -76,7 +78,9 @@ module Appwrite
|
|
|
76
78
|
runtime_specification:,
|
|
77
79
|
build_runtime:,
|
|
78
80
|
adapter:,
|
|
79
|
-
fallback_file
|
|
81
|
+
fallback_file:,
|
|
82
|
+
analytics_enabled:,
|
|
83
|
+
analytics_property_id:
|
|
80
84
|
)
|
|
81
85
|
@id = id
|
|
82
86
|
@created_at = created_at
|
|
@@ -114,10 +118,12 @@ module Appwrite
|
|
|
114
118
|
@build_runtime = build_runtime
|
|
115
119
|
@adapter = adapter
|
|
116
120
|
@fallback_file = fallback_file
|
|
121
|
+
@analytics_enabled = analytics_enabled
|
|
122
|
+
@analytics_property_id = analytics_property_id
|
|
117
123
|
end
|
|
118
124
|
|
|
119
125
|
def self.from(map:)
|
|
120
|
-
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "description" => "", "enabled" => true, "live" => true, "logging" => true, "framework" => "", "deploymentRetention" => 0, "deploymentId" => "", "deploymentCreatedAt" => "", "deploymentScreenshotLight" => "", "deploymentScreenshotDark" => "", "latestDeploymentId" => "", "latestDeploymentCreatedAt" => "", "latestDeploymentStatus" => "", "scopes" => [], "vars" => [], "timeout" => 15, "installCommand" => "", "buildCommand" => "", "startCommand" => "", "outputDirectory" => "", "installationId" => "", "providerRepositoryId" => "", "providerBranch" => "", "providerRootDirectory" => "", "providerSilentMode" => false, "providerBranches" => [], "providerPaths" => [], "buildSpecification" => "s-1vcpu-512mb", "runtimeSpecification" => "s-1vcpu-512mb", "buildRuntime" => "" }.merge(map)
|
|
126
|
+
map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "description" => "", "enabled" => true, "live" => true, "logging" => true, "framework" => "", "deploymentRetention" => 0, "deploymentId" => "", "deploymentCreatedAt" => "", "deploymentScreenshotLight" => "", "deploymentScreenshotDark" => "", "latestDeploymentId" => "", "latestDeploymentCreatedAt" => "", "latestDeploymentStatus" => "", "scopes" => [], "vars" => [], "timeout" => 15, "installCommand" => "", "buildCommand" => "", "startCommand" => "", "outputDirectory" => "", "installationId" => "", "providerRepositoryId" => "", "providerBranch" => "", "providerRootDirectory" => "", "providerSilentMode" => false, "providerBranches" => [], "providerPaths" => [], "buildSpecification" => "s-1vcpu-512mb", "runtimeSpecification" => "s-1vcpu-512mb", "buildRuntime" => "", "analyticsEnabled" => false, "analyticsPropertyId" => "" }.merge(map)
|
|
121
127
|
Site.new(
|
|
122
128
|
id: map["$id"],
|
|
123
129
|
created_at: map["$createdAt"],
|
|
@@ -154,7 +160,9 @@ module Appwrite
|
|
|
154
160
|
runtime_specification: map["runtimeSpecification"],
|
|
155
161
|
build_runtime: map["buildRuntime"],
|
|
156
162
|
adapter: map["adapter"],
|
|
157
|
-
fallback_file: map["fallbackFile"]
|
|
163
|
+
fallback_file: map["fallbackFile"],
|
|
164
|
+
analytics_enabled: map["analyticsEnabled"],
|
|
165
|
+
analytics_property_id: map["analyticsPropertyId"]
|
|
158
166
|
)
|
|
159
167
|
end
|
|
160
168
|
|
|
@@ -195,7 +203,9 @@ module Appwrite
|
|
|
195
203
|
"runtimeSpecification": @runtime_specification,
|
|
196
204
|
"buildRuntime": @build_runtime,
|
|
197
205
|
"adapter": @adapter,
|
|
198
|
-
"fallbackFile": @fallback_file
|
|
206
|
+
"fallbackFile": @fallback_file,
|
|
207
|
+
"analyticsEnabled": @analytics_enabled,
|
|
208
|
+
"analyticsPropertyId": @analytics_property_id
|
|
199
209
|
}
|
|
200
210
|
end
|
|
201
211
|
end
|
|
@@ -1768,6 +1768,56 @@ module Appwrite
|
|
|
1768
1768
|
)
|
|
1769
1769
|
end
|
|
1770
1770
|
|
|
1771
|
+
# Allow the user to login into their account by providing the username and
|
|
1772
|
+
# password they use in the project's LDAP directory. The directory verifies
|
|
1773
|
+
# the password; on the first sign-in an account is created from the directory
|
|
1774
|
+
# entry, and on later sign-ins the name, email and phone follow the
|
|
1775
|
+
# directory. This endpoint requires LDAP to be configured and enabled for the
|
|
1776
|
+
# project. A user is limited to 10 active sessions at a time by default.
|
|
1777
|
+
# [Learn more about session
|
|
1778
|
+
# limits](https://appwrite.io/docs/authentication-security#limits).
|
|
1779
|
+
#
|
|
1780
|
+
# @param [String] username Directory username, matched against the username attribute of the project's LDAP configuration.
|
|
1781
|
+
# @param [String] password Directory password.
|
|
1782
|
+
# @param [Integer] duration Session length in seconds. Minimum is 60 seconds, and it cannot exceed the project maximum session length. Defaults to the project maximum session length.
|
|
1783
|
+
#
|
|
1784
|
+
# @return [Session]
|
|
1785
|
+
def create_ldap_session(
|
|
1786
|
+
username:,
|
|
1787
|
+
password:,
|
|
1788
|
+
duration: nil
|
|
1789
|
+
)
|
|
1790
|
+
if username.nil?
|
|
1791
|
+
raise Appwrite::Exception.new('Missing required parameter: "username"')
|
|
1792
|
+
end
|
|
1793
|
+
|
|
1794
|
+
if password.nil?
|
|
1795
|
+
raise Appwrite::Exception.new('Missing required parameter: "password"')
|
|
1796
|
+
end
|
|
1797
|
+
|
|
1798
|
+
api_path = '/account/sessions/ldap'
|
|
1799
|
+
|
|
1800
|
+
api_params = {
|
|
1801
|
+
username: username,
|
|
1802
|
+
password: password,
|
|
1803
|
+
duration: duration,
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
api_headers = {
|
|
1807
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
1808
|
+
"content-type": 'application/json',
|
|
1809
|
+
"accept": 'application/json',
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
@client.call(
|
|
1813
|
+
method: 'POST',
|
|
1814
|
+
path: api_path,
|
|
1815
|
+
headers: api_headers,
|
|
1816
|
+
params: api_params,
|
|
1817
|
+
response_type: Models::Session
|
|
1818
|
+
)
|
|
1819
|
+
end
|
|
1820
|
+
|
|
1771
1821
|
#
|
|
1772
1822
|
# @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
|
|
1773
1823
|
#
|
|
@@ -2161,7 +2211,7 @@ module Appwrite
|
|
|
2161
2211
|
# about session
|
|
2162
2212
|
# limits](https://appwrite.io/docs/authentication-security#limits).
|
|
2163
2213
|
#
|
|
2164
|
-
# @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, resend, salesforce, slack, spotify, stripe, tiktok, tradeshift, tradeshiftBox, twitch, vipps, vippsSandbox, webflow, wordpress, x, yahoo, yammer, yandex, zoho, zoom.
|
|
2214
|
+
# @param [OAuthProvider] provider OAuth2 Provider. Currently, supported providers are: amazon, apple, appwrite, atlassian, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, instagram, kakao, keycloak, kick, line, linear, linkedin, microsoft, naver, netlify, notion, oidc, okta, patreon, paypal, paypalSandbox, podio, railway, reddit, resend, roblox, salesforce, slack, spotify, strava, stripe, tiktok, tradeshift, tradeshiftBox, twitch, vercel, vipps, vippsSandbox, vk, webflow, wordpress, workos, x, yahoo, yammer, yandex, zoho, zoom.
|
|
2165
2215
|
# @param [String] success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
2166
2216
|
# @param [String] failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
|
|
2167
2217
|
# @param [Array] scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
|
|
@@ -470,6 +470,9 @@ module Appwrite
|
|
|
470
470
|
# both dimensions are 0, the API provides an image at original size. If
|
|
471
471
|
# dimensions are not specified, the default viewport size is 1280x720px.
|
|
472
472
|
#
|
|
473
|
+
# Set `output` to `auto` to receive avif or webp when the `Accept` header of
|
|
474
|
+
# your request supports it, falling back to png.
|
|
475
|
+
#
|
|
473
476
|
# @param [String] url Website URL which you want to capture.
|
|
474
477
|
# @param [Hash] headers HTTP headers to send with the browser request. Only Accept and Accept-Language are allowed. Defaults to empty.
|
|
475
478
|
# @param [Integer] viewport_width Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.
|
|
@@ -489,7 +492,7 @@ module Appwrite
|
|
|
489
492
|
# @param [Integer] width Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).
|
|
490
493
|
# @param [Integer] height Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).
|
|
491
494
|
# @param [Integer] quality Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
|
|
492
|
-
# @param [ImageFormat] output Output format type (jpeg, jpg, png, gif and
|
|
495
|
+
# @param [ImageFormat] output Output format type (jpeg, jpg, png, gif, webp, heic and avif). Pass auto to serve avif or webp when the Accept header of your request supports it, falling back to png.
|
|
493
496
|
#
|
|
494
497
|
# @return []
|
|
495
498
|
def get_screenshot(
|
|
@@ -545,7 +548,7 @@ module Appwrite
|
|
|
545
548
|
|
|
546
549
|
api_headers = {
|
|
547
550
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
548
|
-
"accept": 'image
|
|
551
|
+
"accept": 'image/*',
|
|
549
552
|
}
|
|
550
553
|
|
|
551
554
|
@client.call(
|
|
@@ -128,10 +128,11 @@ module Appwrite
|
|
|
128
128
|
# domain names. Availability is resolved for all domains in a single
|
|
129
129
|
# registrar lookup. Unavailable domains have a null price for new
|
|
130
130
|
# registrations, but can still be priced for renewal, transfer, or trade.
|
|
131
|
-
#
|
|
132
|
-
#
|
|
133
|
-
#
|
|
134
|
-
#
|
|
131
|
+
# Available domains have a null price for transfers, since an unregistered
|
|
132
|
+
# domain cannot be transferred, and the reason says so. Every priced domain
|
|
133
|
+
# also carries its renewal price for the same period, so a separate renewal
|
|
134
|
+
# lookup is not needed. A domain whose price could not be resolved, for
|
|
135
|
+
# example because its TLD is not supported, is returned with a null price.
|
|
135
136
|
#
|
|
136
137
|
# @param [Array] domains Domain names to check availability and price for. Maximum of 50 domains per request.
|
|
137
138
|
# @param [Integer] period_years Number of years to calculate the domain price for. Must be at least 1.
|