pulp_npm_client 0.8.0 → 0.10.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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -4
  3. data/docs/ContentPackagesApi.md +4 -0
  4. data/docs/DistributionsNpmApi.md +312 -0
  5. data/docs/MyPermissionsResponse.md +18 -0
  6. data/docs/NestedRole.md +22 -0
  7. data/docs/NestedRoleResponse.md +22 -0
  8. data/docs/NpmPingApi.md +1 -7
  9. data/docs/ObjectRolesResponse.md +18 -0
  10. data/docs/RemotesNpmApi.md +312 -0
  11. data/docs/RepositoriesNpmApi.md +312 -0
  12. data/docs/RepositoryAddRemoveContent.md +3 -1
  13. data/lib/pulp_npm_client/api/content_packages_api.rb +6 -0
  14. data/lib/pulp_npm_client/api/distributions_npm_api.rb +298 -0
  15. data/lib/pulp_npm_client/api/npm_ping_api.rb +1 -1
  16. data/lib/pulp_npm_client/api/remotes_npm_api.rb +298 -0
  17. data/lib/pulp_npm_client/api/repositories_npm_api.rb +298 -0
  18. data/lib/pulp_npm_client/models/my_permissions_response.rb +223 -0
  19. data/lib/pulp_npm_client/models/nested_role.rb +263 -0
  20. data/lib/pulp_npm_client/models/nested_role_response.rb +244 -0
  21. data/lib/pulp_npm_client/models/object_roles_response.rb +223 -0
  22. data/lib/pulp_npm_client/models/repository_add_remove_content.rb +16 -4
  23. data/lib/pulp_npm_client/version.rb +1 -1
  24. data/lib/pulp_npm_client.rb +4 -0
  25. data/spec/api/content_packages_api_spec.rb +2 -0
  26. data/spec/api/distributions_npm_api_spec.rb +58 -0
  27. data/spec/api/remotes_npm_api_spec.rb +58 -0
  28. data/spec/api/repositories_npm_api_spec.rb +58 -0
  29. data/spec/models/my_permissions_response_spec.rb +36 -0
  30. data/spec/models/nested_role_response_spec.rb +48 -0
  31. data/spec/models/nested_role_spec.rb +48 -0
  32. data/spec/models/object_roles_response_spec.rb +36 -0
  33. data/spec/models/repository_add_remove_content_spec.rb +6 -0
  34. metadata +43 -27
@@ -19,6 +19,83 @@ module PulpNpmClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add a role
23
+ # Add a role for this object to users/groups.
24
+ # @param npm_npm_remote_href [String]
25
+ # @param nested_role [NestedRole]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
28
+ # @return [NestedRoleResponse]
29
+ def add_role(npm_npm_remote_href, nested_role, opts = {})
30
+ data, _status_code, _headers = add_role_with_http_info(npm_npm_remote_href, nested_role, opts)
31
+ data
32
+ end
33
+
34
+ # Add a role
35
+ # Add a role for this object to users/groups.
36
+ # @param npm_npm_remote_href [String]
37
+ # @param nested_role [NestedRole]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
40
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
41
+ def add_role_with_http_info(npm_npm_remote_href, nested_role, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.add_role ...'
44
+ end
45
+ # verify the required parameter 'npm_npm_remote_href' is set
46
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
47
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.add_role"
48
+ end
49
+ # verify the required parameter 'nested_role' is set
50
+ if @api_client.config.client_side_validation && nested_role.nil?
51
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RemotesNpmApi.add_role"
52
+ end
53
+ # resource path
54
+ local_var_path = '{npm_npm_remote_href}add_role/'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
63
+ # HTTP header 'Content-Type'
64
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
65
+ if !content_type.nil?
66
+ header_params['Content-Type'] = content_type
67
+ end
68
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nested_role)
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'NestedRoleResponse'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"RemotesNpmApi.add_role",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: RemotesNpmApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
22
99
  # Create a npm remote
23
100
  # A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
24
101
  # @param npm_npm_remote [NpmNpmRemote]
@@ -298,6 +375,150 @@ module PulpNpmClient
298
375
  return data, status_code, headers
299
376
  end
300
377
 
