comet_backup_ruby_sdk 1.8.0 → 1.12.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.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +31 -0
  4. data/Gemfile.lock +3 -3
  5. data/README.md +1 -1
  6. data/RELEASING.md +1 -0
  7. data/comet_backup_ruby_sdk.gemspec +2 -2
  8. data/lib/comet/api_response_error.rb +1 -1
  9. data/lib/comet/comet_server.rb +197 -4
  10. data/lib/comet/definitions.rb +52 -13
  11. data/lib/comet/models/add_bucket_response_message.rb +1 -1
  12. data/lib/comet/models/admin_account_properties_response.rb +1 -1
  13. data/lib/comet/models/admin_email_options.rb +1 -1
  14. data/lib/comet/models/admin_resource_response.rb +1 -1
  15. data/lib/comet/models/admin_security_options.rb +26 -1
  16. data/lib/comet/models/admin_u2fregistration.rb +2 -1
  17. data/lib/comet/models/admin_user_permissions.rb +1 -1
  18. data/lib/comet/models/admin_web_authn_registration.rb +121 -0
  19. data/lib/comet/models/allowed_admin_user.rb +214 -0
  20. data/lib/comet/models/available_download.rb +1 -1
  21. data/lib/comet/models/azure_destination_location.rb +1 -1
  22. data/lib/comet/models/b2destination_location.rb +10 -1
  23. data/lib/comet/models/b2storage_extra_info.rb +1 -1
  24. data/lib/comet/models/b2transaction_totals.rb +1 -1
  25. data/lib/comet/models/b2virtual_storage_role_settings.rb +7 -1
  26. data/lib/comet/models/backup_job_advanced_options.rb +1 -1
  27. data/lib/comet/models/backup_job_detail.rb +43 -1
  28. data/lib/comet/models/backup_job_progress.rb +1 -1
  29. data/lib/comet/models/backup_rule_config.rb +1 -1
  30. data/lib/comet/models/backup_rule_event_triggers.rb +1 -1
  31. data/lib/comet/models/branding_options.rb +1 -1
  32. data/lib/comet/models/branding_properties.rb +1 -1
  33. data/lib/comet/models/browse_disk_drives_response.rb +1 -1
  34. data/lib/comet/models/browse_edbresponse.rb +1 -1
  35. data/lib/comet/models/browse_hvresponse.rb +1 -1
  36. data/lib/comet/models/browse_office_365list_virtual_accounts_response.rb +99 -0
  37. data/lib/comet/models/browse_office_365objects_response.rb +1 -1
  38. data/lib/comet/models/browse_sqlserver_response.rb +1 -1
  39. data/lib/comet/models/browse_vssresponse.rb +1 -1
  40. data/lib/comet/models/bucket_properties.rb +1 -1
  41. data/lib/comet/models/bucket_usage_info.rb +1 -1
  42. data/lib/comet/models/comet_apiresponse_message.rb +1 -1
  43. data/lib/comet/models/comet_destination_location.rb +1 -1
  44. data/lib/comet/models/constellation_check_report.rb +1 -1
  45. data/lib/comet/models/constellation_stats.rb +1 -1
  46. data/lib/comet/models/constellation_status_apiresponse.rb +1 -1
  47. data/lib/comet/models/content_measurement.rb +1 -1
  48. data/lib/comet/models/content_measurement_component.rb +1 -1
  49. data/lib/comet/models/create_group_policy_response.rb +1 -1
  50. data/lib/comet/models/custom_remote_bucket_settings.rb +1 -1
  51. data/lib/comet/models/default_email_report_policy.rb +1 -1
  52. data/lib/comet/models/default_source_with_osrestriction.rb +1 -1
  53. data/lib/comet/models/destination_config.rb +1 -1
  54. data/lib/comet/models/destination_location.rb +1 -1
  55. data/lib/comet/models/destination_statistics.rb +1 -1
  56. data/lib/comet/models/device_config.rb +12 -1
  57. data/lib/comet/models/disk_drive.rb +1 -1
  58. data/lib/comet/models/dispatcher_admin_sources_response.rb +1 -1
  59. data/lib/comet/models/dispatcher_stored_objects_response.rb +1 -1
  60. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +1 -1
  61. data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +99 -0
  62. data/lib/comet/models/edbfile_info.rb +1 -1
  63. data/lib/comet/models/email_options.rb +1 -1
  64. data/lib/comet/models/email_report_config.rb +1 -1
  65. data/lib/comet/models/email_report_generated_preview.rb +26 -1
  66. data/lib/comet/models/external_ldapauthentication_source_settings.rb +1 -1
  67. data/lib/comet/models/extra_file_exclusion.rb +1 -1
  68. data/lib/comet/models/ftpdestination_location.rb +1 -1
  69. data/lib/comet/models/get_group_policy_response.rb +1 -1
  70. data/lib/comet/models/get_profile_and_hash_response_message.rb +1 -1
  71. data/lib/comet/models/get_profile_hash_response_message.rb +1 -1
  72. data/lib/comet/models/group_policy.rb +1 -1
  73. data/lib/comet/models/hyper_vmachine_info.rb +1 -1
  74. data/lib/comet/models/install_creds.rb +1 -1
  75. data/lib/comet/models/install_token.rb +1 -1
  76. data/lib/comet/models/install_token_response.rb +1 -1
  77. data/lib/comet/models/job_entry.rb +1 -1
  78. data/lib/comet/models/live_user_connection.rb +1 -1
  79. data/lib/comet/models/local_destination_location.rb +1 -1
  80. data/lib/comet/models/mac_oscode_sign_properties.rb +1 -1
  81. data/lib/comet/models/mongo_dbconnection.rb +1 -1
  82. data/lib/comet/models/mssqlconnection.rb +1 -1
  83. data/lib/comet/models/my_sqlconnection.rb +40 -1
  84. data/lib/comet/models/new_bucket_detail.rb +1 -1
  85. data/lib/comet/models/news_entry.rb +1 -1
  86. data/lib/comet/models/office_365connection.rb +9 -1
  87. data/lib/comet/models/office_365credential.rb +1 -1
  88. data/lib/comet/models/office_365custom_setting.rb +2 -1
  89. data/lib/comet/models/office_365custom_setting_v2.rb +108 -0
  90. data/lib/comet/models/office_365mixed_virtual_account.rb +211 -0
  91. data/lib/comet/models/office_365object_info.rb +1 -1
  92. data/lib/comet/models/organization.rb +1 -1
  93. data/lib/comet/models/organization_response.rb +1 -1
  94. data/lib/comet/models/osinfo.rb +1 -1
  95. data/lib/comet/models/partition.rb +1 -1
  96. data/lib/comet/models/private_branding_properties.rb +1 -1
  97. data/lib/comet/models/protected_item_engine_type_policy.rb +1 -1
  98. data/lib/comet/models/public_branding_properties.rb +1 -1
  99. data/lib/comet/models/register_office_application_begin_response.rb +1 -1
  100. data/lib/comet/models/register_office_application_check_response.rb +1 -1
  101. data/lib/comet/models/remote_server_address.rb +1 -1
  102. data/lib/comet/models/remote_storage_option.rb +1 -1
  103. data/lib/comet/models/replicator_state_apiresponse.rb +1 -1
  104. data/lib/comet/models/request_storage_vault_response_message.rb +1 -1
  105. data/lib/comet/models/restore_job_advanced_options.rb +1 -1
  106. data/lib/comet/models/retention_policy.rb +1 -1
  107. data/lib/comet/models/retention_range.rb +1 -1
  108. data/lib/comet/models/s3destination_location.rb +1 -1
  109. data/lib/comet/models/schedule_config.rb +1 -1
  110. data/lib/comet/models/search_clause.rb +1 -1
  111. data/lib/comet/models/self_backup_statistics.rb +1 -1
  112. data/lib/comet/models/server_config_options_branding_fragment.rb +1 -1
  113. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +1 -1
  114. data/lib/comet/models/server_meta_branding_properties.rb +10 -1
  115. data/lib/comet/models/server_meta_version_info.rb +1 -1
  116. data/lib/comet/models/session_key_regenerated_response.rb +1 -1
  117. data/lib/comet/models/sftpdestination_location.rb +1 -1
  118. data/lib/comet/models/size_measurement.rb +1 -1
  119. data/lib/comet/models/software_build_role_options.rb +1 -1
  120. data/lib/comet/models/software_update_news_response.rb +1 -1
  121. data/lib/comet/models/source_basic_info.rb +1 -1
  122. data/lib/comet/models/source_config.rb +1 -1
  123. data/lib/comet/models/source_include_pattern.rb +1 -1
  124. data/lib/comet/models/source_statistics.rb +1 -1
  125. data/lib/comet/models/spanned_destination_location.rb +1 -1
  126. data/lib/comet/models/spanned_storage_extra_info.rb +1 -1
  127. data/lib/comet/models/sshconnection.rb +1 -1
  128. data/lib/comet/models/stat_result.rb +10 -1
  129. data/lib/comet/models/storage_free_space_info.rb +1 -1
  130. data/lib/comet/models/storage_vault_provider_policy.rb +1 -1
  131. data/lib/comet/models/stored_object.rb +1 -1
  132. data/lib/comet/models/streamable_event.rb +1 -1
  133. data/lib/comet/models/swift_destination_location.rb +1 -1
  134. data/lib/comet/models/test_response.rb +1 -1
  135. data/lib/comet/models/totp_regenerated_response.rb +1 -1
  136. data/lib/comet/models/u2fregister_request.rb +2 -1
  137. data/lib/comet/models/u2fregistered_key.rb +2 -1
  138. data/lib/comet/models/u2fregistration_challenge_response.rb +2 -1
  139. data/lib/comet/models/u2fsign_request.rb +2 -1
  140. data/lib/comet/models/u2fsign_response.rb +2 -1
  141. data/lib/comet/models/uninstall_config.rb +1 -1
  142. data/lib/comet/models/update_campaign_device_status.rb +1 -1
  143. data/lib/comet/models/update_campaign_options.rb +1 -1
  144. data/lib/comet/models/update_campaign_properties.rb +1 -1
  145. data/lib/comet/models/update_campaign_status.rb +1 -1
  146. data/lib/comet/models/update_campaign_status_device_entry.rb +1 -1
  147. data/lib/comet/models/user_custom_email_settings.rb +1 -1
  148. data/lib/comet/models/user_on_server.rb +1 -1
  149. data/lib/comet/models/user_policy.rb +1 -1
  150. data/lib/comet/models/user_profile_config.rb +1 -1
  151. data/lib/comet/models/user_profile_fragment.rb +1 -1
  152. data/lib/comet/models/vault_snapshot.rb +1 -1
  153. data/lib/comet/models/vsscomponent.rb +1 -1
  154. data/lib/comet/models/vsswriter_info.rb +1 -1
  155. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +1 -1
  156. data/lib/comet/models/web_authn_authenticator_selection.rb +96 -0
  157. data/lib/comet/models/web_authn_credential.rb +105 -0
  158. data/lib/comet/models/web_authn_credential_assertion.rb +74 -0
  159. data/lib/comet/models/web_authn_credential_descriptor.rb +101 -0
  160. data/lib/comet/models/web_authn_credential_entity.rb +86 -0
  161. data/lib/comet/models/web_authn_credential_parameter.rb +84 -0
  162. data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +172 -0
  163. data/lib/comet/models/web_authn_public_key_credential_request_options.rb +140 -0
  164. data/lib/comet/models/web_authn_registration_challenge_response.rb +101 -0
  165. data/lib/comet/models/web_authn_relying_party_entity.rb +95 -0
  166. data/lib/comet/models/web_authn_sign_request.rb +83 -0
  167. data/lib/comet/models/web_authn_sign_response.rb +84 -0
  168. data/lib/comet/models/web_authn_user_entity.rb +105 -0
  169. data/lib/comet/models/web_interface_branding_properties.rb +1 -1
  170. data/lib/comet/models/webhook_option.rb +1 -1
  171. data/lib/comet/models/win_smbauth.rb +1 -1
  172. data/lib/comet/models/windows_code_sign_properties.rb +1 -1
  173. data/lib/comet_backup_ruby_sdk.rb +20 -1
  174. metadata +24 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f171b686ff819ece50144f9df68d33e4cc19d16f3650a14fa0a8e2ab6085705
