lucius-mcp 0.1.0__py3-none-any.whl → 0.2.2__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.
Files changed (31) hide show
  1. {lucius_mcp-0.1.0.dist-info → lucius_mcp-0.2.2.dist-info}/METADATA +23 -2
  2. {lucius_mcp-0.1.0.dist-info → lucius_mcp-0.2.2.dist-info}/RECORD +29 -14
  3. src/client/client.py +105 -0
  4. src/client/generated/README.md +65 -7
  5. src/client/generated/__init__.py +16 -0
  6. src/client/generated/api/__init__.py +8 -0
  7. src/client/generated/api/custom_field_controller_api.py +2617 -0
  8. src/client/generated/api/custom_field_project_controller_api.py +2337 -0
  9. src/client/generated/api/custom_field_project_controller_v2_api.py +659 -0
  10. src/client/generated/api/custom_field_schema_controller_api.py +1710 -0
  11. src/client/generated/api/custom_field_value_controller_api.py +3106 -0
  12. src/client/generated/api/custom_field_value_project_controller_api.py +1835 -0
  13. src/client/generated/api/project_controller_api.py +2986 -0
  14. src/client/generated/api/status_controller_api.py +1780 -0
  15. src/client/generated/docs/CustomFieldControllerApi.md +616 -0
  16. src/client/generated/docs/CustomFieldProjectControllerApi.md +554 -0
  17. src/client/generated/docs/CustomFieldProjectControllerV2Api.md +149 -0
  18. src/client/generated/docs/CustomFieldSchemaControllerApi.md +421 -0
  19. src/client/generated/docs/CustomFieldValueControllerApi.md +723 -0
  20. src/client/generated/docs/CustomFieldValueProjectControllerApi.md +430 -0
  21. src/client/generated/docs/LaunchControllerApi.md +2 -2
  22. src/client/generated/docs/ProjectControllerApi.md +717 -0
  23. src/client/generated/docs/StatusControllerApi.md +429 -0
  24. src/services/test_case_service.py +92 -33
  25. src/tools/__init__.py +3 -0
  26. src/tools/get_custom_fields.py +48 -0
  27. src/client/refactor-hotspots.md +0 -53
  28. src/client/refactor-plan.md +0 -78
  29. {lucius_mcp-0.1.0.dist-info → lucius_mcp-0.2.2.dist-info}/WHEEL +0 -0
  30. {lucius_mcp-0.1.0.dist-info → lucius_mcp-0.2.2.dist-info}/entry_points.txt +0 -0
  31. {lucius_mcp-0.1.0.dist-info → lucius_mcp-0.2.2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,2337 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ allure-testops-service
5
+
6
+ Branch **HEAD** Commit **623f6ed302ba4b651cf9040faca4635af2d93b7c**
7
+
8
+ The version of the OpenAPI document: 25.4.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBool, StrictInt, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from src.client.generated.models.custom_field_project_dto import CustomFieldProjectDto
23
+ from src.client.generated.models.default_custom_field_value_dto import DefaultCustomFieldValueDto
24
+ from src.client.generated.models.id_and_name_only_dto import IdAndNameOnlyDto
25
+ from src.client.generated.models.list_selection_dto import ListSelectionDto
26
+ from src.client.generated.models.page_project_custom_field_dto import PageProjectCustomFieldDto
27
+ from src.client.generated.models.test_case_tree_selection_dto import TestCaseTreeSelectionDto
28
+
29
+ from src.client.generated.api_client import ApiClient, RequestSerialized
30
+ from src.client.generated.api_response import ApiResponse
31
+ from src.client.generated.rest import RESTResponseType
32
+
33
+
34
+ class CustomFieldProjectControllerApi:
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
+ async def add2(
49
+ self,
50
+ custom_field_id: StrictInt,
51
+ list_selection_dto: ListSelectionDto,
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
+ ) -> None:
65
+ """Add custom field to projects
66
+
67
+
68
+ :param custom_field_id: (required)
69
+ :type custom_field_id: int
70
+ :param list_selection_dto: (required)
71
+ :type list_selection_dto: ListSelectionDto
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._add2_serialize(
95
+ custom_field_id=custom_field_id,
96
+ list_selection_dto=list_selection_dto,
97
+ _request_auth=_request_auth,
98
+ _content_type=_content_type,
99
+ _headers=_headers,
100
+ _host_index=_host_index
101
+ )
102
+
103
+ _response_types_map: Dict[str, Optional[str]] = {
104
+ '202': None,
105
+ }
106
+ response_data = await self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ await response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ async def add2_with_http_info(
119
+ self,
120
+ custom_field_id: StrictInt,
121
+ list_selection_dto: ListSelectionDto,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Annotated[StrictFloat, Field(gt=0)]
128
+ ]
129
+ ] = None,
130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
131
+ _content_type: Optional[StrictStr] = None,
132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
+ ) -> ApiResponse[None]:
135
+ """Add custom field to projects
136
+
137
+
138
+ :param custom_field_id: (required)
139
+ :type custom_field_id: int
140
+ :param list_selection_dto: (required)
141
+ :type list_selection_dto: ListSelectionDto
142
+ :param _request_timeout: timeout setting for this request. If one
143
+ number provided, it will be total request
144
+ timeout. It can also be a pair (tuple) of
145
+ (connection, read) timeouts.
146
+ :type _request_timeout: int, tuple(int, int), optional
147
+ :param _request_auth: set to override the auth_settings for an a single
148
+ request; this effectively ignores the
149
+ authentication in the spec for a single request.
150
+ :type _request_auth: dict, optional
151
+ :param _content_type: force content-type for the request.
152
+ :type _content_type: str, Optional
153
+ :param _headers: set to override the headers for a single
154
+ request; this effectively ignores the headers
155
+ in the spec for a single request.
156
+ :type _headers: dict, optional
157
+ :param _host_index: set to override the host_index for a single
158
+ request; this effectively ignores the host_index
159
+ in the spec for a single request.
160
+ :type _host_index: int, optional
161
+ :return: Returns the result object.
162
+ """ # noqa: E501
163
+
164
+ _param = self._add2_serialize(
165
+ custom_field_id=custom_field_id,
166
+ list_selection_dto=list_selection_dto,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '202': None,
175
+ }
176
+ response_data = await self.api_client.call_api(
177
+ *_param,
178
+ _request_timeout=_request_timeout
179
+ )
180
+ await response_data.read()
181
+ return self.api_client.response_deserialize(
182
+ response_data=response_data,
183
+ response_types_map=_response_types_map,
184
+ )
185
+
186
+
187
+ @validate_call
188
+ async def add2_without_preload_content(
189
+ self,
190
+ custom_field_id: StrictInt,
191
+ list_selection_dto: ListSelectionDto,
192
+ _request_timeout: Union[
193
+ None,
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Tuple[
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Annotated[StrictFloat, Field(gt=0)]
198
+ ]
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """Add custom field to projects
206
+
207
+
208
+ :param custom_field_id: (required)
209
+ :type custom_field_id: int
210
+ :param list_selection_dto: (required)
211
+ :type list_selection_dto: ListSelectionDto
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._add2_serialize(
235
+ custom_field_id=custom_field_id,
236
+ list_selection_dto=list_selection_dto,
237
+ _request_auth=_request_auth,
238
+ _content_type=_content_type,
239
+ _headers=_headers,
240
+ _host_index=_host_index
241
+ )
242
+
243
+ _response_types_map: Dict[str, Optional[str]] = {
244
+ '202': None,
245
+ }
246
+ response_data = await self.api_client.call_api(
247
+ *_param,
248
+ _request_timeout=_request_timeout
249
+ )
250
+ return response_data.response
251
+
252
+
253
+ def _add2_serialize(
254
+ self,
255
+ custom_field_id,
256
+ list_selection_dto,
257
+ _request_auth,
258
+ _content_type,
259
+ _headers,
260
+ _host_index,
261
+ ) -> RequestSerialized:
262
+
263
+ _host = None
264
+
265
+ _collection_formats: Dict[str, str] = {
266
+ }
267
+
268
+ _path_params: Dict[str, str] = {}
269
+ _query_params: List[Tuple[str, str]] = []
270
+ _header_params: Dict[str, Optional[str]] = _headers or {}
271
+ _form_params: List[Tuple[str, str]] = []
272
+ _files: Dict[
273
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
274
+ ] = {}
275
+ _body_params: Optional[bytes] = None
276
+
277
+ # process the path parameters
278
+ # process the query parameters
279
+ if custom_field_id is not None:
280
+
281
+ _query_params.append(('customFieldId', custom_field_id))
282
+
283
+ # process the header parameters
284
+ # process the form parameters
285
+ # process the body parameter
286
+ if list_selection_dto is not None:
287
+ _body_params = list_selection_dto
288
+
289
+
290
+
291
+ # set the HTTP header `Content-Type`
292
+ if _content_type:
293
+ _header_params['Content-Type'] = _content_type
294
+ else:
295
+ _default_content_type = (
296
+ self.api_client.select_header_content_type(
297
+ [
298
+ 'application/json'
299
+ ]
300
+ )
301
+ )
302
+ if _default_content_type is not None:
303
+ _header_params['Content-Type'] = _default_content_type
304
+
305
+ # authentication setting
306
+ _auth_settings: List[str] = [
307
+ ]
308
+
309
+ return self.api_client.param_serialize(
310
+ method='POST',
311
+ resource_path='/api/cfproject/add',
312
+ path_params=_path_params,
313
+ query_params=_query_params,
314
+ header_params=_header_params,
315
+ body=_body_params,
316
+ post_params=_form_params,
317
+ files=_files,
318
+ auth_settings=_auth_settings,
319
+ collection_formats=_collection_formats,
320
+ _host=_host,
321
+ _request_auth=_request_auth
322
+ )
323
+
324
+
325
+
326
+
327
+ @validate_call
328
+ async def add_to_project(
329
+ self,
330
+ project_id: StrictInt,
331
+ list_selection_dto: ListSelectionDto,
332
+ _request_timeout: Union[
333
+ None,
334
+ Annotated[StrictFloat, Field(gt=0)],
335
+ Tuple[
336
+ Annotated[StrictFloat, Field(gt=0)],
337
+ Annotated[StrictFloat, Field(gt=0)]
338
+ ]
339
+ ] = None,
340
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
341
+ _content_type: Optional[StrictStr] = None,
342
+ _headers: Optional[Dict[StrictStr, Any]] = None,
343
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
344
+ ) -> None:
345
+ """Add custom fields to project
346
+
347
+
348
+ :param project_id: (required)
349
+ :type project_id: int
350
+ :param list_selection_dto: (required)
351
+ :type list_selection_dto: ListSelectionDto
352
+ :param _request_timeout: timeout setting for this request. If one
353
+ number provided, it will be total request
354
+ timeout. It can also be a pair (tuple) of
355
+ (connection, read) timeouts.
356
+ :type _request_timeout: int, tuple(int, int), optional
357
+ :param _request_auth: set to override the auth_settings for an a single
358
+ request; this effectively ignores the
359
+ authentication in the spec for a single request.
360
+ :type _request_auth: dict, optional
361
+ :param _content_type: force content-type for the request.
362
+ :type _content_type: str, Optional
363
+ :param _headers: set to override the headers for a single
364
+ request; this effectively ignores the headers
365
+ in the spec for a single request.
366
+ :type _headers: dict, optional
367
+ :param _host_index: set to override the host_index for a single
368
+ request; this effectively ignores the host_index
369
+ in the spec for a single request.
370
+ :type _host_index: int, optional
371
+ :return: Returns the result object.
372
+ """ # noqa: E501
373
+
374
+ _param = self._add_to_project_serialize(
375
+ project_id=project_id,
376
+ list_selection_dto=list_selection_dto,
377
+ _request_auth=_request_auth,
378
+ _content_type=_content_type,
379
+ _headers=_headers,
380
+ _host_index=_host_index
381
+ )
382
+
383
+ _response_types_map: Dict[str, Optional[str]] = {
384
+ '202': None,
385
+ }
386
+ response_data = await self.api_client.call_api(
387
+ *_param,
388
+ _request_timeout=_request_timeout
389
+ )
390
+ await response_data.read()
391
+ return self.api_client.response_deserialize(
392
+ response_data=response_data,
393
+ response_types_map=_response_types_map,
394
+ ).data
395
+
396
+
397
+ @validate_call
398
+ async def add_to_project_with_http_info(
399
+ self,
400
+ project_id: StrictInt,
401
+ list_selection_dto: ListSelectionDto,
402
+ _request_timeout: Union[
403
+ None,
404
+ Annotated[StrictFloat, Field(gt=0)],
405
+ Tuple[
406
+ Annotated[StrictFloat, Field(gt=0)],
407
+ Annotated[StrictFloat, Field(gt=0)]
408
+ ]
409
+ ] = None,
410
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
411
+ _content_type: Optional[StrictStr] = None,
412
+ _headers: Optional[Dict[StrictStr, Any]] = None,
413
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
414
+ ) -> ApiResponse[None]:
415
+ """Add custom fields to project
416
+
417
+
418
+ :param project_id: (required)
419
+ :type project_id: int
420
+ :param list_selection_dto: (required)
421
+ :type list_selection_dto: ListSelectionDto
422
+ :param _request_timeout: timeout setting for this request. If one
423
+ number provided, it will be total request
424
+ timeout. It can also be a pair (tuple) of
425
+ (connection, read) timeouts.
426
+ :type _request_timeout: int, tuple(int, int), optional
427
+ :param _request_auth: set to override the auth_settings for an a single
428
+ request; this effectively ignores the
429
+ authentication in the spec for a single request.
430
+ :type _request_auth: dict, optional
431
+ :param _content_type: force content-type for the request.
432
+ :type _content_type: str, Optional
433
+ :param _headers: set to override the headers for a single
434
+ request; this effectively ignores the headers
435
+ in the spec for a single request.
436
+ :type _headers: dict, optional
437
+ :param _host_index: set to override the host_index for a single
438
+ request; this effectively ignores the host_index
439
+ in the spec for a single request.
440
+ :type _host_index: int, optional
441
+ :return: Returns the result object.
442
+ """ # noqa: E501
443
+
444
+ _param = self._add_to_project_serialize(
445
+ project_id=project_id,
446
+ list_selection_dto=list_selection_dto,
447
+ _request_auth=_request_auth,
448
+ _content_type=_content_type,
449
+ _headers=_headers,
450
+ _host_index=_host_index
451
+ )
452
+
453
+ _response_types_map: Dict[str, Optional[str]] = {
454
+ '202': None,
455
+ }
456
+ response_data = await self.api_client.call_api(
457
+ *_param,
458
+ _request_timeout=_request_timeout
459
+ )
460
+ await response_data.read()
461
+ return self.api_client.response_deserialize(
462
+ response_data=response_data,
463
+ response_types_map=_response_types_map,
464
+ )
465
+
466
+
467
+ @validate_call
468
+ async def add_to_project_without_preload_content(
469
+ self,
470
+ project_id: StrictInt,
471
+ list_selection_dto: ListSelectionDto,
472
+ _request_timeout: Union[
473
+ None,
474
+ Annotated[StrictFloat, Field(gt=0)],
475
+ Tuple[
476
+ Annotated[StrictFloat, Field(gt=0)],
477
+ Annotated[StrictFloat, Field(gt=0)]
478
+ ]
479
+ ] = None,
480
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
481
+ _content_type: Optional[StrictStr] = None,
482
+ _headers: Optional[Dict[StrictStr, Any]] = None,
483
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
484
+ ) -> RESTResponseType:
485
+ """Add custom fields to project
486
+
487
+
488
+ :param project_id: (required)
489
+ :type project_id: int
490
+ :param list_selection_dto: (required)
491
+ :type list_selection_dto: ListSelectionDto
492
+ :param _request_timeout: timeout setting for this request. If one
493
+ number provided, it will be total request
494
+ timeout. It can also be a pair (tuple) of
495
+ (connection, read) timeouts.
496
+ :type _request_timeout: int, tuple(int, int), optional
497
+ :param _request_auth: set to override the auth_settings for an a single
498
+ request; this effectively ignores the
499
+ authentication in the spec for a single request.
500
+ :type _request_auth: dict, optional
501
+ :param _content_type: force content-type for the request.
502
+ :type _content_type: str, Optional
503
+ :param _headers: set to override the headers for a single
504
+ request; this effectively ignores the headers
505
+ in the spec for a single request.
506
+ :type _headers: dict, optional
507
+ :param _host_index: set to override the host_index for a single
508
+ request; this effectively ignores the host_index
509
+ in the spec for a single request.
510
+ :type _host_index: int, optional
511
+ :return: Returns the result object.
512
+ """ # noqa: E501
513
+
514
+ _param = self._add_to_project_serialize(
515
+ project_id=project_id,
516
+ list_selection_dto=list_selection_dto,
517
+ _request_auth=_request_auth,
518
+ _content_type=_content_type,
519
+ _headers=_headers,
520
+ _host_index=_host_index
521
+ )
522
+
523
+ _response_types_map: Dict[str, Optional[str]] = {
524
+ '202': None,
525
+ }
526
+ response_data = await self.api_client.call_api(
527
+ *_param,
528
+ _request_timeout=_request_timeout
529
+ )
530
+ return response_data.response
531
+
532
+
533
+ def _add_to_project_serialize(
534
+ self,
535
+ project_id,
536
+ list_selection_dto,
537
+ _request_auth,
538
+ _content_type,
539
+ _headers,
540
+ _host_index,
541
+ ) -> RequestSerialized:
542
+
543
+ _host = None
544
+
545
+ _collection_formats: Dict[str, str] = {
546
+ }
547
+
548
+ _path_params: Dict[str, str] = {}
549
+ _query_params: List[Tuple[str, str]] = []
550
+ _header_params: Dict[str, Optional[str]] = _headers or {}
551
+ _form_params: List[Tuple[str, str]] = []
552
+ _files: Dict[
553
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
554
+ ] = {}
555
+ _body_params: Optional[bytes] = None
556
+
557
+ # process the path parameters
558
+ # process the query parameters
559
+ if project_id is not None:
560
+
561
+ _query_params.append(('projectId', project_id))
562
+
563
+ # process the header parameters
564
+ # process the form parameters
565
+ # process the body parameter
566
+ if list_selection_dto is not None:
567
+ _body_params = list_selection_dto
568
+
569
+
570
+
571
+ # set the HTTP header `Content-Type`
572
+ if _content_type:
573
+ _header_params['Content-Type'] = _content_type
574
+ else:
575
+ _default_content_type = (
576
+ self.api_client.select_header_content_type(
577
+ [
578
+ 'application/json'
579
+ ]
580
+ )
581
+ )
582
+ if _default_content_type is not None:
583
+ _header_params['Content-Type'] = _default_content_type
584
+
585
+ # authentication setting
586
+ _auth_settings: List[str] = [
587
+ ]
588
+
589
+ return self.api_client.param_serialize(
590
+ method='POST',
591
+ resource_path='/api/cfproject/add-to-project',
592
+ path_params=_path_params,
593
+ query_params=_query_params,
594
+ header_params=_header_params,
595
+ body=_body_params,
596
+ post_params=_form_params,
597
+ files=_files,
598
+ auth_settings=_auth_settings,
599
+ collection_formats=_collection_formats,
600
+ _host=_host,
601
+ _request_auth=_request_auth
602
+ )
603
+
604
+
605
+
606
+
607
+ @validate_call
608
+ async def cf_delta1(
609
+ self,
610
+ to_project_id: StrictInt,
611
+ test_case_id: Optional[List[StrictInt]] = None,
612
+ test_case_tree_selection_dto: Optional[TestCaseTreeSelectionDto] = None,
613
+ _request_timeout: Union[
614
+ None,
615
+ Annotated[StrictFloat, Field(gt=0)],
616
+ Tuple[
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Annotated[StrictFloat, Field(gt=0)]
619
+ ]
620
+ ] = None,
621
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
622
+ _content_type: Optional[StrictStr] = None,
623
+ _headers: Optional[Dict[StrictStr, Any]] = None,
624
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
625
+ ) -> List[IdAndNameOnlyDto]:
626
+ """Find missing custom fields
627
+
628
+
629
+ :param to_project_id: (required)
630
+ :type to_project_id: int
631
+ :param test_case_id:
632
+ :type test_case_id: List[int]
633
+ :param test_case_tree_selection_dto:
634
+ :type test_case_tree_selection_dto: TestCaseTreeSelectionDto
635
+ :param _request_timeout: timeout setting for this request. If one
636
+ number provided, it will be total request
637
+ timeout. It can also be a pair (tuple) of
638
+ (connection, read) timeouts.
639
+ :type _request_timeout: int, tuple(int, int), optional
640
+ :param _request_auth: set to override the auth_settings for an a single
641
+ request; this effectively ignores the
642
+ authentication in the spec for a single request.
643
+ :type _request_auth: dict, optional
644
+ :param _content_type: force content-type for the request.
645
+ :type _content_type: str, Optional
646
+ :param _headers: set to override the headers for a single
647
+ request; this effectively ignores the headers
648
+ in the spec for a single request.
649
+ :type _headers: dict, optional
650
+ :param _host_index: set to override the host_index for a single
651
+ request; this effectively ignores the host_index
652
+ in the spec for a single request.
653
+ :type _host_index: int, optional
654
+ :return: Returns the result object.
655
+ """ # noqa: E501
656
+
657
+ _param = self._cf_delta1_serialize(
658
+ to_project_id=to_project_id,
659
+ test_case_id=test_case_id,
660
+ test_case_tree_selection_dto=test_case_tree_selection_dto,
661
+ _request_auth=_request_auth,
662
+ _content_type=_content_type,
663
+ _headers=_headers,
664
+ _host_index=_host_index
665
+ )
666
+
667
+ _response_types_map: Dict[str, Optional[str]] = {
668
+ '200': "List[IdAndNameOnlyDto]",
669
+ }
670
+ response_data = await self.api_client.call_api(
671
+ *_param,
672
+ _request_timeout=_request_timeout
673
+ )
674
+ await response_data.read()
675
+ return self.api_client.response_deserialize(
676
+ response_data=response_data,
677
+ response_types_map=_response_types_map,
678
+ ).data
679
+
680
+
681
+ @validate_call
682
+ async def cf_delta1_with_http_info(
683
+ self,
684
+ to_project_id: StrictInt,
685
+ test_case_id: Optional[List[StrictInt]] = None,
686
+ test_case_tree_selection_dto: Optional[TestCaseTreeSelectionDto] = None,
687
+ _request_timeout: Union[
688
+ None,
689
+ Annotated[StrictFloat, Field(gt=0)],
690
+ Tuple[
691
+ Annotated[StrictFloat, Field(gt=0)],
692
+ Annotated[StrictFloat, Field(gt=0)]
693
+ ]
694
+ ] = None,
695
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
696
+ _content_type: Optional[StrictStr] = None,
697
+ _headers: Optional[Dict[StrictStr, Any]] = None,
698
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
699
+ ) -> ApiResponse[List[IdAndNameOnlyDto]]:
700
+ """Find missing custom fields
701
+
702
+
703
+ :param to_project_id: (required)
704
+ :type to_project_id: int
705
+ :param test_case_id:
706
+ :type test_case_id: List[int]
707
+ :param test_case_tree_selection_dto:
708
+ :type test_case_tree_selection_dto: TestCaseTreeSelectionDto
709
+ :param _request_timeout: timeout setting for this request. If one
710
+ number provided, it will be total request
711
+ timeout. It can also be a pair (tuple) of
712
+ (connection, read) timeouts.
713
+ :type _request_timeout: int, tuple(int, int), optional
714
+ :param _request_auth: set to override the auth_settings for an a single
715
+ request; this effectively ignores the
716
+ authentication in the spec for a single request.
717
+ :type _request_auth: dict, optional
718
+ :param _content_type: force content-type for the request.
719
+ :type _content_type: str, Optional
720
+ :param _headers: set to override the headers for a single
721
+ request; this effectively ignores the headers
722
+ in the spec for a single request.
723
+ :type _headers: dict, optional
724
+ :param _host_index: set to override the host_index for a single
725
+ request; this effectively ignores the host_index
726
+ in the spec for a single request.
727
+ :type _host_index: int, optional
728
+ :return: Returns the result object.
729
+ """ # noqa: E501
730
+
731
+ _param = self._cf_delta1_serialize(
732
+ to_project_id=to_project_id,
733
+ test_case_id=test_case_id,
734
+ test_case_tree_selection_dto=test_case_tree_selection_dto,
735
+ _request_auth=_request_auth,
736
+ _content_type=_content_type,
737
+ _headers=_headers,
738
+ _host_index=_host_index
739
+ )
740
+
741
+ _response_types_map: Dict[str, Optional[str]] = {
742
+ '200': "List[IdAndNameOnlyDto]",
743
+ }
744
+ response_data = await self.api_client.call_api(
745
+ *_param,
746
+ _request_timeout=_request_timeout
747
+ )
748
+ await response_data.read()
749
+ return self.api_client.response_deserialize(
750
+ response_data=response_data,
751
+ response_types_map=_response_types_map,
752
+ )
753
+
754
+
755
+ @validate_call
756
+ async def cf_delta1_without_preload_content(
757
+ self,
758
+ to_project_id: StrictInt,
759
+ test_case_id: Optional[List[StrictInt]] = None,
760
+ test_case_tree_selection_dto: Optional[TestCaseTreeSelectionDto] = None,
761
+ _request_timeout: Union[
762
+ None,
763
+ Annotated[StrictFloat, Field(gt=0)],
764
+ Tuple[
765
+ Annotated[StrictFloat, Field(gt=0)],
766
+ Annotated[StrictFloat, Field(gt=0)]
767
+ ]
768
+ ] = None,
769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
770
+ _content_type: Optional[StrictStr] = None,
771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
773
+ ) -> RESTResponseType:
774
+ """Find missing custom fields
775
+
776
+
777
+ :param to_project_id: (required)
778
+ :type to_project_id: int
779
+ :param test_case_id:
780
+ :type test_case_id: List[int]
781
+ :param test_case_tree_selection_dto:
782
+ :type test_case_tree_selection_dto: TestCaseTreeSelectionDto
783
+ :param _request_timeout: timeout setting for this request. If one
784
+ number provided, it will be total request
785
+ timeout. It can also be a pair (tuple) of
786
+ (connection, read) timeouts.
787
+ :type _request_timeout: int, tuple(int, int), optional
788
+ :param _request_auth: set to override the auth_settings for an a single
789
+ request; this effectively ignores the
790
+ authentication in the spec for a single request.
791
+ :type _request_auth: dict, optional
792
+ :param _content_type: force content-type for the request.
793
+ :type _content_type: str, Optional
794
+ :param _headers: set to override the headers for a single
795
+ request; this effectively ignores the headers
796
+ in the spec for a single request.
797
+ :type _headers: dict, optional
798
+ :param _host_index: set to override the host_index for a single
799
+ request; this effectively ignores the host_index
800
+ in the spec for a single request.
801
+ :type _host_index: int, optional
802
+ :return: Returns the result object.
803
+ """ # noqa: E501
804
+
805
+ _param = self._cf_delta1_serialize(
806
+ to_project_id=to_project_id,
807
+ test_case_id=test_case_id,
808
+ test_case_tree_selection_dto=test_case_tree_selection_dto,
809
+ _request_auth=_request_auth,
810
+ _content_type=_content_type,
811
+ _headers=_headers,
812
+ _host_index=_host_index
813
+ )
814
+
815
+ _response_types_map: Dict[str, Optional[str]] = {
816
+ '200': "List[IdAndNameOnlyDto]",
817
+ }
818
+ response_data = await self.api_client.call_api(
819
+ *_param,
820
+ _request_timeout=_request_timeout
821
+ )
822
+ return response_data.response
823
+
824
+
825
+ def _cf_delta1_serialize(
826
+ self,
827
+ to_project_id,
828
+ test_case_id,
829
+ test_case_tree_selection_dto,
830
+ _request_auth,
831
+ _content_type,
832
+ _headers,
833
+ _host_index,
834
+ ) -> RequestSerialized:
835
+
836
+ _host = None
837
+
838
+ _collection_formats: Dict[str, str] = {
839
+ 'testCaseId': 'multi',
840
+ }
841
+
842
+ _path_params: Dict[str, str] = {}
843
+ _query_params: List[Tuple[str, str]] = []
844
+ _header_params: Dict[str, Optional[str]] = _headers or {}
845
+ _form_params: List[Tuple[str, str]] = []
846
+ _files: Dict[
847
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
848
+ ] = {}
849
+ _body_params: Optional[bytes] = None
850
+
851
+ # process the path parameters
852
+ # process the query parameters
853
+ if to_project_id is not None:
854
+
855
+ _query_params.append(('toProjectId', to_project_id))
856
+
857
+ if test_case_id is not None:
858
+
859
+ _query_params.append(('testCaseId', test_case_id))
860
+
861
+ # process the header parameters
862
+ # process the form parameters
863
+ # process the body parameter
864
+ if test_case_tree_selection_dto is not None:
865
+ _body_params = test_case_tree_selection_dto
866
+
867
+
868
+ # set the HTTP header `Accept`
869
+ if 'Accept' not in _header_params:
870
+ _header_params['Accept'] = self.api_client.select_header_accept(
871
+ [
872
+ '*/*'
873
+ ]
874
+ )
875
+
876
+ # set the HTTP header `Content-Type`
877
+ if _content_type:
878
+ _header_params['Content-Type'] = _content_type
879
+ else:
880
+ _default_content_type = (
881
+ self.api_client.select_header_content_type(
882
+ [
883
+ 'application/json'
884
+ ]
885
+ )
886
+ )
887
+ if _default_content_type is not None:
888
+ _header_params['Content-Type'] = _default_content_type
889
+
890
+ # authentication setting
891
+ _auth_settings: List[str] = [
892
+ ]
893
+
894
+ return self.api_client.param_serialize(
895
+ method='POST',
896
+ resource_path='/api/cfproject/delta',
897
+ path_params=_path_params,
898
+ query_params=_query_params,
899
+ header_params=_header_params,
900
+ body=_body_params,
901
+ post_params=_form_params,
902
+ files=_files,
903
+ auth_settings=_auth_settings,
904
+ collection_formats=_collection_formats,
905
+ _host=_host,
906
+ _request_auth=_request_auth
907
+ )
908
+
909
+
910
+
911
+
912
+ @validate_call
913
+ async def find_one45(
914
+ self,
915
+ custom_field_id: StrictInt,
916
+ project_id: StrictInt,
917
+ _request_timeout: Union[
918
+ None,
919
+ Annotated[StrictFloat, Field(gt=0)],
920
+ Tuple[
921
+ Annotated[StrictFloat, Field(gt=0)],
922
+ Annotated[StrictFloat, Field(gt=0)]
923
+ ]
924
+ ] = None,
925
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
926
+ _content_type: Optional[StrictStr] = None,
927
+ _headers: Optional[Dict[StrictStr, Any]] = None,
928
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
929
+ ) -> CustomFieldProjectDto:
930
+ """find_one45
931
+
932
+
933
+ :param custom_field_id: (required)
934
+ :type custom_field_id: int
935
+ :param project_id: (required)
936
+ :type project_id: int
937
+ :param _request_timeout: timeout setting for this request. If one
938
+ number provided, it will be total request
939
+ timeout. It can also be a pair (tuple) of
940
+ (connection, read) timeouts.
941
+ :type _request_timeout: int, tuple(int, int), optional
942
+ :param _request_auth: set to override the auth_settings for an a single
943
+ request; this effectively ignores the
944
+ authentication in the spec for a single request.
945
+ :type _request_auth: dict, optional
946
+ :param _content_type: force content-type for the request.
947
+ :type _content_type: str, Optional
948
+ :param _headers: set to override the headers for a single
949
+ request; this effectively ignores the headers
950
+ in the spec for a single request.
951
+ :type _headers: dict, optional
952
+ :param _host_index: set to override the host_index for a single
953
+ request; this effectively ignores the host_index
954
+ in the spec for a single request.
955
+ :type _host_index: int, optional
956
+ :return: Returns the result object.
957
+ """ # noqa: E501
958
+
959
+ _param = self._find_one45_serialize(
960
+ custom_field_id=custom_field_id,
961
+ project_id=project_id,
962
+ _request_auth=_request_auth,
963
+ _content_type=_content_type,
964
+ _headers=_headers,
965
+ _host_index=_host_index
966
+ )
967
+
968
+ _response_types_map: Dict[str, Optional[str]] = {
969
+ '200': "CustomFieldProjectDto",
970
+ }
971
+ response_data = await self.api_client.call_api(
972
+ *_param,
973
+ _request_timeout=_request_timeout
974
+ )
975
+ await response_data.read()
976
+ return self.api_client.response_deserialize(
977
+ response_data=response_data,
978
+ response_types_map=_response_types_map,
979
+ ).data
980
+
981
+
982
+ @validate_call
983
+ async def find_one45_with_http_info(
984
+ self,
985
+ custom_field_id: StrictInt,
986
+ project_id: StrictInt,
987
+ _request_timeout: Union[
988
+ None,
989
+ Annotated[StrictFloat, Field(gt=0)],
990
+ Tuple[
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Annotated[StrictFloat, Field(gt=0)]
993
+ ]
994
+ ] = None,
995
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
996
+ _content_type: Optional[StrictStr] = None,
997
+ _headers: Optional[Dict[StrictStr, Any]] = None,
998
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
999
+ ) -> ApiResponse[CustomFieldProjectDto]:
1000
+ """find_one45
1001
+
1002
+
1003
+ :param custom_field_id: (required)
1004
+ :type custom_field_id: int
1005
+ :param project_id: (required)
1006
+ :type project_id: int
1007
+ :param _request_timeout: timeout setting for this request. If one
1008
+ number provided, it will be total request
1009
+ timeout. It can also be a pair (tuple) of
1010
+ (connection, read) timeouts.
1011
+ :type _request_timeout: int, tuple(int, int), optional
1012
+ :param _request_auth: set to override the auth_settings for an a single
1013
+ request; this effectively ignores the
1014
+ authentication in the spec for a single request.
1015
+ :type _request_auth: dict, optional
1016
+ :param _content_type: force content-type for the request.
1017
+ :type _content_type: str, Optional
1018
+ :param _headers: set to override the headers for a single
1019
+ request; this effectively ignores the headers
1020
+ in the spec for a single request.
1021
+ :type _headers: dict, optional
1022
+ :param _host_index: set to override the host_index for a single
1023
+ request; this effectively ignores the host_index
1024
+ in the spec for a single request.
1025
+ :type _host_index: int, optional
1026
+ :return: Returns the result object.
1027
+ """ # noqa: E501
1028
+
1029
+ _param = self._find_one45_serialize(
1030
+ custom_field_id=custom_field_id,
1031
+ project_id=project_id,
1032
+ _request_auth=_request_auth,
1033
+ _content_type=_content_type,
1034
+ _headers=_headers,
1035
+ _host_index=_host_index
1036
+ )
1037
+
1038
+ _response_types_map: Dict[str, Optional[str]] = {
1039
+ '200': "CustomFieldProjectDto",
1040
+ }
1041
+ response_data = await self.api_client.call_api(
1042
+ *_param,
1043
+ _request_timeout=_request_timeout
1044
+ )
1045
+ await response_data.read()
1046
+ return self.api_client.response_deserialize(
1047
+ response_data=response_data,
1048
+ response_types_map=_response_types_map,
1049
+ )
1050
+
1051
+
1052
+ @validate_call
1053
+ async def find_one45_without_preload_content(
1054
+ self,
1055
+ custom_field_id: StrictInt,
1056
+ project_id: StrictInt,
1057
+ _request_timeout: Union[
1058
+ None,
1059
+ Annotated[StrictFloat, Field(gt=0)],
1060
+ Tuple[
1061
+ Annotated[StrictFloat, Field(gt=0)],
1062
+ Annotated[StrictFloat, Field(gt=0)]
1063
+ ]
1064
+ ] = None,
1065
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1066
+ _content_type: Optional[StrictStr] = None,
1067
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1068
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1069
+ ) -> RESTResponseType:
1070
+ """find_one45
1071
+
1072
+
1073
+ :param custom_field_id: (required)
1074
+ :type custom_field_id: int
1075
+ :param project_id: (required)
1076
+ :type project_id: int
1077
+ :param _request_timeout: timeout setting for this request. If one
1078
+ number provided, it will be total request
1079
+ timeout. It can also be a pair (tuple) of
1080
+ (connection, read) timeouts.
1081
+ :type _request_timeout: int, tuple(int, int), optional
1082
+ :param _request_auth: set to override the auth_settings for an a single
1083
+ request; this effectively ignores the
1084
+ authentication in the spec for a single request.
1085
+ :type _request_auth: dict, optional
1086
+ :param _content_type: force content-type for the request.
1087
+ :type _content_type: str, Optional
1088
+ :param _headers: set to override the headers for a single
1089
+ request; this effectively ignores the headers
1090
+ in the spec for a single request.
1091
+ :type _headers: dict, optional
1092
+ :param _host_index: set to override the host_index for a single
1093
+ request; this effectively ignores the host_index
1094
+ in the spec for a single request.
1095
+ :type _host_index: int, optional
1096
+ :return: Returns the result object.
1097
+ """ # noqa: E501
1098
+
1099
+ _param = self._find_one45_serialize(
1100
+ custom_field_id=custom_field_id,
1101
+ project_id=project_id,
1102
+ _request_auth=_request_auth,
1103
+ _content_type=_content_type,
1104
+ _headers=_headers,
1105
+ _host_index=_host_index
1106
+ )
1107
+
1108
+ _response_types_map: Dict[str, Optional[str]] = {
1109
+ '200': "CustomFieldProjectDto",
1110
+ }
1111
+ response_data = await self.api_client.call_api(
1112
+ *_param,
1113
+ _request_timeout=_request_timeout
1114
+ )
1115
+ return response_data.response
1116
+
1117
+
1118
+ def _find_one45_serialize(
1119
+ self,
1120
+ custom_field_id,
1121
+ project_id,
1122
+ _request_auth,
1123
+ _content_type,
1124
+ _headers,
1125
+ _host_index,
1126
+ ) -> RequestSerialized:
1127
+
1128
+ _host = None
1129
+
1130
+ _collection_formats: Dict[str, str] = {
1131
+ }
1132
+
1133
+ _path_params: Dict[str, str] = {}
1134
+ _query_params: List[Tuple[str, str]] = []
1135
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1136
+ _form_params: List[Tuple[str, str]] = []
1137
+ _files: Dict[
1138
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1139
+ ] = {}
1140
+ _body_params: Optional[bytes] = None
1141
+
1142
+ # process the path parameters
1143
+ # process the query parameters
1144
+ if custom_field_id is not None:
1145
+
1146
+ _query_params.append(('customFieldId', custom_field_id))
1147
+
1148
+ if project_id is not None:
1149
+
1150
+ _query_params.append(('projectId', project_id))
1151
+
1152
+ # process the header parameters
1153
+ # process the form parameters
1154
+ # process the body parameter
1155
+
1156
+
1157
+ # set the HTTP header `Accept`
1158
+ if 'Accept' not in _header_params:
1159
+ _header_params['Accept'] = self.api_client.select_header_accept(
1160
+ [
1161
+ '*/*'
1162
+ ]
1163
+ )
1164
+
1165
+
1166
+ # authentication setting
1167
+ _auth_settings: List[str] = [
1168
+ ]
1169
+
1170
+ return self.api_client.param_serialize(
1171
+ method='GET',
1172
+ resource_path='/api/cfproject',
1173
+ path_params=_path_params,
1174
+ query_params=_query_params,
1175
+ header_params=_header_params,
1176
+ body=_body_params,
1177
+ post_params=_form_params,
1178
+ files=_files,
1179
+ auth_settings=_auth_settings,
1180
+ collection_formats=_collection_formats,
1181
+ _host=_host,
1182
+ _request_auth=_request_auth
1183
+ )
1184
+
1185
+
1186
+
1187
+
1188
+ @validate_call
1189
+ async def find_projects_by_custom_field(
1190
+ self,
1191
+ custom_field_id: StrictInt,
1192
+ query: Optional[StrictStr] = None,
1193
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1194
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1195
+ sort: Annotated[Optional[List[StrictStr]], Field(description="Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.")] = None,
1196
+ _request_timeout: Union[
1197
+ None,
1198
+ Annotated[StrictFloat, Field(gt=0)],
1199
+ Tuple[
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Annotated[StrictFloat, Field(gt=0)]
1202
+ ]
1203
+ ] = None,
1204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1205
+ _content_type: Optional[StrictStr] = None,
1206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1208
+ ) -> PageProjectCustomFieldDto:
1209
+ """Find projects that use specified custom field
1210
+
1211
+
1212
+ :param custom_field_id: (required)
1213
+ :type custom_field_id: int
1214
+ :param query:
1215
+ :type query: str
1216
+ :param page: Zero-based page index (0..N)
1217
+ :type page: int
1218
+ :param size: The size of the page to be returned
1219
+ :type size: int
1220
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1221
+ :type sort: List[str]
1222
+ :param _request_timeout: timeout setting for this request. If one
1223
+ number provided, it will be total request
1224
+ timeout. It can also be a pair (tuple) of
1225
+ (connection, read) timeouts.
1226
+ :type _request_timeout: int, tuple(int, int), optional
1227
+ :param _request_auth: set to override the auth_settings for an a single
1228
+ request; this effectively ignores the
1229
+ authentication in the spec for a single request.
1230
+ :type _request_auth: dict, optional
1231
+ :param _content_type: force content-type for the request.
1232
+ :type _content_type: str, Optional
1233
+ :param _headers: set to override the headers for a single
1234
+ request; this effectively ignores the headers
1235
+ in the spec for a single request.
1236
+ :type _headers: dict, optional
1237
+ :param _host_index: set to override the host_index for a single
1238
+ request; this effectively ignores the host_index
1239
+ in the spec for a single request.
1240
+ :type _host_index: int, optional
1241
+ :return: Returns the result object.
1242
+ """ # noqa: E501
1243
+
1244
+ _param = self._find_projects_by_custom_field_serialize(
1245
+ custom_field_id=custom_field_id,
1246
+ query=query,
1247
+ page=page,
1248
+ size=size,
1249
+ sort=sort,
1250
+ _request_auth=_request_auth,
1251
+ _content_type=_content_type,
1252
+ _headers=_headers,
1253
+ _host_index=_host_index
1254
+ )
1255
+
1256
+ _response_types_map: Dict[str, Optional[str]] = {
1257
+ '200': "PageProjectCustomFieldDto",
1258
+ }
1259
+ response_data = await self.api_client.call_api(
1260
+ *_param,
1261
+ _request_timeout=_request_timeout
1262
+ )
1263
+ await response_data.read()
1264
+ return self.api_client.response_deserialize(
1265
+ response_data=response_data,
1266
+ response_types_map=_response_types_map,
1267
+ ).data
1268
+
1269
+
1270
+ @validate_call
1271
+ async def find_projects_by_custom_field_with_http_info(
1272
+ self,
1273
+ custom_field_id: StrictInt,
1274
+ query: Optional[StrictStr] = None,
1275
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1276
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1277
+ sort: Annotated[Optional[List[StrictStr]], Field(description="Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.")] = None,
1278
+ _request_timeout: Union[
1279
+ None,
1280
+ Annotated[StrictFloat, Field(gt=0)],
1281
+ Tuple[
1282
+ Annotated[StrictFloat, Field(gt=0)],
1283
+ Annotated[StrictFloat, Field(gt=0)]
1284
+ ]
1285
+ ] = None,
1286
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1287
+ _content_type: Optional[StrictStr] = None,
1288
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1289
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1290
+ ) -> ApiResponse[PageProjectCustomFieldDto]:
1291
+ """Find projects that use specified custom field
1292
+
1293
+
1294
+ :param custom_field_id: (required)
1295
+ :type custom_field_id: int
1296
+ :param query:
1297
+ :type query: str
1298
+ :param page: Zero-based page index (0..N)
1299
+ :type page: int
1300
+ :param size: The size of the page to be returned
1301
+ :type size: int
1302
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1303
+ :type sort: List[str]
1304
+ :param _request_timeout: timeout setting for this request. If one
1305
+ number provided, it will be total request
1306
+ timeout. It can also be a pair (tuple) of
1307
+ (connection, read) timeouts.
1308
+ :type _request_timeout: int, tuple(int, int), optional
1309
+ :param _request_auth: set to override the auth_settings for an a single
1310
+ request; this effectively ignores the
1311
+ authentication in the spec for a single request.
1312
+ :type _request_auth: dict, optional
1313
+ :param _content_type: force content-type for the request.
1314
+ :type _content_type: str, Optional
1315
+ :param _headers: set to override the headers for a single
1316
+ request; this effectively ignores the headers
1317
+ in the spec for a single request.
1318
+ :type _headers: dict, optional
1319
+ :param _host_index: set to override the host_index for a single
1320
+ request; this effectively ignores the host_index
1321
+ in the spec for a single request.
1322
+ :type _host_index: int, optional
1323
+ :return: Returns the result object.
1324
+ """ # noqa: E501
1325
+
1326
+ _param = self._find_projects_by_custom_field_serialize(
1327
+ custom_field_id=custom_field_id,
1328
+ query=query,
1329
+ page=page,
1330
+ size=size,
1331
+ sort=sort,
1332
+ _request_auth=_request_auth,
1333
+ _content_type=_content_type,
1334
+ _headers=_headers,
1335
+ _host_index=_host_index
1336
+ )
1337
+
1338
+ _response_types_map: Dict[str, Optional[str]] = {
1339
+ '200': "PageProjectCustomFieldDto",
1340
+ }
1341
+ response_data = await self.api_client.call_api(
1342
+ *_param,
1343
+ _request_timeout=_request_timeout
1344
+ )
1345
+ await response_data.read()
1346
+ return self.api_client.response_deserialize(
1347
+ response_data=response_data,
1348
+ response_types_map=_response_types_map,
1349
+ )
1350
+
1351
+
1352
+ @validate_call
1353
+ async def find_projects_by_custom_field_without_preload_content(
1354
+ self,
1355
+ custom_field_id: StrictInt,
1356
+ query: Optional[StrictStr] = None,
1357
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1358
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1359
+ sort: Annotated[Optional[List[StrictStr]], Field(description="Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.")] = None,
1360
+ _request_timeout: Union[
1361
+ None,
1362
+ Annotated[StrictFloat, Field(gt=0)],
1363
+ Tuple[
1364
+ Annotated[StrictFloat, Field(gt=0)],
1365
+ Annotated[StrictFloat, Field(gt=0)]
1366
+ ]
1367
+ ] = None,
1368
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1369
+ _content_type: Optional[StrictStr] = None,
1370
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1371
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1372
+ ) -> RESTResponseType:
1373
+ """Find projects that use specified custom field
1374
+
1375
+
1376
+ :param custom_field_id: (required)
1377
+ :type custom_field_id: int
1378
+ :param query:
1379
+ :type query: str
1380
+ :param page: Zero-based page index (0..N)
1381
+ :type page: int
1382
+ :param size: The size of the page to be returned
1383
+ :type size: int
1384
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1385
+ :type sort: List[str]
1386
+ :param _request_timeout: timeout setting for this request. If one
1387
+ number provided, it will be total request
1388
+ timeout. It can also be a pair (tuple) of
1389
+ (connection, read) timeouts.
1390
+ :type _request_timeout: int, tuple(int, int), optional
1391
+ :param _request_auth: set to override the auth_settings for an a single
1392
+ request; this effectively ignores the
1393
+ authentication in the spec for a single request.
1394
+ :type _request_auth: dict, optional
1395
+ :param _content_type: force content-type for the request.
1396
+ :type _content_type: str, Optional
1397
+ :param _headers: set to override the headers for a single
1398
+ request; this effectively ignores the headers
1399
+ in the spec for a single request.
1400
+ :type _headers: dict, optional
1401
+ :param _host_index: set to override the host_index for a single
1402
+ request; this effectively ignores the host_index
1403
+ in the spec for a single request.
1404
+ :type _host_index: int, optional
1405
+ :return: Returns the result object.
1406
+ """ # noqa: E501
1407
+
1408
+ _param = self._find_projects_by_custom_field_serialize(
1409
+ custom_field_id=custom_field_id,
1410
+ query=query,
1411
+ page=page,
1412
+ size=size,
1413
+ sort=sort,
1414
+ _request_auth=_request_auth,
1415
+ _content_type=_content_type,
1416
+ _headers=_headers,
1417
+ _host_index=_host_index
1418
+ )
1419
+
1420
+ _response_types_map: Dict[str, Optional[str]] = {
1421
+ '200': "PageProjectCustomFieldDto",
1422
+ }
1423
+ response_data = await self.api_client.call_api(
1424
+ *_param,
1425
+ _request_timeout=_request_timeout
1426
+ )
1427
+ return response_data.response
1428
+
1429
+
1430
+ def _find_projects_by_custom_field_serialize(
1431
+ self,
1432
+ custom_field_id,
1433
+ query,
1434
+ page,
1435
+ size,
1436
+ sort,
1437
+ _request_auth,
1438
+ _content_type,
1439
+ _headers,
1440
+ _host_index,
1441
+ ) -> RequestSerialized:
1442
+
1443
+ _host = None
1444
+
1445
+ _collection_formats: Dict[str, str] = {
1446
+ 'sort': 'multi',
1447
+ }
1448
+
1449
+ _path_params: Dict[str, str] = {}
1450
+ _query_params: List[Tuple[str, str]] = []
1451
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1452
+ _form_params: List[Tuple[str, str]] = []
1453
+ _files: Dict[
1454
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1455
+ ] = {}
1456
+ _body_params: Optional[bytes] = None
1457
+
1458
+ # process the path parameters
1459
+ # process the query parameters
1460
+ if custom_field_id is not None:
1461
+
1462
+ _query_params.append(('customFieldId', custom_field_id))
1463
+
1464
+ if query is not None:
1465
+
1466
+ _query_params.append(('query', query))
1467
+
1468
+ if page is not None:
1469
+
1470
+ _query_params.append(('page', page))
1471
+
1472
+ if size is not None:
1473
+
1474
+ _query_params.append(('size', size))
1475
+
1476
+ if sort is not None:
1477
+
1478
+ _query_params.append(('sort', sort))
1479
+
1480
+ # process the header parameters
1481
+ # process the form parameters
1482
+ # process the body parameter
1483
+
1484
+
1485
+ # set the HTTP header `Accept`
1486
+ if 'Accept' not in _header_params:
1487
+ _header_params['Accept'] = self.api_client.select_header_accept(
1488
+ [
1489
+ '*/*'
1490
+ ]
1491
+ )
1492
+
1493
+
1494
+ # authentication setting
1495
+ _auth_settings: List[str] = [
1496
+ ]
1497
+
1498
+ return self.api_client.param_serialize(
1499
+ method='GET',
1500
+ resource_path='/api/cfproject/in-projects',
1501
+ path_params=_path_params,
1502
+ query_params=_query_params,
1503
+ header_params=_header_params,
1504
+ body=_body_params,
1505
+ post_params=_form_params,
1506
+ files=_files,
1507
+ auth_settings=_auth_settings,
1508
+ collection_formats=_collection_formats,
1509
+ _host=_host,
1510
+ _request_auth=_request_auth
1511
+ )
1512
+
1513
+
1514
+
1515
+
1516
+ @validate_call
1517
+ async def remove4(
1518
+ self,
1519
+ custom_field_id: StrictInt,
1520
+ project_id: StrictInt,
1521
+ _request_timeout: Union[
1522
+ None,
1523
+ Annotated[StrictFloat, Field(gt=0)],
1524
+ Tuple[
1525
+ Annotated[StrictFloat, Field(gt=0)],
1526
+ Annotated[StrictFloat, Field(gt=0)]
1527
+ ]
1528
+ ] = None,
1529
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1530
+ _content_type: Optional[StrictStr] = None,
1531
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1532
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1533
+ ) -> None:
1534
+ """Remove custom field from project
1535
+
1536
+
1537
+ :param custom_field_id: (required)
1538
+ :type custom_field_id: int
1539
+ :param project_id: (required)
1540
+ :type project_id: int
1541
+ :param _request_timeout: timeout setting for this request. If one
1542
+ number provided, it will be total request
1543
+ timeout. It can also be a pair (tuple) of
1544
+ (connection, read) timeouts.
1545
+ :type _request_timeout: int, tuple(int, int), optional
1546
+ :param _request_auth: set to override the auth_settings for an a single
1547
+ request; this effectively ignores the
1548
+ authentication in the spec for a single request.
1549
+ :type _request_auth: dict, optional
1550
+ :param _content_type: force content-type for the request.
1551
+ :type _content_type: str, Optional
1552
+ :param _headers: set to override the headers for a single
1553
+ request; this effectively ignores the headers
1554
+ in the spec for a single request.
1555
+ :type _headers: dict, optional
1556
+ :param _host_index: set to override the host_index for a single
1557
+ request; this effectively ignores the host_index
1558
+ in the spec for a single request.
1559
+ :type _host_index: int, optional
1560
+ :return: Returns the result object.
1561
+ """ # noqa: E501
1562
+
1563
+ _param = self._remove4_serialize(
1564
+ custom_field_id=custom_field_id,
1565
+ project_id=project_id,
1566
+ _request_auth=_request_auth,
1567
+ _content_type=_content_type,
1568
+ _headers=_headers,
1569
+ _host_index=_host_index
1570
+ )
1571
+
1572
+ _response_types_map: Dict[str, Optional[str]] = {
1573
+ '204': None,
1574
+ }
1575
+ response_data = await self.api_client.call_api(
1576
+ *_param,
1577
+ _request_timeout=_request_timeout
1578
+ )
1579
+ await response_data.read()
1580
+ return self.api_client.response_deserialize(
1581
+ response_data=response_data,
1582
+ response_types_map=_response_types_map,
1583
+ ).data
1584
+
1585
+
1586
+ @validate_call
1587
+ async def remove4_with_http_info(
1588
+ self,
1589
+ custom_field_id: StrictInt,
1590
+ project_id: StrictInt,
1591
+ _request_timeout: Union[
1592
+ None,
1593
+ Annotated[StrictFloat, Field(gt=0)],
1594
+ Tuple[
1595
+ Annotated[StrictFloat, Field(gt=0)],
1596
+ Annotated[StrictFloat, Field(gt=0)]
1597
+ ]
1598
+ ] = None,
1599
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1600
+ _content_type: Optional[StrictStr] = None,
1601
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1602
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1603
+ ) -> ApiResponse[None]:
1604
+ """Remove custom field from project
1605
+
1606
+
1607
+ :param custom_field_id: (required)
1608
+ :type custom_field_id: int
1609
+ :param project_id: (required)
1610
+ :type project_id: int
1611
+ :param _request_timeout: timeout setting for this request. If one
1612
+ number provided, it will be total request
1613
+ timeout. It can also be a pair (tuple) of
1614
+ (connection, read) timeouts.
1615
+ :type _request_timeout: int, tuple(int, int), optional
1616
+ :param _request_auth: set to override the auth_settings for an a single
1617
+ request; this effectively ignores the
1618
+ authentication in the spec for a single request.
1619
+ :type _request_auth: dict, optional
1620
+ :param _content_type: force content-type for the request.
1621
+ :type _content_type: str, Optional
1622
+ :param _headers: set to override the headers for a single
1623
+ request; this effectively ignores the headers
1624
+ in the spec for a single request.
1625
+ :type _headers: dict, optional
1626
+ :param _host_index: set to override the host_index for a single
1627
+ request; this effectively ignores the host_index
1628
+ in the spec for a single request.
1629
+ :type _host_index: int, optional
1630
+ :return: Returns the result object.
1631
+ """ # noqa: E501
1632
+
1633
+ _param = self._remove4_serialize(
1634
+ custom_field_id=custom_field_id,
1635
+ project_id=project_id,
1636
+ _request_auth=_request_auth,
1637
+ _content_type=_content_type,
1638
+ _headers=_headers,
1639
+ _host_index=_host_index
1640
+ )
1641
+
1642
+ _response_types_map: Dict[str, Optional[str]] = {
1643
+ '204': None,
1644
+ }
1645
+ response_data = await self.api_client.call_api(
1646
+ *_param,
1647
+ _request_timeout=_request_timeout
1648
+ )
1649
+ await response_data.read()
1650
+ return self.api_client.response_deserialize(
1651
+ response_data=response_data,
1652
+ response_types_map=_response_types_map,
1653
+ )
1654
+
1655
+
1656
+ @validate_call
1657
+ async def remove4_without_preload_content(
1658
+ self,
1659
+ custom_field_id: StrictInt,
1660
+ project_id: StrictInt,
1661
+ _request_timeout: Union[
1662
+ None,
1663
+ Annotated[StrictFloat, Field(gt=0)],
1664
+ Tuple[
1665
+ Annotated[StrictFloat, Field(gt=0)],
1666
+ Annotated[StrictFloat, Field(gt=0)]
1667
+ ]
1668
+ ] = None,
1669
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1670
+ _content_type: Optional[StrictStr] = None,
1671
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1672
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1673
+ ) -> RESTResponseType:
1674
+ """Remove custom field from project
1675
+
1676
+
1677
+ :param custom_field_id: (required)
1678
+ :type custom_field_id: int
1679
+ :param project_id: (required)
1680
+ :type project_id: int
1681
+ :param _request_timeout: timeout setting for this request. If one
1682
+ number provided, it will be total request
1683
+ timeout. It can also be a pair (tuple) of
1684
+ (connection, read) timeouts.
1685
+ :type _request_timeout: int, tuple(int, int), optional
1686
+ :param _request_auth: set to override the auth_settings for an a single
1687
+ request; this effectively ignores the
1688
+ authentication in the spec for a single request.
1689
+ :type _request_auth: dict, optional
1690
+ :param _content_type: force content-type for the request.
1691
+ :type _content_type: str, Optional
1692
+ :param _headers: set to override the headers for a single
1693
+ request; this effectively ignores the headers
1694
+ in the spec for a single request.
1695
+ :type _headers: dict, optional
1696
+ :param _host_index: set to override the host_index for a single
1697
+ request; this effectively ignores the host_index
1698
+ in the spec for a single request.
1699
+ :type _host_index: int, optional
1700
+ :return: Returns the result object.
1701
+ """ # noqa: E501
1702
+
1703
+ _param = self._remove4_serialize(
1704
+ custom_field_id=custom_field_id,
1705
+ project_id=project_id,
1706
+ _request_auth=_request_auth,
1707
+ _content_type=_content_type,
1708
+ _headers=_headers,
1709
+ _host_index=_host_index
1710
+ )
1711
+
1712
+ _response_types_map: Dict[str, Optional[str]] = {
1713
+ '204': None,
1714
+ }
1715
+ response_data = await self.api_client.call_api(
1716
+ *_param,
1717
+ _request_timeout=_request_timeout
1718
+ )
1719
+ return response_data.response
1720
+
1721
+
1722
+ def _remove4_serialize(
1723
+ self,
1724
+ custom_field_id,
1725
+ project_id,
1726
+ _request_auth,
1727
+ _content_type,
1728
+ _headers,
1729
+ _host_index,
1730
+ ) -> RequestSerialized:
1731
+
1732
+ _host = None
1733
+
1734
+ _collection_formats: Dict[str, str] = {
1735
+ }
1736
+
1737
+ _path_params: Dict[str, str] = {}
1738
+ _query_params: List[Tuple[str, str]] = []
1739
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1740
+ _form_params: List[Tuple[str, str]] = []
1741
+ _files: Dict[
1742
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1743
+ ] = {}
1744
+ _body_params: Optional[bytes] = None
1745
+
1746
+ # process the path parameters
1747
+ # process the query parameters
1748
+ if custom_field_id is not None:
1749
+
1750
+ _query_params.append(('customFieldId', custom_field_id))
1751
+
1752
+ if project_id is not None:
1753
+
1754
+ _query_params.append(('projectId', project_id))
1755
+
1756
+ # process the header parameters
1757
+ # process the form parameters
1758
+ # process the body parameter
1759
+
1760
+
1761
+
1762
+
1763
+ # authentication setting
1764
+ _auth_settings: List[str] = [
1765
+ ]
1766
+
1767
+ return self.api_client.param_serialize(
1768
+ method='DELETE',
1769
+ resource_path='/api/cfproject/remove',
1770
+ path_params=_path_params,
1771
+ query_params=_query_params,
1772
+ header_params=_header_params,
1773
+ body=_body_params,
1774
+ post_params=_form_params,
1775
+ files=_files,
1776
+ auth_settings=_auth_settings,
1777
+ collection_formats=_collection_formats,
1778
+ _host=_host,
1779
+ _request_auth=_request_auth
1780
+ )
1781
+
1782
+
1783
+
1784
+
1785
+ @validate_call
1786
+ async def set_default(
1787
+ self,
1788
+ default_custom_field_value_dto: DefaultCustomFieldValueDto,
1789
+ _request_timeout: Union[
1790
+ None,
1791
+ Annotated[StrictFloat, Field(gt=0)],
1792
+ Tuple[
1793
+ Annotated[StrictFloat, Field(gt=0)],
1794
+ Annotated[StrictFloat, Field(gt=0)]
1795
+ ]
1796
+ ] = None,
1797
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1798
+ _content_type: Optional[StrictStr] = None,
1799
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1800
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1801
+ ) -> None:
1802
+ """(Deprecated) Deprecated. Use PATCH /api/project/{projectId}/cf/{cfId} instead
1803
+
1804
+
1805
+ :param default_custom_field_value_dto: (required)
1806
+ :type default_custom_field_value_dto: DefaultCustomFieldValueDto
1807
+ :param _request_timeout: timeout setting for this request. If one
1808
+ number provided, it will be total request
1809
+ timeout. It can also be a pair (tuple) of
1810
+ (connection, read) timeouts.
1811
+ :type _request_timeout: int, tuple(int, int), optional
1812
+ :param _request_auth: set to override the auth_settings for an a single
1813
+ request; this effectively ignores the
1814
+ authentication in the spec for a single request.
1815
+ :type _request_auth: dict, optional
1816
+ :param _content_type: force content-type for the request.
1817
+ :type _content_type: str, Optional
1818
+ :param _headers: set to override the headers for a single
1819
+ request; this effectively ignores the headers
1820
+ in the spec for a single request.
1821
+ :type _headers: dict, optional
1822
+ :param _host_index: set to override the host_index for a single
1823
+ request; this effectively ignores the host_index
1824
+ in the spec for a single request.
1825
+ :type _host_index: int, optional
1826
+ :return: Returns the result object.
1827
+ """ # noqa: E501
1828
+ warnings.warn("POST /api/cfproject/default is deprecated.", DeprecationWarning)
1829
+
1830
+ _param = self._set_default_serialize(
1831
+ default_custom_field_value_dto=default_custom_field_value_dto,
1832
+ _request_auth=_request_auth,
1833
+ _content_type=_content_type,
1834
+ _headers=_headers,
1835
+ _host_index=_host_index
1836
+ )
1837
+
1838
+ _response_types_map: Dict[str, Optional[str]] = {
1839
+ '202': None,
1840
+ }
1841
+ response_data = await self.api_client.call_api(
1842
+ *_param,
1843
+ _request_timeout=_request_timeout
1844
+ )
1845
+ await response_data.read()
1846
+ return self.api_client.response_deserialize(
1847
+ response_data=response_data,
1848
+ response_types_map=_response_types_map,
1849
+ ).data
1850
+
1851
+
1852
+ @validate_call
1853
+ async def set_default_with_http_info(
1854
+ self,
1855
+ default_custom_field_value_dto: DefaultCustomFieldValueDto,
1856
+ _request_timeout: Union[
1857
+ None,
1858
+ Annotated[StrictFloat, Field(gt=0)],
1859
+ Tuple[
1860
+ Annotated[StrictFloat, Field(gt=0)],
1861
+ Annotated[StrictFloat, Field(gt=0)]
1862
+ ]
1863
+ ] = None,
1864
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1865
+ _content_type: Optional[StrictStr] = None,
1866
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1867
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1868
+ ) -> ApiResponse[None]:
1869
+ """(Deprecated) Deprecated. Use PATCH /api/project/{projectId}/cf/{cfId} instead
1870
+
1871
+
1872
+ :param default_custom_field_value_dto: (required)
1873
+ :type default_custom_field_value_dto: DefaultCustomFieldValueDto
1874
+ :param _request_timeout: timeout setting for this request. If one
1875
+ number provided, it will be total request
1876
+ timeout. It can also be a pair (tuple) of
1877
+ (connection, read) timeouts.
1878
+ :type _request_timeout: int, tuple(int, int), optional
1879
+ :param _request_auth: set to override the auth_settings for an a single
1880
+ request; this effectively ignores the
1881
+ authentication in the spec for a single request.
1882
+ :type _request_auth: dict, optional
1883
+ :param _content_type: force content-type for the request.
1884
+ :type _content_type: str, Optional
1885
+ :param _headers: set to override the headers for a single
1886
+ request; this effectively ignores the headers
1887
+ in the spec for a single request.
1888
+ :type _headers: dict, optional
1889
+ :param _host_index: set to override the host_index for a single
1890
+ request; this effectively ignores the host_index
1891
+ in the spec for a single request.
1892
+ :type _host_index: int, optional
1893
+ :return: Returns the result object.
1894
+ """ # noqa: E501
1895
+ warnings.warn("POST /api/cfproject/default is deprecated.", DeprecationWarning)
1896
+
1897
+ _param = self._set_default_serialize(
1898
+ default_custom_field_value_dto=default_custom_field_value_dto,
1899
+ _request_auth=_request_auth,
1900
+ _content_type=_content_type,
1901
+ _headers=_headers,
1902
+ _host_index=_host_index
1903
+ )
1904
+
1905
+ _response_types_map: Dict[str, Optional[str]] = {
1906
+ '202': None,
1907
+ }
1908
+ response_data = await self.api_client.call_api(
1909
+ *_param,
1910
+ _request_timeout=_request_timeout
1911
+ )
1912
+ await response_data.read()
1913
+ return self.api_client.response_deserialize(
1914
+ response_data=response_data,
1915
+ response_types_map=_response_types_map,
1916
+ )
1917
+
1918
+
1919
+ @validate_call
1920
+ async def set_default_without_preload_content(
1921
+ self,
1922
+ default_custom_field_value_dto: DefaultCustomFieldValueDto,
1923
+ _request_timeout: Union[
1924
+ None,
1925
+ Annotated[StrictFloat, Field(gt=0)],
1926
+ Tuple[
1927
+ Annotated[StrictFloat, Field(gt=0)],
1928
+ Annotated[StrictFloat, Field(gt=0)]
1929
+ ]
1930
+ ] = None,
1931
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1932
+ _content_type: Optional[StrictStr] = None,
1933
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1934
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1935
+ ) -> RESTResponseType:
1936
+ """(Deprecated) Deprecated. Use PATCH /api/project/{projectId}/cf/{cfId} instead
1937
+
1938
+
1939
+ :param default_custom_field_value_dto: (required)
1940
+ :type default_custom_field_value_dto: DefaultCustomFieldValueDto
1941
+ :param _request_timeout: timeout setting for this request. If one
1942
+ number provided, it will be total request
1943
+ timeout. It can also be a pair (tuple) of
1944
+ (connection, read) timeouts.
1945
+ :type _request_timeout: int, tuple(int, int), optional
1946
+ :param _request_auth: set to override the auth_settings for an a single
1947
+ request; this effectively ignores the
1948
+ authentication in the spec for a single request.
1949
+ :type _request_auth: dict, optional
1950
+ :param _content_type: force content-type for the request.
1951
+ :type _content_type: str, Optional
1952
+ :param _headers: set to override the headers for a single
1953
+ request; this effectively ignores the headers
1954
+ in the spec for a single request.
1955
+ :type _headers: dict, optional
1956
+ :param _host_index: set to override the host_index for a single
1957
+ request; this effectively ignores the host_index
1958
+ in the spec for a single request.
1959
+ :type _host_index: int, optional
1960
+ :return: Returns the result object.
1961
+ """ # noqa: E501
1962
+ warnings.warn("POST /api/cfproject/default is deprecated.", DeprecationWarning)
1963
+
1964
+ _param = self._set_default_serialize(
1965
+ default_custom_field_value_dto=default_custom_field_value_dto,
1966
+ _request_auth=_request_auth,
1967
+ _content_type=_content_type,
1968
+ _headers=_headers,
1969
+ _host_index=_host_index
1970
+ )
1971
+
1972
+ _response_types_map: Dict[str, Optional[str]] = {
1973
+ '202': None,
1974
+ }
1975
+ response_data = await self.api_client.call_api(
1976
+ *_param,
1977
+ _request_timeout=_request_timeout
1978
+ )
1979
+ return response_data.response
1980
+
1981
+
1982
+ def _set_default_serialize(
1983
+ self,
1984
+ default_custom_field_value_dto,
1985
+ _request_auth,
1986
+ _content_type,
1987
+ _headers,
1988
+ _host_index,
1989
+ ) -> RequestSerialized:
1990
+
1991
+ _host = None
1992
+
1993
+ _collection_formats: Dict[str, str] = {
1994
+ }
1995
+
1996
+ _path_params: Dict[str, str] = {}
1997
+ _query_params: List[Tuple[str, str]] = []
1998
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1999
+ _form_params: List[Tuple[str, str]] = []
2000
+ _files: Dict[
2001
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2002
+ ] = {}
2003
+ _body_params: Optional[bytes] = None
2004
+
2005
+ # process the path parameters
2006
+ # process the query parameters
2007
+ # process the header parameters
2008
+ # process the form parameters
2009
+ # process the body parameter
2010
+ if default_custom_field_value_dto is not None:
2011
+ _body_params = default_custom_field_value_dto
2012
+
2013
+
2014
+
2015
+ # set the HTTP header `Content-Type`
2016
+ if _content_type:
2017
+ _header_params['Content-Type'] = _content_type
2018
+ else:
2019
+ _default_content_type = (
2020
+ self.api_client.select_header_content_type(
2021
+ [
2022
+ 'application/json'
2023
+ ]
2024
+ )
2025
+ )
2026
+ if _default_content_type is not None:
2027
+ _header_params['Content-Type'] = _default_content_type
2028
+
2029
+ # authentication setting
2030
+ _auth_settings: List[str] = [
2031
+ ]
2032
+
2033
+ return self.api_client.param_serialize(
2034
+ method='POST',
2035
+ resource_path='/api/cfproject/default',
2036
+ path_params=_path_params,
2037
+ query_params=_query_params,
2038
+ header_params=_header_params,
2039
+ body=_body_params,
2040
+ post_params=_form_params,
2041
+ files=_files,
2042
+ auth_settings=_auth_settings,
2043
+ collection_formats=_collection_formats,
2044
+ _host=_host,
2045
+ _request_auth=_request_auth
2046
+ )
2047
+
2048
+
2049
+
2050
+
2051
+ @validate_call
2052
+ async def set_required(
2053
+ self,
2054
+ custom_field_id: StrictInt,
2055
+ project_id: StrictInt,
2056
+ required: StrictBool,
2057
+ _request_timeout: Union[
2058
+ None,
2059
+ Annotated[StrictFloat, Field(gt=0)],
2060
+ Tuple[
2061
+ Annotated[StrictFloat, Field(gt=0)],
2062
+ Annotated[StrictFloat, Field(gt=0)]
2063
+ ]
2064
+ ] = None,
2065
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2066
+ _content_type: Optional[StrictStr] = None,
2067
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2068
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2069
+ ) -> None:
2070
+ """(Deprecated) Deprecated. Use PATCH /api/project/{projectId}/cf/{cfId} instead
2071
+
2072
+
2073
+ :param custom_field_id: (required)
2074
+ :type custom_field_id: int
2075
+ :param project_id: (required)
2076
+ :type project_id: int
2077
+ :param required: (required)
2078
+ :type required: bool
2079
+ :param _request_timeout: timeout setting for this request. If one
2080
+ number provided, it will be total request
2081
+ timeout. It can also be a pair (tuple) of
2082
+ (connection, read) timeouts.
2083
+ :type _request_timeout: int, tuple(int, int), optional
2084
+ :param _request_auth: set to override the auth_settings for an a single
2085
+ request; this effectively ignores the
2086
+ authentication in the spec for a single request.
2087
+ :type _request_auth: dict, optional
2088
+ :param _content_type: force content-type for the request.
2089
+ :type _content_type: str, Optional
2090
+ :param _headers: set to override the headers for a single
2091
+ request; this effectively ignores the headers
2092
+ in the spec for a single request.
2093
+ :type _headers: dict, optional
2094
+ :param _host_index: set to override the host_index for a single
2095
+ request; this effectively ignores the host_index
2096
+ in the spec for a single request.
2097
+ :type _host_index: int, optional
2098
+ :return: Returns the result object.
2099
+ """ # noqa: E501
2100
+ warnings.warn("POST /api/cfproject/required is deprecated.", DeprecationWarning)
2101
+
2102
+ _param = self._set_required_serialize(
2103
+ custom_field_id=custom_field_id,
2104
+ project_id=project_id,
2105
+ required=required,
2106
+ _request_auth=_request_auth,
2107
+ _content_type=_content_type,
2108
+ _headers=_headers,
2109
+ _host_index=_host_index
2110
+ )
2111
+
2112
+ _response_types_map: Dict[str, Optional[str]] = {
2113
+ '202': None,
2114
+ }
2115
+ response_data = await self.api_client.call_api(
2116
+ *_param,
2117
+ _request_timeout=_request_timeout
2118
+ )
2119
+ await response_data.read()
2120
+ return self.api_client.response_deserialize(
2121
+ response_data=response_data,
2122
+ response_types_map=_response_types_map,
2123
+ ).data
2124
+
2125
+
2126
+ @validate_call
2127
+ async def set_required_with_http_info(
2128
+ self,
2129
+ custom_field_id: StrictInt,
2130
+ project_id: StrictInt,
2131
+ required: StrictBool,
2132
+ _request_timeout: Union[
2133
+ None,
2134
+ Annotated[StrictFloat, Field(gt=0)],
2135
+ Tuple[
2136
+ Annotated[StrictFloat, Field(gt=0)],
2137
+ Annotated[StrictFloat, Field(gt=0)]
2138
+ ]
2139
+ ] = None,
2140
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2141
+ _content_type: Optional[StrictStr] = None,
2142
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2143
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2144
+ ) -> ApiResponse[None]:
2145
+ """(Deprecated) Deprecated. Use PATCH /api/project/{projectId}/cf/{cfId} instead
2146
+
2147
+
2148
+ :param custom_field_id: (required)
2149
+ :type custom_field_id: int
2150
+ :param project_id: (required)
2151
+ :type project_id: int
2152
+ :param required: (required)
2153
+ :type required: bool
2154
+ :param _request_timeout: timeout setting for this request. If one
2155
+ number provided, it will be total request
2156
+ timeout. It can also be a pair (tuple) of
2157
+ (connection, read) timeouts.
2158
+ :type _request_timeout: int, tuple(int, int), optional
2159
+ :param _request_auth: set to override the auth_settings for an a single
2160
+ request; this effectively ignores the
2161
+ authentication in the spec for a single request.
2162
+ :type _request_auth: dict, optional
2163
+ :param _content_type: force content-type for the request.
2164
+ :type _content_type: str, Optional
2165
+ :param _headers: set to override the headers for a single
2166
+ request; this effectively ignores the headers
2167
+ in the spec for a single request.
2168
+ :type _headers: dict, optional
2169
+ :param _host_index: set to override the host_index for a single
2170
+ request; this effectively ignores the host_index
2171
+ in the spec for a single request.
2172
+ :type _host_index: int, optional
2173
+ :return: Returns the result object.
2174
+ """ # noqa: E501
2175
+ warnings.warn("POST /api/cfproject/required is deprecated.", DeprecationWarning)
2176
+
2177
+ _param = self._set_required_serialize(
2178
+ custom_field_id=custom_field_id,
2179
+ project_id=project_id,
2180
+ required=required,
2181
+ _request_auth=_request_auth,
2182
+ _content_type=_content_type,
2183
+ _headers=_headers,
2184
+ _host_index=_host_index
2185
+ )
2186
+
2187
+ _response_types_map: Dict[str, Optional[str]] = {
2188
+ '202': None,
2189
+ }
2190
+ response_data = await self.api_client.call_api(
2191
+ *_param,
2192
+ _request_timeout=_request_timeout
2193
+ )
2194
+ await response_data.read()
2195
+ return self.api_client.response_deserialize(
2196
+ response_data=response_data,
2197
+ response_types_map=_response_types_map,
2198
+ )
2199
+
2200
+
2201
+ @validate_call
2202
+ async def set_required_without_preload_content(
2203
+ self,
2204
+ custom_field_id: StrictInt,
2205
+ project_id: StrictInt,
2206
+ required: StrictBool,
2207
+ _request_timeout: Union[
2208
+ None,
2209
+ Annotated[StrictFloat, Field(gt=0)],
2210
+ Tuple[
2211
+ Annotated[StrictFloat, Field(gt=0)],
2212
+ Annotated[StrictFloat, Field(gt=0)]
2213
+ ]
2214
+ ] = None,
2215
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2216
+ _content_type: Optional[StrictStr] = None,
2217
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2218
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2219
+ ) -> RESTResponseType:
2220
+ """(Deprecated) Deprecated. Use PATCH /api/project/{projectId}/cf/{cfId} instead
2221
+
2222
+
2223
+ :param custom_field_id: (required)
2224
+ :type custom_field_id: int
2225
+ :param project_id: (required)
2226
+ :type project_id: int
2227
+ :param required: (required)
2228
+ :type required: bool
2229
+ :param _request_timeout: timeout setting for this request. If one
2230
+ number provided, it will be total request
2231
+ timeout. It can also be a pair (tuple) of
2232
+ (connection, read) timeouts.
2233
+ :type _request_timeout: int, tuple(int, int), optional
2234
+ :param _request_auth: set to override the auth_settings for an a single
2235
+ request; this effectively ignores the
2236
+ authentication in the spec for a single request.
2237
+ :type _request_auth: dict, optional
2238
+ :param _content_type: force content-type for the request.
2239
+ :type _content_type: str, Optional
2240
+ :param _headers: set to override the headers for a single
2241
+ request; this effectively ignores the headers
2242
+ in the spec for a single request.
2243
+ :type _headers: dict, optional
2244
+ :param _host_index: set to override the host_index for a single
2245
+ request; this effectively ignores the host_index
2246
+ in the spec for a single request.
2247
+ :type _host_index: int, optional
2248
+ :return: Returns the result object.
2249
+ """ # noqa: E501
2250
+ warnings.warn("POST /api/cfproject/required is deprecated.", DeprecationWarning)
2251
+
2252
+ _param = self._set_required_serialize(
2253
+ custom_field_id=custom_field_id,
2254
+ project_id=project_id,
2255
+ required=required,
2256
+ _request_auth=_request_auth,
2257
+ _content_type=_content_type,
2258
+ _headers=_headers,
2259
+ _host_index=_host_index
2260
+ )
2261
+
2262
+ _response_types_map: Dict[str, Optional[str]] = {
2263
+ '202': None,
2264
+ }
2265
+ response_data = await self.api_client.call_api(
2266
+ *_param,
2267
+ _request_timeout=_request_timeout
2268
+ )
2269
+ return response_data.response
2270
+
2271
+
2272
+ def _set_required_serialize(
2273
+ self,
2274
+ custom_field_id,
2275
+ project_id,
2276
+ required,
2277
+ _request_auth,
2278
+ _content_type,
2279
+ _headers,
2280
+ _host_index,
2281
+ ) -> RequestSerialized:
2282
+
2283
+ _host = None
2284
+
2285
+ _collection_formats: Dict[str, str] = {
2286
+ }
2287
+
2288
+ _path_params: Dict[str, str] = {}
2289
+ _query_params: List[Tuple[str, str]] = []
2290
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2291
+ _form_params: List[Tuple[str, str]] = []
2292
+ _files: Dict[
2293
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2294
+ ] = {}
2295
+ _body_params: Optional[bytes] = None
2296
+
2297
+ # process the path parameters
2298
+ # process the query parameters
2299
+ if custom_field_id is not None:
2300
+
2301
+ _query_params.append(('customFieldId', custom_field_id))
2302
+
2303
+ if project_id is not None:
2304
+
2305
+ _query_params.append(('projectId', project_id))
2306
+
2307
+ if required is not None:
2308
+
2309
+ _query_params.append(('required', required))
2310
+
2311
+ # process the header parameters
2312
+ # process the form parameters
2313
+ # process the body parameter
2314
+
2315
+
2316
+
2317
+
2318
+ # authentication setting
2319
+ _auth_settings: List[str] = [
2320
+ ]
2321
+
2322
+ return self.api_client.param_serialize(
2323
+ method='POST',
2324
+ resource_path='/api/cfproject/required',
2325
+ path_params=_path_params,
2326
+ query_params=_query_params,
2327
+ header_params=_header_params,
2328
+ body=_body_params,
2329
+ post_params=_form_params,
2330
+ files=_files,
2331
+ auth_settings=_auth_settings,
2332
+ collection_formats=_collection_formats,
2333
+ _host=_host,
2334
+ _request_auth=_request_auth
2335
+ )
2336
+
2337
+