378
+ # List roles
379
+ # List roles assigned to this object.
380
+ # @param npm_npm_remote_href [String]
381
+ # @param [Hash] opts the optional parameters
382
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
383
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
384
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
385
+ # @return [ObjectRolesResponse]
386
+ def list_roles(npm_npm_remote_href, opts = {})
387
+ data, _status_code, _headers = list_roles_with_http_info(npm_npm_remote_href, opts)
388
+ data
389
+ end
390
+
391
+ # List roles
392
+ # List roles assigned to this object.
393
+ # @param npm_npm_remote_href [String]
394
+ # @param [Hash] opts the optional parameters
395
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
396
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
397
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
398
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
399
+ def list_roles_with_http_info(npm_npm_remote_href, opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.list_roles ...'
402
+ end
403
+ # verify the required parameter 'npm_npm_remote_href' is set
404
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
405
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.list_roles"
406
+ end
407
+ # resource path
408
+ local_var_path = '{npm_npm_remote_href}list_roles/'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
409
+
410
+ # query parameters
411
+ query_params = opts[:query_params] || {}
412
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
413
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
414
+
415
+ # header parameters
416
+ header_params = opts[:header_params] || {}
417
+ # HTTP header 'Accept' (if needed)
418
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
419
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
420
+
421
+ # form parameters
422
+ form_params = opts[:form_params] || {}
423
+
424
+ # http body (model)
425
+ post_body = opts[:debug_body]
426
+
427
+ # return_type
428
+ return_type = opts[:debug_return_type] || 'ObjectRolesResponse'
429
+
430
+ # auth_names
431
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
432
+
433
+ new_options = opts.merge(
434
+ :operation => :"RemotesNpmApi.list_roles",
435
+ :header_params => header_params,
436
+ :query_params => query_params,
437
+ :form_params => form_params,
438
+ :body => post_body,
439
+ :auth_names => auth_names,
440
+ :return_type => return_type
441
+ )
442
+
443
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
444
+ if @api_client.config.debugging
445
+ @api_client.config.logger.debug "API called: RemotesNpmApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
446
+ end
447
+ return data, status_code, headers
448
+ end
449
+
450
+ # List user permissions
451
+ # List permissions available to the current user on this object.
452
+ # @param npm_npm_remote_href [String]
453
+ # @param [Hash] opts the optional parameters
454
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
455
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
456
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
457
+ # @return [MyPermissionsResponse]
458
+ def my_permissions(npm_npm_remote_href, opts = {})
459
+ data, _status_code, _headers = my_permissions_with_http_info(npm_npm_remote_href, opts)
460
+ data
461
+ end
462
+
463
+ # List user permissions
464
+ # List permissions available to the current user on this object.
465
+ # @param npm_npm_remote_href [String]
466
+ # @param [Hash] opts the optional parameters
467
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
468
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
469
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
470
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
471
+ def my_permissions_with_http_info(npm_npm_remote_href, opts = {})
472
+ if @api_client.config.debugging
473
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.my_permissions ...'
474
+ end
475
+ # verify the required parameter 'npm_npm_remote_href' is set
476
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
477
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.my_permissions"
478
+ end
479
+ # resource path
480
+ local_var_path = '{npm_npm_remote_href}my_permissions/'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
481
+
482
+ # query parameters
483
+ query_params = opts[:query_params] || {}
484
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
485
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
486
+
487
+ # header parameters
488
+ header_params = opts[:header_params] || {}
489
+ # HTTP header 'Accept' (if needed)
490
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
491
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
492
+
493
+ # form parameters
494
+ form_params = opts[:form_params] || {}
495
+
496
+ # http body (model)
497
+ post_body = opts[:debug_body]
498
+
499
+ # return_type
500
+ return_type = opts[:debug_return_type] || 'MyPermissionsResponse'
501
+
502
+ # auth_names
503
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
504
+
505
+ new_options = opts.merge(
506
+ :operation => :"RemotesNpmApi.my_permissions",
507
+ :header_params => header_params,
508
+ :query_params => query_params,
509
+ :form_params => form_params,
510
+ :body => post_body,
511
+ :auth_names => auth_names,
512
+ :return_type => return_type
513
+ )
514
+
515
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
516
+ if @api_client.config.debugging
517
+ @api_client.config.logger.debug "API called: RemotesNpmApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
518
+ end
519
+ return data, status_code, headers
520
+ end
521
+
301
522
  # Update a npm remote
302
523
  # Update the entity partially and trigger an asynchronous task if necessary
303
524
  # @param npm_npm_remote_href [String]
@@ -447,6 +668,83 @@ module PulpNpmClient
447
668
  return data, status_code, headers
448
669
  end
449
670
 
671
+ # Remove a role
672
+ # Remove a role for this object from users/groups.
673
+ # @param npm_npm_remote_href [String]
674
+ # @param nested_role [NestedRole]
675
+ # @param [Hash] opts the optional parameters
676
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
677
+ # @return [NestedRoleResponse]
678
+ def remove_role(npm_npm_remote_href, nested_role, opts = {})
679
+ data, _status_code, _headers = remove_role_with_http_info(npm_npm_remote_href, nested_role, opts)
680
+ data
681
+ end
682
+
683
+ # Remove a role
684
+ # Remove a role for this object from users/groups.
685
+ # @param npm_npm_remote_href [String]
686
+ # @param nested_role [NestedRole]
687
+ # @param [Hash] opts the optional parameters
688
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
689
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
690
+ def remove_role_with_http_info(npm_npm_remote_href, nested_role, opts = {})
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug 'Calling API: RemotesNpmApi.remove_role ...'
693
+ end
694
+ # verify the required parameter 'npm_npm_remote_href' is set
695
+ if @api_client.config.client_side_validation && npm_npm_remote_href.nil?
696
+ fail ArgumentError, "Missing the required parameter 'npm_npm_remote_href' when calling RemotesNpmApi.remove_role"
697
+ end
698
+ # verify the required parameter 'nested_role' is set
699
+ if @api_client.config.client_side_validation && nested_role.nil?
700
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RemotesNpmApi.remove_role"
701
+ end
702
+ # resource path
703
+ local_var_path = '{npm_npm_remote_href}remove_role/'.sub('{' + 'npm_npm_remote_href' + '}', CGI.escape(npm_npm_remote_href.to_s).gsub('%2F', '/'))
704
+
705
+ # query parameters
706
+ query_params = opts[:query_params] || {}
707
+
708
+ # header parameters
709
+ header_params = opts[:header_params] || {}
710
+ # HTTP header 'Accept' (if needed)
711
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
712
+ # HTTP header 'Content-Type'
713
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
714
+ if !content_type.nil?
715
+ header_params['Content-Type'] = content_type
716
+ end
717
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
718
+
719
+ # form parameters
720
+ form_params = opts[:form_params] || {}
721
+
722
+ # http body (model)
723
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nested_role)
724
+
725
+ # return_type
726
+ return_type = opts[:debug_return_type] || 'NestedRoleResponse'
727
+
728
+ # auth_names
729
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
730
+
731
+ new_options = opts.merge(
732
+ :operation => :"RemotesNpmApi.remove_role",
733
+ :header_params => header_params,
734
+ :query_params => query_params,
735
+ :form_params => form_params,
736
+ :body => post_body,
737
+ :auth_names => auth_names,
738
+ :return_type => return_type
739
+ )
740
+
741
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
742
+ if @api_client.config.debugging
743
+ @api_client.config.logger.debug "API called: RemotesNpmApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
744
+ end
745
+ return data, status_code, headers
746
+ end
747
+
450
748
  # Set a label
