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,326 @@
|
|
|
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_variable import AcquisitionVariable
|
|
16
|
+
from ..models.person_assignment import PersonAssignment
|
|
17
|
+
from ..models.recurrence_rule import RecurrenceRule
|
|
18
|
+
from ..models.settings_selector import SettingsSelector
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
T = TypeVar("T", bound="RecurringAcquisitionResponse")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@_attrs_define
|
|
25
|
+
class RecurringAcquisitionResponse:
|
|
26
|
+
"""A recurring definition: scheduling intent, from which occurrences were materialized.
|
|
27
|
+
|
|
28
|
+
Attributes:
|
|
29
|
+
id (int): Definition id.
|
|
30
|
+
subject_id (str): Subject of every occurrence.
|
|
31
|
+
instrument_id (str): Instrument of every occurrence.
|
|
32
|
+
project_id (str): Project of every occurrence.
|
|
33
|
+
rule (RecurrenceRule): When a series occurs. Occurrences are computed from the local date and
|
|
34
|
+
`local_start_time` in `time_zone`, so 09:00
|
|
35
|
+
stays 09:00 across daylight-saving changes. Exactly one of
|
|
36
|
+
`count` and `until` is required (finite series only).
|
|
37
|
+
operator_instructions (str): Free text copied onto every occurrence.
|
|
38
|
+
people (list[PersonAssignment]): People and roles copied onto every occurrence.
|
|
39
|
+
type_refs (list[SettingsSelector]): Settings selectors copied onto every occurrence.
|
|
40
|
+
variables (list[AcquisitionVariable]): Variables copied onto every occurrence.
|
|
41
|
+
created_at (datetime.datetime): UTC instant, ISO 8601 with offset, e.g. 2026-10-15T16:00:00Z.
|
|
42
|
+
created_by (str): Display name of the creator.
|
|
43
|
+
created_by_object_id (None | str): Directory object id of the creator; null for rows made while authentication
|
|
44
|
+
was off.
|
|
45
|
+
archived_at (datetime.datetime | None):
|
|
46
|
+
version (int): Opaque row version; send it back as `expected_version`.
|
|
47
|
+
next_start (datetime.datetime | None):
|
|
48
|
+
remaining (int): Number of future, non-archived occurrences (start after now).
|
|
49
|
+
previous_id (int | None): The definition this one continues, when it was created by a split.
|
|
50
|
+
superseded_by_id (int | None): The definition that continues this one after a split; null while this is the
|
|
51
|
+
current series.
|
|
52
|
+
ended_on (datetime.date | None):
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
id: int
|
|
56
|
+
subject_id: str
|
|
57
|
+
instrument_id: str
|
|
58
|
+
project_id: str
|
|
59
|
+
rule: RecurrenceRule
|
|
60
|
+
operator_instructions: str
|
|
61
|
+
people: list[PersonAssignment]
|
|
62
|
+
type_refs: list[SettingsSelector]
|
|
63
|
+
variables: list[AcquisitionVariable]
|
|
64
|
+
created_at: datetime.datetime
|
|
65
|
+
created_by: str
|
|
66
|
+
created_by_object_id: None | str
|
|
67
|
+
archived_at: datetime.datetime | None
|
|
68
|
+
version: int
|
|
69
|
+
next_start: datetime.datetime | None
|
|
70
|
+
remaining: int
|
|
71
|
+
previous_id: int | None
|
|
72
|
+
superseded_by_id: int | None
|
|
73
|
+
ended_on: datetime.date | None
|
|
74
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
75
|
+
|
|
76
|
+
def to_dict(self) -> dict[str, Any]:
|
|
77
|
+
from ..models.acquisition_variable import AcquisitionVariable
|
|
78
|
+
from ..models.person_assignment import PersonAssignment
|
|
79
|
+
from ..models.recurrence_rule import RecurrenceRule
|
|
80
|
+
from ..models.settings_selector import SettingsSelector
|
|
81
|
+
|
|
82
|
+
id = self.id
|
|
83
|
+
|
|
84
|
+
subject_id = self.subject_id
|
|
85
|
+
|
|
86
|
+
instrument_id = self.instrument_id
|
|
87
|
+
|
|
88
|
+
project_id = self.project_id
|
|
89
|
+
|
|
90
|
+
rule = self.rule.to_dict()
|
|
91
|
+
|
|
92
|
+
operator_instructions = self.operator_instructions
|
|
93
|
+
|
|
94
|
+
people = []
|
|
95
|
+
for people_item_data in self.people:
|
|
96
|
+
people_item = people_item_data.to_dict()
|
|
97
|
+
people.append(people_item)
|
|
98
|
+
|
|
99
|
+
type_refs = []
|
|
100
|
+
for type_refs_item_data in self.type_refs:
|
|
101
|
+
type_refs_item = type_refs_item_data.to_dict()
|
|
102
|
+
type_refs.append(type_refs_item)
|
|
103
|
+
|
|
104
|
+
variables = []
|
|
105
|
+
for variables_item_data in self.variables:
|
|
106
|
+
variables_item = variables_item_data.to_dict()
|
|
107
|
+
variables.append(variables_item)
|
|
108
|
+
|
|
109
|
+
created_at = self.created_at.isoformat()
|
|
110
|
+
|
|
111
|
+
created_by = self.created_by
|
|
112
|
+
|
|
113
|
+
created_by_object_id: None | str
|
|
114
|
+
created_by_object_id = self.created_by_object_id
|
|
115
|
+
|
|
116
|
+
archived_at: None | str
|
|
117
|
+
if isinstance(self.archived_at, datetime.datetime):
|
|
118
|
+
archived_at = self.archived_at.isoformat()
|
|
119
|
+
else:
|
|
120
|
+
archived_at = self.archived_at
|
|
121
|
+
|
|
122
|
+
version = self.version
|
|
123
|
+
|
|
124
|
+
next_start: None | str
|
|
125
|
+
if isinstance(self.next_start, datetime.datetime):
|
|
126
|
+
next_start = self.next_start.isoformat()
|
|
127
|
+
else:
|
|
128
|
+
next_start = self.next_start
|
|
129
|
+
|
|
130
|
+
remaining = self.remaining
|
|
131
|
+
|
|
132
|
+
previous_id: int | None
|
|
133
|
+
previous_id = self.previous_id
|
|
134
|
+
|
|
135
|
+
superseded_by_id: int | None
|
|
136
|
+
superseded_by_id = self.superseded_by_id
|
|
137
|
+
|
|
138
|
+
ended_on: None | str
|
|
139
|
+
if isinstance(self.ended_on, datetime.date):
|
|
140
|
+
ended_on = self.ended_on.isoformat()
|
|
141
|
+
else:
|
|
142
|
+
ended_on = self.ended_on
|
|
143
|
+
|
|
144
|
+
field_dict: dict[str, Any] = {}
|
|
145
|
+
field_dict.update(self.additional_properties)
|
|
146
|
+
field_dict.update(
|
|
147
|
+
{
|
|
148
|
+
"id": id,
|
|
149
|
+
"subject_id": subject_id,
|
|
150
|
+
"instrument_id": instrument_id,
|
|
151
|
+
"project_id": project_id,
|
|
152
|
+
"rule": rule,
|
|
153
|
+
"operator_instructions": operator_instructions,
|
|
154
|
+
"people": people,
|
|
155
|
+
"type_refs": type_refs,
|
|
156
|
+
"variables": variables,
|
|
157
|
+
"created_at": created_at,
|
|
158
|
+
"created_by": created_by,
|
|
159
|
+
"created_by_object_id": created_by_object_id,
|
|
160
|
+
"archived_at": archived_at,
|
|
161
|
+
"version": version,
|
|
162
|
+
"next_start": next_start,
|
|
163
|
+
"remaining": remaining,
|
|
164
|
+
"previous_id": previous_id,
|
|
165
|
+
"superseded_by_id": superseded_by_id,
|
|
166
|
+
"ended_on": ended_on,
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
return field_dict
|
|
171
|
+
|
|
172
|
+
@classmethod
|
|
173
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
174
|
+
from ..models.acquisition_variable import AcquisitionVariable
|
|
175
|
+
from ..models.person_assignment import PersonAssignment
|
|
176
|
+
from ..models.recurrence_rule import RecurrenceRule
|
|
177
|
+
from ..models.settings_selector import SettingsSelector
|
|
178
|
+
|
|
179
|
+
d = dict(src_dict)
|
|
180
|
+
id = d.pop("id")
|
|
181
|
+
|
|
182
|
+
subject_id = d.pop("subject_id")
|
|
183
|
+
|
|
184
|
+
instrument_id = d.pop("instrument_id")
|
|
185
|
+
|
|
186
|
+
project_id = d.pop("project_id")
|
|
187
|
+
|
|
188
|
+
rule = RecurrenceRule.from_dict(d.pop("rule"))
|
|
189
|
+
|
|
190
|
+
operator_instructions = d.pop("operator_instructions")
|
|
191
|
+
|
|
192
|
+
people = []
|
|
193
|
+
_people = d.pop("people")
|
|
194
|
+
for people_item_data in _people:
|
|
195
|
+
people_item = PersonAssignment.from_dict(people_item_data)
|
|
196
|
+
|
|
197
|
+
people.append(people_item)
|
|
198
|
+
|
|
199
|
+
type_refs = []
|
|
200
|
+
_type_refs = d.pop("type_refs")
|
|
201
|
+
for type_refs_item_data in _type_refs:
|
|
202
|
+
type_refs_item = SettingsSelector.from_dict(type_refs_item_data)
|
|
203
|
+
|
|
204
|
+
type_refs.append(type_refs_item)
|
|
205
|
+
|
|
206
|
+
variables = []
|
|
207
|
+
_variables = d.pop("variables")
|
|
208
|
+
for variables_item_data in _variables:
|
|
209
|
+
variables_item = AcquisitionVariable.from_dict(variables_item_data)
|
|
210
|
+
|
|
211
|
+
variables.append(variables_item)
|
|
212
|
+
|
|
213
|
+
created_at = datetime.datetime.fromisoformat(d.pop("created_at"))
|
|
214
|
+
|
|
215
|
+
created_by = d.pop("created_by")
|
|
216
|
+
|
|
217
|
+
def _parse_created_by_object_id(data: object) -> None | str:
|
|
218
|
+
if data is None:
|
|
219
|
+
return data
|
|
220
|
+
return cast(None | str, data)
|
|
221
|
+
|
|
222
|
+
created_by_object_id = _parse_created_by_object_id(d.pop("created_by_object_id"))
|
|
223
|
+
|
|
224
|
+
def _parse_archived_at(data: object) -> datetime.datetime | None:
|
|
225
|
+
if data is None:
|
|
226
|
+
return data
|
|
227
|
+
try:
|
|
228
|
+
if not isinstance(data, str):
|
|
229
|
+
raise TypeError()
|
|
230
|
+
componentsschemas_instant_nullable_type_1 = datetime.datetime.fromisoformat(data)
|
|
231
|
+
|
|
232
|
+
return componentsschemas_instant_nullable_type_1
|
|
233
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
234
|
+
pass
|
|
235
|
+
return cast(datetime.datetime | None, data)
|
|
236
|
+
|
|
237
|
+
archived_at = _parse_archived_at(d.pop("archived_at"))
|
|
238
|
+
|
|
239
|
+
version = d.pop("version")
|
|
240
|
+
|
|
241
|
+
def _parse_next_start(data: object) -> datetime.datetime | None:
|
|
242
|
+
if data is None:
|
|
243
|
+
return data
|
|
244
|
+
try:
|
|
245
|
+
if not isinstance(data, str):
|
|
246
|
+
raise TypeError()
|
|
247
|
+
componentsschemas_instant_nullable_type_1 = datetime.datetime.fromisoformat(data)
|
|
248
|
+
|
|
249
|
+
return componentsschemas_instant_nullable_type_1
|
|
250
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
251
|
+
pass
|
|
252
|
+
return cast(datetime.datetime | None, data)
|
|
253
|
+
|
|
254
|
+
next_start = _parse_next_start(d.pop("next_start"))
|
|
255
|
+
|
|
256
|
+
remaining = d.pop("remaining")
|
|
257
|
+
|
|
258
|
+
def _parse_previous_id(data: object) -> int | None:
|
|
259
|
+
if data is None:
|
|
260
|
+
return data
|
|
261
|
+
return cast(int | None, data)
|
|
262
|
+
|
|
263
|
+
previous_id = _parse_previous_id(d.pop("previous_id"))
|
|
264
|
+
|
|
265
|
+
def _parse_superseded_by_id(data: object) -> int | None:
|
|
266
|
+
if data is None:
|
|
267
|
+
return data
|
|
268
|
+
return cast(int | None, data)
|
|
269
|
+
|
|
270
|
+
superseded_by_id = _parse_superseded_by_id(d.pop("superseded_by_id"))
|
|
271
|
+
|
|
272
|
+
def _parse_ended_on(data: object) -> datetime.date | None:
|
|
273
|
+
if data is None:
|
|
274
|
+
return data
|
|
275
|
+
try:
|
|
276
|
+
if not isinstance(data, str):
|
|
277
|
+
raise TypeError()
|
|
278
|
+
componentsschemas_local_date_nullable_type_1 = datetime.date.fromisoformat(data)
|
|
279
|
+
|
|
280
|
+
return componentsschemas_local_date_nullable_type_1
|
|
281
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
282
|
+
pass
|
|
283
|
+
return cast(datetime.date | None, data)
|
|
284
|
+
|
|
285
|
+
ended_on = _parse_ended_on(d.pop("ended_on"))
|
|
286
|
+
|
|
287
|
+
recurring_acquisition_response = cls(
|
|
288
|
+
id=id,
|
|
289
|
+
subject_id=subject_id,
|
|
290
|
+
instrument_id=instrument_id,
|
|
291
|
+
project_id=project_id,
|
|
292
|
+
rule=rule,
|
|
293
|
+
operator_instructions=operator_instructions,
|
|
294
|
+
people=people,
|
|
295
|
+
type_refs=type_refs,
|
|
296
|
+
variables=variables,
|
|
297
|
+
created_at=created_at,
|
|
298
|
+
created_by=created_by,
|
|
299
|
+
created_by_object_id=created_by_object_id,
|
|
300
|
+
archived_at=archived_at,
|
|
301
|
+
version=version,
|
|
302
|
+
next_start=next_start,
|
|
303
|
+
remaining=remaining,
|
|
304
|
+
previous_id=previous_id,
|
|
305
|
+
superseded_by_id=superseded_by_id,
|
|
306
|
+
ended_on=ended_on,
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
recurring_acquisition_response.additional_properties = d
|
|
310
|
+
return recurring_acquisition_response
|
|
311
|
+
|
|
312
|
+
@property
|
|
313
|
+
def additional_keys(self) -> list[str]:
|
|
314
|
+
return list(self.additional_properties.keys())
|
|
315
|
+
|
|
316
|
+
def __getitem__(self, key: str) -> Any:
|
|
317
|
+
return self.additional_properties[key]
|
|
318
|
+
|
|
319
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
320
|
+
self.additional_properties[key] = value
|
|
321
|
+
|
|
322
|
+
def __delitem__(self, key: str) -> None:
|
|
323
|
+
del self.additional_properties[key]
|
|
324
|
+
|
|
325
|
+
def __contains__(self, key: str) -> bool:
|
|
326
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,89 @@
|
|
|
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.run_outcome import RunOutcome
|
|
12
|
+
from ..types import UNSET, Unset
|
|
13
|
+
from typing import cast
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="ReportRunOutcomeRequest")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ReportRunOutcomeRequest:
|
|
21
|
+
"""Report how a run ended.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
status (RunOutcome): An outcome a client may report.
|
|
25
|
+
error_detail (None | str | Unset): Only for `errored`.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
status: RunOutcome
|
|
29
|
+
error_detail: None | str | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
status = self.status.value
|
|
34
|
+
|
|
35
|
+
error_detail: None | str | Unset
|
|
36
|
+
if isinstance(self.error_detail, Unset):
|
|
37
|
+
error_detail = UNSET
|
|
38
|
+
else:
|
|
39
|
+
error_detail = self.error_detail
|
|
40
|
+
|
|
41
|
+
field_dict: dict[str, Any] = {}
|
|
42
|
+
field_dict.update(self.additional_properties)
|
|
43
|
+
field_dict.update(
|
|
44
|
+
{
|
|
45
|
+
"status": status,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
if error_detail is not UNSET:
|
|
49
|
+
field_dict["error_detail"] = error_detail
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
status = RunOutcome(d.pop("status"))
|
|
57
|
+
|
|
58
|
+
def _parse_error_detail(data: object) -> None | str | Unset:
|
|
59
|
+
if data is None:
|
|
60
|
+
return data
|
|
61
|
+
if isinstance(data, Unset):
|
|
62
|
+
return data
|
|
63
|
+
return cast(None | str | Unset, data)
|
|
64
|
+
|
|
65
|
+
error_detail = _parse_error_detail(d.pop("error_detail", UNSET))
|
|
66
|
+
|
|
67
|
+
report_run_outcome_request = cls(
|
|
68
|
+
status=status,
|
|
69
|
+
error_detail=error_detail,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
report_run_outcome_request.additional_properties = d
|
|
73
|
+
return report_run_outcome_request
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def additional_keys(self) -> list[str]:
|
|
77
|
+
return list(self.additional_properties.keys())
|
|
78
|
+
|
|
79
|
+
def __getitem__(self, key: str) -> Any:
|
|
80
|
+
return self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
83
|
+
self.additional_properties[key] = value
|
|
84
|
+
|
|
85
|
+
def __delitem__(self, key: str) -> None:
|
|
86
|
+
del self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __contains__(self, key: str) -> bool:
|
|
89
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
|
|
12
|
+
T = TypeVar("T", bound="ResolvedSettings")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class ResolvedSettings:
|
|
17
|
+
"""A resolved settings version.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
settings_id (int): The version id.
|
|
21
|
+
settings (Any):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
settings_id: int
|
|
25
|
+
settings: Any
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
settings_id = self.settings_id
|
|
30
|
+
|
|
31
|
+
settings = self.settings
|
|
32
|
+
|
|
33
|
+
field_dict: dict[str, Any] = {}
|
|
34
|
+
field_dict.update(self.additional_properties)
|
|
35
|
+
field_dict.update(
|
|
36
|
+
{
|
|
37
|
+
"settings_id": settings_id,
|
|
38
|
+
"settings": settings,
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
return field_dict
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
settings_id = d.pop("settings_id")
|
|
48
|
+
|
|
49
|
+
settings = d.pop("settings")
|
|
50
|
+
|
|
51
|
+
resolved_settings = cls(
|
|
52
|
+
settings_id=settings_id,
|
|
53
|
+
settings=settings,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
resolved_settings.additional_properties = d
|
|
57
|
+
return resolved_settings
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def additional_keys(self) -> list[str]:
|
|
61
|
+
return list(self.additional_properties.keys())
|
|
62
|
+
|
|
63
|
+
def __getitem__(self, key: str) -> Any:
|
|
64
|
+
return self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
67
|
+
self.additional_properties[key] = value
|
|
68
|
+
|
|
69
|
+
def __delitem__(self, key: str) -> None:
|
|
70
|
+
del self.additional_properties[key]
|
|
71
|
+
|
|
72
|
+
def __contains__(self, key: str) -> bool:
|
|
73
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,157 @@
|
|
|
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.access_role import AccessRole
|
|
12
|
+
from ..models.principal_kind import PrincipalKind
|
|
13
|
+
from typing import cast
|
|
14
|
+
import datetime
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
T = TypeVar("T", bound="RoleAssignmentResponse")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@_attrs_define
|
|
21
|
+
class RoleAssignmentResponse:
|
|
22
|
+
"""One role assignment row.
|
|
23
|
+
|
|
24
|
+
Attributes:
|
|
25
|
+
id (int): Assignment id.
|
|
26
|
+
principal_object_id (str): Who holds the role.
|
|
27
|
+
principal_kind (PrincipalKind): What kind of directory principal a role is held by.
|
|
28
|
+
role (AccessRole): A role Docket grants. Roles live in Docket's database; Entra only proves
|
|
29
|
+
who the caller is, and the token's own `roles` claim is ignored.
|
|
30
|
+
scope (None | str): Acquisition-type key for an acquisition settings maintainer; null means all acquisition
|
|
31
|
+
types.
|
|
32
|
+
granted_by_object_id (None | str): Who granted it; null if granted while authentication was off.
|
|
33
|
+
granted_at (datetime.datetime): UTC instant, ISO 8601 with offset, e.g. 2026-10-15T16:00:00Z.
|
|
34
|
+
archived_at (datetime.datetime | None):
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
id: int
|
|
38
|
+
principal_object_id: str
|
|
39
|
+
principal_kind: PrincipalKind
|
|
40
|
+
role: AccessRole
|
|
41
|
+
scope: None | str
|
|
42
|
+
granted_by_object_id: None | str
|
|
43
|
+
granted_at: datetime.datetime
|
|
44
|
+
archived_at: datetime.datetime | None
|
|
45
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
id = self.id
|
|
49
|
+
|
|
50
|
+
principal_object_id = self.principal_object_id
|
|
51
|
+
|
|
52
|
+
principal_kind = self.principal_kind.value
|
|
53
|
+
|
|
54
|
+
role = self.role.value
|
|
55
|
+
|
|
56
|
+
scope: None | str
|
|
57
|
+
scope = self.scope
|
|
58
|
+
|
|
59
|
+
granted_by_object_id: None | str
|
|
60
|
+
granted_by_object_id = self.granted_by_object_id
|
|
61
|
+
|
|
62
|
+
granted_at = self.granted_at.isoformat()
|
|
63
|
+
|
|
64
|
+
archived_at: None | str
|
|
65
|
+
if isinstance(self.archived_at, datetime.datetime):
|
|
66
|
+
archived_at = self.archived_at.isoformat()
|
|
67
|
+
else:
|
|
68
|
+
archived_at = self.archived_at
|
|
69
|
+
|
|
70
|
+
field_dict: dict[str, Any] = {}
|
|
71
|
+
field_dict.update(self.additional_properties)
|
|
72
|
+
field_dict.update(
|
|
73
|
+
{
|
|
74
|
+
"id": id,
|
|
75
|
+
"principal_object_id": principal_object_id,
|
|
76
|
+
"principal_kind": principal_kind,
|
|
77
|
+
"role": role,
|
|
78
|
+
"scope": scope,
|
|
79
|
+
"granted_by_object_id": granted_by_object_id,
|
|
80
|
+
"granted_at": granted_at,
|
|
81
|
+
"archived_at": archived_at,
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
return field_dict
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
89
|
+
d = dict(src_dict)
|
|
90
|
+
id = d.pop("id")
|
|
91
|
+
|
|
92
|
+
principal_object_id = d.pop("principal_object_id")
|
|
93
|
+
|
|
94
|
+
principal_kind = PrincipalKind(d.pop("principal_kind"))
|
|
95
|
+
|
|
96
|
+
role = AccessRole(d.pop("role"))
|
|
97
|
+
|
|
98
|
+
def _parse_scope(data: object) -> None | str:
|
|
99
|
+
if data is None:
|
|
100
|
+
return data
|
|
101
|
+
return cast(None | str, data)
|
|
102
|
+
|
|
103
|
+
scope = _parse_scope(d.pop("scope"))
|
|
104
|
+
|
|
105
|
+
def _parse_granted_by_object_id(data: object) -> None | str:
|
|
106
|
+
if data is None:
|
|
107
|
+
return data
|
|
108
|
+
return cast(None | str, data)
|
|
109
|
+
|
|
110
|
+
granted_by_object_id = _parse_granted_by_object_id(d.pop("granted_by_object_id"))
|
|
111
|
+
|
|
112
|
+
granted_at = datetime.datetime.fromisoformat(d.pop("granted_at"))
|
|
113
|
+
|
|
114
|
+
def _parse_archived_at(data: object) -> datetime.datetime | None:
|
|
115
|
+
if data is None:
|
|
116
|
+
return data
|
|
117
|
+
try:
|
|
118
|
+
if not isinstance(data, str):
|
|
119
|
+
raise TypeError()
|
|
120
|
+
componentsschemas_instant_nullable_type_1 = datetime.datetime.fromisoformat(data)
|
|
121
|
+
|
|
122
|
+
return componentsschemas_instant_nullable_type_1
|
|
123
|
+
except (TypeError, ValueError, AttributeError, KeyError):
|
|
124
|
+
pass
|
|
125
|
+
return cast(datetime.datetime | None, data)
|
|
126
|
+
|
|
127
|
+
archived_at = _parse_archived_at(d.pop("archived_at"))
|
|
128
|
+
|
|
129
|
+
role_assignment_response = cls(
|
|
130
|
+
id=id,
|
|
131
|
+
principal_object_id=principal_object_id,
|
|
132
|
+
principal_kind=principal_kind,
|
|
133
|
+
role=role,
|
|
134
|
+
scope=scope,
|
|
135
|
+
granted_by_object_id=granted_by_object_id,
|
|
136
|
+
granted_at=granted_at,
|
|
137
|
+
archived_at=archived_at,
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
role_assignment_response.additional_properties = d
|
|
141
|
+
return role_assignment_response
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
def additional_keys(self) -> list[str]:
|
|
145
|
+
return list(self.additional_properties.keys())
|
|
146
|
+
|
|
147
|
+
def __getitem__(self, key: str) -> Any:
|
|
148
|
+
return self.additional_properties[key]
|
|
149
|
+
|
|
150
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
151
|
+
self.additional_properties[key] = value
|
|
152
|
+
|
|
153
|
+
def __delitem__(self, key: str) -> None:
|
|
154
|
+
del self.additional_properties[key]
|
|
155
|
+
|
|
156
|
+
def __contains__(self, key: str) -> bool:
|
|
157
|
+
return key in self.additional_properties
|