4
- data.tar.gz: 1c772db480d36ef618b9ae49ffdfbaf7266a8c048e46db97e28861bbf62bf0c7
3
+ metadata.gz: 69a41caa98a2a94326271b4b1ee4f2d7f61e98b0d62c1964ac1707e1984dca72
4
+ data.tar.gz: 3dce1759fcc473dcd64b592cfab33633ae31fe619ea07b0a9e13719c7981e5da
5
5
  SHA512:
6
- metadata.gz: a81c233bc05c79786095deb47dabcb5450d5a70fe14586207c37fad3ec7954bfee346926de2de3c72df1616726de83cd8956b099d21f533d3e477c01597c5f1b
7
- data.tar.gz: 9c397ce360202863393420b7c4440274e62aff5862b3eaee47671a662606624641f12cfd6762d0609b5043f624cdcd7d39fc7aee450efaa5334729d04357379d
6
+ metadata.gz: b3f505381b2cd44a90667f1de2f8fa6d4b99cffeb106e271eac055545ea7f51c57c948077baabb52025b120ded6efe0bd1bbbcf3df5b3dceabc84960b5040a3f
7
+ data.tar.gz: 4a3588488fb2a2da49662460438c0e8d85f7f57cb7fdd654199c30fe6c4bfd820e418872a8f0f751c1a7094d0d6b0754809c4fcb94cf98846cbbe3810eb341a0
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2022-01-28 v1.12.0
4
+ - Based on 21.12.4
5
+ - Add `AdminStoragePingDestination` API to perform a server-side Test Connections action when configuring Storage Role
6
+ - Add `HasLicense` on `Office365MixedVirtualAccount` struct, and add `TotalLicensedMailsCount` and `TotalUnlicensedMailsCount` on `BackupJobDetail` struct, to track Office 365 license usage
7
+ - Add `AdminWebAuthnRegistration` new `Type` field and `WEBAUTHN_DEVICE_TYPE` constants, to determine the type of hardware WebAuthn device
8
+ - Add deprecation comments to U2F types (use WebAuthn instead), to `B2DestinationLocation.MaxConnections`, and to `Office365CustomSetting` (use Office365CustomSettingV2 instead)
9
+ - Fix an issue with wrong array types in `WebAuthnPublicKeyCredentialCreationOptions` and `WebAuthnPublicKeyCredentialRequestOptions`
10
+ - Fix an issue with wrong values for some `STOREDOBJECTTYPE_` constants related to Office 365
11
+ - Fix an issue with executable permissions on some files
12
+
13
+ ## 2021-12-22 v1.11.0
14
+ - Based on 21.12.1
15
+ - Add `AdminAccountWebauthnRegistration` endpoint for new WebAuthn support.
16
+ - Deprecate `AdminAccountU2fSubmitChallenge` as U2F is ending browser support in February 2022.
17
+
18
+ ## 2021-11-24 v1.10.0
19
+ - Based on 21.9.12
20
+ - Add support for Thai and Danish localizations
21
+ - Add From and To fields to the EmailReportGenerated API
22
+ - Add `AdminDispatcherEmailPreview` api method for requesting the HTML content of an email
23
+ - Add `ImageEtag` field to the response of the ServerMetaBrandingProperties endpoint.
24
+ - Add support for new engine properties on the Office365 backup type.
25
+ - Add `AdminDispatcherOffice365ListVirtualAccounts` api method for requesting Objects that Office365 is capable of backing up.
26
+
27
+ ## 2021-10-21 1.9.0
28
+ - Based on 21.9.7
29
+ - Add Support for `HideFiles` parameter in B2 Destination Locations
30
+ - Add support for `RegistrationTime` to `DeviceConfig`
31
+ - Upgrade MYSQL to support new TLS connection options
32
+ - Add support for new API: `AdminMetaReadAllLogsRequest` and `AdminDispatcherRequestWindiskSnapshot`
33
+
3
34
  ## 2021-09-14 1.8.0
