comet_backup_ruby_sdk 1.10.0 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/.rubocop.yml +0 -0
  4. data/CHANGELOG.md +27 -1
  5. data/Gemfile.lock +1 -1
  6. data/RELEASING.md +1 -1
  7. data/comet_backup_ruby_sdk.gemspec +1 -1
  8. data/lib/comet/api_response_error.rb +1 -1
  9. data/lib/comet/comet_server.rb +144 -7
  10. data/lib/comet/definitions.rb +72 -14
  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 +2 -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 +1 -1
  26. data/lib/comet/models/backup_job_advanced_options.rb +10 -1
  27. data/lib/comet/models/backup_job_detail.rb +54 -1
  28. data/lib/comet/models/backup_job_progress.rb +1 -1
  29. data/lib/comet/models/backup_rule_config.rb +10 -1
  30. data/lib/comet/models/backup_rule_event_triggers.rb +1 -1
  31. data/lib/comet/models/branding_options.rb +10 -1
  32. data/lib/comet/models/branding_properties.rb +10 -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/days_of_week_config.rb +108 -0
  52. data/lib/comet/models/default_email_report_policy.rb +1 -1
  53. data/lib/comet/models/default_source_with_osrestriction.rb +1 -1
  54. data/lib/comet/models/destination_config.rb +1 -1
  55. data/lib/comet/models/destination_location.rb +1 -1
  56. data/lib/comet/models/destination_statistics.rb +1 -1
  57. data/lib/comet/models/device_config.rb +1 -1
  58. data/lib/comet/models/disk_drive.rb +1 -1
  59. data/lib/comet/models/dispatcher_admin_sources_response.rb +1 -1
  60. data/lib/comet/models/dispatcher_stored_objects_response.rb +1 -1
  61. data/lib/comet/models/dispatcher_vault_snapshots_response.rb +1 -1
  62. data/lib/comet/models/dispatcher_windisk_snapshot_response.rb +1 -1
  63. data/lib/comet/models/edbfile_info.rb +1 -1
  64. data/lib/comet/models/email_options.rb +1 -1
  65. data/lib/comet/models/email_report_config.rb +1 -1
  66. data/lib/comet/models/email_report_generated_preview.rb +1 -1
  67. data/lib/comet/models/external_ldapauthentication_source_settings.rb +1 -1
  68. data/lib/comet/models/extra_file_exclusion.rb +1 -1
  69. data/lib/comet/models/ftpdestination_location.rb +1 -1
  70. data/lib/comet/models/get_group_policy_response.rb +1 -1
  71. data/lib/comet/models/get_profile_and_hash_response_message.rb +1 -1
  72. data/lib/comet/models/get_profile_hash_response_message.rb +1 -1
  73. data/lib/comet/models/group_policy.rb +1 -1
  74. data/lib/comet/models/hour_sched_config.rb +84 -0
  75. data/lib/comet/models/hyper_vmachine_info.rb +1 -1
  76. data/lib/comet/models/install_creds.rb +1 -1
  77. data/lib/comet/models/install_token.rb +1 -1
  78. data/lib/comet/models/install_token_response.rb +1 -1
  79. data/lib/comet/models/job_entry.rb +2 -1
  80. data/lib/comet/models/live_user_connection.rb +1 -1
  81. data/lib/comet/models/local_destination_location.rb +1 -1
  82. data/lib/comet/models/mac_oscode_sign_properties.rb +70 -1
  83. data/lib/comet/models/mongo_dbconnection.rb +1 -1
  84. data/lib/comet/models/mssqlconnection.rb +1 -1
  85. data/lib/comet/models/my_sqlconnection.rb +1 -1
  86. data/lib/comet/models/new_bucket_detail.rb +1 -1
  87. data/lib/comet/models/news_entry.rb +1 -1
  88. data/lib/comet/models/office_365connection.rb +1 -1
  89. data/lib/comet/models/office_365credential.rb +1 -1
  90. data/lib/comet/models/office_365custom_setting.rb +2 -1
  91. data/lib/comet/models/office_365custom_setting_v2.rb +108 -0
  92. data/lib/comet/models/office_365mixed_virtual_account.rb +211 -0
  93. data/lib/comet/models/office_365object_info.rb +1 -1
  94. data/lib/comet/models/organization.rb +1 -1
  95. data/lib/comet/models/organization_response.rb +1 -1
  96. data/lib/comet/models/osinfo.rb +1 -1
  97. data/lib/comet/models/partition.rb +1 -1
  98. data/lib/comet/models/private_branding_properties.rb +10 -1
  99. data/lib/comet/models/protected_item_engine_type_policy.rb +1 -1
  100. data/lib/comet/models/public_branding_properties.rb +1 -1
  101. data/lib/comet/models/register_office_application_begin_response.rb +1 -1
  102. data/lib/comet/models/register_office_application_check_response.rb +1 -1
  103. data/lib/comet/models/remote_server_address.rb +1 -1
  104. data/lib/comet/models/remote_storage_option.rb +1 -1
  105. data/lib/comet/models/replicator_state_apiresponse.rb +1 -1
  106. data/lib/comet/models/request_storage_vault_response_message.rb +1 -1
  107. data/lib/comet/models/restore_job_advanced_options.rb +1 -1
  108. data/lib/comet/models/retention_policy.rb +1 -1
  109. data/lib/comet/models/retention_range.rb +1 -1
  110. data/lib/comet/models/s3destination_location.rb +1 -1
  111. data/lib/comet/models/schedule_config.rb +37 -1
  112. data/lib/comet/models/search_clause.rb +1 -1
  113. data/lib/comet/models/self_backup_statistics.rb +1 -1
  114. data/lib/comet/models/server_config_options_branding_fragment.rb +1 -1
  115. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +1 -1
  116. data/lib/comet/models/server_meta_branding_properties.rb +1 -1
  117. data/lib/comet/models/server_meta_version_info.rb +1 -1
  118. data/lib/comet/models/session_key_regenerated_response.rb +1 -1
  119. data/lib/comet/models/sftpdestination_location.rb +1 -1
  120. data/lib/comet/models/size_measurement.rb +1 -1
  121. data/lib/comet/models/software_build_role_options.rb +1 -1
  122. data/lib/comet/models/software_update_news_response.rb +1 -1
  123. data/lib/comet/models/source_basic_info.rb +1 -1
  124. data/lib/comet/models/source_config.rb +1 -1
  125. data/lib/comet/models/source_include_pattern.rb +1 -1
  126. data/lib/comet/models/source_statistics.rb +1 -1
  127. data/lib/comet/models/spanned_destination_location.rb +1 -1
  128. data/lib/comet/models/spanned_storage_extra_info.rb +1 -1
  129. data/lib/comet/models/sshconnection.rb +1 -1
  130. data/lib/comet/models/stat_result.rb +10 -1
  131. data/lib/comet/models/storage_free_space_info.rb +1 -1
  132. data/lib/comet/models/storage_vault_provider_policy.rb +1 -1
  133. data/lib/comet/models/stored_object.rb +2 -1
  134. data/lib/comet/models/streamable_event.rb +1 -1
  135. data/lib/comet/models/swift_destination_location.rb +1 -1
  136. data/lib/comet/models/test_response.rb +1 -1
  137. data/lib/comet/models/totp_regenerated_response.rb +1 -1
  138. data/lib/comet/models/u2fregister_request.rb +2 -1
  139. data/lib/comet/models/u2fregistered_key.rb +2 -1
  140. data/lib/comet/models/u2fregistration_challenge_response.rb +2 -1
  141. data/lib/comet/models/u2fsign_request.rb +2 -1
  142. data/lib/comet/models/u2fsign_response.rb +2 -1
  143. data/lib/comet/models/uninstall_config.rb +1 -1
  144. data/lib/comet/models/update_campaign_device_status.rb +1 -1
  145. data/lib/comet/models/update_campaign_options.rb +24 -1
  146. data/lib/comet/models/update_campaign_properties.rb +21 -1
  147. data/lib/comet/models/update_campaign_status.rb +21 -1
  148. data/lib/comet/models/update_campaign_status_device_entry.rb +1 -1
  149. data/lib/comet/models/user_custom_email_settings.rb +1 -1
  150. data/lib/comet/models/user_on_server.rb +1 -1
  151. data/lib/comet/models/user_policy.rb +1 -1
  152. data/lib/comet/models/user_profile_config.rb +10 -1
  153. data/lib/comet/models/user_profile_fragment.rb +1 -1
  154. data/lib/comet/models/vault_snapshot.rb +1 -1
  155. data/lib/comet/models/vmdksnapshot_view_options.rb +90 -0
  156. data/lib/comet/models/vsscomponent.rb +1 -1
  157. data/lib/comet/models/vsswriter_info.rb +1 -1
  158. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +1 -1
  159. data/lib/comet/models/web_authn_authenticator_selection.rb +96 -0
  160. data/lib/comet/models/web_authn_credential.rb +105 -0
  161. data/lib/comet/models/web_authn_credential_assertion.rb +74 -0
  162. data/lib/comet/models/web_authn_credential_descriptor.rb +101 -0
  163. data/lib/comet/models/web_authn_credential_entity.rb +86 -0
  164. data/lib/comet/models/web_authn_credential_parameter.rb +84 -0
  165. data/lib/comet/models/web_authn_public_key_credential_creation_options.rb +172 -0
  166. data/lib/comet/models/web_authn_public_key_credential_request_options.rb +140 -0
  167. data/lib/comet/models/web_authn_registration_challenge_response.rb +101 -0
  168. data/lib/comet/models/web_authn_relying_party_entity.rb +95 -0
  169. data/lib/comet/models/web_authn_sign_request.rb +83 -0
  170. data/lib/comet/models/web_authn_sign_response.rb +84 -0
  171. data/lib/comet/models/web_authn_user_entity.rb +105 -0
  172. data/lib/comet/models/web_interface_branding_properties.rb +1 -1
  173. data/lib/comet/models/webhook_option.rb +1 -1
  174. data/lib/comet/models/win_smbauth.rb +1 -1
  175. data/lib/comet/models/windows_code_sign_properties.rb +1 -1
  176. data/lib/comet_backup_ruby_sdk.rb +19 -1
  177. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1351a43776da0134fbbc0f29301c07bf21684f24fad024a2b24311c6c5f1993b
