appwrite 30.2.0 → 30.3.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 +1 -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 +1 -0
- data/lib/appwrite/models/domain_price.rb +8 -3
- data/lib/appwrite/models/o_auth2_naver.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/project.rb +186 -2
- data/lib/appwrite/services/sites.rb +44 -0
- data/lib/appwrite/services/storage.rb +5 -2
- data/lib/appwrite.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7518dcd2e08b6917cae0f5d68ae9d50bcf47dcafc900571435e2f10c81b85c8
|
|
4
|
+
data.tar.gz: 370850a37e56b5a72b6a700d932a42584603ec97818c46a7eb133c22f3d96ebd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f275b0df7a824ed73aa1b7314de9c8111de7f29a3c11cc27069dcbd86ca55a44ee66b75b84ed7e4f085ddcd0620a4d18ff17bdebea3e839546083284d83eb210
|
|
7
|
+
data.tar.gz: f2b1069325a832912a369204908d3026ae92377d67b97c56978fbd6a98161b14a0f895126cfe8cce21de73e4c7c99118fb9da278ddba5bf3336c7fa5c867bc5e
|
data/lib/appwrite/client.rb
CHANGED
|
@@ -14,8 +14,8 @@ module Appwrite
|
|
|
14
14
|
'x-sdk-name' => 'Ruby',
|
|
15
15
|
'x-sdk-platform' => 'server',
|
|
16
16
|
'x-sdk-language' => 'ruby',
|
|
17
|
-
'x-sdk-version' => '30.
|
|
18
|
-
'X-Appwrite-Response-Format' => '2.7.
|
|
17
|
+
'x-sdk-version' => '30.3.0',
|
|
18
|
+
'X-Appwrite-Response-Format' => '2.7.2'
|
|
19
19
|
}
|
|
20
20
|
@endpoint = 'https://cloud.appwrite.io/v1'
|
|
21
21
|
@config = {}
|
|
@@ -14,8 +14,11 @@ module Appwrite
|
|
|
14
14
|
POLICIES_WRITE = 'policies.write'
|
|
15
15
|
PROJECT_POLICIES_READ = 'project.policies.read'
|
|
16
16
|
PROJECT_POLICIES_WRITE = 'project.policies.write'
|
|
17
|
+
PROJECT_VIDEOS_PROFILES_READ = 'project.videos.profiles.read'
|
|
18
|
+
PROJECT_VIDEOS_PROFILES_WRITE = 'project.videos.profiles.write'
|
|
17
19
|
PROJECT_OAUTH2_READ = 'project.oauth2.read'
|
|
18
20
|
PROJECT_OAUTH2_WRITE = 'project.oauth2.write'
|
|
21
|
+
PROJECT_LDAP_WRITE = 'project.ldap.write'
|
|
19
22
|
TEMPLATES_READ = 'templates.read'
|
|
20
23
|
TEMPLATES_WRITE = 'templates.write'
|
|
21
24
|
STAGES_READ = 'stages.read'
|
|
@@ -112,6 +115,9 @@ module Appwrite
|
|
|
112
115
|
REVIEWS_WRITE = 'reviews.write'
|
|
113
116
|
PRESENCES_READ = 'presences.read'
|
|
114
117
|
PRESENCES_WRITE = 'presences.write'
|
|
118
|
+
VIDEOS_PLAY = 'videos.play'
|
|
119
|
+
VIDEOS_READ = 'videos.read'
|
|
120
|
+
VIDEOS_WRITE = 'videos.write'
|
|
115
121
|
DEDICATEDDATABASES_EXECUTE = 'dedicatedDatabases.execute'
|
|
116
122
|
BACKUPS_POLICIES_READ = 'backups.policies.read'
|
|
117
123
|
BACKUPS_POLICIES_WRITE = 'backups.policies.write'
|
|
@@ -11,6 +11,7 @@ module Appwrite
|
|
|
11
11
|
attr_reader :premium
|
|
12
12
|
attr_reader :renewal_price
|
|
13
13
|
attr_reader :renewal_period_years
|
|
14
|
+
attr_reader :reason
|
|
14
15
|
|
|
15
16
|
def initialize(
|
|
16
17
|
domain:,
|
|
@@ -20,7 +21,8 @@ module Appwrite
|
|
|
20
21
|
period_years:,
|
|
21
22
|
premium:,
|
|
22
23
|
renewal_price: nil,
|
|
23
|
-
renewal_period_years
|
|
24
|
+
renewal_period_years:,
|
|
25
|
+
reason: nil
|
|
24
26
|
)
|
|
25
27
|
@domain = domain
|
|
26
28
|
@tld = tld
|
|
@@ -30,6 +32,7 @@ module Appwrite
|
|
|
30
32
|
@premium = premium
|
|
31
33
|
@renewal_price = renewal_price
|
|
32
34
|
@renewal_period_years = renewal_period_years
|
|
35
|
+
@reason = reason
|
|
33
36
|
end
|
|
34
37
|
|
|
35
38
|
def self.from(map:)
|
|
@@ -42,7 +45,8 @@ module Appwrite
|
|
|
42
45
|
period_years: map["periodYears"],
|
|
43
46
|
premium: map["premium"],
|
|
44
47
|
renewal_price: map["renewalPrice"],
|
|
45
|
-
renewal_period_years: map["renewalPeriodYears"]
|
|
48
|
+
renewal_period_years: map["renewalPeriodYears"],
|
|
49
|
+
reason: map["reason"]
|
|
46
50
|
)
|
|
47
51
|
end
|
|
48
52
|
|
|
@@ -55,7 +59,8 @@ module Appwrite
|
|
|
55
59
|
"periodYears": @period_years,
|
|
56
60
|
"premium": @premium,
|
|
57
61
|
"renewalPrice": @renewal_price,
|
|
58
|
-
"renewalPeriodYears": @renewal_period_years
|
|
62
|
+
"renewalPeriodYears": @renewal_period_years,
|
|
63
|
+
"reason": @reason
|
|
59
64
|
}
|
|
60
65
|
end
|
|
61
66
|
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Appwrite
|
|
4
|
+
module Models
|
|
5
|
+
class OAuth2Naver
|
|
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
|
+
OAuth2Naver.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, auth0, authentik, autodesk, bitbucket, bitly, box, cloudflare, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, fusionauth, github, gitlab, google, huggingface, kakao, keycloak, kick, linkedin, microsoft, naver, 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.
|
|
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.
|
|
@@ -55,7 +55,7 @@ module Appwrite
|
|
|
55
55
|
# Update properties of a specific auth method. Use this endpoint to enable or
|
|
56
56
|
# disable a method in your project.
|
|
57
57
|
#
|
|
58
|
-
# @param [ProjectAuthMethodId] method_id Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone,passkey
|
|
58
|
+
# @param [ProjectAuthMethodId] method_id Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone,passkey,ldap
|
|
59
59
|
# @param [] enabled Auth method status.
|
|
60
60
|
#
|
|
61
61
|
# @return [Project]
|
|
@@ -513,6 +513,120 @@ module Appwrite
|
|
|
513
513
|
)
|
|
514
514
|
end
|
|
515
515
|
|
|
516
|
+
# Update the LDAP configuration for your project. Use this endpoint to
|
|
517
|
+
# connect your project to an LDAP directory, such as OpenLDAP or Active
|
|
518
|
+
# Directory, so users can sign in with their directory credentials. Omitted
|
|
519
|
+
# parameters keep their stored value. Enabling LDAP connects to the directory
|
|
520
|
+
# and binds as the service account, so a project cannot be left enabled with
|
|
521
|
+
# a configuration that cannot sign anyone in.
|
|
522
|
+
#
|
|
523
|
+
# @param [] enabled Enable or disable LDAP sign-in. Enabling connects to the directory to validate the configuration.
|
|
524
|
+
# @param [Array] hosts Directory hostnames or IP addresses, tried in order until one answers. IPv6 addresses can be written with or without square brackets. Maximum of 10 hosts are allowed. For example: ["ldap.example.com"]
|
|
525
|
+
# @param [Integer] port Directory port. Defaults to 636 for LDAPS and 389 otherwise.
|
|
526
|
+
# @param [ProjectLDAPEncryption] encryption Transport encryption. Use "ldaps" for TLS from the first byte, "starttls" to upgrade a plain connection, or "none" for a trusted network only. Allowed values are: none, ldaps, starttls. Defaults to ldaps.
|
|
527
|
+
# @param [] verification Certificate verification, false for disabled or true for enabled. Defaults to true. Has no effect when encryption is none.
|
|
528
|
+
# @param [String] certificate Certificate in PEM format of the authority that signed the directory certificate, or the directory certificate itself when it is self-signed. Several certificates can be given one after another. Leave empty to use the system trust store. Pass an empty string to clear a previously set value.
|
|
529
|
+
# @param [Integer] timeout Seconds to wait for the directory to connect and answer each operation. Maximum is 30 seconds. Defaults to 10.
|
|
530
|
+
# @param [String] base_dn Subtree the user search starts from. For example: ou=people,dc=example,dc=com
|
|
531
|
+
# @param [String] bind_dn Service account used to search for users. Pass an empty string if the directory allows anonymous search. For example: cn=appwrite,ou=services,dc=example,dc=com
|
|
532
|
+
# @param [String] bind_password Service account password. This property is stored securely and cannot be read in future (write-only). Required again when hosts, port, encryption, verification, certificate or bindDn change.
|
|
533
|
+
# @param [String] user_filter LDAP filter that finds the user signing in. {username} is replaced with the username they enter and must appear at least once. Pass an empty string to use the default, (uid={username}). For example: (sAMAccountName={username}) on Active Directory, or (|(uid={username})(mail={username})) to accept a username or an email address.
|
|
534
|
+
# @param [String] required_group_dn Group a user must belong to in order to sign in, checked on every sign-in. Pass an empty string to allow every user the directory authenticates. For example: cn=staff,ou=groups,dc=example,dc=com
|
|
535
|
+
# @param [String] id_attribute Attribute holding the identifier that stays the same when an entry is renamed or moved. Defaults to entryUUID; use objectGUID on Active Directory.
|
|
536
|
+
# @param [String] email_attribute Attribute holding the email address. Defaults to mail.
|
|
537
|
+
# @param [String] name_attribute Attribute holding the display name. Defaults to cn.
|
|
538
|
+
# @param [String] phone_attribute Attribute holding the phone number, in international format. Leave empty, the default, to leave the phone unmapped. For example: mobile
|
|
539
|
+
#
|
|
540
|
+
# @return [Project]
|
|
541
|
+
def update_ldap(
|
|
542
|
+
enabled: nil,
|
|
543
|
+
hosts: nil,
|
|
544
|
+
port: nil,
|
|
545
|
+
encryption: nil,
|
|
546
|
+
verification: nil,
|
|
547
|
+
certificate: nil,
|
|
548
|
+
timeout: nil,
|
|
549
|
+
base_dn: nil,
|
|
550
|
+
bind_dn: nil,
|
|
551
|
+
bind_password: nil,
|
|
552
|
+
user_filter: nil,
|
|
553
|
+
required_group_dn: nil,
|
|
554
|
+
id_attribute: nil,
|
|
555
|
+
email_attribute: nil,
|
|
556
|
+
name_attribute: nil,
|
|
557
|
+
phone_attribute: nil
|
|
558
|
+
)
|
|
559
|
+
api_path = '/project/ldap'
|
|
560
|
+
|
|
561
|
+
api_params = {
|
|
562
|
+
enabled: enabled,
|
|
563
|
+
hosts: hosts,
|
|
564
|
+
port: port,
|
|
565
|
+
encryption: encryption,
|
|
566
|
+
verification: verification,
|
|
567
|
+
certificate: certificate,
|
|
568
|
+
timeout: timeout,
|
|
569
|
+
baseDn: base_dn,
|
|
570
|
+
bindDn: bind_dn,
|
|
571
|
+
bindPassword: bind_password,
|
|
572
|
+
userFilter: user_filter,
|
|
573
|
+
requiredGroupDn: required_group_dn,
|
|
574
|
+
idAttribute: id_attribute,
|
|
575
|
+
emailAttribute: email_attribute,
|
|
576
|
+
nameAttribute: name_attribute,
|
|
577
|
+
phoneAttribute: phone_attribute,
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
api_headers = {
|
|
581
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
582
|
+
"content-type": 'application/json',
|
|
583
|
+
"accept": 'application/json',
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
@client.call(
|
|
587
|
+
method: 'PATCH',
|
|
588
|
+
path: api_path,
|
|
589
|
+
headers: api_headers,
|
|
590
|
+
params: api_params,
|
|
591
|
+
response_type: Models::Project
|
|
592
|
+
)
|
|
593
|
+
end
|
|
594
|
+
|
|
595
|
+
# Test the stored LDAP configuration against the directory without signing
|
|
596
|
+
# anyone in. Connects to the directory, binds as the service account and
|
|
597
|
+
# reads the base DN. Pass a username to also look the user up and check the
|
|
598
|
+
# required group, and a password to also verify it. The error names the step
|
|
599
|
+
# that failed.
|
|
600
|
+
#
|
|
601
|
+
# @param [String] username Username to look up in the directory. Leave empty to test the connection and service account only.
|
|
602
|
+
# @param [String] password Password of the user to verify. Only used together with a username.
|
|
603
|
+
#
|
|
604
|
+
# @return []
|
|
605
|
+
def create_ldap_test(
|
|
606
|
+
username: nil,
|
|
607
|
+
password: nil
|
|
608
|
+
)
|
|
609
|
+
api_path = '/project/ldap/tests'
|
|
610
|
+
|
|
611
|
+
api_params = {
|
|
612
|
+
username: username,
|
|
613
|
+
password: password,
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
api_headers = {
|
|
617
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
618
|
+
"content-type": 'application/json',
|
|
619
|
+
"accept": 'application/json',
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
@client.call(
|
|
623
|
+
method: 'POST',
|
|
624
|
+
path: api_path,
|
|
625
|
+
headers: api_headers,
|
|
626
|
+
params: api_params,
|
|
627
|
+
)
|
|
628
|
+
end
|
|
629
|
+
|
|
516
630
|
# Get a list of all mock phones in the project. This endpoint returns an
|
|
517
631
|
# array of all mock phones and their OTPs.
|
|
518
632
|
#
|
|
@@ -1808,6 +1922,41 @@ module Appwrite
|
|
|
1808
1922
|
)
|
|
1809
1923
|
end
|
|
1810
1924
|
|
|
1925
|
+
# Update the project OAuth2 Naver configuration.
|
|
1926
|
+
#
|
|
1927
|
+
# @param [String] client_id 'Client ID' of Naver OAuth2 app. For example: jK8pQ0000000000000Zv
|
|
1928
|
+
# @param [String] client_secret 'Client Secret' of Naver OAuth2 app. For example: 9f42A0000000000c1dEb. Find it under Application > My Applications, on the overview of your app
|
|
1929
|
+
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1930
|
+
#
|
|
1931
|
+
# @return [OAuth2Naver]
|
|
1932
|
+
def update_o_auth2_naver(
|
|
1933
|
+
client_id: nil,
|
|
1934
|
+
client_secret: nil,
|
|
1935
|
+
enabled: nil
|
|
1936
|
+
)
|
|
1937
|
+
api_path = '/project/oauth2/naver'
|
|
1938
|
+
|
|
1939
|
+
api_params = {
|
|
1940
|
+
clientId: client_id,
|
|
1941
|
+
clientSecret: client_secret,
|
|
1942
|
+
enabled: enabled,
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
api_headers = {
|
|
1946
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
1947
|
+
"content-type": 'application/json',
|
|
1948
|
+
"accept": 'application/json',
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
@client.call(
|
|
1952
|
+
method: 'PATCH',
|
|
1953
|
+
path: api_path,
|
|
1954
|
+
headers: api_headers,
|
|
1955
|
+
params: api_params,
|
|
1956
|
+
response_type: Models::OAuth2Naver
|
|
1957
|
+
)
|
|
1958
|
+
end
|
|
1959
|
+
|
|
1811
1960
|
# Update the project OAuth2 Notion configuration.
|
|
1812
1961
|
#
|
|
1813
1962
|
# @param [String] oauth_client_id 'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3
|
|
@@ -2686,7 +2835,7 @@ module Appwrite
|
|
|
2686
2835
|
#
|
|
2687
2836
|
# @param [ProjectOAuthProviderId] provider_id OAuth2 provider key. For example: github, google, apple.
|
|
2688
2837
|
#
|
|
2689
|
-
# @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Webflow, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft, OAuth2TikTok, OAuth2Kakao, OAuth2Vipps]
|
|
2838
|
+
# @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Webflow, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Resend, OAuth2Cloudflare, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft, OAuth2TikTok, OAuth2Kakao, OAuth2Naver, OAuth2Vipps]
|
|
2690
2839
|
def get_o_auth2_provider(
|
|
2691
2840
|
provider_id:
|
|
2692
2841
|
)
|
|
@@ -2955,6 +3104,11 @@ module Appwrite
|
|
|
2955
3104
|
return Models::OAuth2Kakao.from(map: response)
|
|
2956
3105
|
end
|
|
2957
3106
|
|
|
3107
|
+
if response['$id'] == 'naver'
|
|
3108
|
+
|
|
3109
|
+
return Models::OAuth2Naver.from(map: response)
|
|
3110
|
+
end
|
|
3111
|
+
|
|
2958
3112
|
if response['$id'] == 'vipps'
|
|
2959
3113
|
|
|
2960
3114
|
return Models::OAuth2Vipps.from(map: response)
|
|
@@ -2968,6 +3122,36 @@ module Appwrite
|
|
|
2968
3122
|
raise Exception, "Unable to match response to any expected response model"
|
|
2969
3123
|
end
|
|
2970
3124
|
|
|
3125
|
+
# Delete all passwords in the project, forcing every user to reset their
|
|
3126
|
+
# password. Any password set before this request stops working for email and
|
|
3127
|
+
# password sign-in immediately: signing in returns a
|
|
3128
|
+
# `user_password_reset_required` error until the user sets a new password
|
|
3129
|
+
# through password recovery, or until a new password is set for them with the
|
|
3130
|
+
# Users API. Existing sessions are not affected; call the delete sessions
|
|
3131
|
+
# endpoint to sign users out as well. Users without a password and API keys
|
|
3132
|
+
# are not affected by this action.
|
|
3133
|
+
#
|
|
3134
|
+
#
|
|
3135
|
+
# @return []
|
|
3136
|
+
def delete_passwords()
|
|
3137
|
+
api_path = '/project/passwords'
|
|
3138
|
+
|
|
3139
|
+
api_params = {}
|
|
3140
|
+
|
|
3141
|
+
api_headers = {
|
|
3142
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
3143
|
+
"content-type": 'application/json',
|
|
3144
|
+
"accept": 'application/json',
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
@client.call(
|
|
3148
|
+
method: 'DELETE',
|
|
3149
|
+
path: api_path,
|
|
3150
|
+
headers: api_headers,
|
|
3151
|
+
params: api_params,
|
|
3152
|
+
)
|
|
3153
|
+
end
|
|
3154
|
+
|
|
2971
3155
|
# Get a list of all platforms in the project. This endpoint returns an array
|
|
2972
3156
|
# of all platforms and their configurations.
|
|
2973
3157
|
#
|
|
@@ -393,6 +393,50 @@ module Appwrite
|
|
|
393
393
|
)
|
|
394
394
|
end
|
|
395
395
|
|
|
396
|
+
# Turn analytics on or off for a site. Turning it on links an analytics
|
|
397
|
+
# property named after the site, creating one on first use, and injects the
|
|
398
|
+
# tracker into pages served on the site's production domains. Turning it on
|
|
399
|
+
# also needs the `analytics.write` scope. Turning it off stops the injection
|
|
400
|
+
# and keeps the property and its data.
|
|
401
|
+
#
|
|
402
|
+
# @param [String] site_id Site ID.
|
|
403
|
+
# @param [] enabled Inject the analytics tracker into the site's production domains. Injected pageviews and events are billed as analytics usage.
|
|
404
|
+
#
|
|
405
|
+
# @return [Site]
|
|
406
|
+
def update_analytics(
|
|
407
|
+
site_id:,
|
|
408
|
+
enabled:
|
|
409
|
+
)
|
|
410
|
+
if site_id.nil? || site_id == ''
|
|
411
|
+
raise Appwrite::Exception.new('Missing required parameter: "siteId"')
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
if enabled.nil?
|
|
415
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
api_path = '/sites/{siteId}/analytics'
|
|
419
|
+
.gsub('{siteId}', @client.encode_path(site_id))
|
|
420
|
+
|
|
421
|
+
api_params = {
|
|
422
|
+
enabled: enabled,
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
api_headers = {
|
|
426
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
427
|
+
"content-type": 'application/json',
|
|
428
|
+
"accept": 'application/json',
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@client.call(
|
|
432
|
+
method: 'PATCH',
|
|
433
|
+
path: api_path,
|
|
434
|
+
headers: api_headers,
|
|
435
|
+
params: api_params,
|
|
436
|
+
response_type: Models::Site
|
|
437
|
+
)
|
|
438
|
+
end
|
|
439
|
+
|
|
396
440
|
# Update the site active deployment. Use this endpoint to switch the code
|
|
397
441
|
# deployment that should be used when visitor opens your site.
|
|
398
442
|
#
|
|
@@ -540,9 +540,12 @@ module Appwrite
|
|
|
540
540
|
# Get a file preview image. Currently, this method supports preview for image
|
|
541
541
|
# files (jpg, png, and gif), other supported formats, like pdf, docs, slides,
|
|
542
542
|
# and spreadsheets, will return the file icon image. You can also pass query
|
|
543
|
-
# string arguments for cutting and resizing your preview image.
|
|
543
|
+
# string arguments for cutting and resizing your preview image. Set `output`
|
|
544
|
+
# to `auto` to receive avif or webp when the client's `Accept` header
|
|
545
|
+
# supports it, falling back to the original image format. Preview is
|
|
544
546
|
# supported only for image files smaller than 10MB.
|
|
545
547
|
#
|
|
548
|
+
#
|
|
546
549
|
# @param [String] bucket_id Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
547
550
|
# @param [String] file_id File ID
|
|
548
551
|
# @param [Integer] width Resize preview image width, Pass an integer between 0 to 4000.
|
|
@@ -555,7 +558,7 @@ module Appwrite
|
|
|
555
558
|
# @param [Float] opacity Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
|
|
556
559
|
# @param [Integer] rotation Preview image rotation in degrees. Pass an integer between -360 and 360.
|
|
557
560
|
# @param [String] background Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
|
|
558
|
-
# @param [ImageFormat] output Output format type (jpeg, jpg, png, gif and
|
|
561
|
+
# @param [ImageFormat] output Output format type (jpeg, jpg, png, gif, webp, heic and avif). Pass auto to serve avif or webp when the client's Accept header supports it, falling back to the original format.
|
|
559
562
|
# @param [String] token File token for accessing this file.
|
|
560
563
|
#
|
|
561
564
|
# @return []
|
data/lib/appwrite.rb
CHANGED
|
@@ -199,6 +199,7 @@ require_relative 'appwrite/models/o_auth2_microsoft'
|
|
|
199
199
|
require_relative 'appwrite/models/o_auth2_resend'
|
|
200
200
|
require_relative 'appwrite/models/o_auth2_tik_tok'
|
|
201
201
|
require_relative 'appwrite/models/o_auth2_kakao'
|
|
202
|
+
require_relative 'appwrite/models/o_auth2_naver'
|
|
202
203
|
require_relative 'appwrite/models/o_auth2_provider_list'
|
|
203
204
|
require_relative 'appwrite/models/policy_password_dictionary'
|
|
204
205
|
require_relative 'appwrite/models/policy_password_history'
|
|
@@ -381,6 +382,7 @@ require_relative 'appwrite/enums/supabase_migration_resource'
|
|
|
381
382
|
require_relative 'appwrite/enums/region'
|
|
382
383
|
require_relative 'appwrite/enums/project_auth_method_id'
|
|
383
384
|
require_relative 'appwrite/enums/environment_resource'
|
|
385
|
+
require_relative 'appwrite/enums/project_ldap_encryption'
|
|
384
386
|
require_relative 'appwrite/enums/project_o_auth2_auth0_prompt'
|
|
385
387
|
require_relative 'appwrite/enums/project_o_auth2_discord_prompt'
|
|
386
388
|
require_relative 'appwrite/enums/project_o_auth2_git_hub_prompt'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appwrite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 30.
|
|
4
|
+
version: 30.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Appwrite Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: mime-types
|
|
@@ -91,6 +91,7 @@ files:
|
|
|
91
91
|
- lib/appwrite/enums/project_email_template_id.rb
|
|
92
92
|
- lib/appwrite/enums/project_email_template_locale.rb
|
|
93
93
|
- lib/appwrite/enums/project_key_scopes.rb
|
|
94
|
+
- lib/appwrite/enums/project_ldap_encryption.rb
|
|
94
95
|
- lib/appwrite/enums/project_o_auth2_auth0_prompt.rb
|
|
95
96
|
- lib/appwrite/enums/project_o_auth2_discord_prompt.rb
|
|
96
97
|
- lib/appwrite/enums/project_o_auth2_git_hub_prompt.rb
|
|
@@ -326,6 +327,7 @@ files:
|
|
|
326
327
|
- lib/appwrite/models/o_auth2_kick.rb
|
|
327
328
|
- lib/appwrite/models/o_auth2_linkedin.rb
|
|
328
329
|
- lib/appwrite/models/o_auth2_microsoft.rb
|
|
330
|
+
- lib/appwrite/models/o_auth2_naver.rb
|
|
329
331
|
- lib/appwrite/models/o_auth2_notion.rb
|
|
330
332
|
- lib/appwrite/models/o_auth2_oidc.rb
|
|
331
333
|
- lib/appwrite/models/o_auth2_okta.rb
|