pulp_npm_client 0.1.0a4 → 0.1.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 +4 -4
- data/README.md +24 -10
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentPackagesApi.md +126 -64
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsNpmApi.md +362 -93
- data/docs/NpmNpmDistribution.md +18 -15
- data/docs/NpmNpmDistributionResponse.md +30 -21
- data/docs/NpmNpmRemote.md +48 -47
- data/docs/NpmNpmRemoteResponse.md +48 -43
- data/docs/NpmNpmRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/NpmNpmRepository.md +16 -15
- data/docs/NpmNpmRepositoryResponse.md +28 -23
- data/docs/NpmPackageResponse.md +22 -17
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatednpmNpmDistributionResponseList.md +14 -13
- data/docs/PaginatednpmNpmRemoteResponseList.md +14 -13
- data/docs/PaginatednpmNpmRepositoryResponseList.md +14 -13
- data/docs/PaginatednpmPackageResponseList.md +14 -13
- data/docs/PatchednpmNpmDistribution.md +18 -15
- data/docs/PatchednpmNpmRemote.md +48 -47
- data/docs/PatchednpmNpmRepository.md +16 -15
- data/docs/PolicyEnum.md +4 -5
- data/docs/RemotesNpmApi.md +364 -99
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesNpmApi.md +429 -110
- data/docs/RepositoriesNpmVersionsApi.md +156 -80
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositorySyncURL.md +10 -9
- data/docs/RepositoryVersionResponse.md +22 -17
- data/docs/SetLabel.md +20 -0
- data/docs/SetLabelResponse.md +20 -0
- data/docs/UnsetLabel.md +18 -0
- data/docs/UnsetLabelResponse.md +20 -0
- data/lib/pulp_npm_client/api/content_packages_api.rb +72 -44
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +243 -47
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +247 -57
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +283 -55
- data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +71 -52
- data/lib/pulp_npm_client/api_client.rb +137 -102
- data/lib/pulp_npm_client/api_error.rb +2 -1
- data/lib/pulp_npm_client/configuration.rb +163 -22
- data/lib/pulp_npm_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_npm_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_npm_client/models/npm_npm_distribution.rb +51 -25
- data/lib/pulp_npm_client/models/npm_npm_distribution_response.rb +83 -27
- data/lib/pulp_npm_client/models/npm_npm_remote.rb +61 -25
- data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +99 -41
- data/lib/pulp_npm_client/models/npm_npm_remote_response_hidden_fields_inner.rb +237 -0
- data/lib/pulp_npm_client/models/npm_npm_repository.rb +37 -25
- data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +59 -27
- data/lib/pulp_npm_client/models/npm_package_response.rb +58 -24
- data/lib/pulp_npm_client/models/paginated_repository_version_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_npm_distribution_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_npm_remote_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_npm_repository_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_package_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/patchednpm_npm_distribution.rb +57 -27
- data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +67 -27
- data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +40 -26
- data/lib/pulp_npm_client/models/policy_enum.rb +8 -4
- data/lib/pulp_npm_client/models/repair.rb +30 -22
- data/lib/pulp_npm_client/models/repository_add_remove_content.rb +33 -25
- data/lib/pulp_npm_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_npm_client/models/repository_version_response.rb +53 -25
- data/lib/pulp_npm_client/models/set_label.rb +264 -0
- data/lib/pulp_npm_client/models/set_label_response.rb +255 -0
- data/lib/pulp_npm_client/models/unset_label.rb +252 -0
- data/lib/pulp_npm_client/models/unset_label_response.rb +252 -0
- data/lib/pulp_npm_client/version.rb +2 -2
- data/lib/pulp_npm_client.rb +6 -3
- data/pulp_npm_client.gemspec +10 -7
- data/spec/api/content_packages_api_spec.rb +22 -16
- data/spec/api/distributions_npm_api_spec.rb +51 -14
- data/spec/api/remotes_npm_api_spec.rb +54 -19
- data/spec/api/repositories_npm_api_spec.rb +60 -15
- data/spec/api/repositories_npm_versions_api_spec.rb +23 -19
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/npm_npm_distribution_response_spec.rb +38 -19
- data/spec/models/npm_npm_distribution_spec.rb +17 -16
- data/spec/models/npm_npm_remote_response_hidden_fields_inner_spec.rb +42 -0
- data/spec/models/npm_npm_remote_response_spec.rb +42 -35
- data/spec/models/npm_npm_remote_spec.rb +27 -32
- data/spec/models/npm_npm_repository_response_spec.rb +27 -20
- data/spec/models/npm_npm_repository_spec.rb +11 -16
- data/spec/models/npm_package_response_spec.rb +24 -17
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_npm_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_npm_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_npm_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_package_response_list_spec.rb +10 -15
- data/spec/models/patchednpm_npm_distribution_spec.rb +17 -16
- data/spec/models/patchednpm_npm_remote_spec.rb +27 -32
- data/spec/models/patchednpm_npm_repository_spec.rb +11 -16
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_sync_url_spec.rb +8 -13
- data/spec/models/repository_version_response_spec.rb +24 -17
- data/spec/models/set_label_response_spec.rb +42 -0
- data/spec/models/set_label_spec.rb +42 -0
- data/spec/models/unset_label_response_spec.rb +42 -0
- data/spec/models/unset_label_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- metadata +94 -59
- data/docs/NpmPackage.md +0 -29
- data/docs/PulpNpmPackagesApi.md +0 -60
- data/git_push.sh +0 -58
- data/lib/pulp_npm_client/api/pulp_npm_packages_api.rb +0 -86
- data/lib/pulp_npm_client/models/npm_package.rb +0 -337
- data/spec/api/pulp_npm_packages_api_spec.rb +0 -48
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/npm_package_spec.rb +0 -77
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
Contact: pulp-list@redhat.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -51,23 +51,27 @@ module PulpNpmClient
|
|
|
51
51
|
# header parameters
|
|
52
52
|
header_params = opts[:header_params] || {}
|
|
53
53
|
# HTTP header 'Accept' (if needed)
|
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
55
|
# HTTP header 'Content-Type'
|
|
56
|
-
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
57
60
|
|
|
58
61
|
# form parameters
|
|
59
62
|
form_params = opts[:form_params] || {}
|
|
60
63
|
|
|
61
64
|
# http body (model)
|
|
62
|
-
post_body = opts[:
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(npm_npm_distribution)
|
|
63
66
|
|
|
64
67
|
# return_type
|
|
65
|
-
return_type = opts[:
|
|
68
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
66
69
|
|
|
67
70
|
# auth_names
|
|
68
|
-
auth_names = opts[:
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
69
72
|
|
|
70
73
|
new_options = opts.merge(
|
|
74
|
+
:operation => :"DistributionsNpmApi.create",
|
|
71
75
|
:header_params => header_params,
|
|
72
76
|
:query_params => query_params,
|
|
73
77
|
:form_params => form_params,
|
|
@@ -115,21 +119,22 @@ module PulpNpmClient
|
|
|
115
119
|
# header parameters
|
|
116
120
|
header_params = opts[:header_params] || {}
|
|
117
121
|
# HTTP header 'Accept' (if needed)
|
|
118
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
123
|
|
|
120
124
|
# form parameters
|
|
121
125
|
form_params = opts[:form_params] || {}
|
|
122
126
|
|
|
123
127
|
# http body (model)
|
|
124
|
-
post_body = opts[:
|
|
128
|
+
post_body = opts[:debug_body]
|
|
125
129
|
|
|
126
130
|
# return_type
|
|
127
|
-
return_type = opts[:
|
|
131
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
128
132
|
|
|
129
133
|
# auth_names
|
|
130
|
-
auth_names = opts[:
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
131
135
|
|
|
132
136
|
new_options = opts.merge(
|
|
137
|
+
:operation => :"DistributionsNpmApi.delete",
|
|
133
138
|
:header_params => header_params,
|
|
134
139
|
:query_params => query_params,
|
|
135
140
|
:form_params => form_params,
|
|
@@ -148,21 +153,32 @@ module PulpNpmClient
|
|
|
148
153
|
# List npm distributions
|
|
149
154
|
# ViewSet for NPM Distributions.
|
|
150
155
|
# @param [Hash] opts the optional parameters
|
|
151
|
-
# @option opts [String] :base_path
|
|
156
|
+
# @option opts [String] :base_path Filter results where base_path matches value
|
|
152
157
|
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
|
153
158
|
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
|
154
159
|
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
|
155
160
|
# @option opts [Integer] :limit Number of results to return per page.
|
|
156
|
-
# @option opts [String] :name
|
|
161
|
+
# @option opts [String] :name Filter results where name matches value
|
|
157
162
|
# @option opts [String] :name__contains Filter results where name contains value
|
|
158
163
|
# @option opts [String] :name__icontains Filter results where name contains value
|
|
164
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
|
159
165
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
|
166
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
|
167
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
|
168
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
|
160
169
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
|
161
170
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
162
|
-
# @option opts [Array<String>] :ordering Ordering
|
|
171
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
172
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
173
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
174
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
163
175
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
164
|
-
# @option opts [String] :
|
|
165
|
-
# @option opts [String] :
|
|
176
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
177
|
+
# @option opts [String] :repository Filter results where repository matches value
|
|
178
|
+
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
|
179
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
180
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
181
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
166
182
|
# @return [PaginatednpmNpmDistributionResponseList]
|
|
167
183
|
def list(opts = {})
|
|
168
184
|
data, _status_code, _headers = list_with_http_info(opts)
|
|
@@ -172,27 +188,38 @@ module PulpNpmClient
|
|
|
172
188
|
# List npm distributions
|
|
173
189
|
# ViewSet for NPM Distributions.
|
|
174
190
|
# @param [Hash] opts the optional parameters
|
|
175
|
-
# @option opts [String] :base_path
|
|
191
|
+
# @option opts [String] :base_path Filter results where base_path matches value
|
|
176
192
|
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
|
177
193
|
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
|
178
194
|
# @option opts [Array<String>] :base_path__in Filter results where base_path is in a comma-separated list of values
|
|
179
195
|
# @option opts [Integer] :limit Number of results to return per page.
|
|
180
|
-
# @option opts [String] :name
|
|
196
|
+
# @option opts [String] :name Filter results where name matches value
|
|
181
197
|
# @option opts [String] :name__contains Filter results where name contains value
|
|
182
198
|
# @option opts [String] :name__icontains Filter results where name contains value
|
|
199
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
|
183
200
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
|
201
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
|
202
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
|
203
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
|
184
204
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
|
185
205
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
186
|
-
# @option opts [Array<String>] :ordering Ordering
|
|
206
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
|
207
|
+
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
|
208
|
+
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
|
209
|
+
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
187
210
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
188
|
-
# @option opts [String] :
|
|
189
|
-
# @option opts [String] :
|
|
211
|
+
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
212
|
+
# @option opts [String] :repository Filter results where repository matches value
|
|
213
|
+
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
|
214
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
215
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
216
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
190
217
|
# @return [Array<(PaginatednpmNpmDistributionResponseList, Integer, Hash)>] PaginatednpmNpmDistributionResponseList data, response status code and response headers
|
|
191
218
|
def list_with_http_info(opts = {})
|
|
192
219
|
if @api_client.config.debugging
|
|
193
220
|
@api_client.config.logger.debug 'Calling API: DistributionsNpmApi.list ...'
|
|
194
221
|
end
|
|
195
|
-
allowable_values = ["-base_path", "-
|
|
222
|
+
allowable_values = ["-base_path", "-hidden", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "base_path", "hidden", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type"]
|
|
196
223
|
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
|
197
224
|
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
|
198
225
|
end
|
|
@@ -209,32 +236,44 @@ module PulpNpmClient
|
|
|
209
236
|
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
210
237
|
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
|
211
238
|
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
|
239
|
+
query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
|
|
212
240
|
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
|
241
|
+
query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
|
|
242
|
+
query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
|
|
243
|
+
query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
|
|
213
244
|
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
|
214
245
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
215
246
|
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
|
247
|
+
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
|
248
|
+
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
|
249
|
+
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
|
216
250
|
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
|
217
|
-
query_params[:'
|
|
218
|
-
query_params[:'
|
|
251
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
|
252
|
+
query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
253
|
+
query_params[:'repository__in'] = @api_client.build_collection_param(opts[:'repository__in'], :csv) if !opts[:'repository__in'].nil?
|
|
254
|
+
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
|
255
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
256
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
219
257
|
|
|
220
258
|
# header parameters
|
|
221
259
|
header_params = opts[:header_params] || {}
|
|
222
260
|
# HTTP header 'Accept' (if needed)
|
|
223
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
261
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
224
262
|
|
|
225
263
|
# form parameters
|
|
226
264
|
form_params = opts[:form_params] || {}
|
|
227
265
|
|
|
228
266
|
# http body (model)
|
|
229
|
-
post_body = opts[:
|
|
267
|
+
post_body = opts[:debug_body]
|
|
230
268
|
|
|
231
269
|
# return_type
|
|
232
|
-
return_type = opts[:
|
|
270
|
+
return_type = opts[:debug_return_type] || 'PaginatednpmNpmDistributionResponseList'
|
|
233
271
|
|
|
234
272
|
# auth_names
|
|
235
|
-
auth_names = opts[:
|
|
273
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
236
274
|
|
|
237
275
|
new_options = opts.merge(
|
|
276
|
+
:operation => :"DistributionsNpmApi.list",
|
|
238
277
|
:header_params => header_params,
|
|
239
278
|
:query_params => query_params,
|
|
240
279
|
:form_params => form_params,
|
|
@@ -288,23 +327,27 @@ module PulpNpmClient
|
|
|
288
327
|
# header parameters
|
|
289
328
|
header_params = opts[:header_params] || {}
|
|
290
329
|
# HTTP header 'Accept' (if needed)
|
|
291
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
292
331
|
# HTTP header 'Content-Type'
|
|
293
|
-
|
|
332
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
333
|
+
if !content_type.nil?
|
|
334
|
+
header_params['Content-Type'] = content_type
|
|
335
|
+
end
|
|
294
336
|
|
|
295
337
|
# form parameters
|
|
296
338
|
form_params = opts[:form_params] || {}
|
|
297
339
|
|
|
298
340
|
# http body (model)
|
|
299
|
-
post_body = opts[:
|
|
341
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patchednpm_npm_distribution)
|
|
300
342
|
|
|
301
343
|
# return_type
|
|
302
|
-
return_type = opts[:
|
|
344
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
303
345
|
|
|
304
346
|
# auth_names
|
|
305
|
-
auth_names = opts[:
|
|
347
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
306
348
|
|
|
307
349
|
new_options = opts.merge(
|
|
350
|
+
:operation => :"DistributionsNpmApi.partial_update",
|
|
308
351
|
:header_params => header_params,
|
|
309
352
|
:query_params => query_params,
|
|
310
353
|
:form_params => form_params,
|
|
@@ -324,8 +367,8 @@ module PulpNpmClient
|
|
|
324
367
|
# ViewSet for NPM Distributions.
|
|
325
368
|
# @param npm_npm_distribution_href [String]
|
|
326
369
|
# @param [Hash] opts the optional parameters
|
|
327
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
328
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
370
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
371
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
329
372
|
# @return [NpmNpmDistributionResponse]
|
|
330
373
|
def read(npm_npm_distribution_href, opts = {})
|
|
331
374
|
data, _status_code, _headers = read_with_http_info(npm_npm_distribution_href, opts)
|
|
@@ -336,8 +379,8 @@ module PulpNpmClient
|
|
|
336
379
|
# ViewSet for NPM Distributions.
|
|
337
380
|
# @param npm_npm_distribution_href [String]
|
|
338
381
|
# @param [Hash] opts the optional parameters
|
|
339
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
340
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
382
|
+
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
383
|
+
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
341
384
|
# @return [Array<(NpmNpmDistributionResponse, Integer, Hash)>] NpmNpmDistributionResponse data, response status code and response headers
|
|
342
385
|
def read_with_http_info(npm_npm_distribution_href, opts = {})
|
|
343
386
|
if @api_client.config.debugging
|
|
@@ -352,27 +395,28 @@ module PulpNpmClient
|
|
|
352
395
|
|
|
353
396
|
# query parameters
|
|
354
397
|
query_params = opts[:query_params] || {}
|
|
355
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
356
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
398
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
|
399
|
+
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
|
|
357
400
|
|
|
358
401
|
# header parameters
|
|
359
402
|
header_params = opts[:header_params] || {}
|
|
360
403
|
# HTTP header 'Accept' (if needed)
|
|
361
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
404
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
362
405
|
|
|
363
406
|
# form parameters
|
|
364
407
|
form_params = opts[:form_params] || {}
|
|
365
408
|
|
|
366
409
|
# http body (model)
|
|
367
|
-
post_body = opts[:
|
|
410
|
+
post_body = opts[:debug_body]
|
|
368
411
|
|
|
369
412
|
# return_type
|
|
370
|
-
return_type = opts[:
|
|
413
|
+
return_type = opts[:debug_return_type] || 'NpmNpmDistributionResponse'
|
|
371
414
|
|
|
372
415
|
# auth_names
|
|
373
|
-
auth_names = opts[:
|
|
416
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
374
417
|
|
|
375
418
|
new_options = opts.merge(
|
|
419
|
+
:operation => :"DistributionsNpmApi.read",
|
|
376
420
|
:header_params => header_params,
|
|
377
421
|
:query_params => query_params,
|
|
378
422
|
:form_params => form_params,
|
|
@@ -388,6 +432,154 @@ module PulpNpmClient
|
|
|
388
432
|
return data, status_code, headers
|
|
389
433
|
end
|
|
390
434
|
|
|
435
|
+
# Set a label
|
|
436
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
437
|
+
# @param npm_npm_distribution_href [String]
|
|
438
|
+
# @param set_label [SetLabel]
|
|
439
|
+
# @param [Hash] opts the optional parameters
|
|
440
|
+
# @return [SetLabelResponse]
|
|
441
|
+
def set_label(npm_npm_distribution_href, set_label, opts = {})
|
|
442
|
+
data, _status_code, _headers = set_label_with_http_info(npm_npm_distribution_href, set_label, opts)
|
|
443
|
+
data
|
|
444
|
+
end
|
|
445
|
+
|
|
446
|
+
# Set a label
|
|
447
|
+
# Set a single pulp_label on the object to a specific value or null.
|
|
448
|
+
# @param npm_npm_distribution_href [String]
|
|
449
|
+
# @param set_label [SetLabel]
|
|
450
|
+
# @param [Hash] opts the optional parameters
|
|
451
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
|
452
|
+
def set_label_with_http_info(npm_npm_distribution_href, set_label, opts = {})
|
|
453
|
+
if @api_client.config.debugging
|
|
454
|
+
@api_client.config.logger.debug 'Calling API: DistributionsNpmApi.set_label ...'
|
|
455
|
+
end
|
|
456
|
+
# verify the required parameter 'npm_npm_distribution_href' is set
|
|
457
|
+
if @api_client.config.client_side_validation && npm_npm_distribution_href.nil?
|
|
458
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_distribution_href' when calling DistributionsNpmApi.set_label"
|
|
459
|
+
end
|
|
460
|
+
# verify the required parameter 'set_label' is set
|
|
461
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
|
462
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling DistributionsNpmApi.set_label"
|
|
463
|
+
end
|
|
464
|
+
# resource path
|
|
465
|
+
local_var_path = '{npm_npm_distribution_href}set_label/'.sub('{' + 'npm_npm_distribution_href' + '}', CGI.escape(npm_npm_distribution_href.to_s).gsub('%2F', '/'))
|
|
466
|
+
|
|
467
|
+
# query parameters
|
|
468
|
+
query_params = opts[:query_params] || {}
|
|
469
|
+
|
|
470
|
+
# header parameters
|
|
471
|
+
header_params = opts[:header_params] || {}
|
|
472
|
+
# HTTP header 'Accept' (if needed)
|
|
473
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
474
|
+
# HTTP header 'Content-Type'
|
|
475
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
476
|
+
if !content_type.nil?
|
|
477
|
+
header_params['Content-Type'] = content_type
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# form parameters
|
|
481
|
+
form_params = opts[:form_params] || {}
|
|
482
|
+
|
|
483
|
+
# http body (model)
|
|
484
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
|
485
|
+
|
|
486
|
+
# return_type
|
|
487
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
|
488
|
+
|
|
489
|
+
# auth_names
|
|
490
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
491
|
+
|
|
492
|
+
new_options = opts.merge(
|
|
493
|
+
:operation => :"DistributionsNpmApi.set_label",
|
|
494
|
+
:header_params => header_params,
|
|
495
|
+
:query_params => query_params,
|
|
496
|
+
:form_params => form_params,
|
|
497
|
+
:body => post_body,
|
|
498
|
+
:auth_names => auth_names,
|
|
499
|
+
:return_type => return_type
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
503
|
+
if @api_client.config.debugging
|
|
504
|
+
@api_client.config.logger.debug "API called: DistributionsNpmApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
505
|
+
end
|
|
506
|
+
return data, status_code, headers
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
# Unset a label
|
|
510
|
+
# Unset a single pulp_label on the object.
|
|
511
|
+
# @param npm_npm_distribution_href [String]
|
|
512
|
+
# @param unset_label [UnsetLabel]
|
|
513
|
+
# @param [Hash] opts the optional parameters
|
|
514
|
+
# @return [UnsetLabelResponse]
|
|
515
|
+
def unset_label(npm_npm_distribution_href, unset_label, opts = {})
|
|
516
|
+
data, _status_code, _headers = unset_label_with_http_info(npm_npm_distribution_href, unset_label, opts)
|
|
517
|
+
data
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
# Unset a label
|
|
521
|
+
# Unset a single pulp_label on the object.
|
|
522
|
+
# @param npm_npm_distribution_href [String]
|
|
523
|
+
# @param unset_label [UnsetLabel]
|
|
524
|
+
# @param [Hash] opts the optional parameters
|
|
525
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
|
526
|
+
def unset_label_with_http_info(npm_npm_distribution_href, unset_label, opts = {})
|
|
527
|
+
if @api_client.config.debugging
|
|
528
|
+
@api_client.config.logger.debug 'Calling API: DistributionsNpmApi.unset_label ...'
|
|
529
|
+
end
|
|
530
|
+
# verify the required parameter 'npm_npm_distribution_href' is set
|
|
531
|
+
if @api_client.config.client_side_validation && npm_npm_distribution_href.nil?
|
|
532
|
+
fail ArgumentError, "Missing the required parameter 'npm_npm_distribution_href' when calling DistributionsNpmApi.unset_label"
|
|
533
|
+
end
|
|
534
|
+
# verify the required parameter 'unset_label' is set
|
|
535
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
|
536
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling DistributionsNpmApi.unset_label"
|
|
537
|
+
end
|
|
538
|
+
# resource path
|
|
539
|
+
local_var_path = '{npm_npm_distribution_href}unset_label/'.sub('{' + 'npm_npm_distribution_href' + '}', CGI.escape(npm_npm_distribution_href.to_s).gsub('%2F', '/'))
|
|
540
|
+
|
|
541
|
+
# query parameters
|
|
542
|
+
query_params = opts[:query_params] || {}
|
|
543
|
+
|
|
544
|
+
# header parameters
|
|
545
|
+
header_params = opts[:header_params] || {}
|
|
546
|
+
# HTTP header 'Accept' (if needed)
|
|
547
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
548
|
+
# HTTP header 'Content-Type'
|
|
549
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
550
|
+
if !content_type.nil?
|
|
551
|
+
header_params['Content-Type'] = content_type
|
|
552
|
+
end
|
|
553
|
+
|
|
554
|
+
# form parameters
|
|
555
|
+
form_params = opts[:form_params] || {}
|
|
556
|
+
|
|
557
|
+
# http body (model)
|
|
558
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
|
559
|
+
|
|
560
|
+
# return_type
|
|
561
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
|
562
|
+
|
|
563
|
+
# auth_names
|
|
564
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
565
|
+
|
|
566
|
+
new_options = opts.merge(
|
|
567
|
+
:operation => :"DistributionsNpmApi.unset_label",
|
|
568
|
+
:header_params => header_params,
|
|
569
|
+
:query_params => query_params,
|
|
570
|
+
:form_params => form_params,
|
|
571
|
+
:body => post_body,
|
|
572
|
+
:auth_names => auth_names,
|
|
573
|
+
:return_type => return_type
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
577
|
+
if @api_client.config.debugging
|
|
578
|
+
@api_client.config.logger.debug "API called: DistributionsNpmApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
579
|
+
end
|
|
580
|
+
return data, status_code, headers
|
|
581
|
+
end
|
|
582
|
+
|
|
391
583
|
# Update a npm distribution
|
|
392
584
|
# Trigger an asynchronous update task
|
|
393
585
|
# @param npm_npm_distribution_href [String]
|
|
@@ -426,23 +618,27 @@ module PulpNpmClient
|
|
|
426
618
|
# header parameters
|
|
427
619
|
header_params = opts[:header_params] || {}
|
|
428
620
|
# HTTP header 'Accept' (if needed)
|
|
429
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
621
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
430
622
|
# HTTP header 'Content-Type'
|
|
431
|
-
|
|
623
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
624
|
+
if !content_type.nil?
|
|
625
|
+
header_params['Content-Type'] = content_type
|
|
626
|
+
end
|
|
432
627
|
|
|
433
628
|
# form parameters
|
|
434
629
|
form_params = opts[:form_params] || {}
|
|
435
630
|
|
|
436
631
|
# http body (model)
|
|
437
|
-
post_body = opts[:
|
|
632
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(npm_npm_distribution)
|
|
438
633
|
|
|
439
634
|
# return_type
|
|
440
|
-
return_type = opts[:
|
|
635
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
441
636
|
|
|
442
637
|
# auth_names
|
|
443
|
-
auth_names = opts[:
|
|
638
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
444
639
|
|
|
445
640
|
new_options = opts.merge(
|
|
641
|
+
:operation => :"DistributionsNpmApi.update",
|
|
446
642
|
:header_params => header_params,
|
|
447
643
|
:query_params => query_params,
|
|
448
644
|
:form_params => form_params,
|