crc-pulp-npm-client 20250819.1__py3-none-any.whl

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.

Potentially problematic release.


This version of crc-pulp-npm-client might be problematic. Click here for more details.

Files changed (86) hide show
  1. crc-pulp_npm-client/__init__.py +2 -0
  2. crc-pulp_npm-client/api/__init__.py +9 -0
  3. crc-pulp_npm-client/api/content_packages_api.py +1964 -0
  4. crc-pulp_npm-client/api/distributions_npm_api.py +2934 -0
  5. crc-pulp_npm-client/api/remotes_npm_api.py +2962 -0
  6. crc-pulp_npm-client/api/repositories_npm_api.py +3604 -0
  7. crc-pulp_npm-client/api/repositories_npm_versions_api.py +1670 -0
  8. crc-pulp_npm-client/api_client.py +798 -0
  9. crc-pulp_npm-client/api_response.py +21 -0
  10. crc-pulp_npm-client/configuration.py +628 -0
  11. crc-pulp_npm-client/exceptions.py +200 -0
  12. crc-pulp_npm-client/models/__init__.py +44 -0
  13. crc-pulp_npm-client/models/async_operation_response.py +88 -0
  14. crc-pulp_npm-client/models/content_summary_response.py +92 -0
  15. crc-pulp_npm-client/models/npm_npm_distribution.py +116 -0
  16. crc-pulp_npm-client/models/npm_npm_distribution_response.py +140 -0
  17. crc-pulp_npm-client/models/npm_npm_remote.py +205 -0
  18. crc-pulp_npm-client/models/npm_npm_remote_response.py +199 -0
  19. crc-pulp_npm-client/models/npm_npm_remote_response_hidden_fields_inner.py +90 -0
  20. crc-pulp_npm-client/models/npm_npm_repository.py +112 -0
  21. crc-pulp_npm-client/models/npm_npm_repository_response.py +137 -0
  22. crc-pulp_npm-client/models/npm_package_response.py +113 -0
  23. crc-pulp_npm-client/models/paginated_repository_version_response_list.py +112 -0
  24. crc-pulp_npm-client/models/paginatednpm_npm_distribution_response_list.py +112 -0
  25. crc-pulp_npm-client/models/paginatednpm_npm_remote_response_list.py +112 -0
  26. crc-pulp_npm-client/models/paginatednpm_npm_repository_response_list.py +112 -0
  27. crc-pulp_npm-client/models/paginatednpm_package_response_list.py +112 -0
  28. crc-pulp_npm-client/models/patchednpm_npm_distribution.py +116 -0
  29. crc-pulp_npm-client/models/patchednpm_npm_remote.py +205 -0
  30. crc-pulp_npm-client/models/patchednpm_npm_repository.py +112 -0
  31. crc-pulp_npm-client/models/policy_enum.py +39 -0
  32. crc-pulp_npm-client/models/repair.py +88 -0
  33. crc-pulp_npm-client/models/repository_add_remove_content.py +93 -0
  34. crc-pulp_npm-client/models/repository_sync_url.py +90 -0
  35. crc-pulp_npm-client/models/repository_version_response.py +121 -0
  36. crc-pulp_npm-client/models/set_label.py +103 -0
  37. crc-pulp_npm-client/models/set_label_response.py +103 -0
  38. crc-pulp_npm-client/models/unset_label.py +96 -0
  39. crc-pulp_npm-client/models/unset_label_response.py +100 -0
  40. crc-pulp_npm-client/py.typed +0 -0
  41. crc-pulp_npm-client/rest.py +258 -0
  42. crc_pulp_npm_client-20250819.1.dist-info/METADATA +25 -0
  43. crc_pulp_npm_client-20250819.1.dist-info/RECORD +86 -0
  44. crc_pulp_npm_client-20250819.1.dist-info/WHEEL +5 -0
  45. crc_pulp_npm_client-20250819.1.dist-info/top_level.txt +2 -0
  46. services-pulp_npm-client/__init__.py +2 -0
  47. services-pulp_npm-client/api/__init__.py +9 -0
  48. services-pulp_npm-client/api/content_packages_api.py +1964 -0
  49. services-pulp_npm-client/api/distributions_npm_api.py +2934 -0
  50. services-pulp_npm-client/api/remotes_npm_api.py +2962 -0
  51. services-pulp_npm-client/api/repositories_npm_api.py +3604 -0
  52. services-pulp_npm-client/api/repositories_npm_versions_api.py +1670 -0
  53. services-pulp_npm-client/api_client.py +798 -0
  54. services-pulp_npm-client/api_response.py +21 -0
  55. services-pulp_npm-client/configuration.py +628 -0
  56. services-pulp_npm-client/exceptions.py +200 -0
  57. services-pulp_npm-client/models/__init__.py +44 -0
  58. services-pulp_npm-client/models/async_operation_response.py +88 -0
  59. services-pulp_npm-client/models/content_summary_response.py +92 -0
  60. services-pulp_npm-client/models/npm_npm_distribution.py +116 -0
  61. services-pulp_npm-client/models/npm_npm_distribution_response.py +140 -0
  62. services-pulp_npm-client/models/npm_npm_remote.py +205 -0
  63. services-pulp_npm-client/models/npm_npm_remote_response.py +199 -0
  64. services-pulp_npm-client/models/npm_npm_remote_response_hidden_fields_inner.py +90 -0
  65. services-pulp_npm-client/models/npm_npm_repository.py +112 -0
  66. services-pulp_npm-client/models/npm_npm_repository_response.py +137 -0
  67. services-pulp_npm-client/models/npm_package_response.py +113 -0
  68. services-pulp_npm-client/models/paginated_repository_version_response_list.py +112 -0
  69. services-pulp_npm-client/models/paginatednpm_npm_distribution_response_list.py +112 -0
  70. services-pulp_npm-client/models/paginatednpm_npm_remote_response_list.py +112 -0
  71. services-pulp_npm-client/models/paginatednpm_npm_repository_response_list.py +112 -0
  72. services-pulp_npm-client/models/paginatednpm_package_response_list.py +112 -0
  73. services-pulp_npm-client/models/patchednpm_npm_distribution.py +116 -0
  74. services-pulp_npm-client/models/patchednpm_npm_remote.py +205 -0
  75. services-pulp_npm-client/models/patchednpm_npm_repository.py +112 -0
  76. services-pulp_npm-client/models/policy_enum.py +39 -0
  77. services-pulp_npm-client/models/repair.py +88 -0
  78. services-pulp_npm-client/models/repository_add_remove_content.py +93 -0
  79. services-pulp_npm-client/models/repository_sync_url.py +90 -0
  80. services-pulp_npm-client/models/repository_version_response.py +121 -0
  81. services-pulp_npm-client/models/set_label.py +103 -0
  82. services-pulp_npm-client/models/set_label_response.py +103 -0
  83. services-pulp_npm-client/models/unset_label.py +96 -0
  84. services-pulp_npm-client/models/unset_label_response.py +100 -0
  85. services-pulp_npm-client/py.typed +0 -0
  86. services-pulp_npm-client/rest.py +258 -0
