docket-client 0.3.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.
- docket/__init__.py +8 -0
- docket/api/__init__.py +1 -0
- docket/api/access/__init__.py +1 -0
- docket/api/access/add_principal.py +193 -0
- docket/api/access/archive_role_assignment.py +182 -0
- docket/api/access/create_api_token.py +198 -0
- docket/api/access/create_application_principal.py +188 -0
- docket/api/access/create_role_assignment.py +194 -0
- docket/api/access/list_api_tokens.py +184 -0
- docket/api/access/list_principals.py +184 -0
- docket/api/access/list_role_assignments.py +200 -0
- docket/api/access/revoke_api_token.py +173 -0
- docket/api/identity/__init__.py +1 -0
- docket/api/identity/create_my_api_token.py +206 -0
- docket/api/identity/get_me.py +127 -0
- docket/api/identity/list_my_api_tokens.py +151 -0
- docket/api/identity/revoke_my_api_token.py +178 -0
- docket/api/recurring_acquisitions/__init__.py +1 -0
- docket/api/recurring_acquisitions/archive_recurring_acquisition.py +207 -0
- docket/api/recurring_acquisitions/create_recurring_acquisition.py +218 -0
- docket/api/recurring_acquisitions/get_recurring_acquisition.py +163 -0
- docket/api/recurring_acquisitions/list_recurring_acquisitions.py +248 -0
- docket/api/recurring_acquisitions/preview_recurring_acquisition.py +187 -0
- docket/api/recurring_acquisitions/preview_split_recurring_acquisition.py +232 -0
- docket/api/recurring_acquisitions/split_recurring_acquisition.py +258 -0
- docket/api/runs/__init__.py +1 -0
- docket/api/runs/get_run.py +160 -0
- docket/api/runs/list_runs.py +180 -0
- docket/api/runs/report_run_outcome.py +206 -0
- docket/api/scheduled_acquisitions/__init__.py +1 -0
- docket/api/scheduled_acquisitions/archive_scheduled_acquisition.py +203 -0
- docket/api/scheduled_acquisitions/create_scheduled_acquisition.py +185 -0
- docket/api/scheduled_acquisitions/get_resolved_settings.py +169 -0
- docket/api/scheduled_acquisitions/get_scheduled_acquisition.py +159 -0
- docket/api/scheduled_acquisitions/list_active_acquisitions.py +297 -0
- docket/api/scheduled_acquisitions/list_runs_for_scheduled_acquisition.py +191 -0
- docket/api/scheduled_acquisitions/list_scheduled_acquisitions.py +332 -0
- docket/api/scheduled_acquisitions/preview_scheduled_acquisition_edit.py +224 -0
- docket/api/scheduled_acquisitions/set_planning_status.py +199 -0
- docket/api/scheduled_acquisitions/start_run.py +221 -0
- docket/api/scheduled_acquisitions/update_scheduled_acquisition.py +226 -0
- docket/api/settings/__init__.py +1 -0
- docket/api/settings/list_behavior_curriculum_discriminator_values.py +188 -0
- docket/api/settings/list_behavior_curriculum_settings.py +199 -0
- docket/api/settings/list_fip_discriminator_values.py +184 -0
- docket/api/settings/list_fip_settings.py +195 -0
- docket/api/settings/list_live_behavior_curriculum_settings.py +233 -0
- docket/api/settings/list_live_fip_settings.py +225 -0
- docket/api/settings/preview_behavior_curriculum_settings.py +191 -0
- docket/api/settings/preview_fip_settings.py +177 -0
- docket/api/settings/push_behavior_curriculum_settings.py +222 -0
- docket/api/settings/push_fip_settings.py +206 -0
- docket/api/templates/__init__.py +1 -0
- docket/api/templates/archive_template.py +203 -0
- docket/api/templates/create_template.py +206 -0
- docket/api/templates/get_template.py +159 -0
- docket/api/templates/list_templates.py +174 -0
- docket/api/templates/update_template.py +234 -0
- docket/api/vocabulary/__init__.py +1 -0
- docket/api/vocabulary/list_instruments.py +165 -0
- docket/api/vocabulary/list_persons.py +132 -0
- docket/api/vocabulary/list_projects.py +132 -0
- docket/api/vocabulary/list_subjects.py +132 -0
- docket/api/vocabulary/lookup_person.py +166 -0
- docket/api/vocabulary/lookup_subject.py +166 -0
- docket/api/vocabulary/sync_vocabulary.py +148 -0
- docket/client.py +272 -0
- docket/errors.py +16 -0
- docket/models/__init__.py +221 -0
- docket/models/access_role.py +12 -0
- docket/models/access_role_nullable_type_1.py +12 -0
- docket/models/access_role_nullable_type_2_type_1.py +12 -0
- docket/models/access_role_nullable_type_3_type_1.py +12 -0
- docket/models/acquisition_variable.py +72 -0
- docket/models/acquisition_warning.py +126 -0
- docket/models/add_principal_request.py +83 -0
- docket/models/api_token_response.py +271 -0
- docket/models/api_token_status.py +10 -0
- docket/models/archive_recurring_acquisition_request.py +77 -0
- docket/models/archive_recurring_acquisition_response.py +83 -0
- docket/models/archive_scheduled_acquisition_request.py +78 -0
- docket/models/archive_template_request.py +66 -0
- docket/models/auth_mode.py +10 -0
- docket/models/behavior_curriculum_push_settings_request.py +85 -0
- docket/models/behavior_curriculum_settings.py +55 -0
- docket/models/behavior_curriculum_settings_preview_response.py +102 -0
- docket/models/behavior_curriculum_settings_preview_response_promoted.py +50 -0
- docket/models/behavior_curriculum_settings_version_response.py +160 -0
- docket/models/behavior_curriculum_settings_version_response_promoted.py +50 -0
- docket/models/caller_kind.py +11 -0
- docket/models/create_api_token_request.py +97 -0
- docket/models/create_application_principal_request.py +65 -0
- docket/models/create_personal_api_token_request.py +167 -0
- docket/models/create_recurring_acquisition_request.py +269 -0
- docket/models/create_role_assignment_request.py +99 -0
- docket/models/create_scheduled_acquisition_request.py +265 -0
- docket/models/create_template_request.py +323 -0
- docket/models/created_api_token_response.py +82 -0
- docket/models/effective_status.py +15 -0
- docket/models/fip_color.py +13 -0
- docket/models/fip_fiber.py +93 -0
- docket/models/fip_mode.py +9 -0
- docket/models/fip_push_settings_request.py +82 -0
- docket/models/fip_settings.py +91 -0
- docket/models/fip_settings_preview_response.py +97 -0
- docket/models/fip_settings_preview_response_promoted.py +50 -0
- docket/models/fip_settings_version_response.py +155 -0
- docket/models/fip_settings_version_response_promoted.py +50 -0
- docket/models/future_occurrences.py +9 -0
- docket/models/get_resolved_settings_response_200.py +65 -0
- docket/models/held_role_response.py +116 -0
- docket/models/http_validation_problem_details.py +204 -0
- docket/models/http_validation_problem_details_errors.py +59 -0
- docket/models/instrument_response.py +91 -0
- docket/models/kept_occurrence.py +85 -0
- docket/models/kept_occurrence_reason.py +10 -0
- docket/models/list_active_acquisitions_effective_status_item.py +15 -0
- docket/models/list_scheduled_acquisitions_planning_status.py +11 -0
- docket/models/me_caller.py +118 -0
- docket/models/me_permission.py +98 -0
- docket/models/me_response.py +158 -0
- docket/models/me_role.py +75 -0
- docket/models/occurrence_preview.py +121 -0
- docket/models/occurrence_summary.py +126 -0
- docket/models/occurrence_warnings.py +91 -0
- docket/models/permission_action.py +12 -0
- docket/models/person_assignment.py +74 -0
- docket/models/person_lookup_response.py +131 -0
- docket/models/person_response.py +103 -0
- docket/models/person_role.py +9 -0
- docket/models/personal_token_limits.py +92 -0
- docket/models/planning_status.py +11 -0
- docket/models/principal_kind.py +9 -0
- docket/models/principal_response.py +216 -0
- docket/models/problem_details.py +177 -0
- docket/models/project_response.py +75 -0
- docket/models/recurrence_exception_kind.py +13 -0
- docket/models/recurrence_exception_response.py +103 -0
- docket/models/recurrence_frequency.py +9 -0
- docket/models/recurrence_preview_response.py +101 -0
- docket/models/recurrence_rule.py +207 -0
- docket/models/recurring_acquisition_created_response.py +123 -0
- docket/models/recurring_acquisition_detail_response.py +105 -0
- docket/models/recurring_acquisition_response.py +326 -0
- docket/models/report_run_outcome_request.py +89 -0
- docket/models/resolution_mode.py +10 -0
- docket/models/resolved_settings.py +73 -0
- docket/models/role_assignment_response.py +157 -0
- docket/models/role_origin.py +10 -0
- docket/models/role_source_kind.py +10 -0
- docket/models/run_origin.py +9 -0
- docket/models/run_outcome.py +9 -0
- docket/models/run_response.py +181 -0
- docket/models/run_settings_snapshot.py +72 -0
- docket/models/run_start_response.py +91 -0
- docket/models/run_start_response_settings.py +65 -0
- docket/models/run_status.py +11 -0
- docket/models/scheduled_acquisition_edit_preview_response.py +150 -0
- docket/models/scheduled_acquisition_response.py +366 -0
- docket/models/set_planning_status_request.py +90 -0
- docket/models/settings_selector.py +138 -0
- docket/models/skipped_occurrence.py +85 -0
- docket/models/split_preview_response.py +129 -0
- docket/models/split_recurring_acquisition_request.py +261 -0
- docket/models/split_recurring_acquisition_response.py +159 -0
- docket/models/start_run_request.py +73 -0
- docket/models/subject_lookup_response.py +149 -0
- docket/models/subject_response.py +128 -0
- docket/models/sync_counts.py +80 -0
- docket/models/sync_response.py +81 -0
- docket/models/template_response.py +302 -0
- docket/models/update_scheduled_acquisition_request.py +235 -0
- docket/models/update_template_request.py +279 -0
- docket/models/weekday.py +14 -0
- docket/types.py +54 -0
- docket_auth/__init__.py +239 -0
- docket_client-0.3.2.dist-info/METADATA +233 -0
- docket_client-0.3.2.dist-info/RECORD +188 -0
- docket_client-0.3.2.dist-info/WHEEL +4 -0
- docket_client-0.3.2.dist-info/entry_points.txt +2 -0
- docket_mcp/__init__.py +6 -0
- docket_mcp/api.py +207 -0
- docket_mcp/config.py +57 -0
- docket_mcp/server.py +78 -0
- docket_mcp/signin.py +155 -0
- docket_mcp/slots.py +80 -0
- docket_mcp/times.py +160 -0
- docket_mcp/tools.py +1202 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
from typing import cast
|
|
12
|
+
import datetime
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from ..models.acquisition_warning import AcquisitionWarning
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="OccurrenceWarnings")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class OccurrenceWarnings:
|
|
23
|
+
"""The occurrences with at least one overlap warning.
|
|
24
|
+
|
|
25
|
+
Attributes:
|
|
26
|
+
occurrence_local_date (datetime.date): Calendar date, e.g. 2026-10-15.
|
|
27
|
+
warnings (list[AcquisitionWarning]):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
occurrence_local_date: datetime.date
|
|
31
|
+
warnings: list[AcquisitionWarning]
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
from ..models.acquisition_warning import AcquisitionWarning
|
|
36
|
+
|
|
37
|
+
occurrence_local_date = self.occurrence_local_date.isoformat()
|
|
38
|
+
|
|
39
|
+
warnings = []
|
|
40
|
+
for warnings_item_data in self.warnings:
|
|
41
|
+
warnings_item = warnings_item_data.to_dict()
|
|
42
|
+
warnings.append(warnings_item)
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update(
|
|
47
|
+
{
|
|
48
|
+
"occurrence_local_date": occurrence_local_date,
|
|
49
|
+
"warnings": warnings,
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
return field_dict
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
57
|
+
from ..models.acquisition_warning import AcquisitionWarning
|
|
58
|
+
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
occurrence_local_date = datetime.date.fromisoformat(d.pop("occurrence_local_date"))
|
|
61
|
+
|
|
62
|
+
warnings = []
|
|
63
|
+
_warnings = d.pop("warnings")
|
|
64
|
+
for warnings_item_data in _warnings:
|
|
65
|
+
warnings_item = AcquisitionWarning.from_dict(warnings_item_data)
|
|
66
|
+
|
|
67
|
+
warnings.append(warnings_item)
|
|
68
|
+
|
|
69
|
+
occurrence_warnings = cls(
|
|
70
|
+
occurrence_local_date=occurrence_local_date,
|
|
71
|
+
warnings=warnings,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
occurrence_warnings.additional_properties = d
|
|
75
|
+
return occurrence_warnings
|
|
76
|
+
|
|
77
|
+
@property
|
|
78
|
+
def additional_keys(self) -> list[str]:
|
|
79
|
+
return list(self.additional_properties.keys())
|
|
80
|
+
|
|
81
|
+
def __getitem__(self, key: str) -> Any:
|
|
82
|
+
return self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
85
|
+
self.additional_properties[key] = value
|
|
86
|
+
|
|
87
|
+
def __delitem__(self, key: str) -> None:
|
|
88
|
+
del self.additional_properties[key]
|
|
89
|
+
|
|
90
|
+
def __contains__(self, key: str) -> bool:
|
|
91
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
from ..models.person_role import PersonRole
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="PersonAssignment")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class PersonAssignment:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
person_id (str): Active Directory username; canonicalized.
|
|
22
|
+
role (PersonRole):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
person_id: str
|
|
26
|
+
role: PersonRole
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
person_id = self.person_id
|
|
31
|
+
|
|
32
|
+
role = self.role.value
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"person_id": person_id,
|
|
39
|
+
"role": role,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
d = dict(src_dict)
|
|
48
|
+
person_id = d.pop("person_id")
|
|
49
|
+
|
|
50
|
+
role = PersonRole(d.pop("role"))
|
|
51
|
+
|
|
52
|
+
person_assignment = cls(
|
|
53
|
+
person_id=person_id,
|
|
54
|
+
role=role,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
person_assignment.additional_properties = d
|
|
58
|
+
return person_assignment
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def additional_keys(self) -> list[str]:
|
|
62
|
+
return list(self.additional_properties.keys())
|
|
63
|
+
|
|
64
|
+
def __getitem__(self, key: str) -> Any:
|
|
65
|
+
return self.additional_properties[key]
|
|
66
|
+
|
|
67
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
68
|
+
self.additional_properties[key] = value
|
|
69
|
+
|
|
70
|
+
def __delitem__(self, key: str) -> None:
|
|
71
|
+
del self.additional_properties[key]
|
|
72
|
+
|
|
73
|
+
def __contains__(self, key: str) -> bool:
|
|
74
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
from typing import cast
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="PersonLookupResponse")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class PersonLookupResponse:
|
|
19
|
+
"""Answer to "is this a real person?". Returned with 200 even when bool PersonLookupResponse.Valid is false.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
valid (bool): Whether Active Directory knows the username.
|
|
23
|
+
username (None | str): Canonical username when valid.
|
|
24
|
+
canonicalised (bool): True when Username differs from what was asked.
|
|
25
|
+
detail (None | str): Why the username is not valid; null when valid.
|
|
26
|
+
full_name (None | str): Display name from Active Directory, if any.
|
|
27
|
+
email (None | str): Email from Active Directory, if any.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
valid: bool
|
|
31
|
+
username: None | str
|
|
32
|
+
canonicalised: bool
|
|
33
|
+
detail: None | str
|
|
34
|
+
full_name: None | str
|
|
35
|
+
email: None | str
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
valid = self.valid
|
|
40
|
+
|
|
41
|
+
username: None | str
|
|
42
|
+
username = self.username
|
|
43
|
+
|
|
44
|
+
canonicalised = self.canonicalised
|
|
45
|
+
|
|
46
|
+
detail: None | str
|
|
47
|
+
detail = self.detail
|
|
48
|
+
|
|
49
|
+
full_name: None | str
|
|
50
|
+
full_name = self.full_name
|
|
51
|
+
|
|
52
|
+
email: None | str
|
|
53
|
+
email = self.email
|
|
54
|
+
|
|
55
|
+
field_dict: dict[str, Any] = {}
|
|
56
|
+
field_dict.update(self.additional_properties)
|
|
57
|
+
field_dict.update(
|
|
58
|
+
{
|
|
59
|
+
"valid": valid,
|
|
60
|
+
"username": username,
|
|
61
|
+
"canonicalised": canonicalised,
|
|
62
|
+
"detail": detail,
|
|
63
|
+
"full_name": full_name,
|
|
64
|
+
"email": email,
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
return field_dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
72
|
+
d = dict(src_dict)
|
|
73
|
+
valid = d.pop("valid")
|
|
74
|
+
|
|
75
|
+
def _parse_username(data: object) -> None | str:
|
|
76
|
+
if data is None:
|
|
77
|
+
return data
|
|
78
|
+
return cast(None | str, data)
|
|
79
|
+
|
|
80
|
+
username = _parse_username(d.pop("username"))
|
|
81
|
+
|
|
82
|
+
canonicalised = d.pop("canonicalised")
|
|
83
|
+
|
|
84
|
+
def _parse_detail(data: object) -> None | str:
|
|
85
|
+
if data is None:
|
|
86
|
+
return data
|
|
87
|
+
return cast(None | str, data)
|
|
88
|
+
|
|
89
|
+
detail = _parse_detail(d.pop("detail"))
|
|
90
|
+
|
|
91
|
+
def _parse_full_name(data: object) -> None | str:
|
|
92
|
+
if data is None:
|
|
93
|
+
return data
|
|
94
|
+
return cast(None | str, data)
|
|
95
|
+
|
|
96
|
+
full_name = _parse_full_name(d.pop("full_name"))
|
|
97
|
+
|
|
98
|
+
def _parse_email(data: object) -> None | str:
|
|
99
|
+
if data is None:
|
|
100
|
+
return data
|
|
101
|
+
return cast(None | str, data)
|
|
102
|
+
|
|
103
|
+
email = _parse_email(d.pop("email"))
|
|
104
|
+
|
|
105
|
+
person_lookup_response = cls(
|
|
106
|
+
valid=valid,
|
|
107
|
+
username=username,
|
|
108
|
+
canonicalised=canonicalised,
|
|
109
|
+
detail=detail,
|
|
110
|
+
full_name=full_name,
|
|
111
|
+
email=email,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
person_lookup_response.additional_properties = d
|
|
115
|
+
return person_lookup_response
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def additional_keys(self) -> list[str]:
|
|
119
|
+
return list(self.additional_properties.keys())
|
|
120
|
+
|
|
121
|
+
def __getitem__(self, key: str) -> Any:
|
|
122
|
+
return self.additional_properties[key]
|
|
123
|
+
|
|
124
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
125
|
+
self.additional_properties[key] = value
|
|
126
|
+
|
|
127
|
+
def __delitem__(self, key: str) -> None:
|
|
128
|
+
del self.additional_properties[key]
|
|
129
|
+
|
|
130
|
+
def __contains__(self, key: str) -> bool:
|
|
131
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
from typing import cast
|
|
12
|
+
import datetime
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="PersonResponse")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class PersonResponse:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
id (str):
|
|
23
|
+
full_name (None | str):
|
|
24
|
+
email (None | str):
|
|
25
|
+
validated_at (datetime.datetime): UTC instant, ISO 8601 with offset, e.g. 2026-10-15T16:00:00Z.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
id: str
|
|
29
|
+
full_name: None | str
|
|
30
|
+
email: None | str
|
|
31
|
+
validated_at: datetime.datetime
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
id = self.id
|
|
36
|
+
|
|
37
|
+
full_name: None | str
|
|
38
|
+
full_name = self.full_name
|
|
39
|
+
|
|
40
|
+
email: None | str
|
|
41
|
+
email = self.email
|
|
42
|
+
|
|
43
|
+
validated_at = self.validated_at.isoformat()
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"id": id,
|
|
50
|
+
"full_name": full_name,
|
|
51
|
+
"email": email,
|
|
52
|
+
"validated_at": validated_at,
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
return field_dict
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
60
|
+
d = dict(src_dict)
|
|
61
|
+
id = d.pop("id")
|
|
62
|
+
|
|
63
|
+
def _parse_full_name(data: object) -> None | str:
|
|
64
|
+
if data is None:
|
|
65
|
+
return data
|
|
66
|
+
return cast(None | str, data)
|
|
67
|
+
|
|
68
|
+
full_name = _parse_full_name(d.pop("full_name"))
|
|
69
|
+
|
|
70
|
+
def _parse_email(data: object) -> None | str:
|
|
71
|
+
if data is None:
|
|
72
|
+
return data
|
|
73
|
+
return cast(None | str, data)
|
|
74
|
+
|
|
75
|
+
email = _parse_email(d.pop("email"))
|
|
76
|
+
|
|
77
|
+
validated_at = datetime.datetime.fromisoformat(d.pop("validated_at"))
|
|
78
|
+
|
|
79
|
+
person_response = cls(
|
|
80
|
+
id=id,
|
|
81
|
+
full_name=full_name,
|
|
82
|
+
email=email,
|
|
83
|
+
validated_at=validated_at,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
person_response.additional_properties = d
|
|
87
|
+
return person_response
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def additional_keys(self) -> list[str]:
|
|
91
|
+
return list(self.additional_properties.keys())
|
|
92
|
+
|
|
93
|
+
def __getitem__(self, key: str) -> Any:
|
|
94
|
+
return self.additional_properties[key]
|
|
95
|
+
|
|
96
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
97
|
+
self.additional_properties[key] = value
|
|
98
|
+
|
|
99
|
+
def __delitem__(self, key: str) -> None:
|
|
100
|
+
del self.additional_properties[key]
|
|
101
|
+
|
|
102
|
+
def __contains__(self, key: str) -> bool:
|
|
103
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
from typing import cast
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="PersonalTokenLimits")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class PersonalTokenLimits:
|
|
19
|
+
"""The limits of personal API tokens, as configured.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
lifetime_choices_days (list[int]): Lifetimes to offer when creating one, longest at most `MaxLifetimeDays`.
|
|
23
|
+
max_lifetime_days (int): The longest lifetime the server accepts.
|
|
24
|
+
max_active (int): Most active personal tokens one person may hold.
|
|
25
|
+
requires_sign_in_within_days (int): A personal token stops working if its owner has not signed in to Docket
|
|
26
|
+
interactively within this many days.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
lifetime_choices_days: list[int]
|
|
30
|
+
max_lifetime_days: int
|
|
31
|
+
max_active: int
|
|
32
|
+
requires_sign_in_within_days: int
|
|
33
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> dict[str, Any]:
|
|
36
|
+
lifetime_choices_days = self.lifetime_choices_days
|
|
37
|
+
|
|
38
|
+
max_lifetime_days = self.max_lifetime_days
|
|
39
|
+
|
|
40
|
+
max_active = self.max_active
|
|
41
|
+
|
|
42
|
+
requires_sign_in_within_days = self.requires_sign_in_within_days
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update(
|
|
47
|
+
{
|
|
48
|
+
"lifetime_choices_days": lifetime_choices_days,
|
|
49
|
+
"max_lifetime_days": max_lifetime_days,
|
|
50
|
+
"max_active": max_active,
|
|
51
|
+
"requires_sign_in_within_days": requires_sign_in_within_days,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
return field_dict
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
lifetime_choices_days = cast(list[int], d.pop("lifetime_choices_days"))
|
|
61
|
+
|
|
62
|
+
max_lifetime_days = d.pop("max_lifetime_days")
|
|
63
|
+
|
|
64
|
+
max_active = d.pop("max_active")
|
|
65
|
+
|
|
66
|
+
requires_sign_in_within_days = d.pop("requires_sign_in_within_days")
|
|
67
|
+
|
|
68
|
+
personal_token_limits = cls(
|
|
69
|
+
lifetime_choices_days=lifetime_choices_days,
|
|
70
|
+
max_lifetime_days=max_lifetime_days,
|
|
71
|
+
max_active=max_active,
|
|
72
|
+
requires_sign_in_within_days=requires_sign_in_within_days,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
personal_token_limits.additional_properties = d
|
|
76
|
+
return personal_token_limits
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def additional_keys(self) -> list[str]:
|
|
80
|
+
return list(self.additional_properties.keys())
|
|
81
|
+
|
|
82
|
+
def __getitem__(self, key: str) -> Any:
|
|
83
|
+
return self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
86
|
+
self.additional_properties[key] = value
|
|
87
|
+
|
|
88
|
+
def __delitem__(self, key: str) -> None:
|
|
89
|
+
del self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __contains__(self, key: str) -> bool:
|
|
92
|
+
return key in self.additional_properties
|