comet_backup_ruby_sdk 0.4.0 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3faaa84e0d62d76bb3669935d01f4409c80a28a479c39cc5b60e8fe87b33494f
4
- data.tar.gz: 0a67b796036d8880111aa4f10aa832f3994d268257d90d58603bc881b338c8b0
3
+ metadata.gz: 2ab077fca07acb49e1718c0ba71798a105e88ec3862457648e9c7ac99bc5da49
4
+ data.tar.gz: f495d2a625abb94c25ef337ac03dce967bc64595c8847f92215b7fe2efccf1b4
5
5
  SHA512:
6
- metadata.gz: 2ac65df6ad2859aec9c90dffe1704bf8f8ac940e2f519fd3155169c9b6955f8b1c801ffea812428ab149604303f16b6b5a03bf5a0cd1fb8b7854e32d12143146
7
- data.tar.gz: 108be0c78b2cf0be1d9ea54646993d34124aa7e7c21ffad2054d4eb35555a0d3f505f3a42aefda4596c5358d9cbc609c31c77d7a49fa7d6da4aae94d9d986830
6
+ metadata.gz: ebf84239a94db56cfc315b3a4e0b51805fa84cd9e6aaef679757ccbbad02e4bcc5f2b0b2f96b82993a4cfe23e280a9b5cce15c96237c43f922558f2b1d90b12a
7
+ data.tar.gz: 459c8197ab831eb5a6a9c526692ec2e3e30ff248647ca1b60cd8be20fe371f2ab940dcd1ae04658f2d8a2589364a5615e36482aaa4a941a9ee84c96956488ff7
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2020-09-16 v1.0.0
4
+ - Tag a v1.0.0 release as the SDK design has stabilized. Future v1.x.x SDK releases will remain compatible with code written against v1.0.0, according to [Semantic Versioning](https://semver.org/).
5
+ - Support new Organization feature
6
+ - Support new `AdminCreateInstallTokenRequest` API
7
+ - Support new Admin user management APIs
8
+ - Support new `RebrandStorage` property on Storage Vaults and on Requestable destination targets
9
+ - Update descriptions for `SEVT_META_HELLO` and `AdminMetaWebhookOptionsSet`
10
+
3
11
  ## 2020-08-28 v0.4.0
4
12
  - Feature: Add definitions B2 and Wasabi `VirtualStorageRole` classes
5
13
  - Feature: Add definitions for remote LDAP authentication data sources
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- comet_backup_ruby_sdk (0.3.1)
4
+ comet_backup_ruby_sdk (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -3,7 +3,7 @@
3
3
  1. All tests passing
4
4
  2. Update changelog in `CHANGELOG.md`
5
5
  3. Update version number in `gemspec`
6
- 4. `gem build`
6
+ 4. `gem build comet_backup_ruby_sdk`
7
7
  - Should be warning-free
8
8
  5. Git tag
9
9
  - Respect semver
@@ -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 = '0.4.0'
15
+ spec.version = '1.0.0'
16
16
  spec.authors = ['Comet Licensing Ltd.']
17
17
  spec.email = ['hello@cometbackup.com']
18
18
 
@@ -309,6 +309,89 @@ module Comet
309
309
  ret
310
310
  end
311
311
 
312
+ # AdminAdminUserDelete
313
+ #
314
+ # Delete an administrator.
315
+ #
316
+ # You must supply administrator authentication credentials to use this API.
317
+ # Access to this API may be prevented on a per-administrator basis.
318
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
319
+ #
320
+ # @param [String] target_user the username of the admin to be deleted
321
+ # @return [Comet::CometAPIResponseMessage]
322
+ def admin_admin_user_delete(target_user)
323
+ submit_params = {}
324
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
325
+
326
+ submit_params['TargetUser'] = target_user
327
+
328
+ body = perform_request('/api/v1/admin/admin-user/delete', submit_params)
329
+ json_body = JSON.parse body
330
+ check_status json_body
331
+ ret = Comet::CometAPIResponseMessage.new
332
+ ret.from_hash(json_body)
333
+ ret
334
+ end
335
+
336
+ # AdminAdminUserList
337
+ #
338
+ # List administrators.
339
+ #
340
+ # You must supply administrator authentication credentials to use this API.
341
+ # Access to this API may be prevented on a per-administrator basis.
342
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
343
+ #
344
+ # @return [Array<Comet::AllowedAdminUser>]
345
+ def admin_admin_user_list
346
+ body = perform_request('/api/v1/admin/admin-user/list')
347
+ json_body = JSON.parse body
348
+ check_status json_body
349
+ if json_body.nil?
350
+ ret = []
351
+ else
352
+ ret = Array.new(json_body.length)
353
+ json_body.each_with_index do |v, i|
354
+ ret[i] = Comet::AllowedAdminUser.new
355
+ ret[i].from_hash(v)
356
+ end
357
+ end
358
+ ret
359
+ end
360
+
361
+ # AdminAdminUserNew
362
+ #
363
+ # Add a new administrator.
364
+ #
365
+ # You must supply administrator authentication credentials to use this API.
366
+ # Access to this API may be prevented on a per-administrator basis.
367
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
368
+ #
369
+ # @param [String] target_user the username for this new admin
370
+ # @param [String] target_password the password for this new admin user
371
+ # @param [String] target_org_id (Optional) provide the organization ID for this user, it will default to the org of the authenticating user otherwise
372
+ # @return [Comet::CometAPIResponseMessage]
373
+ def admin_admin_user_new(target_user, target_password, target_org_id = nil)
374
+ submit_params = {}
375
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
376
+
377
+ submit_params['TargetUser'] = target_user
378
+ raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
379
+
380
+ submit_params['TargetPassword'] = target_password
381
+ unless target_org_id.nil?
382
+ raise TypeError "'target_org_id' expected String, got #{target_org_id.class}" unless target_org_id.is_a? String
383
+
384
+ submit_params['TargetOrgID'] = target_org_id
385
+ end
386
+
387
+ body = perform_request('/api/v1/admin/admin-user/new', submit_params)
388
+ json_body = JSON.parse body
389
+ check_status json_body
390
+ ret = Comet::CometAPIResponseMessage.new
391
+ ret.from_hash(json_body)
392
+ ret
393
+ end
394
+
312
395
  # AdminBrandingAvailablePlatforms
313
396
  #
314
397
  # List available software download platforms.
@@ -615,6 +698,7 @@ module Comet
615
698
  # Get Constellation bucket usage report (cached).
616
699
  #
617
700
  # You must supply administrator authentication credentials to use this API.
701
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
618
702
  # This API requires the Constellation Role to be enabled.
619
703
  #
620
704
  # @return [Comet::ConstellationCheckReport]
@@ -632,6 +716,7 @@ module Comet
632
716
  # Get Constellation bucket usage report (regenerate).
633
717
  #
634
718
  # You must supply administrator authentication credentials to use this API.
719
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
635
720
  # This API requires the Constellation Role to be enabled.
636
721
  #
637
722
  # @return [Comet::ConstellationCheckReport]
@@ -649,6 +734,7 @@ module Comet
649
734
  # Prune unused buckets.
650
735
  #
651
736
  # You must supply administrator authentication credentials to use this API.
737
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
652
738
  # This API requires the Constellation Role to be enabled.
653
739
  #
654
740
  # @return [Comet::CometAPIResponseMessage]
@@ -666,6 +752,7 @@ module Comet
666
752
  # Get Constellation status.
667
753
  #
668
754
  # You must supply administrator authentication credentials to use this API.
755
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
669
756
  # This API requires the Constellation Role to be enabled.
670
757
  #
671
758
  # @return [Comet::ConstellationStatusAPIResponse]
@@ -678,6 +765,40 @@ module Comet
678
765
  ret
679
766
  end
680
767
 
768
+ # AdminCreateInstallToken
769
+ #
770
+ # Create token for silent installation (Windows only).
771
+ # Provide the installation token to silently install the client on windows `install.exe /TOKEN=<installtoken>`
772
+ #
773
+ # You must supply administrator authentication credentials to use this API.
774
+ # This API requires the Auth Role to be enabled.
775
+ #
776
+ # @param [String] target_user Selected account username
777
+ # @param [String] target_password Selected account password
778
+ # @param [String] server (Optional) External URL of the authentication server that is different from the current server
779
+ # @return [Comet::InstallTokenResponse]
780
+ def admin_create_install_token(target_user, target_password, server = nil)
781
+ submit_params = {}
782
+ raise TypeError "'target_user' expected String, got #{target_user.class}" unless target_user.is_a? String
783
+
784
+ submit_params['TargetUser'] = target_user
785
+ raise TypeError "'target_password' expected String, got #{target_password.class}" unless target_password.is_a? String
786
+
787
+ submit_params['TargetPassword'] = target_password
788
+ unless server.nil?
789
+ raise TypeError "'server' expected String, got #{server.class}" unless server.is_a? String
790
+
791
+ submit_params['Server'] = server
792
+ end
793
+
794
+ body = perform_request('/api/v1/admin/create-install-token', submit_params)
795
+ json_body = JSON.parse body
796
+ check_status json_body
797
+ ret = Comet::InstallTokenResponse.new
798
+ ret.from_hash(json_body)
799
+ ret
800
+ end
801
+
681
802
  # AdminDeleteUser
682
803
  #
683
804
  # Delete user account.
@@ -1924,6 +2045,7 @@ module Comet
1924
2045
  # Get log files.
1925
2046
  #
1926
2047
  # You must supply administrator authentication credentials to use this API.
2048
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
1927
2049
  #
1928
2050
  # @return [Array<Number>]
1929
2051
  def admin_meta_list_available_log_days
@@ -1950,6 +2072,7 @@ module Comet
1950
2072
  # This API does not automatically convert line endings; around the 18.3.2 timeframe, log content may even contain mixed line-endings.
1951
2073
  #
1952
2074
  # You must supply administrator authentication credentials to use this API.
2075
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
1953
2076
  #
1954
2077
  # @param [Number] log A log day, selected from the options returned by the Get Log Files API
1955
2078
  # @return [String]
@@ -2035,6 +2158,7 @@ module Comet
2035
2158
  # Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
2036
2159
  #
2037
2160
  # You must supply administrator authentication credentials to use this API.
2161
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2038
2162
  # Access to this API may be prevented on a per-administrator basis.
2039
2163
  #
2040
2164
  # @return [Comet::CometAPIResponseMessage]
@@ -2053,6 +2177,7 @@ module Comet
2053
2177
  # This allows the Comet Server web interface to support testing different email credentials during setup.
2054
2178
  #
2055
2179
  # You must supply administrator authentication credentials to use this API.
2180
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2056
2181
  # Access to this API may be prevented on a per-administrator basis.
2057
2182
  #
2058
2183
  # @param [Comet::EmailOptions] email_options Updated configuration content
@@ -2081,6 +2206,7 @@ module Comet
2081
2206
  #
2082
2207
  # You must supply administrator authentication credentials to use this API.
2083
2208
  # Access to this API may be prevented on a per-administrator basis.
2209
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2084
2210
  #
2085
2211
  # @return [Comet::ServerConfigOptions]
2086
2212
  def admin_meta_server_config_get
@@ -2099,6 +2225,7 @@ module Comet
2099
2225
  #
2100
2226
  # You must supply administrator authentication credentials to use this API.
2101
2227
  # Access to this API may be prevented on a per-administrator basis.
2228
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2102
2229
  #
2103
2230
  # @return [Array<String>]
2104
2231
  def admin_meta_server_config_network_interfaces
@@ -2127,6 +2254,7 @@ module Comet
2127
2254
  #
2128
2255
  # You must supply administrator authentication credentials to use this API.
2129
2256
  # Access to this API may be prevented on a per-administrator basis.
2257
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2130
2258
  #
2131
2259
  # @param [Comet::ServerConfigOptions] config Updated configuration content
2132
2260
  # @return [Comet::CometAPIResponseMessage]
@@ -2152,6 +2280,7 @@ module Comet
2152
2280
  # Prior to 18.9.2, this API terminated the server immediately without returning a response. In 18.9.2 and later, it returns a successful response before shutting down.
2153
2281
  #
2154
2282
  # You must supply administrator authentication credentials to use this API.
2283
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2155
2284
  # Access to this API may be prevented on a per-administrator basis.
2156
2285
  #
2157
2286
  # @return [Comet::CometAPIResponseMessage]
@@ -2255,7 +2384,7 @@ module Comet
2255
2384
  #
2256
2385
  # You must supply administrator authentication credentials to use this API.
2257
2386
  #
2258
- # @param [Hash{String => Comet::WebhookOption}] webhook_options A json encoded string of the new webhook target options.
2387
+ # @param [Hash{String => Comet::WebhookOption}] webhook_options The replacement webhook target options.
2259
2388
  # @return [Comet::CometAPIResponseMessage]
2260
2389
  def admin_meta_webhook_options_set(webhook_options)
2261
2390
  submit_params = {}
@@ -2341,6 +2470,92 @@ module Comet
2341
2470
  ret
2342
2471
  end
2343
2472
 
2473
+ # AdminOrganizationDelete
2474
+ #
2475
+ # Delete an organization and all related users.
2476
+ #
2477
+ # You must supply administrator authentication credentials to use this API.
2478
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2479
+ #
2480
+ # @param [String] organization_id (Optional) (No description available)
2481
+ # @param [Comet::UninstallConfig] uninstall_config (Optional) Uninstall software configuration
2482
+ # @return [Comet::OrganizationResponse]
2483
+ def admin_organization_delete(organization_id = nil, uninstall_config = nil)
2484
+ submit_params = {}
2485
+ unless organization_id.nil?
2486
+ raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2487
+
2488
+ submit_params['OrganizationID'] = organization_id
2489
+ end
2490
+ unless uninstall_config.nil?
2491
+ raise TypeError "'uninstall_config' expected Comet::UninstallConfig, got #{uninstall_config.class}" unless uninstall_config.is_a? Comet::UninstallConfig
2492
+
2493
+ submit_params['UninstallConfig'] = uninstall_config.to_json
2494
+ end
2495
+
2496
+ body = perform_request('/api/v1/admin/organization/delete', submit_params)
2497
+ json_body = JSON.parse body
2498
+ check_status json_body
2499
+ ret = Comet::OrganizationResponse.new
2500
+ ret.from_hash(json_body)
2501
+ ret
2502
+ end
2503
+
2504
+ # AdminOrganizationList
2505
+ #
2506
+ # List Organizations.
2507
+ #
2508
+ # You must supply administrator authentication credentials to use this API.
2509
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2510
+ #
2511
+ # @return [Hash{String => Comet::Organization}]
2512
+ def admin_organization_list
2513
+ body = perform_request('/api/v1/admin/organization/list')
2514
+ json_body = JSON.parse body
2515
+ check_status json_body
2516
+ ret = {}
2517
+ if json_body.nil?
2518
+ ret = {}
2519
+ else
2520
+ json_body.each do |k, v|
2521
+ ret[k] = Comet::Organization.new
2522
+ ret[k].from_hash(v)
2523
+ end
2524
+ end
2525
+ ret
2526
+ end
2527
+
2528
+ # AdminOrganizationSet
2529
+ #
2530
+ # Create or Update an Organization.
2531
+ #
2532
+ # You must supply administrator authentication credentials to use this API.
2533
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2534
+ #
2535
+ # @param [String] organization_id (Optional) (No description available)
2536
+ # @param [Comet::Organization] organization (Optional) (No description available)
2537
+ # @return [Comet::OrganizationResponse]
2538
+ def admin_organization_set(organization_id = nil, organization = nil)
2539
+ submit_params = {}
2540
+ unless organization_id.nil?
2541
+ raise TypeError "'organization_id' expected String, got #{organization_id.class}" unless organization_id.is_a? String
2542
+
2543
+ submit_params['OrganizationID'] = organization_id
2544
+ end
2545
+ unless organization.nil?
2546
+ raise TypeError "'organization' expected Comet::Organization, got #{organization.class}" unless organization.is_a? Comet::Organization
2547
+
2548
+ submit_params['Organization'] = organization.to_json
2549
+ end
2550
+
2551
+ body = perform_request('/api/v1/admin/organization/set', submit_params)
2552
+ json_body = JSON.parse body
2553
+ check_status json_body
2554
+ ret = Comet::OrganizationResponse.new
2555
+ ret.from_hash(json_body)
2556
+ ret
2557
+ end
2558
+
2344
2559
  # AdminPoliciesDelete
2345
2560
  #
2346
2561
  # Delete an existing policy object.
@@ -2533,6 +2748,7 @@ module Comet
2533
2748
  # Get Replication status.
2534
2749
  #
2535
2750
  # You must supply administrator authentication credentials to use this API.
2751
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2536
2752
  #
2537
2753
  # @return [Array<Comet::ReplicatorStateAPIResponse>]
2538
2754
  def admin_replication_state
@@ -2764,6 +2980,7 @@ module Comet
2764
2980
  # You must supply administrator authentication credentials to use this API.
2765
2981
  # Access to this API may be prevented on a per-administrator basis.
2766
2982
  # This API requires the Storage Role to be enabled.
2983
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2767
2984
  #
2768
2985
  # @param [String] bucket_id Selected bucket name
2769
2986
  # @return [Comet::StorageFreeSpaceInfo]
@@ -2817,8 +3034,9 @@ module Comet
2817
3034
  # @param [String] set_bucket_value (Optional) Bucket ID
2818
3035
  # @param [String] set_key_hash_format (Optional) Bucket key hashing format
2819
3036
  # @param [String] set_key_hash_value (Optional) Bucket key hash
3037
+ # @param [String] set_organization_id (Optional) Target organization ID (>= 20.9.0)
2820
3038
  # @return [Comet::AddBucketResponseMessage]
2821
- def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil)
3039
+ def admin_storage_register_bucket(set_bucket_value = nil, set_key_hash_format = nil, set_key_hash_value = nil, set_organization_id = nil)
2822
3040
  submit_params = {}
2823
3041
  unless set_bucket_value.nil?
2824
3042
  raise TypeError "'set_bucket_value' expected String, got #{set_bucket_value.class}" unless set_bucket_value.is_a? String
@@ -2835,6 +3053,11 @@ module Comet
2835
3053
 
2836
3054
  submit_params['SetKeyHashValue'] = set_key_hash_value
2837
3055
  end
3056
+ unless set_organization_id.nil?
3057
+ raise TypeError "'set_organization_id' expected String, got #{set_organization_id.class}" unless set_organization_id.is_a? String
3058
+
3059
+ submit_params['SetOrganizationID'] = set_organization_id
3060
+ end
2838
3061
 
2839
3062
  body = perform_request('/api/v1/admin/storage/register-bucket', submit_params)
2840
3063
  json_body = JSON.parse body
@@ -2849,6 +3072,7 @@ module Comet
2849
3072
  # Start a new software update campaign.
2850
3073
  #
2851
3074
  # You must supply administrator authentication credentials to use this API.
3075
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2852
3076
  # This API requires the Software Build Role to be enabled.
2853
3077
  # This API requires the Auth Role to be enabled.
2854
3078
  #
@@ -2873,6 +3097,7 @@ module Comet
2873
3097
  # Get current campaign status.
2874
3098
  #
2875
3099
  # You must supply administrator authentication credentials to use this API.
3100
+ # This API is only available for administrator accounts in the top-level Organization, not in any other Organization.
2876
3101
  # This API requires the Software Build Role to be enabled.
2877
3102
  # This API requires the Auth Role to be enabled.
2878
3103
  #
@@ -356,15 +356,15 @@ module Comet
356
356
 
357
357
  DEFAULT_TIMEZONE = 'UTC'
358
358
 
359
- APPLICATION_VERSION = '20.8.0'
359
+ APPLICATION_VERSION = '20.9.1'
360
360
 
361
361
  APPLICATION_VERSION_MAJOR = 20
362
362
 
363
- APPLICATION_VERSION_MINOR = 8
363
+ APPLICATION_VERSION_MINOR = 9
364
364
 
365
- APPLICATION_VERSION_REVISION = 0
365
+ APPLICATION_VERSION_REVISION = 1
366
366
 
367
- RELEASE_CODENAME = 'Jupiter'
367
+ RELEASE_CODENAME = 'Voyager'
368
368
 
369
369
  ENCRYPTIONMETHOD_UNCONFIGURED = 0
370
370
 
@@ -532,7 +532,7 @@ module Comet
532
532
  # MacOSCodesignLevel:
533
533
  MACOSCODESIGN_LEVEL_SIGN_NOTARISE_STAPLE = 2
534
534
 
535
- # StreamableEventType:
535
+ # StreamableEventType: Event is emitted when the webhook is registered, or when the server starts up. The Data associated is ServerMetaVersionInfo
536
536
  SEVT_META_HELLO = 4000
537
537
 
538
538
  # StreamableEventType: Data is the profile object