@@ -0,0 +1,1670 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from datetime import datetime
21
+ from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
22
+ from typing import List, Optional
23
+ from typing_extensions import Annotated
24
+ from crc-pulp_npm-client.models.async_operation_response import AsyncOperationResponse
25
+ from crc-pulp_npm-client.models.paginated_repository_version_response_list import PaginatedRepositoryVersionResponseList
26
+ from crc-pulp_npm-client.models.repair import Repair
27
+ from crc-pulp_npm-client.models.repository_version_response import RepositoryVersionResponse
28
+
29
+ from crc-pulp_npm-client.api_client import ApiClient, RequestSerialized
30
+ from crc-pulp_npm-client.api_response import ApiResponse
31
+ from crc-pulp_npm-client.rest import RESTResponseType
32
+
33
+
34
+ class RepositoriesNpmVersionsApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def delete(
49
+ self,
50
+ npm_npm_repository_version_href: StrictStr,
51
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
52
+ _request_timeout: Union[
53
+ None,
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Tuple[
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Annotated[StrictFloat, Field(gt=0)]
58
+ ]
59
+ ] = None,
60
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
61
+ _content_type: Optional[StrictStr] = None,
62
+ _headers: Optional[Dict[StrictStr, Any]] = None,
63
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
64
+ ) -> AsyncOperationResponse:
65
+ """Delete a repository version
66
+
67
+ Trigger an asynchronous task to delete a repository version.
68
+
69
+ :param npm_npm_repository_version_href: (required)
70
+ :type npm_npm_repository_version_href: str
71
+ :param x_task_diagnostics: List of profilers to use on tasks.
72
+ :type x_task_diagnostics: List[str]
73
+ :param _request_timeout: timeout setting for this request. If one
74
+ number provided, it will be total request
75
+ timeout. It can also be a pair (tuple) of
76
+ (connection, read) timeouts.
77
+ :type _request_timeout: int, tuple(int, int), optional
78
+ :param _request_auth: set to override the auth_settings for an a single
79
+ request; this effectively ignores the
80
+ authentication in the spec for a single request.
81
+ :type _request_auth: dict, optional
82
+ :param _content_type: force content-type for the request.
83
+ :type _content_type: str, Optional
84
+ :param _headers: set to override the headers for a single
85
+ request; this effectively ignores the headers
86
+ in the spec for a single request.
87
+ :type _headers: dict, optional
88
+ :param _host_index: set to override the host_index for a single
89
+ request; this effectively ignores the host_index
90
+ in the spec for a single request.
91
+ :type _host_index: int, optional
92
+ :return: Returns the result object.
93
+ """ # noqa: E501
94
+
95
+ _param = self._delete_serialize(
96
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
97
+ x_task_diagnostics=x_task_diagnostics,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '202': "AsyncOperationResponse",
106
+ }
107
+ response_data = self.api_client.call_api(
108
+ *_param,
109
+ _request_timeout=_request_timeout
110
+ )
111
+ response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+
118
+ @validate_call
119
+ def delete_with_http_info(
120
+ self,
121
+ npm_npm_repository_version_href: StrictStr,
122
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
123
+ _request_timeout: Union[
124
+ None,
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Tuple[
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Annotated[StrictFloat, Field(gt=0)]
129
+ ]
130
+ ] = None,
131
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
132
+ _content_type: Optional[StrictStr] = None,
133
+ _headers: Optional[Dict[StrictStr, Any]] = None,
134
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
135
+ ) -> ApiResponse[AsyncOperationResponse]:
136
+ """Delete a repository version
137
+
138
+ Trigger an asynchronous task to delete a repository version.
139
+
140
+ :param npm_npm_repository_version_href: (required)
141
+ :type npm_npm_repository_version_href: str
142
+ :param x_task_diagnostics: List of profilers to use on tasks.
143
+ :type x_task_diagnostics: List[str]
144
+ :param _request_timeout: timeout setting for this request. If one
145
+ number provided, it will be total request
146
+ timeout. It can also be a pair (tuple) of
147
+ (connection, read) timeouts.
148
+ :type _request_timeout: int, tuple(int, int), optional
149
+ :param _request_auth: set to override the auth_settings for an a single
150
+ request; this effectively ignores the
151
+ authentication in the spec for a single request.
152
+ :type _request_auth: dict, optional
153
+ :param _content_type: force content-type for the request.
154
+ :type _content_type: str, Optional
155
+ :param _headers: set to override the headers for a single
156
+ request; this effectively ignores the headers
157
+ in the spec for a single request.
158
+ :type _headers: dict, optional
159
+ :param _host_index: set to override the host_index for a single
160
+ request; this effectively ignores the host_index
161
+ in the spec for a single request.
162
+ :type _host_index: int, optional
163
+ :return: Returns the result object.
164
+ """ # noqa: E501
165
+
166
+ _param = self._delete_serialize(
167
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
168
+ x_task_diagnostics=x_task_diagnostics,
169
+ _request_auth=_request_auth,
170
+ _content_type=_content_type,
171
+ _headers=_headers,
172
+ _host_index=_host_index
173
+ )
174
+
175
+ _response_types_map: Dict[str, Optional[str]] = {
176
+ '202': "AsyncOperationResponse",
177
+ }
178
+ response_data = self.api_client.call_api(
179
+ *_param,
180
+ _request_timeout=_request_timeout
181
+ )
182
+ response_data.read()
183
+ return self.api_client.response_deserialize(
184
+ response_data=response_data,
185
+ response_types_map=_response_types_map,
186
+ )
187
+
188
+
189
+ @validate_call
190
+ def delete_without_preload_content(
191
+ self,
192
+ npm_npm_repository_version_href: StrictStr,
193
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
194
+ _request_timeout: Union[
195
+ None,
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Tuple[
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Annotated[StrictFloat, Field(gt=0)]
200
+ ]
201
+ ] = None,
202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
203
+ _content_type: Optional[StrictStr] = None,
204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
+ ) -> RESTResponseType:
207
+ """Delete a repository version
208
+
209
+ Trigger an asynchronous task to delete a repository version.
210
+
211
+ :param npm_npm_repository_version_href: (required)
212
+ :type npm_npm_repository_version_href: str
213
+ :param x_task_diagnostics: List of profilers to use on tasks.
214
+ :type x_task_diagnostics: List[str]
215
+ :param _request_timeout: timeout setting for this request. If one
216
+ number provided, it will be total request
217
+ timeout. It can also be a pair (tuple) of
218
+ (connection, read) timeouts.
219
+ :type _request_timeout: int, tuple(int, int), optional
220
+ :param _request_auth: set to override the auth_settings for an a single
221
+ request; this effectively ignores the
222
+ authentication in the spec for a single request.
223
+ :type _request_auth: dict, optional
224
+ :param _content_type: force content-type for the request.
225
+ :type _content_type: str, Optional
226
+ :param _headers: set to override the headers for a single
227
+ request; this effectively ignores the headers
228
+ in the spec for a single request.
229
+ :type _headers: dict, optional
230
+ :param _host_index: set to override the host_index for a single
231
+ request; this effectively ignores the host_index
232
+ in the spec for a single request.
233
+ :type _host_index: int, optional
234
+ :return: Returns the result object.
235
+ """ # noqa: E501
236
+
237
+ _param = self._delete_serialize(
238
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
239
+ x_task_diagnostics=x_task_diagnostics,
240
+ _request_auth=_request_auth,
241
+ _content_type=_content_type,
242
+ _headers=_headers,
243
+ _host_index=_host_index
244
+ )
245
+
246
+ _response_types_map: Dict[str, Optional[str]] = {
247
+ '202': "AsyncOperationResponse",
248
+ }
249
+ response_data = self.api_client.call_api(
250
+ *_param,
251
+ _request_timeout=_request_timeout
252
+ )
253
+ return response_data.response
254
+
255
+
256
+ def _delete_serialize(
257
+ self,
258
+ npm_npm_repository_version_href,
259
+ x_task_diagnostics,
260
+ _request_auth,
261
+ _content_type,
262
+ _headers,
263
+ _host_index,
264
+ ) -> RequestSerialized:
265
+
266
+ _host = None
267
+
268
+ _collection_formats: Dict[str, str] = {
269
+ 'X-Task-Diagnostics': 'csv',
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[
277
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
+ ] = {}
279
+ _body_params: Optional[bytes] = None
280
+
281
+ # process the path parameters
282
+ if npm_npm_repository_version_href is not None:
283
+ _path_params['npm_npm_repository_version_href'] = npm_npm_repository_version_href
284
+ # process the query parameters
285
+ # process the header parameters
286
+ if x_task_diagnostics is not None:
287
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
288
+ # process the form parameters
289
+ # process the body parameter
290
+
291
+
292
+ # set the HTTP header `Accept`
293
+ if 'Accept' not in _header_params:
294
+ _header_params['Accept'] = self.api_client.select_header_accept(
295
+ [
296
+ 'application/json'
297
+ ]
298
+ )
299
+
300
+
301
+ # authentication setting
302
+ _auth_settings: List[str] = [
303
+ 'json_header_remote_authentication',
304
+ 'basicAuth',
305
+ 'cookieAuth'
306
+ ]
307
+
308
+ return self.api_client.param_serialize(
309
+ method='DELETE',
310
+ resource_path='{npm_npm_repository_version_href}',
311
+ path_params=_path_params,
312
+ query_params=_query_params,
313
+ header_params=_header_params,
314
+ body=_body_params,
315
+ post_params=_form_params,
316
+ files=_files,
317
+ auth_settings=_auth_settings,
318
+ collection_formats=_collection_formats,
319
+ _host=_host,
320
+ _request_auth=_request_auth
321
+ )
322
+
323
+
324
+
325
+
326
+ @validate_call
327
+ def list(
328
+ self,
329
+ npm_npm_repository_href: StrictStr,
330
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
331
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
332
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
333
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
334
+ number: Annotated[Optional[StrictInt], Field(description="Filter results where number matches value")] = None,
335
+ number__gt: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than value")] = None,
336
+ number__gte: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than or equal to value")] = None,
337
+ number__lt: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than value")] = None,
338
+ number__lte: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than or equal to value")] = None,
339
+ number__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where number is between two comma separated values")] = None,
340
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
341
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `content_ids` - Content ids * `-content_ids` - Content ids (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
342
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
343
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
344
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
345
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
346
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
347
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
348
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
349
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
350
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
351
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
352
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
353
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
354
+ _request_timeout: Union[
355
+ None,
356
+ Annotated[StrictFloat, Field(gt=0)],
357
+ Tuple[
358
+ Annotated[StrictFloat, Field(gt=0)],
359
+ Annotated[StrictFloat, Field(gt=0)]
360
+ ]
361
+ ] = None,
362
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
363
+ _content_type: Optional[StrictStr] = None,
364
+ _headers: Optional[Dict[StrictStr, Any]] = None,
365
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
366
+ ) -> PaginatedRepositoryVersionResponseList:
367
+ """List repository versions
368
+
369
+ A ViewSet for a NpmRepositoryVersion represents a single Npm repository version.
370
+
371
+ :param npm_npm_repository_href: (required)
372
+ :type npm_npm_repository_href: str
373
+ :param x_task_diagnostics: List of profilers to use on tasks.
374
+ :type x_task_diagnostics: List[str]
375
+ :param content: Content Unit referenced by HREF/PRN
376
+ :type content: str
377
+ :param content__in: Multiple values may be separated by commas.
378
+ :type content__in: List[str]
379
+ :param limit: Number of results to return per page.
380
+ :type limit: int
381
+ :param number: Filter results where number matches value
382
+ :type number: int
383
+ :param number__gt: Filter results where number is greater than value
384
+ :type number__gt: int
385
+ :param number__gte: Filter results where number is greater than or equal to value
386
+ :type number__gte: int
387
+ :param number__lt: Filter results where number is less than value
388
+ :type number__lt: int
389
+ :param number__lte: Filter results where number is less than or equal to value
390
+ :type number__lte: int
391
+ :param number__range: Filter results where number is between two comma separated values
392
+ :type number__range: List[int]
393
+ :param offset: The initial index from which to return the results.
394
+ :type offset: int
395
+ :param 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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `content_ids` - Content ids * `-content_ids` - Content ids (descending) * `pk` - Pk * `-pk` - Pk (descending)
396
+ :type ordering: List[str]
397
+ :param prn__in: Multiple values may be separated by commas.
398
+ :type prn__in: List[str]
399
+ :param pulp_created: Filter results where pulp_created matches value
400
+ :type pulp_created: datetime
401
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
402
+ :type pulp_created__gt: datetime
403
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
404
+ :type pulp_created__gte: datetime
405
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
406
+ :type pulp_created__isnull: bool
407
+ :param pulp_created__lt: Filter results where pulp_created is less than value
408
+ :type pulp_created__lt: datetime
409
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
410
+ :type pulp_created__lte: datetime
411
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
412
+ :type pulp_created__range: List[datetime]
413
+ :param pulp_href__in: Multiple values may be separated by commas.
414
+ :type pulp_href__in: List[str]
415
+ :param q: Filter results by using NOT, AND and OR operations on other filters
416
+ :type q: str
417
+ :param fields: A list of fields to include in the response.
418
+ :type fields: List[str]
419
+ :param exclude_fields: A list of fields to exclude from the response.
420
+ :type exclude_fields: List[str]
421
+ :param _request_timeout: timeout setting for this request. If one
422
+ number provided, it will be total request
423
+ timeout. It can also be a pair (tuple) of
424
+ (connection, read) timeouts.
425
+ :type _request_timeout: int, tuple(int, int), optional
426
+ :param _request_auth: set to override the auth_settings for an a single
427
+ request; this effectively ignores the
428
+ authentication in the spec for a single request.
429
+ :type _request_auth: dict, optional
430
+ :param _content_type: force content-type for the request.
431
+ :type _content_type: str, Optional
432
+ :param _headers: set to override the headers for a single
433
+ request; this effectively ignores the headers
434
+ in the spec for a single request.
435
+ :type _headers: dict, optional
436
+ :param _host_index: set to override the host_index for a single
437
+ request; this effectively ignores the host_index
438
+ in the spec for a single request.
439
+ :type _host_index: int, optional
440
+ :return: Returns the result object.
441
+ """ # noqa: E501
442
+
443
+ _param = self._list_serialize(
444
+ npm_npm_repository_href=npm_npm_repository_href,
445
+ x_task_diagnostics=x_task_diagnostics,
446
+ content=content,
447
+ content__in=content__in,
448
+ limit=limit,
449
+ number=number,
450
+ number__gt=number__gt,
451
+ number__gte=number__gte,
452
+ number__lt=number__lt,
453
+ number__lte=number__lte,
454
+ number__range=number__range,
455
+ offset=offset,
456
+ ordering=ordering,
457
+ prn__in=prn__in,
458
+ pulp_created=pulp_created,
459
+ pulp_created__gt=pulp_created__gt,
460
+ pulp_created__gte=pulp_created__gte,
461
+ pulp_created__isnull=pulp_created__isnull,
462
+ pulp_created__lt=pulp_created__lt,
463
+ pulp_created__lte=pulp_created__lte,
464
+ pulp_created__range=pulp_created__range,
465
+ pulp_href__in=pulp_href__in,
466
+ q=q,
467
+ fields=fields,
468
+ exclude_fields=exclude_fields,
469
+ _request_auth=_request_auth,
470
+ _content_type=_content_type,
471
+ _headers=_headers,
472
+ _host_index=_host_index
473
+ )
474
+
475
+ _response_types_map: Dict[str, Optional[str]] = {
476
+ '200': "PaginatedRepositoryVersionResponseList",
477
+ }
478
+ response_data = self.api_client.call_api(
479
+ *_param,
480
+ _request_timeout=_request_timeout
481
+ )
482
+ response_data.read()
483
+ return self.api_client.response_deserialize(
484
+ response_data=response_data,
485
+ response_types_map=_response_types_map,
486
+ ).data
487
+
488
+
489
+ @validate_call
490
+ def list_with_http_info(
491
+ self,
492
+ npm_npm_repository_href: StrictStr,
493
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
494
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
495
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
496
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
497
+ number: Annotated[Optional[StrictInt], Field(description="Filter results where number matches value")] = None,
498
+ number__gt: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than value")] = None,
499
+ number__gte: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than or equal to value")] = None,
500
+ number__lt: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than value")] = None,
501
+ number__lte: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than or equal to value")] = None,
502
+ number__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where number is between two comma separated values")] = None,
503
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
504
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `content_ids` - Content ids * `-content_ids` - Content ids (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
505
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
506
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
507
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
508
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
509
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
510
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
511
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
512
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
513
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
514
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
515
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
516
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
517
+ _request_timeout: Union[
518
+ None,
519
+ Annotated[StrictFloat, Field(gt=0)],
520
+ Tuple[
521
+ Annotated[StrictFloat, Field(gt=0)],
522
+ Annotated[StrictFloat, Field(gt=0)]
523
+ ]
524
+ ] = None,
525
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
526
+ _content_type: Optional[StrictStr] = None,
527
+ _headers: Optional[Dict[StrictStr, Any]] = None,
528
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
529
+ ) -> ApiResponse[PaginatedRepositoryVersionResponseList]:
530
+ """List repository versions
531
+
532
+ A ViewSet for a NpmRepositoryVersion represents a single Npm repository version.
533
+
534
+ :param npm_npm_repository_href: (required)
535
+ :type npm_npm_repository_href: str
536
+ :param x_task_diagnostics: List of profilers to use on tasks.
537
+ :type x_task_diagnostics: List[str]
538
+ :param content: Content Unit referenced by HREF/PRN
539
+ :type content: str
540
+ :param content__in: Multiple values may be separated by commas.
541
+ :type content__in: List[str]
542
+ :param limit: Number of results to return per page.
543
+ :type limit: int
544
+ :param number: Filter results where number matches value
545
+ :type number: int
546
+ :param number__gt: Filter results where number is greater than value
547
+ :type number__gt: int
548
+ :param number__gte: Filter results where number is greater than or equal to value
549
+ :type number__gte: int
550
+ :param number__lt: Filter results where number is less than value
551
+ :type number__lt: int
552
+ :param number__lte: Filter results where number is less than or equal to value
553
+ :type number__lte: int
554
+ :param number__range: Filter results where number is between two comma separated values
555
+ :type number__range: List[int]
556
+ :param offset: The initial index from which to return the results.
557
+ :type offset: int
558
+ :param 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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `content_ids` - Content ids * `-content_ids` - Content ids (descending) * `pk` - Pk * `-pk` - Pk (descending)
559
+ :type ordering: List[str]
560
+ :param prn__in: Multiple values may be separated by commas.
561
+ :type prn__in: List[str]
562
+ :param pulp_created: Filter results where pulp_created matches value
563
+ :type pulp_created: datetime
564
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
565
+ :type pulp_created__gt: datetime
566
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
567
+ :type pulp_created__gte: datetime
568
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
569
+ :type pulp_created__isnull: bool
570
+ :param pulp_created__lt: Filter results where pulp_created is less than value
571
+ :type pulp_created__lt: datetime
572
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
573
+ :type pulp_created__lte: datetime
574
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
575
+ :type pulp_created__range: List[datetime]
576
+ :param pulp_href__in: Multiple values may be separated by commas.
577
+ :type pulp_href__in: List[str]
578
+ :param q: Filter results by using NOT, AND and OR operations on other filters
579
+ :type q: str
580
+ :param fields: A list of fields to include in the response.
581
+ :type fields: List[str]
582
+ :param exclude_fields: A list of fields to exclude from the response.
583
+ :type exclude_fields: List[str]
584
+ :param _request_timeout: timeout setting for this request. If one
585
+ number provided, it will be total request
586
+ timeout. It can also be a pair (tuple) of
587
+ (connection, read) timeouts.
588
+ :type _request_timeout: int, tuple(int, int), optional
589
+ :param _request_auth: set to override the auth_settings for an a single
590
+ request; this effectively ignores the
591
+ authentication in the spec for a single request.
592
+ :type _request_auth: dict, optional
593
+ :param _content_type: force content-type for the request.
594
+ :type _content_type: str, Optional
595
+ :param _headers: set to override the headers for a single
596
+ request; this effectively ignores the headers
597
+ in the spec for a single request.
598
+ :type _headers: dict, optional
599
+ :param _host_index: set to override the host_index for a single
600
+ request; this effectively ignores the host_index
601
+ in the spec for a single request.
602
+ :type _host_index: int, optional
603
+ :return: Returns the result object.
604
+ """ # noqa: E501
605
+
606
+ _param = self._list_serialize(
607
+ npm_npm_repository_href=npm_npm_repository_href,
608
+ x_task_diagnostics=x_task_diagnostics,
609
+ content=content,
610
+ content__in=content__in,
611
+ limit=limit,
612
+ number=number,
613
+ number__gt=number__gt,
614
+ number__gte=number__gte,
615
+ number__lt=number__lt,
616
+ number__lte=number__lte,
617
+ number__range=number__range,
618
+ offset=offset,
619
+ ordering=ordering,
620
+ prn__in=prn__in,
621
+ pulp_created=pulp_created,
622
+ pulp_created__gt=pulp_created__gt,
623
+ pulp_created__gte=pulp_created__gte,
624
+ pulp_created__isnull=pulp_created__isnull,
625
+ pulp_created__lt=pulp_created__lt,
626
+ pulp_created__lte=pulp_created__lte,
627
+ pulp_created__range=pulp_created__range,
628
+ pulp_href__in=pulp_href__in,
629
+ q=q,
630
+ fields=fields,
631
+ exclude_fields=exclude_fields,
632
+ _request_auth=_request_auth,
633
+ _content_type=_content_type,
634
+ _headers=_headers,
635
+ _host_index=_host_index
636
+ )
637
+
638
+ _response_types_map: Dict[str, Optional[str]] = {
639
+ '200': "PaginatedRepositoryVersionResponseList",
640
+ }
641
+ response_data = self.api_client.call_api(
642
+ *_param,
643
+ _request_timeout=_request_timeout
644
+ )
645
+ response_data.read()
646
+ return self.api_client.response_deserialize(
647
+ response_data=response_data,
648
+ response_types_map=_response_types_map,
649
+ )
650
+
651
+
652
+ @validate_call
653
+ def list_without_preload_content(
654
+ self,
655
+ npm_npm_repository_href: StrictStr,
656
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
657
+ content: Annotated[Optional[StrictStr], Field(description="Content Unit referenced by HREF/PRN")] = None,
658
+ content__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
659
+ limit: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
660
+ number: Annotated[Optional[StrictInt], Field(description="Filter results where number matches value")] = None,
661
+ number__gt: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than value")] = None,
662
+ number__gte: Annotated[Optional[StrictInt], Field(description="Filter results where number is greater than or equal to value")] = None,
663
+ number__lt: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than value")] = None,
664
+ number__lte: Annotated[Optional[StrictInt], Field(description="Filter results where number is less than or equal to value")] = None,
665
+ number__range: Annotated[Optional[List[StrictInt]], Field(description="Filter results where number is between two comma separated values")] = None,
666
+ offset: Annotated[Optional[StrictInt], Field(description="The initial index from which to return the results.")] = None,
667
+ ordering: Annotated[Optional[List[StrictStr]], Field(description="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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `content_ids` - Content ids * `-content_ids` - Content ids (descending) * `pk` - Pk * `-pk` - Pk (descending)")] = None,
668
+ prn__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
669
+ pulp_created: Annotated[Optional[datetime], Field(description="Filter results where pulp_created matches value")] = None,
670
+ pulp_created__gt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than value")] = None,
671
+ pulp_created__gte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is greater than or equal to value")] = None,
672
+ pulp_created__isnull: Annotated[Optional[StrictBool], Field(description="Filter results where pulp_created has a null value")] = None,
673
+ pulp_created__lt: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than value")] = None,
674
+ pulp_created__lte: Annotated[Optional[datetime], Field(description="Filter results where pulp_created is less than or equal to value")] = None,
675
+ pulp_created__range: Annotated[Optional[List[datetime]], Field(description="Filter results where pulp_created is between two comma separated values")] = None,
676
+ pulp_href__in: Annotated[Optional[List[StrictStr]], Field(description="Multiple values may be separated by commas.")] = None,
677
+ q: Annotated[Optional[StrictStr], Field(description="Filter results by using NOT, AND and OR operations on other filters")] = None,
678
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
679
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
680
+ _request_timeout: Union[
681
+ None,
682
+ Annotated[StrictFloat, Field(gt=0)],
683
+ Tuple[
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Annotated[StrictFloat, Field(gt=0)]
686
+ ]
687
+ ] = None,
688
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
689
+ _content_type: Optional[StrictStr] = None,
690
+ _headers: Optional[Dict[StrictStr, Any]] = None,
691
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
692
+ ) -> RESTResponseType:
693
+ """List repository versions
694
+
695
+ A ViewSet for a NpmRepositoryVersion represents a single Npm repository version.
696
+
697
+ :param npm_npm_repository_href: (required)
698
+ :type npm_npm_repository_href: str
699
+ :param x_task_diagnostics: List of profilers to use on tasks.
700
+ :type x_task_diagnostics: List[str]
701
+ :param content: Content Unit referenced by HREF/PRN
702
+ :type content: str
703
+ :param content__in: Multiple values may be separated by commas.
704
+ :type content__in: List[str]
705
+ :param limit: Number of results to return per page.
706
+ :type limit: int
707
+ :param number: Filter results where number matches value
708
+ :type number: int
709
+ :param number__gt: Filter results where number is greater than value
710
+ :type number__gt: int
711
+ :param number__gte: Filter results where number is greater than or equal to value
712
+ :type number__gte: int
713
+ :param number__lt: Filter results where number is less than value
714
+ :type number__lt: int
715
+ :param number__lte: Filter results where number is less than or equal to value
716
+ :type number__lte: int
717
+ :param number__range: Filter results where number is between two comma separated values
718
+ :type number__range: List[int]
719
+ :param offset: The initial index from which to return the results.
720
+ :type offset: int
721
+ :param 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) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `content_ids` - Content ids * `-content_ids` - Content ids (descending) * `pk` - Pk * `-pk` - Pk (descending)
722
+ :type ordering: List[str]
723
+ :param prn__in: Multiple values may be separated by commas.
724
+ :type prn__in: List[str]
725
+ :param pulp_created: Filter results where pulp_created matches value
726
+ :type pulp_created: datetime
727
+ :param pulp_created__gt: Filter results where pulp_created is greater than value
728
+ :type pulp_created__gt: datetime
729
+ :param pulp_created__gte: Filter results where pulp_created is greater than or equal to value
730
+ :type pulp_created__gte: datetime
731
+ :param pulp_created__isnull: Filter results where pulp_created has a null value
732
+ :type pulp_created__isnull: bool
733
+ :param pulp_created__lt: Filter results where pulp_created is less than value
734
+ :type pulp_created__lt: datetime
735
+ :param pulp_created__lte: Filter results where pulp_created is less than or equal to value
736
+ :type pulp_created__lte: datetime
737
+ :param pulp_created__range: Filter results where pulp_created is between two comma separated values
738
+ :type pulp_created__range: List[datetime]
739
+ :param pulp_href__in: Multiple values may be separated by commas.
740
+ :type pulp_href__in: List[str]
741
+ :param q: Filter results by using NOT, AND and OR operations on other filters
742
+ :type q: str
743
+ :param fields: A list of fields to include in the response.
744
+ :type fields: List[str]
745
+ :param exclude_fields: A list of fields to exclude from the response.
746
+ :type exclude_fields: List[str]
747
+ :param _request_timeout: timeout setting for this request. If one
748
+ number provided, it will be total request
749
+ timeout. It can also be a pair (tuple) of
750
+ (connection, read) timeouts.
751
+ :type _request_timeout: int, tuple(int, int), optional
752
+ :param _request_auth: set to override the auth_settings for an a single
753
+ request; this effectively ignores the
754
+ authentication in the spec for a single request.
755
+ :type _request_auth: dict, optional
756
+ :param _content_type: force content-type for the request.
757
+ :type _content_type: str, Optional
758
+ :param _headers: set to override the headers for a single
759
+ request; this effectively ignores the headers
760
+ in the spec for a single request.
761
+ :type _headers: dict, optional
762
+ :param _host_index: set to override the host_index for a single
763
+ request; this effectively ignores the host_index
764
+ in the spec for a single request.
765
+ :type _host_index: int, optional
766
+ :return: Returns the result object.
767
+ """ # noqa: E501
768
+
769
+ _param = self._list_serialize(
770
+ npm_npm_repository_href=npm_npm_repository_href,
771
+ x_task_diagnostics=x_task_diagnostics,
772
+ content=content,
773
+ content__in=content__in,
774
+ limit=limit,
775
+ number=number,
776
+ number__gt=number__gt,
777
+ number__gte=number__gte,
778
+ number__lt=number__lt,
779
+ number__lte=number__lte,
780
+ number__range=number__range,
781
+ offset=offset,
782
+ ordering=ordering,
783
+ prn__in=prn__in,
784
+ pulp_created=pulp_created,
785
+ pulp_created__gt=pulp_created__gt,
786
+ pulp_created__gte=pulp_created__gte,
787
+ pulp_created__isnull=pulp_created__isnull,
788
+ pulp_created__lt=pulp_created__lt,
789
+ pulp_created__lte=pulp_created__lte,
790
+ pulp_created__range=pulp_created__range,
791
+ pulp_href__in=pulp_href__in,
792
+ q=q,
793
+ fields=fields,
794
+ exclude_fields=exclude_fields,
795
+ _request_auth=_request_auth,
796
+ _content_type=_content_type,
797
+ _headers=_headers,
798
+ _host_index=_host_index
799
+ )
800
+
801
+ _response_types_map: Dict[str, Optional[str]] = {
802
+ '200': "PaginatedRepositoryVersionResponseList",
803
+ }
804
+ response_data = self.api_client.call_api(
805
+ *_param,
806
+ _request_timeout=_request_timeout
807
+ )
808
+ return response_data.response
809
+
810
+
811
+ def _list_serialize(
812
+ self,
813
+ npm_npm_repository_href,
814
+ x_task_diagnostics,
815
+ content,
816
+ content__in,
817
+ limit,
818
+ number,
819
+ number__gt,
820
+ number__gte,
821
+ number__lt,
822
+ number__lte,
823
+ number__range,
824
+ offset,
825
+ ordering,
826
+ prn__in,
827
+ pulp_created,
828
+ pulp_created__gt,
829
+ pulp_created__gte,
830
+ pulp_created__isnull,
831
+ pulp_created__lt,
832
+ pulp_created__lte,
833
+ pulp_created__range,
834
+ pulp_href__in,
835
+ q,
836
+ fields,
837
+ exclude_fields,
838
+ _request_auth,
839
+ _content_type,
840
+ _headers,
841
+ _host_index,
842
+ ) -> RequestSerialized:
843
+
844
+ _host = None
845
+
846
+ _collection_formats: Dict[str, str] = {
847
+ 'X-Task-Diagnostics': 'csv',
848
+ 'content__in': 'csv',
849
+ 'number__range': 'csv',
850
+ 'ordering': 'csv',
851
+ 'prn__in': 'csv',
852
+ 'pulp_created__range': 'csv',
853
+ 'pulp_href__in': 'csv',
854
+ 'fields': 'multi',
855
+ 'exclude_fields': 'multi',
856
+ }
857
+
858
+ _path_params: Dict[str, str] = {}
859
+ _query_params: List[Tuple[str, str]] = []
860
+ _header_params: Dict[str, Optional[str]] = _headers or {}
861
+ _form_params: List[Tuple[str, str]] = []
862
+ _files: Dict[
863
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
864
+ ] = {}
865
+ _body_params: Optional[bytes] = None
866
+
867
+ # process the path parameters
868
+ if npm_npm_repository_href is not None:
869
+ _path_params['npm_npm_repository_href'] = npm_npm_repository_href
870
+ # process the query parameters
871
+ if content is not None:
872
+
873
+ _query_params.append(('content', content))
874
+
875
+ if content__in is not None:
876
+
877
+ _query_params.append(('content__in', content__in))
878
+
879
+ if limit is not None:
880
+
881
+ _query_params.append(('limit', limit))
882
+
883
+ if number is not None:
884
+
885
+ _query_params.append(('number', number))
886
+
887
+ if number__gt is not None:
888
+
889
+ _query_params.append(('number__gt', number__gt))
890
+
891
+ if number__gte is not None:
892
+
893
+ _query_params.append(('number__gte', number__gte))
894
+
895
+ if number__lt is not None:
896
+
897
+ _query_params.append(('number__lt', number__lt))
898
+
899
+ if number__lte is not None:
900
+
901
+ _query_params.append(('number__lte', number__lte))
902
+
903
+ if number__range is not None:
904
+
905
+ _query_params.append(('number__range', number__range))
906
+
907
+ if offset is not None:
908
+
909
+ _query_params.append(('offset', offset))
910
+
911
+ if ordering is not None:
912
+
913
+ _query_params.append(('ordering', ordering))
914
+
915
+ if prn__in is not None:
916
+
917
+ _query_params.append(('prn__in', prn__in))
918
+
919
+ if pulp_created is not None:
920
+ if isinstance(pulp_created, datetime):
921
+ _query_params.append(
922
+ (
923
+ 'pulp_created',
924
+ pulp_created.strftime(
925
+ self.api_client.configuration.datetime_format
926
+ )
927
+ )
928
+ )
929
+ else:
930
+ _query_params.append(('pulp_created', pulp_created))
931
+
932
+ if pulp_created__gt is not None:
933
+ if isinstance(pulp_created__gt, datetime):
934
+ _query_params.append(
935
+ (
936
+ 'pulp_created__gt',
937
+ pulp_created__gt.strftime(
938
+ self.api_client.configuration.datetime_format
939
+ )
940
+ )
941
+ )
942
+ else:
943
+ _query_params.append(('pulp_created__gt', pulp_created__gt))
944
+
945
+ if pulp_created__gte is not None:
946
+ if isinstance(pulp_created__gte, datetime):
947
+ _query_params.append(
948
+ (
949
+ 'pulp_created__gte',
950
+ pulp_created__gte.strftime(
951
+ self.api_client.configuration.datetime_format
952
+ )
953
+ )
954
+ )
955
+ else:
956
+ _query_params.append(('pulp_created__gte', pulp_created__gte))
957
+
958
+ if pulp_created__isnull is not None:
959
+
960
+ _query_params.append(('pulp_created__isnull', pulp_created__isnull))
961
+
962
+ if pulp_created__lt is not None:
963
+ if isinstance(pulp_created__lt, datetime):
964
+ _query_params.append(
965
+ (
966
+ 'pulp_created__lt',
967
+ pulp_created__lt.strftime(
968
+ self.api_client.configuration.datetime_format
969
+ )
970
+ )
971
+ )
972
+ else:
973
+ _query_params.append(('pulp_created__lt', pulp_created__lt))
974
+
975
+ if pulp_created__lte is not None:
976
+ if isinstance(pulp_created__lte, datetime):
977
+ _query_params.append(
978
+ (
979
+ 'pulp_created__lte',
980
+ pulp_created__lte.strftime(
981
+ self.api_client.configuration.datetime_format
982
+ )
983
+ )
984
+ )
985
+ else:
986
+ _query_params.append(('pulp_created__lte', pulp_created__lte))
987
+
988
+ if pulp_created__range is not None:
989
+
990
+ _query_params.append(('pulp_created__range', pulp_created__range))
991
+
992
+ if pulp_href__in is not None:
993
+
994
+ _query_params.append(('pulp_href__in', pulp_href__in))
995
+
996
+ if q is not None:
997
+
998
+ _query_params.append(('q', q))
999
+
1000
+ if fields is not None:
1001
+
1002
+ _query_params.append(('fields', fields))
1003
+
1004
+ if exclude_fields is not None:
1005
+
1006
+ _query_params.append(('exclude_fields', exclude_fields))
1007
+
1008
+ # process the header parameters
1009
+ if x_task_diagnostics is not None:
1010
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1011
+ # process the form parameters
1012
+ # process the body parameter
1013
+
1014
+
1015
+ # set the HTTP header `Accept`
1016
+ if 'Accept' not in _header_params:
1017
+ _header_params['Accept'] = self.api_client.select_header_accept(
1018
+ [
1019
+ 'application/json'
1020
+ ]
1021
+ )
1022
+
1023
+
1024
+ # authentication setting
1025
+ _auth_settings: List[str] = [
1026
+ 'json_header_remote_authentication',
1027
+ 'basicAuth',
1028
+ 'cookieAuth'
1029
+ ]
1030
+
1031
+ return self.api_client.param_serialize(
1032
+ method='GET',
1033
+ resource_path='{npm_npm_repository_href}versions/',
1034
+ path_params=_path_params,
1035
+ query_params=_query_params,
1036
+ header_params=_header_params,
1037
+ body=_body_params,
1038
+ post_params=_form_params,
1039
+ files=_files,
1040
+ auth_settings=_auth_settings,
1041
+ collection_formats=_collection_formats,
1042
+ _host=_host,
1043
+ _request_auth=_request_auth
1044
+ )
1045
+
1046
+
1047
+
1048
+
1049
+ @validate_call
1050
+ def read(
1051
+ self,
1052
+ npm_npm_repository_version_href: StrictStr,
1053
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1054
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1055
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1056
+ _request_timeout: Union[
1057
+ None,
1058
+ Annotated[StrictFloat, Field(gt=0)],
1059
+ Tuple[
1060
+ Annotated[StrictFloat, Field(gt=0)],
1061
+ Annotated[StrictFloat, Field(gt=0)]
1062
+ ]
1063
+ ] = None,
1064
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1065
+ _content_type: Optional[StrictStr] = None,
1066
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1067
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1068
+ ) -> RepositoryVersionResponse:
1069
+ """Inspect a repository version
1070
+
1071
+ A ViewSet for a NpmRepositoryVersion represents a single Npm repository version.
1072
+
1073
+ :param npm_npm_repository_version_href: (required)
1074
+ :type npm_npm_repository_version_href: str
1075
+ :param x_task_diagnostics: List of profilers to use on tasks.
1076
+ :type x_task_diagnostics: List[str]
1077
+ :param fields: A list of fields to include in the response.
1078
+ :type fields: List[str]
1079
+ :param exclude_fields: A list of fields to exclude from the response.
1080
+ :type exclude_fields: List[str]
1081
+ :param _request_timeout: timeout setting for this request. If one
1082
+ number provided, it will be total request
1083
+ timeout. It can also be a pair (tuple) of
1084
+ (connection, read) timeouts.
1085
+ :type _request_timeout: int, tuple(int, int), optional
1086
+ :param _request_auth: set to override the auth_settings for an a single
1087
+ request; this effectively ignores the
1088
+ authentication in the spec for a single request.
1089
+ :type _request_auth: dict, optional
1090
+ :param _content_type: force content-type for the request.
1091
+ :type _content_type: str, Optional
1092
+ :param _headers: set to override the headers for a single
1093
+ request; this effectively ignores the headers
1094
+ in the spec for a single request.
1095
+ :type _headers: dict, optional
1096
+ :param _host_index: set to override the host_index for a single
1097
+ request; this effectively ignores the host_index
1098
+ in the spec for a single request.
1099
+ :type _host_index: int, optional
1100
+ :return: Returns the result object.
1101
+ """ # noqa: E501
1102
+
1103
+ _param = self._read_serialize(
1104
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
1105
+ x_task_diagnostics=x_task_diagnostics,
1106
+ fields=fields,
1107
+ exclude_fields=exclude_fields,
1108
+ _request_auth=_request_auth,
1109
+ _content_type=_content_type,
1110
+ _headers=_headers,
1111
+ _host_index=_host_index
1112
+ )
1113
+
1114
+ _response_types_map: Dict[str, Optional[str]] = {
1115
+ '200': "RepositoryVersionResponse",
1116
+ }
1117
+ response_data = self.api_client.call_api(
1118
+ *_param,
1119
+ _request_timeout=_request_timeout
1120
+ )
1121
+ response_data.read()
1122
+ return self.api_client.response_deserialize(
1123
+ response_data=response_data,
1124
+ response_types_map=_response_types_map,
1125
+ ).data
1126
+
1127
+
1128
+ @validate_call
1129
+ def read_with_http_info(
1130
+ self,
1131
+ npm_npm_repository_version_href: StrictStr,
1132
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1133
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1134
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1135
+ _request_timeout: Union[
1136
+ None,
1137
+ Annotated[StrictFloat, Field(gt=0)],
1138
+ Tuple[
1139
+ Annotated[StrictFloat, Field(gt=0)],
1140
+ Annotated[StrictFloat, Field(gt=0)]
1141
+ ]
1142
+ ] = None,
1143
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1144
+ _content_type: Optional[StrictStr] = None,
1145
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1146
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1147
+ ) -> ApiResponse[RepositoryVersionResponse]:
1148
+ """Inspect a repository version
1149
+
1150
+ A ViewSet for a NpmRepositoryVersion represents a single Npm repository version.
1151
+
1152
+ :param npm_npm_repository_version_href: (required)
1153
+ :type npm_npm_repository_version_href: str
1154
+ :param x_task_diagnostics: List of profilers to use on tasks.
1155
+ :type x_task_diagnostics: List[str]
1156
+ :param fields: A list of fields to include in the response.
1157
+ :type fields: List[str]
1158
+ :param exclude_fields: A list of fields to exclude from the response.
1159
+ :type exclude_fields: List[str]
1160
+ :param _request_timeout: timeout setting for this request. If one
1161
+ number provided, it will be total request
1162
+ timeout. It can also be a pair (tuple) of
1163
+ (connection, read) timeouts.
1164
+ :type _request_timeout: int, tuple(int, int), optional
1165
+ :param _request_auth: set to override the auth_settings for an a single
1166
+ request; this effectively ignores the
1167
+ authentication in the spec for a single request.
1168
+ :type _request_auth: dict, optional
1169
+ :param _content_type: force content-type for the request.
1170
+ :type _content_type: str, Optional
1171
+ :param _headers: set to override the headers for a single
1172
+ request; this effectively ignores the headers
1173
+ in the spec for a single request.
1174
+ :type _headers: dict, optional
1175
+ :param _host_index: set to override the host_index for a single
1176
+ request; this effectively ignores the host_index
1177
+ in the spec for a single request.
1178
+ :type _host_index: int, optional
1179
+ :return: Returns the result object.
1180
+ """ # noqa: E501
1181
+
1182
+ _param = self._read_serialize(
1183
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
1184
+ x_task_diagnostics=x_task_diagnostics,
1185
+ fields=fields,
1186
+ exclude_fields=exclude_fields,
1187
+ _request_auth=_request_auth,
1188
+ _content_type=_content_type,
1189
+ _headers=_headers,
1190
+ _host_index=_host_index
1191
+ )
1192
+
1193
+ _response_types_map: Dict[str, Optional[str]] = {
1194
+ '200': "RepositoryVersionResponse",
1195
+ }
1196
+ response_data = self.api_client.call_api(
1197
+ *_param,
1198
+ _request_timeout=_request_timeout
1199
+ )
1200
+ response_data.read()
1201
+ return self.api_client.response_deserialize(
1202
+ response_data=response_data,
1203
+ response_types_map=_response_types_map,
1204
+ )
1205
+
1206
+
1207
+ @validate_call
1208
+ def read_without_preload_content(
1209
+ self,
1210
+ npm_npm_repository_version_href: StrictStr,
1211
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1212
+ fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to include in the response.")] = None,
1213
+ exclude_fields: Annotated[Optional[List[StrictStr]], Field(description="A list of fields to exclude from the response.")] = None,
1214
+ _request_timeout: Union[
1215
+ None,
1216
+ Annotated[StrictFloat, Field(gt=0)],
1217
+ Tuple[
1218
+ Annotated[StrictFloat, Field(gt=0)],
1219
+ Annotated[StrictFloat, Field(gt=0)]
1220
+ ]
1221
+ ] = None,
1222
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1223
+ _content_type: Optional[StrictStr] = None,
1224
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1225
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1226
+ ) -> RESTResponseType:
1227
+ """Inspect a repository version
1228
+
1229
+ A ViewSet for a NpmRepositoryVersion represents a single Npm repository version.
1230
+
1231
+ :param npm_npm_repository_version_href: (required)
1232
+ :type npm_npm_repository_version_href: str
1233
+ :param x_task_diagnostics: List of profilers to use on tasks.
1234
+ :type x_task_diagnostics: List[str]
1235
+ :param fields: A list of fields to include in the response.
1236
+ :type fields: List[str]
1237
+ :param exclude_fields: A list of fields to exclude from the response.
1238
+ :type exclude_fields: List[str]
1239
+ :param _request_timeout: timeout setting for this request. If one
1240
+ number provided, it will be total request
1241
+ timeout. It can also be a pair (tuple) of
1242
+ (connection, read) timeouts.
1243
+ :type _request_timeout: int, tuple(int, int), optional
1244
+ :param _request_auth: set to override the auth_settings for an a single
1245
+ request; this effectively ignores the
1246
+ authentication in the spec for a single request.
1247
+ :type _request_auth: dict, optional
1248
+ :param _content_type: force content-type for the request.
1249
+ :type _content_type: str, Optional
1250
+ :param _headers: set to override the headers for a single
1251
+ request; this effectively ignores the headers
1252
+ in the spec for a single request.
1253
+ :type _headers: dict, optional
1254
+ :param _host_index: set to override the host_index for a single
1255
+ request; this effectively ignores the host_index
1256
+ in the spec for a single request.
1257
+ :type _host_index: int, optional
1258
+ :return: Returns the result object.
1259
+ """ # noqa: E501
1260
+
1261
+ _param = self._read_serialize(
1262
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
1263
+ x_task_diagnostics=x_task_diagnostics,
1264
+ fields=fields,
1265
+ exclude_fields=exclude_fields,
1266
+ _request_auth=_request_auth,
1267
+ _content_type=_content_type,
1268
+ _headers=_headers,
1269
+ _host_index=_host_index
1270
+ )
1271
+
1272
+ _response_types_map: Dict[str, Optional[str]] = {
1273
+ '200': "RepositoryVersionResponse",
1274
+ }
1275
+ response_data = self.api_client.call_api(
1276
+ *_param,
1277
+ _request_timeout=_request_timeout
1278
+ )
1279
+ return response_data.response
1280
+
1281
+
1282
+ def _read_serialize(
1283
+ self,
1284
+ npm_npm_repository_version_href,
1285
+ x_task_diagnostics,
1286
+ fields,
1287
+ exclude_fields,
1288
+ _request_auth,
1289
+ _content_type,
1290
+ _headers,
1291
+ _host_index,
1292
+ ) -> RequestSerialized:
1293
+
1294
+ _host = None
1295
+
1296
+ _collection_formats: Dict[str, str] = {
1297
+ 'X-Task-Diagnostics': 'csv',
1298
+ 'fields': 'multi',
1299
+ 'exclude_fields': 'multi',
1300
+ }
1301
+
1302
+ _path_params: Dict[str, str] = {}
1303
+ _query_params: List[Tuple[str, str]] = []
1304
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1305
+ _form_params: List[Tuple[str, str]] = []
1306
+ _files: Dict[
1307
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1308
+ ] = {}
1309
+ _body_params: Optional[bytes] = None
1310
+
1311
+ # process the path parameters
1312
+ if npm_npm_repository_version_href is not None:
1313
+ _path_params['npm_npm_repository_version_href'] = npm_npm_repository_version_href
1314
+ # process the query parameters
1315
+ if fields is not None:
1316
+
1317
+ _query_params.append(('fields', fields))
1318
+
1319
+ if exclude_fields is not None:
1320
+
1321
+ _query_params.append(('exclude_fields', exclude_fields))
1322
+
1323
+ # process the header parameters
1324
+ if x_task_diagnostics is not None:
1325
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1326
+ # process the form parameters
1327
+ # process the body parameter
1328
+
1329
+
1330
+ # set the HTTP header `Accept`
1331
+ if 'Accept' not in _header_params:
1332
+ _header_params['Accept'] = self.api_client.select_header_accept(
1333
+ [
1334
+ 'application/json'
1335
+ ]
1336
+ )
1337
+
1338
+
1339
+ # authentication setting
1340
+ _auth_settings: List[str] = [
1341
+ 'json_header_remote_authentication',
1342
+ 'basicAuth',
1343
+ 'cookieAuth'
1344
+ ]
1345
+
1346
+ return self.api_client.param_serialize(
1347
+ method='GET',
1348
+ resource_path='{npm_npm_repository_version_href}',
1349
+ path_params=_path_params,
1350
+ query_params=_query_params,
1351
+ header_params=_header_params,
1352
+ body=_body_params,
1353
+ post_params=_form_params,
1354
+ files=_files,
1355
+ auth_settings=_auth_settings,
1356
+ collection_formats=_collection_formats,
1357
+ _host=_host,
1358
+ _request_auth=_request_auth
1359
+ )
1360
+
1361
+
1362
+
1363
+
1364
+ @validate_call
1365
+ def repair(
1366
+ self,
1367
+ npm_npm_repository_version_href: StrictStr,
1368
+ repair: Repair,
1369
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1370
+ _request_timeout: Union[
1371
+ None,
1372
+ Annotated[StrictFloat, Field(gt=0)],
1373
+ Tuple[
1374
+ Annotated[StrictFloat, Field(gt=0)],
1375
+ Annotated[StrictFloat, Field(gt=0)]
1376
+ ]
1377
+ ] = None,
1378
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1379
+ _content_type: Optional[StrictStr] = None,
1380
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1381
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1382
+ ) -> AsyncOperationResponse:
1383
+ """repair
1384
+
1385
+ Trigger an asynchronous task to repair a repository version.
1386
+
1387
+ :param npm_npm_repository_version_href: (required)
1388
+ :type npm_npm_repository_version_href: str
1389
+ :param repair: (required)
1390
+ :type repair: Repair
1391
+ :param x_task_diagnostics: List of profilers to use on tasks.
1392
+ :type x_task_diagnostics: List[str]
1393
+ :param _request_timeout: timeout setting for this request. If one
1394
+ number provided, it will be total request
1395
+ timeout. It can also be a pair (tuple) of
1396
+ (connection, read) timeouts.
1397
+ :type _request_timeout: int, tuple(int, int), optional
1398
+ :param _request_auth: set to override the auth_settings for an a single
1399
+ request; this effectively ignores the
1400
+ authentication in the spec for a single request.
1401
+ :type _request_auth: dict, optional
1402
+ :param _content_type: force content-type for the request.
1403
+ :type _content_type: str, Optional
1404
+ :param _headers: set to override the headers for a single
1405
+ request; this effectively ignores the headers
1406
+ in the spec for a single request.
1407
+ :type _headers: dict, optional
1408
+ :param _host_index: set to override the host_index for a single
1409
+ request; this effectively ignores the host_index
1410
+ in the spec for a single request.
1411
+ :type _host_index: int, optional
1412
+ :return: Returns the result object.
1413
+ """ # noqa: E501
1414
+
1415
+ _param = self._repair_serialize(
1416
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
1417
+ repair=repair,
1418
+ x_task_diagnostics=x_task_diagnostics,
1419
+ _request_auth=_request_auth,
1420
+ _content_type=_content_type,
1421
+ _headers=_headers,
1422
+ _host_index=_host_index
1423
+ )
1424
+
1425
+ _response_types_map: Dict[str, Optional[str]] = {
1426
+ '202': "AsyncOperationResponse",
1427
+ }
1428
+ response_data = self.api_client.call_api(
1429
+ *_param,
1430
+ _request_timeout=_request_timeout
1431
+ )
1432
+ response_data.read()
1433
+ return self.api_client.response_deserialize(
1434
+ response_data=response_data,
1435
+ response_types_map=_response_types_map,
1436
+ ).data
1437
+
1438
+
1439
+ @validate_call
1440
+ def repair_with_http_info(
1441
+ self,
1442
+ npm_npm_repository_version_href: StrictStr,
1443
+ repair: Repair,
1444
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1445
+ _request_timeout: Union[
1446
+ None,
1447
+ Annotated[StrictFloat, Field(gt=0)],
1448
+ Tuple[
1449
+ Annotated[StrictFloat, Field(gt=0)],
1450
+ Annotated[StrictFloat, Field(gt=0)]
1451
+ ]
1452
+ ] = None,
1453
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1454
+ _content_type: Optional[StrictStr] = None,
1455
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1456
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1457
+ ) -> ApiResponse[AsyncOperationResponse]:
1458
+ """repair
1459
+
1460
+ Trigger an asynchronous task to repair a repository version.
1461
+
1462
+ :param npm_npm_repository_version_href: (required)
1463
+ :type npm_npm_repository_version_href: str
1464
+ :param repair: (required)
1465
+ :type repair: Repair
1466
+ :param x_task_diagnostics: List of profilers to use on tasks.
1467
+ :type x_task_diagnostics: List[str]
1468
+ :param _request_timeout: timeout setting for this request. If one
1469
+ number provided, it will be total request
1470
+ timeout. It can also be a pair (tuple) of
1471
+ (connection, read) timeouts.
1472
+ :type _request_timeout: int, tuple(int, int), optional
1473
+ :param _request_auth: set to override the auth_settings for an a single
1474
+ request; this effectively ignores the
1475
+ authentication in the spec for a single request.
1476
+ :type _request_auth: dict, optional
1477
+ :param _content_type: force content-type for the request.
1478
+ :type _content_type: str, Optional
1479
+ :param _headers: set to override the headers for a single
1480
+ request; this effectively ignores the headers
1481
+ in the spec for a single request.
1482
+ :type _headers: dict, optional
1483
+ :param _host_index: set to override the host_index for a single
1484
+ request; this effectively ignores the host_index
1485
+ in the spec for a single request.
1486
+ :type _host_index: int, optional
1487
+ :return: Returns the result object.
1488
+ """ # noqa: E501
1489
+
1490
+ _param = self._repair_serialize(
1491
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
1492
+ repair=repair,
1493
+ x_task_diagnostics=x_task_diagnostics,
1494
+ _request_auth=_request_auth,
1495
+ _content_type=_content_type,
1496
+ _headers=_headers,
1497
+ _host_index=_host_index
1498
+ )
1499
+
1500
+ _response_types_map: Dict[str, Optional[str]] = {
1501
+ '202': "AsyncOperationResponse",
1502
+ }
1503
+ response_data = self.api_client.call_api(
1504
+ *_param,
1505
+ _request_timeout=_request_timeout
1506
+ )
1507
+ response_data.read()
1508
+ return self.api_client.response_deserialize(
1509
+ response_data=response_data,
1510
+ response_types_map=_response_types_map,
1511
+ )
1512
+
1513
+
1514
+ @validate_call
1515
+ def repair_without_preload_content(
1516
+ self,
1517
+ npm_npm_repository_version_href: StrictStr,
1518
+ repair: Repair,
1519
+ x_task_diagnostics: Annotated[Optional[List[StrictStr]], Field(description="List of profilers to use on tasks.")] = None,
1520
+ _request_timeout: Union[
1521
+ None,
1522
+ Annotated[StrictFloat, Field(gt=0)],
1523
+ Tuple[
1524
+ Annotated[StrictFloat, Field(gt=0)],
1525
+ Annotated[StrictFloat, Field(gt=0)]
1526
+ ]
1527
+ ] = None,
1528
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1529
+ _content_type: Optional[StrictStr] = None,
1530
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1531
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1532
+ ) -> RESTResponseType:
1533
+ """repair
1534
+
1535
+ Trigger an asynchronous task to repair a repository version.
1536
+
1537
+ :param npm_npm_repository_version_href: (required)
1538
+ :type npm_npm_repository_version_href: str
1539
+ :param repair: (required)
1540
+ :type repair: Repair
1541
+ :param x_task_diagnostics: List of profilers to use on tasks.
1542
+ :type x_task_diagnostics: List[str]
1543
+ :param _request_timeout: timeout setting for this request. If one
1544
+ number provided, it will be total request
1545
+ timeout. It can also be a pair (tuple) of
1546
+ (connection, read) timeouts.
1547
+ :type _request_timeout: int, tuple(int, int), optional
1548
+ :param _request_auth: set to override the auth_settings for an a single
1549
+ request; this effectively ignores the
1550
+ authentication in the spec for a single request.
1551
+ :type _request_auth: dict, optional
1552
+ :param _content_type: force content-type for the request.
1553
+ :type _content_type: str, Optional
1554
+ :param _headers: set to override the headers for a single
1555
+ request; this effectively ignores the headers
1556
+ in the spec for a single request.
1557
+ :type _headers: dict, optional
1558
+ :param _host_index: set to override the host_index for a single
1559
+ request; this effectively ignores the host_index
1560
+ in the spec for a single request.
1561
+ :type _host_index: int, optional
1562
+ :return: Returns the result object.
1563
+ """ # noqa: E501
1564
+
1565
+ _param = self._repair_serialize(
1566
+ npm_npm_repository_version_href=npm_npm_repository_version_href,
1567
+ repair=repair,
1568
+ x_task_diagnostics=x_task_diagnostics,
1569
+ _request_auth=_request_auth,
1570
+ _content_type=_content_type,
1571
+ _headers=_headers,
1572
+ _host_index=_host_index
1573
+ )
1574
+
1575
+ _response_types_map: Dict[str, Optional[str]] = {
1576
+ '202': "AsyncOperationResponse",
1577
+ }
1578
+ response_data = self.api_client.call_api(
1579
+ *_param,
1580
+ _request_timeout=_request_timeout
1581
+ )
1582
+ return response_data.response
1583
+
1584
+
1585
+ def _repair_serialize(
1586
+ self,
1587
+ npm_npm_repository_version_href,
1588
+ repair,
1589
+ x_task_diagnostics,
1590
+ _request_auth,
1591
+ _content_type,
1592
+ _headers,
1593
+ _host_index,
1594
+ ) -> RequestSerialized:
1595
+
1596
+ _host = None
1597
+
1598
+ _collection_formats: Dict[str, str] = {
1599
+ 'X-Task-Diagnostics': 'csv',
1600
+ }
1601
+
1602
+ _path_params: Dict[str, str] = {}
1603
+ _query_params: List[Tuple[str, str]] = []
1604
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1605
+ _form_params: List[Tuple[str, str]] = []
1606
+ _files: Dict[
1607
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1608
+ ] = {}
1609
+ _body_params: Optional[bytes] = None
1610
+
1611
+ # process the path parameters
1612
+ if npm_npm_repository_version_href is not None:
1613
+ _path_params['npm_npm_repository_version_href'] = npm_npm_repository_version_href
1614
+ # process the query parameters
1615
+ # process the header parameters
1616
+ if x_task_diagnostics is not None:
1617
+ _header_params['X-Task-Diagnostics'] = x_task_diagnostics
1618
+ # process the form parameters
1619
+ # process the body parameter
1620
+ if repair is not None:
1621
+ _body_params = repair
1622
+
1623
+
1624
+ # set the HTTP header `Accept`
1625
+ if 'Accept' not in _header_params:
1626
+ _header_params['Accept'] = self.api_client.select_header_accept(
1627
+ [
1628
+ 'application/json'
1629
+ ]
1630
+ )
1631
+
1632
+ # set the HTTP header `Content-Type`
1633
+ if _content_type:
1634
+ _header_params['Content-Type'] = _content_type
1635
+ else:
1636
+ _default_content_type = (
1637
+ self.api_client.select_header_content_type(
1638
+ [
1639
+ 'application/json',
1640
+ 'application/x-www-form-urlencoded',
1641
+ 'multipart/form-data'
1642
+ ]
1643
+ )
1644
+ )
1645
+ if _default_content_type is not None:
1646
+ _header_params['Content-Type'] = _default_content_type
1647
+
1648
+ # authentication setting
1649
+ _auth_settings: List[str] = [
1650
+ 'json_header_remote_authentication',
1651
+ 'basicAuth',
1652
+ 'cookieAuth'
1653
+ ]
1654
+
1655
+ return self.api_client.param_serialize(
1656
+ method='POST',
1657
+ resource_path='{npm_npm_repository_version_href}repair/',
1658
+ path_params=_path_params,
1659
+ query_params=_query_params,
1660
+ header_params=_header_params,
1661
+ body=_body_params,
1662
+ post_params=_form_params,
1663
+ files=_files,
1664
+ auth_settings=_auth_settings,
1665
+ collection_formats=_collection_formats,
1666
+ _host=_host,
1667
+ _request_auth=_request_auth
1668
+ )
1669
+
1670
+