4
- data.tar.gz: a21014914d06619f590dce35f990036d4369a76287a6d654a5565fb373ebf003
3
+ metadata.gz: fd41ef7f0ce9f54555af78b82719b073f2bdedb8a1fac79da00fcfff58a82aae
4
+ data.tar.gz: aca0a1786bd48d8ed2f61a080c02fda37ac8d6b2bffc75421c3a37ea51c993a3
5
5
  SHA512:
6
- metadata.gz: 6c1267509de43041f58a02f46edd7aeb2d57eb7a464b5ba018d86398132bff04f94a5cc75bd6f04942a04fdd08a3a7e558c31cea467aae5090f192a75cb11a07
7
- data.tar.gz: 8f5b8df8f2d55019e6ca2efd9ad5025d5d31e9bb00babd2fc82c3aeb3a434f4e6f790385cd8643170b4eb69ba2f30cb6d6fc4f59460f5177865f01678ec0ac08
6
+ metadata.gz: 34d97b5cf4cd1bd01ee04602688b5f5355e2cbe3b5667aef32973d0f7298178cef7fb3678f4a26ecbd524cc88a03ebcce1837398be4ad1bb9e6656508ce53c8e
7
+ data.tar.gz: 2c205b4ead8426f4e380977510b99069a74d9233ede9d1dce74c6ca43bede641784c5edd275a9a863bfd3a938d0a40484fa87155a0d53e0bd69656723d0fc919
data/.gitignore CHANGED
File without changes
data/.rubocop.yml CHANGED
File without changes
data/CHANGELOG.md CHANGED
@@ -1,6 +1,32 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 2021-11-24 v3.18.0
3
+ ## 2022-05-10 v1.13.0
4
+ - Based on 22.3.5
5
+ - Add new `RestrictRuntime`, `FromTime`, `ToTime`, `RestrictDays`, `DaysSelect` types to ScheduleConfig to add time and day restrictions in a hourly schedule.
6
+ - Add new `TotalVmCount` to `BackupJobDetail` API.
7
+ - Add new fields to `MacOSCodeSignProperties` to support code signing.
8
+ - Add new `ForceUpgradeRunning`, `ApplyDeviceFilter`, and `DeviceFilter` fields to `UpdateCampaign` types to support sending a bulk upgrade to a custom query of users
9
+ - Add new `AdminBrandingGenerateClientSpkDsm6` and `AdminBrandingGenerateClientSpkDsm7` APIs and associated types for generating and downloading Synology SPKs
10
+ - Add new `PathAppIconImage` field to branding options types to support branding of the app icon when installed in Synology's Package Center (and other software managers)
11
+ - Add new constants for VMDK single file restore
12
+
13
+ ## 2022-01-28 v1.12.0
14
+ - Based on 21.12.4
15
+ - Add `AdminStoragePingDestination` API to perform a server-side Test Connections action when configuring Storage Role
16
+ - Add `DestinationSize*` on `BackupJobDetail` struct, to track Storage Vault size measurements taken as part of jobs
17
+ - Add `HasLicense` on `Office365MixedVirtualAccount` struct, and add `TotalLicensedMailsCount` and `TotalUnlicensedMailsCount` on `BackupJobDetail` struct, to track Office 365 license usage
18
+ - Add `AdminWebAuthnRegistration` new `Type` field and `WEBAUTHN_DEVICE_TYPE` constants, to determine the type of hardware WebAuthn device
19
+ - Add deprecation comments to U2F types (use WebAuthn instead), to `B2DestinationLocation.MaxConnections`, and to `Office365CustomSetting` (use Office365CustomSettingV2 instead)
20
+ - Fix an issue with wrong array types in `WebAuthnPublicKeyCredentialCreationOptions` and `WebAuthnPublicKeyCredentialRequestOptions`
21
+ - Fix an issue with wrong values for some `STOREDOBJECTTYPE_` constants related to Office 365
22
+ - Fix an issue with executable permissions on some files
23
+
24
+ ## 2021-12-22 v1.11.0
25
+ - Based on 21.12.1
26
+ - Add `AdminAccountWebauthnRegistration` endpoint for new WebAuthn support.
27
+ - Deprecate `AdminAccountU2fSubmitChallenge` as U2F is ending browser support in February 2022.
28
+
29
+ ## 2021-11-24 v1.10.0
4
30
  - Based on 21.9.12
