cloudsmith-api 2.0.2 → 2.0.3
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 +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +9 -5
- data/build.json +1 -1
- data/docs/Eula.md +1 -1
- data/docs/HexPackageUpload.md +75 -0
- data/docs/HexPackageUploadRequest.md +10 -0
- data/docs/NestedLicensePolicy.md +1 -0
- data/docs/NestedVulnerabilityPolicy.md +1 -0
- data/docs/NestedVulnerabilityScanResults.md +1 -1
- data/docs/OrganizationPackageLicensePolicy.md +1 -0
- data/docs/OrganizationPackageLicensePolicyRequest.md +1 -0
- data/docs/OrganizationPackageLicensePolicyRequestPatch.md +1 -0
- data/docs/OrganizationPackageVulnerabilityPolicy.md +1 -0
- data/docs/OrganizationPackageVulnerabilityPolicyRequest.md +1 -0
- data/docs/OrganizationPackageVulnerabilityPolicyRequestPatch.md +1 -0
- data/docs/PackagesApi.md +123 -0
- data/docs/RepositoryToken.md +1 -1
- data/docs/RepositoryTokenRefresh.md +1 -1
- data/docs/RepositoryWebhook.md +1 -1
- data/docs/StatusBasic.md +1 -1
- data/docs/VulnerabilitiesApi.md +8 -8
- data/docs/VulnerabilityScanResults.md +1 -1
- data/docs/VulnerabilityScanResultsList.md +1 -1
- data/lib/cloudsmith-api/api/packages_api.rb +123 -0
- data/lib/cloudsmith-api/api/vulnerabilities_api.rb +13 -13
- data/lib/cloudsmith-api/models/eula.rb +0 -5
- data/lib/cloudsmith-api/models/hex_package_upload.rb +850 -0
- data/lib/cloudsmith-api/models/hex_package_upload_request.rb +210 -0
- data/lib/cloudsmith-api/models/nested_license_policy.rb +10 -1
- data/lib/cloudsmith-api/models/nested_vulnerability_policy.rb +10 -1
- data/lib/cloudsmith-api/models/nested_vulnerability_scan_results.rb +1 -0
- data/lib/cloudsmith-api/models/organization_package_license_policy.rb +10 -1
- data/lib/cloudsmith-api/models/organization_package_license_policy_request.rb +10 -1
- data/lib/cloudsmith-api/models/organization_package_license_policy_request_patch.rb +10 -1
- data/lib/cloudsmith-api/models/organization_package_vulnerability_policy.rb +10 -1
- data/lib/cloudsmith-api/models/organization_package_vulnerability_policy_request.rb +13 -4
- data/lib/cloudsmith-api/models/organization_package_vulnerability_policy_request_patch.rb +13 -4
- data/lib/cloudsmith-api/models/repository_token.rb +1 -0
- data/lib/cloudsmith-api/models/repository_token_refresh.rb +1 -0
- data/lib/cloudsmith-api/models/repository_webhook.rb +1 -0
- data/lib/cloudsmith-api/models/status_basic.rb +1 -1
- data/lib/cloudsmith-api/models/vulnerability_scan_results.rb +1 -0
- data/lib/cloudsmith-api/models/vulnerability_scan_results_list.rb +1 -0
- data/lib/cloudsmith-api/version.rb +1 -1
- data/lib/cloudsmith-api.rb +2 -0
- data/spec/api/packages_api_spec.rb +28 -0
- data/spec/api/vulnerabilities_api_spec.rb +3 -3
- data/spec/models/hex_package_upload_request_spec.rb +53 -0
- data/spec/models/hex_package_upload_spec.rb +447 -0
- data/spec/models/nested_license_policy_spec.rb +6 -0
- data/spec/models/nested_vulnerability_policy_spec.rb +6 -0
- data/spec/models/organization_package_license_policy_request_patch_spec.rb +6 -0
- data/spec/models/organization_package_license_policy_request_spec.rb +6 -0
- data/spec/models/organization_package_license_policy_spec.rb +6 -0
- data/spec/models/organization_package_vulnerability_policy_request_patch_spec.rb +6 -0
- data/spec/models/organization_package_vulnerability_policy_request_spec.rb +6 -0
- data/spec/models/organization_package_vulnerability_policy_spec.rb +6 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.20/gem_make.out +1 -1
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/gem_make.out +2 -2
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.3/gem_make.out +1 -1
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.3/mkmf.log +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +2 -2
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.3/ext/json/Makefile +2 -2
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.3/ext/json/ext/generator/Makefile +2 -2
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.3/ext/json/ext/parser/Makefile +2 -2
- metadata +10 -2
@@ -1502,6 +1502,68 @@ module CloudsmithApi
|
|
1502
1502
|
end
|
1503
1503
|
return data, status_code, headers
|
1504
1504
|
end
|
1505
|
+
# Create a new Hex package
|
1506
|
+
# Create a new Hex package
|
1507
|
+
# @param owner
|
1508
|
+
# @param repo
|
1509
|
+
# @param [Hash] opts the optional parameters
|
1510
|
+
# @option opts [HexPackageUploadRequest] :data
|
1511
|
+
# @return [HexPackageUpload]
|
1512
|
+
def packages_upload_hex(owner, repo, opts = {})
|
1513
|
+
data, _status_code, _headers = packages_upload_hex_with_http_info(owner, repo, opts)
|
1514
|
+
data
|
1515
|
+
end
|
1516
|
+
|
1517
|
+
# Create a new Hex package
|
1518
|
+
# Create a new Hex package
|
1519
|
+
# @param owner
|
1520
|
+
# @param repo
|
1521
|
+
# @param [Hash] opts the optional parameters
|
1522
|
+
# @option opts [HexPackageUploadRequest] :data
|
1523
|
+
# @return [Array<(HexPackageUpload, Fixnum, Hash)>] HexPackageUpload data, response status code and response headers
|
1524
|
+
def packages_upload_hex_with_http_info(owner, repo, opts = {})
|
1525
|
+
if @api_client.config.debugging
|
1526
|
+
@api_client.config.logger.debug 'Calling API: PackagesApi.packages_upload_hex ...'
|
1527
|
+
end
|
1528
|
+
# verify the required parameter 'owner' is set
|
1529
|
+
if @api_client.config.client_side_validation && owner.nil?
|
1530
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_upload_hex"
|
1531
|
+
end
|
1532
|
+
# verify the required parameter 'repo' is set
|
1533
|
+
if @api_client.config.client_side_validation && repo.nil?
|
1534
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_upload_hex"
|
1535
|
+
end
|
1536
|
+
# resource path
|
1537
|
+
local_var_path = '/packages/{owner}/{repo}/upload/hex/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s)
|
1538
|
+
|
1539
|
+
# query parameters
|
1540
|
+
query_params = {}
|
1541
|
+
|
1542
|
+
# header parameters
|
1543
|
+
header_params = {}
|
1544
|
+
# HTTP header 'Accept' (if needed)
|
1545
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1546
|
+
# HTTP header 'Content-Type'
|
1547
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1548
|
+
|
1549
|
+
# form parameters
|
1550
|
+
form_params = {}
|
1551
|
+
|
1552
|
+
# http body (model)
|
1553
|
+
post_body = @api_client.object_to_http_body(opts[:'data'])
|
1554
|
+
auth_names = ['apikey']
|
1555
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1556
|
+
:header_params => header_params,
|
1557
|
+
:query_params => query_params,
|
1558
|
+
:form_params => form_params,
|
1559
|
+
:body => post_body,
|
1560
|
+
:auth_names => auth_names,
|
1561
|
+
:return_type => 'HexPackageUpload')
|
1562
|
+
if @api_client.config.debugging
|
1563
|
+
@api_client.config.logger.debug "API called: PackagesApi#packages_upload_hex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1564
|
+
end
|
1565
|
+
return data, status_code, headers
|
1566
|
+
end
|
1505
1567
|
# Create a new LuaRocks package
|
1506
1568
|
# Create a new LuaRocks package
|
1507
1569
|
# @param owner
|
@@ -2916,6 +2978,67 @@ module CloudsmithApi
|
|
2916
2978
|
end
|
2917
2979
|
return data, status_code, headers
|
2918
2980
|
end
|
2981
|
+
# Validate parameters for create Hex package
|
2982
|
+
# Validate parameters for create Hex package
|
2983
|
+
# @param owner
|
2984
|
+
# @param repo
|
2985
|
+
# @param [Hash] opts the optional parameters
|
2986
|
+
# @option opts [HexPackageUploadRequest] :data
|
2987
|
+
# @return [nil]
|
2988
|
+
def packages_validate_upload_hex(owner, repo, opts = {})
|
2989
|
+
packages_validate_upload_hex_with_http_info(owner, repo, opts)
|
2990
|
+
nil
|
2991
|
+
end
|
2992
|
+
|
2993
|
+
# Validate parameters for create Hex package
|
2994
|
+
# Validate parameters for create Hex package
|
2995
|
+
# @param owner
|
2996
|
+
# @param repo
|
2997
|
+
# @param [Hash] opts the optional parameters
|
2998
|
+
# @option opts [HexPackageUploadRequest] :data
|
2999
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
3000
|
+
def packages_validate_upload_hex_with_http_info(owner, repo, opts = {})
|
3001
|
+
if @api_client.config.debugging
|
3002
|
+
@api_client.config.logger.debug 'Calling API: PackagesApi.packages_validate_upload_hex ...'
|
3003
|
+
end
|
3004
|
+
# verify the required parameter 'owner' is set
|
3005
|
+
if @api_client.config.client_side_validation && owner.nil?
|
3006
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling PackagesApi.packages_validate_upload_hex"
|
3007
|
+
end
|
3008
|
+
# verify the required parameter 'repo' is set
|
3009
|
+
if @api_client.config.client_side_validation && repo.nil?
|
3010
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling PackagesApi.packages_validate_upload_hex"
|
3011
|
+
end
|
3012
|
+
# resource path
|
3013
|
+
local_var_path = '/packages/{owner}/{repo}/validate-upload/hex/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s)
|
3014
|
+
|
3015
|
+
# query parameters
|
3016
|
+
query_params = {}
|
3017
|
+
|
3018
|
+
# header parameters
|
3019
|
+
header_params = {}
|
3020
|
+
# HTTP header 'Accept' (if needed)
|
3021
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3022
|
+
# HTTP header 'Content-Type'
|
3023
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
3024
|
+
|
3025
|
+
# form parameters
|
3026
|
+
form_params = {}
|
3027
|
+
|
3028
|
+
# http body (model)
|
3029
|
+
post_body = @api_client.object_to_http_body(opts[:'data'])
|
3030
|
+
auth_names = ['apikey']
|
3031
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
3032
|
+
:header_params => header_params,
|
3033
|
+
:query_params => query_params,
|
3034
|
+
:form_params => form_params,
|
3035
|
+
:body => post_body,
|
3036
|
+
:auth_names => auth_names)
|
3037
|
+
if @api_client.config.debugging
|
3038
|
+
@api_client.config.logger.debug "API called: PackagesApi#packages_validate_upload_hex\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3039
|
+
end
|
3040
|
+
return data, status_code, headers
|
3041
|
+
end
|
2919
3042
|
# Validate parameters for create LuaRocks package
|
2920
3043
|
# Validate parameters for create LuaRocks package
|
2921
3044
|
# @param owner
|
@@ -151,28 +151,28 @@ module CloudsmithApi
|
|
151
151
|
end
|
152
152
|
return data, status_code, headers
|
153
153
|
end
|
154
|
-
#
|
155
|
-
#
|
154
|
+
# Get a scan result.
|
155
|
+
# Get a scan result.
|
156
156
|
# @param owner
|
157
157
|
# @param repo
|
158
158
|
# @param package
|
159
|
-
# @param
|
159
|
+
# @param identifier
|
160
160
|
# @param [Hash] opts the optional parameters
|
161
161
|
# @return [VulnerabilityScanResults]
|
162
|
-
def vulnerabilities_read(owner, repo, package,
|
163
|
-
data, _status_code, _headers = vulnerabilities_read_with_http_info(owner, repo, package,
|
162
|
+
def vulnerabilities_read(owner, repo, package, identifier, opts = {})
|
163
|
+
data, _status_code, _headers = vulnerabilities_read_with_http_info(owner, repo, package, identifier, opts)
|
164
164
|
data
|
165
165
|
end
|
166
166
|
|
167
|
-
#
|
168
|
-
#
|
167
|
+
# Get a scan result.
|
168
|
+
# Get a scan result.
|
169
169
|
# @param owner
|
170
170
|
# @param repo
|
171
171
|
# @param package
|
172
|
-
# @param
|
172
|
+
# @param identifier
|
173
173
|
# @param [Hash] opts the optional parameters
|
174
174
|
# @return [Array<(VulnerabilityScanResults, Fixnum, Hash)>] VulnerabilityScanResults data, response status code and response headers
|
175
|
-
def vulnerabilities_read_with_http_info(owner, repo, package,
|
175
|
+
def vulnerabilities_read_with_http_info(owner, repo, package, identifier, opts = {})
|
176
176
|
if @api_client.config.debugging
|
177
177
|
@api_client.config.logger.debug 'Calling API: VulnerabilitiesApi.vulnerabilities_read ...'
|
178
178
|
end
|
@@ -188,12 +188,12 @@ module CloudsmithApi
|
|
188
188
|
if @api_client.config.client_side_validation && package.nil?
|
189
189
|
fail ArgumentError, "Missing the required parameter 'package' when calling VulnerabilitiesApi.vulnerabilities_read"
|
190
190
|
end
|
191
|
-
# verify the required parameter '
|
192
|
-
if @api_client.config.client_side_validation &&
|
193
|
-
fail ArgumentError, "Missing the required parameter '
|
191
|
+
# verify the required parameter 'identifier' is set
|
192
|
+
if @api_client.config.client_side_validation && identifier.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'identifier' when calling VulnerabilitiesApi.vulnerabilities_read"
|
194
194
|
end
|
195
195
|
# resource path
|
196
|
-
local_var_path = '/vulnerabilities/{owner}/{repo}/{package}/{
|
196
|
+
local_var_path = '/vulnerabilities/{owner}/{repo}/{package}/{identifier}/'.sub('{' + 'owner' + '}', owner.to_s).sub('{' + 'repo' + '}', repo.to_s).sub('{' + 'package' + '}', package.to_s).sub('{' + 'identifier' + '}', identifier.to_s)
|
197
197
|
|
198
198
|
# query parameters
|
199
199
|
query_params = {}
|
@@ -57,17 +57,12 @@ class Eula
|
|
57
57
|
# @return Array for valid properties with the reasons
|
58
58
|
def list_invalid_properties
|
59
59
|
invalid_properties = Array.new
|
60
|
-
if @number.nil?
|
61
|
-
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
62
|
-
end
|
63
|
-
|
64
60
|
invalid_properties
|
65
61
|
end
|
66
62
|
|
67
63
|
# Check to see if the all the properties in the model are valid
|
68
64
|
# @return true if the model is valid
|
69
65
|
def valid?
|
70
|
-
return false if @number.nil?
|
71
66
|
true
|
72
67
|
end
|
73
68
|
|