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.
- checksums.yaml +4 -4
- data/README.md +21 -4
- data/docs/ContentPackagesApi.md +4 -0
- data/docs/DistributionsNpmApi.md +312 -0
- data/docs/MyPermissionsResponse.md +18 -0
- data/docs/NestedRole.md +22 -0
- data/docs/NestedRoleResponse.md +22 -0
- data/docs/NpmPingApi.md +1 -7
- data/docs/ObjectRolesResponse.md +18 -0
- data/docs/RemotesNpmApi.md +312 -0
- data/docs/RepositoriesNpmApi.md +312 -0
- data/docs/RepositoryAddRemoveContent.md +3 -1
- data/lib/pulp_npm_client/api/content_packages_api.rb +6 -0
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +298 -0
- data/lib/pulp_npm_client/api/npm_ping_api.rb +1 -1
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +298 -0
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +298 -0
- data/lib/pulp_npm_client/models/my_permissions_response.rb +223 -0
- data/lib/pulp_npm_client/models/nested_role.rb +263 -0
- data/lib/pulp_npm_client/models/nested_role_response.rb +244 -0
- data/lib/pulp_npm_client/models/object_roles_response.rb +223 -0
- data/lib/pulp_npm_client/models/repository_add_remove_content.rb +16 -4
- data/lib/pulp_npm_client/version.rb +1 -1
- data/lib/pulp_npm_client.rb +4 -0
- data/spec/api/content_packages_api_spec.rb +2 -0
- data/spec/api/distributions_npm_api_spec.rb +58 -0
- data/spec/api/remotes_npm_api_spec.rb +58 -0
- data/spec/api/repositories_npm_api_spec.rb +58 -0
- data/spec/models/my_permissions_response_spec.rb +36 -0
- data/spec/models/nested_role_response_spec.rb +48 -0
- data/spec/models/nested_role_spec.rb +48 -0
- data/spec/models/object_roles_response_spec.rb +36 -0
- data/spec/models/repository_add_remove_content_spec.rb +6 -0
- metadata +43 -27
data/docs/RemotesNpmApi.md
CHANGED
|
@@ -4,16 +4,96 @@ All URIs are relative to *http://localhost:24817*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**add_role**](RemotesNpmApi.md#add_role) | **POST** {npm_npm_remote_href}add_role/ | Add a role |
|
|
7
8
|
| [**create**](RemotesNpmApi.md#create) | **POST** /pulp/api/v3/remotes/npm/npm/ | Create a npm remote |
|
|
8
9
|
| [**delete**](RemotesNpmApi.md#delete) | **DELETE** {npm_npm_remote_href} | Delete a npm remote |
|
|
9
10
|
| [**list**](RemotesNpmApi.md#list) | **GET** /pulp/api/v3/remotes/npm/npm/ | List npm remotes |
|
|
11
|
+
| [**list_roles**](RemotesNpmApi.md#list_roles) | **GET** {npm_npm_remote_href}list_roles/ | List roles |
|
|
12
|
+
| [**my_permissions**](RemotesNpmApi.md#my_permissions) | **GET** {npm_npm_remote_href}my_permissions/ | List user permissions |
|
|
10
13
|
| [**partial_update**](RemotesNpmApi.md#partial_update) | **PATCH** {npm_npm_remote_href} | Update a npm remote |
|
|
11
14
|
| [**read**](RemotesNpmApi.md#read) | **GET** {npm_npm_remote_href} | Inspect a npm remote |
|
|
15
|
+
| [**remove_role**](RemotesNpmApi.md#remove_role) | **POST** {npm_npm_remote_href}remove_role/ | Remove a role |
|
|
12
16
|
| [**set_label**](RemotesNpmApi.md#set_label) | **POST** {npm_npm_remote_href}set_label/ | Set a label |
|
|
13
17
|
| [**unset_label**](RemotesNpmApi.md#unset_label) | **POST** {npm_npm_remote_href}unset_label/ | Unset a label |
|
|
14
18
|
| [**update**](RemotesNpmApi.md#update) | **PUT** {npm_npm_remote_href} | Update a npm remote |
|
|
15
19
|
|
|
16
20
|
|
|
21
|
+
## add_role
|
|
22
|
+
|
|
23
|
+
> <NestedRoleResponse> add_role(npm_npm_remote_href, nested_role, opts)
|
|
24
|
+
|
|
25
|
+
Add a role
|
|
26
|
+
|
|
27
|
+
Add a role for this object to users/groups.
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
require 'time'
|
|
33
|
+
require 'pulp_npm_client'
|
|
34
|
+
# setup authorization
|
|
35
|
+
PulpNpmClient.configure do |config|
|
|
36
|
+
# Configure HTTP basic authorization: basicAuth
|
|
37
|
+
config.username = 'YOUR USERNAME'
|
|
38
|
+
config.password = 'YOUR PASSWORD'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
api_instance = PulpNpmClient::RemotesNpmApi.new
|
|
42
|
+
npm_npm_remote_href = 'npm_npm_remote_href_example' # String |
|
|
43
|
+
nested_role = PulpNpmClient::NestedRole.new({role: 'role_example'}) # NestedRole |
|
|
44
|
+
opts = {
|
|
45
|
+
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
begin
|
|
49
|
+
# Add a role
|
|
50
|
+
result = api_instance.add_role(npm_npm_remote_href, nested_role, opts)
|
|
51
|
+
p result
|
|
52
|
+
rescue PulpNpmClient::ApiError => e
|
|
53
|
+
puts "Error when calling RemotesNpmApi->add_role: #{e}"
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Using the add_role_with_http_info variant
|
|
58
|
+
|
|
59
|
+
This returns an Array which contains the response data, status code and headers.
|
|
60
|
+
|
|
61
|
+
> <Array(<NestedRoleResponse>, Integer, Hash)> add_role_with_http_info(npm_npm_remote_href, nested_role, opts)
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
begin
|
|
65
|
+
# Add a role
|
|
66
|
+
data, status_code, headers = api_instance.add_role_with_http_info(npm_npm_remote_href, nested_role, opts)
|
|
67
|
+
p status_code # => 2xx
|
|
68
|
+
p headers # => { ... }
|
|
69
|
+
p data # => <NestedRoleResponse>
|
|
70
|
+
rescue PulpNpmClient::ApiError => e
|
|
71
|
+
puts "Error when calling RemotesNpmApi->add_role_with_http_info: #{e}"
|
|
72
|
+
end
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Name | Type | Description | Notes |
|
|
78
|
+
| ---- | ---- | ----------- | ----- |
|
|
79
|
+
| **npm_npm_remote_href** | **String** | | |
|
|
80
|
+
| **nested_role** | [**NestedRole**](NestedRole.md) | | |
|
|
81
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
82
|
+
|
|
83
|
+
### Return type
|
|
84
|
+
|
|
85
|
+
[**NestedRoleResponse**](NestedRoleResponse.md)
|
|
86
|
+
|
|
87
|
+
### Authorization
|
|
88
|
+
|
|
89
|
+
[basicAuth](../README.md#basicAuth)
|
|
90
|
+
|
|
91
|
+
### HTTP request headers
|
|
92
|
+
|
|
93
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
|
94
|
+
- **Accept**: application/json
|
|
95
|
+
|
|
96
|
+
|
|
17
97
|
## create
|
|
18
98
|
|
|
19
99
|
> <NpmNpmRemoteResponse> create(npm_npm_remote, opts)
|
|
@@ -286,6 +366,162 @@ end
|
|
|
286
366
|
- **Accept**: application/json
|
|
287
367
|
|
|
288
368
|
|
|
369
|
+
## list_roles
|
|
370
|
+
|
|
371
|
+
> <ObjectRolesResponse> list_roles(npm_npm_remote_href, opts)
|
|
372
|
+
|
|
373
|
+
List roles
|
|
374
|
+
|
|
375
|
+
List roles assigned to this object.
|
|
376
|
+
|
|
377
|
+
### Examples
|
|
378
|
+
|
|
379
|
+
```ruby
|
|
380
|
+
require 'time'
|
|
381
|
+
require 'pulp_npm_client'
|
|
382
|
+
# setup authorization
|
|
383
|
+
PulpNpmClient.configure do |config|
|
|
384
|
+
# Configure HTTP basic authorization: basicAuth
|
|
385
|
+
config.username = 'YOUR USERNAME'
|
|
386
|
+
config.password = 'YOUR PASSWORD'
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
api_instance = PulpNpmClient::RemotesNpmApi.new
|
|
390
|
+
npm_npm_remote_href = 'npm_npm_remote_href_example' # String |
|
|
391
|
+
opts = {
|
|
392
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
393
|
+
fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
|
|
394
|
+
exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
begin
|
|
398
|
+
# List roles
|
|
399
|
+
result = api_instance.list_roles(npm_npm_remote_href, opts)
|
|
400
|
+
p result
|
|
401
|
+
rescue PulpNpmClient::ApiError => e
|
|
402
|
+
puts "Error when calling RemotesNpmApi->list_roles: #{e}"
|
|
403
|
+
end
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
#### Using the list_roles_with_http_info variant
|
|
407
|
+
|
|
408
|
+
This returns an Array which contains the response data, status code and headers.
|
|
409
|
+
|
|
410
|
+
> <Array(<ObjectRolesResponse>, Integer, Hash)> list_roles_with_http_info(npm_npm_remote_href, opts)
|
|
411
|
+
|
|
412
|
+
```ruby
|
|
413
|
+
begin
|
|
414
|
+
# List roles
|
|
415
|
+
data, status_code, headers = api_instance.list_roles_with_http_info(npm_npm_remote_href, opts)
|
|
416
|
+
p status_code # => 2xx
|
|
417
|
+
p headers # => { ... }
|
|
418
|
+
p data # => <ObjectRolesResponse>
|
|
419
|
+
rescue PulpNpmClient::ApiError => e
|
|
420
|
+
puts "Error when calling RemotesNpmApi->list_roles_with_http_info: #{e}"
|
|
421
|
+
end
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Parameters
|
|
425
|
+
|
|
426
|
+
| Name | Type | Description | Notes |
|
|
427
|
+
| ---- | ---- | ----------- | ----- |
|
|
428
|
+
| **npm_npm_remote_href** | **String** | | |
|
|
429
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
430
|
+
| **fields** | [**Array<String>**](String.md) | A list of fields to include in the response. | [optional] |
|
|
431
|
+
| **exclude_fields** | [**Array<String>**](String.md) | A list of fields to exclude from the response. | [optional] |
|
|
432
|
+
|
|
433
|
+
### Return type
|
|
434
|
+
|
|
435
|
+
[**ObjectRolesResponse**](ObjectRolesResponse.md)
|
|
436
|
+
|
|
437
|
+
### Authorization
|
|
438
|
+
|
|
439
|
+
[basicAuth](../README.md#basicAuth)
|
|
440
|
+
|
|
441
|
+
### HTTP request headers
|
|
442
|
+
|
|
443
|
+
- **Content-Type**: Not defined
|
|
444
|
+
- **Accept**: application/json
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
## my_permissions
|
|
448
|
+
|
|
449
|
+
> <MyPermissionsResponse> my_permissions(npm_npm_remote_href, opts)
|
|
450
|
+
|
|
451
|
+
List user permissions
|
|
452
|
+
|
|
453
|
+
List permissions available to the current user on this object.
|
|
454
|
+
|
|
455
|
+
### Examples
|
|
456
|
+
|
|
457
|
+
```ruby
|
|
458
|
+
require 'time'
|
|
459
|
+
require 'pulp_npm_client'
|
|
460
|
+
# setup authorization
|
|
461
|
+
PulpNpmClient.configure do |config|
|
|
462
|
+
# Configure HTTP basic authorization: basicAuth
|
|
463
|
+
config.username = 'YOUR USERNAME'
|
|
464
|
+
config.password = 'YOUR PASSWORD'
|
|
465
|
+
end
|
|
466
|
+
|
|
467
|
+
api_instance = PulpNpmClient::RemotesNpmApi.new
|
|
468
|
+
npm_npm_remote_href = 'npm_npm_remote_href_example' # String |
|
|
469
|
+
opts = {
|
|
470
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
471
|
+
fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
|
|
472
|
+
exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
begin
|
|
476
|
+
# List user permissions
|
|
477
|
+
result = api_instance.my_permissions(npm_npm_remote_href, opts)
|
|
478
|
+
p result
|
|
479
|
+
rescue PulpNpmClient::ApiError => e
|
|
480
|
+
puts "Error when calling RemotesNpmApi->my_permissions: #{e}"
|
|
481
|
+
end
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
#### Using the my_permissions_with_http_info variant
|
|
485
|
+
|
|
486
|
+
This returns an Array which contains the response data, status code and headers.
|
|
487
|
+
|
|
488
|
+
> <Array(<MyPermissionsResponse>, Integer, Hash)> my_permissions_with_http_info(npm_npm_remote_href, opts)
|
|
489
|
+
|
|
490
|
+
```ruby
|
|
491
|
+
begin
|
|
492
|
+
# List user permissions
|
|
493
|
+
data, status_code, headers = api_instance.my_permissions_with_http_info(npm_npm_remote_href, opts)
|
|
494
|
+
p status_code # => 2xx
|
|
495
|
+
p headers # => { ... }
|
|
496
|
+
p data # => <MyPermissionsResponse>
|
|
497
|
+
rescue PulpNpmClient::ApiError => e
|
|
498
|
+
puts "Error when calling RemotesNpmApi->my_permissions_with_http_info: #{e}"
|
|
499
|
+
end
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Parameters
|
|
503
|
+
|
|
504
|
+
| Name | Type | Description | Notes |
|
|
505
|
+
| ---- | ---- | ----------- | ----- |
|
|
506
|
+
| **npm_npm_remote_href** | **String** | | |
|
|
507
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
508
|
+
| **fields** | [**Array<String>**](String.md) | A list of fields to include in the response. | [optional] |
|
|
509
|
+
| **exclude_fields** | [**Array<String>**](String.md) | A list of fields to exclude from the response. | [optional] |
|
|
510
|
+
|
|
511
|
+
### Return type
|
|
512
|
+
|
|
513
|
+
[**MyPermissionsResponse**](MyPermissionsResponse.md)
|
|
514
|
+
|
|
515
|
+
### Authorization
|
|
516
|
+
|
|
517
|
+
[basicAuth](../README.md#basicAuth)
|
|
518
|
+
|
|
519
|
+
### HTTP request headers
|
|
520
|
+
|
|
521
|
+
- **Content-Type**: Not defined
|
|
522
|
+
- **Accept**: application/json
|
|
523
|
+
|
|
524
|
+
|
|
289
525
|
## partial_update
|
|
290
526
|
|
|
291
527
|
> <NpmNpmRemoteResponse> partial_update(npm_npm_remote_href, patchednpm_npm_remote, opts)
|
|
@@ -440,6 +676,82 @@ end
|
|
|
440
676
|
- **Accept**: application/json
|
|
441
677
|
|
|
442
678
|
|
|
679
|
+
## remove_role
|
|
680
|
+
|
|
681
|
+
> <NestedRoleResponse> remove_role(npm_npm_remote_href, nested_role, opts)
|
|
682
|
+
|
|
683
|
+
Remove a role
|
|
684
|
+
|
|
685
|
+
Remove a role for this object from users/groups.
|
|
686
|
+
|
|
687
|
+
### Examples
|
|
688
|
+
|
|
689
|
+
```ruby
|
|
690
|
+
require 'time'
|
|
691
|
+
require 'pulp_npm_client'
|
|
692
|
+
# setup authorization
|
|
693
|
+
PulpNpmClient.configure do |config|
|
|
694
|
+
# Configure HTTP basic authorization: basicAuth
|
|
695
|
+
config.username = 'YOUR USERNAME'
|
|
696
|
+
config.password = 'YOUR PASSWORD'
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
api_instance = PulpNpmClient::RemotesNpmApi.new
|
|
700
|
+
npm_npm_remote_href = 'npm_npm_remote_href_example' # String |
|
|
701
|
+
nested_role = PulpNpmClient::NestedRole.new({role: 'role_example'}) # NestedRole |
|
|
702
|
+
opts = {
|
|
703
|
+
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
begin
|
|
707
|
+
# Remove a role
|
|
708
|
+
result = api_instance.remove_role(npm_npm_remote_href, nested_role, opts)
|
|
709
|
+
p result
|
|
710
|
+
rescue PulpNpmClient::ApiError => e
|
|
711
|
+
puts "Error when calling RemotesNpmApi->remove_role: #{e}"
|
|
712
|
+
end
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
#### Using the remove_role_with_http_info variant
|
|
716
|
+
|
|
717
|
+
This returns an Array which contains the response data, status code and headers.
|
|
718
|
+
|
|
719
|
+
> <Array(<NestedRoleResponse>, Integer, Hash)> remove_role_with_http_info(npm_npm_remote_href, nested_role, opts)
|
|
720
|
+
|
|
721
|
+
```ruby
|
|
722
|
+
begin
|
|
723
|
+
# Remove a role
|
|
724
|
+
data, status_code, headers = api_instance.remove_role_with_http_info(npm_npm_remote_href, nested_role, opts)
|
|
725
|
+
p status_code # => 2xx
|
|
726
|
+
p headers # => { ... }
|
|
727
|
+
p data # => <NestedRoleResponse>
|
|
728
|
+
rescue PulpNpmClient::ApiError => e
|
|
729
|
+
puts "Error when calling RemotesNpmApi->remove_role_with_http_info: #{e}"
|
|
730
|
+
end
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
### Parameters
|
|
734
|
+
|
|
735
|
+
| Name | Type | Description | Notes |
|
|
736
|
+
| ---- | ---- | ----------- | ----- |
|
|
737
|
+
| **npm_npm_remote_href** | **String** | | |
|
|
738
|
+
| **nested_role** | [**NestedRole**](NestedRole.md) | | |
|
|
739
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
740
|
+
|
|
741
|
+
### Return type
|
|
742
|
+
|
|
743
|
+
[**NestedRoleResponse**](NestedRoleResponse.md)
|
|
744
|
+
|
|
745
|
+
### Authorization
|
|
746
|
+
|
|
747
|
+
[basicAuth](../README.md#basicAuth)
|
|
748
|
+
|
|
749
|
+
### HTTP request headers
|
|
750
|
+
|
|
751
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
|
752
|
+
- **Accept**: application/json
|
|
753
|
+
|
|
754
|
+
|
|
443
755
|
## set_label
|
|
444
756
|
|
|
445
757
|
> <SetLabelResponse> set_label(npm_npm_remote_href, set_label, opts)
|
data/docs/RepositoriesNpmApi.md
CHANGED
|
@@ -4,18 +4,98 @@ All URIs are relative to *http://localhost:24817*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**add_role**](RepositoriesNpmApi.md#add_role) | **POST** {npm_npm_repository_href}add_role/ | Add a role |
|
|
7
8
|
| [**create**](RepositoriesNpmApi.md#create) | **POST** /pulp/api/v3/repositories/npm/npm/ | Create a npm repository |
|
|
8
9
|
| [**delete**](RepositoriesNpmApi.md#delete) | **DELETE** {npm_npm_repository_href} | Delete a npm repository |
|
|
9
10
|
| [**list**](RepositoriesNpmApi.md#list) | **GET** /pulp/api/v3/repositories/npm/npm/ | List npm repositorys |
|
|
11
|
+
| [**list_roles**](RepositoriesNpmApi.md#list_roles) | **GET** {npm_npm_repository_href}list_roles/ | List roles |
|
|
10
12
|
| [**modify**](RepositoriesNpmApi.md#modify) | **POST** {npm_npm_repository_href}modify/ | Modify Repository Content |
|
|
13
|
+
| [**my_permissions**](RepositoriesNpmApi.md#my_permissions) | **GET** {npm_npm_repository_href}my_permissions/ | List user permissions |
|
|
11
14
|
| [**partial_update**](RepositoriesNpmApi.md#partial_update) | **PATCH** {npm_npm_repository_href} | Update a npm repository |
|
|
12
15
|
| [**read**](RepositoriesNpmApi.md#read) | **GET** {npm_npm_repository_href} | Inspect a npm repository |
|
|
16
|
+
| [**remove_role**](RepositoriesNpmApi.md#remove_role) | **POST** {npm_npm_repository_href}remove_role/ | Remove a role |
|
|
13
17
|
| [**set_label**](RepositoriesNpmApi.md#set_label) | **POST** {npm_npm_repository_href}set_label/ | Set a label |
|
|
14
18
|
| [**sync**](RepositoriesNpmApi.md#sync) | **POST** {npm_npm_repository_href}sync/ | Sync from remote |
|
|
15
19
|
| [**unset_label**](RepositoriesNpmApi.md#unset_label) | **POST** {npm_npm_repository_href}unset_label/ | Unset a label |
|
|
16
20
|
| [**update**](RepositoriesNpmApi.md#update) | **PUT** {npm_npm_repository_href} | Update a npm repository |
|
|
17
21
|
|
|
18
22
|
|
|
23
|
+
## add_role
|
|
24
|
+
|
|
25
|
+
> <NestedRoleResponse> add_role(npm_npm_repository_href, nested_role, opts)
|
|
26
|
+
|
|
27
|
+
Add a role
|
|
28
|
+
|
|
29
|
+
Add a role for this object to users/groups.
|
|
30
|
+
|
|
31
|
+
### Examples
|
|
32
|
+
|
|
33
|
+
```ruby
|
|
34
|
+
require 'time'
|
|
35
|
+
require 'pulp_npm_client'
|
|
36
|
+
# setup authorization
|
|
37
|
+
PulpNpmClient.configure do |config|
|
|
38
|
+
# Configure HTTP basic authorization: basicAuth
|
|
39
|
+
config.username = 'YOUR USERNAME'
|
|
40
|
+
config.password = 'YOUR PASSWORD'
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
|
44
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
|
45
|
+
nested_role = PulpNpmClient::NestedRole.new({role: 'role_example'}) # NestedRole |
|
|
46
|
+
opts = {
|
|
47
|
+
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
begin
|
|
51
|
+
# Add a role
|
|
52
|
+
result = api_instance.add_role(npm_npm_repository_href, nested_role, opts)
|
|
53
|
+
p result
|
|
54
|
+
rescue PulpNpmClient::ApiError => e
|
|
55
|
+
puts "Error when calling RepositoriesNpmApi->add_role: #{e}"
|
|
56
|
+
end
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### Using the add_role_with_http_info variant
|
|
60
|
+
|
|
61
|
+
This returns an Array which contains the response data, status code and headers.
|
|
62
|
+
|
|
63
|
+
> <Array(<NestedRoleResponse>, Integer, Hash)> add_role_with_http_info(npm_npm_repository_href, nested_role, opts)
|
|
64
|
+
|
|
65
|
+
```ruby
|
|
66
|
+
begin
|
|
67
|
+
# Add a role
|
|
68
|
+
data, status_code, headers = api_instance.add_role_with_http_info(npm_npm_repository_href, nested_role, opts)
|
|
69
|
+
p status_code # => 2xx
|
|
70
|
+
p headers # => { ... }
|
|
71
|
+
p data # => <NestedRoleResponse>
|
|
72
|
+
rescue PulpNpmClient::ApiError => e
|
|
73
|
+
puts "Error when calling RepositoriesNpmApi->add_role_with_http_info: #{e}"
|
|
74
|
+
end
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Parameters
|
|
78
|
+
|
|
79
|
+
| Name | Type | Description | Notes |
|
|
80
|
+
| ---- | ---- | ----------- | ----- |
|
|
81
|
+
| **npm_npm_repository_href** | **String** | | |
|
|
82
|
+
| **nested_role** | [**NestedRole**](NestedRole.md) | | |
|
|
83
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
84
|
+
|
|
85
|
+
### Return type
|
|
86
|
+
|
|
87
|
+
[**NestedRoleResponse**](NestedRoleResponse.md)
|
|
88
|
+
|
|
89
|
+
### Authorization
|
|
90
|
+
|
|
91
|
+
[basicAuth](../README.md#basicAuth)
|
|
92
|
+
|
|
93
|
+
### HTTP request headers
|
|
94
|
+
|
|
95
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
|
96
|
+
- **Accept**: application/json
|
|
97
|
+
|
|
98
|
+
|
|
19
99
|
## create
|
|
20
100
|
|
|
21
101
|
> <NpmNpmRepositoryResponse> create(npm_npm_repository, opts)
|
|
@@ -312,6 +392,84 @@ end
|
|
|
312
392
|
- **Accept**: application/json
|
|
313
393
|
|
|
314
394
|
|
|
395
|
+
## list_roles
|
|
396
|
+
|
|
397
|
+
> <ObjectRolesResponse> list_roles(npm_npm_repository_href, opts)
|
|
398
|
+
|
|
399
|
+
List roles
|
|
400
|
+
|
|
401
|
+
List roles assigned to this object.
|
|
402
|
+
|
|
403
|
+
### Examples
|
|
404
|
+
|
|
405
|
+
```ruby
|
|
406
|
+
require 'time'
|
|
407
|
+
require 'pulp_npm_client'
|
|
408
|
+
# setup authorization
|
|
409
|
+
PulpNpmClient.configure do |config|
|
|
410
|
+
# Configure HTTP basic authorization: basicAuth
|
|
411
|
+
config.username = 'YOUR USERNAME'
|
|
412
|
+
config.password = 'YOUR PASSWORD'
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
|
416
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
|
417
|
+
opts = {
|
|
418
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
419
|
+
fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
|
|
420
|
+
exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
begin
|
|
424
|
+
# List roles
|
|
425
|
+
result = api_instance.list_roles(npm_npm_repository_href, opts)
|
|
426
|
+
p result
|
|
427
|
+
rescue PulpNpmClient::ApiError => e
|
|
428
|
+
puts "Error when calling RepositoriesNpmApi->list_roles: #{e}"
|
|
429
|
+
end
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
#### Using the list_roles_with_http_info variant
|
|
433
|
+
|
|
434
|
+
This returns an Array which contains the response data, status code and headers.
|
|
435
|
+
|
|
436
|
+
> <Array(<ObjectRolesResponse>, Integer, Hash)> list_roles_with_http_info(npm_npm_repository_href, opts)
|
|
437
|
+
|
|
438
|
+
```ruby
|
|
439
|
+
begin
|
|
440
|
+
# List roles
|
|
441
|
+
data, status_code, headers = api_instance.list_roles_with_http_info(npm_npm_repository_href, opts)
|
|
442
|
+
p status_code # => 2xx
|
|
443
|
+
p headers # => { ... }
|
|
444
|
+
p data # => <ObjectRolesResponse>
|
|
445
|
+
rescue PulpNpmClient::ApiError => e
|
|
446
|
+
puts "Error when calling RepositoriesNpmApi->list_roles_with_http_info: #{e}"
|
|
447
|
+
end
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Parameters
|
|
451
|
+
|
|
452
|
+
| Name | Type | Description | Notes |
|
|
453
|
+
| ---- | ---- | ----------- | ----- |
|
|
454
|
+
| **npm_npm_repository_href** | **String** | | |
|
|
455
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
456
|
+
| **fields** | [**Array<String>**](String.md) | A list of fields to include in the response. | [optional] |
|
|
457
|
+
| **exclude_fields** | [**Array<String>**](String.md) | A list of fields to exclude from the response. | [optional] |
|
|
458
|
+
|
|
459
|
+
### Return type
|
|
460
|
+
|
|
461
|
+
[**ObjectRolesResponse**](ObjectRolesResponse.md)
|
|
462
|
+
|
|
463
|
+
### Authorization
|
|
464
|
+
|
|
465
|
+
[basicAuth](../README.md#basicAuth)
|
|
466
|
+
|
|
467
|
+
### HTTP request headers
|
|
468
|
+
|
|
469
|
+
- **Content-Type**: Not defined
|
|
470
|
+
- **Accept**: application/json
|
|
471
|
+
|
|
472
|
+
|
|
315
473
|
## modify
|
|
316
474
|
|
|
317
475
|
> <AsyncOperationResponse> modify(npm_npm_repository_href, repository_add_remove_content, opts)
|
|
@@ -388,6 +546,84 @@ end
|
|
|
388
546
|
- **Accept**: application/json
|
|
389
547
|
|
|
390
548
|
|
|
549
|
+
## my_permissions
|
|
550
|
+
|
|
551
|
+
> <MyPermissionsResponse> my_permissions(npm_npm_repository_href, opts)
|
|
552
|
+
|
|
553
|
+
List user permissions
|
|
554
|
+
|
|
555
|
+
List permissions available to the current user on this object.
|
|
556
|
+
|
|
557
|
+
### Examples
|
|
558
|
+
|
|
559
|
+
```ruby
|
|
560
|
+
require 'time'
|
|
561
|
+
require 'pulp_npm_client'
|
|
562
|
+
# setup authorization
|
|
563
|
+
PulpNpmClient.configure do |config|
|
|
564
|
+
# Configure HTTP basic authorization: basicAuth
|
|
565
|
+
config.username = 'YOUR USERNAME'
|
|
566
|
+
config.password = 'YOUR PASSWORD'
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
|
570
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
|
571
|
+
opts = {
|
|
572
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
573
|
+
fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
|
|
574
|
+
exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
begin
|
|
578
|
+
# List user permissions
|
|
579
|
+
result = api_instance.my_permissions(npm_npm_repository_href, opts)
|
|
580
|
+
p result
|
|
581
|
+
rescue PulpNpmClient::ApiError => e
|
|
582
|
+
puts "Error when calling RepositoriesNpmApi->my_permissions: #{e}"
|
|
583
|
+
end
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
#### Using the my_permissions_with_http_info variant
|
|
587
|
+
|
|
588
|
+
This returns an Array which contains the response data, status code and headers.
|
|
589
|
+
|
|
590
|
+
> <Array(<MyPermissionsResponse>, Integer, Hash)> my_permissions_with_http_info(npm_npm_repository_href, opts)
|
|
591
|
+
|
|
592
|
+
```ruby
|
|
593
|
+
begin
|
|
594
|
+
# List user permissions
|
|
595
|
+
data, status_code, headers = api_instance.my_permissions_with_http_info(npm_npm_repository_href, opts)
|
|
596
|
+
p status_code # => 2xx
|
|
597
|
+
p headers # => { ... }
|
|
598
|
+
p data # => <MyPermissionsResponse>
|
|
599
|
+
rescue PulpNpmClient::ApiError => e
|
|
600
|
+
puts "Error when calling RepositoriesNpmApi->my_permissions_with_http_info: #{e}"
|
|
601
|
+
end
|
|
602
|
+
```
|
|
603
|
+
|
|
604
|
+
### Parameters
|
|
605
|
+
|
|
606
|
+
| Name | Type | Description | Notes |
|
|
607
|
+
| ---- | ---- | ----------- | ----- |
|
|
608
|
+
| **npm_npm_repository_href** | **String** | | |
|
|
609
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
610
|
+
| **fields** | [**Array<String>**](String.md) | A list of fields to include in the response. | [optional] |
|
|
611
|
+
| **exclude_fields** | [**Array<String>**](String.md) | A list of fields to exclude from the response. | [optional] |
|
|
612
|
+
|
|
613
|
+
### Return type
|
|
614
|
+
|
|
615
|
+
[**MyPermissionsResponse**](MyPermissionsResponse.md)
|
|
616
|
+
|
|
617
|
+
### Authorization
|
|
618
|
+
|
|
619
|
+
[basicAuth](../README.md#basicAuth)
|
|
620
|
+
|
|
621
|
+
### HTTP request headers
|
|
622
|
+
|
|
623
|
+
- **Content-Type**: Not defined
|
|
624
|
+
- **Accept**: application/json
|
|
625
|
+
|
|
626
|
+
|
|
391
627
|
## partial_update
|
|
392
628
|
|
|
393
629
|
> <NpmNpmRepositoryResponse> partial_update(npm_npm_repository_href, patchednpm_npm_repository, opts)
|
|
@@ -542,6 +778,82 @@ end
|
|
|
542
778
|
- **Accept**: application/json
|
|
543
779
|
|
|
544
780
|
|
|
781
|
+
## remove_role
|
|
782
|
+
|
|
783
|
+
> <NestedRoleResponse> remove_role(npm_npm_repository_href, nested_role, opts)
|
|
784
|
+
|
|
785
|
+
Remove a role
|
|
786
|
+
|
|
787
|
+
Remove a role for this object from users/groups.
|
|
788
|
+
|
|
789
|
+
### Examples
|
|
790
|
+
|
|
791
|
+
```ruby
|
|
792
|
+
require 'time'
|
|
793
|
+
require 'pulp_npm_client'
|
|
794
|
+
# setup authorization
|
|
795
|
+
PulpNpmClient.configure do |config|
|
|
796
|
+
# Configure HTTP basic authorization: basicAuth
|
|
797
|
+
config.username = 'YOUR USERNAME'
|
|
798
|
+
config.password = 'YOUR PASSWORD'
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
api_instance = PulpNpmClient::RepositoriesNpmApi.new
|
|
802
|
+
npm_npm_repository_href = 'npm_npm_repository_href_example' # String |
|
|
803
|
+
nested_role = PulpNpmClient::NestedRole.new({role: 'role_example'}) # NestedRole |
|
|
804
|
+
opts = {
|
|
805
|
+
x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
begin
|
|
809
|
+
# Remove a role
|
|
810
|
+
result = api_instance.remove_role(npm_npm_repository_href, nested_role, opts)
|
|
811
|
+
p result
|
|
812
|
+
rescue PulpNpmClient::ApiError => e
|
|
813
|
+
puts "Error when calling RepositoriesNpmApi->remove_role: #{e}"
|
|
814
|
+
end
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
#### Using the remove_role_with_http_info variant
|
|
818
|
+
|
|
819
|
+
This returns an Array which contains the response data, status code and headers.
|
|
820
|
+
|
|
821
|
+
> <Array(<NestedRoleResponse>, Integer, Hash)> remove_role_with_http_info(npm_npm_repository_href, nested_role, opts)
|
|
822
|
+
|
|
823
|
+
```ruby
|
|
824
|
+
begin
|
|
825
|
+
# Remove a role
|
|
826
|
+
data, status_code, headers = api_instance.remove_role_with_http_info(npm_npm_repository_href, nested_role, opts)
|
|
827
|
+
p status_code # => 2xx
|
|
828
|
+
p headers # => { ... }
|
|
829
|
+
p data # => <NestedRoleResponse>
|
|
830
|
+
rescue PulpNpmClient::ApiError => e
|
|
831
|
+
puts "Error when calling RepositoriesNpmApi->remove_role_with_http_info: #{e}"
|
|
832
|
+
end
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
### Parameters
|
|
836
|
+
|
|
837
|
+
| Name | Type | Description | Notes |
|
|
838
|
+
| ---- | ---- | ----------- | ----- |
|
|
839
|
+
| **npm_npm_repository_href** | **String** | | |
|
|
840
|
+
| **nested_role** | [**NestedRole**](NestedRole.md) | | |
|
|
841
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
842
|
+
|
|
843
|
+
### Return type
|
|
844
|
+
|
|
845
|
+
[**NestedRoleResponse**](NestedRoleResponse.md)
|
|
846
|
+
|
|
847
|
+
### Authorization
|
|
848
|
+
|
|
849
|
+
[basicAuth](../README.md#basicAuth)
|
|
850
|
+
|
|
851
|
+
### HTTP request headers
|
|
852
|
+
|
|
853
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
|
854
|
+
- **Accept**: application/json
|
|
855
|
+
|
|
856
|
+
|
|
545
857
|
## set_label
|
|
546
858
|
|
|
547
859
|
> <SetLabelResponse> set_label(npm_npm_repository_href, set_label, opts)
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **add_content_units** | **Array<String>** | A list of content units to add to a new repository version. This content is added after remove_content_units are removed. | [optional] |
|
|
8
8
|
| **remove_content_units** | **Array<String>** | A list of content units to remove from the latest repository version. You may also specify '*' as an entry to remove all content. This content is removed before add_content_units are added. | [optional] |
|
|
9
9
|
| **base_version** | **String** | A repository version whose content will be used as the initial set of content for the new repository version | [optional] |
|
|
10
|
+
| **overwrite** | **Boolean** | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Defaults to true. | [optional][default to true] |
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ require 'pulp_npm_client'
|
|
|
16
17
|
instance = PulpNpmClient::RepositoryAddRemoveContent.new(
|
|
17
18
|
add_content_units: null,
|
|
18
19
|
remove_content_units: null,
|
|
19
|
-
base_version: null
|
|
20
|
+
base_version: null,
|
|
21
|
+
overwrite: null
|
|
20
22
|
)
|
|
21
23
|
```
|
|
22
24
|
|