comet_backup_ruby_sdk 1.3.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/CHANGELOG.md +42 -0
  4. data/Gemfile +0 -0
  5. data/Gemfile.lock +2 -2
  6. data/LICENSE +1 -1
  7. data/README.md +0 -0
  8. data/RELEASING.md +6 -4
  9. data/Rakefile +0 -0
  10. data/comet_backup_ruby_sdk.gemspec +1 -1
  11. data/lib/comet/api_response_error.rb +1 -1
  12. data/lib/comet/comet_server.rb +231 -13
  13. data/lib/comet/definitions.rb +67 -7
  14. data/lib/comet/models/add_bucket_response_message.rb +1 -1
  15. data/lib/comet/models/admin_account_properties_response.rb +1 -1
  16. data/lib/comet/models/admin_email_options.rb +1 -1
  17. data/lib/comet/models/admin_resource_response.rb +1 -1
  18. data/lib/comet/models/admin_security_options.rb +1 -1
  19. data/lib/comet/models/admin_u2fregistration.rb +1 -1
  20. data/lib/comet/models/admin_user_permissions.rb +1 -1
  21. data/lib/comet/models/available_download.rb +1 -1
  22. data/lib/comet/models/azure_destination_location.rb +1 -1
  23. data/lib/comet/models/b2destination_location.rb +1 -1
  24. data/lib/comet/models/b2storage_extra_info.rb +1 -1
  25. data/lib/comet/models/b2transaction_totals.rb +1 -1
  26. data/lib/comet/models/b2virtual_storage_role_settings.rb +1 -1
  27. data/lib/comet/models/backup_job_advanced_options.rb +1 -1
  28. data/lib/comet/models/backup_job_detail.rb +34 -1
  29. data/lib/comet/models/backup_job_progress.rb +1 -1
  30. data/lib/comet/models/backup_rule_config.rb +1 -1
  31. data/lib/comet/models/backup_rule_event_triggers.rb +1 -1
  32. data/lib/comet/models/branding_options.rb +10 -1
  33. data/lib/comet/models/branding_properties.rb +10 -1
  34. data/lib/comet/models/browse_disk_drives_response.rb +1 -1
  35. data/lib/comet/models/browse_edbresponse.rb +1 -1
  36. data/lib/comet/models/browse_hvresponse.rb +1 -1
  37. data/lib/comet/models/browse_office_365objects_response.rb +99 -0
  38. data/lib/comet/models/browse_sqlserver_response.rb +100 -0
  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 +75 -0
  51. data/lib/comet/models/default_email_report_policy.rb +1 -1
  52. data/lib/comet/models/default_source_with_osrestriction.rb +83 -0
  53. data/lib/comet/models/destination_config.rb +7 -1
  54. data/lib/comet/models/destination_location.rb +7 -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/edbfile_info.rb +1 -1
  62. data/lib/comet/models/email_options.rb +1 -1
  63. data/lib/comet/models/email_report_config.rb +1 -1
  64. data/lib/comet/models/email_report_generated_preview.rb +1 -1
  65. data/lib/comet/models/external_ldapauthentication_source_settings.rb +34 -1
  66. data/lib/comet/models/extra_file_exclusion.rb +1 -1
  67. data/lib/comet/models/ftpdestination_location.rb +1 -1
  68. data/lib/comet/models/get_group_policy_response.rb +1 -1
  69. data/lib/comet/models/get_profile_and_hash_response_message.rb +1 -1
  70. data/lib/comet/models/get_profile_hash_response_message.rb +1 -1
  71. data/lib/comet/models/group_policy.rb +1 -1
  72. data/lib/comet/models/hyper_vmachine_info.rb +1 -1
  73. data/lib/comet/models/install_creds.rb +1 -1
  74. data/lib/comet/models/install_token.rb +1 -1
  75. data/lib/comet/models/install_token_response.rb +1 -1
  76. data/lib/comet/models/job_entry.rb +1 -1
  77. data/lib/comet/models/live_user_connection.rb +12 -1
  78. data/lib/comet/models/local_destination_location.rb +1 -1
  79. data/lib/comet/models/mac_oscode_sign_properties.rb +1 -1
  80. data/lib/comet/models/mongo_dbconnection.rb +1 -1
  81. data/lib/comet/models/mssqlconnection.rb +120 -0
  82. data/lib/comet/models/my_sqlconnection.rb +102 -0
  83. data/lib/comet/models/new_bucket_detail.rb +1 -1
  84. data/lib/comet/models/news_entry.rb +1 -1
  85. data/lib/comet/models/office_365connection.rb +123 -0
  86. data/lib/comet/models/office_365credential.rb +111 -0
  87. data/lib/comet/models/office_365custom_setting.rb +132 -0
  88. data/lib/comet/models/office_365object_info.rb +118 -0
  89. data/lib/comet/models/organization.rb +7 -1
  90. data/lib/comet/models/organization_response.rb +1 -1
  91. data/lib/comet/models/osinfo.rb +1 -1
  92. data/lib/comet/models/partition.rb +1 -1
  93. data/lib/comet/models/private_branding_properties.rb +10 -1
  94. data/lib/comet/models/protected_item_engine_type_policy.rb +1 -1
  95. data/lib/comet/models/public_branding_properties.rb +1 -1
  96. data/lib/comet/models/register_office_application_begin_response.rb +93 -0
  97. data/lib/comet/models/register_office_application_check_response.rb +100 -0
  98. data/lib/comet/models/remote_server_address.rb +11 -1
  99. data/lib/comet/models/remote_storage_option.rb +11 -1
  100. data/lib/comet/models/replicator_state_apiresponse.rb +1 -1
  101. data/lib/comet/models/request_storage_vault_response_message.rb +1 -1
  102. data/lib/comet/models/restore_job_advanced_options.rb +17 -1
  103. data/lib/comet/models/retention_policy.rb +1 -1
  104. data/lib/comet/models/retention_range.rb +1 -1
  105. data/lib/comet/models/s3destination_location.rb +1 -1
  106. data/lib/comet/models/schedule_config.rb +1 -1
  107. data/lib/comet/models/search_clause.rb +1 -1
  108. data/lib/comet/models/self_backup_statistics.rb +108 -0
  109. data/lib/comet/models/server_config_options_branding_fragment.rb +1 -1
  110. data/lib/comet/models/server_config_options_software_build_role_fragment.rb +1 -1
  111. data/lib/comet/models/server_meta_branding_properties.rb +135 -0
  112. data/lib/comet/models/server_meta_version_info.rb +16 -1
  113. data/lib/comet/models/session_key_regenerated_response.rb +1 -1
  114. data/lib/comet/models/sftpdestination_location.rb +1 -1
  115. data/lib/comet/models/size_measurement.rb +1 -1
  116. data/lib/comet/models/software_build_role_options.rb +1 -1
  117. data/lib/comet/models/software_update_news_response.rb +1 -1
  118. data/lib/comet/models/source_basic_info.rb +1 -1
  119. data/lib/comet/models/source_config.rb +1 -1
  120. data/lib/comet/models/source_include_pattern.rb +84 -0
  121. data/lib/comet/models/source_statistics.rb +9 -1
  122. data/lib/comet/models/spanned_destination_location.rb +7 -1
  123. data/lib/comet/models/spanned_storage_extra_info.rb +1 -1
  124. data/lib/comet/models/sshconnection.rb +1 -1
  125. data/lib/comet/models/stat_result.rb +1 -1
  126. data/lib/comet/models/storage_free_space_info.rb +1 -1
  127. data/lib/comet/models/storage_vault_provider_policy.rb +1 -1
  128. data/lib/comet/models/stored_object.rb +86 -1
  129. data/lib/comet/models/streamable_event.rb +4 -2
  130. data/lib/comet/models/swift_destination_location.rb +1 -1
  131. data/lib/comet/models/test_response.rb +1 -1
  132. data/lib/comet/models/totp_regenerated_response.rb +1 -1
  133. data/lib/comet/models/u2fregister_request.rb +1 -1
  134. data/lib/comet/models/u2fregistered_key.rb +1 -1
  135. data/lib/comet/models/u2fregistration_challenge_response.rb +1 -1
  136. data/lib/comet/models/u2fsign_request.rb +1 -1
  137. data/lib/comet/models/u2fsign_response.rb +1 -1
  138. data/lib/comet/models/uninstall_config.rb +1 -1
  139. data/lib/comet/models/update_campaign_device_status.rb +1 -1
  140. data/lib/comet/models/update_campaign_options.rb +1 -1
  141. data/lib/comet/models/update_campaign_properties.rb +1 -1
  142. data/lib/comet/models/update_campaign_status.rb +1 -1
  143. data/lib/comet/models/update_campaign_status_device_entry.rb +1 -1
  144. data/lib/comet/models/user_custom_email_settings.rb +1 -1
  145. data/lib/comet/models/user_on_server.rb +1 -1
  146. data/lib/comet/models/user_policy.rb +16 -1
  147. data/lib/comet/models/user_profile_config.rb +1 -1
  148. data/lib/comet/models/user_profile_fragment.rb +1 -1
  149. data/lib/comet/models/vault_snapshot.rb +7 -1
  150. data/lib/comet/models/vsscomponent.rb +1 -1
  151. data/lib/comet/models/vsswriter_info.rb +1 -1
  152. data/lib/comet/models/wasabi_virtual_storage_role_settings.rb +1 -1
  153. data/lib/comet/models/web_interface_branding_properties.rb +1 -1
  154. data/lib/comet/models/webhook_option.rb +1 -1
  155. data/lib/comet/models/win_smbauth.rb +1 -1
  156. data/lib/comet/models/windows_code_sign_properties.rb +1 -1
  157. data/lib/comet_backup_ruby_sdk.rb +16 -1
  158. metadata +18 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe045abb4afab383a013a5da8d35ed80d576fa82361d1579421f23722393be7
