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.
Files changed (188) hide show
  1. docket/__init__.py +8 -0
  2. docket/api/__init__.py +1 -0
  3. docket/api/access/__init__.py +1 -0
  4. docket/api/access/add_principal.py +193 -0
  5. docket/api/access/archive_role_assignment.py +182 -0
  6. docket/api/access/create_api_token.py +198 -0
  7. docket/api/access/create_application_principal.py +188 -0
  8. docket/api/access/create_role_assignment.py +194 -0
  9. docket/api/access/list_api_tokens.py +184 -0
  10. docket/api/access/list_principals.py +184 -0
  11. docket/api/access/list_role_assignments.py +200 -0
  12. docket/api/access/revoke_api_token.py +173 -0
  13. docket/api/identity/__init__.py +1 -0
  14. docket/api/identity/create_my_api_token.py +206 -0
  15. docket/api/identity/get_me.py +127 -0
  16. docket/api/identity/list_my_api_tokens.py +151 -0
  17. docket/api/identity/revoke_my_api_token.py +178 -0
  18. docket/api/recurring_acquisitions/__init__.py +1 -0
  19. docket/api/recurring_acquisitions/archive_recurring_acquisition.py +207 -0
  20. docket/api/recurring_acquisitions/create_recurring_acquisition.py +218 -0
  21. docket/api/recurring_acquisitions/get_recurring_acquisition.py +163 -0
  22. docket/api/recurring_acquisitions/list_recurring_acquisitions.py +248 -0
  23. docket/api/recurring_acquisitions/preview_recurring_acquisition.py +187 -0
  24. docket/api/recurring_acquisitions/preview_split_recurring_acquisition.py +232 -0
  25. docket/api/recurring_acquisitions/split_recurring_acquisition.py +258 -0
  26. docket/api/runs/__init__.py +1 -0
  27. docket/api/runs/get_run.py +160 -0
  28. docket/api/runs/list_runs.py +180 -0
  29. docket/api/runs/report_run_outcome.py +206 -0
  30. docket/api/scheduled_acquisitions/__init__.py +1 -0
  31. docket/api/scheduled_acquisitions/archive_scheduled_acquisition.py +203 -0
  32. docket/api/scheduled_acquisitions/create_scheduled_acquisition.py +185 -0
  33. docket/api/scheduled_acquisitions/get_resolved_settings.py +169 -0
  34. docket/api/scheduled_acquisitions/get_scheduled_acquisition.py +159 -0
  35. docket/api/scheduled_acquisitions/list_active_acquisitions.py +297 -0
  36. docket/api/scheduled_acquisitions/list_runs_for_scheduled_acquisition.py +191 -0
  37. docket/api/scheduled_acquisitions/list_scheduled_acquisitions.py +332 -0
  38. docket/api/scheduled_acquisitions/preview_scheduled_acquisition_edit.py +224 -0
  39. docket/api/scheduled_acquisitions/set_planning_status.py +199 -0
  40. docket/api/scheduled_acquisitions/start_run.py +221 -0
  41. docket/api/scheduled_acquisitions/update_scheduled_acquisition.py +226 -0
  42. docket/api/settings/__init__.py +1 -0
  43. docket/api/settings/list_behavior_curriculum_discriminator_values.py +188 -0
  44. docket/api/settings/list_behavior_curriculum_settings.py +199 -0
  45. docket/api/settings/list_fip_discriminator_values.py +184 -0
  46. docket/api/settings/list_fip_settings.py +195 -0
  47. docket/api/settings/list_live_behavior_curriculum_settings.py +233 -0
  48. docket/api/settings/list_live_fip_settings.py +225 -0
  49. docket/api/settings/preview_behavior_curriculum_settings.py +191 -0
  50. docket/api/settings/preview_fip_settings.py +177 -0
  51. docket/api/settings/push_behavior_curriculum_settings.py +222 -0
  52. docket/api/settings/push_fip_settings.py +206 -0
  53. docket/api/templates/__init__.py +1 -0
  54. docket/api/templates/archive_template.py +203 -0
  55. docket/api/templates/create_template.py +206 -0
  56. docket/api/templates/get_template.py +159 -0
  57. docket/api/templates/list_templates.py +174 -0
  58. docket/api/templates/update_template.py +234 -0
  59. docket/api/vocabulary/__init__.py +1 -0
  60. docket/api/vocabulary/list_instruments.py +165 -0
  61. docket/api/vocabulary/list_persons.py +132 -0
  62. docket/api/vocabulary/list_projects.py +132 -0
  63. docket/api/vocabulary/list_subjects.py +132 -0
  64. docket/api/vocabulary/lookup_person.py +166 -0
  65. docket/api/vocabulary/lookup_subject.py +166 -0
  66. docket/api/vocabulary/sync_vocabulary.py +148 -0
  67. docket/client.py +272 -0
  68. docket/errors.py +16 -0
  69. docket/models/__init__.py +221 -0
  70. docket/models/access_role.py +12 -0
  71. docket/models/access_role_nullable_type_1.py +12 -0
  72. docket/models/access_role_nullable_type_2_type_1.py +12 -0
  73. docket/models/access_role_nullable_type_3_type_1.py +12 -0
  74. docket/models/acquisition_variable.py +72 -0
  75. docket/models/acquisition_warning.py +126 -0
  76. docket/models/add_principal_request.py +83 -0
  77. docket/models/api_token_response.py +271 -0
  78. docket/models/api_token_status.py +10 -0
  79. docket/models/archive_recurring_acquisition_request.py +77 -0
  80. docket/models/archive_recurring_acquisition_response.py +83 -0
  81. docket/models/archive_scheduled_acquisition_request.py +78 -0
  82. docket/models/archive_template_request.py +66 -0
  83. docket/models/auth_mode.py +10 -0
  84. docket/models/behavior_curriculum_push_settings_request.py +85 -0
  85. docket/models/behavior_curriculum_settings.py +55 -0
  86. docket/models/behavior_curriculum_settings_preview_response.py +102 -0
  87. docket/models/behavior_curriculum_settings_preview_response_promoted.py +50 -0
  88. docket/models/behavior_curriculum_settings_version_response.py +160 -0
  89. docket/models/behavior_curriculum_settings_version_response_promoted.py +50 -0
  90. docket/models/caller_kind.py +11 -0
  91. docket/models/create_api_token_request.py +97 -0
  92. docket/models/create_application_principal_request.py +65 -0
  93. docket/models/create_personal_api_token_request.py +167 -0
  94. docket/models/create_recurring_acquisition_request.py +269 -0
  95. docket/models/create_role_assignment_request.py +99 -0
  96. docket/models/create_scheduled_acquisition_request.py +265 -0
  97. docket/models/create_template_request.py +323 -0
  98. docket/models/created_api_token_response.py +82 -0
  99. docket/models/effective_status.py +15 -0
  100. docket/models/fip_color.py +13 -0
  101. docket/models/fip_fiber.py +93 -0
  102. docket/models/fip_mode.py +9 -0
  103. docket/models/fip_push_settings_request.py +82 -0
  104. docket/models/fip_settings.py +91 -0
  105. docket/models/fip_settings_preview_response.py +97 -0
  106. docket/models/fip_settings_preview_response_promoted.py +50 -0
  107. docket/models/fip_settings_version_response.py +155 -0
  108. docket/models/fip_settings_version_response_promoted.py +50 -0
  109. docket/models/future_occurrences.py +9 -0
  110. docket/models/get_resolved_settings_response_200.py +65 -0
  111. docket/models/held_role_response.py +116 -0
  112. docket/models/http_validation_problem_details.py +204 -0
  113. docket/models/http_validation_problem_details_errors.py +59 -0
  114. docket/models/instrument_response.py +91 -0
  115. docket/models/kept_occurrence.py +85 -0
  116. docket/models/kept_occurrence_reason.py +10 -0
  117. docket/models/list_active_acquisitions_effective_status_item.py +15 -0
  118. docket/models/list_scheduled_acquisitions_planning_status.py +11 -0
  119. docket/models/me_caller.py +118 -0
  120. docket/models/me_permission.py +98 -0
  121. docket/models/me_response.py +158 -0
  122. docket/models/me_role.py +75 -0
  123. docket/models/occurrence_preview.py +121 -0
  124. docket/models/occurrence_summary.py +126 -0
  125. docket/models/occurrence_warnings.py +91 -0
  126. docket/models/permission_action.py +12 -0
  127. docket/models/person_assignment.py +74 -0
  128. docket/models/person_lookup_response.py +131 -0
  129. docket/models/person_response.py +103 -0
  130. docket/models/person_role.py +9 -0
  131. docket/models/personal_token_limits.py +92 -0
  132. docket/models/planning_status.py +11 -0
  133. docket/models/principal_kind.py +9 -0
  134. docket/models/principal_response.py +216 -0
  135. docket/models/problem_details.py +177 -0
  136. docket/models/project_response.py +75 -0
  137. docket/models/recurrence_exception_kind.py +13 -0
  138. docket/models/recurrence_exception_response.py +103 -0
  139. docket/models/recurrence_frequency.py +9 -0
  140. docket/models/recurrence_preview_response.py +101 -0
  141. docket/models/recurrence_rule.py +207 -0
  142. docket/models/recurring_acquisition_created_response.py +123 -0
  143. docket/models/recurring_acquisition_detail_response.py +105 -0
  144. docket/models/recurring_acquisition_response.py +326 -0
  145. docket/models/report_run_outcome_request.py +89 -0
  146. docket/models/resolution_mode.py +10 -0
  147. docket/models/resolved_settings.py +73 -0
  148. docket/models/role_assignment_response.py +157 -0
  149. docket/models/role_origin.py +10 -0
  150. docket/models/role_source_kind.py +10 -0
  151. docket/models/run_origin.py +9 -0
  152. docket/models/run_outcome.py +9 -0
  153. docket/models/run_response.py +181 -0
  154. docket/models/run_settings_snapshot.py +72 -0
  155. docket/models/run_start_response.py +91 -0
  156. docket/models/run_start_response_settings.py +65 -0
  157. docket/models/run_status.py +11 -0
  158. docket/models/scheduled_acquisition_edit_preview_response.py +150 -0
  159. docket/models/scheduled_acquisition_response.py +366 -0
  160. docket/models/set_planning_status_request.py +90 -0
  161. docket/models/settings_selector.py +138 -0
  162. docket/models/skipped_occurrence.py +85 -0
  163. docket/models/split_preview_response.py +129 -0
  164. docket/models/split_recurring_acquisition_request.py +261 -0
  165. docket/models/split_recurring_acquisition_response.py +159 -0
  166. docket/models/start_run_request.py +73 -0
  167. docket/models/subject_lookup_response.py +149 -0
  168. docket/models/subject_response.py +128 -0
  169. docket/models/sync_counts.py +80 -0
  170. docket/models/sync_response.py +81 -0
  171. docket/models/template_response.py +302 -0
  172. docket/models/update_scheduled_acquisition_request.py +235 -0
  173. docket/models/update_template_request.py +279 -0
  174. docket/models/weekday.py +14 -0
  175. docket/types.py +54 -0
  176. docket_auth/__init__.py +239 -0
  177. docket_client-0.3.2.dist-info/METADATA +233 -0
  178. docket_client-0.3.2.dist-info/RECORD +188 -0
  179. docket_client-0.3.2.dist-info/WHEEL +4 -0
  180. docket_client-0.3.2.dist-info/entry_points.txt +2 -0
  181. docket_mcp/__init__.py +6 -0
  182. docket_mcp/api.py +207 -0
  183. docket_mcp/config.py +57 -0
  184. docket_mcp/server.py +78 -0
  185. docket_mcp/signin.py +155 -0
  186. docket_mcp/slots.py +80 -0
  187. docket_mcp/times.py +160 -0
  188. docket_mcp/tools.py +1202 -0