451
749
  # Set a single pulp_label on the object to a specific value or null.
452
750
  # @param npm_npm_remote_href [String]
@@ -19,6 +19,83 @@ module PulpNpmClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add a role
23
+ # Add a role for this object to users/groups.
24
+ # @param npm_npm_repository_href [String]
25
+ # @param nested_role [NestedRole]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
28
+ # @return [NestedRoleResponse]
29
+ def add_role(npm_npm_repository_href, nested_role, opts = {})
30
+ data, _status_code, _headers = add_role_with_http_info(npm_npm_repository_href, nested_role, opts)
31
+ data
32
+ end
33
+
34
+ # Add a role
35
+ # Add a role for this object to users/groups.
36
+ # @param npm_npm_repository_href [String]
37
+ # @param nested_role [NestedRole]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
40
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
41
+ def add_role_with_http_info(npm_npm_repository_href, nested_role, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.add_role ...'
44
+ end
45
+ # verify the required parameter 'npm_npm_repository_href' is set
46
+ if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
47
+ fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.add_role"
48
+ end
49
+ # verify the required parameter 'nested_role' is set
50
+ if @api_client.config.client_side_validation && nested_role.nil?
51
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesNpmApi.add_role"
52
+ end
53
+ # resource path
54
+ local_var_path = '{npm_npm_repository_href}add_role/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
63
+ # HTTP header 'Content-Type'
64
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
65
+ if !content_type.nil?
66
+ header_params['Content-Type'] = content_type
67
+ end
68
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nested_role)
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type] || 'NestedRoleResponse'
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"RepositoriesNpmApi.add_role",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: RepositoriesNpmApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
22
99
  # Create a npm repository