5
31
  - Add support for Thai and Danish localizations
6
32
  - Add From and To fields to the EmailReportGenerated API
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.10.0)
4
+ comet_backup_ruby_sdk (1.13.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/RELEASING.md CHANGED
@@ -1,6 +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 "c://cygwin64/$PWD":/app -w /app ruby:2.7 bash` will get you with a suitable ruby environment for testing/building and releasing this package9.
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.
4
4
  1. All tests passing
5
5
  2. Update changelog in `CHANGELOG.md`
6
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.10.0'
15
+ spec.version = '1.13.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -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.
@@ -493,6 +551,52 @@ module Comet
493
551
  perform_request('api/v1/admin/branding/generate-client/macos-x86_64', submit_params)
494
552
  end
495
553
 
554
+ # AdminBrandingGenerateClientSpkDsm6
555
+ #
556
+ # Download software (Synology SPK for DSM 6).
557
+ #
558
+ # This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads.
559
+ # This API requires the Software Build Role to be enabled.
560
+ # This API requires the Auth Role to be enabled.
561
+ #
562
+ # @param [String] self_address (Optional) The external URL of this server, used to resolve conflicts
563
+ # @return [String]
564
+ def admin_branding_generate_client_spk_dsm_6(self_address = nil)
565
+ submit_params = {}
566
+ if self_address.nil?
567
+ submit_params['SelfAddress'] = @server_address
568
+ else
569
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
570
+
571
+ submit_params['SelfAddress'] = self_address
572
+ end
573
+
574
+ perform_request('api/v1/admin/branding/generate-client/spk-dsm6', submit_params)
575
+ end
576
+
577
+ # AdminBrandingGenerateClientSpkDsm7
578
+ #
579
+ # Download software (Synology SPK for DSM 7).
580
+ #
581
+ # This API requires administrator authentication credentials, unless the server is configured to allow unauthenticated software downloads.
582
+ # This API requires the Software Build Role to be enabled.
583
+ # This API requires the Auth Role to be enabled.
584
+ #
585
+ # @param [String] self_address (Optional) The external URL of this server, used to resolve conflicts
586
+ # @return [String]
587
+ def admin_branding_generate_client_spk_dsm_7(self_address = nil)
588
+ submit_params = {}
589
+ if self_address.nil?
590
+ submit_params['SelfAddress'] = @server_address
591
+ else
592
+ raise TypeError, "'self_address' expected String, got #{self_address.class}" unless self_address.is_a? String
593
+
594
+ submit_params['SelfAddress'] = self_address
595
+ end
596
+
597
+ perform_request('api/v1/admin/branding/generate-client/spk-dsm7', submit_params)
598
+ end
599
+
496
600
  # AdminBrandingGenerateClientTest
497
601
  #
498
602
  # Check if a software download is available.
@@ -770,8 +874,10 @@ module Comet
770
874
 
771
875
  # AdminCreateInstallToken
772
876
  #
773
- # Create token for silent installation (Windows only).
877
+ # Create token for silent installation.
878
+ # Currently only supported for Windows & macOS only
774
879
  # Provide the installation token to silently install the client on windows `install.exe /TOKEN=<installtoken>`
880
+ # Provide the installation token to silently install the client on Mac OS `sudo launchctl setenv BACKUP_APP_TOKEN "installtoken" && sudo /usr/sbin/installer -allowUntrusted -pkg "Comet Backup.pkg" -target /`
775
881
  #
776
882
  # You must supply administrator authentication credentials to use this API.
777
883
  # This API requires the Auth Role to be enabled.
@@ -1573,9 +1679,10 @@ module Comet
1573
1679
  # @param [String] target_id The live connection GUID
1574
1680
  # @param [String] destination The Storage Vault ID
1575
1681
  # @param [String] snapshot_id The selected backup job snapshot
1576
- # @param [String] tree_id (Optional) Browse objects inside subdirectory of backup snapshot
1682
+ # @param [String] tree_id (Optional) Browse objects inside subdirectory of backup snapshot. If it is for VMDK single file restore, it should be the disk image's subtree ID.
1683
+ # @param [Comet::VMDKSnapshotViewOptions] options (Optional) Request a list of stored objects in vmdk file
1577
1684
  # @return [Comet::DispatcherStoredObjectsResponse]
1578
- def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil)
1685
+ def admin_dispatcher_request_stored_objects(target_id, destination, snapshot_id, tree_id = nil, options = nil)
1579
1686
  submit_params = {}
1580
1687
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1581
1688
 
@@ -1591,6 +1698,11 @@ module Comet
1591
1698
 
1592
1699
  submit_params['TreeID'] = tree_id
1593
1700
  end
1701
+ unless options.nil?
1702
+ raise TypeError, "'options' expected Comet::VMDKSnapshotViewOptions, got #{options.class}" unless options.is_a? Comet::VMDKSnapshotViewOptions
1703
+
1704
+ submit_params['Options'] = options.to_json
1705
+ end
1594
1706
 
1595
1707
  body = perform_request('api/v1/admin/dispatcher/request-stored-objects', submit_params)
1596
1708
  json_body = JSON.parse body
@@ -3442,6 +3554,31 @@ module Comet
3442
3554
  ret
3443
3555
  end
3444
3556
 
3557
+ # AdminStoragePingDestination
3558
+ #
3559
+ # Ping a storage destination.
3560
+ #
3561
+ # You must supply administrator authentication credentials to use this API.
3562
+ # Access to this API may be prevented on a per-administrator basis.
3563
+ # This API requires the Storage Role to be enabled.
3564
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
3565
+ #
3566
+ # @param [Comet::DestinationLocation] extra_data The destination location settings
3567
+ # @return [Comet::CometAPIResponseMessage]
3568
+ def admin_storage_ping_destination(extra_data)
3569
+ submit_params = {}
3570
+ raise TypeError, "'extra_data' expected Comet::DestinationLocation, got #{extra_data.class}" unless extra_data.is_a? Comet::DestinationLocation
3571
+
3572
+ submit_params['ExtraData'] = extra_data.to_json
3573
+
3574
+ body = perform_request('api/v1/admin/storage/ping-destination', submit_params)
3575
+ json_body = JSON.parse body
3576
+ check_status json_body
3577
+ ret = Comet::CometAPIResponseMessage.new
3578
+ ret.from_hash(json_body)
3579
+ ret
3580
+ end
3581
+
3445
3582
  # AdminStorageRegisterBucket
3446
3583
  #
3447
3584
  # Create a new bucket.
@@ -3593,7 +3730,7 @@ module Comet
3593
3730
 
3594
3731
  ret_error = Comet::CometAPIResponseMessage.new
3595
3732
  ret_error.from_hash(obj)
3596
- raise Comet::APIResponseError.new(ret_error), 'Comet API response status was not OK'
3733
+ raise Comet::APIResponseError.new(ret_error)
3597
3734
  end
3598
3735
 
3599
3736
  # Perform a synchronous HTTP request.
@@ -3630,7 +3767,7 @@ module Comet
3630
3767
 
3631
3768
  form_params = []
3632
3769
  params.each do |k, v|
3633
- form_params.append [k, v, { :filename => k }]
3770
+ form_params.append [k, v, {:filename => k}]
3634
3771
  end
3635
3772
  req.set_form(form_params, 'multipart/form-data')
3636
3773
 
@@ -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
@@ -9,6 +9,18 @@
9
9
 
10
10
  module Comet
11
11
 
12
+ # AutoRetentionLevel: The system will automatically choose how often to run an automatic Retention Pass after each backup job.
13
+ BACKUPJOBAUTORETENTION_AUTOMATIC = 0
14
+
15
+ # AutoRetentionLevel: The system will run a Retention Pass after every single backup job. This is more system-intensive, but is the most responsive at freeing storage space.
16
+ BACKUPJOBAUTORETENTION_IMMEDIATE = 1
17
+
18
+ # AutoRetentionLevel: The system will follow the automatic ruleset for a 'High Power' device.
19
+ BACKUPJOBAUTORETENTION_MORE_OFTEN = 2
20
+
21
+ # AutoRetentionLevel: The system will follow the automatic ruleset for a 'Low Power' device.
22
+ BACKUPJOBAUTORETENTION_LESS_OFTEN = 3
23
+
12
24
  # JobClassification:
13
25
  JOB_CLASSIFICATION__MIN = 4000
14
26
 
@@ -144,6 +156,8 @@ module Comet
144
156
  # FtpsModeType:
145
157
  FTPS_MODE_EXPLICIT = 2
146
158
 
159
+ INSTALLER_METADATA_FILE = 'installer.json'
160
+
147
161
  # Severity:
148
162
  SEVERITY_INFO = 'I'
149
163
 
@@ -197,6 +211,15 @@ module Comet
197
211
  # RestoreType:
198
212
  RESTORETYPE_OFFICE365_CLOUD = 6
199
213
 
214
+ # RestoreType:
215
+ RESTORETYPE_VMDK_FILE = 7
216
+
217
+ # RestoreType:
218
+ RESTORETYPE_VMDK_FILE_NULL = 8
219
+
220
+ # RestoreType:
221
+ RESTORETYPE_VMDK_FILE_ARCHIVE = 9
222
+
200
223
  # RestoreType: RESTORETYPE_PROCESS_ARCHIVE
201
224
  RESTORETYPE_PROCESS_TARBALL = 3
202
225
 
@@ -360,22 +383,22 @@ module Comet
360
383
  STOREDOBJECTTYPE_WINEFS = 'winefs'
361
384
 
362
385
  # StoredObjectType: "file"
363
- STOREDOBJECTTYPE_EMAILMESSAGE = 'emailmessage\"'
386
+ STOREDOBJECTTYPE_EMAILMESSAGE = 'emailmessage'
364
387
 
365
388
  # StoredObjectType: "dir"
366
- STOREDOBJECTTYPE_EMAILFOLDER = 'mailfolder\"'
389
+ STOREDOBJECTTYPE_EMAILFOLDER = 'mailfolder'
367
390
 
368
391
  # StoredObjectType: "file"
369
- STOREDOBJECTTYPE_OFFICECONTACT = 'contact\"'
392
+ STOREDOBJECTTYPE_OFFICECONTACT = 'contact'
370
393
 
371
394
  # StoredObjectType: "dir"
372
- STOREDOBJECTTYPE_OFFICECONTACTFOLDER = 'contactfolder\"'
395
+ STOREDOBJECTTYPE_OFFICECONTACTFOLDER = 'contactfolder'
373
396
 
374
397
  # StoredObjectType: "file"
375
- STOREDOBJECTTYPE_OFFICECALENDAREVENT = 'calendarevent\"'
398
+ STOREDOBJECTTYPE_OFFICECALENDAREVENT = 'calendarevent'
376
399
 
377
400
  # StoredObjectType: "dir"
378
- STOREDOBJECTTYPE_OFFICECALENDAR = 'calendar\"'
401
+ STOREDOBJECTTYPE_OFFICECALENDAR = 'calendar'
379
402
 
380
403
  # StoredObjectType:
381
404
  STOREDOBJECTTYPE_MSSITE = 'mssite'
@@ -392,6 +415,18 @@ module Comet
392
415
  # StoredObjectType:
393
416
  STOREDOBJECTTYPE_MSSITELISTDRIVEENTITY = 'mssitelistdriveentity'
394
417
 
418
+ # StoredObjectType:
419
+ STOREDOBJECTTYPE_VMDK_FILE = 'vmdkfile'
420
+
421
+ # StoredObjectType:
422
+ STOREDOBJECTTYPE_VMDK_DIRECTORY = 'vmdkdir'
423
+
424
+ # StoredObjectType:
425
+ STOREDOBJECTTYPE_VMDK_WINEFS = 'vmdkwinefs'
426
+
427
+ # StoredObjectType:
428
+ STOREDOBJECTTYPE_VMDK_SYMLINK = 'vmdksymlink'
429
+
395
430
  # ExtraFileExclusionOSRestriction:
396
431
  OS_ANY = 0
397
432
 
@@ -425,18 +460,18 @@ module Comet
425
460
  # DefaultSettingMode:
426
461
  SETTING_ENFORCED_OFF = 4
427
462
 
428
- # sz.LanguageCode:
463
+ # LanguageCode:
429
464
  DEFAULT_LANGUAGE = 'en_US'
430
465
 
431
466
  DEFAULT_TIMEZONE = 'UTC'
432
467
 
433
- APPLICATION_VERSION = '21.9.12'
468
+ APPLICATION_VERSION = '22.3.5'
434
469
 
435
- APPLICATION_VERSION_MAJOR = 21
470
+ APPLICATION_VERSION_MAJOR = 22
436
471
 
437
- APPLICATION_VERSION_MINOR = 9
472
+ APPLICATION_VERSION_MINOR = 3
438
473
 
439
- APPLICATION_VERSION_REVISION = 12
474
+ APPLICATION_VERSION_REVISION = 5
440
475
 
441
476
  RELEASE_CODENAME = 'Voyager'
442
477
 
@@ -444,6 +479,12 @@ module Comet
444
479
 
445
480
  PASSWORD_FORMAT_PLAINTEXT = 0
446
481
 
482
+ UNKNOWN_DEVICE_ERROR = 'ERR_UNKNOWN_DEVICE'
483
+
484
+ TOTPREQUIRED_ERROR = 'ERR_TOTP_REQUIRED'
485
+
486
+ UNSUPPORT_VMDK_FILE_SYSTEM = 'ERR_UNSUPPORT_VMDK_FILE_SYSTEM'
487
+
447
488
  EMAIL_WORKER_STATE_NOT_STARTED = 0
448
489
 
449
490
  EMAIL_WORKER_STATE_STARTED = 1
@@ -454,9 +495,26 @@ module Comet
454
495
 
455
496
  EMAIL_WORKER_STATE_SENDING = 4
456
497
 
457
- UNKNOWN_DEVICE_ERROR = 'ERR_UNKNOWN_DEVICE'
498
+ # WebAuthnDeviceType:
499
+ WEBAUTHN_DEVICE_TYPE__UNKNOWN = 0
458
500
 
459
- TOTPREQUIRED_ERROR = 'ERR_TOTP_REQUIRED'
501
+ # WebAuthnDeviceType:
502
+ WEBAUTHN_DEVICE_TYPE__HARDWARE_TOKEN = 1
503
+
504
+ # WebAuthnDeviceType:
505
+ WEBAUTHN_DEVICE_TYPE__ANDROID = 2
506
+
507
+ # WebAuthnDeviceType:
508
+ WEBAUTHN_DEVICE_TYPE__APPLE = 3
509
+
510
+ # WebAuthnDeviceType:
511
+ WEBAUTHN_DEVICE_TYPE__TPM_GENERIC = 4
512
+
513
+ # WebAuthnDeviceType:
514
+ WEBAUTHN_DEVICE_TYPE__TPM_WINDOWS = 5
515
+
516
+ # WebAuthnDeviceType:
517
+ WEBAUTHN_DEVICE_TYPE__TPM_LINUX = 6
460
518
 
461
519
  # UpdateStatus:
462
520
  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