zm-ruby-client 2.2.5 → 2.2.7
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/CHANGELOG.md +13 -0
- data/Gemfile +10 -2
- data/README.md +6 -3
- data/VERSION +1 -1
- data/lib/zm/client/ace/aces_collection.rb +1 -0
- data/lib/zm/client/base/account_search_objects_collection.rb +2 -0
- data/lib/zm/client/base/mailbox_infos_collection.rb +2 -0
- data/lib/zm/client/base/mailbox_prefs_collection.rb +1 -0
- data/lib/zm/client/connector/rest_account.rb +49 -15
- data/lib/zm/client/connector/soap_base.rb +2 -4
- data/lib/zm/client/connector/soap_error.rb +22 -2
- data/lib/zm/client/contact/contact.rb +8 -1
- data/lib/zm/client/contact/group_contact_jsns_builder.rb +9 -11
- data/lib/zm/client/cos/cos_servers_collection.rb +2 -0
- data/lib/zm/client/distributionlist/distributionlist_owners_collection.rb +2 -0
- data/lib/zm/client/document/document_jsns_initializer.rb +1 -1
- data/lib/zm/client/filter_rules/filter_rule.rb +9 -0
- data/lib/zm/client/filter_rules/filter_rules_builder.rb +4 -1
- data/lib/zm/client/filter_rules/filter_rules_collection.rb +11 -0
- data/lib/zm/client/message/message.rb +41 -6
- data/lib/zm/client/message/message_jsns_initializer.rb +2 -1
- data/lib/zm/client/message/messages_collection.rb +14 -0
- data/lib/zm/client/tag/account_object_tags_collection.rb +3 -1
- data/lib/zm/client/upload/upload.rb +4 -0
- data/lib/zm/modules/common/zimbra-attrs.csv +3 -1
- data/zm-ruby-client.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc00d91e324f3525589fe4aff9db5d55036d3d52881cc4e03a4019d4bd9a3f7c
|
4
|
+
data.tar.gz: 4429603c4c08dfa045d06fab04e3f1f73d90355b35ced2ebd5228888e26ef5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac9161207764343feaaa8f90d64a4ea9d179eaedecfcfdbcdebf2b7e906a8a1f3122d269321dc4b96ee441087a33957fa452f01a2c0cb3a089da887e565e7ba0
|
7
|
+
data.tar.gz: 00e61ace101d6fd24ec2c57ff9a2cf5e79bc67d612f711199517dade6c9aae779c25ca628252e1cb5e2cb4bd2b5019f1b7384914292ab3dd2fbb0b124d8e2738
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## Unreleased [3.0.0]
|
4
|
+
|
5
|
+
### [3.0.0] 2025-04-14
|
6
|
+
|
7
|
+
- [Changed] Move token metadata decoder in token class
|
8
|
+
- [Changed] Move logger in ClusterConfig class
|
9
|
+
- [Added] Add color in logger
|
10
|
+
- [Added] Add NoOpRequest for Mailbox object as alive? method
|
11
|
+
- [Changed] Remove @all memorization
|
12
|
+
- [Added] Add BatchRequest on Cluster and Account class
|
13
|
+
- [Changed] Authorize array and undetermined parameters for add! and remove! methods
|
data/Gemfile
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
2
3
|
|
3
|
-
ruby ">=
|
4
|
+
ruby ">= 3.1"
|
4
5
|
|
5
6
|
gem 'addressable', '2.8.7'
|
6
|
-
gem 'faraday', '
|
7
|
+
gem 'faraday', '~>2.12'
|
7
8
|
gem 'faraday-multipart', '1.0.4'
|
8
9
|
gem 'version_sorter', '2.3.0'
|
10
|
+
|
11
|
+
group :development do
|
12
|
+
gem "rubocop"
|
13
|
+
gem "solargraph"
|
14
|
+
gem "yard"
|
15
|
+
gem "benchmark-ips"
|
16
|
+
end
|
data/README.md
CHANGED
@@ -19,7 +19,8 @@ gem install zm-ruby-client
|
|
19
19
|
### Connection:
|
20
20
|
|
21
21
|
```ruby
|
22
|
-
|
22
|
+
config = Zm::Client::ClusterConfig.new('config.json')
|
23
|
+
admin = Zm::Client::Cluster.new(config)
|
23
24
|
admin.login
|
24
25
|
````
|
25
26
|
or
|
@@ -27,7 +28,7 @@ or
|
|
27
28
|
config = Zm::Client::ClusterConfig.new do |cc|
|
28
29
|
cc.zimbra_admin_host = 'mail.domain.tld'
|
29
30
|
cc.zimbra_admin_scheme = 'https'
|
30
|
-
cc.zimbra_admin_port =
|
31
|
+
cc.zimbra_admin_port = 7071
|
31
32
|
cc.zimbra_admin_login = 'admin@domain.tld'
|
32
33
|
cc.zimbra_admin_password = 'secret'
|
33
34
|
end
|
@@ -53,7 +54,9 @@ account = admin.accounts.find_by name: 'maxime@domain.tld'
|
|
53
54
|
```ruby
|
54
55
|
account = Zm::Client::Account.new(admin) do |acc|
|
55
56
|
acc.name = 'maxime@domain.tld'
|
57
|
+
acc.givenName = 'Maxime'
|
58
|
+
acc.sn = 'DÉSÉCOT'
|
56
59
|
end
|
57
|
-
|
60
|
+
|
58
61
|
account.save
|
59
62
|
```
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.7
|
@@ -34,6 +34,7 @@ module Zm
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def folders(*folders)
|
37
|
+
folders.flatten!
|
37
38
|
folders.select! { |folder| folder.is_a?(Zm::Client::Folder) }
|
38
39
|
return self if folders.empty?
|
39
40
|
|
@@ -42,6 +43,7 @@ module Zm
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def folder_ids(*folder_ids)
|
46
|
+
folder_ids.flatten!
|
45
47
|
folder_ids.uniq!
|
46
48
|
return self if @folder_ids == folder_ids
|
47
49
|
|
@@ -28,36 +28,38 @@ module Zm
|
|
28
28
|
@cookies = cookies
|
29
29
|
end
|
30
30
|
|
31
|
-
def
|
31
|
+
def read(download_url)
|
32
32
|
url, path = split_url(download_url)
|
33
33
|
|
34
|
-
conn =
|
35
|
-
faraday.response :logger, nil, { headers: true, bodies: true, errors: true } if @verbose
|
36
|
-
end
|
34
|
+
conn = conn_get(url)
|
37
35
|
|
38
|
-
|
36
|
+
data = +''
|
39
37
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
f.write chunk
|
44
|
-
end
|
38
|
+
response = conn.get(path) do |request|
|
39
|
+
request.options.on_data = Proc.new do |chunk, _, _|
|
40
|
+
data.concat(chunk)
|
45
41
|
end
|
46
42
|
end
|
47
43
|
|
48
44
|
if response.status >= 400
|
49
|
-
File.unlink(dest_file_path) if File.exist?(dest_file_path)
|
50
45
|
raise RestError, "Download failure: #{response.body} (status=#{response.status})"
|
51
46
|
end
|
47
|
+
|
48
|
+
data
|
49
|
+
end
|
50
|
+
|
51
|
+
def download(download_url, dest_file_path)
|
52
|
+
url, path = split_url(download_url)
|
53
|
+
|
54
|
+
conn = conn_get(url)
|
55
|
+
|
56
|
+
write_downloaded_file(dest_file_path, conn, path)
|
52
57
|
end
|
53
58
|
|
54
59
|
def upload(upload_url, src_file_path)
|
55
60
|
url, path = split_url(upload_url)
|
56
61
|
|
57
|
-
conn =
|
58
|
-
faraday.request :multipart
|
59
|
-
faraday.response :logger, nil, { headers: true, bodies: true, errors: true } if @verbose
|
60
|
-
end
|
62
|
+
conn = conn_multipart(url)
|
61
63
|
|
62
64
|
payload = { file: Faraday::Multipart::FilePart.new(src_file_path, nil) }
|
63
65
|
response = conn.post(path, payload)
|
@@ -76,6 +78,38 @@ module Zm
|
|
76
78
|
|
77
79
|
private
|
78
80
|
|
81
|
+
def conn_get(url)
|
82
|
+
Faraday.new(**http_options(url)) do |faraday|
|
83
|
+
faraday.response :logger, nil, { headers: true, bodies: true, errors: true } if @verbose
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def conn_multipart(url)
|
88
|
+
Faraday.new(**http_options(url)) do |faraday|
|
89
|
+
faraday.request :multipart
|
90
|
+
faraday.response :logger, nil, { headers: true, bodies: true, errors: true } if @verbose
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def write_downloaded_file(dest_file_path, conn, path)
|
95
|
+
response = nil
|
96
|
+
|
97
|
+
File.open(dest_file_path, 'wb') do |f|
|
98
|
+
response = conn.get(path) do |request|
|
99
|
+
request.options.on_data = Proc.new do |chunk, _, _|
|
100
|
+
f.write chunk
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
if response.status >= 400
|
106
|
+
File.unlink(dest_file_path) if File.exist?(dest_file_path)
|
107
|
+
raise RestError, "Download failure: #{response.body} (status=#{response.status})"
|
108
|
+
end
|
109
|
+
|
110
|
+
response
|
111
|
+
end
|
112
|
+
|
79
113
|
def split_url(url)
|
80
114
|
uri = URI(url)
|
81
115
|
url = "#{uri.scheme}://#{uri.host}:#{uri.port}"
|
@@ -72,13 +72,11 @@ module Zm
|
|
72
72
|
def do_request(body, error_handler = SoapError)
|
73
73
|
response = http_client.post(@soap_path, body)
|
74
74
|
|
75
|
-
soapbody = JSON.parse(response.body, symbolize_names: true)
|
76
|
-
|
77
75
|
if response.status >= 400
|
78
|
-
raise(error_handler,
|
76
|
+
raise(error_handler, response.body)
|
79
77
|
end
|
80
78
|
|
81
|
-
|
79
|
+
JSON.parse(response.body, symbolize_names: true)
|
82
80
|
end
|
83
81
|
|
84
82
|
def envelope(soap_element)
|
@@ -9,10 +9,30 @@ module Zm
|
|
9
9
|
attr_reader :reason, :code
|
10
10
|
|
11
11
|
def initialize(soapbody)
|
12
|
-
|
13
|
-
|
12
|
+
if soapbody.start_with?('{')
|
13
|
+
init_from_json(soapbody)
|
14
|
+
elsif soapbody.start_with?('<')
|
15
|
+
init_from_xml(soapbody)
|
16
|
+
end
|
17
|
+
|
14
18
|
super "[#{@code}] [#{@reason}]"
|
15
19
|
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def init_from_json(soapbody)
|
24
|
+
json = JSON.parse(soapbody, symbolize_names: true)
|
25
|
+
@reason = json[:Body][:Fault][:Reason][:Text]
|
26
|
+
@code = json[:Body][:Fault][:Detail][:Error][:Code]
|
27
|
+
end
|
28
|
+
|
29
|
+
def init_from_xml(soapbody)
|
30
|
+
code_match = soapbody.match(%r{<Code>(.*?)</Code>})
|
31
|
+
@code = code_match[1]
|
32
|
+
|
33
|
+
text_match = soapbody.match(%r{<soap:Reason>.*?<soap:Text>(.*?)</soap:Text>}m)
|
34
|
+
@reason = text_match[1]
|
35
|
+
end
|
16
36
|
end
|
17
37
|
|
18
38
|
class AuthError < SoapError
|
@@ -10,7 +10,14 @@ module Zm
|
|
10
10
|
GROUP_PATTERN = 'group'
|
11
11
|
|
12
12
|
attr_accessor :anniversary, :assistantPhone, :birthday, :callbackPhone, :carPhone, :company, :companyPhone,
|
13
|
-
:custom1, :department, :email, :email2, :email3, :email4, :email5, :email6, :email7, :firstName,
|
13
|
+
:custom1, :department, :email, :email2, :email3, :email4, :email5, :email6, :email7, :firstName,
|
14
|
+
:fullName, :homeCity, :homeCountry, :homeFax, :homePhone, :homePostalCode, :homeState, :homeStreet,
|
15
|
+
:homeURL, :imAddress1, :imAddress2, :imAddress3, :imAddress4, :imAddress5, :jobTitle, :lastName,
|
16
|
+
:maidenName, :middleName, :mobilePhone, :namePrefix, :nameSuffix, :nickname, :notes, :otherCity,
|
17
|
+
:otherCountry, :otherFax, :otherPhone, :otherPostalCode, :otherState, :otherStreet, :otherURL,
|
18
|
+
:pager, :workCity, :workCountry, :workFax, :workPhone, :workPostalCode, :workState, :workStreet,
|
19
|
+
:workURL, :image, :id, :name, :l, :type, :tn, :shared_account_id, :shared_folder_account_id,
|
20
|
+
:fileAs
|
14
21
|
|
15
22
|
def initialize(parent)
|
16
23
|
@l = FolderDefault::CONTACTS[:id]
|
@@ -7,11 +7,13 @@ module Zm
|
|
7
7
|
EXCLUDE_INSTANCE_VARIABLE_KEYS = %i[@id @name @parent @l @type @tn @jsns_builder].freeze
|
8
8
|
|
9
9
|
def to_jsns
|
10
|
-
{
|
10
|
+
jsns = {
|
11
11
|
cn: {
|
12
12
|
a: instance_variables_array.map(&Utils::A_NODE_PROC),
|
13
13
|
l: @item.folder_id || Zm::Client::FolderDefault::CONTACTS[:id],
|
14
|
-
m:
|
14
|
+
m: @item.members.all.map do |m|
|
15
|
+
{ type: m.type, value: m.value }
|
16
|
+
end
|
15
17
|
}
|
16
18
|
}
|
17
19
|
|
@@ -23,7 +25,9 @@ module Zm
|
|
23
25
|
cn: {
|
24
26
|
a: instance_variables_array.map(&Utils::A_NODE_PROC),
|
25
27
|
id: @item.id,
|
26
|
-
m:
|
28
|
+
m: @item.members.all.reject(&:current?).map do |m|
|
29
|
+
{ type: m.type, value: m.value, op: m.op }
|
30
|
+
end
|
27
31
|
}
|
28
32
|
}
|
29
33
|
|
@@ -31,7 +35,7 @@ module Zm
|
|
31
35
|
end
|
32
36
|
|
33
37
|
def to_patch(hash)
|
34
|
-
{
|
38
|
+
jsns = {
|
35
39
|
cn: {
|
36
40
|
id: @item.id,
|
37
41
|
a: hash.map(&Utils::A_ARRAY_PROC).flatten(1).map(&Utils::A_NODE_PROC)
|
@@ -43,14 +47,8 @@ module Zm
|
|
43
47
|
|
44
48
|
alias to_create to_jsns
|
45
49
|
|
46
|
-
def members_node
|
47
|
-
@item.members.all.reject(&:current?).map do |m|
|
48
|
-
{ type: m.type, value: m.value, op: m.op }
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
50
|
def instance_variables_array
|
53
|
-
[[:nickname, @item.name], [:
|
51
|
+
[[:nickname, @item.name], [:fullName, @item.name], [:fileAs, "8:#{@item.name}"], %i[type group]]
|
54
52
|
end
|
55
53
|
end
|
56
54
|
end
|
@@ -19,6 +19,7 @@ module Zm
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def add!(*servers)
|
22
|
+
servers.flatten!
|
22
23
|
server_ids = server_ids(servers)
|
23
24
|
server_ids.delete_if { |id| @parent.zimbraMailHostPool.include?(id) }
|
24
25
|
return false if server_ids.empty?
|
@@ -31,6 +32,7 @@ module Zm
|
|
31
32
|
end
|
32
33
|
|
33
34
|
def remove!(*servers)
|
35
|
+
servers.flatten!
|
34
36
|
server_ids = server_ids(servers)
|
35
37
|
server_ids.delete_if { |id| !@parent.zimbraMailHostPool.include?(id) }
|
36
38
|
return false if server_ids.empty?
|
@@ -12,6 +12,7 @@ module Zm
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def add!(*emails)
|
15
|
+
emails.flatten!
|
15
16
|
emails.each { |email| Utils.format_email(email) }
|
16
17
|
emails.delete_if { |email| @all.include?(email) }
|
17
18
|
return false if emails.empty?
|
@@ -23,6 +24,7 @@ module Zm
|
|
23
24
|
end
|
24
25
|
|
25
26
|
def remove!(*emails)
|
27
|
+
emails.flatten!
|
26
28
|
emails.each { |email| Utils.format_email(email) }
|
27
29
|
emails.delete_if { |email| !@all.include?(email) }
|
28
30
|
return false if emails.empty?
|
@@ -5,6 +5,15 @@ module Zm
|
|
5
5
|
# class account filter rule
|
6
6
|
class FilterRule < Base::Object
|
7
7
|
attr_accessor :name, :active, :filterTests, :filterActions
|
8
|
+
|
9
|
+
def to_h
|
10
|
+
{
|
11
|
+
name: name,
|
12
|
+
active: active,
|
13
|
+
filterTests: filterTests,
|
14
|
+
filterActions: filterActions
|
15
|
+
}
|
16
|
+
end
|
8
17
|
end
|
9
18
|
end
|
10
19
|
end
|
@@ -12,7 +12,10 @@ module Zm
|
|
12
12
|
def make
|
13
13
|
return [] if json_items.nil?
|
14
14
|
|
15
|
-
json_items.first[:filterRule]
|
15
|
+
rules = json_items.first[:filterRule]
|
16
|
+
return [] if rules.nil?
|
17
|
+
|
18
|
+
rules.map do |entry|
|
16
19
|
FilterRuleJsnsInitializer.create(@parent, entry)
|
17
20
|
end
|
18
21
|
end
|
@@ -10,6 +10,17 @@ module Zm
|
|
10
10
|
super(parent)
|
11
11
|
end
|
12
12
|
|
13
|
+
def save!
|
14
|
+
return false unless defined? @all
|
15
|
+
|
16
|
+
soap_request = SoapElement.mail(SoapMailConstants::MODIFY_FILTER_RULES_REQUEST)
|
17
|
+
node_rules = SoapElement.create(:filterRules).add_attribute(:filterRule, @all.map(&:to_h))
|
18
|
+
soap_request.add_node(node_rules)
|
19
|
+
@parent.sacc.invoke(soap_request)
|
20
|
+
|
21
|
+
true
|
22
|
+
end
|
23
|
+
|
13
24
|
private
|
14
25
|
|
15
26
|
def make_query
|
@@ -7,18 +7,33 @@ module Zm
|
|
7
7
|
include BelongsToFolder
|
8
8
|
include BelongsToTag
|
9
9
|
|
10
|
-
attr_accessor :id, :d, :l, :f, :su, :fr, :autoSendTime, :mid, :idnt, :tn, :subject
|
11
|
-
|
10
|
+
attr_accessor :id, :d, :l, :f, :su, :fr, :autoSendTime, :mid, :idnt, :tn, :subject, :s
|
11
|
+
|
12
|
+
alias size s
|
12
13
|
|
13
14
|
def initialize(parent)
|
14
15
|
@parent = parent
|
15
16
|
@subject = ''
|
16
17
|
|
18
|
+
yield(self) if block_given?
|
19
|
+
end
|
20
|
+
|
21
|
+
def recipients
|
22
|
+
return @recipients if defined? @recipients
|
23
|
+
|
17
24
|
@recipients = Recipients.new
|
18
|
-
|
25
|
+
end
|
26
|
+
|
27
|
+
def attachments
|
28
|
+
return @attachments if defined? @attachments
|
29
|
+
|
19
30
|
@attachments = AttachmentsCollection.new
|
31
|
+
end
|
20
32
|
|
21
|
-
|
33
|
+
def body
|
34
|
+
return @body if defined? @body
|
35
|
+
|
36
|
+
@body = Body.new
|
22
37
|
end
|
23
38
|
|
24
39
|
def download(dest_file_path, fmt = 'eml')
|
@@ -26,6 +41,11 @@ module Zm
|
|
26
41
|
uploader.download_file( Zm::Client::FolderDefault::ROOT[:path], fmt, [Zm::Client::FolderView::MESSAGE], [@id], dest_file_path)
|
27
42
|
end
|
28
43
|
|
44
|
+
def read(fmt = 'eml')
|
45
|
+
uploader = Upload.new(@parent, RestAccountConnector.new)
|
46
|
+
uploader.read_file( Zm::Client::FolderDefault::ROOT[:path], fmt, [Zm::Client::FolderView::MESSAGE], [@id])
|
47
|
+
end
|
48
|
+
|
29
49
|
def date
|
30
50
|
@date ||= Time.at(d.to_i / 1000)
|
31
51
|
end
|
@@ -42,8 +62,23 @@ module Zm
|
|
42
62
|
raise NotImplementedError
|
43
63
|
end
|
44
64
|
|
45
|
-
def update!(
|
46
|
-
|
65
|
+
def update!(l: nil, rgb: nil, color: nil, f: nil, tn: nil)
|
66
|
+
attrs = {
|
67
|
+
op: :update,
|
68
|
+
id: @id,
|
69
|
+
l: l,
|
70
|
+
rgb: rgb,
|
71
|
+
color: color,
|
72
|
+
f: f,
|
73
|
+
tn: tn
|
74
|
+
}
|
75
|
+
|
76
|
+
attrs.delete_if { |_, v| v.nil? }
|
77
|
+
|
78
|
+
soap_request = SoapElement.mail(SoapMailConstants::MSG_ACTION_REQUEST)
|
79
|
+
node_action = SoapElement.create(SoapConstants::ACTION).add_attributes(attrs)
|
80
|
+
soap_request.add_node(node_action)
|
81
|
+
@parent.sacc.invoke(soap_request)
|
47
82
|
end
|
48
83
|
|
49
84
|
def rename!(*args)
|
@@ -23,6 +23,20 @@ module Zm
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
def delete_all(ids)
|
27
|
+
attrs = {
|
28
|
+
op: :delete,
|
29
|
+
id: ids.join(',')
|
30
|
+
}
|
31
|
+
|
32
|
+
attrs.delete_if { |_, v| v.nil? }
|
33
|
+
|
34
|
+
soap_request = SoapElement.mail(SoapMailConstants::MSG_ACTION_REQUEST)
|
35
|
+
node_action = SoapElement.create(SoapConstants::ACTION).add_attributes(attrs)
|
36
|
+
soap_request.add_node(node_action)
|
37
|
+
@parent.sacc.invoke(soap_request)
|
38
|
+
end
|
39
|
+
|
26
40
|
private
|
27
41
|
|
28
42
|
def build_options
|
@@ -13,10 +13,11 @@ module Zm
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def all!
|
16
|
-
@all = @parent.tn
|
16
|
+
@all = @parent.tn.split(',')
|
17
17
|
end
|
18
18
|
|
19
19
|
def add!(*new_tags)
|
20
|
+
new_tags.flatten!
|
20
21
|
Utils.map_format(new_tags, String, :name)
|
21
22
|
return false if new_tags.delete_if { |tag_name| all.include?(tag_name) }.empty?
|
22
23
|
|
@@ -35,6 +36,7 @@ module Zm
|
|
35
36
|
end
|
36
37
|
|
37
38
|
def remove!(*tag_names)
|
39
|
+
tag_names.flatten!
|
38
40
|
Utils.map_format(tag_names, String, :name)
|
39
41
|
return false if tag_names.delete_if { |tag_name| !all.include?(tag_name) }.empty?
|
40
42
|
|
@@ -26,6 +26,10 @@ module Zm
|
|
26
26
|
@rac.download(download_file_url(folder_path, fmt, types, ids), dest_file_path)
|
27
27
|
end
|
28
28
|
|
29
|
+
def read_file(folder_path, fmt, types, ids)
|
30
|
+
@rac.read(download_file_url(folder_path, fmt, types, ids))
|
31
|
+
end
|
32
|
+
|
29
33
|
def download_folder(id, fmt, dest_file_path)
|
30
34
|
@rac.download(download_folder_url(id, fmt), dest_file_path)
|
31
35
|
end
|
@@ -733,4 +733,6 @@ zimbraPrefDefaultCalendarId,"account,cos,calendarResource",,,single,,,cstring,,,
|
|
733
733
|
zimbraRecoveryAccountCodeValidity,"account,cos,calendarResource",,,single,,,cstring,,,,
|
734
734
|
zimbraResetPasswordRecoveryCodeExpiry,"account,cos,calendarResource",,,single,,,cstring,,,,
|
735
735
|
zimbraShowClientTOS,"account,domain,cos,calendarResource",,,single,,,cstring,,,,
|
736
|
-
zimbraDistributionListSendShareMessageToNewMembers,distributionList,,,single,,,boolean,,,,
|
736
|
+
zimbraDistributionListSendShareMessageToNewMembers,distributionList,,,single,,,boolean,,,,
|
737
|
+
zimbraServiceEnabled,,,server,multi,,,cstring,,,,
|
738
|
+
zimbraVirtualHostname,domain,,,single,,,cstring,,,,
|
data/zm-ruby-client.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zm-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxime Désécot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -87,6 +87,7 @@ extensions: []
|
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
89
|
- ".gitignore"
|
90
|
+
- CHANGELOG.md
|
90
91
|
- Gemfile
|
91
92
|
- LICENSE
|
92
93
|
- README.md
|
@@ -340,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
340
341
|
- !ruby/object:Gem::Version
|
341
342
|
version: 1.8.11
|
342
343
|
requirements: []
|
343
|
-
rubygems_version: 3.
|
344
|
+
rubygems_version: 3.5.22
|
344
345
|
signing_key:
|
345
346
|
specification_version: 4
|
346
347
|
summary: zm-ruby-client
|