comet_backup_ruby_sdk 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bcd5336d8e52eab1535016a7f4d9c0b0a703491b8f63fb01ccd44b4dfa5f517
4
- data.tar.gz: 558c4b7ec014edd0fb7f114eb3a0b2b9dbcc890ca59d3090ff6c1731a885fec5
3
+ metadata.gz: e207ce3e89091839b912a7f7ee7de17315de2474890d7560b5b79f1afee434c5
4
+ data.tar.gz: d85eddeaa1e27a71d3d1415742afa28808e8575f2a46bf20d56a7b0da75a3c9f
5
5
  SHA512:
6
- metadata.gz: dd095297f0142a76f5d4f458e38e55435fc4b3d9c7e6b366a786e811275922e73bef8ac106eeb21e21f2aaca93e6bc177ba2d8ae158d93ddd1f5dc839f0d22f1
7
- data.tar.gz: c752085a6a3cff6fafbe2e03dce5d0f23211f778fbb99030ba1ad67480b97abf0d1890e934a5145622f3c31561f68581c27edba55be7ea26e1772160077b4309
6
+ metadata.gz: 566f2c136d8c7af458ab75d6fd9f0117ab68a5c114e1ab589af8990773f8e6850326d323380aec56a36332e6bfc85686ce5cbdafeeb358ccb5a0058a2d051e0e
7
+ data.tar.gz: c92c6256810c4dcaec62ee81ff44ebc2944b97c41a5fa193200b340f523973ea74fee4c4372d37321356020c9323723e7137d2b4593b8fc381ef00abcd96212c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2021-05-25 v1.5.0
4
+ - Based on Comet 21.6.1
5
+ - Add new APIs to remotely browse MySQL, MongoDB, MSSQL database servers
6
+ - Add Microsoft Office 365 properties on BackupJobDetail and on StoredObject
7
+ - Add Microsoft Office 365 browsing APIs
8
+ - Add Microsoft Office 365 Engine definition (`ENGINE_BUILTIN_MSOFFICE`) and associated `EngineProp` data structure definitions
9
+ - Add `AdminDispatcherRegisterOfficeApplication` APIs
10
+ - Add `RESTORETYPE_OFFICE365_CLOUD` constant
11
+ - Support suspending organizations
12
+ - Support reading the Server Self-Backup status
13
+ - Support new `PathMenuBarIcnsFile` branding option for Comet Backup on macOS
14
+ - Add more detailed description for `AdminDispatcherRequestStoredObjects`
15
+
3
16
  ## 2021-03-03 v1.4.0
4
17
  - Based on Comet 21.2.1
5
18
  - Support restoring files to original paths
data/Gemfile.lock CHANGED
@@ -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)
@@ -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.4.0'
15
+ spec.version = '1.5.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -1100,6 +1100,62 @@ module Comet
1100
1100
  ret
1101
1101
  end
1102
1102
 
1103
+ # AdminDispatcherRegisterOfficeApplicationBegin
1104
+ #
1105
+ # Begin the process of registering a new Azure AD application that can access Office 365 for backup.
1106
+ # 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.
1107
+ #
1108
+ # You must supply administrator authentication credentials to use this API.
1109
+ # This API requires the Auth Role to be enabled.
1110
+ #
1111
+ # @param [String] target_id The live connection GUID
1112
+ # @param [String] email_address The email address of the Azure AD administrator
1113
+ # @return [Comet::RegisterOfficeApplicationBeginResponse]
1114
+ def admin_dispatcher_register_office_application_begin(target_id, email_address)
1115
+ submit_params = {}
1116
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1117
+
1118
+ submit_params['TargetID'] = target_id
1119
+ raise TypeError, "'email_address' expected String, got #{email_address.class}" unless email_address.is_a? String
1120
+
1121
+ submit_params['EmailAddress'] = email_address
1122
+
1123
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/begin', submit_params)
1124
+ json_body = JSON.parse body
1125
+ check_status json_body
1126
+ ret = Comet::RegisterOfficeApplicationBeginResponse.new
1127
+ ret.from_hash(json_body)
1128
+ ret
1129
+ end
1130
+
1131
+ # AdminDispatcherRegisterOfficeApplicationCheck
1132
+ #
1133
+ # Check the process of registering a new Azure AD application that can access Office 365 for backup.
1134
+ # You should begin the process by calling AdminDispatcherRegisterOfficeApplicationBegin and asking the end-user to complete the Azure authentication steps.
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] continuation The ID returned from the AdminDispatcherRegisterOfficeApplicationBegin endpoint
1141
+ # @return [Comet::RegisterOfficeApplicationCheckResponse]
1142
+ def admin_dispatcher_register_office_application_check(target_id, continuation)
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, "'continuation' expected String, got #{continuation.class}" unless continuation.is_a? String
1148
+
1149
+ submit_params['Continuation'] = continuation
1150
+
1151
+ body = perform_request('api/v1/admin/dispatcher/register-office-application/check', submit_params)
1152
+ json_body = JSON.parse body
1153
+ check_status json_body
1154
+ ret = Comet::RegisterOfficeApplicationCheckResponse.new
1155
+ ret.from_hash(json_body)
1156
+ ret
1157
+ end
1158
+
1103
1159
  # AdminDispatcherReindexStorageVault