@@ -0,0 +1,191 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response, UNSET
9
+ from ... import errors
10
+
11
+ from ...models.problem_details import ProblemDetails
12
+ from ...models.run_response import RunResponse
13
+ from ...types import UNSET, Unset
14
+ from typing import cast
15
+
16
+
17
+ def _get_kwargs(
18
+ id: int,
19
+ *,
20
+ limit: int | None | Unset = UNSET,
21
+ ) -> dict[str, Any]:
22
+
23
+ params: dict[str, Any] = {}
24
+
25
+ json_limit: int | None | Unset
26
+ if isinstance(limit, Unset):
27
+ json_limit = UNSET
28
+ else:
29
+ json_limit = limit
30
+ params["limit"] = json_limit
31
+
32
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
33
+
34
+ _kwargs: dict[str, Any] = {
35
+ "method": "get",
36
+ "url": "/api/v1/scheduled-acquisitions/{id}/runs".format(
37
+ id=quote(str(id), safe=""),
38
+ ),
39
+ "params": params,
40
+ }
41
+
42
+ return _kwargs
43
+
44
+
45
+ def _parse_response(
46
+ *, client: AuthenticatedClient | Client, response: httpx.Response
47
+ ) -> ProblemDetails | list[RunResponse] | None:
48
+ if response.status_code == 200:
49
+ response_200 = []
50
+ _response_200 = response.json()
51
+ for response_200_item_data in _response_200:
52
+ response_200_item = RunResponse.from_dict(response_200_item_data)
53
+
54
+ response_200.append(response_200_item)
55
+
56
+ return response_200
57
+
58
+ if response.status_code == 404:
59
+ response_404 = ProblemDetails.from_dict(response.json())
60
+
61
+ return response_404
62
+
63
+ if client.raise_on_unexpected_status:
64
+ raise errors.UnexpectedStatus(response.status_code, response.content)
65
+ else:
66
+ return None
67
+
68
+
69
+ def _build_response(
70
+ *, client: AuthenticatedClient | Client, response: httpx.Response
71
+ ) -> Response[ProblemDetails | list[RunResponse]]:
72
+ return Response(
73
+ status_code=HTTPStatus(response.status_code),
74
+ content=response.content,
75
+ headers=response.headers,
76
+ parsed=_parse_response(client=client, response=response),
77
+ )
78
+
79
+
80
+ def sync_detailed(
81
+ id: int,
82
+ *,
83
+ client: AuthenticatedClient,
84
+ limit: int | None | Unset = UNSET,
85
+ ) -> Response[ProblemDetails | list[RunResponse]]:
86
+ """
87
+ Args:
88
+ id (int):
89
+ limit (int | None | Unset):
90
+
91
+ Raises:
92
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
93
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
94
+
95
+ Returns:
96
+ Response[ProblemDetails | list[RunResponse]]
97
+ """
98
+
99
+ kwargs = _get_kwargs(
100
+ id=id,
101
+ limit=limit,
102
+ )
103
+
104
+ response = client.get_httpx_client().request(
105
+ **kwargs,
106
+ )
107
+
108
+ return _build_response(client=client, response=response)
109
+
110
+
111
+ def sync(
112
+ id: int,
113
+ *,
114
+ client: AuthenticatedClient,
115
+ limit: int | None | Unset = UNSET,
116
+ ) -> ProblemDetails | list[RunResponse] | None:
117
+ """
118
+ Args:
119
+ id (int):
120
+ limit (int | None | Unset):
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ ProblemDetails | list[RunResponse]
128
+ """
129
+
130
+ return sync_detailed(
131
+ id=id,
132
+ client=client,
133
+ limit=limit,
134
+ ).parsed
135
+
136
+
137
+ async def asyncio_detailed(
138
+ id: int,
139
+ *,
140
+ client: AuthenticatedClient,
141
+ limit: int | None | Unset = UNSET,
142
+ ) -> Response[ProblemDetails | list[RunResponse]]:
143
+ """
144
+ Args:
145
+ id (int):
146
+ limit (int | None | Unset):
147
+
148
+ Raises:
149
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
150
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
151
+
152
+ Returns:
153
+ Response[ProblemDetails | list[RunResponse]]
154
+ """
155
+
156
+ kwargs = _get_kwargs(
157
+ id=id,
158
+ limit=limit,
159
+ )
160
+
161
+ response = await client.get_async_httpx_client().request(**kwargs)
162
+
163
+ return _build_response(client=client, response=response)
164
+
165
+
166
+ async def asyncio(
167
+ id: int,
168
+ *,
169
+ client: AuthenticatedClient,
170
+ limit: int | None | Unset = UNSET,
171
+ ) -> ProblemDetails | list[RunResponse] | None:
172
+ """
173
+ Args:
174
+ id (int):
175
+ limit (int | None | Unset):
176
+
177
+ Raises:
178
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
179
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
180
+
181
+ Returns:
182
+ ProblemDetails | list[RunResponse]
183
+ """
184
+
185
+ return (
186
+ await asyncio_detailed(
187
+ id=id,
188
+ client=client,
189
+ limit=limit,
190
+ )
191
+ ).parsed
@@ -0,0 +1,332 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response, UNSET
9
+ from ... import errors
10
+
11
+ from ...models.http_validation_problem_details import HttpValidationProblemDetails
12
+ from ...models.list_scheduled_acquisitions_planning_status import (
13
+ ListScheduledAcquisitionsPlanningStatus,
14
+ )
15
+ from ...models.scheduled_acquisition_response import ScheduledAcquisitionResponse
16
+ from ...types import UNSET, Unset
17
+ from typing import cast
18
+ import datetime
19
+
20
+
21
+ def _get_kwargs(
22
+ *,
23
+ start: datetime.datetime | Unset = UNSET,
24
+ end: datetime.datetime | Unset = UNSET,
25
+ instrument_id: str | Unset = UNSET,
26
+ rig_id: str | Unset = UNSET,
27
+ subject_id: str | Unset = UNSET,
28
+ recurring_acquisition_id: int | None | Unset = UNSET,
29
+ planning_status: ListScheduledAcquisitionsPlanningStatus | Unset = UNSET,
30
+ include_archived: bool | None | Unset = UNSET,
31
+ limit: int | None | Unset = UNSET,
32
+ ) -> dict[str, Any]:
33
+
34
+ params: dict[str, Any] = {}
35
+
36
+ json_start: str | Unset = UNSET
37
+ if not isinstance(start, Unset):
38
+ json_start = start.isoformat()
39
+ params["start"] = json_start
40
+
41
+ json_end: str | Unset = UNSET
42
+ if not isinstance(end, Unset):
43
+ json_end = end.isoformat()
44
+ params["end"] = json_end
45
+
46
+ params["instrument_id"] = instrument_id
47
+
48
+ params["rig_id"] = rig_id
49
+
50
+ params["subject_id"] = subject_id
51
+
52
+ json_recurring_acquisition_id: int | None | Unset
53
+ if isinstance(recurring_acquisition_id, Unset):
54
+ json_recurring_acquisition_id = UNSET
55
+ else:
56
+ json_recurring_acquisition_id = recurring_acquisition_id
57
+ params["recurring_acquisition_id"] = json_recurring_acquisition_id
58
+
59
+ json_planning_status: str | Unset = UNSET
60
+ if not isinstance(planning_status, Unset):
61
+ json_planning_status = planning_status.value
62
+
63
+ params["planning_status"] = json_planning_status
64
+
65
+ json_include_archived: bool | None | Unset
66
+ if isinstance(include_archived, Unset):
67
+ json_include_archived = UNSET
68
+ else:
69
+ json_include_archived = include_archived
70
+ params["include_archived"] = json_include_archived
71
+
72
+ json_limit: int | None | Unset
73
+ if isinstance(limit, Unset):
74
+ json_limit = UNSET
75
+ else:
76
+ json_limit = limit
77
+ params["limit"] = json_limit
78
+
79
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
80
+
81
+ _kwargs: dict[str, Any] = {
82
+ "method": "get",
83
+ "url": "/api/v1/scheduled-acquisitions",
84
+ "params": params,
85
+ }
86
+
87
+ return _kwargs
88
+
89
+
90
+ def _parse_response(
91
+ *, client: AuthenticatedClient | Client, response: httpx.Response
92
+ ) -> HttpValidationProblemDetails | list[ScheduledAcquisitionResponse] | None:
93
+ if response.status_code == 200:
94
+ response_200 = []
95
+ _response_200 = response.json()
96
+ for response_200_item_data in _response_200:
97
+ response_200_item = ScheduledAcquisitionResponse.from_dict(response_200_item_data)
98
+
99
+ response_200.append(response_200_item)
100
+
101
+ return response_200
102
+
103
+ if response.status_code == 422:
104
+ response_422 = HttpValidationProblemDetails.from_dict(response.json())
105
+
106
+ return response_422
107
+
108
+ if client.raise_on_unexpected_status:
109
+ raise errors.UnexpectedStatus(response.status_code, response.content)
110
+ else:
111
+ return None
112
+
113
+
114
+ def _build_response(
115
+ *, client: AuthenticatedClient | Client, response: httpx.Response
116
+ ) -> Response[HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]]:
117
+ return Response(
118
+ status_code=HTTPStatus(response.status_code),
119
+ content=response.content,
120
+ headers=response.headers,
121
+ parsed=_parse_response(client=client, response=response),
122
+ )
123
+
124
+
125
+ def sync_detailed(
126
+ *,
127
+ client: AuthenticatedClient,
128
+ start: datetime.datetime | Unset = UNSET,
129
+ end: datetime.datetime | Unset = UNSET,
130
+ instrument_id: str | Unset = UNSET,
131
+ rig_id: str | Unset = UNSET,
132
+ subject_id: str | Unset = UNSET,
133
+ recurring_acquisition_id: int | None | Unset = UNSET,
134
+ planning_status: ListScheduledAcquisitionsPlanningStatus | Unset = UNSET,
135
+ include_archived: bool | None | Unset = UNSET,
136
+ limit: int | None | Unset = UNSET,
137
+ ) -> Response[HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]]:
138
+ """Acquisitions overlapping [start, end), ordered by start.
139
+
140
+ Args:
141
+ start (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
142
+ 2026-10-15T16:00:00Z.
143
+ end (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
144
+ 2026-10-15T16:00:00Z.
145
+ instrument_id (str | Unset):
146
+ rig_id (str | Unset):
147
+ subject_id (str | Unset):
148
+ recurring_acquisition_id (int | None | Unset):
149
+ planning_status (ListScheduledAcquisitionsPlanningStatus | Unset):
150
+ include_archived (bool | None | Unset):
151
+ limit (int | None | Unset):
152
+
153
+ Raises:
154
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
155
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
156
+
157
+ Returns:
158
+ Response[HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]]
159
+ """
160
+
161
+ kwargs = _get_kwargs(
162
+ start=start,
163
+ end=end,
164
+ instrument_id=instrument_id,
165
+ rig_id=rig_id,
166
+ subject_id=subject_id,
167
+ recurring_acquisition_id=recurring_acquisition_id,
168
+ planning_status=planning_status,
169
+ include_archived=include_archived,
170
+ limit=limit,
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
+ *,
182
+ client: AuthenticatedClient,
183
+ start: datetime.datetime | Unset = UNSET,
184
+ end: datetime.datetime | Unset = UNSET,
185
+ instrument_id: str | Unset = UNSET,
186
+ rig_id: str | Unset = UNSET,
187
+ subject_id: str | Unset = UNSET,
188
+ recurring_acquisition_id: int | None | Unset = UNSET,
189
+ planning_status: ListScheduledAcquisitionsPlanningStatus | Unset = UNSET,
190
+ include_archived: bool | None | Unset = UNSET,
191
+ limit: int | None | Unset = UNSET,
192
+ ) -> HttpValidationProblemDetails | list[ScheduledAcquisitionResponse] | None:
193
+ """Acquisitions overlapping [start, end), ordered by start.
194
+
195
+ Args:
196
+ start (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
197
+ 2026-10-15T16:00:00Z.
198
+ end (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
199
+ 2026-10-15T16:00:00Z.
200
+ instrument_id (str | Unset):
201
+ rig_id (str | Unset):
202
+ subject_id (str | Unset):
203
+ recurring_acquisition_id (int | None | Unset):
204
+ planning_status (ListScheduledAcquisitionsPlanningStatus | Unset):
205
+ include_archived (bool | None | Unset):
206
+ limit (int | None | Unset):
207
+
208
+ Raises:
209
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
210
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
211
+
212
+ Returns:
213
+ HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]
214
+ """
215
+
216
+ return sync_detailed(
217
+ client=client,
218
+ start=start,
219
+ end=end,
220
+ instrument_id=instrument_id,
221
+ rig_id=rig_id,
222
+ subject_id=subject_id,
223
+ recurring_acquisition_id=recurring_acquisition_id,
224
+ planning_status=planning_status,
225
+ include_archived=include_archived,
226
+ limit=limit,
227
+ ).parsed
228
+
229
+
230
+ async def asyncio_detailed(
231
+ *,
232
+ client: AuthenticatedClient,
233
+ start: datetime.datetime | Unset = UNSET,
234
+ end: datetime.datetime | Unset = UNSET,
235
+ instrument_id: str | Unset = UNSET,
236
+ rig_id: str | Unset = UNSET,
237
+ subject_id: str | Unset = UNSET,
238
+ recurring_acquisition_id: int | None | Unset = UNSET,
239
+ planning_status: ListScheduledAcquisitionsPlanningStatus | Unset = UNSET,
240
+ include_archived: bool | None | Unset = UNSET,
241
+ limit: int | None | Unset = UNSET,
242
+ ) -> Response[HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]]:
243
+ """Acquisitions overlapping [start, end), ordered by start.
244
+
245
+ Args:
246
+ start (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
247
+ 2026-10-15T16:00:00Z.
248
+ end (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
249
+ 2026-10-15T16:00:00Z.
250
+ instrument_id (str | Unset):
251
+ rig_id (str | Unset):
252
+ subject_id (str | Unset):
253
+ recurring_acquisition_id (int | None | Unset):
254
+ planning_status (ListScheduledAcquisitionsPlanningStatus | Unset):
255
+ include_archived (bool | None | Unset):
256
+ limit (int | None | Unset):
257
+
258
+ Raises:
259
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
260
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
261
+
262
+ Returns:
263
+ Response[HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]]
264
+ """
265
+
266
+ kwargs = _get_kwargs(
267
+ start=start,
268
+ end=end,
269
+ instrument_id=instrument_id,
270
+ rig_id=rig_id,
271
+ subject_id=subject_id,
272
+ recurring_acquisition_id=recurring_acquisition_id,
273
+ planning_status=planning_status,
274
+ include_archived=include_archived,
275
+ limit=limit,
276
+ )
277
+
278
+ response = await client.get_async_httpx_client().request(**kwargs)
279
+
280
+ return _build_response(client=client, response=response)
281
+
282
+
283
+ async def asyncio(
284
+ *,
285
+ client: AuthenticatedClient,
286
+ start: datetime.datetime | Unset = UNSET,
287
+ end: datetime.datetime | Unset = UNSET,
288
+ instrument_id: str | Unset = UNSET,
289
+ rig_id: str | Unset = UNSET,
290
+ subject_id: str | Unset = UNSET,
291
+ recurring_acquisition_id: int | None | Unset = UNSET,
292
+ planning_status: ListScheduledAcquisitionsPlanningStatus | Unset = UNSET,
293
+ include_archived: bool | None | Unset = UNSET,
294
+ limit: int | None | Unset = UNSET,
295
+ ) -> HttpValidationProblemDetails | list[ScheduledAcquisitionResponse] | None:
296
+ """Acquisitions overlapping [start, end), ordered by start.
297
+
298
+ Args:
299
+ start (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
300
+ 2026-10-15T16:00:00Z.
301
+ end (datetime.datetime | Unset): ISO 8601 timestamp with an offset, e.g.
302
+ 2026-10-15T16:00:00Z.
303
+ instrument_id (str | Unset):
304
+ rig_id (str | Unset):
305
+ subject_id (str | Unset):
306
+ recurring_acquisition_id (int | None | Unset):
307
+ planning_status (ListScheduledAcquisitionsPlanningStatus | Unset):
308
+ include_archived (bool | None | Unset):
309
+ limit (int | None | Unset):
310
+
311
+ Raises:
312
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
313
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
314
+
315
+ Returns:
316
+ HttpValidationProblemDetails | list[ScheduledAcquisitionResponse]
317
+ """
318
+
319
+ return (
320
+ await asyncio_detailed(
321
+ client=client,
322
+ start=start,
323
+ end=end,
324
+ instrument_id=instrument_id,
325
+ rig_id=rig_id,
326
+ subject_id=subject_id,
327
+ recurring_acquisition_id=recurring_acquisition_id,
328
+ planning_status=planning_status,
329
+ include_archived=include_archived,
330
+ limit=limit,
331
+ )
332
+ ).parsed