4
- data.tar.gz: cb90f69c80adce36b9277042ae4581a168d9cc4d820e8eed974c9a705cf9dca4
3
+ metadata.gz: 5978dc4b2eb4c0001eb7a7c44b3a215450fcbdc9ad7e639c75ba4b9b023b9ac5
4
+ data.tar.gz: 8bfd3b9417fefa6bde04316a2fbd6917ded287594e42cc64d989f56be52a6af4
5
5
  SHA512:
6
- metadata.gz: b239d4b53d1096c9acebdd9769a1f415081a7a74dcba8834bcef72ddb459b5ffda6d0a4d22ab8310661bacf0d577630dbb01ef7283f494dfabb922bfe17218fb
7
- data.tar.gz: b9791ed93a89258fc608375ef5230e62dfbd35589c1bf5026aae2bd35816985cf5b2caf4ba3a5c3c39f0d61f409c92575a0a7f6f0b7f097abad08e0e48383697
6
+ metadata.gz: 7bf9d9f36941632b74473ab2d6aeb6d0252951bdcf9be1b6f9ef9b1e595bc2cd91ee813f689d9e84c0b08442378799c8e6fd563c43aef40fd75f23b57d33d5bc
7
+ data.tar.gz: 859734f1a066f09426fb736ab83e28fa1b829ed795db56ed403622825fdf701723e25465f511be44e9316876d5d5f9e2a5f3904569005b1930db78aca3773a8c
data/.rubocop.yml CHANGED
@@ -23,3 +23,8 @@ Layout/EmptyLinesAroundClassBody:
23
23
  # with the times when we do need multi-line bodies