1104
1160
  #
1105
1161
  # Instruct a live connected device to rebuild Storage Vault indexes now.
@@ -1197,6 +1253,90 @@ module Comet
1197
1253
  ret
1198
1254
  end
1199
1255
 
1256
+ # AdminDispatcherRequestBrowseMongodb
1257
+ #
1258
+ # Request a list of tables in MongoDB database.
1259
+ # The remote device must have given consent for an MSP to browse their files.
1260
+ #
1261
+ # You must supply administrator authentication credentials to use this API.
1262
+ # This API requires the Auth Role to be enabled.
1263
+ #
1264
+ # @param [String] target_id The live connection GUID
1265
+ # @param [Comet::MongoDBConnection] credentials The Mongo database authentication settings
1266
+ # @return [Comet::BrowseSQLServerResponse]
1267
+ def admin_dispatcher_request_browse_mongodb(target_id, credentials)
1268
+ submit_params = {}
1269
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1270
+
1271
+ submit_params['TargetID'] = target_id
1272
+ raise TypeError, "'credentials' expected Comet::MongoDBConnection, got #{credentials.class}" unless credentials.is_a? Comet::MongoDBConnection
1273
+
1274
+ submit_params['Credentials'] = credentials.to_json
1275
+
1276
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mongodb', submit_params)
1277
+ json_body = JSON.parse body
1278
+ check_status json_body
1279
+ ret = Comet::BrowseSQLServerResponse.new
1280
+ ret.from_hash(json_body)
1281
+ ret
1282
+ end
1283
+
1284
+ # AdminDispatcherRequestBrowseMssql
1285
+ #
1286
+ # Request a list of tables in MSSQL 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::MSSQLConnection] credentials The MSSQL database authentication settings
1294
+ # @return [Comet::BrowseSQLServerResponse]
1295
+ def admin_dispatcher_request_browse_mssql(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::MSSQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MSSQLConnection
1301
+
1302
+ submit_params['Credentials'] = credentials.to_json
1303
+
1304
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mssql', 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
+ # AdminDispatcherRequestBrowseMysql
1313
+ #
1314
+ # Request a list of tables in MySQL 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::MySQLConnection] credentials The MySQL database authentication settings
1322
+ # @return [Comet::BrowseSQLServerResponse]
1323
+ def admin_dispatcher_request_browse_mysql(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::MySQLConnection, got #{credentials.class}" unless credentials.is_a? Comet::MySQLConnection
1329
+
1330
+ submit_params['Credentials'] = credentials.to_json
1331
+
1332
+ body = perform_request('api/v1/admin/dispatcher/request-browse-mysql', 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
+
1200
1340
  # AdminDispatcherRequestBrowseVssAaw
1201
1341
  #
1202
1342
  # Request a list of installed VSS Writers (Application-Aware Writers) from a live connected device.
@@ -1273,10 +1413,67 @@ module Comet
1273
1413
  ret
1274
1414
  end
1275
1415
 
1416
+ # AdminDispatcherRequestOffice365Accounts
1417
+ #
1418
+ # Request a list of Office365 mailbox accounts.
1419
+ # The remote device must have given consent for an MSP to browse their files.
1420
+ #
1421
+ # You must supply administrator authentication credentials to use this API.
1422
+ # This API requires the Auth Role to be enabled.
1423
+ #
1424
+ # @param [String] target_id The live connection GUID
1425
+ # @param [Comet::Office365Credential] credentials The Office365 account credential
1426
+ # @return [Comet::BrowseOffice365ObjectsResponse]
1427
+ def admin_dispatcher_request_office_365accounts(target_id, credentials)
1428
+ submit_params = {}
1429
+ raise TypeError, "'target_id' expected String, got #{target_id.class}" unless target_id.is_a? String
1430
+
1431
+ submit_params['TargetID'] = target_id
1432
+ raise TypeError, "'credentials' expected Comet::Office365Credential, got #{credentials.class}" unless credentials.is_a? Comet::Office365Credential
1433
+
1434
+ submit_params['Credentials'] = credentials.to_json
1435
+
1436
+ body = perform_request('api/v1/admin/dispatcher/request-office365-accounts', submit_params)
1437
+ json_body = JSON.parse body
1438
+ check_status json_body
1439
+ ret = Comet::BrowseOffice365ObjectsResponse.new
1440
+ ret.from_hash(json_body)
1441
+ ret
1442
+ end
1443
+
1444
+ # AdminDispatcherRequestOffice365Sites
1445
+ #
1446
+ # Request a list of Office365 sites.
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_365sites(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-sites', 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
+
1276
1472
  # AdminDispatcherRequestStoredObjects
1277
1473
  #
1278
1474
  # Request a list of stored objects inside an existing backup job.
1279
1475
  # The remote device must have given consent for an MSP to browse their files.
1476
+ # 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.
1280
1477
  #
1281
1478
  # You must supply administrator authentication credentials to use this API.
1282
1479
  # This API requires the Auth Role to be enabled.
@@ -176,6 +176,9 @@ module Comet
176
176
  # RestoreType:
177
177
  RESTORETYPE_FILE_ARCHIVE = 5
178
178
 
179
+ # RestoreType:
180
+ RESTORETYPE_OFFICE365_CLOUD = 6
181
+
179
182
  # RestoreType: RESTORETYPE_PROCESS_ARCHIVE
180
183
  RESTORETYPE_PROCESS_TARBALL = 3
181
184
 
@@ -291,6 +294,8 @@ module Comet
291
294
 
292
295
  ENGINE_BUILTIN_MONGODB = 'engine1/mongodb'
293
296
 
297
+ ENGINE_BUILTIN_MSOFFICE = 'engine1/winmsofficemail'
298
+
294
299
  # MSSQLAuthMode:
295
300
  MSSQL_AUTH_WINDOWS = 'windows'
296
301
 
@@ -327,6 +332,33 @@ module Comet
327
332
  # StoredObjectType:
328
333
  STOREDOBJECTTYPE_WINEFS = 'winefs'
329
334
 
335
+ # StoredObjectType: "file"
336
+ STOREDOBJECTTYPE_EMAILMESSAGE = 'emailmessage\"'
337
+
338
+ # StoredObjectType: "dir"
339
+ STOREDOBJECTTYPE_EMAILFOLDER = 'mailfolder\"'
340
+
341
+ # StoredObjectType: "file"
342
+ STOREDOBJECTTYPE_OFFICECONTACT = 'contact\"'
343
+
344
+ # StoredObjectType: "dir"
345
+ STOREDOBJECTTYPE_OFFICECONTACTFOLDER = 'contactfolder\"'
346
+
347
+ # StoredObjectType: "file"
348
+ STOREDOBJECTTYPE_OFFICECALENDAREVENT = 'calendarevent\"'
349
+
350
+ # StoredObjectType: "dir"
351
+ STOREDOBJECTTYPE_OFFICECALENDAR = 'calendar\"'
352
+
353
+ # StoredObjectType:
354
+ STOREDOBJECTTYPE_MSSITE = 'mssite'
355
+
356
+ # StoredObjectType:
357
+ STOREDOBJECTTYPE_MSSITELISTENTITY = 'mssitelistentity'
358
+
359
+ # StoredObjectType:
360
+ STOREDOBJECTTYPE_MSSITEITEMENTITY = 'mssiteitementity'
361
+
330
362
  # ExtraFileExclusionOSRestriction:
331
363
  OS_ANY = 0
332
364
 
@@ -365,15 +397,15 @@ module Comet
365
397
 
366
398
  DEFAULT_TIMEZONE = 'UTC'
367
399
 
368
- APPLICATION_VERSION = '21.2.1'
400
+ APPLICATION_VERSION = '21.6.1'
369
401
 
370
402
  APPLICATION_VERSION_MAJOR = 21
371
403
 
372
- APPLICATION_VERSION_MINOR = 2
404
+ APPLICATION_VERSION_MINOR = 6
373
405
 
374
406
  APPLICATION_VERSION_REVISION = 1
375
407
 
376
- RELEASE_CODENAME = 'Ganymede'
408
+ RELEASE_CODENAME = 'Voyager'
377
409
 
378
410
  ENCRYPTIONMETHOD_UNCONFIGURED = 0
379
411
 
@@ -65,6 +65,15 @@ module Comet
65
65
  # @type [Number] download_size
66
66
  attr_accessor :download_size
67
67
 
68
+ # @type [Number] total_mails_count
69
+ attr_accessor :total_mails_count
70
+
71
+ # @type [Number] total_sites_count
72
+ attr_accessor :total_sites_count
73
+
74
+ # @type [Number] total_accounts_count
75
+ attr_accessor :total_accounts_count
76
+
68
77
  # @type [String] cancellation_id
69
78
  attr_accessor :cancellation_id
70
79
 
@@ -96,6 +105,9 @@ module Comet
96
105
  @total_chunks = 0
97
106
  @upload_size = 0
98
107
  @download_size = 0
108
+ @total_mails_count = 0
109
+ @total_sites_count = 0
110
+ @total_accounts_count = 0
99
111
  @cancellation_id = ''
100
112
  @progress = Comet::BackupJobProgress.new
101
113
  @unknown_json_fields = {}
@@ -182,6 +194,18 @@ module Comet
182
194
  raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
183
195
 
184
196
  @download_size = v
197
+ when 'TotalMailsCount'
198
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
199
+
200
+ @total_mails_count = v
201
+ when 'TotalSitesCount'
202
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
203
+
204
+ @total_sites_count = v
205
+ when 'TotalAccountsCount'
206
+ raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric
207
+
208
+ @total_accounts_count = v
185
209
  when 'CancellationID'
186
210
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
187
211
 
@@ -217,6 +241,15 @@ module Comet
217
241
  ret['TotalChunks'] = @total_chunks
218
242
  ret['UploadSize'] = @upload_size
219
243
  ret['DownloadSize'] = @download_size
244
+ unless @total_mails_count.nil?
245
+ ret['TotalMailsCount'] = @total_mails_count
246
+ end
247
+ unless @total_sites_count.nil?
248
+ ret['TotalSitesCount'] = @total_sites_count
249
+ end
250
+ unless @total_accounts_count.nil?
251
+ ret['TotalAccountsCount'] = @total_accounts_count
252
+ end
220
253
  unless @cancellation_id.nil?
221
254
  ret['CancellationID'] = @cancellation_id
222
255
  end
@@ -59,6 +59,9 @@ module Comet
59
59
  # @type [String] path_icns_file
60
60
  attr_accessor :path_icns_file
61
61
 
62
+ # @type [String] path_menu_bar_icns_file
63
+ attr_accessor :path_menu_bar_icns_file
64
+
62
65
  # @type [String] path_eula_rtf
63
66
  attr_accessor :path_eula_rtf
64
67
 
@@ -121,6 +124,7 @@ module Comet
121
124
  @account_register_url = ''
122
125
  @path_ico_file = ''
123
126
  @path_icns_file = ''
127
+ @path_menu_bar_icns_file = ''
124
128
  @path_eula_rtf = ''
125
129
  @path_tile_png = ''
126
130
  @path_header_image = ''
@@ -205,6 +209,10 @@ module Comet
205
209
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
206
210
 
207
211
  @path_icns_file = v
212
+ when 'PathMenuBarIcnsFile'
213
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
214
+
215
+ @path_menu_bar_icns_file = v
208
216
  when 'PathEulaRtf'
209
217
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
210
218
 
@@ -284,6 +292,7 @@ module Comet
284
292
  ret['HideBackgroundLogo'] = @hide_background_logo
285
293
  ret['PathIcoFile'] = @path_ico_file
286
294
  ret['PathIcnsFile'] = @path_icns_file
295
+ ret['PathMenuBarIcnsFile'] = @path_menu_bar_icns_file
287
296
  ret['PathEulaRtf'] = @path_eula_rtf
288
297
  ret['PathTilePng'] = @path_tile_png
289
298
  ret['PathHeaderImage'] = @path_header_image
@@ -44,6 +44,9 @@ module Comet
44
44
  # @type [String] path_icns_file
45
45
  attr_accessor :path_icns_file
46
46
 
47
+ # @type [String] path_menu_bar_icns_file
48
+ attr_accessor :path_menu_bar_icns_file
49
+
47
50
  # @type [String] path_eula_rtf
48
51
  attr_accessor :path_eula_rtf
49
52
 
@@ -102,6 +105,7 @@ module Comet
102
105
  @account_register_url = ''
103
106
  @path_ico_file = ''
104
107
  @path_icns_file = ''
108
+ @path_menu_bar_icns_file = ''
105
109
  @path_eula_rtf = ''
106
110
  @path_tile_png = ''
107
111
  @path_header_image = ''
@@ -168,6 +172,10 @@ module Comet
168
172
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
169
173
 
170
174
  @path_icns_file = v
175
+ when 'PathMenuBarIcnsFile'
176
+ raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
177
+
178
+ @path_menu_bar_icns_file = v
171
179
  when 'PathEulaRtf'
172
180
  raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String
173
181
 
@@ -242,6 +250,7 @@ module Comet
242
250
  ret['HideBackgroundLogo'] = @hide_background_logo
243
251
  ret['PathIcoFile'] = @path_ico_file
244
252
  ret['PathIcnsFile'] = @path_icns_file
253
+ ret['PathMenuBarIcnsFile'] = @path_menu_bar_icns_file
245
254
  ret['PathEulaRtf'] = @path_eula_rtf
246
255
  ret['PathTilePng'] = @path_tile_png
247
256
  ret['PathHeaderImage'] = @path_header_image