comet_backup_ruby_sdk 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +2 -2
- data/comet_backup_ruby_sdk.gemspec +2 -2
- data/lib/comet/comet_server.rb +64 -0
- data/lib/comet/definitions.rb +20 -2
- data/lib/comet/models/email_report_generated_preview.rb +25 -0
- data/lib/comet/models/office_365connection.rb +8 -0
- data/lib/comet/models/server_meta_branding_properties.rb +9 -0
- data/lib/comet_backup_ruby_sdk.rb +4 -0
- metadata +5 -5
- data/comet_backup_ruby_sdk-1.8.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1351a43776da0134fbbc0f29301c07bf21684f24fad024a2b24311c6c5f1993b
|
4
|
+
data.tar.gz: a21014914d06619f590dce35f990036d4369a76287a6d654a5565fb373ebf003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c1267509de43041f58a02f46edd7aeb2d57eb7a464b5ba018d86398132bff04f94a5cc75bd6f04942a04fdd08a3a7e558c31cea467aae5090f192a75cb11a07
|
7
|
+
data.tar.gz: 8f5b8df8f2d55019e6ca2efd9ad5025d5d31e9bb00babd2fc82c3aeb3a434f4e6f790385cd8643170b4eb69ba2f30cb6d6fc4f59460f5177865f01678ec0ac08
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 2021-11-24 v3.18.0
|
4
|
+
- Based on 21.9.12
|
5
|
+
- Add support for Thai and Danish localizations
|
6
|
+
- Add From and To fields to the EmailReportGenerated API
|
7
|
+
- Add `AdminDispatcherEmailPreview` api method for requesting the HTML content of an email
|
8
|
+
- Add `ImageEtag` field to the response of the ServerMetaBrandingProperties endpoint.
|
9
|
+
- Add support for new engine properties on the Office365 backup type.
|
10
|
+
- Add `AdminDispatcherOffice365ListVirtualAccounts` api method for requesting Objects that Office365 is capable of backing up.
|
11
|
+
|
3
12
|
## 2021-10-21 1.9.0
|
4
13
|
- Based on 21.9.7
|
5
14
|
- Add Support for `HideFiles` parameter in B2 Destination Locations
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
comet_backup_ruby_sdk (1.
|
4
|
+
comet_backup_ruby_sdk (1.10.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -33,7 +33,7 @@ PLATFORMS
|
|
33
33
|
ruby
|
34
34
|
|
35
35
|
DEPENDENCIES
|
36
|
-
bundler (~> 1.
|
36
|
+
bundler (~> 2.1.4)
|
37
37
|
comet_backup_ruby_sdk!
|
38
38
|
minitest (~> 5.14)
|
39
39
|
rake (~> 13.0)
|
@@ -12,7 +12,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
12
12
|
|
13
13
|
Gem::Specification.new do |spec|
|
14
14
|
spec.name = 'comet_backup_ruby_sdk'
|
15
|
-
spec.version = '1.
|
15
|
+
spec.version = '1.10.0'
|
16
16
|
spec.authors = ['Comet Licensing Ltd.']
|
17
17
|
spec.email = ['hello@cometbackup.com']
|
18
18
|
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
end
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
31
|
+
spec.add_development_dependency 'bundler', '~> 2.1.4'
|
32
32
|
spec.add_development_dependency 'minitest', '~> 5.14'
|
33
33
|
spec.add_development_dependency 'rake', '~> 13.0'
|
34
34
|
spec.add_development_dependency 'rubocop', '~> 0.88'
|
data/lib/comet/comet_server.rb
CHANGED
@@ -1001,6 +1001,42 @@ module Comet
|
|
1001
1001
|
ret
|
1002
1002
|
end
|
1003
1003
|
|
1004
|
+
# AdminDispatcherEmailPreview
|
1005
|
+
#
|
1006
|
+
# Request HTML content of an email.
|
1007
|
+
# The remote device must have given consent for an MSP to browse their mail
|
1008
|
+
#
|
1009
|
+
# You must supply administrator authentication credentials to use this API.
|
1010
|
+
# This API requires the Auth Role to be enabled.
|
1011
|
+
#
|
1012
|
+
# @param [String] target_id The live connection GUID
|
1013
|
+
# @param [String] snapshot where the email belongs to
|
1014
|
+
# @param [String] destination The Storage Vault ID
|
1015
|
+
# @param [String] path of the email to view
|
1016
|
+
# @return [Comet::EmailReportGeneratedPreview]
|
1017
|
+
def admin_dispatcher_email_preview(target_id, snapshot, destination, path)
|
1018
|
+
submit_params = {}
|
1019
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1020
|
+
|
1021
|
+
submit_params['TargetID'] = target_id
|
1022
|
+
raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
|
1023
|
+
|
1024
|
+
submit_params['Snapshot'] = snapshot
|
1025
|
+
raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
|
1026
|
+
|
1027
|
+
submit_params['Destination'] = destination
|
1028
|
+
raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
|
1029
|
+
|
1030
|
+
submit_params['Path'] = path
|
1031
|
+
|
1032
|
+
body = perform_request('api/v1/admin/dispatcher/email-preview', submit_params)
|
1033
|
+
json_body = JSON.parse body
|
1034
|
+
check_status json_body
|
1035
|
+
ret = Comet::EmailReportGeneratedPreview.new
|
1036
|
+
ret.from_hash(json_body)
|
1037
|
+
ret
|
1038
|
+
end
|
1039
|
+
|
1004
1040
|
# AdminDispatcherImportApply
|
1005
1041
|
#
|
1006
1042
|
# Instruct a live connected device to import settings from an installed product.
|
@@ -1077,6 +1113,34 @@ module Comet
|
|
1077
1113
|
ret
|
1078
1114
|
end
|
1079
1115
|
|
1116
|
+
# AdminDispatcherOffice365ListVirtualAccounts
|
1117
|
+
#
|
1118
|
+
# Request a list of Office365 Resources (groups, sites, teams groups and users).
|
1119
|
+
# The remote device must have given consent for an MSP to browse their files.
|
1120
|
+
#
|
1121
|
+
# You must supply administrator authentication credentials to use this API.
|
1122
|
+
# This API requires the Auth Role to be enabled.
|
1123
|
+
#
|
1124
|
+
# @param [String] target_id The live connection GUID
|
1125
|
+
# @param [Comet::Office365Credential] credentials The Office365 account credential
|
1126
|
+
# @return [Comet::BrowseOffice365ListVirtualAccountsResponse]
|
1127
|
+
def admin_dispatcher_office_365list_virtual_accounts(target_id, credentials)
|
1128
|
+
submit_params = {}
|
1129
|
+
raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
|
1130
|
+
|
1131
|
+
submit_params['TargetID'] = target_id
|
1132
|
+
raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
|
1133
|
+
|
1134
|
+
submit_params['Credentials'] = credentials.to_json
|
1135
|
+
|
1136
|
+
body = perform_request('api/v1/admin/dispatcher/office365-list-virtual-accounts', submit_params)
|
1137
|
+
json_body = JSON.parse body
|
1138
|
+
check_status json_body
|
1139
|
+
ret = Comet::BrowseOffice365ListVirtualAccountsResponse.new
|
1140
|
+
ret.from_hash(json_body)
|
1141
|
+
ret
|
1142
|
+
end
|
1143
|
+
|
1080
1144
|
# AdminDispatcherPingDestination
|
1081
1145
|
#
|
1082
1146
|
# Test the connection to the storage bucket.
|
data/lib/comet/definitions.rb
CHANGED
@@ -155,6 +155,24 @@ module Comet
|
|
155
155
|
|
156
156
|
MONGODB_DEFAULT_PORT = 27_017
|
157
157
|
|
158
|
+
SERVICE_CALENDAR = 1
|
159
|
+
|
160
|
+
SERVICE_CONTACT = 2
|
161
|
+
|
162
|
+
SERVICE_MAIL = 4
|
163
|
+
|
164
|
+
SERVICE_SHAREPOINT = 8
|
165
|
+
|
166
|
+
SERVICE_ONEDRIVE = 16
|
167
|
+
|
168
|
+
MIXED_VIRTUAL_ACCOUNT_TYPE_USER = 1
|
169
|
+
|
170
|
+
MIXED_VIRTUAL_ACCOUNT_TYPE_GROUP = 2
|
171
|
+
|
172
|
+
MIXED_VIRTUAL_ACCOUNT_TYPE_TEAM_GROUP = 3
|
173
|
+
|
174
|
+
MIXED_VIRTUAL_ACCOUNT_TYPE_SHAREPOINT_ONLY = 4
|
175
|
+
|
158
176
|
# RestoreType:
|
159
177
|
RESTORETYPE_INVALID = -1
|
160
178
|
|
@@ -412,13 +430,13 @@ module Comet
|
|
412
430
|
|
413
431
|
DEFAULT_TIMEZONE = 'UTC'
|
414
432
|
|
415
|
-
APPLICATION_VERSION = '21.9.
|
433
|
+
APPLICATION_VERSION = '21.9.12'
|
416
434
|
|
417
435
|
APPLICATION_VERSION_MAJOR = 21
|
418
436
|
|
419
437
|
APPLICATION_VERSION_MINOR = 9
|
420
438
|
|
421
|
-
APPLICATION_VERSION_REVISION =
|
439
|
+
APPLICATION_VERSION_REVISION = 12
|
422
440
|
|
423
441
|
RELEASE_CODENAME = 'Voyager'
|
424
442
|
|
@@ -20,6 +20,12 @@ module Comet
|
|
20
20
|
# @type [String] message
|
21
21
|
attr_accessor :message
|
22
22
|
|
23
|
+
# @type [String] from
|
24
|
+
attr_accessor :from
|
25
|
+
|
26
|
+
# @type [Array<String>] to
|
27
|
+
attr_accessor :to
|
28
|
+
|
23
29
|
# @type [String] email_subject
|
24
30
|
attr_accessor :email_subject
|
25
31
|
|
@@ -39,6 +45,8 @@ module Comet
|
|
39
45
|
def clear
|
40
46
|
@status = 0
|
41
47
|
@message = ''
|
48
|
+
@from = ''
|
49
|
+
@to = []
|
42
50
|
@email_subject = ''
|
43
51
|
@email_body_html = ''
|
44
52
|
@email_body_plaintext = ''
|
@@ -66,6 +74,21 @@ module Comet
|
|
66
74
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
67
75
|
|
68
76
|
@message = v
|
77
|
+
when 'From'
|
78
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
79
|
+
|
80
|
+
@from = v
|
81
|
+
when 'To'
|
82
|
+
if v.nil?
|
83
|
+
@to = []
|
84
|
+
else
|
85
|
+
@to = Array.new(v.length)
|
86
|
+
v.each_with_index do |v1, i1|
|
87
|
+
raise TypeError, "'v1' expected String, got #{v1.class}" unless v1.is_a? String
|
88
|
+
|
89
|
+
@to[i1] = v1
|
90
|
+
end
|
91
|
+
end
|
69
92
|
when 'EmailSubject'
|
70
93
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
71
94
|
|
@@ -89,6 +112,8 @@ module Comet
|
|
89
112
|
ret = {}
|
90
113
|
ret['Status'] = @status
|
91
114
|
ret['Message'] = @message
|
115
|
+
ret['From'] = @from
|
116
|
+
ret['To'] = @to
|
92
117
|
ret['EmailSubject'] = @email_subject
|
93
118
|
ret['EmailBodyHTML'] = @email_body_html
|
94
119
|
ret['EmailBodyPlaintext'] = @email_body_plaintext
|
@@ -29,6 +29,9 @@ module Comet
|
|
29
29
|
# @type [Array<String>] site_unique_members
|
30
30
|
attr_accessor :site_unique_members
|
31
31
|
|
32
|
+
# @type [Comet::Office365CustomSettingV2] custom_setting_v2
|
33
|
+
attr_accessor :custom_setting_v2
|
34
|
+
|
32
35
|
# @type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
|
33
36
|
attr_accessor :unknown_json_fields
|
34
37
|
|
@@ -42,6 +45,7 @@ module Comet
|
|
42
45
|
@custom_setting = Comet::Office365CustomSetting.new
|
43
46
|
@mailbox_unique_members = []
|
44
47
|
@site_unique_members = []
|
48
|
+
@custom_setting_v2 = Comet::Office365CustomSettingV2.new
|
45
49
|
@unknown_json_fields = {}
|
46
50
|
end
|
47
51
|
|
@@ -90,6 +94,9 @@ module Comet
|
|
90
94
|
@site_unique_members[i1] = v1
|
91
95
|
end
|
92
96
|
end
|
97
|
+
when 'CustomSettingV2'
|
98
|
+
@custom_setting_v2 = Comet::Office365CustomSettingV2.new
|
99
|
+
@custom_setting_v2.from_hash(v)
|
93
100
|
else
|
94
101
|
@unknown_json_fields[k] = v
|
95
102
|
end
|
@@ -104,6 +111,7 @@ module Comet
|
|
104
111
|
ret['CustomSetting'] = @custom_setting
|
105
112
|
ret['MailboxUniqueMembers'] = @mailbox_unique_members
|
106
113
|
ret['SiteUniqueMembers'] = @site_unique_members
|
114
|
+
ret['CustomSettingV2'] = @custom_setting_v2
|
107
115
|
@unknown_json_fields.each do |k, v|
|
108
116
|
ret[k] = v
|
109
117
|
end
|
@@ -23,6 +23,9 @@ module Comet
|
|
23
23
|
# @type [Boolean] has_image
|
24
24
|
attr_accessor :has_image
|
25
25
|
|
26
|
+
# @type [String] image_etag
|
27
|
+
attr_accessor :image_etag
|
28
|
+
|
26
29
|
# @type [String] top_color
|
27
30
|
attr_accessor :top_color
|
28
31
|
|
@@ -51,6 +54,7 @@ module Comet
|
|
51
54
|
def clear
|
52
55
|
@brand_name = ''
|
53
56
|
@product_name = ''
|
57
|
+
@image_etag = ''
|
54
58
|
@top_color = ''
|
55
59
|
@prune_logs_after_days = 0
|
56
60
|
@expired_in_seconds = 0
|
@@ -80,6 +84,10 @@ module Comet
|
|
80
84
|
@product_name = v
|
81
85
|
when 'HasImage'
|
82
86
|
@has_image = v
|
87
|
+
when 'ImageEtag'
|
88
|
+
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
89
|
+
|
90
|
+
@image_etag = v
|
83
91
|
when 'TopColor'
|
84
92
|
raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
|
85
93
|
|
@@ -110,6 +118,7 @@ module Comet
|
|
110
118
|
ret['BrandName'] = @brand_name
|
111
119
|
ret['ProductName'] = @product_name
|
112
120
|
ret['HasImage'] = @has_image
|
121
|
+
ret['ImageEtag'] = @image_etag
|
113
122
|
ret['TopColor'] = @top_color
|
114
123
|
ret['HideNewsArea'] = @hide_news_area
|
115
124
|
ret['AllowUnauthenticatedDownloads'] = @allow_unauthenticated_downloads
|
@@ -33,6 +33,7 @@ require_relative 'comet/models/branding_properties'
|
|
33
33
|
require_relative 'comet/models/browse_disk_drives_response'
|
34
34
|
require_relative 'comet/models/browse_edbresponse'
|
35
35
|
require_relative 'comet/models/browse_hvresponse'
|
36
|
+
require_relative 'comet/models/browse_office_365list_virtual_accounts_response'
|
36
37
|
require_relative 'comet/models/browse_office_365objects_response'
|
37
38
|
require_relative 'comet/models/browse_sqlserver_response'
|
38
39
|
require_relative 'comet/models/browse_vssresponse'
|
@@ -57,6 +58,7 @@ require_relative 'comet/models/disk_drive'
|
|
57
58
|
require_relative 'comet/models/dispatcher_admin_sources_response'
|
58
59
|
require_relative 'comet/models/dispatcher_stored_objects_response'
|
59
60
|
require_relative 'comet/models/dispatcher_vault_snapshots_response'
|
61
|
+
require_relative 'comet/models/dispatcher_windisk_snapshot_response'
|
60
62
|
require_relative 'comet/models/edbfile_info'
|
61
63
|
require_relative 'comet/models/email_options'
|
62
64
|
require_relative 'comet/models/email_report_config'
|
@@ -84,6 +86,8 @@ require_relative 'comet/models/news_entry'
|
|
84
86
|
require_relative 'comet/models/office_365connection'
|
85
87
|
require_relative 'comet/models/office_365credential'
|
86
88
|
require_relative 'comet/models/office_365custom_setting'
|
89
|
+
require_relative 'comet/models/office_365custom_setting_v2'
|
90
|
+
require_relative 'comet/models/office_365mixed_virtual_account'
|
87
91
|
require_relative 'comet/models/office_365object_info'
|
88
92
|
require_relative 'comet/models/organization'
|
89
93
|
require_relative 'comet/models/organization_response'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comet_backup_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Comet Licensing Ltd.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.4
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,6 +73,7 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- ".gitignore"
|
76
77
|
- ".rubocop.yml"
|
77
78
|
- CHANGELOG.md
|
78
79
|
- Gemfile
|
@@ -81,7 +82,6 @@ files:
|
|
81
82
|
- README.md
|
82
83
|
- RELEASING.md
|
83
84
|
- Rakefile
|
84
|
-
- comet_backup_ruby_sdk-1.8.0.gem
|
85
85
|
- comet_backup_ruby_sdk.gemspec
|
86
86
|
- lib/comet/api_response_error.rb
|
87
87
|
- lib/comet/comet_server.rb
|
Binary file
|