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,2986 @@
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.page_project_dto import PageProjectDto
23
+ from src.client.generated.models.page_project_suggest_dto import PageProjectSuggestDto
24
+ from src.client.generated.models.project_create_dto import ProjectCreateDto
25
+ from src.client.generated.models.project_dto import ProjectDto
26
+ from src.client.generated.models.project_patch_dto import ProjectPatchDto
27
+ from src.client.generated.models.project_stats_dto import ProjectStatsDto
28
+ from src.client.generated.models.project_test_case_count_dto import ProjectTestCaseCountDto
29
+
30
+ from src.client.generated.api_client import ApiClient, RequestSerialized
31
+ from src.client.generated.api_response import ApiResponse
32
+ from src.client.generated.rest import RESTResponseType
33
+
34
+
35
+ class ProjectControllerApi:
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None) -> None:
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+
48
+ @validate_call
49
+ async def calculate_stats(
50
+ self,
51
+ id: StrictInt,
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
+ ) -> ProjectStatsDto:
65
+ """Find project stats by id
66
+
67
+
68
+ :param id: (required)
69
+ :type id: int
70
+ :param _request_timeout: timeout setting for this request. If one
71
+ number provided, it will be total request
72
+ timeout. It can also be a pair (tuple) of
73
+ (connection, read) timeouts.
74
+ :type _request_timeout: int, tuple(int, int), optional
75
+ :param _request_auth: set to override the auth_settings for an a single
76
+ request; this effectively ignores the
77
+ authentication in the spec for a single request.
78
+ :type _request_auth: dict, optional
79
+ :param _content_type: force content-type for the request.
80
+ :type _content_type: str, Optional
81
+ :param _headers: set to override the headers for a single
82
+ request; this effectively ignores the headers
83
+ in the spec for a single request.
84
+ :type _headers: dict, optional
85
+ :param _host_index: set to override the host_index for a single
86
+ request; this effectively ignores the host_index
87
+ in the spec for a single request.
88
+ :type _host_index: int, optional
89
+ :return: Returns the result object.
90
+ """ # noqa: E501
91
+
92
+ _param = self._calculate_stats_serialize(
93
+ id=id,
94
+ _request_auth=_request_auth,
95
+ _content_type=_content_type,
96
+ _headers=_headers,
97
+ _host_index=_host_index
98
+ )
99
+
100
+ _response_types_map: Dict[str, Optional[str]] = {
101
+ '200': "ProjectStatsDto",
102
+ }
103
+ response_data = await self.api_client.call_api(
104
+ *_param,
105
+ _request_timeout=_request_timeout
106
+ )
107
+ await response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+
114
+ @validate_call
115
+ async def calculate_stats_with_http_info(
116
+ self,
117
+ id: StrictInt,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)],
123
+ Annotated[StrictFloat, Field(gt=0)]
124
+ ]
125
+ ] = None,
126
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
127
+ _content_type: Optional[StrictStr] = None,
128
+ _headers: Optional[Dict[StrictStr, Any]] = None,
129
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
130
+ ) -> ApiResponse[ProjectStatsDto]:
131
+ """Find project stats by id
132
+
133
+
134
+ :param id: (required)
135
+ :type id: int
136
+ :param _request_timeout: timeout setting for this request. If one
137
+ number provided, it will be total request
138
+ timeout. It can also be a pair (tuple) of
139
+ (connection, read) timeouts.
140
+ :type _request_timeout: int, tuple(int, int), optional
141
+ :param _request_auth: set to override the auth_settings for an a single
142
+ request; this effectively ignores the
143
+ authentication in the spec for a single request.
144
+ :type _request_auth: dict, optional
145
+ :param _content_type: force content-type for the request.
146
+ :type _content_type: str, Optional
147
+ :param _headers: set to override the headers for a single
148
+ request; this effectively ignores the headers
149
+ in the spec for a single request.
150
+ :type _headers: dict, optional
151
+ :param _host_index: set to override the host_index for a single
152
+ request; this effectively ignores the host_index
153
+ in the spec for a single request.
154
+ :type _host_index: int, optional
155
+ :return: Returns the result object.
156
+ """ # noqa: E501
157
+
158
+ _param = self._calculate_stats_serialize(
159
+ id=id,
160
+ _request_auth=_request_auth,
161
+ _content_type=_content_type,
162
+ _headers=_headers,
163
+ _host_index=_host_index
164
+ )
165
+
166
+ _response_types_map: Dict[str, Optional[str]] = {
167
+ '200': "ProjectStatsDto",
168
+ }
169
+ response_data = await self.api_client.call_api(
170
+ *_param,
171
+ _request_timeout=_request_timeout
172
+ )
173
+ await response_data.read()
174
+ return self.api_client.response_deserialize(
175
+ response_data=response_data,
176
+ response_types_map=_response_types_map,
177
+ )
178
+
179
+
180
+ @validate_call
181
+ async def calculate_stats_without_preload_content(
182
+ self,
183
+ id: StrictInt,
184
+ _request_timeout: Union[
185
+ None,
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Tuple[
188
+ Annotated[StrictFloat, Field(gt=0)],
189
+ Annotated[StrictFloat, Field(gt=0)]
190
+ ]
191
+ ] = None,
192
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
193
+ _content_type: Optional[StrictStr] = None,
194
+ _headers: Optional[Dict[StrictStr, Any]] = None,
195
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
196
+ ) -> RESTResponseType:
197
+ """Find project stats by id
198
+
199
+
200
+ :param id: (required)
201
+ :type id: int
202
+ :param _request_timeout: timeout setting for this request. If one
203
+ number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :type _request_timeout: int, tuple(int, int), optional
207
+ :param _request_auth: set to override the auth_settings for an a single
208
+ request; this effectively ignores the
209
+ authentication in the spec for a single request.
210
+ :type _request_auth: dict, optional
211
+ :param _content_type: force content-type for the request.
212
+ :type _content_type: str, Optional
213
+ :param _headers: set to override the headers for a single
214
+ request; this effectively ignores the headers
215
+ in the spec for a single request.
216
+ :type _headers: dict, optional
217
+ :param _host_index: set to override the host_index for a single
218
+ request; this effectively ignores the host_index
219
+ in the spec for a single request.
220
+ :type _host_index: int, optional
221
+ :return: Returns the result object.
222
+ """ # noqa: E501
223
+
224
+ _param = self._calculate_stats_serialize(
225
+ id=id,
226
+ _request_auth=_request_auth,
227
+ _content_type=_content_type,
228
+ _headers=_headers,
229
+ _host_index=_host_index
230
+ )
231
+
232
+ _response_types_map: Dict[str, Optional[str]] = {
233
+ '200': "ProjectStatsDto",
234
+ }
235
+ response_data = await self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _calculate_stats_serialize(
243
+ self,
244
+ id,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[
261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
262
+ ] = {}
263
+ _body_params: Optional[bytes] = None
264
+
265
+ # process the path parameters
266
+ if id is not None:
267
+ _path_params['id'] = id
268
+ # process the query parameters
269
+ # process the header parameters
270
+ # process the form parameters
271
+ # process the body parameter
272
+
273
+
274
+ # set the HTTP header `Accept`
275
+ if 'Accept' not in _header_params:
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ [
278
+ '*/*'
279
+ ]
280
+ )
281
+
282
+
283
+ # authentication setting
284
+ _auth_settings: List[str] = [
285
+ ]
286
+
287
+ return self.api_client.param_serialize(
288
+ method='GET',
289
+ resource_path='/api/project/{id}/stats',
290
+ path_params=_path_params,
291
+ query_params=_query_params,
292
+ header_params=_header_params,
293
+ body=_body_params,
294
+ post_params=_form_params,
295
+ files=_files,
296
+ auth_settings=_auth_settings,
297
+ collection_formats=_collection_formats,
298
+ _host=_host,
299
+ _request_auth=_request_auth
300
+ )
301
+
302
+
303
+
304
+
305
+ @validate_call
306
+ async def count_test_cases_in_projects(
307
+ self,
308
+ id: List[StrictInt],
309
+ custom_field_id: StrictInt,
310
+ deleted: Optional[StrictBool] = None,
311
+ _request_timeout: Union[
312
+ None,
313
+ Annotated[StrictFloat, Field(gt=0)],
314
+ Tuple[
315
+ Annotated[StrictFloat, Field(gt=0)],
316
+ Annotated[StrictFloat, Field(gt=0)]
317
+ ]
318
+ ] = None,
319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
320
+ _content_type: Optional[StrictStr] = None,
321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
323
+ ) -> List[ProjectTestCaseCountDto]:
324
+ """Count test cases in projects that use specified custom field
325
+
326
+
327
+ :param id: (required)
328
+ :type id: List[int]
329
+ :param custom_field_id: (required)
330
+ :type custom_field_id: int
331
+ :param deleted:
332
+ :type deleted: bool
333
+ :param _request_timeout: timeout setting for this request. If one
334
+ number provided, it will be total request
335
+ timeout. It can also be a pair (tuple) of
336
+ (connection, read) timeouts.
337
+ :type _request_timeout: int, tuple(int, int), optional
338
+ :param _request_auth: set to override the auth_settings for an a single
339
+ request; this effectively ignores the
340
+ authentication in the spec for a single request.
341
+ :type _request_auth: dict, optional
342
+ :param _content_type: force content-type for the request.
343
+ :type _content_type: str, Optional
344
+ :param _headers: set to override the headers for a single
345
+ request; this effectively ignores the headers
346
+ in the spec for a single request.
347
+ :type _headers: dict, optional
348
+ :param _host_index: set to override the host_index for a single
349
+ request; this effectively ignores the host_index
350
+ in the spec for a single request.
351
+ :type _host_index: int, optional
352
+ :return: Returns the result object.
353
+ """ # noqa: E501
354
+
355
+ _param = self._count_test_cases_in_projects_serialize(
356
+ id=id,
357
+ custom_field_id=custom_field_id,
358
+ deleted=deleted,
359
+ _request_auth=_request_auth,
360
+ _content_type=_content_type,
361
+ _headers=_headers,
362
+ _host_index=_host_index
363
+ )
364
+
365
+ _response_types_map: Dict[str, Optional[str]] = {
366
+ '200': "List[ProjectTestCaseCountDto]",
367
+ }
368
+ response_data = await self.api_client.call_api(
369
+ *_param,
370
+ _request_timeout=_request_timeout
371
+ )
372
+ await response_data.read()
373
+ return self.api_client.response_deserialize(
374
+ response_data=response_data,
375
+ response_types_map=_response_types_map,
376
+ ).data
377
+
378
+
379
+ @validate_call
380
+ async def count_test_cases_in_projects_with_http_info(
381
+ self,
382
+ id: List[StrictInt],
383
+ custom_field_id: StrictInt,
384
+ deleted: Optional[StrictBool] = None,
385
+ _request_timeout: Union[
386
+ None,
387
+ Annotated[StrictFloat, Field(gt=0)],
388
+ Tuple[
389
+ Annotated[StrictFloat, Field(gt=0)],
390
+ Annotated[StrictFloat, Field(gt=0)]
391
+ ]
392
+ ] = None,
393
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
394
+ _content_type: Optional[StrictStr] = None,
395
+ _headers: Optional[Dict[StrictStr, Any]] = None,
396
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
397
+ ) -> ApiResponse[List[ProjectTestCaseCountDto]]:
398
+ """Count test cases in projects that use specified custom field
399
+
400
+
401
+ :param id: (required)
402
+ :type id: List[int]
403
+ :param custom_field_id: (required)
404
+ :type custom_field_id: int
405
+ :param deleted:
406
+ :type deleted: bool
407
+ :param _request_timeout: timeout setting for this request. If one
408
+ number provided, it will be total request
409
+ timeout. It can also be a pair (tuple) of
410
+ (connection, read) timeouts.
411
+ :type _request_timeout: int, tuple(int, int), optional
412
+ :param _request_auth: set to override the auth_settings for an a single
413
+ request; this effectively ignores the
414
+ authentication in the spec for a single request.
415
+ :type _request_auth: dict, optional
416
+ :param _content_type: force content-type for the request.
417
+ :type _content_type: str, Optional
418
+ :param _headers: set to override the headers for a single
419
+ request; this effectively ignores the headers
420
+ in the spec for a single request.
421
+ :type _headers: dict, optional
422
+ :param _host_index: set to override the host_index for a single
423
+ request; this effectively ignores the host_index
424
+ in the spec for a single request.
425
+ :type _host_index: int, optional
426
+ :return: Returns the result object.
427
+ """ # noqa: E501
428
+
429
+ _param = self._count_test_cases_in_projects_serialize(
430
+ id=id,
431
+ custom_field_id=custom_field_id,
432
+ deleted=deleted,
433
+ _request_auth=_request_auth,
434
+ _content_type=_content_type,
435
+ _headers=_headers,
436
+ _host_index=_host_index
437
+ )
438
+
439
+ _response_types_map: Dict[str, Optional[str]] = {
440
+ '200': "List[ProjectTestCaseCountDto]",
441
+ }
442
+ response_data = await self.api_client.call_api(
443
+ *_param,
444
+ _request_timeout=_request_timeout
445
+ )
446
+ await response_data.read()
447
+ return self.api_client.response_deserialize(
448
+ response_data=response_data,
449
+ response_types_map=_response_types_map,
450
+ )
451
+
452
+
453
+ @validate_call
454
+ async def count_test_cases_in_projects_without_preload_content(
455
+ self,
456
+ id: List[StrictInt],
457
+ custom_field_id: StrictInt,
458
+ deleted: Optional[StrictBool] = None,
459
+ _request_timeout: Union[
460
+ None,
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Tuple[
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Annotated[StrictFloat, Field(gt=0)]
465
+ ]
466
+ ] = None,
467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
468
+ _content_type: Optional[StrictStr] = None,
469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
471
+ ) -> RESTResponseType:
472
+ """Count test cases in projects that use specified custom field
473
+
474
+
475
+ :param id: (required)
476
+ :type id: List[int]
477
+ :param custom_field_id: (required)
478
+ :type custom_field_id: int
479
+ :param deleted:
480
+ :type deleted: bool
481
+ :param _request_timeout: timeout setting for this request. If one
482
+ number provided, it will be total request
483
+ timeout. It can also be a pair (tuple) of
484
+ (connection, read) timeouts.
485
+ :type _request_timeout: int, tuple(int, int), optional
486
+ :param _request_auth: set to override the auth_settings for an a single
487
+ request; this effectively ignores the
488
+ authentication in the spec for a single request.
489
+ :type _request_auth: dict, optional
490
+ :param _content_type: force content-type for the request.
491
+ :type _content_type: str, Optional
492
+ :param _headers: set to override the headers for a single
493
+ request; this effectively ignores the headers
494
+ in the spec for a single request.
495
+ :type _headers: dict, optional
496
+ :param _host_index: set to override the host_index for a single
497
+ request; this effectively ignores the host_index
498
+ in the spec for a single request.
499
+ :type _host_index: int, optional
500
+ :return: Returns the result object.
501
+ """ # noqa: E501
502
+
503
+ _param = self._count_test_cases_in_projects_serialize(
504
+ id=id,
505
+ custom_field_id=custom_field_id,
506
+ deleted=deleted,
507
+ _request_auth=_request_auth,
508
+ _content_type=_content_type,
509
+ _headers=_headers,
510
+ _host_index=_host_index
511
+ )
512
+
513
+ _response_types_map: Dict[str, Optional[str]] = {
514
+ '200': "List[ProjectTestCaseCountDto]",
515
+ }
516
+ response_data = await self.api_client.call_api(
517
+ *_param,
518
+ _request_timeout=_request_timeout
519
+ )
520
+ return response_data.response
521
+
522
+
523
+ def _count_test_cases_in_projects_serialize(
524
+ self,
525
+ id,
526
+ custom_field_id,
527
+ deleted,
528
+ _request_auth,
529
+ _content_type,
530
+ _headers,
531
+ _host_index,
532
+ ) -> RequestSerialized:
533
+
534
+ _host = None
535
+
536
+ _collection_formats: Dict[str, str] = {
537
+ 'id': 'multi',
538
+ }
539
+
540
+ _path_params: Dict[str, str] = {}
541
+ _query_params: List[Tuple[str, str]] = []
542
+ _header_params: Dict[str, Optional[str]] = _headers or {}
543
+ _form_params: List[Tuple[str, str]] = []
544
+ _files: Dict[
545
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
546
+ ] = {}
547
+ _body_params: Optional[bytes] = None
548
+
549
+ # process the path parameters
550
+ # process the query parameters
551
+ if id is not None:
552
+
553
+ _query_params.append(('id', id))
554
+
555
+ if custom_field_id is not None:
556
+
557
+ _query_params.append(('customFieldId', custom_field_id))
558
+
559
+ if deleted is not None:
560
+
561
+ _query_params.append(('deleted', deleted))
562
+
563
+ # process the header parameters
564
+ # process the form parameters
565
+ # process the body parameter
566
+
567
+
568
+ # set the HTTP header `Accept`
569
+ if 'Accept' not in _header_params:
570
+ _header_params['Accept'] = self.api_client.select_header_accept(
571
+ [
572
+ '*/*'
573
+ ]
574
+ )
575
+
576
+
577
+ # authentication setting
578
+ _auth_settings: List[str] = [
579
+ ]
580
+
581
+ return self.api_client.param_serialize(
582
+ method='GET',
583
+ resource_path='/api/project/count-test-cases',
584
+ path_params=_path_params,
585
+ query_params=_query_params,
586
+ header_params=_header_params,
587
+ body=_body_params,
588
+ post_params=_form_params,
589
+ files=_files,
590
+ auth_settings=_auth_settings,
591
+ collection_formats=_collection_formats,
592
+ _host=_host,
593
+ _request_auth=_request_auth
594
+ )
595
+
596
+
597
+
598
+
599
+ @validate_call
600
+ async def create25(
601
+ self,
602
+ project_create_dto: ProjectCreateDto,
603
+ _request_timeout: Union[
604
+ None,
605
+ Annotated[StrictFloat, Field(gt=0)],
606
+ Tuple[
607
+ Annotated[StrictFloat, Field(gt=0)],
608
+ Annotated[StrictFloat, Field(gt=0)]
609
+ ]
610
+ ] = None,
611
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
612
+ _content_type: Optional[StrictStr] = None,
613
+ _headers: Optional[Dict[StrictStr, Any]] = None,
614
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
615
+ ) -> ProjectDto:
616
+ """Create a new project
617
+
618
+
619
+ :param project_create_dto: (required)
620
+ :type project_create_dto: ProjectCreateDto
621
+ :param _request_timeout: timeout setting for this request. If one
622
+ number provided, it will be total request
623
+ timeout. It can also be a pair (tuple) of
624
+ (connection, read) timeouts.
625
+ :type _request_timeout: int, tuple(int, int), optional
626
+ :param _request_auth: set to override the auth_settings for an a single
627
+ request; this effectively ignores the
628
+ authentication in the spec for a single request.
629
+ :type _request_auth: dict, optional
630
+ :param _content_type: force content-type for the request.
631
+ :type _content_type: str, Optional
632
+ :param _headers: set to override the headers for a single
633
+ request; this effectively ignores the headers
634
+ in the spec for a single request.
635
+ :type _headers: dict, optional
636
+ :param _host_index: set to override the host_index for a single
637
+ request; this effectively ignores the host_index
638
+ in the spec for a single request.
639
+ :type _host_index: int, optional
640
+ :return: Returns the result object.
641
+ """ # noqa: E501
642
+
643
+ _param = self._create25_serialize(
644
+ project_create_dto=project_create_dto,
645
+ _request_auth=_request_auth,
646
+ _content_type=_content_type,
647
+ _headers=_headers,
648
+ _host_index=_host_index
649
+ )
650
+
651
+ _response_types_map: Dict[str, Optional[str]] = {
652
+ '200': "ProjectDto",
653
+ }
654
+ response_data = await self.api_client.call_api(
655
+ *_param,
656
+ _request_timeout=_request_timeout
657
+ )
658
+ await response_data.read()
659
+ return self.api_client.response_deserialize(
660
+ response_data=response_data,
661
+ response_types_map=_response_types_map,
662
+ ).data
663
+
664
+
665
+ @validate_call
666
+ async def create25_with_http_info(
667
+ self,
668
+ project_create_dto: ProjectCreateDto,
669
+ _request_timeout: Union[
670
+ None,
671
+ Annotated[StrictFloat, Field(gt=0)],
672
+ Tuple[
673
+ Annotated[StrictFloat, Field(gt=0)],
674
+ Annotated[StrictFloat, Field(gt=0)]
675
+ ]
676
+ ] = None,
677
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
678
+ _content_type: Optional[StrictStr] = None,
679
+ _headers: Optional[Dict[StrictStr, Any]] = None,
680
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
681
+ ) -> ApiResponse[ProjectDto]:
682
+ """Create a new project
683
+
684
+
685
+ :param project_create_dto: (required)
686
+ :type project_create_dto: ProjectCreateDto
687
+ :param _request_timeout: timeout setting for this request. If one
688
+ number provided, it will be total request
689
+ timeout. It can also be a pair (tuple) of
690
+ (connection, read) timeouts.
691
+ :type _request_timeout: int, tuple(int, int), optional
692
+ :param _request_auth: set to override the auth_settings for an a single
693
+ request; this effectively ignores the
694
+ authentication in the spec for a single request.
695
+ :type _request_auth: dict, optional
696
+ :param _content_type: force content-type for the request.
697
+ :type _content_type: str, Optional
698
+ :param _headers: set to override the headers for a single
699
+ request; this effectively ignores the headers
700
+ in the spec for a single request.
701
+ :type _headers: dict, optional
702
+ :param _host_index: set to override the host_index for a single
703
+ request; this effectively ignores the host_index
704
+ in the spec for a single request.
705
+ :type _host_index: int, optional
706
+ :return: Returns the result object.
707
+ """ # noqa: E501
708
+
709
+ _param = self._create25_serialize(
710
+ project_create_dto=project_create_dto,
711
+ _request_auth=_request_auth,
712
+ _content_type=_content_type,
713
+ _headers=_headers,
714
+ _host_index=_host_index
715
+ )
716
+
717
+ _response_types_map: Dict[str, Optional[str]] = {
718
+ '200': "ProjectDto",
719
+ }
720
+ response_data = await self.api_client.call_api(
721
+ *_param,
722
+ _request_timeout=_request_timeout
723
+ )
724
+ await response_data.read()
725
+ return self.api_client.response_deserialize(
726
+ response_data=response_data,
727
+ response_types_map=_response_types_map,
728
+ )
729
+
730
+
731
+ @validate_call
732
+ async def create25_without_preload_content(
733
+ self,
734
+ project_create_dto: ProjectCreateDto,
735
+ _request_timeout: Union[
736
+ None,
737
+ Annotated[StrictFloat, Field(gt=0)],
738
+ Tuple[
739
+ Annotated[StrictFloat, Field(gt=0)],
740
+ Annotated[StrictFloat, Field(gt=0)]
741
+ ]
742
+ ] = None,
743
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
744
+ _content_type: Optional[StrictStr] = None,
745
+ _headers: Optional[Dict[StrictStr, Any]] = None,
746
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
747
+ ) -> RESTResponseType:
748
+ """Create a new project
749
+
750
+
751
+ :param project_create_dto: (required)
752
+ :type project_create_dto: ProjectCreateDto
753
+ :param _request_timeout: timeout setting for this request. If one
754
+ number provided, it will be total request
755
+ timeout. It can also be a pair (tuple) of
756
+ (connection, read) timeouts.
757
+ :type _request_timeout: int, tuple(int, int), optional
758
+ :param _request_auth: set to override the auth_settings for an a single
759
+ request; this effectively ignores the
760
+ authentication in the spec for a single request.
761
+ :type _request_auth: dict, optional
762
+ :param _content_type: force content-type for the request.
763
+ :type _content_type: str, Optional
764
+ :param _headers: set to override the headers for a single
765
+ request; this effectively ignores the headers
766
+ in the spec for a single request.
767
+ :type _headers: dict, optional
768
+ :param _host_index: set to override the host_index for a single
769
+ request; this effectively ignores the host_index
770
+ in the spec for a single request.
771
+ :type _host_index: int, optional
772
+ :return: Returns the result object.
773
+ """ # noqa: E501
774
+
775
+ _param = self._create25_serialize(
776
+ project_create_dto=project_create_dto,
777
+ _request_auth=_request_auth,
778
+ _content_type=_content_type,
779
+ _headers=_headers,
780
+ _host_index=_host_index
781
+ )
782
+
783
+ _response_types_map: Dict[str, Optional[str]] = {
784
+ '200': "ProjectDto",
785
+ }
786
+ response_data = await self.api_client.call_api(
787
+ *_param,
788
+ _request_timeout=_request_timeout
789
+ )
790
+ return response_data.response
791
+
792
+
793
+ def _create25_serialize(
794
+ self,
795
+ project_create_dto,
796
+ _request_auth,
797
+ _content_type,
798
+ _headers,
799
+ _host_index,
800
+ ) -> RequestSerialized:
801
+
802
+ _host = None
803
+
804
+ _collection_formats: Dict[str, str] = {
805
+ }
806
+
807
+ _path_params: Dict[str, str] = {}
808
+ _query_params: List[Tuple[str, str]] = []
809
+ _header_params: Dict[str, Optional[str]] = _headers or {}
810
+ _form_params: List[Tuple[str, str]] = []
811
+ _files: Dict[
812
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
813
+ ] = {}
814
+ _body_params: Optional[bytes] = None
815
+
816
+ # process the path parameters
817
+ # process the query parameters
818
+ # process the header parameters
819
+ # process the form parameters
820
+ # process the body parameter
821
+ if project_create_dto is not None:
822
+ _body_params = project_create_dto
823
+
824
+
825
+ # set the HTTP header `Accept`
826
+ if 'Accept' not in _header_params:
827
+ _header_params['Accept'] = self.api_client.select_header_accept(
828
+ [
829
+ '*/*'
830
+ ]
831
+ )
832
+
833
+ # set the HTTP header `Content-Type`
834
+ if _content_type:
835
+ _header_params['Content-Type'] = _content_type
836
+ else:
837
+ _default_content_type = (
838
+ self.api_client.select_header_content_type(
839
+ [
840
+ 'application/json'
841
+ ]
842
+ )
843
+ )
844
+ if _default_content_type is not None:
845
+ _header_params['Content-Type'] = _default_content_type
846
+
847
+ # authentication setting
848
+ _auth_settings: List[str] = [
849
+ ]
850
+
851
+ return self.api_client.param_serialize(
852
+ method='POST',
853
+ resource_path='/api/project',
854
+ path_params=_path_params,
855
+ query_params=_query_params,
856
+ header_params=_header_params,
857
+ body=_body_params,
858
+ post_params=_form_params,
859
+ files=_files,
860
+ auth_settings=_auth_settings,
861
+ collection_formats=_collection_formats,
862
+ _host=_host,
863
+ _request_auth=_request_auth
864
+ )
865
+
866
+
867
+
868
+
869
+ @validate_call
870
+ async def delete23(
871
+ self,
872
+ id: StrictInt,
873
+ _request_timeout: Union[
874
+ None,
875
+ Annotated[StrictFloat, Field(gt=0)],
876
+ Tuple[
877
+ Annotated[StrictFloat, Field(gt=0)],
878
+ Annotated[StrictFloat, Field(gt=0)]
879
+ ]
880
+ ] = None,
881
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
882
+ _content_type: Optional[StrictStr] = None,
883
+ _headers: Optional[Dict[StrictStr, Any]] = None,
884
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
885
+ ) -> None:
886
+ """Delete project by id
887
+
888
+
889
+ :param id: (required)
890
+ :type id: int
891
+ :param _request_timeout: timeout setting for this request. If one
892
+ number provided, it will be total request
893
+ timeout. It can also be a pair (tuple) of
894
+ (connection, read) timeouts.
895
+ :type _request_timeout: int, tuple(int, int), optional
896
+ :param _request_auth: set to override the auth_settings for an a single
897
+ request; this effectively ignores the
898
+ authentication in the spec for a single request.
899
+ :type _request_auth: dict, optional
900
+ :param _content_type: force content-type for the request.
901
+ :type _content_type: str, Optional
902
+ :param _headers: set to override the headers for a single
903
+ request; this effectively ignores the headers
904
+ in the spec for a single request.
905
+ :type _headers: dict, optional
906
+ :param _host_index: set to override the host_index for a single
907
+ request; this effectively ignores the host_index
908
+ in the spec for a single request.
909
+ :type _host_index: int, optional
910
+ :return: Returns the result object.
911
+ """ # noqa: E501
912
+
913
+ _param = self._delete23_serialize(
914
+ id=id,
915
+ _request_auth=_request_auth,
916
+ _content_type=_content_type,
917
+ _headers=_headers,
918
+ _host_index=_host_index
919
+ )
920
+
921
+ _response_types_map: Dict[str, Optional[str]] = {
922
+ '204': None,
923
+ }
924
+ response_data = await self.api_client.call_api(
925
+ *_param,
926
+ _request_timeout=_request_timeout
927
+ )
928
+ await response_data.read()
929
+ return self.api_client.response_deserialize(
930
+ response_data=response_data,
931
+ response_types_map=_response_types_map,
932
+ ).data
933
+
934
+
935
+ @validate_call
936
+ async def delete23_with_http_info(
937
+ self,
938
+ id: StrictInt,
939
+ _request_timeout: Union[
940
+ None,
941
+ Annotated[StrictFloat, Field(gt=0)],
942
+ Tuple[
943
+ Annotated[StrictFloat, Field(gt=0)],
944
+ Annotated[StrictFloat, Field(gt=0)]
945
+ ]
946
+ ] = None,
947
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
948
+ _content_type: Optional[StrictStr] = None,
949
+ _headers: Optional[Dict[StrictStr, Any]] = None,
950
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
951
+ ) -> ApiResponse[None]:
952
+ """Delete project by id
953
+
954
+
955
+ :param id: (required)
956
+ :type id: int
957
+ :param _request_timeout: timeout setting for this request. If one
958
+ number provided, it will be total request
959
+ timeout. It can also be a pair (tuple) of
960
+ (connection, read) timeouts.
961
+ :type _request_timeout: int, tuple(int, int), optional
962
+ :param _request_auth: set to override the auth_settings for an a single
963
+ request; this effectively ignores the
964
+ authentication in the spec for a single request.
965
+ :type _request_auth: dict, optional
966
+ :param _content_type: force content-type for the request.
967
+ :type _content_type: str, Optional
968
+ :param _headers: set to override the headers for a single
969
+ request; this effectively ignores the headers
970
+ in the spec for a single request.
971
+ :type _headers: dict, optional
972
+ :param _host_index: set to override the host_index for a single
973
+ request; this effectively ignores the host_index
974
+ in the spec for a single request.
975
+ :type _host_index: int, optional
976
+ :return: Returns the result object.
977
+ """ # noqa: E501
978
+
979
+ _param = self._delete23_serialize(
980
+ id=id,
981
+ _request_auth=_request_auth,
982
+ _content_type=_content_type,
983
+ _headers=_headers,
984
+ _host_index=_host_index
985
+ )
986
+
987
+ _response_types_map: Dict[str, Optional[str]] = {
988
+ '204': None,
989
+ }
990
+ response_data = await self.api_client.call_api(
991
+ *_param,
992
+ _request_timeout=_request_timeout
993
+ )
994
+ await response_data.read()
995
+ return self.api_client.response_deserialize(
996
+ response_data=response_data,
997
+ response_types_map=_response_types_map,
998
+ )
999
+
1000
+
1001
+ @validate_call
1002
+ async def delete23_without_preload_content(
1003
+ self,
1004
+ id: StrictInt,
1005
+ _request_timeout: Union[
1006
+ None,
1007
+ Annotated[StrictFloat, Field(gt=0)],
1008
+ Tuple[
1009
+ Annotated[StrictFloat, Field(gt=0)],
1010
+ Annotated[StrictFloat, Field(gt=0)]
1011
+ ]
1012
+ ] = None,
1013
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1014
+ _content_type: Optional[StrictStr] = None,
1015
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1016
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1017
+ ) -> RESTResponseType:
1018
+ """Delete project by id
1019
+
1020
+
1021
+ :param id: (required)
1022
+ :type id: int
1023
+ :param _request_timeout: timeout setting for this request. If one
1024
+ number provided, it will be total request
1025
+ timeout. It can also be a pair (tuple) of
1026
+ (connection, read) timeouts.
1027
+ :type _request_timeout: int, tuple(int, int), optional
1028
+ :param _request_auth: set to override the auth_settings for an a single
1029
+ request; this effectively ignores the
1030
+ authentication in the spec for a single request.
1031
+ :type _request_auth: dict, optional
1032
+ :param _content_type: force content-type for the request.
1033
+ :type _content_type: str, Optional
1034
+ :param _headers: set to override the headers for a single
1035
+ request; this effectively ignores the headers
1036
+ in the spec for a single request.
1037
+ :type _headers: dict, optional
1038
+ :param _host_index: set to override the host_index for a single
1039
+ request; this effectively ignores the host_index
1040
+ in the spec for a single request.
1041
+ :type _host_index: int, optional
1042
+ :return: Returns the result object.
1043
+ """ # noqa: E501
1044
+
1045
+ _param = self._delete23_serialize(
1046
+ id=id,
1047
+ _request_auth=_request_auth,
1048
+ _content_type=_content_type,
1049
+ _headers=_headers,
1050
+ _host_index=_host_index
1051
+ )
1052
+
1053
+ _response_types_map: Dict[str, Optional[str]] = {
1054
+ '204': None,
1055
+ }
1056
+ response_data = await self.api_client.call_api(
1057
+ *_param,
1058
+ _request_timeout=_request_timeout
1059
+ )
1060
+ return response_data.response
1061
+
1062
+
1063
+ def _delete23_serialize(
1064
+ self,
1065
+ id,
1066
+ _request_auth,
1067
+ _content_type,
1068
+ _headers,
1069
+ _host_index,
1070
+ ) -> RequestSerialized:
1071
+
1072
+ _host = None
1073
+
1074
+ _collection_formats: Dict[str, str] = {
1075
+ }
1076
+
1077
+ _path_params: Dict[str, str] = {}
1078
+ _query_params: List[Tuple[str, str]] = []
1079
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1080
+ _form_params: List[Tuple[str, str]] = []
1081
+ _files: Dict[
1082
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1083
+ ] = {}
1084
+ _body_params: Optional[bytes] = None
1085
+
1086
+ # process the path parameters
1087
+ if id is not None:
1088
+ _path_params['id'] = id
1089
+ # process the query parameters
1090
+ # process the header parameters
1091
+ # process the form parameters
1092
+ # process the body parameter
1093
+
1094
+
1095
+
1096
+
1097
+ # authentication setting
1098
+ _auth_settings: List[str] = [
1099
+ ]
1100
+
1101
+ return self.api_client.param_serialize(
1102
+ method='DELETE',
1103
+ resource_path='/api/project/{id}',
1104
+ path_params=_path_params,
1105
+ query_params=_query_params,
1106
+ header_params=_header_params,
1107
+ body=_body_params,
1108
+ post_params=_form_params,
1109
+ files=_files,
1110
+ auth_settings=_auth_settings,
1111
+ collection_formats=_collection_formats,
1112
+ _host=_host,
1113
+ _request_auth=_request_auth
1114
+ )
1115
+
1116
+
1117
+
1118
+
1119
+ @validate_call
1120
+ async def find_all21(
1121
+ self,
1122
+ query: Optional[StrictStr] = None,
1123
+ my: Optional[StrictBool] = None,
1124
+ favorite: Optional[StrictBool] = None,
1125
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1126
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1127
+ 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,
1128
+ _request_timeout: Union[
1129
+ None,
1130
+ Annotated[StrictFloat, Field(gt=0)],
1131
+ Tuple[
1132
+ Annotated[StrictFloat, Field(gt=0)],
1133
+ Annotated[StrictFloat, Field(gt=0)]
1134
+ ]
1135
+ ] = None,
1136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1137
+ _content_type: Optional[StrictStr] = None,
1138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1140
+ ) -> PageProjectDto:
1141
+ """Find all projects
1142
+
1143
+
1144
+ :param query:
1145
+ :type query: str
1146
+ :param my:
1147
+ :type my: bool
1148
+ :param favorite:
1149
+ :type favorite: bool
1150
+ :param page: Zero-based page index (0..N)
1151
+ :type page: int
1152
+ :param size: The size of the page to be returned
1153
+ :type size: int
1154
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1155
+ :type sort: List[str]
1156
+ :param _request_timeout: timeout setting for this request. If one
1157
+ number provided, it will be total request
1158
+ timeout. It can also be a pair (tuple) of
1159
+ (connection, read) timeouts.
1160
+ :type _request_timeout: int, tuple(int, int), optional
1161
+ :param _request_auth: set to override the auth_settings for an a single
1162
+ request; this effectively ignores the
1163
+ authentication in the spec for a single request.
1164
+ :type _request_auth: dict, optional
1165
+ :param _content_type: force content-type for the request.
1166
+ :type _content_type: str, Optional
1167
+ :param _headers: set to override the headers for a single
1168
+ request; this effectively ignores the headers
1169
+ in the spec for a single request.
1170
+ :type _headers: dict, optional
1171
+ :param _host_index: set to override the host_index for a single
1172
+ request; this effectively ignores the host_index
1173
+ in the spec for a single request.
1174
+ :type _host_index: int, optional
1175
+ :return: Returns the result object.
1176
+ """ # noqa: E501
1177
+
1178
+ _param = self._find_all21_serialize(
1179
+ query=query,
1180
+ my=my,
1181
+ favorite=favorite,
1182
+ page=page,
1183
+ size=size,
1184
+ sort=sort,
1185
+ _request_auth=_request_auth,
1186
+ _content_type=_content_type,
1187
+ _headers=_headers,
1188
+ _host_index=_host_index
1189
+ )
1190
+
1191
+ _response_types_map: Dict[str, Optional[str]] = {
1192
+ '200': "PageProjectDto",
1193
+ }
1194
+ response_data = await self.api_client.call_api(
1195
+ *_param,
1196
+ _request_timeout=_request_timeout
1197
+ )
1198
+ await response_data.read()
1199
+ return self.api_client.response_deserialize(
1200
+ response_data=response_data,
1201
+ response_types_map=_response_types_map,
1202
+ ).data
1203
+
1204
+
1205
+ @validate_call
1206
+ async def find_all21_with_http_info(
1207
+ self,
1208
+ query: Optional[StrictStr] = None,
1209
+ my: Optional[StrictBool] = None,
1210
+ favorite: Optional[StrictBool] = None,
1211
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1212
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1213
+ 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,
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
+ ) -> ApiResponse[PageProjectDto]:
1227
+ """Find all projects
1228
+
1229
+
1230
+ :param query:
1231
+ :type query: str
1232
+ :param my:
1233
+ :type my: bool
1234
+ :param favorite:
1235
+ :type favorite: bool
1236
+ :param page: Zero-based page index (0..N)
1237
+ :type page: int
1238
+ :param size: The size of the page to be returned
1239
+ :type size: int
1240
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1241
+ :type sort: List[str]
1242
+ :param _request_timeout: timeout setting for this request. If one
1243
+ number provided, it will be total request
1244
+ timeout. It can also be a pair (tuple) of
1245
+ (connection, read) timeouts.
1246
+ :type _request_timeout: int, tuple(int, int), optional
1247
+ :param _request_auth: set to override the auth_settings for an a single
1248
+ request; this effectively ignores the
1249
+ authentication in the spec for a single request.
1250
+ :type _request_auth: dict, optional
1251
+ :param _content_type: force content-type for the request.
1252
+ :type _content_type: str, Optional
1253
+ :param _headers: set to override the headers for a single
1254
+ request; this effectively ignores the headers
1255
+ in the spec for a single request.
1256
+ :type _headers: dict, optional
1257
+ :param _host_index: set to override the host_index for a single
1258
+ request; this effectively ignores the host_index
1259
+ in the spec for a single request.
1260
+ :type _host_index: int, optional
1261
+ :return: Returns the result object.
1262
+ """ # noqa: E501
1263
+
1264
+ _param = self._find_all21_serialize(
1265
+ query=query,
1266
+ my=my,
1267
+ favorite=favorite,
1268
+ page=page,
1269
+ size=size,
1270
+ sort=sort,
1271
+ _request_auth=_request_auth,
1272
+ _content_type=_content_type,
1273
+ _headers=_headers,
1274
+ _host_index=_host_index
1275
+ )
1276
+
1277
+ _response_types_map: Dict[str, Optional[str]] = {
1278
+ '200': "PageProjectDto",
1279
+ }
1280
+ response_data = await self.api_client.call_api(
1281
+ *_param,
1282
+ _request_timeout=_request_timeout
1283
+ )
1284
+ await response_data.read()
1285
+ return self.api_client.response_deserialize(
1286
+ response_data=response_data,
1287
+ response_types_map=_response_types_map,
1288
+ )
1289
+
1290
+
1291
+ @validate_call
1292
+ async def find_all21_without_preload_content(
1293
+ self,
1294
+ query: Optional[StrictStr] = None,
1295
+ my: Optional[StrictBool] = None,
1296
+ favorite: Optional[StrictBool] = None,
1297
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1298
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1299
+ 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,
1300
+ _request_timeout: Union[
1301
+ None,
1302
+ Annotated[StrictFloat, Field(gt=0)],
1303
+ Tuple[
1304
+ Annotated[StrictFloat, Field(gt=0)],
1305
+ Annotated[StrictFloat, Field(gt=0)]
1306
+ ]
1307
+ ] = None,
1308
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1309
+ _content_type: Optional[StrictStr] = None,
1310
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1311
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1312
+ ) -> RESTResponseType:
1313
+ """Find all projects
1314
+
1315
+
1316
+ :param query:
1317
+ :type query: str
1318
+ :param my:
1319
+ :type my: bool
1320
+ :param favorite:
1321
+ :type favorite: bool
1322
+ :param page: Zero-based page index (0..N)
1323
+ :type page: int
1324
+ :param size: The size of the page to be returned
1325
+ :type size: int
1326
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1327
+ :type sort: List[str]
1328
+ :param _request_timeout: timeout setting for this request. If one
1329
+ number provided, it will be total request
1330
+ timeout. It can also be a pair (tuple) of
1331
+ (connection, read) timeouts.
1332
+ :type _request_timeout: int, tuple(int, int), optional
1333
+ :param _request_auth: set to override the auth_settings for an a single
1334
+ request; this effectively ignores the
1335
+ authentication in the spec for a single request.
1336
+ :type _request_auth: dict, optional
1337
+ :param _content_type: force content-type for the request.
1338
+ :type _content_type: str, Optional
1339
+ :param _headers: set to override the headers for a single
1340
+ request; this effectively ignores the headers
1341
+ in the spec for a single request.
1342
+ :type _headers: dict, optional
1343
+ :param _host_index: set to override the host_index for a single
1344
+ request; this effectively ignores the host_index
1345
+ in the spec for a single request.
1346
+ :type _host_index: int, optional
1347
+ :return: Returns the result object.
1348
+ """ # noqa: E501
1349
+
1350
+ _param = self._find_all21_serialize(
1351
+ query=query,
1352
+ my=my,
1353
+ favorite=favorite,
1354
+ page=page,
1355
+ size=size,
1356
+ sort=sort,
1357
+ _request_auth=_request_auth,
1358
+ _content_type=_content_type,
1359
+ _headers=_headers,
1360
+ _host_index=_host_index
1361
+ )
1362
+
1363
+ _response_types_map: Dict[str, Optional[str]] = {
1364
+ '200': "PageProjectDto",
1365
+ }
1366
+ response_data = await self.api_client.call_api(
1367
+ *_param,
1368
+ _request_timeout=_request_timeout
1369
+ )
1370
+ return response_data.response
1371
+
1372
+
1373
+ def _find_all21_serialize(
1374
+ self,
1375
+ query,
1376
+ my,
1377
+ favorite,
1378
+ page,
1379
+ size,
1380
+ sort,
1381
+ _request_auth,
1382
+ _content_type,
1383
+ _headers,
1384
+ _host_index,
1385
+ ) -> RequestSerialized:
1386
+
1387
+ _host = None
1388
+
1389
+ _collection_formats: Dict[str, str] = {
1390
+ 'sort': 'multi',
1391
+ }
1392
+
1393
+ _path_params: Dict[str, str] = {}
1394
+ _query_params: List[Tuple[str, str]] = []
1395
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1396
+ _form_params: List[Tuple[str, str]] = []
1397
+ _files: Dict[
1398
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1399
+ ] = {}
1400
+ _body_params: Optional[bytes] = None
1401
+
1402
+ # process the path parameters
1403
+ # process the query parameters
1404
+ if query is not None:
1405
+
1406
+ _query_params.append(('query', query))
1407
+
1408
+ if my is not None:
1409
+
1410
+ _query_params.append(('my', my))
1411
+
1412
+ if favorite is not None:
1413
+
1414
+ _query_params.append(('favorite', favorite))
1415
+
1416
+ if page is not None:
1417
+
1418
+ _query_params.append(('page', page))
1419
+
1420
+ if size is not None:
1421
+
1422
+ _query_params.append(('size', size))
1423
+
1424
+ if sort is not None:
1425
+
1426
+ _query_params.append(('sort', sort))
1427
+
1428
+ # process the header parameters
1429
+ # process the form parameters
1430
+ # process the body parameter
1431
+
1432
+
1433
+ # set the HTTP header `Accept`
1434
+ if 'Accept' not in _header_params:
1435
+ _header_params['Accept'] = self.api_client.select_header_accept(
1436
+ [
1437
+ '*/*'
1438
+ ]
1439
+ )
1440
+
1441
+
1442
+ # authentication setting
1443
+ _auth_settings: List[str] = [
1444
+ ]
1445
+
1446
+ return self.api_client.param_serialize(
1447
+ method='GET',
1448
+ resource_path='/api/project',
1449
+ path_params=_path_params,
1450
+ query_params=_query_params,
1451
+ header_params=_header_params,
1452
+ body=_body_params,
1453
+ post_params=_form_params,
1454
+ files=_files,
1455
+ auth_settings=_auth_settings,
1456
+ collection_formats=_collection_formats,
1457
+ _host=_host,
1458
+ _request_auth=_request_auth
1459
+ )
1460
+
1461
+
1462
+
1463
+
1464
+ @validate_call
1465
+ async def find_by_custom_field(
1466
+ self,
1467
+ custom_field_id: StrictInt,
1468
+ exclude: Optional[StrictBool] = None,
1469
+ query: Optional[StrictStr] = None,
1470
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1471
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1472
+ 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,
1473
+ _request_timeout: Union[
1474
+ None,
1475
+ Annotated[StrictFloat, Field(gt=0)],
1476
+ Tuple[
1477
+ Annotated[StrictFloat, Field(gt=0)],
1478
+ Annotated[StrictFloat, Field(gt=0)]
1479
+ ]
1480
+ ] = None,
1481
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1482
+ _content_type: Optional[StrictStr] = None,
1483
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1484
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1485
+ ) -> PageProjectDto:
1486
+ """Find projects that use/do not use specified custom field
1487
+
1488
+
1489
+ :param custom_field_id: (required)
1490
+ :type custom_field_id: int
1491
+ :param exclude:
1492
+ :type exclude: bool
1493
+ :param query:
1494
+ :type query: str
1495
+ :param page: Zero-based page index (0..N)
1496
+ :type page: int
1497
+ :param size: The size of the page to be returned
1498
+ :type size: int
1499
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1500
+ :type sort: List[str]
1501
+ :param _request_timeout: timeout setting for this request. If one
1502
+ number provided, it will be total request
1503
+ timeout. It can also be a pair (tuple) of
1504
+ (connection, read) timeouts.
1505
+ :type _request_timeout: int, tuple(int, int), optional
1506
+ :param _request_auth: set to override the auth_settings for an a single
1507
+ request; this effectively ignores the
1508
+ authentication in the spec for a single request.
1509
+ :type _request_auth: dict, optional
1510
+ :param _content_type: force content-type for the request.
1511
+ :type _content_type: str, Optional
1512
+ :param _headers: set to override the headers for a single
1513
+ request; this effectively ignores the headers
1514
+ in the spec for a single request.
1515
+ :type _headers: dict, optional
1516
+ :param _host_index: set to override the host_index for a single
1517
+ request; this effectively ignores the host_index
1518
+ in the spec for a single request.
1519
+ :type _host_index: int, optional
1520
+ :return: Returns the result object.
1521
+ """ # noqa: E501
1522
+
1523
+ _param = self._find_by_custom_field_serialize(
1524
+ custom_field_id=custom_field_id,
1525
+ exclude=exclude,
1526
+ query=query,
1527
+ page=page,
1528
+ size=size,
1529
+ sort=sort,
1530
+ _request_auth=_request_auth,
1531
+ _content_type=_content_type,
1532
+ _headers=_headers,
1533
+ _host_index=_host_index
1534
+ )
1535
+
1536
+ _response_types_map: Dict[str, Optional[str]] = {
1537
+ '200': "PageProjectDto",
1538
+ }
1539
+ response_data = await self.api_client.call_api(
1540
+ *_param,
1541
+ _request_timeout=_request_timeout
1542
+ )
1543
+ await response_data.read()
1544
+ return self.api_client.response_deserialize(
1545
+ response_data=response_data,
1546
+ response_types_map=_response_types_map,
1547
+ ).data
1548
+
1549
+
1550
+ @validate_call
1551
+ async def find_by_custom_field_with_http_info(
1552
+ self,
1553
+ custom_field_id: StrictInt,
1554
+ exclude: Optional[StrictBool] = None,
1555
+ query: Optional[StrictStr] = None,
1556
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1557
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1558
+ 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,
1559
+ _request_timeout: Union[
1560
+ None,
1561
+ Annotated[StrictFloat, Field(gt=0)],
1562
+ Tuple[
1563
+ Annotated[StrictFloat, Field(gt=0)],
1564
+ Annotated[StrictFloat, Field(gt=0)]
1565
+ ]
1566
+ ] = None,
1567
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1568
+ _content_type: Optional[StrictStr] = None,
1569
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1570
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1571
+ ) -> ApiResponse[PageProjectDto]:
1572
+ """Find projects that use/do not use specified custom field
1573
+
1574
+
1575
+ :param custom_field_id: (required)
1576
+ :type custom_field_id: int
1577
+ :param exclude:
1578
+ :type exclude: bool
1579
+ :param query:
1580
+ :type query: str
1581
+ :param page: Zero-based page index (0..N)
1582
+ :type page: int
1583
+ :param size: The size of the page to be returned
1584
+ :type size: int
1585
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1586
+ :type sort: List[str]
1587
+ :param _request_timeout: timeout setting for this request. If one
1588
+ number provided, it will be total request
1589
+ timeout. It can also be a pair (tuple) of
1590
+ (connection, read) timeouts.
1591
+ :type _request_timeout: int, tuple(int, int), optional
1592
+ :param _request_auth: set to override the auth_settings for an a single
1593
+ request; this effectively ignores the
1594
+ authentication in the spec for a single request.
1595
+ :type _request_auth: dict, optional
1596
+ :param _content_type: force content-type for the request.
1597
+ :type _content_type: str, Optional
1598
+ :param _headers: set to override the headers for a single
1599
+ request; this effectively ignores the headers
1600
+ in the spec for a single request.
1601
+ :type _headers: dict, optional
1602
+ :param _host_index: set to override the host_index for a single
1603
+ request; this effectively ignores the host_index
1604
+ in the spec for a single request.
1605
+ :type _host_index: int, optional
1606
+ :return: Returns the result object.
1607
+ """ # noqa: E501
1608
+
1609
+ _param = self._find_by_custom_field_serialize(
1610
+ custom_field_id=custom_field_id,
1611
+ exclude=exclude,
1612
+ query=query,
1613
+ page=page,
1614
+ size=size,
1615
+ sort=sort,
1616
+ _request_auth=_request_auth,
1617
+ _content_type=_content_type,
1618
+ _headers=_headers,
1619
+ _host_index=_host_index
1620
+ )
1621
+
1622
+ _response_types_map: Dict[str, Optional[str]] = {
1623
+ '200': "PageProjectDto",
1624
+ }
1625
+ response_data = await self.api_client.call_api(
1626
+ *_param,
1627
+ _request_timeout=_request_timeout
1628
+ )
1629
+ await response_data.read()
1630
+ return self.api_client.response_deserialize(
1631
+ response_data=response_data,
1632
+ response_types_map=_response_types_map,
1633
+ )
1634
+
1635
+
1636
+ @validate_call
1637
+ async def find_by_custom_field_without_preload_content(
1638
+ self,
1639
+ custom_field_id: StrictInt,
1640
+ exclude: Optional[StrictBool] = None,
1641
+ query: Optional[StrictStr] = None,
1642
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
1643
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
1644
+ 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,
1645
+ _request_timeout: Union[
1646
+ None,
1647
+ Annotated[StrictFloat, Field(gt=0)],
1648
+ Tuple[
1649
+ Annotated[StrictFloat, Field(gt=0)],
1650
+ Annotated[StrictFloat, Field(gt=0)]
1651
+ ]
1652
+ ] = None,
1653
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1654
+ _content_type: Optional[StrictStr] = None,
1655
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1656
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1657
+ ) -> RESTResponseType:
1658
+ """Find projects that use/do not use specified custom field
1659
+
1660
+
1661
+ :param custom_field_id: (required)
1662
+ :type custom_field_id: int
1663
+ :param exclude:
1664
+ :type exclude: bool
1665
+ :param query:
1666
+ :type query: str
1667
+ :param page: Zero-based page index (0..N)
1668
+ :type page: int
1669
+ :param size: The size of the page to be returned
1670
+ :type size: int
1671
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
1672
+ :type sort: List[str]
1673
+ :param _request_timeout: timeout setting for this request. If one
1674
+ number provided, it will be total request
1675
+ timeout. It can also be a pair (tuple) of
1676
+ (connection, read) timeouts.
1677
+ :type _request_timeout: int, tuple(int, int), optional
1678
+ :param _request_auth: set to override the auth_settings for an a single
1679
+ request; this effectively ignores the
1680
+ authentication in the spec for a single request.
1681
+ :type _request_auth: dict, optional
1682
+ :param _content_type: force content-type for the request.
1683
+ :type _content_type: str, Optional
1684
+ :param _headers: set to override the headers for a single
1685
+ request; this effectively ignores the headers
1686
+ in the spec for a single request.
1687
+ :type _headers: dict, optional
1688
+ :param _host_index: set to override the host_index for a single
1689
+ request; this effectively ignores the host_index
1690
+ in the spec for a single request.
1691
+ :type _host_index: int, optional
1692
+ :return: Returns the result object.
1693
+ """ # noqa: E501
1694
+
1695
+ _param = self._find_by_custom_field_serialize(
1696
+ custom_field_id=custom_field_id,
1697
+ exclude=exclude,
1698
+ query=query,
1699
+ page=page,
1700
+ size=size,
1701
+ sort=sort,
1702
+ _request_auth=_request_auth,
1703
+ _content_type=_content_type,
1704
+ _headers=_headers,
1705
+ _host_index=_host_index
1706
+ )
1707
+
1708
+ _response_types_map: Dict[str, Optional[str]] = {
1709
+ '200': "PageProjectDto",
1710
+ }
1711
+ response_data = await self.api_client.call_api(
1712
+ *_param,
1713
+ _request_timeout=_request_timeout
1714
+ )
1715
+ return response_data.response
1716
+
1717
+
1718
+ def _find_by_custom_field_serialize(
1719
+ self,
1720
+ custom_field_id,
1721
+ exclude,
1722
+ query,
1723
+ page,
1724
+ size,
1725
+ sort,
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
+ 'sort': 'multi',
1736
+ }
1737
+
1738
+ _path_params: Dict[str, str] = {}
1739
+ _query_params: List[Tuple[str, str]] = []
1740
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1741
+ _form_params: List[Tuple[str, str]] = []
1742
+ _files: Dict[
1743
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1744
+ ] = {}
1745
+ _body_params: Optional[bytes] = None
1746
+
1747
+ # process the path parameters
1748
+ # process the query parameters
1749
+ if custom_field_id is not None:
1750
+
1751
+ _query_params.append(('customFieldId', custom_field_id))
1752
+
1753
+ if exclude is not None:
1754
+
1755
+ _query_params.append(('exclude', exclude))
1756
+
1757
+ if query is not None:
1758
+
1759
+ _query_params.append(('query', query))
1760
+
1761
+ if page is not None:
1762
+
1763
+ _query_params.append(('page', page))
1764
+
1765
+ if size is not None:
1766
+
1767
+ _query_params.append(('size', size))
1768
+
1769
+ if sort is not None:
1770
+
1771
+ _query_params.append(('sort', sort))
1772
+
1773
+ # process the header parameters
1774
+ # process the form parameters
1775
+ # process the body parameter
1776
+
1777
+
1778
+ # set the HTTP header `Accept`
1779
+ if 'Accept' not in _header_params:
1780
+ _header_params['Accept'] = self.api_client.select_header_accept(
1781
+ [
1782
+ '*/*'
1783
+ ]
1784
+ )
1785
+
1786
+
1787
+ # authentication setting
1788
+ _auth_settings: List[str] = [
1789
+ ]
1790
+
1791
+ return self.api_client.param_serialize(
1792
+ method='GET',
1793
+ resource_path='/api/project/customfield',
1794
+ path_params=_path_params,
1795
+ query_params=_query_params,
1796
+ header_params=_header_params,
1797
+ body=_body_params,
1798
+ post_params=_form_params,
1799
+ files=_files,
1800
+ auth_settings=_auth_settings,
1801
+ collection_formats=_collection_formats,
1802
+ _host=_host,
1803
+ _request_auth=_request_auth
1804
+ )
1805
+
1806
+
1807
+
1808
+
1809
+ @validate_call
1810
+ async def find_one19(
1811
+ self,
1812
+ id: StrictInt,
1813
+ _request_timeout: Union[
1814
+ None,
1815
+ Annotated[StrictFloat, Field(gt=0)],
1816
+ Tuple[
1817
+ Annotated[StrictFloat, Field(gt=0)],
1818
+ Annotated[StrictFloat, Field(gt=0)]
1819
+ ]
1820
+ ] = None,
1821
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1822
+ _content_type: Optional[StrictStr] = None,
1823
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1824
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1825
+ ) -> ProjectDto:
1826
+ """Find project by id
1827
+
1828
+
1829
+ :param id: (required)
1830
+ :type id: int
1831
+ :param _request_timeout: timeout setting for this request. If one
1832
+ number provided, it will be total request
1833
+ timeout. It can also be a pair (tuple) of
1834
+ (connection, read) timeouts.
1835
+ :type _request_timeout: int, tuple(int, int), optional
1836
+ :param _request_auth: set to override the auth_settings for an a single
1837
+ request; this effectively ignores the
1838
+ authentication in the spec for a single request.
1839
+ :type _request_auth: dict, optional
1840
+ :param _content_type: force content-type for the request.
1841
+ :type _content_type: str, Optional
1842
+ :param _headers: set to override the headers for a single
1843
+ request; this effectively ignores the headers
1844
+ in the spec for a single request.
1845
+ :type _headers: dict, optional
1846
+ :param _host_index: set to override the host_index for a single
1847
+ request; this effectively ignores the host_index
1848
+ in the spec for a single request.
1849
+ :type _host_index: int, optional
1850
+ :return: Returns the result object.
1851
+ """ # noqa: E501
1852
+
1853
+ _param = self._find_one19_serialize(
1854
+ id=id,
1855
+ _request_auth=_request_auth,
1856
+ _content_type=_content_type,
1857
+ _headers=_headers,
1858
+ _host_index=_host_index
1859
+ )
1860
+
1861
+ _response_types_map: Dict[str, Optional[str]] = {
1862
+ '200': "ProjectDto",
1863
+ }
1864
+ response_data = await self.api_client.call_api(
1865
+ *_param,
1866
+ _request_timeout=_request_timeout
1867
+ )
1868
+ await response_data.read()
1869
+ return self.api_client.response_deserialize(
1870
+ response_data=response_data,
1871
+ response_types_map=_response_types_map,
1872
+ ).data
1873
+
1874
+
1875
+ @validate_call
1876
+ async def find_one19_with_http_info(
1877
+ self,
1878
+ id: StrictInt,
1879
+ _request_timeout: Union[
1880
+ None,
1881
+ Annotated[StrictFloat, Field(gt=0)],
1882
+ Tuple[
1883
+ Annotated[StrictFloat, Field(gt=0)],
1884
+ Annotated[StrictFloat, Field(gt=0)]
1885
+ ]
1886
+ ] = None,
1887
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1888
+ _content_type: Optional[StrictStr] = None,
1889
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1890
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1891
+ ) -> ApiResponse[ProjectDto]:
1892
+ """Find project by id
1893
+
1894
+
1895
+ :param id: (required)
1896
+ :type id: int
1897
+ :param _request_timeout: timeout setting for this request. If one
1898
+ number provided, it will be total request
1899
+ timeout. It can also be a pair (tuple) of
1900
+ (connection, read) timeouts.
1901
+ :type _request_timeout: int, tuple(int, int), optional
1902
+ :param _request_auth: set to override the auth_settings for an a single
1903
+ request; this effectively ignores the
1904
+ authentication in the spec for a single request.
1905
+ :type _request_auth: dict, optional
1906
+ :param _content_type: force content-type for the request.
1907
+ :type _content_type: str, Optional
1908
+ :param _headers: set to override the headers for a single
1909
+ request; this effectively ignores the headers
1910
+ in the spec for a single request.
1911
+ :type _headers: dict, optional
1912
+ :param _host_index: set to override the host_index for a single
1913
+ request; this effectively ignores the host_index
1914
+ in the spec for a single request.
1915
+ :type _host_index: int, optional
1916
+ :return: Returns the result object.
1917
+ """ # noqa: E501
1918
+
1919
+ _param = self._find_one19_serialize(
1920
+ id=id,
1921
+ _request_auth=_request_auth,
1922
+ _content_type=_content_type,
1923
+ _headers=_headers,
1924
+ _host_index=_host_index
1925
+ )
1926
+
1927
+ _response_types_map: Dict[str, Optional[str]] = {
1928
+ '200': "ProjectDto",
1929
+ }
1930
+ response_data = await self.api_client.call_api(
1931
+ *_param,
1932
+ _request_timeout=_request_timeout
1933
+ )
1934
+ await response_data.read()
1935
+ return self.api_client.response_deserialize(
1936
+ response_data=response_data,
1937
+ response_types_map=_response_types_map,
1938
+ )
1939
+
1940
+
1941
+ @validate_call
1942
+ async def find_one19_without_preload_content(
1943
+ self,
1944
+ id: StrictInt,
1945
+ _request_timeout: Union[
1946
+ None,
1947
+ Annotated[StrictFloat, Field(gt=0)],
1948
+ Tuple[
1949
+ Annotated[StrictFloat, Field(gt=0)],
1950
+ Annotated[StrictFloat, Field(gt=0)]
1951
+ ]
1952
+ ] = None,
1953
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1954
+ _content_type: Optional[StrictStr] = None,
1955
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1956
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1957
+ ) -> RESTResponseType:
1958
+ """Find project by id
1959
+
1960
+
1961
+ :param id: (required)
1962
+ :type id: int
1963
+ :param _request_timeout: timeout setting for this request. If one
1964
+ number provided, it will be total request
1965
+ timeout. It can also be a pair (tuple) of
1966
+ (connection, read) timeouts.
1967
+ :type _request_timeout: int, tuple(int, int), optional
1968
+ :param _request_auth: set to override the auth_settings for an a single
1969
+ request; this effectively ignores the
1970
+ authentication in the spec for a single request.
1971
+ :type _request_auth: dict, optional
1972
+ :param _content_type: force content-type for the request.
1973
+ :type _content_type: str, Optional
1974
+ :param _headers: set to override the headers for a single
1975
+ request; this effectively ignores the headers
1976
+ in the spec for a single request.
1977
+ :type _headers: dict, optional
1978
+ :param _host_index: set to override the host_index for a single
1979
+ request; this effectively ignores the host_index
1980
+ in the spec for a single request.
1981
+ :type _host_index: int, optional
1982
+ :return: Returns the result object.
1983
+ """ # noqa: E501
1984
+
1985
+ _param = self._find_one19_serialize(
1986
+ id=id,
1987
+ _request_auth=_request_auth,
1988
+ _content_type=_content_type,
1989
+ _headers=_headers,
1990
+ _host_index=_host_index
1991
+ )
1992
+
1993
+ _response_types_map: Dict[str, Optional[str]] = {
1994
+ '200': "ProjectDto",
1995
+ }
1996
+ response_data = await self.api_client.call_api(
1997
+ *_param,
1998
+ _request_timeout=_request_timeout
1999
+ )
2000
+ return response_data.response
2001
+
2002
+
2003
+ def _find_one19_serialize(
2004
+ self,
2005
+ id,
2006
+ _request_auth,
2007
+ _content_type,
2008
+ _headers,
2009
+ _host_index,
2010
+ ) -> RequestSerialized:
2011
+
2012
+ _host = None
2013
+
2014
+ _collection_formats: Dict[str, str] = {
2015
+ }
2016
+
2017
+ _path_params: Dict[str, str] = {}
2018
+ _query_params: List[Tuple[str, str]] = []
2019
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2020
+ _form_params: List[Tuple[str, str]] = []
2021
+ _files: Dict[
2022
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2023
+ ] = {}
2024
+ _body_params: Optional[bytes] = None
2025
+
2026
+ # process the path parameters
2027
+ if id is not None:
2028
+ _path_params['id'] = id
2029
+ # process the query parameters
2030
+ # process the header parameters
2031
+ # process the form parameters
2032
+ # process the body parameter
2033
+
2034
+
2035
+ # set the HTTP header `Accept`
2036
+ if 'Accept' not in _header_params:
2037
+ _header_params['Accept'] = self.api_client.select_header_accept(
2038
+ [
2039
+ '*/*'
2040
+ ]
2041
+ )
2042
+
2043
+
2044
+ # authentication setting
2045
+ _auth_settings: List[str] = [
2046
+ ]
2047
+
2048
+ return self.api_client.param_serialize(
2049
+ method='GET',
2050
+ resource_path='/api/project/{id}',
2051
+ path_params=_path_params,
2052
+ query_params=_query_params,
2053
+ header_params=_header_params,
2054
+ body=_body_params,
2055
+ post_params=_form_params,
2056
+ files=_files,
2057
+ auth_settings=_auth_settings,
2058
+ collection_formats=_collection_formats,
2059
+ _host=_host,
2060
+ _request_auth=_request_auth
2061
+ )
2062
+
2063
+
2064
+
2065
+
2066
+ @validate_call
2067
+ async def get_suggest(
2068
+ self,
2069
+ query: Optional[StrictStr] = None,
2070
+ id: Optional[List[StrictInt]] = None,
2071
+ ignore_id: Optional[List[StrictInt]] = None,
2072
+ write: Optional[StrictBool] = None,
2073
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
2074
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
2075
+ 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,
2076
+ _request_timeout: Union[
2077
+ None,
2078
+ Annotated[StrictFloat, Field(gt=0)],
2079
+ Tuple[
2080
+ Annotated[StrictFloat, Field(gt=0)],
2081
+ Annotated[StrictFloat, Field(gt=0)]
2082
+ ]
2083
+ ] = None,
2084
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2085
+ _content_type: Optional[StrictStr] = None,
2086
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2087
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2088
+ ) -> PageProjectSuggestDto:
2089
+ """Suggest projects
2090
+
2091
+
2092
+ :param query:
2093
+ :type query: str
2094
+ :param id:
2095
+ :type id: List[int]
2096
+ :param ignore_id:
2097
+ :type ignore_id: List[int]
2098
+ :param write:
2099
+ :type write: bool
2100
+ :param page: Zero-based page index (0..N)
2101
+ :type page: int
2102
+ :param size: The size of the page to be returned
2103
+ :type size: int
2104
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
2105
+ :type sort: List[str]
2106
+ :param _request_timeout: timeout setting for this request. If one
2107
+ number provided, it will be total request
2108
+ timeout. It can also be a pair (tuple) of
2109
+ (connection, read) timeouts.
2110
+ :type _request_timeout: int, tuple(int, int), optional
2111
+ :param _request_auth: set to override the auth_settings for an a single
2112
+ request; this effectively ignores the
2113
+ authentication in the spec for a single request.
2114
+ :type _request_auth: dict, optional
2115
+ :param _content_type: force content-type for the request.
2116
+ :type _content_type: str, Optional
2117
+ :param _headers: set to override the headers for a single
2118
+ request; this effectively ignores the headers
2119
+ in the spec for a single request.
2120
+ :type _headers: dict, optional
2121
+ :param _host_index: set to override the host_index for a single
2122
+ request; this effectively ignores the host_index
2123
+ in the spec for a single request.
2124
+ :type _host_index: int, optional
2125
+ :return: Returns the result object.
2126
+ """ # noqa: E501
2127
+
2128
+ _param = self._get_suggest_serialize(
2129
+ query=query,
2130
+ id=id,
2131
+ ignore_id=ignore_id,
2132
+ write=write,
2133
+ page=page,
2134
+ size=size,
2135
+ sort=sort,
2136
+ _request_auth=_request_auth,
2137
+ _content_type=_content_type,
2138
+ _headers=_headers,
2139
+ _host_index=_host_index
2140
+ )
2141
+
2142
+ _response_types_map: Dict[str, Optional[str]] = {
2143
+ '200': "PageProjectSuggestDto",
2144
+ }
2145
+ response_data = await self.api_client.call_api(
2146
+ *_param,
2147
+ _request_timeout=_request_timeout
2148
+ )
2149
+ await response_data.read()
2150
+ return self.api_client.response_deserialize(
2151
+ response_data=response_data,
2152
+ response_types_map=_response_types_map,
2153
+ ).data
2154
+
2155
+
2156
+ @validate_call
2157
+ async def get_suggest_with_http_info(
2158
+ self,
2159
+ query: Optional[StrictStr] = None,
2160
+ id: Optional[List[StrictInt]] = None,
2161
+ ignore_id: Optional[List[StrictInt]] = None,
2162
+ write: Optional[StrictBool] = None,
2163
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
2164
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
2165
+ 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,
2166
+ _request_timeout: Union[
2167
+ None,
2168
+ Annotated[StrictFloat, Field(gt=0)],
2169
+ Tuple[
2170
+ Annotated[StrictFloat, Field(gt=0)],
2171
+ Annotated[StrictFloat, Field(gt=0)]
2172
+ ]
2173
+ ] = None,
2174
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2175
+ _content_type: Optional[StrictStr] = None,
2176
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2177
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2178
+ ) -> ApiResponse[PageProjectSuggestDto]:
2179
+ """Suggest projects
2180
+
2181
+
2182
+ :param query:
2183
+ :type query: str
2184
+ :param id:
2185
+ :type id: List[int]
2186
+ :param ignore_id:
2187
+ :type ignore_id: List[int]
2188
+ :param write:
2189
+ :type write: bool
2190
+ :param page: Zero-based page index (0..N)
2191
+ :type page: int
2192
+ :param size: The size of the page to be returned
2193
+ :type size: int
2194
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
2195
+ :type sort: List[str]
2196
+ :param _request_timeout: timeout setting for this request. If one
2197
+ number provided, it will be total request
2198
+ timeout. It can also be a pair (tuple) of
2199
+ (connection, read) timeouts.
2200
+ :type _request_timeout: int, tuple(int, int), optional
2201
+ :param _request_auth: set to override the auth_settings for an a single
2202
+ request; this effectively ignores the
2203
+ authentication in the spec for a single request.
2204
+ :type _request_auth: dict, optional
2205
+ :param _content_type: force content-type for the request.
2206
+ :type _content_type: str, Optional
2207
+ :param _headers: set to override the headers for a single
2208
+ request; this effectively ignores the headers
2209
+ in the spec for a single request.
2210
+ :type _headers: dict, optional
2211
+ :param _host_index: set to override the host_index for a single
2212
+ request; this effectively ignores the host_index
2213
+ in the spec for a single request.
2214
+ :type _host_index: int, optional
2215
+ :return: Returns the result object.
2216
+ """ # noqa: E501
2217
+
2218
+ _param = self._get_suggest_serialize(
2219
+ query=query,
2220
+ id=id,
2221
+ ignore_id=ignore_id,
2222
+ write=write,
2223
+ page=page,
2224
+ size=size,
2225
+ sort=sort,
2226
+ _request_auth=_request_auth,
2227
+ _content_type=_content_type,
2228
+ _headers=_headers,
2229
+ _host_index=_host_index
2230
+ )
2231
+
2232
+ _response_types_map: Dict[str, Optional[str]] = {
2233
+ '200': "PageProjectSuggestDto",
2234
+ }
2235
+ response_data = await self.api_client.call_api(
2236
+ *_param,
2237
+ _request_timeout=_request_timeout
2238
+ )
2239
+ await response_data.read()
2240
+ return self.api_client.response_deserialize(
2241
+ response_data=response_data,
2242
+ response_types_map=_response_types_map,
2243
+ )
2244
+
2245
+
2246
+ @validate_call
2247
+ async def get_suggest_without_preload_content(
2248
+ self,
2249
+ query: Optional[StrictStr] = None,
2250
+ id: Optional[List[StrictInt]] = None,
2251
+ ignore_id: Optional[List[StrictInt]] = None,
2252
+ write: Optional[StrictBool] = None,
2253
+ page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Zero-based page index (0..N)")] = None,
2254
+ size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The size of the page to be returned")] = None,
2255
+ 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,
2256
+ _request_timeout: Union[
2257
+ None,
2258
+ Annotated[StrictFloat, Field(gt=0)],
2259
+ Tuple[
2260
+ Annotated[StrictFloat, Field(gt=0)],
2261
+ Annotated[StrictFloat, Field(gt=0)]
2262
+ ]
2263
+ ] = None,
2264
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2265
+ _content_type: Optional[StrictStr] = None,
2266
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2267
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2268
+ ) -> RESTResponseType:
2269
+ """Suggest projects
2270
+
2271
+
2272
+ :param query:
2273
+ :type query: str
2274
+ :param id:
2275
+ :type id: List[int]
2276
+ :param ignore_id:
2277
+ :type ignore_id: List[int]
2278
+ :param write:
2279
+ :type write: bool
2280
+ :param page: Zero-based page index (0..N)
2281
+ :type page: int
2282
+ :param size: The size of the page to be returned
2283
+ :type size: int
2284
+ :param sort: Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
2285
+ :type sort: List[str]
2286
+ :param _request_timeout: timeout setting for this request. If one
2287
+ number provided, it will be total request
2288
+ timeout. It can also be a pair (tuple) of
2289
+ (connection, read) timeouts.
2290
+ :type _request_timeout: int, tuple(int, int), optional
2291
+ :param _request_auth: set to override the auth_settings for an a single
2292
+ request; this effectively ignores the
2293
+ authentication in the spec for a single request.
2294
+ :type _request_auth: dict, optional
2295
+ :param _content_type: force content-type for the request.
2296
+ :type _content_type: str, Optional
2297
+ :param _headers: set to override the headers for a single
2298
+ request; this effectively ignores the headers
2299
+ in the spec for a single request.
2300
+ :type _headers: dict, optional
2301
+ :param _host_index: set to override the host_index for a single
2302
+ request; this effectively ignores the host_index
2303
+ in the spec for a single request.
2304
+ :type _host_index: int, optional
2305
+ :return: Returns the result object.
2306
+ """ # noqa: E501
2307
+
2308
+ _param = self._get_suggest_serialize(
2309
+ query=query,
2310
+ id=id,
2311
+ ignore_id=ignore_id,
2312
+ write=write,
2313
+ page=page,
2314
+ size=size,
2315
+ sort=sort,
2316
+ _request_auth=_request_auth,
2317
+ _content_type=_content_type,
2318
+ _headers=_headers,
2319
+ _host_index=_host_index
2320
+ )
2321
+
2322
+ _response_types_map: Dict[str, Optional[str]] = {
2323
+ '200': "PageProjectSuggestDto",
2324
+ }
2325
+ response_data = await self.api_client.call_api(
2326
+ *_param,
2327
+ _request_timeout=_request_timeout
2328
+ )
2329
+ return response_data.response
2330
+
2331
+
2332
+ def _get_suggest_serialize(
2333
+ self,
2334
+ query,
2335
+ id,
2336
+ ignore_id,
2337
+ write,
2338
+ page,
2339
+ size,
2340
+ sort,
2341
+ _request_auth,
2342
+ _content_type,
2343
+ _headers,
2344
+ _host_index,
2345
+ ) -> RequestSerialized:
2346
+
2347
+ _host = None
2348
+
2349
+ _collection_formats: Dict[str, str] = {
2350
+ 'id': 'multi',
2351
+ 'ignoreId': 'multi',
2352
+ 'sort': 'multi',
2353
+ }
2354
+
2355
+ _path_params: Dict[str, str] = {}
2356
+ _query_params: List[Tuple[str, str]] = []
2357
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2358
+ _form_params: List[Tuple[str, str]] = []
2359
+ _files: Dict[
2360
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2361
+ ] = {}
2362
+ _body_params: Optional[bytes] = None
2363
+
2364
+ # process the path parameters
2365
+ # process the query parameters
2366
+ if query is not None:
2367
+
2368
+ _query_params.append(('query', query))
2369
+
2370
+ if id is not None:
2371
+
2372
+ _query_params.append(('id', id))
2373
+
2374
+ if ignore_id is not None:
2375
+
2376
+ _query_params.append(('ignoreId', ignore_id))
2377
+
2378
+ if write is not None:
2379
+
2380
+ _query_params.append(('write', write))
2381
+
2382
+ if page is not None:
2383
+
2384
+ _query_params.append(('page', page))
2385
+
2386
+ if size is not None:
2387
+
2388
+ _query_params.append(('size', size))
2389
+
2390
+ if sort is not None:
2391
+
2392
+ _query_params.append(('sort', sort))
2393
+
2394
+ # process the header parameters
2395
+ # process the form parameters
2396
+ # process the body parameter
2397
+
2398
+
2399
+ # set the HTTP header `Accept`
2400
+ if 'Accept' not in _header_params:
2401
+ _header_params['Accept'] = self.api_client.select_header_accept(
2402
+ [
2403
+ '*/*'
2404
+ ]
2405
+ )
2406
+
2407
+
2408
+ # authentication setting
2409
+ _auth_settings: List[str] = [
2410
+ ]
2411
+
2412
+ return self.api_client.param_serialize(
2413
+ method='GET',
2414
+ resource_path='/api/project/suggest',
2415
+ path_params=_path_params,
2416
+ query_params=_query_params,
2417
+ header_params=_header_params,
2418
+ body=_body_params,
2419
+ post_params=_form_params,
2420
+ files=_files,
2421
+ auth_settings=_auth_settings,
2422
+ collection_formats=_collection_formats,
2423
+ _host=_host,
2424
+ _request_auth=_request_auth
2425
+ )
2426
+
2427
+
2428
+
2429
+
2430
+ @validate_call
2431
+ async def patch25(
2432
+ self,
2433
+ id: StrictInt,
2434
+ project_patch_dto: ProjectPatchDto,
2435
+ _request_timeout: Union[
2436
+ None,
2437
+ Annotated[StrictFloat, Field(gt=0)],
2438
+ Tuple[
2439
+ Annotated[StrictFloat, Field(gt=0)],
2440
+ Annotated[StrictFloat, Field(gt=0)]
2441
+ ]
2442
+ ] = None,
2443
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2444
+ _content_type: Optional[StrictStr] = None,
2445
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2446
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2447
+ ) -> ProjectDto:
2448
+ """Patch project
2449
+
2450
+
2451
+ :param id: (required)
2452
+ :type id: int
2453
+ :param project_patch_dto: (required)
2454
+ :type project_patch_dto: ProjectPatchDto
2455
+ :param _request_timeout: timeout setting for this request. If one
2456
+ number provided, it will be total request
2457
+ timeout. It can also be a pair (tuple) of
2458
+ (connection, read) timeouts.
2459
+ :type _request_timeout: int, tuple(int, int), optional
2460
+ :param _request_auth: set to override the auth_settings for an a single
2461
+ request; this effectively ignores the
2462
+ authentication in the spec for a single request.
2463
+ :type _request_auth: dict, optional
2464
+ :param _content_type: force content-type for the request.
2465
+ :type _content_type: str, Optional
2466
+ :param _headers: set to override the headers for a single
2467
+ request; this effectively ignores the headers
2468
+ in the spec for a single request.
2469
+ :type _headers: dict, optional
2470
+ :param _host_index: set to override the host_index for a single
2471
+ request; this effectively ignores the host_index
2472
+ in the spec for a single request.
2473
+ :type _host_index: int, optional
2474
+ :return: Returns the result object.
2475
+ """ # noqa: E501
2476
+
2477
+ _param = self._patch25_serialize(
2478
+ id=id,
2479
+ project_patch_dto=project_patch_dto,
2480
+ _request_auth=_request_auth,
2481
+ _content_type=_content_type,
2482
+ _headers=_headers,
2483
+ _host_index=_host_index
2484
+ )
2485
+
2486
+ _response_types_map: Dict[str, Optional[str]] = {
2487
+ '200': "ProjectDto",
2488
+ }
2489
+ response_data = await self.api_client.call_api(
2490
+ *_param,
2491
+ _request_timeout=_request_timeout
2492
+ )
2493
+ await response_data.read()
2494
+ return self.api_client.response_deserialize(
2495
+ response_data=response_data,
2496
+ response_types_map=_response_types_map,
2497
+ ).data
2498
+
2499
+
2500
+ @validate_call
2501
+ async def patch25_with_http_info(
2502
+ self,
2503
+ id: StrictInt,
2504
+ project_patch_dto: ProjectPatchDto,
2505
+ _request_timeout: Union[
2506
+ None,
2507
+ Annotated[StrictFloat, Field(gt=0)],
2508
+ Tuple[
2509
+ Annotated[StrictFloat, Field(gt=0)],
2510
+ Annotated[StrictFloat, Field(gt=0)]
2511
+ ]
2512
+ ] = None,
2513
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2514
+ _content_type: Optional[StrictStr] = None,
2515
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2516
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2517
+ ) -> ApiResponse[ProjectDto]:
2518
+ """Patch project
2519
+
2520
+
2521
+ :param id: (required)
2522
+ :type id: int
2523
+ :param project_patch_dto: (required)
2524
+ :type project_patch_dto: ProjectPatchDto
2525
+ :param _request_timeout: timeout setting for this request. If one
2526
+ number provided, it will be total request
2527
+ timeout. It can also be a pair (tuple) of
2528
+ (connection, read) timeouts.
2529
+ :type _request_timeout: int, tuple(int, int), optional
2530
+ :param _request_auth: set to override the auth_settings for an a single
2531
+ request; this effectively ignores the
2532
+ authentication in the spec for a single request.
2533
+ :type _request_auth: dict, optional
2534
+ :param _content_type: force content-type for the request.
2535
+ :type _content_type: str, Optional
2536
+ :param _headers: set to override the headers for a single
2537
+ request; this effectively ignores the headers
2538
+ in the spec for a single request.
2539
+ :type _headers: dict, optional
2540
+ :param _host_index: set to override the host_index for a single
2541
+ request; this effectively ignores the host_index
2542
+ in the spec for a single request.
2543
+ :type _host_index: int, optional
2544
+ :return: Returns the result object.
2545
+ """ # noqa: E501
2546
+
2547
+ _param = self._patch25_serialize(
2548
+ id=id,
2549
+ project_patch_dto=project_patch_dto,
2550
+ _request_auth=_request_auth,
2551
+ _content_type=_content_type,
2552
+ _headers=_headers,
2553
+ _host_index=_host_index
2554
+ )
2555
+
2556
+ _response_types_map: Dict[str, Optional[str]] = {
2557
+ '200': "ProjectDto",
2558
+ }
2559
+ response_data = await self.api_client.call_api(
2560
+ *_param,
2561
+ _request_timeout=_request_timeout
2562
+ )
2563
+ await response_data.read()
2564
+ return self.api_client.response_deserialize(
2565
+ response_data=response_data,
2566
+ response_types_map=_response_types_map,
2567
+ )
2568
+
2569
+
2570
+ @validate_call
2571
+ async def patch25_without_preload_content(
2572
+ self,
2573
+ id: StrictInt,
2574
+ project_patch_dto: ProjectPatchDto,
2575
+ _request_timeout: Union[
2576
+ None,
2577
+ Annotated[StrictFloat, Field(gt=0)],
2578
+ Tuple[
2579
+ Annotated[StrictFloat, Field(gt=0)],
2580
+ Annotated[StrictFloat, Field(gt=0)]
2581
+ ]
2582
+ ] = None,
2583
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2584
+ _content_type: Optional[StrictStr] = None,
2585
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2586
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2587
+ ) -> RESTResponseType:
2588
+ """Patch project
2589
+
2590
+
2591
+ :param id: (required)
2592
+ :type id: int
2593
+ :param project_patch_dto: (required)
2594
+ :type project_patch_dto: ProjectPatchDto
2595
+ :param _request_timeout: timeout setting for this request. If one
2596
+ number provided, it will be total request
2597
+ timeout. It can also be a pair (tuple) of
2598
+ (connection, read) timeouts.
2599
+ :type _request_timeout: int, tuple(int, int), optional
2600
+ :param _request_auth: set to override the auth_settings for an a single
2601
+ request; this effectively ignores the
2602
+ authentication in the spec for a single request.
2603
+ :type _request_auth: dict, optional
2604
+ :param _content_type: force content-type for the request.
2605
+ :type _content_type: str, Optional
2606
+ :param _headers: set to override the headers for a single
2607
+ request; this effectively ignores the headers
2608
+ in the spec for a single request.
2609
+ :type _headers: dict, optional
2610
+ :param _host_index: set to override the host_index for a single
2611
+ request; this effectively ignores the host_index
2612
+ in the spec for a single request.
2613
+ :type _host_index: int, optional
2614
+ :return: Returns the result object.
2615
+ """ # noqa: E501
2616
+
2617
+ _param = self._patch25_serialize(
2618
+ id=id,
2619
+ project_patch_dto=project_patch_dto,
2620
+ _request_auth=_request_auth,
2621
+ _content_type=_content_type,
2622
+ _headers=_headers,
2623
+ _host_index=_host_index
2624
+ )
2625
+
2626
+ _response_types_map: Dict[str, Optional[str]] = {
2627
+ '200': "ProjectDto",
2628
+ }
2629
+ response_data = await self.api_client.call_api(
2630
+ *_param,
2631
+ _request_timeout=_request_timeout
2632
+ )
2633
+ return response_data.response
2634
+
2635
+
2636
+ def _patch25_serialize(
2637
+ self,
2638
+ id,
2639
+ project_patch_dto,
2640
+ _request_auth,
2641
+ _content_type,
2642
+ _headers,
2643
+ _host_index,
2644
+ ) -> RequestSerialized:
2645
+
2646
+ _host = None
2647
+
2648
+ _collection_formats: Dict[str, str] = {
2649
+ }
2650
+
2651
+ _path_params: Dict[str, str] = {}
2652
+ _query_params: List[Tuple[str, str]] = []
2653
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2654
+ _form_params: List[Tuple[str, str]] = []
2655
+ _files: Dict[
2656
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2657
+ ] = {}
2658
+ _body_params: Optional[bytes] = None
2659
+
2660
+ # process the path parameters
2661
+ if id is not None:
2662
+ _path_params['id'] = id
2663
+ # process the query parameters
2664
+ # process the header parameters
2665
+ # process the form parameters
2666
+ # process the body parameter
2667
+ if project_patch_dto is not None:
2668
+ _body_params = project_patch_dto
2669
+
2670
+
2671
+ # set the HTTP header `Accept`
2672
+ if 'Accept' not in _header_params:
2673
+ _header_params['Accept'] = self.api_client.select_header_accept(
2674
+ [
2675
+ '*/*'
2676
+ ]
2677
+ )
2678
+
2679
+ # set the HTTP header `Content-Type`
2680
+ if _content_type:
2681
+ _header_params['Content-Type'] = _content_type
2682
+ else:
2683
+ _default_content_type = (
2684
+ self.api_client.select_header_content_type(
2685
+ [
2686
+ 'application/json'
2687
+ ]
2688
+ )
2689
+ )
2690
+ if _default_content_type is not None:
2691
+ _header_params['Content-Type'] = _default_content_type
2692
+
2693
+ # authentication setting
2694
+ _auth_settings: List[str] = [
2695
+ ]
2696
+
2697
+ return self.api_client.param_serialize(
2698
+ method='PATCH',
2699
+ resource_path='/api/project/{id}',
2700
+ path_params=_path_params,
2701
+ query_params=_query_params,
2702
+ header_params=_header_params,
2703
+ body=_body_params,
2704
+ post_params=_form_params,
2705
+ files=_files,
2706
+ auth_settings=_auth_settings,
2707
+ collection_formats=_collection_formats,
2708
+ _host=_host,
2709
+ _request_auth=_request_auth
2710
+ )
2711
+
2712
+
2713
+
2714
+
2715
+ @validate_call
2716
+ async def set_favorite(
2717
+ self,
2718
+ id: StrictInt,
2719
+ favorite: Optional[StrictBool] = None,
2720
+ _request_timeout: Union[
2721
+ None,
2722
+ Annotated[StrictFloat, Field(gt=0)],
2723
+ Tuple[
2724
+ Annotated[StrictFloat, Field(gt=0)],
2725
+ Annotated[StrictFloat, Field(gt=0)]
2726
+ ]
2727
+ ] = None,
2728
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2729
+ _content_type: Optional[StrictStr] = None,
2730
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2731
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2732
+ ) -> ProjectDto:
2733
+ """Mark project as favorite
2734
+
2735
+
2736
+ :param id: (required)
2737
+ :type id: int
2738
+ :param favorite:
2739
+ :type favorite: bool
2740
+ :param _request_timeout: timeout setting for this request. If one
2741
+ number provided, it will be total request
2742
+ timeout. It can also be a pair (tuple) of
2743
+ (connection, read) timeouts.
2744
+ :type _request_timeout: int, tuple(int, int), optional
2745
+ :param _request_auth: set to override the auth_settings for an a single
2746
+ request; this effectively ignores the
2747
+ authentication in the spec for a single request.
2748
+ :type _request_auth: dict, optional
2749
+ :param _content_type: force content-type for the request.
2750
+ :type _content_type: str, Optional
2751
+ :param _headers: set to override the headers for a single
2752
+ request; this effectively ignores the headers
2753
+ in the spec for a single request.
2754
+ :type _headers: dict, optional
2755
+ :param _host_index: set to override the host_index for a single
2756
+ request; this effectively ignores the host_index
2757
+ in the spec for a single request.
2758
+ :type _host_index: int, optional
2759
+ :return: Returns the result object.
2760
+ """ # noqa: E501
2761
+
2762
+ _param = self._set_favorite_serialize(
2763
+ id=id,
2764
+ favorite=favorite,
2765
+ _request_auth=_request_auth,
2766
+ _content_type=_content_type,
2767
+ _headers=_headers,
2768
+ _host_index=_host_index
2769
+ )
2770
+
2771
+ _response_types_map: Dict[str, Optional[str]] = {
2772
+ '200': "ProjectDto",
2773
+ }
2774
+ response_data = await self.api_client.call_api(
2775
+ *_param,
2776
+ _request_timeout=_request_timeout
2777
+ )
2778
+ await response_data.read()
2779
+ return self.api_client.response_deserialize(
2780
+ response_data=response_data,
2781
+ response_types_map=_response_types_map,
2782
+ ).data
2783
+
2784
+
2785
+ @validate_call
2786
+ async def set_favorite_with_http_info(
2787
+ self,
2788
+ id: StrictInt,
2789
+ favorite: Optional[StrictBool] = None,
2790
+ _request_timeout: Union[
2791
+ None,
2792
+ Annotated[StrictFloat, Field(gt=0)],
2793
+ Tuple[
2794
+ Annotated[StrictFloat, Field(gt=0)],
2795
+ Annotated[StrictFloat, Field(gt=0)]
2796
+ ]
2797
+ ] = None,
2798
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2799
+ _content_type: Optional[StrictStr] = None,
2800
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2801
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2802
+ ) -> ApiResponse[ProjectDto]:
2803
+ """Mark project as favorite
2804
+
2805
+
2806
+ :param id: (required)
2807
+ :type id: int
2808
+ :param favorite:
2809
+ :type favorite: bool
2810
+ :param _request_timeout: timeout setting for this request. If one
2811
+ number provided, it will be total request
2812
+ timeout. It can also be a pair (tuple) of
2813
+ (connection, read) timeouts.
2814
+ :type _request_timeout: int, tuple(int, int), optional
2815
+ :param _request_auth: set to override the auth_settings for an a single
2816
+ request; this effectively ignores the
2817
+ authentication in the spec for a single request.
2818
+ :type _request_auth: dict, optional
2819
+ :param _content_type: force content-type for the request.
2820
+ :type _content_type: str, Optional
2821
+ :param _headers: set to override the headers for a single
2822
+ request; this effectively ignores the headers
2823
+ in the spec for a single request.
2824
+ :type _headers: dict, optional
2825
+ :param _host_index: set to override the host_index for a single
2826
+ request; this effectively ignores the host_index
2827
+ in the spec for a single request.
2828
+ :type _host_index: int, optional
2829
+ :return: Returns the result object.
2830
+ """ # noqa: E501
2831
+
2832
+ _param = self._set_favorite_serialize(
2833
+ id=id,
2834
+ favorite=favorite,
2835
+ _request_auth=_request_auth,
2836
+ _content_type=_content_type,
2837
+ _headers=_headers,
2838
+ _host_index=_host_index
2839
+ )
2840
+
2841
+ _response_types_map: Dict[str, Optional[str]] = {
2842
+ '200': "ProjectDto",
2843
+ }
2844
+ response_data = await self.api_client.call_api(
2845
+ *_param,
2846
+ _request_timeout=_request_timeout
2847
+ )
2848
+ await response_data.read()
2849
+ return self.api_client.response_deserialize(
2850
+ response_data=response_data,
2851
+ response_types_map=_response_types_map,
2852
+ )
2853
+
2854
+
2855
+ @validate_call
2856
+ async def set_favorite_without_preload_content(
2857
+ self,
2858
+ id: StrictInt,
2859
+ favorite: Optional[StrictBool] = None,
2860
+ _request_timeout: Union[
2861
+ None,
2862
+ Annotated[StrictFloat, Field(gt=0)],
2863
+ Tuple[
2864
+ Annotated[StrictFloat, Field(gt=0)],
2865
+ Annotated[StrictFloat, Field(gt=0)]
2866
+ ]
2867
+ ] = None,
2868
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2869
+ _content_type: Optional[StrictStr] = None,
2870
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2871
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2872
+ ) -> RESTResponseType:
2873
+ """Mark project as favorite
2874
+
2875
+
2876
+ :param id: (required)
2877
+ :type id: int
2878
+ :param favorite:
2879
+ :type favorite: bool
2880
+ :param _request_timeout: timeout setting for this request. If one
2881
+ number provided, it will be total request
2882
+ timeout. It can also be a pair (tuple) of
2883
+ (connection, read) timeouts.
2884
+ :type _request_timeout: int, tuple(int, int), optional
2885
+ :param _request_auth: set to override the auth_settings for an a single
2886
+ request; this effectively ignores the
2887
+ authentication in the spec for a single request.
2888
+ :type _request_auth: dict, optional
2889
+ :param _content_type: force content-type for the request.
2890
+ :type _content_type: str, Optional
2891
+ :param _headers: set to override the headers for a single
2892
+ request; this effectively ignores the headers
2893
+ in the spec for a single request.
2894
+ :type _headers: dict, optional
2895
+ :param _host_index: set to override the host_index for a single
2896
+ request; this effectively ignores the host_index
2897
+ in the spec for a single request.
2898
+ :type _host_index: int, optional
2899
+ :return: Returns the result object.
2900
+ """ # noqa: E501
2901
+
2902
+ _param = self._set_favorite_serialize(
2903
+ id=id,
2904
+ favorite=favorite,
2905
+ _request_auth=_request_auth,
2906
+ _content_type=_content_type,
2907
+ _headers=_headers,
2908
+ _host_index=_host_index
2909
+ )
2910
+
2911
+ _response_types_map: Dict[str, Optional[str]] = {
2912
+ '200': "ProjectDto",
2913
+ }
2914
+ response_data = await self.api_client.call_api(
2915
+ *_param,
2916
+ _request_timeout=_request_timeout
2917
+ )
2918
+ return response_data.response
2919
+
2920
+
2921
+ def _set_favorite_serialize(
2922
+ self,
2923
+ id,
2924
+ favorite,
2925
+ _request_auth,
2926
+ _content_type,
2927
+ _headers,
2928
+ _host_index,
2929
+ ) -> RequestSerialized:
2930
+
2931
+ _host = None
2932
+
2933
+ _collection_formats: Dict[str, str] = {
2934
+ }
2935
+
2936
+ _path_params: Dict[str, str] = {}
2937
+ _query_params: List[Tuple[str, str]] = []
2938
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2939
+ _form_params: List[Tuple[str, str]] = []
2940
+ _files: Dict[
2941
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2942
+ ] = {}
2943
+ _body_params: Optional[bytes] = None
2944
+
2945
+ # process the path parameters
2946
+ if id is not None:
2947
+ _path_params['id'] = id
2948
+ # process the query parameters
2949
+ if favorite is not None:
2950
+
2951
+ _query_params.append(('favorite', favorite))
2952
+
2953
+ # process the header parameters
2954
+ # process the form parameters
2955
+ # process the body parameter
2956
+
2957
+
2958
+ # set the HTTP header `Accept`
2959
+ if 'Accept' not in _header_params:
2960
+ _header_params['Accept'] = self.api_client.select_header_accept(
2961
+ [
2962
+ '*/*'
2963
+ ]
2964
+ )
2965
+
2966
+
2967
+ # authentication setting
2968
+ _auth_settings: List[str] = [
2969
+ ]
2970
+
2971
+ return self.api_client.param_serialize(
2972
+ method='POST',
2973
+ resource_path='/api/project/{id}/favorite',
2974
+ path_params=_path_params,
2975
+ query_params=_query_params,
2976
+ header_params=_header_params,
2977
+ body=_body_params,
2978
+ post_params=_form_params,
2979
+ files=_files,
2980
+ auth_settings=_auth_settings,
2981
+ collection_formats=_collection_formats,
2982
+ _host=_host,
2983
+ _request_auth=_request_auth
2984
+ )
2985
+
2986
+