4
35
  - Based on Comet 21.9.2
5
36
  - Support new `custom_headers` field on the `WebhookOption` class for specifying custom HTTP headers
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.8.0)
4
+ comet_backup_ruby_sdk (1.12.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -33,11 +33,11 @@ PLATFORMS
33
33
  ruby
34
34
 
35
35
  DEPENDENCIES
36
- bundler (~> 1.17)
36
+ bundler (~> 2.1.4)
37
37
  comet_backup_ruby_sdk!
38
38
  minitest (~> 5.14)
39
39
  rake (~> 13.0)
40
40
  rubocop (~> 0.88)
41
41
 
42
42
  BUNDLED WITH
43
- 1.17.2
43
+ 2.1.4
data/README.md CHANGED
@@ -84,7 +84,7 @@ end
84
84
  ```ruby
85
85
  bundle exec rake rubocop
86
86
 
87
- COMETSERVER_ADDRESS='http://127.0.0.1:8060' \
87
+ COMETSERVER_ADDRESS='http://127.0.0.1:8060' \
88
88
  COMETSERVER_ADMINUSER=admin \
89
89
  COMETSERVER_ADMINPASS=admin \
90
90
  bundle exec rake test
data/RELEASING.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Procedure for releasing gem package updates
2
2
 
3
+ 0. As a cygwin user, with docker installed; `docker run -it -v "$(cygpath -w "$PWD"):/app" -w /app ruby:2.7 bash` will get you with a suitable ruby environment for testing/building and releasing this package9.
3
4
  1. All tests passing
4
5
  2. Update changelog in `CHANGELOG.md`
5
6
  3. Update version number in `comet_backup_ruby_sdk.gemspec`
@@ -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.8.0'
15
+ spec.version = '1.12.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.17'
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'
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -96,7 +96,7 @@ module Comet
96
96
  #
97
97
  # You must supply administrator authentication credentials to use this API.
98
98
  #
99
- # @param [String] self_address (Optional) External URL of this server (used for U2F AppID)
99
+ # @param [String] self_address (Optional) External URL of this server
100
100
  # @return [Comet::SessionKeyRegeneratedResponse]
101
101
  def admin_account_session_start(self_address = nil)
102
102
  submit_params = {}
@@ -166,6 +166,9 @@ module Comet
166
166
  # AdminAccountU2fRequestRegistrationChallenge
167
167
  #
168
168
  # Register a new FIDO U2F token.
169
+ # Browser support for U2F is ending in February 2022. WebAuthn is backwards
170
+ # compatible with U2F keys, and Comet will automatically migrate existing U2F keys
171
+ # to allow their use with the WebAuthn endpoints.
169
172
  #
170
173
  # You must supply administrator authentication credentials to use this API.
171
174
  #
@@ -188,6 +191,9 @@ module Comet
188
191
  # AdminAccountU2fSubmitChallengeResponse
189
192
  #
190
193
  # Register a new FIDO U2F token.
194
+ # Browser support for U2F is ending in February 2022. WebAuthn is backwards
195
+ # compatible with U2F keys, and Comet will automatically migrate existing U2F keys
196
+ # to allow their use with the WebAuthn endpoints.
191
197
  #
192
198
  # You must supply administrator authentication credentials to use this API.
193
199
  #
@@ -245,6 +251,58 @@ module Comet
245
251
  ret
246
252
  end
247
253
 
254
+ # AdminAccountWebauthnRequestRegistrationChallenge
255
+ #
256
+ # Register a new FIDO2 WebAuthn token.
257
+ #
258
+ # You must supply administrator authentication credentials to use this API.
259
+ #
260
+ # @param [String] self_address External URL of this server, used as WebAuthn ID
261
+ # @return [Comet::WebAuthnRegistrationChallengeResponse]
262
+ def admin_account_webauthn_request_registration_challenge(self_address)
263
+ submit_params = {}
264
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
265
+
266
+ submit_params['SelfAddress'] = self_address
267
+
268
+ body = perform_request('api/v1/admin/account/webauthn/request-registration-challenge', submit_params)
269
+ json_body = JSON.parse body
270
+ check_status json_body
271
+ ret = Comet::WebAuthnRegistrationChallengeResponse.new
272
+ ret.from_hash(json_body)
273
+ ret
274
+ end
275
+
276
+ # AdminAccountWebauthnSubmitChallengeResponse
277
+ #
278
+ # Register a new FIDO2 WebAuthn token.
279
+ #
280
+ # You must supply administrator authentication credentials to use this API.
281
+ #
282
+ # @param [String] self_address External URL of this server, used as WebAuthn ID
283
+ # @param [String] challenge_id Associated value from AdminAccountWebAuthnRequestRegistrationChallenge API
284
+ # @param [String] credential JSON-encoded credential
285
+ # @return [Comet::CometAPIResponseMessage]
286
+ def admin_account_webauthn_submit_challenge_response(self_address, challenge_id, credential)
287
+ submit_params = {}
288
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
289
+
290
+ submit_params['SelfAddress'] = self_address
291
+ raise TypeError, "'challenge_id' expected String, got #{challenge_id.class}" unless challenge_id.is_a? String
292
+
293
+ submit_params['ChallengeID'] = challenge_id
294
+ raise TypeError, "'credential' expected String, got #{credential.class}" unless credential.is_a? String
295
+
296
+ submit_params['Credential'] = credential
297
+
298
+ body = perform_request('api/v1/admin/account/webauthn/submit-challenge-response', submit_params)
299
+ json_body = JSON.parse body
300
+ check_status json_body
301
+ ret = Comet::CometAPIResponseMessage.new
302
+ ret.from_hash(json_body)
303
+ ret
304
+ end
305
+
248
306
  # AdminAddUser
249
307
  #
250
308
  # Add a new user account.
@@ -1001,6 +1059,42 @@ module Comet
1001
1059
  ret
1002
1060
  end
1003
1061
 
1062
+ # AdminDispatcherEmailPreview
1063
+ #
1064
+ # Request HTML content of an email.
1065
+ # The remote device must have given consent for an MSP to browse their mail
1066
+ #
1067
+ # You must supply administrator authentication credentials to use this API.
1068
+ # This API requires the Auth Role to be enabled.
1069
+ #
1070
+ # @param [String] target_id The live connection GUID
1071
+ # @param [String] snapshot where the email belongs to
1072
+ # @param [String] destination The Storage Vault ID
1073
+ # @param [String] path of the email to view
1074
+ # @return [Comet::EmailReportGeneratedPreview]
1075
+ def admin_dispatcher_email_preview(target_id, snapshot, destination, path)
1076
+ submit_params = {}
1077
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1078
+
1079
+ submit_params['TargetID'] = target_id
1080
+ raise TypeError, "'snapshot' expected String, got #{snapshot.class}" unless snapshot.is_a? String
1081
+
1082
+ submit_params['Snapshot'] = snapshot
1083
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1084
+
1085
+ submit_params['Destination'] = destination
1086
+ raise TypeError, "'path' expected String, got #{path.class}" unless path.is_a? String
1087
+
1088
+ submit_params['Path'] = path
1089
+
1090
+ body = perform_request('api/v1/admin/dispatcher/email-preview', submit_params)
1091
+ json_body = JSON.parse body
1092
+ check_status json_body
1093
+ ret = Comet::EmailReportGeneratedPreview.new
1094
+ ret.from_hash(json_body)
1095
+ ret
1096
+ end
1097
+
1004
1098
  # AdminDispatcherImportApply
1005
1099
  #
1006
1100
  # Instruct a live connected device to import settings from an installed product.
@@ -1077,6 +1171,34 @@ module Comet
1077
1171
  ret
1078
1172
  end
1079
1173
 
1174
+ # AdminDispatcherOffice365ListVirtualAccounts
1175
+ #
1176
+ # Request a list of Office365 Resources (groups, sites, teams groups and users).
1177
+ # The remote device must have given consent for an MSP to browse their files.
1178
+ #
1179
+ # You must supply administrator authentication credentials to use this API.
1180
+ # This API requires the Auth Role to be enabled.
1181
+ #
1182
+ # @param [String] target_id The live connection GUID
1183
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1184
+ # @return [Comet::BrowseOffice365ListVirtualAccountsResponse]
1185
+ def admin_dispatcher_office_365list_virtual_accounts(target_id, credentials)
1186
+ submit_params = {}
1187
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1188
+
1189
+ submit_params['TargetID'] = target_id
1190
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1191
+
1192
+ submit_params['Credentials'] = credentials.to_json
1193
+
1194
+ body = perform_request('api/v1/admin/dispatcher/office365-list-virtual-accounts', submit_params)
1195
+ json_body = JSON.parse body
1196
+ check_status json_body
1197
+ ret = Comet::BrowseOffice365ListVirtualAccountsResponse.new
1198
+ ret.from_hash(json_body)
1199
+ ret
1200
+ end
1201
+
1080
1202
  # AdminDispatcherPingDestination
1081
1203
  #
1082
1204
  # Test the connection to the storage bucket.
@@ -1563,6 +1685,37 @@ module Comet
1563
1685
  ret
1564
1686
  end
1565
1687
 
1688
+ # AdminDispatcherRequestWindiskSnapshot
1689
+ #
1690
+ # Request a Disk Image snapshot with the windiskbrowse-style from a live connected device.
1691
+ #
1692
+ # You must supply administrator authentication credentials to use this API.
1693
+ # This API requires the Auth Role to be enabled.
1694
+ #
1695
+ # @param [String] target_id The live connection GUID
1696
+ # @param [String] destination The Storage Vault ID
1697
+ # @param [String] snapshot_id The Snapshot ID
1698
+ # @return [Comet::DispatcherWindiskSnapshotResponse]
1699
+ def admin_dispatcher_request_windisk_snapshot(target_id, destination, snapshot_id)
1700
+ submit_params = {}
1701
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1702
+
1703
+ submit_params['TargetID'] = target_id
1704
+ raise TypeError, "'destination' expected String, got #{destination.class}" unless destination.is_a? String
1705
+
1706
+ submit_params['Destination'] = destination
1707
+ raise TypeError, "'snapshot_id' expected String, got #{snapshot_id.class}" unless snapshot_id.is_a? String
1708
+
1709
+ submit_params['SnapshotID'] = snapshot_id
1710
+
1711
+ body = perform_request('api/v1/admin/dispatcher/request-windisk-snapshot', submit_params)
1712
+ json_body = JSON.parse body
1713
+ check_status json_body
1714
+ ret = Comet::DispatcherWindiskSnapshotResponse.new
1715
+ ret.from_hash(json_body)
1716
+ ret
1717
+ end
1718
+
1566
1719
  # AdminDispatcherRunBackup
1567
1720
  #
1568
1721
  # Instruct a live connected device to run a scheduled backup.
@@ -2139,6 +2292,7 @@ module Comet
2139
2292
  # Cancel a running job.
2140
2293
  # A request is sent to the live-connected device, asking it to cancel the operation. This may fail if there is no live-connection.
2141
2294
  # Only jobs from Comet 18.3.5 or newer can be cancelled. A job can only be cancelled if it has a non-empty CancellationID field in its properties.
2295
+ # If the device is running Comet 21.9.5 or later, this API will wait up to ten seconds for a confirmation from the client.
2142
2296
  #
2143
2297
  # You must supply administrator authentication credentials to use this API.
2144
2298
  # This API requires the Auth Role to be enabled.
@@ -2318,6 +2472,20 @@ module Comet
2318
2472
  ret
2319
2473
  end
2320
2474
 
2475
+ # AdminMetaReadAllLogs
2476
+ #
2477
+ # Get a ZIP file of all of the server's log files.
2478
+ # On non-Windows platforms, log content uses LF line endings. On Windows, Comet changed from LF to CRLF line endings in 18.3.2.
2479
+ # This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
2480
+ #
2481
+ # You must supply administrator authentication credentials to use this API.
2482
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2483
+ #
2484
+ # @return [String]
2485
+ def admin_meta_read_all_logs
2486
+ perform_request('api/v1/admin/meta/read-all-logs')
2487
+ end
2488
+
2321
2489
  # AdminMetaReadLogs
2322
2490
  #
2323
2491
  # Get log file content.
@@ -3332,6 +3500,31 @@ module Comet
3332
3500
  ret
3333
3501
  end
3334
3502
 
3503
+ # AdminStoragePingDestination
3504
+ #
3505
+ # Ping a storage destination.
3506
+ #
3507
+ # You must supply administrator authentication credentials to use this API.
3508
+ # Access to this API may be prevented on a per-administrator basis.
3509
+ # This API requires the Storage Role to be enabled.
3510
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3511
+ #
3512
+ # @param [Comet::DestinationLocation] extra_data The destination location settings
3513
+ # @return [Comet::CometAPIResponseMessage]
3514
+ def admin_storage_ping_destination(extra_data)
3515
+ submit_params = {}
3516
+ raise TypeError, "'extra_data' expected Comet::DestinationLocation, got #{extra_data.class}" unless extra_data.is_a? Comet::DestinationLocation
3517
+
3518
+ submit_params['ExtraData'] = extra_data.to_json
3519
+
3520
+ body = perform_request('api/v1/admin/storage/ping-destination', submit_params)
3521
+ json_body = JSON.parse body
3522
+ check_status json_body
3523
+ ret = Comet::CometAPIResponseMessage.new
3524
+ ret.from_hash(json_body)
3525
+ ret
3526
+ end
3527
+
3335
3528
  # AdminStorageRegisterBucket
3336
3529
  #
3337
3530
  # Create a new bucket.
@@ -3483,7 +3676,7 @@ module Comet
3483
3676
 
3484
3677
  ret_error = Comet::CometAPIResponseMessage.new
3485
3678
  ret_error.from_hash(obj)
3486
- raise Comet::APIResponseError.new(ret_error), 'Comet API response status was not OK'
3679
+ raise Comet::APIResponseError.new(ret_error)
3487
3680
  end
3488
3681
 
3489
3682
  # Perform a synchronous HTTP request.
@@ -3520,7 +3713,7 @@ module Comet
3520
3713
 
3521
3714
  form_params = []
3522
3715
  params.each do |k, v|
3523
- form_params.append [k, v, { :filename => k }]
3716
+ form_params.append [k, v, {:filename => k}]
3524
3717
  end
3525
3718
  req.set_form(form_params, 'multipart/form-data')
3526
3719
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -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
 
@@ -342,22 +360,22 @@ module Comet
342
360
  STOREDOBJECTTYPE_WINEFS = 'winefs'
343
361
 
344
362
  # StoredObjectType: "file"
345
- STOREDOBJECTTYPE_EMAILMESSAGE = 'emailmessage\"'
363
+ STOREDOBJECTTYPE_EMAILMESSAGE = 'emailmessage'
346
364
 
347
365
  # StoredObjectType: "dir"
348
- STOREDOBJECTTYPE_EMAILFOLDER = 'mailfolder\"'
366
+ STOREDOBJECTTYPE_EMAILFOLDER = 'mailfolder'
349
367
 
350
368
  # StoredObjectType: "file"
351
- STOREDOBJECTTYPE_OFFICECONTACT = 'contact\"'
369
+ STOREDOBJECTTYPE_OFFICECONTACT = 'contact'
352
370
 
353
371
  # StoredObjectType: "dir"
354
- STOREDOBJECTTYPE_OFFICECONTACTFOLDER = 'contactfolder\"'
372
+ STOREDOBJECTTYPE_OFFICECONTACTFOLDER = 'contactfolder'
355
373
 
356
374
  # StoredObjectType: "file"
357
- STOREDOBJECTTYPE_OFFICECALENDAREVENT = 'calendarevent\"'
375
+ STOREDOBJECTTYPE_OFFICECALENDAREVENT = 'calendarevent'
358
376
 
359
377
  # StoredObjectType: "dir"
360
- STOREDOBJECTTYPE_OFFICECALENDAR = 'calendar\"'
378
+ STOREDOBJECTTYPE_OFFICECALENDAR = 'calendar'
361
379
 
362
380
  # StoredObjectType:
363
381
  STOREDOBJECTTYPE_MSSITE = 'mssite'
@@ -407,18 +425,18 @@ module Comet
407
425
  # DefaultSettingMode:
408
426
  SETTING_ENFORCED_OFF = 4
409
427
 
410
- # sz.LanguageCode:
428
+ # LanguageCode:
411
429
  DEFAULT_LANGUAGE = 'en_US'
412
430
 
413
431
  DEFAULT_TIMEZONE = 'UTC'
414
432
 
415
- APPLICATION_VERSION = '21.9.2'
433
+ APPLICATION_VERSION = '21.12.4'
416
434
 
417
435
  APPLICATION_VERSION_MAJOR = 21
418
436
 
419
- APPLICATION_VERSION_MINOR = 9
437
+ APPLICATION_VERSION_MINOR = 12
420
438
 
421
- APPLICATION_VERSION_REVISION = 2
439
+ APPLICATION_VERSION_REVISION = 4
422
440
 
423
441
  RELEASE_CODENAME = 'Voyager'
424
442
 
@@ -426,6 +444,10 @@ module Comet
426
444
 
427
445
  PASSWORD_FORMAT_PLAINTEXT = 0
428
446
 
447
+ UNKNOWN_DEVICE_ERROR = 'ERR_UNKNOWN_DEVICE'
448
+
449
+ TOTPREQUIRED_ERROR = 'ERR_TOTP_REQUIRED'
450
+
429
451
  EMAIL_WORKER_STATE_NOT_STARTED = 0
430
452
 
431
453
  EMAIL_WORKER_STATE_STARTED = 1
@@ -436,9 +458,26 @@ module Comet
436
458
 
437
459
  EMAIL_WORKER_STATE_SENDING = 4
438
460
 
439
- UNKNOWN_DEVICE_ERROR = 'ERR_UNKNOWN_DEVICE'
461
+ # WebAuthnDeviceType:
462
+ WEBAUTHN_DEVICE_TYPE__UNKNOWN = 0
440
463
 
441
- TOTPREQUIRED_ERROR = 'ERR_TOTP_REQUIRED'
464
+ # WebAuthnDeviceType:
465
+ WEBAUTHN_DEVICE_TYPE__HARDWARE_TOKEN = 1
466
+
467
+ # WebAuthnDeviceType:
468
+ WEBAUTHN_DEVICE_TYPE__ANDROID = 2
469
+
470
+ # WebAuthnDeviceType:
471
+ WEBAUTHN_DEVICE_TYPE__APPLE = 3
472
+
473
+ # WebAuthnDeviceType:
474
+ WEBAUTHN_DEVICE_TYPE__TPM_GENERIC = 4
475
+
476
+ # WebAuthnDeviceType:
477
+ WEBAUTHN_DEVICE_TYPE__TPM_WINDOWS = 5
478
+
479
+ # WebAuthnDeviceType:
480
+ WEBAUTHN_DEVICE_TYPE__TPM_LINUX = 6
442
481
 
443
482
  # UpdateStatus:
444
483
  UPDATESTATUS_NOT_SEEN = 0
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -27,11 +27,19 @@ module Comet
27
27
  attr_accessor :allow_password_and_totplogin
28
28
 
29
29
  # @type [Boolean] allow_password_and_u2flogin
30
+ # @deprecated This member has been deprecated since Comet version 21.12.0
30
31
  attr_accessor :allow_password_and_u2flogin
31
32
 
33
+ # @type [Boolean] allow_password_and_web_authn_login
34
+ attr_accessor :allow_password_and_web_authn_login
35
+
32
36
  # @type [Array<Comet::AdminU2FRegistration>] u2fregistrations
37
+ # @deprecated This member has been deprecated since Comet version 21.12.0
33
38
  attr_accessor :u2fregistrations
34
39
 
40
+ # @type [Array<Comet::AdminWebAuthnRegistration>] web_authn_registrations
41
+ attr_accessor :web_authn_registrations
42
+
35
43
  # @type [Number] totpkey_encryption_format
36
44
  attr_accessor :totpkey_encryption_format
37
45
 
@@ -52,6 +60,7 @@ module Comet
52
60
  @password_format = 0
53
61
  @password = ''
54
62
  @u2fregistrations = []
63
+ @web_authn_registrations = []
55
64
  @totpkey_encryption_format = 0
56
65
  @totpkey = ''
57
66
  @ipwhitelist = ''
@@ -85,6 +94,8 @@ module Comet
85
94
  @allow_password_and_totplogin = v
86
95
  when 'AllowPasswordAndU2FLogin'
87
96
  @allow_password_and_u2flogin = v
97
+ when 'AllowPasswordAndWebAuthnLogin'
98
+ @allow_password_and_web_authn_login = v
88
99
  when 'U2FRegistrations'
89
100
  if v.nil?
90
101
  @u2fregistrations = []
@@ -95,6 +106,16 @@ module Comet
95
106
  @u2fregistrations[i1].from_hash(v1)
96
107
  end
97
108
  end
109
+ when 'WebAuthnRegistrations'
110
+ if v.nil?
111
+ @web_authn_registrations = []
112
+ else
113
+ @web_authn_registrations = Array.new(v.length)
114
+ v.each_with_index do |v1, i1|
115
+ @web_authn_registrations[i1] = Comet::AdminWebAuthnRegistration.new
116
+ @web_authn_registrations[i1].from_hash(v1)
117
+ end
118
+ end
98
119
  when 'TOTPKeyEncryptionFormat'
99
120
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
100
121
 
@@ -121,9 +142,13 @@ module Comet
121
142
  ret['AllowPasswordLogin'] = @allow_password_login
122
143
  ret['AllowPasswordAndTOTPLogin'] = @allow_password_and_totplogin
123
144
  ret['AllowPasswordAndU2FLogin'] = @allow_password_and_u2flogin
145
+ ret['AllowPasswordAndWebAuthnLogin'] = @allow_password_and_web_authn_login
124
146
  unless @u2fregistrations.nil?
125
147
  ret['U2FRegistrations'] = @u2fregistrations
126
148
  end
149
+ unless @web_authn_registrations.nil?
150
+ ret['WebAuthnRegistrations'] = @web_authn_registrations
151
+ end
127
152
  unless @totpkey_encryption_format.nil?
128
153
  ret['TOTPKeyEncryptionFormat'] = @totpkey_encryption_format
129
154
  end
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -13,6 +13,7 @@ require 'json'
13
13
  module Comet
14
14
 
15
15
  # AdminU2FRegistration is a typed class wrapper around the underlying Comet Server API data structure.
16
+ # @deprecated This type has been deprecated since Comet version 21.12.0
16
17
  class AdminU2FRegistration
17
18
 
18
19
  # @type [String] description
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby --enable-frozen-string-literal
2
2
  #
3
- # Copyright (c) 2020-2021 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2022 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT