waldur-api-client 8.0.9.dev352__py3-none-any.whl → 8.0.10.dev3__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.
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_list_users_count.py +368 -0
- waldur_api_client/api/credit_transactions/__init__.py +1 -0
- waldur_api_client/api/credit_transactions/credit_transactions_count.py +249 -0
- waldur_api_client/api/credit_transactions/credit_transactions_list.py +413 -0
- waldur_api_client/api/credit_transactions/credit_transactions_retrieve.py +144 -0
- waldur_api_client/api/customer_affiliates/__init__.py +1 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_accruals_list.py +482 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_count.py +279 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_create.py +152 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_destroy.py +91 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_earnings_retrieve.py +152 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_list.py +455 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_partial_update.py +166 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_retrieve.py +144 -0
- waldur_api_client/api/customer_affiliates/customer_affiliates_update.py +166 -0
- waldur_api_client/api/customer_credits/customer_credits_adjust_withdrawable.py +174 -0
- waldur_api_client/api/customers/customers_list_users_count.py +368 -0
- waldur_api_client/api/customers/customers_project_metadata_compliance_details_count.py +196 -0
- waldur_api_client/api/customers/customers_project_metadata_compliance_overview_count.py +196 -0
- waldur_api_client/api/customers/customers_project_metadata_compliance_projects_count.py +196 -0
- waldur_api_client/api/customers/customers_project_metadata_question_answers_count.py +196 -0
- waldur_api_client/api/customers/customers_users_count.py +509 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_posix_allocations_list.py +806 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_posix_groups_list.py +806 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_posix_identities_count.py +523 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_posix_identities_list.py +789 -0
- waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_set_posix_attributes.py +192 -0
- waldur_api_client/api/marketplace_openstack_duplicate_offerings/__init__.py +1 -0
- waldur_api_client/api/marketplace_openstack_duplicate_offerings/marketplace_openstack_duplicate_offerings_count.py +174 -0
- waldur_api_client/api/marketplace_openstack_duplicate_offerings/marketplace_openstack_duplicate_offerings_list.py +312 -0
- waldur_api_client/api/marketplace_posix_id_pools/__init__.py +1 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_count.py +229 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_create.py +150 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_destroy.py +91 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_list.py +414 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_partial_update.py +164 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_retrieve.py +171 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_stats_retrieve.py +148 -0
- waldur_api_client/api/marketplace_posix_id_pools/marketplace_posix_id_pools_update.py +164 -0
- waldur_api_client/api/marketplace_posix_identities/__init__.py +1 -0
- waldur_api_client/api/marketplace_posix_identities/marketplace_posix_identities_count.py +226 -0
- waldur_api_client/api/marketplace_posix_identities/marketplace_posix_identities_list.py +382 -0
- waldur_api_client/api/marketplace_posix_identities/marketplace_posix_identities_retrieve.py +142 -0
- waldur_api_client/api/marketplace_project_posix_groups/__init__.py +1 -0
- waldur_api_client/api/marketplace_project_posix_groups/marketplace_project_posix_groups_count.py +167 -0
- waldur_api_client/api/marketplace_project_posix_groups/marketplace_project_posix_groups_list.py +325 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_effective_posix_id_pool_retrieve.py +187 -0
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list_users_count.py +368 -0
- waldur_api_client/api/marketplace_provider_resource_projects/marketplace_provider_resource_projects_list_users_count.py +368 -0
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list_users_count.py +368 -0
- waldur_api_client/api/marketplace_resource_projects/marketplace_resource_projects_list_users_count.py +368 -0
- waldur_api_client/api/marketplace_resources/marketplace_resources_list_users_count.py +368 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_compliance_checklists_summary_count.py +152 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_compliance_compliance_overview_count.py +152 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_compliance_offering_users_count.py +152 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_course_accounts_count.py +363 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_customer_projects_count.py +650 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_customers_count.py +447 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_keys_count.py +400 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_list_users_count.py +368 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_count.py +888 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_types_count.py +888 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_permissions_count.py +496 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_service_accounts_count.py +282 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_projects_count.py +634 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_user_customers_count.py +463 -0
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_users_count.py +580 -0
- waldur_api_client/api/openportal_unmanaged_projects/openportal_unmanaged_projects_list_users_count.py +368 -0
- waldur_api_client/api/projects/projects_list_users_count.py +368 -0
- waldur_api_client/api/projects/projects_other_users_count.py +443 -0
- waldur_api_client/api/proposal_proposals/proposal_proposals_list_users_count.py +368 -0
- waldur_api_client/api/proposal_proposals/proposal_proposals_step_checklist_responses_list.py +398 -0
- waldur_api_client/api/proposal_proposals/proposal_proposals_step_checklist_retrieve.py +189 -0
- waldur_api_client/api/proposal_proposals/proposal_proposals_submit_step_checklist_answers.py +198 -0
- waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_list_users_count.py +368 -0
- waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_step_checklists_count.py +350 -0
- waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_step_checklists_list.py +560 -0
- waldur_api_client/api/reviewer_profiles/nested_reviewer_profile_affiliations_count.py +187 -0
- waldur_api_client/api/reviewer_profiles/nested_reviewer_profile_expertise_count.py +187 -0
- waldur_api_client/api/reviewer_profiles/nested_reviewer_profile_publications_count.py +187 -0
- waldur_api_client/api/user_permissions/user_permissions_restore.py +115 -0
- waldur_api_client/api/user_permissions/user_permissions_revoke.py +113 -0
- waldur_api_client/api-map.md +143 -45
- waldur_api_client/llms-full.txt +1200 -85
- waldur_api_client/llms.txt +23 -17
- waldur_api_client/models/action_on_usage_limit_enum.py +9 -0
- waldur_api_client/models/affiliate_earnings.py +89 -0
- waldur_api_client/models/affiliate_earnings_month.py +75 -0
- waldur_api_client/models/affiliate_fee_accrual.py +110 -0
- waldur_api_client/models/billing_source_enum.py +9 -0
- waldur_api_client/models/create_customer_affiliate.py +214 -0
- waldur_api_client/models/create_customer_affiliate_request.py +149 -0
- waldur_api_client/models/credit_transaction.py +122 -0
- waldur_api_client/models/customer_affiliate.py +214 -0
- waldur_api_client/models/customer_affiliate_o_enum.py +13 -0
- waldur_api_client/models/customers_users_count_organization_role_item_type_0.py +10 -0
- waldur_api_client/models/customers_users_count_project_role_item_type_0.py +10 -0
- waldur_api_client/models/discount_aggregation_enum.py +9 -0
- waldur_api_client/models/duplicate_offering_candidate.py +108 -0
- waldur_api_client/models/duplicate_offering_group.py +184 -0
- waldur_api_client/models/offering_user_posix_allocation.py +109 -0
- waldur_api_client/models/offering_user_posix_attributes_request.py +109 -0
- waldur_api_client/models/offering_user_posix_group.py +145 -0
- waldur_api_client/models/offering_user_posix_update_response.py +102 -0
- waldur_api_client/models/patched_create_customer_affiliate_request.py +148 -0
- waldur_api_client/models/patched_posix_id_pool_request.py +139 -0
- waldur_api_client/models/posix_id_pool.py +375 -0
- waldur_api_client/models/posix_id_pool_field_enum.py +26 -0
- waldur_api_client/models/posix_id_pool_namespace_stats.py +99 -0
- waldur_api_client/models/posix_id_pool_request.py +200 -0
- waldur_api_client/models/posix_id_pool_stats.py +118 -0
- waldur_api_client/models/posix_id_source_enum.py +9 -0
- waldur_api_client/models/posix_identity.py +202 -0
- waldur_api_client/models/project_posix_group.py +149 -0
- waldur_api_client/models/project_posix_group_kind_enum.py +9 -0
- waldur_api_client/models/step_checklist_response_group.py +155 -0
- waldur_api_client/models/step_checklist_status.py +97 -0
- waldur_api_client/models/technical_assessment_answer.py +104 -0
- waldur_api_client/models/technical_assessment_answer_answer_data.py +44 -0
- waldur_api_client/models/timing_bucket_enum.py +12 -0
- waldur_api_client/models/transaction_type_enum.py +17 -0
- waldur_api_client/models/usage_limit_restriction_enum.py +9 -0
- waldur_api_client/models/user_posix_identity.py +111 -0
- waldur_api_client/models/user_role_permission_action_request.py +59 -0
- waldur_api_client/models/withdrawable_adjustment_request.py +67 -0
- {waldur_api_client-8.0.9.dev352.dist-info → waldur_api_client-8.0.10.dev3.dist-info}/METADATA +1 -1
- {waldur_api_client-8.0.9.dev352.dist-info → waldur_api_client-8.0.10.dev3.dist-info}/RECORD +129 -7
- {waldur_api_client-8.0.9.dev352.dist-info → waldur_api_client-8.0.10.dev3.dist-info}/WHEEL +0 -0
- {waldur_api_client-8.0.9.dev352.dist-info → waldur_api_client-8.0.10.dev3.dist-info}/licenses/LICENSE +0 -0
waldur_api_client/api/call_managing_organisations/call_managing_organisations_list_users_count.py
ADDED
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Union
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.user_role_details_field_enum import UserRoleDetailsFieldEnum
|
|
10
|
+
from ...models.user_role_details_o_enum import UserRoleDetailsOEnum
|
|
11
|
+
from ...types import UNSET, Response, Unset
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
field: Union[Unset, list[UserRoleDetailsFieldEnum]] = UNSET,
|
|
18
|
+
full_name: Union[Unset, str] = UNSET,
|
|
19
|
+
native_name: Union[Unset, str] = UNSET,
|
|
20
|
+
o: Union[Unset, list[UserRoleDetailsOEnum]] = UNSET,
|
|
21
|
+
page: Union[Unset, int] = UNSET,
|
|
22
|
+
page_size: Union[Unset, int] = UNSET,
|
|
23
|
+
role: Union[Unset, UUID] = UNSET,
|
|
24
|
+
search_string: Union[Unset, str] = UNSET,
|
|
25
|
+
user: Union[Unset, UUID] = UNSET,
|
|
26
|
+
user_slug: Union[Unset, str] = UNSET,
|
|
27
|
+
user_url: Union[Unset, str] = UNSET,
|
|
28
|
+
username: Union[Unset, str] = UNSET,
|
|
29
|
+
) -> dict[str, Any]:
|
|
30
|
+
params: dict[str, Any] = {}
|
|
31
|
+
|
|
32
|
+
json_field: Union[Unset, list[str]] = UNSET
|
|
33
|
+
if not isinstance(field, Unset):
|
|
34
|
+
json_field = []
|
|
35
|
+
for field_item_data in field:
|
|
36
|
+
field_item = field_item_data.value
|
|
37
|
+
json_field.append(field_item)
|
|
38
|
+
|
|
39
|
+
params["field"] = json_field
|
|
40
|
+
|
|
41
|
+
params["full_name"] = full_name
|
|
42
|
+
|
|
43
|
+
params["native_name"] = native_name
|
|
44
|
+
|
|
45
|
+
json_o: Union[Unset, list[str]] = UNSET
|
|
46
|
+
if not isinstance(o, Unset):
|
|
47
|
+
json_o = []
|
|
48
|
+
for o_item_data in o:
|
|
49
|
+
o_item = o_item_data.value
|
|
50
|
+
json_o.append(o_item)
|
|
51
|
+
|
|
52
|
+
params["o"] = json_o
|
|
53
|
+
|
|
54
|
+
params["page"] = page
|
|
55
|
+
|
|
56
|
+
params["page_size"] = page_size
|
|
57
|
+
|
|
58
|
+
json_role: Union[Unset, str] = UNSET
|
|
59
|
+
if not isinstance(role, Unset):
|
|
60
|
+
json_role = str(role)
|
|
61
|
+
params["role"] = json_role
|
|
62
|
+
|
|
63
|
+
params["search_string"] = search_string
|
|
64
|
+
|
|
65
|
+
json_user: Union[Unset, str] = UNSET
|
|
66
|
+
if not isinstance(user, Unset):
|
|
67
|
+
json_user = str(user)
|
|
68
|
+
params["user"] = json_user
|
|
69
|
+
|
|
70
|
+
params["user_slug"] = user_slug
|
|
71
|
+
|
|
72
|
+
params["user_url"] = user_url
|
|
73
|
+
|
|
74
|
+
params["username"] = username
|
|
75
|
+
|
|
76
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
77
|
+
|
|
78
|
+
_kwargs: dict[str, Any] = {
|
|
79
|
+
"method": "head",
|
|
80
|
+
"url": f"/api/call-managing-organisations/{uuid}/list_users/",
|
|
81
|
+
"params": params,
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return _kwargs
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> int:
|
|
88
|
+
if response.status_code == HTTPStatus.OK:
|
|
89
|
+
try:
|
|
90
|
+
return int(response.headers["x-result-count"])
|
|
91
|
+
except KeyError:
|
|
92
|
+
raise errors.UnexpectedStatus(
|
|
93
|
+
response.status_code,
|
|
94
|
+
b"Expected 'X-Result-Count' header for HEAD request, but it was not found.",
|
|
95
|
+
response.url,
|
|
96
|
+
)
|
|
97
|
+
except ValueError:
|
|
98
|
+
count_val = response.headers.get("x-result-count")
|
|
99
|
+
msg = f"Expected 'X-Result-Count' header to be an integer, but got '{count_val}'."
|
|
100
|
+
raise errors.UnexpectedStatus(response.status_code, msg.encode(), response.url)
|
|
101
|
+
raise errors.UnexpectedStatus(response.status_code, response.content, response.url)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[int]:
|
|
105
|
+
return Response(
|
|
106
|
+
status_code=HTTPStatus(response.status_code),
|
|
107
|
+
content=response.content,
|
|
108
|
+
headers=response.headers,
|
|
109
|
+
parsed=_parse_response(client=client, response=response),
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def sync_detailed(
|
|
114
|
+
uuid: UUID,
|
|
115
|
+
*,
|
|
116
|
+
client: AuthenticatedClient,
|
|
117
|
+
field: Union[Unset, list[UserRoleDetailsFieldEnum]] = UNSET,
|
|
118
|
+
full_name: Union[Unset, str] = UNSET,
|
|
119
|
+
native_name: Union[Unset, str] = UNSET,
|
|
120
|
+
o: Union[Unset, list[UserRoleDetailsOEnum]] = UNSET,
|
|
121
|
+
page: Union[Unset, int] = UNSET,
|
|
122
|
+
page_size: Union[Unset, int] = UNSET,
|
|
123
|
+
role: Union[Unset, UUID] = UNSET,
|
|
124
|
+
search_string: Union[Unset, str] = UNSET,
|
|
125
|
+
user: Union[Unset, UUID] = UNSET,
|
|
126
|
+
user_slug: Union[Unset, str] = UNSET,
|
|
127
|
+
user_url: Union[Unset, str] = UNSET,
|
|
128
|
+
username: Union[Unset, str] = UNSET,
|
|
129
|
+
) -> Response[int]:
|
|
130
|
+
"""List users and their roles in a scope
|
|
131
|
+
|
|
132
|
+
Get number of items in the collection matching the request parameters.
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
uuid (UUID):
|
|
136
|
+
field (Union[Unset, list[UserRoleDetailsFieldEnum]]):
|
|
137
|
+
full_name (Union[Unset, str]):
|
|
138
|
+
native_name (Union[Unset, str]):
|
|
139
|
+
o (Union[Unset, list[UserRoleDetailsOEnum]]):
|
|
140
|
+
page (Union[Unset, int]):
|
|
141
|
+
page_size (Union[Unset, int]):
|
|
142
|
+
role (Union[Unset, UUID]):
|
|
143
|
+
search_string (Union[Unset, str]):
|
|
144
|
+
user (Union[Unset, UUID]):
|
|
145
|
+
user_slug (Union[Unset, str]):
|
|
146
|
+
user_url (Union[Unset, str]):
|
|
147
|
+
username (Union[Unset, str]):
|
|
148
|
+
|
|
149
|
+
Raises:
|
|
150
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
151
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
152
|
+
|
|
153
|
+
Returns:
|
|
154
|
+
Response[int]
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
kwargs = _get_kwargs(
|
|
158
|
+
uuid=uuid,
|
|
159
|
+
field=field,
|
|
160
|
+
full_name=full_name,
|
|
161
|
+
native_name=native_name,
|
|
162
|
+
o=o,
|
|
163
|
+
page=page,
|
|
164
|
+
page_size=page_size,
|
|
165
|
+
role=role,
|
|
166
|
+
search_string=search_string,
|
|
167
|
+
user=user,
|
|
168
|
+
user_slug=user_slug,
|
|
169
|
+
user_url=user_url,
|
|
170
|
+
username=username,
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
response = client.get_httpx_client().request(
|
|
174
|
+
**kwargs,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
return _build_response(client=client, response=response)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def sync(
|
|
181
|
+
uuid: UUID,
|
|
182
|
+
*,
|
|
183
|
+
client: AuthenticatedClient,
|
|
184
|
+
field: Union[Unset, list[UserRoleDetailsFieldEnum]] = UNSET,
|
|
185
|
+
full_name: Union[Unset, str] = UNSET,
|
|
186
|
+
native_name: Union[Unset, str] = UNSET,
|
|
187
|
+
o: Union[Unset, list[UserRoleDetailsOEnum]] = UNSET,
|
|
188
|
+
page: Union[Unset, int] = UNSET,
|
|
189
|
+
page_size: Union[Unset, int] = UNSET,
|
|
190
|
+
role: Union[Unset, UUID] = UNSET,
|
|
191
|
+
search_string: Union[Unset, str] = UNSET,
|
|
192
|
+
user: Union[Unset, UUID] = UNSET,
|
|
193
|
+
user_slug: Union[Unset, str] = UNSET,
|
|
194
|
+
user_url: Union[Unset, str] = UNSET,
|
|
195
|
+
username: Union[Unset, str] = UNSET,
|
|
196
|
+
) -> int:
|
|
197
|
+
"""List users and their roles in a scope
|
|
198
|
+
|
|
199
|
+
Get number of items in the collection matching the request parameters.
|
|
200
|
+
|
|
201
|
+
Args:
|
|
202
|
+
uuid (UUID):
|
|
203
|
+
field (Union[Unset, list[UserRoleDetailsFieldEnum]]):
|
|
204
|
+
full_name (Union[Unset, str]):
|
|
205
|
+
native_name (Union[Unset, str]):
|
|
206
|
+
o (Union[Unset, list[UserRoleDetailsOEnum]]):
|
|
207
|
+
page (Union[Unset, int]):
|
|
208
|
+
page_size (Union[Unset, int]):
|
|
209
|
+
role (Union[Unset, UUID]):
|
|
210
|
+
search_string (Union[Unset, str]):
|
|
211
|
+
user (Union[Unset, UUID]):
|
|
212
|
+
user_slug (Union[Unset, str]):
|
|
213
|
+
user_url (Union[Unset, str]):
|
|
214
|
+
username (Union[Unset, str]):
|
|
215
|
+
|
|
216
|
+
Raises:
|
|
217
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
218
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
219
|
+
|
|
220
|
+
Returns:
|
|
221
|
+
int
|
|
222
|
+
"""
|
|
223
|
+
|
|
224
|
+
return sync_detailed(
|
|
225
|
+
uuid=uuid,
|
|
226
|
+
client=client,
|
|
227
|
+
field=field,
|
|
228
|
+
full_name=full_name,
|
|
229
|
+
native_name=native_name,
|
|
230
|
+
o=o,
|
|
231
|
+
page=page,
|
|
232
|
+
page_size=page_size,
|
|
233
|
+
role=role,
|
|
234
|
+
search_string=search_string,
|
|
235
|
+
user=user,
|
|
236
|
+
user_slug=user_slug,
|
|
237
|
+
user_url=user_url,
|
|
238
|
+
username=username,
|
|
239
|
+
).parsed
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
async def asyncio_detailed(
|
|
243
|
+
uuid: UUID,
|
|
244
|
+
*,
|
|
245
|
+
client: AuthenticatedClient,
|
|
246
|
+
field: Union[Unset, list[UserRoleDetailsFieldEnum]] = UNSET,
|
|
247
|
+
full_name: Union[Unset, str] = UNSET,
|
|
248
|
+
native_name: Union[Unset, str] = UNSET,
|
|
249
|
+
o: Union[Unset, list[UserRoleDetailsOEnum]] = UNSET,
|
|
250
|
+
page: Union[Unset, int] = UNSET,
|
|
251
|
+
page_size: Union[Unset, int] = UNSET,
|
|
252
|
+
role: Union[Unset, UUID] = UNSET,
|
|
253
|
+
search_string: Union[Unset, str] = UNSET,
|
|
254
|
+
user: Union[Unset, UUID] = UNSET,
|
|
255
|
+
user_slug: Union[Unset, str] = UNSET,
|
|
256
|
+
user_url: Union[Unset, str] = UNSET,
|
|
257
|
+
username: Union[Unset, str] = UNSET,
|
|
258
|
+
) -> Response[int]:
|
|
259
|
+
"""List users and their roles in a scope
|
|
260
|
+
|
|
261
|
+
Get number of items in the collection matching the request parameters.
|
|
262
|
+
|
|
263
|
+
Args:
|
|
264
|
+
uuid (UUID):
|
|
265
|
+
field (Union[Unset, list[UserRoleDetailsFieldEnum]]):
|
|
266
|
+
full_name (Union[Unset, str]):
|
|
267
|
+
native_name (Union[Unset, str]):
|
|
268
|
+
o (Union[Unset, list[UserRoleDetailsOEnum]]):
|
|
269
|
+
page (Union[Unset, int]):
|
|
270
|
+
page_size (Union[Unset, int]):
|
|
271
|
+
role (Union[Unset, UUID]):
|
|
272
|
+
search_string (Union[Unset, str]):
|
|
273
|
+
user (Union[Unset, UUID]):
|
|
274
|
+
user_slug (Union[Unset, str]):
|
|
275
|
+
user_url (Union[Unset, str]):
|
|
276
|
+
username (Union[Unset, str]):
|
|
277
|
+
|
|
278
|
+
Raises:
|
|
279
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
280
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
281
|
+
|
|
282
|
+
Returns:
|
|
283
|
+
Response[int]
|
|
284
|
+
"""
|
|
285
|
+
|
|
286
|
+
kwargs = _get_kwargs(
|
|
287
|
+
uuid=uuid,
|
|
288
|
+
field=field,
|
|
289
|
+
full_name=full_name,
|
|
290
|
+
native_name=native_name,
|
|
291
|
+
o=o,
|
|
292
|
+
page=page,
|
|
293
|
+
page_size=page_size,
|
|
294
|
+
role=role,
|
|
295
|
+
search_string=search_string,
|
|
296
|
+
user=user,
|
|
297
|
+
user_slug=user_slug,
|
|
298
|
+
user_url=user_url,
|
|
299
|
+
username=username,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
303
|
+
|
|
304
|
+
return _build_response(client=client, response=response)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
async def asyncio(
|
|
308
|
+
uuid: UUID,
|
|
309
|
+
*,
|
|
310
|
+
client: AuthenticatedClient,
|
|
311
|
+
field: Union[Unset, list[UserRoleDetailsFieldEnum]] = UNSET,
|
|
312
|
+
full_name: Union[Unset, str] = UNSET,
|
|
313
|
+
native_name: Union[Unset, str] = UNSET,
|
|
314
|
+
o: Union[Unset, list[UserRoleDetailsOEnum]] = UNSET,
|
|
315
|
+
page: Union[Unset, int] = UNSET,
|
|
316
|
+
page_size: Union[Unset, int] = UNSET,
|
|
317
|
+
role: Union[Unset, UUID] = UNSET,
|
|
318
|
+
search_string: Union[Unset, str] = UNSET,
|
|
319
|
+
user: Union[Unset, UUID] = UNSET,
|
|
320
|
+
user_slug: Union[Unset, str] = UNSET,
|
|
321
|
+
user_url: Union[Unset, str] = UNSET,
|
|
322
|
+
username: Union[Unset, str] = UNSET,
|
|
323
|
+
) -> int:
|
|
324
|
+
"""List users and their roles in a scope
|
|
325
|
+
|
|
326
|
+
Get number of items in the collection matching the request parameters.
|
|
327
|
+
|
|
328
|
+
Args:
|
|
329
|
+
uuid (UUID):
|
|
330
|
+
field (Union[Unset, list[UserRoleDetailsFieldEnum]]):
|
|
331
|
+
full_name (Union[Unset, str]):
|
|
332
|
+
native_name (Union[Unset, str]):
|
|
333
|
+
o (Union[Unset, list[UserRoleDetailsOEnum]]):
|
|
334
|
+
page (Union[Unset, int]):
|
|
335
|
+
page_size (Union[Unset, int]):
|
|
336
|
+
role (Union[Unset, UUID]):
|
|
337
|
+
search_string (Union[Unset, str]):
|
|
338
|
+
user (Union[Unset, UUID]):
|
|
339
|
+
user_slug (Union[Unset, str]):
|
|
340
|
+
user_url (Union[Unset, str]):
|
|
341
|
+
username (Union[Unset, str]):
|
|
342
|
+
|
|
343
|
+
Raises:
|
|
344
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
345
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
346
|
+
|
|
347
|
+
Returns:
|
|
348
|
+
int
|
|
349
|
+
"""
|
|
350
|
+
|
|
351
|
+
return (
|
|
352
|
+
await asyncio_detailed(
|
|
353
|
+
uuid=uuid,
|
|
354
|
+
client=client,
|
|
355
|
+
field=field,
|
|
356
|
+
full_name=full_name,
|
|
357
|
+
native_name=native_name,
|
|
358
|
+
o=o,
|
|
359
|
+
page=page,
|
|
360
|
+
page_size=page_size,
|
|
361
|
+
role=role,
|
|
362
|
+
search_string=search_string,
|
|
363
|
+
user=user,
|
|
364
|
+
user_slug=user_slug,
|
|
365
|
+
user_url=user_url,
|
|
366
|
+
username=username,
|
|
367
|
+
)
|
|
368
|
+
).parsed
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains endpoint functions for accessing the API"""
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Union
|
|
3
|
+
from uuid import UUID
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.backend_resource_req_o_enum import BackendResourceReqOEnum
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
credit_uuid: Union[Unset, UUID] = UNSET,
|
|
16
|
+
customer_uuid: Union[Unset, UUID] = UNSET,
|
|
17
|
+
o: Union[Unset, list[BackendResourceReqOEnum]] = UNSET,
|
|
18
|
+
page: Union[Unset, int] = UNSET,
|
|
19
|
+
page_size: Union[Unset, int] = UNSET,
|
|
20
|
+
transaction_type: Union[Unset, str] = UNSET,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
params: dict[str, Any] = {}
|
|
23
|
+
|
|
24
|
+
json_credit_uuid: Union[Unset, str] = UNSET
|
|
25
|
+
if not isinstance(credit_uuid, Unset):
|
|
26
|
+
json_credit_uuid = str(credit_uuid)
|
|
27
|
+
params["credit_uuid"] = json_credit_uuid
|
|
28
|
+
|
|
29
|
+
json_customer_uuid: Union[Unset, str] = UNSET
|
|
30
|
+
if not isinstance(customer_uuid, Unset):
|
|
31
|
+
json_customer_uuid = str(customer_uuid)
|
|
32
|
+
params["customer_uuid"] = json_customer_uuid
|
|
33
|
+
|
|
34
|
+
json_o: Union[Unset, list[str]] = UNSET
|
|
35
|
+
if not isinstance(o, Unset):
|
|
36
|
+
json_o = []
|
|
37
|
+
for o_item_data in o:
|
|
38
|
+
o_item = o_item_data.value
|
|
39
|
+
json_o.append(o_item)
|
|
40
|
+
|
|
41
|
+
params["o"] = json_o
|
|
42
|
+
|
|
43
|
+
params["page"] = page
|
|
44
|
+
|
|
45
|
+
params["page_size"] = page_size
|
|
46
|
+
|
|
47
|
+
params["transaction_type"] = transaction_type
|
|
48
|
+
|
|
49
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
50
|
+
|
|
51
|
+
_kwargs: dict[str, Any] = {
|
|
52
|
+
"method": "head",
|
|
53
|
+
"url": "/api/credit-transactions/",
|
|
54
|
+
"params": params,
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return _kwargs
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> int:
|
|
61
|
+
if response.status_code == HTTPStatus.OK:
|
|
62
|
+
try:
|
|
63
|
+
return int(response.headers["x-result-count"])
|
|
64
|
+
except KeyError:
|
|
65
|
+
raise errors.UnexpectedStatus(
|
|
66
|
+
response.status_code,
|
|
67
|
+
b"Expected 'X-Result-Count' header for HEAD request, but it was not found.",
|
|
68
|
+
response.url,
|
|
69
|
+
)
|
|
70
|
+
except ValueError:
|
|
71
|
+
count_val = response.headers.get("x-result-count")
|
|
72
|
+
msg = f"Expected 'X-Result-Count' header to be an integer, but got '{count_val}'."
|
|
73
|
+
raise errors.UnexpectedStatus(response.status_code, msg.encode(), response.url)
|
|
74
|
+
raise errors.UnexpectedStatus(response.status_code, response.content, response.url)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[int]:
|
|
78
|
+
return Response(
|
|
79
|
+
status_code=HTTPStatus(response.status_code),
|
|
80
|
+
content=response.content,
|
|
81
|
+
headers=response.headers,
|
|
82
|
+
parsed=_parse_response(client=client, response=response),
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def sync_detailed(
|
|
87
|
+
*,
|
|
88
|
+
client: AuthenticatedClient,
|
|
89
|
+
credit_uuid: Union[Unset, UUID] = UNSET,
|
|
90
|
+
customer_uuid: Union[Unset, UUID] = UNSET,
|
|
91
|
+
o: Union[Unset, list[BackendResourceReqOEnum]] = UNSET,
|
|
92
|
+
page: Union[Unset, int] = UNSET,
|
|
93
|
+
page_size: Union[Unset, int] = UNSET,
|
|
94
|
+
transaction_type: Union[Unset, str] = UNSET,
|
|
95
|
+
) -> Response[int]:
|
|
96
|
+
"""Get number of items in the collection matching the request parameters.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
credit_uuid (Union[Unset, UUID]):
|
|
100
|
+
customer_uuid (Union[Unset, UUID]):
|
|
101
|
+
o (Union[Unset, list[BackendResourceReqOEnum]]):
|
|
102
|
+
page (Union[Unset, int]):
|
|
103
|
+
page_size (Union[Unset, int]):
|
|
104
|
+
transaction_type (Union[Unset, str]):
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response[int]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
kwargs = _get_kwargs(
|
|
115
|
+
credit_uuid=credit_uuid,
|
|
116
|
+
customer_uuid=customer_uuid,
|
|
117
|
+
o=o,
|
|
118
|
+
page=page,
|
|
119
|
+
page_size=page_size,
|
|
120
|
+
transaction_type=transaction_type,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
response = client.get_httpx_client().request(
|
|
124
|
+
**kwargs,
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
return _build_response(client=client, response=response)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def sync(
|
|
131
|
+
*,
|
|
132
|
+
client: AuthenticatedClient,
|
|
133
|
+
credit_uuid: Union[Unset, UUID] = UNSET,
|
|
134
|
+
customer_uuid: Union[Unset, UUID] = UNSET,
|
|
135
|
+
o: Union[Unset, list[BackendResourceReqOEnum]] = UNSET,
|
|
136
|
+
page: Union[Unset, int] = UNSET,
|
|
137
|
+
page_size: Union[Unset, int] = UNSET,
|
|
138
|
+
transaction_type: Union[Unset, str] = UNSET,
|
|
139
|
+
) -> int:
|
|
140
|
+
"""Get number of items in the collection matching the request parameters.
|
|
141
|
+
|
|
142
|
+
Args:
|
|
143
|
+
credit_uuid (Union[Unset, UUID]):
|
|
144
|
+
customer_uuid (Union[Unset, UUID]):
|
|
145
|
+
o (Union[Unset, list[BackendResourceReqOEnum]]):
|
|
146
|
+
page (Union[Unset, int]):
|
|
147
|
+
page_size (Union[Unset, int]):
|
|
148
|
+
transaction_type (Union[Unset, str]):
|
|
149
|
+
|
|
150
|
+
Raises:
|
|
151
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
152
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
153
|
+
|
|
154
|
+
Returns:
|
|
155
|
+
int
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
return sync_detailed(
|
|
159
|
+
client=client,
|
|
160
|
+
credit_uuid=credit_uuid,
|
|
161
|
+
customer_uuid=customer_uuid,
|
|
162
|
+
o=o,
|
|
163
|
+
page=page,
|
|
164
|
+
page_size=page_size,
|
|
165
|
+
transaction_type=transaction_type,
|
|
166
|
+
).parsed
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
async def asyncio_detailed(
|
|
170
|
+
*,
|
|
171
|
+
client: AuthenticatedClient,
|
|
172
|
+
credit_uuid: Union[Unset, UUID] = UNSET,
|
|
173
|
+
customer_uuid: Union[Unset, UUID] = UNSET,
|
|
174
|
+
o: Union[Unset, list[BackendResourceReqOEnum]] = UNSET,
|
|
175
|
+
page: Union[Unset, int] = UNSET,
|
|
176
|
+
page_size: Union[Unset, int] = UNSET,
|
|
177
|
+
transaction_type: Union[Unset, str] = UNSET,
|
|
178
|
+
) -> Response[int]:
|
|
179
|
+
"""Get number of items in the collection matching the request parameters.
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
credit_uuid (Union[Unset, UUID]):
|
|
183
|
+
customer_uuid (Union[Unset, UUID]):
|
|
184
|
+
o (Union[Unset, list[BackendResourceReqOEnum]]):
|
|
185
|
+
page (Union[Unset, int]):
|
|
186
|
+
page_size (Union[Unset, int]):
|
|
187
|
+
transaction_type (Union[Unset, str]):
|
|
188
|
+
|
|
189
|
+
Raises:
|
|
190
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
191
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
192
|
+
|
|
193
|
+
Returns:
|
|
194
|
+
Response[int]
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
kwargs = _get_kwargs(
|
|
198
|
+
credit_uuid=credit_uuid,
|
|
199
|
+
customer_uuid=customer_uuid,
|
|
200
|
+
o=o,
|
|
201
|
+
page=page,
|
|
202
|
+
page_size=page_size,
|
|
203
|
+
transaction_type=transaction_type,
|
|
204
|
+
)
|
|
205
|
+
|
|
206
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
207
|
+
|
|
208
|
+
return _build_response(client=client, response=response)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
async def asyncio(
|
|
212
|
+
*,
|
|
213
|
+
client: AuthenticatedClient,
|
|
214
|
+
credit_uuid: Union[Unset, UUID] = UNSET,
|
|
215
|
+
customer_uuid: Union[Unset, UUID] = UNSET,
|
|
216
|
+
o: Union[Unset, list[BackendResourceReqOEnum]] = UNSET,
|
|
217
|
+
page: Union[Unset, int] = UNSET,
|
|
218
|
+
page_size: Union[Unset, int] = UNSET,
|
|
219
|
+
transaction_type: Union[Unset, str] = UNSET,
|
|
220
|
+
) -> int:
|
|
221
|
+
"""Get number of items in the collection matching the request parameters.
|
|
222
|
+
|
|
223
|
+
Args:
|
|
224
|
+
credit_uuid (Union[Unset, UUID]):
|
|
225
|
+
customer_uuid (Union[Unset, UUID]):
|
|
226
|
+
o (Union[Unset, list[BackendResourceReqOEnum]]):
|
|
227
|
+
page (Union[Unset, int]):
|
|
228
|
+
page_size (Union[Unset, int]):
|
|
229
|
+
transaction_type (Union[Unset, str]):
|
|
230
|
+
|
|
231
|
+
Raises:
|
|
232
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
233
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
234
|
+
|
|
235
|
+
Returns:
|
|
236
|
+
int
|
|
237
|
+
"""
|
|
238
|
+
|
|
239
|
+
return (
|
|
240
|
+
await asyncio_detailed(
|
|
241
|
+
client=client,
|
|
242
|
+
credit_uuid=credit_uuid,
|
|
243
|
+
customer_uuid=customer_uuid,
|
|
244
|
+
o=o,
|
|
245
|
+
page=page,
|
|
246
|
+
page_size=page_size,
|
|
247
|
+
transaction_type=transaction_type,
|
|
248
|
+
)
|
|
249
|
+
).parsed
|