23
100
  # A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
24
101
  # @param npm_npm_repository [NpmNpmRepository]
@@ -334,6 +411,78 @@ module PulpNpmClient
334
411
  return data, status_code, headers
335
412
  end
336
413
 
414
+ # List roles
415
+ # List roles assigned to this object.
416
+ # @param npm_npm_repository_href [String]
417
+ # @param [Hash] opts the optional parameters
418
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
419
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
420
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
421
+ # @return [ObjectRolesResponse]
422
+ def list_roles(npm_npm_repository_href, opts = {})
423
+ data, _status_code, _headers = list_roles_with_http_info(npm_npm_repository_href, opts)
424
+ data
425
+ end
426
+
427
+ # List roles
428
+ # List roles assigned to this object.
429
+ # @param npm_npm_repository_href [String]
430
+ # @param [Hash] opts the optional parameters
431
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
432
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
433
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
434
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
435
+ def list_roles_with_http_info(npm_npm_repository_href, opts = {})
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.list_roles ...'
438
+ end
439
+ # verify the required parameter 'npm_npm_repository_href' is set
440
+ if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
441
+ fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.list_roles"
442
+ end
443
+ # resource path
444
+ local_var_path = '{npm_npm_repository_href}list_roles/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
449
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
450
+
451
+ # header parameters
452
+ header_params = opts[:header_params] || {}
453
+ # HTTP header 'Accept' (if needed)
454
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
455
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
456
+
457
+ # form parameters
458
+ form_params = opts[:form_params] || {}
459
+
460
+ # http body (model)
461
+ post_body = opts[:debug_body]
462
+
463
+ # return_type
464
+ return_type = opts[:debug_return_type] || 'ObjectRolesResponse'
465
+
466
+ # auth_names
467
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
468
+
469
+ new_options = opts.merge(
470
+ :operation => :"RepositoriesNpmApi.list_roles",
471
+ :header_params => header_params,
472
+ :query_params => query_params,
473
+ :form_params => form_params,
474
+ :body => post_body,
475
+ :auth_names => auth_names,
476
+ :return_type => return_type
477
+ )
478
+
479
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug "API called: RepositoriesNpmApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
482
+ end
483
+ return data, status_code, headers
484
+ end
485
+
337
486
  # Modify Repository Content
338
487
  # Trigger an asynchronous task to create a new repository version.
339
488
  # @param npm_npm_repository_href [String]
@@ -411,6 +560,78 @@ module PulpNpmClient
411
560
  return data, status_code, headers
412
561
  end
413
562
 
563
+ # List user permissions
564
+ # List permissions available to the current user on this object.
565
+ # @param npm_npm_repository_href [String]
566
+ # @param [Hash] opts the optional parameters
567
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
568
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
569
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
570
+ # @return [MyPermissionsResponse]
571
+ def my_permissions(npm_npm_repository_href, opts = {})
572
+ data, _status_code, _headers = my_permissions_with_http_info(npm_npm_repository_href, opts)
573
+ data
574
+ end
575
+
576
+ # List user permissions
577
+ # List permissions available to the current user on this object.
578
+ # @param npm_npm_repository_href [String]
579
+ # @param [Hash] opts the optional parameters
580
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
581
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
582
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
583
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
584
+ def my_permissions_with_http_info(npm_npm_repository_href, opts = {})
585
+ if @api_client.config.debugging
586
+ @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.my_permissions ...'
587
+ end
588
+ # verify the required parameter 'npm_npm_repository_href' is set
589
+ if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
590
+ fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.my_permissions"
591
+ end
592
+ # resource path
593
+ local_var_path = '{npm_npm_repository_href}my_permissions/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
594
+
595
+ # query parameters
596
+ query_params = opts[:query_params] || {}
597
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
598
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
599
+
600
+ # header parameters
601
+ header_params = opts[:header_params] || {}
602
+ # HTTP header 'Accept' (if needed)
603
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
604
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
605
+
606
+ # form parameters
607
+ form_params = opts[:form_params] || {}
608
+
609
+ # http body (model)
610
+ post_body = opts[:debug_body]
611
+
612
+ # return_type
613
+ return_type = opts[:debug_return_type] || 'MyPermissionsResponse'
614
+
615
+ # auth_names
616
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
617
+
618
+ new_options = opts.merge(
619
+ :operation => :"RepositoriesNpmApi.my_permissions",
620
+ :header_params => header_params,
621
+ :query_params => query_params,
622
+ :form_params => form_params,
623
+ :body => post_body,
624
+ :auth_names => auth_names,
625
+ :return_type => return_type
626
+ )
627
+
628
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
629
+ if @api_client.config.debugging
630
+ @api_client.config.logger.debug "API called: RepositoriesNpmApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
631
+ end
632
+ return data, status_code, headers
633
+ end
634
+
414
635
  # Update a npm repository