24
24
  Style/IfUnlessModifier:
25
25
  Enabled: false
26
+
27
+ # allow rocket hashes
28
+
29
+ Style/HashSyntax:
30
+ EnforcedStyle: no_mixed_keys
data/CHANGELOG.md CHANGED
@@ -1,4 +1,46 @@
1
1
  # CHANGELOG
2
+ ## 2021-09-08 v1.7.0
3
+ - Based on Comet 21.9.1
4
+ - Support new `device_timezone` field on the `DeviceConfig` class.
5
+ - Add `admin_dispatcher_ping_destination` api method
6
+ - Add support for new retention range type constants: `RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_DAY`
7
+ - Add support for new retention range type constants: `RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_WEEK`
8
+ - Add support for new retention range type constants: `RETENTIONRANGE_LAST_X_BACKUPS_ONE_FOR_EACH_MONTH`
9
+ - Add support for Microsoft Office 365 Sharepoiint constant `STOREDOBJECTTYPE_MSSITELISTDRIVEENTITY`
10
+ - Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_PUBLIC`
11
+ - Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_CHINA`
12
+ - Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_GERMANY`
13
+ - Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_US_GOVT`
14
+ - Add Microsoft Office 365 Region cloud region constants `OFFICE_365_REGION_US_DOD`
15
+
16
+ ## 2021-07-01 v1.6.0
17
+ - Based on Comet 21.6.6
18
+ - Support new `DefaultSourceWithOSRestriction` and `LastSuccessfulBackupJob` fields
19
+ - Support custom credentials when performing a cloud Office 365 restore job
20
+ - Support identifying Microsoft Teams folders inside a Sharepoint backup job
21
+ - Document the `SourceIncludePattern` structure used for `PINCLUDE`/`RINCLUDE` rules in a File-type `EngineProps` array
22
+ - Document existing `BrandingProps` endpoint
23
+
24
+ ## 2021-05-25 v1.5.0
25
+ - Based on Comet 21.6.1
26
+ - Add new APIs to remotely browse MySQL, MongoDB, MSSQL database servers
27
+ - Add Microsoft Office 365 properties on BackupJobDetail and on StoredObject
28
+ - Add Microsoft Office 365 browsing APIs
29
+ - Add Microsoft Office 365 Engine definition (`ENGINE_BUILTIN_MSOFFICE`) and associated `EngineProp` data structure definitions
30
+ - Add `AdminDispatcherRegisterOfficeApplication` APIs
31
+ - Add `RESTORETYPE_OFFICE365_CLOUD` constant
32
+ - Support suspending organizations
33
+ - Support reading the Server Self-Backup status
34
+ - Support new `PathMenuBarIcnsFile` branding option for Comet Backup on macOS
35
+ - Add more detailed description for `AdminDispatcherRequestStoredObjects`
36
+
37
+ ## 2021-03-03 v1.4.0
38
+ - Based on Comet 21.2.1
39
+ - Support restoring files to original paths
40
+ - Support the new "Custom" requestable Storage Vault provider type and its `CustomRemoteBucketSettings` structure
41
+ - Support new `SpanUseStaticSlots` attribute
42
+ - Fix missing fields in `ExternalLDAPAuthenticationSourceSettings` structure
43
+ - Fix broken `AdminDispatcherRequestFilesystemObjects` that was parsing into the wrong response type
2
44
 
3
45
  ## 2020-11-24 v1.3.0
4
46
  - Based on Comet 20.11.0
data/Gemfile CHANGED
File without changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (1.2.0)
4
+ comet_backup_ruby_sdk (1.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,7 +14,7 @@ GEM
14
14
  rainbow (3.0.0)
15
15
  rake (13.0.1)
16
16
  regexp_parser (1.7.1)
17
- rexml (3.2.4)
17
+ rexml (3.2.5)
18
18
  rubocop (0.88.0)
19
19
  parallel (~> 1.10)
20
20
  parser (>= 2.7.1.1)
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020 Comet Licensing Ltd.
1
+ Copyright (c) 2021 Comet Licensing Ltd.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
4
 
data/README.md CHANGED
File without changes
data/RELEASING.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  1. All tests passing
4
4
  2. Update changelog in `CHANGELOG.md`
5
- 3. Update version number in `gemspec`
6
- 4. `gem build comet_backup_ruby_sdk`
5
+ 3. Update version number in `comet_backup_ruby_sdk.gemspec`
6
+ 4. `bundle install`
7
+ - Should update our internal version in Gemfile.lock
8
+ 5. `gem build comet_backup_ruby_sdk.gemspec`
7
9
  - Should be warning-free
8
- 5. Git tag
10
+ 6. Git tag
9
11
  - Respect semver
10
- 6. `gem push comet_backup_ruby_sdk-0.x.x.gem`
12
+ 7. `gem push comet_backup_ruby_sdk-1.x.x.gem`
data/Rakefile CHANGED
File without changes
@@ -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.3.0'
15
+ spec.version = '1.7.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-2020 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2021 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-2020 Comet Licensing Ltd.
3
+ # Copyright (c) 2020-2021 Comet Licensing Ltd.
4
4
  # Please see the LICENSE file for usage information.
5
5
  #
6
6
  # SPDX-License-Identifier: MIT
@@ -808,6 +808,7 @@ module Comet
808
808
  # This does not remove any storage buckets. Unused storage buckets will be cleaned up by the Constellation Role.
809
809
  # Any stored data can not be decrypted without the user profile. Misuse can cause data loss!
810
810
  # This also allows to uninstall software from active devices under the user account
811
+ # This also removes all job history for the user account.
811
812
  #
812
813
  # You must supply administrator authentication credentials to use this API.
813
814
  # This API requires the Auth Role to be enabled.
@@ -1076,6 +1077,33 @@ module Comet
1076
1077
  ret
1077
1078
  end
1078
1079
 
1080
+ # AdminDispatcherPingDestination
1081
+ #
1082
+ # Test the connection to the storage bucket.
1083
+ #
1084
+ # You must supply administrator authentication credentials to use this API.
1085
+ # This API requires the Auth Role to be enabled.
1086
+ #
1087
+ # @param [String] target_id The live connection GUID
1088
+ # @param [Comet::DestinationLocation] extra_data The destination location settings
1089
+ # @return [Comet::CometAPIResponseMessage]
1090
+ def admin_dispatcher_ping_destination(target_id, extra_data)
1091
+ submit_params = {}
1092
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1093
+
1094
+ submit_params['TargetID'] = target_id
1095
+ raise TypeError, "'extra_data' expected Comet::DestinationLocation, got #{extra_data.class}" unless extra_data.is_a? Comet::DestinationLocation
1096
+
1097
+ submit_params['ExtraData'] = extra_data.to_json
1098
+
1099
+ body = perform_request('api/v1/admin/dispatcher/ping-destination', submit_params)
1100
+ json_body = JSON.parse body
1101
+ check_status json_body
1102
+ ret = Comet::CometAPIResponseMessage.new
1103
+ ret.from_hash(json_body)
1104
+ ret
1105
+ end
1106
+
1079
1107
  # AdminDispatcherRefetchProfile
1080
1108
  #
1081
1109
  # Instruct a live connected device to refresh their profile.
@@ -1100,6 +1128,62 @@ module Comet
1100
1128
  ret
1101
1129
  end
1102
1130
 
1131
+ # AdminDispatcherRegisterOfficeApplicationBegin
1132
+ #
1133
+ # Begin the process of registering a new Azure AD application that can access Office 365 for backup.
1134
+ # After calling this API, you should supply the login details to the end-user, and then begin polling the AdminDispatcherRegisterOfficeApplicationCheck with the supplied "Continuation" parameter to check on the registration process.
1135
+ #
1136
+ # You must supply administrator authentication credentials to use this API.
1137
+ # This API requires the Auth Role to be enabled.
1138
+ #
1139
+ # @param [String] target_id The live connection GUID
1140
+ # @param [String] email_address The email address of the Azure AD administrator
1141
+ # @return [Comet::RegisterOfficeApplicationBeginResponse]
1142
+ def admin_dispatcher_register_office_application_begin(target_id, email_address)
1143
+ submit_params = {}
1144
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1145
+
1146
+ submit_params['TargetID'] = target_id
1147
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
1148
+
1149
+ submit_params['EmailAddress'] = email_address
1150
+
1151
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/begin', submit_params)
1152
+ json_body = JSON.parse body
1153
+ check_status json_body
1154
+ ret = Comet::RegisterOfficeApplicationBeginResponse.new
1155
+ ret.from_hash(json_body)
1156
+ ret
1157
+ end
1158
+
1159
+ # AdminDispatcherRegisterOfficeApplicationCheck
1160
+ #
1161
+ # Check the process of registering a new Azure AD application that can access Office 365 for backup.
1162
+ # You should begin the process by calling AdminDispatcherRegisterOfficeApplicationBegin and asking the end-user to complete the Azure authentication steps.
1163
+ #
1164
+ # You must supply administrator authentication credentials to use this API.
1165
+ # This API requires the Auth Role to be enabled.
1166
+ #
1167
+ # @param [String] target_id The live connection GUID
1168
+ # @param [String] continuation The ID returned from the AdminDispatcherRegisterOfficeApplicationBegin endpoint
1169
+ # @return [Comet::RegisterOfficeApplicationCheckResponse]
1170
+ def admin_dispatcher_register_office_application_check(target_id, continuation)
1171
+ submit_params = {}
1172
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1173
+
1174
+ submit_params['TargetID'] = target_id
1175
+ raise TypeError, "'continuation' expected String, got #{continuation.class}" unless continuation.is_a? String
1176
+
1177
+ submit_params['Continuation'] = continuation
1178
+
1179
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/check', submit_params)
1180
+ json_body = JSON.parse body
1181
+ check_status json_body
1182
+ ret = Comet::RegisterOfficeApplicationCheckResponse.new
1183
+ ret.from_hash(json_body)
1184
+ ret
1185
+ end
1186
+
1103
1187
  # AdminDispatcherReindexStorageVault
1104
1188
  #
1105
1189
  # Instruct a live connected device to rebuild Storage Vault indexes now.
@@ -1197,6 +1281,90 @@ module Comet
1197
1281
  ret
1198
1282
  end
1199
1283
 
1284
+ # AdminDispatcherRequestBrowseMongodb
1285
+ #
1286
+ # Request a list of tables in MongoDB database.
1287
+ # The remote device must have given consent for an MSP to browse their files.
1288
+ #
1289
+ # You must supply administrator authentication credentials to use this API.
1290
+ # This API requires the Auth Role to be enabled.
1291
+ #
1292
+ # @param [String] target_id The live connection GUID
1293
+ # @param [Comet::MongoDBConnection] credentials The Mongo database authentication settings
1294
+ # @return [Comet::BrowseSQLServerResponse]
1295
+ def admin_dispatcher_request_browse_mongodb(target_id, credentials)
1296
+ submit_params = {}
1297
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1298
+
1299
+ submit_params['TargetID'] = target_id
1300
+ raise TypeError, "'credentials' expected Comet::MongoDBConnection, got #{credentials.class}" unless credentials.is_a? Comet::MongoDBConnection
1301
+
1302
+ submit_params['Credentials'] = credentials.to_json
1303
+
1304
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mongodb', submit_params)
1305
+ json_body = JSON.parse body
1306
+ check_status json_body
1307
+ ret = Comet::BrowseSQLServerResponse.new
1308
+ ret.from_hash(json_body)
1309
+ ret
1310
+ end
1311
+
1312
+ # AdminDispatcherRequestBrowseMssql
1313
+ #
1314
+ # Request a list of tables in MSSQL database.
1315
+ # The remote device must have given consent for an MSP to browse their files.
1316
+ #
1317
+ # You must supply administrator authentication credentials to use this API.
1318
+ # This API requires the Auth Role to be enabled.
1319
+ #
1320
+ # @param [String] target_id The live connection GUID
1321
+ # @param [Comet::MSSQLConnection] credentials The MSSQL database authentication settings
1322
+ # @return [Comet::BrowseSQLServerResponse]
1323
+ def admin_dispatcher_request_browse_mssql(target_id, credentials)
1324
+ submit_params = {}
1325
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1326
+
1327
+ submit_params['TargetID'] = target_id
1328
+ raise TypeError, "'credentials' expected Comet::MSSQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MSSQLConnection
1329
+
1330
+ submit_params['Credentials'] = credentials.to_json
1331
+
1332
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mssql', submit_params)
1333
+ json_body = JSON.parse body
1334
+ check_status json_body
1335
+ ret = Comet::BrowseSQLServerResponse.new
1336
+ ret.from_hash(json_body)
1337
+ ret
1338
+ end
1339
+
1340
+ # AdminDispatcherRequestBrowseMysql
1341
+ #
1342
+ # Request a list of tables in MySQL database.
1343
+ # The remote device must have given consent for an MSP to browse their files.
1344
+ #
1345
+ # You must supply administrator authentication credentials to use this API.
1346
+ # This API requires the Auth Role to be enabled.
1347
+ #
1348
+ # @param [String] target_id The live connection GUID
1349
+ # @param [Comet::MySQLConnection] credentials The MySQL database authentication settings
1350
+ # @return [Comet::BrowseSQLServerResponse]
1351
+ def admin_dispatcher_request_browse_mysql(target_id, credentials)
1352
+ submit_params = {}
1353
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1354
+
1355
+ submit_params['TargetID'] = target_id
1356
+ raise TypeError, "'credentials' expected Comet::MySQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MySQLConnection
1357
+
1358
+ submit_params['Credentials'] = credentials.to_json
1359
+
1360
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mysql', submit_params)
1361
+ json_body = JSON.parse body
1362
+ check_status json_body
1363
+ ret = Comet::BrowseSQLServerResponse.new
1364
+ ret.from_hash(json_body)
1365
+ ret
1366
+ end
1367
+
1200
1368
  # AdminDispatcherRequestBrowseVssAaw
1201
1369
  #
1202
1370
  # Request a list of installed VSS Writers (Application-Aware Writers) from a live connected device.
@@ -1230,7 +1398,7 @@ module Comet
1230
1398
  #
1231
1399
  # @param [String] target_id The live connection GUID
1232
1400
  # @param [String] path (Optional) Browse objects inside this path. If empty or not present, returns the top-level device paths
1233
- # @return [Array<Comet::StoredObject>]
1401
+ # @return [Comet::DispatcherStoredObjectsResponse]
1234
1402
  def admin_dispatcher_request_filesystem_objects(target_id, path = nil)
1235
1403
  submit_params = {}
1236
1404
  raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
@@ -1245,15 +1413,8 @@ module Comet
1245
1413
  body = perform_request('api/v1/admin/dispatcher/request-filesystem-objects', submit_params)
1246
1414
  json_body = JSON.parse body
1247
1415
  check_status json_body
1248
- if json_body.nil?
1249
- ret = []
1250
- else
1251
- ret = Array.new(json_body.length)
1252
- json_body.each_with_index do |v, i|
1253
- ret[i] = Comet::StoredObject.new
1254
- ret[i].from_hash(v)
1255
- end
1256
- end
1416
+ ret = Comet::DispatcherStoredObjectsResponse.new
1417
+ ret.from_hash(json_body)
1257
1418
  ret
1258
1419
  end
1259
1420
 
@@ -1280,10 +1441,67 @@ module Comet
1280
1441
  ret
1281
1442
  end
1282
1443
 
1444
+ # AdminDispatcherRequestOffice365Accounts
1445
+ #
1446
+ # Request a list of Office365 mailbox accounts.
1447
+ # The remote device must have given consent for an MSP to browse their files.
1448
+ #
1449
+ # You must supply administrator authentication credentials to use this API.
1450
+ # This API requires the Auth Role to be enabled.
1451
+ #
1452
+ # @param [String] target_id The live connection GUID
1453
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1454
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1455
+ def admin_dispatcher_request_office_365accounts(target_id, credentials)
1456
+ submit_params = {}
1457
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1458
+
1459
+ submit_params['TargetID'] = target_id
1460
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1461
+
1462
+ submit_params['Credentials'] = credentials.to_json
1463
+
1464
+ body = perform_request('api/v1/admin/dispatcher/request-office365-accounts', submit_params)
1465
+ json_body = JSON.parse body
1466
+ check_status json_body
1467
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1468
+ ret.from_hash(json_body)
1469
+ ret
1470
+ end
1471
+
1472
+ # AdminDispatcherRequestOffice365Sites
1473
+ #
1474
+ # Request a list of Office365 sites.
1475
+ # The remote device must have given consent for an MSP to browse their files.
1476
+ #
1477
+ # You must supply administrator authentication credentials to use this API.
1478
+ # This API requires the Auth Role to be enabled.
1479
+ #
1480
+ # @param [String] target_id The live connection GUID
1481
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1482
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1483
+ def admin_dispatcher_request_office_365sites(target_id, credentials)
1484
+ submit_params = {}
1485
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1486
+
1487
+ submit_params['TargetID'] = target_id
1488
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1489
+
1490
+ submit_params['Credentials'] = credentials.to_json
1491
+
1492
+ body = perform_request('api/v1/admin/dispatcher/request-office365-sites', submit_params)
1493
+ json_body = JSON.parse body
1494
+ check_status json_body
1495
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1496
+ ret.from_hash(json_body)
1497
+ ret
1498
+ end
1499
+
1283
1500
  # AdminDispatcherRequestStoredObjects
1284
1501
  #
1285
1502
  # Request a list of stored objects inside an existing backup job.
1286
1503
  # The remote device must have given consent for an MSP to browse their files.
1504
+ # To service this request, the remote device must connect to the Storage Vault and load index data. There may be a small delay. If the remote device is running Comet 20.12.0 or later, the necessary index data is cached when this API is first called, for 15 minutes after the last repeated call. This can improve performance for interactively browsing an entire tree of stored objects.
1287
1505
  #
1288
1506
  # You must supply administrator authentication credentials to use this API.
1289
1507
  # This API requires the Auth Role to be enabled.
@@ -3265,7 +3483,7 @@ module Comet
3265
3483
 
3266
3484
  ret_error = Comet::CometAPIResponseMessage.new
3267
3485
  ret_error.from_hash(obj)
3268
- raise Comet::APIResponseError.new(ret_error)
3486
+ raise Comet::APIResponseError.new(ret_error), 'Comet API response status was not OK'
3269
3487
  end
3270
3488
 
3271
3489
  # Perform a synchronous HTTP request.
@@ -3302,7 +3520,7 @@ module Comet
3302
3520
 
3303
3521
  form_params = []
3304
3522
  params.each do |k, v|
3305
- form_params.append [k, v, {:filename => k}]
3523
+ form_params.append [k, v, { :filename => k }]
3306
3524
  end
3307
3525
  req.set_form(form_params, 'multipart/form-data')
3308
3526