415
636
  # Update the entity partially and trigger an asynchronous task if necessary
416
637
  # @param npm_npm_repository_href [String]
@@ -560,6 +781,83 @@ module PulpNpmClient
560
781
  return data, status_code, headers
561
782
  end
562
783
 
784
+ # Remove a role
785
+ # Remove a role for this object from users/groups.
786
+ # @param npm_npm_repository_href [String]
787
+ # @param nested_role [NestedRole]
788
+ # @param [Hash] opts the optional parameters
789
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
790
+ # @return [NestedRoleResponse]
791
+ def remove_role(npm_npm_repository_href, nested_role, opts = {})
792
+ data, _status_code, _headers = remove_role_with_http_info(npm_npm_repository_href, nested_role, opts)
793
+ data
794
+ end
795
+
796
+ # Remove a role
797
+ # Remove a role for this object from users/groups.
798
+ # @param npm_npm_repository_href [String]
799
+ # @param nested_role [NestedRole]
800
+ # @param [Hash] opts the optional parameters
801
+ # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
802
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
803
+ def remove_role_with_http_info(npm_npm_repository_href, nested_role, opts = {})
804
+ if @api_client.config.debugging
805
+ @api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.remove_role ...'
806
+ end
807
+ # verify the required parameter 'npm_npm_repository_href' is set
808
+ if @api_client.config.client_side_validation && npm_npm_repository_href.nil?
809
+ fail ArgumentError, "Missing the required parameter 'npm_npm_repository_href' when calling RepositoriesNpmApi.remove_role"
810
+ end
811
+ # verify the required parameter 'nested_role' is set
812
+ if @api_client.config.client_side_validation && nested_role.nil?
813
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RepositoriesNpmApi.remove_role"
814
+ end
815
+ # resource path
816
+ local_var_path = '{npm_npm_repository_href}remove_role/'.sub('{' + 'npm_npm_repository_href' + '}', CGI.escape(npm_npm_repository_href.to_s).gsub('%2F', '/'))
817
+
818
+ # query parameters
819
+ query_params = opts[:query_params] || {}
820
+
821
+ # header parameters
822
+ header_params = opts[:header_params] || {}
823
+ # HTTP header 'Accept' (if needed)
824
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
825
+ # HTTP header 'Content-Type'
826
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
827
+ if !content_type.nil?
828
+ header_params['Content-Type'] = content_type
829
+ end
830
+ header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
831
+
832
+ # form parameters
833
+ form_params = opts[:form_params] || {}
834
+
835
+ # http body (model)
836
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(nested_role)
837
+
838
+ # return_type
839
+ return_type = opts[:debug_return_type] || 'NestedRoleResponse'
840
+
841
+ # auth_names
842
+ auth_names = opts[:debug_auth_names] || ['basicAuth']
843
+
844
+ new_options = opts.merge(
845
+ :operation => :"RepositoriesNpmApi.remove_role",
846
+ :header_params => header_params,
847
+ :query_params => query_params,
848
+ :form_params => form_params,
849
+ :body => post_body,
850
+ :auth_names => auth_names,
851
+ :return_type => return_type
852
+ )
853
+
854
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
855
+ if @api_client.config.debugging
856
+ @api_client.config.logger.debug "API called: RepositoriesNpmApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
857
+ end
858
+ return data, status_code, headers
859
+ end
860
+
563
861
  # Set a label
564
862
  # Set a single pulp_label on the object to a specific value or null.
565
863
  # @param npm_npm_repository_href [String]