hushscript 1.0.0__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.
- hushscript/__init__.py +97 -0
- hushscript/_client.py +687 -0
- hushscript/_clock.py +36 -0
- hushscript/_config.py +139 -0
- hushscript/_errors.py +563 -0
- hushscript/_guard.py +61 -0
- hushscript/_http.py +624 -0
- hushscript/_json.py +55 -0
- hushscript/_log.py +155 -0
- hushscript/_models.py +144 -0
- hushscript/_pacing.py +51 -0
- hushscript/_redact.py +140 -0
- hushscript/_response.py +67 -0
- hushscript/_retry.py +205 -0
- hushscript/_shape.py +197 -0
- hushscript/_shapes.py +248 -0
- hushscript/_version.py +1 -0
- hushscript/format.py +224 -0
- hushscript/generated/__init__.py +8 -0
- hushscript/generated/api/__init__.py +1 -0
- hushscript/generated/api/default/__init__.py +1 -0
- hushscript/generated/api/default/buy_minutes.py +248 -0
- hushscript/generated/api/default/claim_agent_account.py +238 -0
- hushscript/generated/api/default/complete_upload.py +238 -0
- hushscript/generated/api/default/create_agent_account_signup.py +261 -0
- hushscript/generated/api/default/create_setup_session.py +244 -0
- hushscript/generated/api/default/create_upload.py +225 -0
- hushscript/generated/api/default/get_account.py +169 -0
- hushscript/generated/api/default/get_job.py +198 -0
- hushscript/generated/api/default/get_org.py +169 -0
- hushscript/generated/api/default/get_transcript.py +226 -0
- hushscript/generated/api/default/get_transcription_context.py +173 -0
- hushscript/generated/api/default/get_upload_part_urls.py +246 -0
- hushscript/generated/api/default/heartbeat_upload.py +197 -0
- hushscript/generated/api/default/lift_transcript_hold.py +206 -0
- hushscript/generated/api/default/list_credit_ledger.py +229 -0
- hushscript/generated/api/default/list_deleted_transcripts.py +237 -0
- hushscript/generated/api/default/list_holds.py +233 -0
- hushscript/generated/api/default/list_jobs.py +249 -0
- hushscript/generated/api/default/list_org_audit.py +221 -0
- hushscript/generated/api/default/list_org_invoices.py +221 -0
- hushscript/generated/api/default/list_org_ledger.py +221 -0
- hushscript/generated/api/default/list_org_matters.py +247 -0
- hushscript/generated/api/default/list_org_members.py +221 -0
- hushscript/generated/api/default/list_org_transcripts.py +233 -0
- hushscript/generated/api/default/list_packs.py +169 -0
- hushscript/generated/api/default/list_saved_cards.py +169 -0
- hushscript/generated/api/default/list_transactions.py +225 -0
- hushscript/generated/api/default/list_transcripts.py +225 -0
- hushscript/generated/api/default/org_audit_csv.py +163 -0
- hushscript/generated/api/default/org_ledger_csv.py +163 -0
- hushscript/generated/api/default/org_usage_report.py +247 -0
- hushscript/generated/api/default/org_usage_report_csv.py +229 -0
- hushscript/generated/api/default/patch_org_member.py +237 -0
- hushscript/generated/api/default/place_transcript_hold.py +206 -0
- hushscript/generated/api/default/rotate_agent_credentials.py +177 -0
- hushscript/generated/api/default/schedule_org_custody.py +215 -0
- hushscript/generated/api/default/set_default_card.py +223 -0
- hushscript/generated/api/default/upload_part.py +249 -0
- hushscript/generated/catalog.py +138 -0
- hushscript/generated/client.py +282 -0
- hushscript/generated/errors.py +16 -0
- hushscript/generated/hints.py +28 -0
- hushscript/generated/models/__init__.py +193 -0
- hushscript/generated/models/account_response.py +114 -0
- hushscript/generated/models/active_hold.py +88 -0
- hushscript/generated/models/active_hold_kind.py +18 -0
- hushscript/generated/models/agent_claim_request.py +61 -0
- hushscript/generated/models/agent_claim_response.py +85 -0
- hushscript/generated/models/agent_credentials_rotate_response.py +101 -0
- hushscript/generated/models/agent_signup_request.py +118 -0
- hushscript/generated/models/agent_signup_request_agent.py +80 -0
- hushscript/generated/models/agent_signup_response.py +111 -0
- hushscript/generated/models/buy_minutes_body.py +89 -0
- hushscript/generated/models/card.py +132 -0
- hushscript/generated/models/cards_response.py +90 -0
- hushscript/generated/models/complete_upload_body.py +107 -0
- hushscript/generated/models/complete_upload_body_parts_type_0_item.py +69 -0
- hushscript/generated/models/context_dictionary.py +143 -0
- hushscript/generated/models/context_prompt_preset.py +118 -0
- hushscript/generated/models/create_setup_session_body.py +62 -0
- hushscript/generated/models/create_upload_body.py +254 -0
- hushscript/generated/models/create_upload_body_transcription_options_type_0.py +178 -0
- hushscript/generated/models/credit_ledger_entry.py +113 -0
- hushscript/generated/models/credit_ledger_response.py +90 -0
- hushscript/generated/models/deleted_transcript.py +148 -0
- hushscript/generated/models/deleted_transcript_cause.py +18 -0
- hushscript/generated/models/deleted_transcript_receipt_type_0.py +107 -0
- hushscript/generated/models/deleted_transcript_receipt_type_0_items_item.py +69 -0
- hushscript/generated/models/deleted_transcripts_response.py +90 -0
- hushscript/generated/models/dictionary_entry.py +123 -0
- hushscript/generated/models/dictionary_entry_category.py +37 -0
- hushscript/generated/models/error.py +155 -0
- hushscript/generated/models/error_details.py +94 -0
- hushscript/generated/models/get_upload_part_urls_response_200_type_0.py +108 -0
- hushscript/generated/models/heartbeat_upload_response_200.py +61 -0
- hushscript/generated/models/holds_response.py +90 -0
- hushscript/generated/models/job.py +309 -0
- hushscript/generated/models/job_failure_kind_type_1.py +16 -0
- hushscript/generated/models/job_failure_kind_type_2_type_1.py +16 -0
- hushscript/generated/models/job_failure_kind_type_3_type_1.py +16 -0
- hushscript/generated/models/job_list.py +90 -0
- hushscript/generated/models/lift_transcript_hold_response_200.py +61 -0
- hushscript/generated/models/list_jobs_active.py +17 -0
- hushscript/generated/models/list_org_matters_status.py +16 -0
- hushscript/generated/models/options_summary.py +135 -0
- hushscript/generated/models/org_audit_entry.py +105 -0
- hushscript/generated/models/org_audit_response.py +90 -0
- hushscript/generated/models/org_invoice.py +175 -0
- hushscript/generated/models/org_invoices_response.py +90 -0
- hushscript/generated/models/org_ledger_entry.py +155 -0
- hushscript/generated/models/org_ledger_response.py +90 -0
- hushscript/generated/models/org_matter.py +79 -0
- hushscript/generated/models/org_matter_status.py +16 -0
- hushscript/generated/models/org_matters_response.py +75 -0
- hushscript/generated/models/org_member.py +123 -0
- hushscript/generated/models/org_members_response.py +90 -0
- hushscript/generated/models/org_summary_response.py +482 -0
- hushscript/generated/models/org_transcript.py +103 -0
- hushscript/generated/models/org_transcripts_response.py +90 -0
- hushscript/generated/models/org_usage_report_csv_group_by.py +17 -0
- hushscript/generated/models/org_usage_report_group_by.py +17 -0
- hushscript/generated/models/org_usage_response.py +112 -0
- hushscript/generated/models/org_usage_response_group_by.py +17 -0
- hushscript/generated/models/org_usage_row.py +86 -0
- hushscript/generated/models/pack.py +107 -0
- hushscript/generated/models/packs_response.py +75 -0
- hushscript/generated/models/patch_org_member_body.py +102 -0
- hushscript/generated/models/patch_org_member_response_200.py +61 -0
- hushscript/generated/models/place_transcript_hold_response_200.py +61 -0
- hushscript/generated/models/presigned_part_url.py +69 -0
- hushscript/generated/models/purchase_response.py +76 -0
- hushscript/generated/models/schedule_org_custody_body.py +66 -0
- hushscript/generated/models/schedule_org_custody_body_custody.py +17 -0
- hushscript/generated/models/schedule_org_custody_response_200.py +69 -0
- hushscript/generated/models/set_default_card_body.py +61 -0
- hushscript/generated/models/set_default_card_response_200.py +61 -0
- hushscript/generated/models/setup_session_response.py +77 -0
- hushscript/generated/models/transaction.py +183 -0
- hushscript/generated/models/transactions_response.py +98 -0
- hushscript/generated/models/transcript_detail.py +194 -0
- hushscript/generated/models/transcript_detail_speaker_names.py +47 -0
- hushscript/generated/models/transcript_envelope.py +89 -0
- hushscript/generated/models/transcript_envelope_translations.py +62 -0
- hushscript/generated/models/transcript_language.py +75 -0
- hushscript/generated/models/transcript_list.py +90 -0
- hushscript/generated/models/transcript_list_row.py +152 -0
- hushscript/generated/models/transcript_list_row_insights_state.py +20 -0
- hushscript/generated/models/transcription_context_response.py +95 -0
- hushscript/generated/models/upload_complete_response.py +100 -0
- hushscript/generated/models/upload_create_response.py +148 -0
- hushscript/generated/models/upload_create_response_funding.py +16 -0
- hushscript/generated/models/upload_create_response_upload_type_0.py +108 -0
- hushscript/generated/models/upload_limits.py +86 -0
- hushscript/generated/models/upload_part_response_200.py +69 -0
- hushscript/generated/models/utterance.py +85 -0
- hushscript/generated/scopes.py +42 -0
- hushscript/generated/types.py +54 -0
- hushscript/money.py +79 -0
- hushscript/paginate.py +78 -0
- hushscript/py.typed +0 -0
- hushscript/resources/__init__.py +1 -0
- hushscript/resources/_params.py +33 -0
- hushscript/resources/account.py +121 -0
- hushscript/resources/agent.py +421 -0
- hushscript/resources/billing.py +567 -0
- hushscript/resources/jobs.py +105 -0
- hushscript/resources/transcripts.py +209 -0
- hushscript/transcribe/__init__.py +1 -0
- hushscript/transcribe/apipeline.py +234 -0
- hushscript/transcribe/aupload.py +197 -0
- hushscript/transcribe/heartbeat.py +78 -0
- hushscript/transcribe/pipeline.py +312 -0
- hushscript/transcribe/preflight.py +272 -0
- hushscript/transcribe/probe.py +185 -0
- hushscript/transcribe/resume.py +115 -0
- hushscript/transcribe/segment.py +23 -0
- hushscript/transcribe/session.py +34 -0
- hushscript/transcribe/sniff.py +30 -0
- hushscript/transcribe/source.py +218 -0
- hushscript/transcribe/upload.py +498 -0
- hushscript/transcribe/wait.py +124 -0
- hushscript/transcript.py +197 -0
- hushscript-1.0.0.dist-info/METADATA +502 -0
- hushscript-1.0.0.dist-info/RECORD +187 -0
- hushscript-1.0.0.dist-info/WHEEL +4 -0
- hushscript-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error import Error
|
|
9
|
+
from ...models.org_ledger_response import OrgLedgerResponse
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
cursor: str | Unset = UNSET,
|
|
16
|
+
limit: int | Unset = 50,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
|
|
19
|
+
params: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
params["cursor"] = cursor
|
|
22
|
+
|
|
23
|
+
params["limit"] = limit
|
|
24
|
+
|
|
25
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
26
|
+
|
|
27
|
+
_kwargs: dict[str, Any] = {
|
|
28
|
+
"method": "get",
|
|
29
|
+
"url": "/v1/org/ledger",
|
|
30
|
+
"params": params,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
38
|
+
) -> Error | OrgLedgerResponse | None:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = OrgLedgerResponse.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
|
|
44
|
+
if response.status_code == 400:
|
|
45
|
+
response_400 = Error.from_dict(response.json())
|
|
46
|
+
|
|
47
|
+
return response_400
|
|
48
|
+
|
|
49
|
+
if response.status_code == 401:
|
|
50
|
+
response_401 = Error.from_dict(response.json())
|
|
51
|
+
|
|
52
|
+
return response_401
|
|
53
|
+
|
|
54
|
+
if response.status_code == 403:
|
|
55
|
+
response_403 = Error.from_dict(response.json())
|
|
56
|
+
|
|
57
|
+
return response_403
|
|
58
|
+
|
|
59
|
+
if response.status_code == 429:
|
|
60
|
+
response_429 = Error.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
return response_429
|
|
63
|
+
|
|
64
|
+
if response.status_code == 500:
|
|
65
|
+
response_500 = Error.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_500
|
|
68
|
+
|
|
69
|
+
if client.raise_on_unexpected_status:
|
|
70
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
71
|
+
else:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _build_response(
|
|
76
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
77
|
+
) -> Response[Error | OrgLedgerResponse]:
|
|
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
|
+
cursor: str | Unset = UNSET,
|
|
90
|
+
limit: int | Unset = 50,
|
|
91
|
+
) -> Response[Error | OrgLedgerResponse]:
|
|
92
|
+
"""List the caller's organization's minute-pool ledger
|
|
93
|
+
|
|
94
|
+
Returns a page of the caller's organization's shared minute pool history (holds, settles, releases,
|
|
95
|
+
purchases), newest first. Org admin only. Pass the next_cursor value from one page as the cursor
|
|
96
|
+
parameter of the next request to page further back; the cursor is opaque and this API refuses one it
|
|
97
|
+
did not mint rather than silently restarting at page one.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
cursor (str | Unset):
|
|
101
|
+
limit (int | Unset): Default: 50.
|
|
102
|
+
|
|
103
|
+
Raises:
|
|
104
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
105
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
Response[Error | OrgLedgerResponse]
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
kwargs = _get_kwargs(
|
|
112
|
+
cursor=cursor,
|
|
113
|
+
limit=limit,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
response = client.get_httpx_client().request(
|
|
117
|
+
**kwargs,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
return _build_response(client=client, response=response)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def sync(
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
cursor: str | Unset = UNSET,
|
|
127
|
+
limit: int | Unset = 50,
|
|
128
|
+
) -> Error | OrgLedgerResponse | None:
|
|
129
|
+
"""List the caller's organization's minute-pool ledger
|
|
130
|
+
|
|
131
|
+
Returns a page of the caller's organization's shared minute pool history (holds, settles, releases,
|
|
132
|
+
purchases), newest first. Org admin only. Pass the next_cursor value from one page as the cursor
|
|
133
|
+
parameter of the next request to page further back; the cursor is opaque and this API refuses one it
|
|
134
|
+
did not mint rather than silently restarting at page one.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
cursor (str | Unset):
|
|
138
|
+
limit (int | Unset): Default: 50.
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
Error | OrgLedgerResponse
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
return sync_detailed(
|
|
149
|
+
client=client,
|
|
150
|
+
cursor=cursor,
|
|
151
|
+
limit=limit,
|
|
152
|
+
).parsed
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio_detailed(
|
|
156
|
+
*,
|
|
157
|
+
client: AuthenticatedClient,
|
|
158
|
+
cursor: str | Unset = UNSET,
|
|
159
|
+
limit: int | Unset = 50,
|
|
160
|
+
) -> Response[Error | OrgLedgerResponse]:
|
|
161
|
+
"""List the caller's organization's minute-pool ledger
|
|
162
|
+
|
|
163
|
+
Returns a page of the caller's organization's shared minute pool history (holds, settles, releases,
|
|
164
|
+
purchases), newest first. Org admin only. Pass the next_cursor value from one page as the cursor
|
|
165
|
+
parameter of the next request to page further back; the cursor is opaque and this API refuses one it
|
|
166
|
+
did not mint rather than silently restarting at page one.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
cursor (str | Unset):
|
|
170
|
+
limit (int | Unset): Default: 50.
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
174
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Response[Error | OrgLedgerResponse]
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
kwargs = _get_kwargs(
|
|
181
|
+
cursor=cursor,
|
|
182
|
+
limit=limit,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
186
|
+
|
|
187
|
+
return _build_response(client=client, response=response)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
async def asyncio(
|
|
191
|
+
*,
|
|
192
|
+
client: AuthenticatedClient,
|
|
193
|
+
cursor: str | Unset = UNSET,
|
|
194
|
+
limit: int | Unset = 50,
|
|
195
|
+
) -> Error | OrgLedgerResponse | None:
|
|
196
|
+
"""List the caller's organization's minute-pool ledger
|
|
197
|
+
|
|
198
|
+
Returns a page of the caller's organization's shared minute pool history (holds, settles, releases,
|
|
199
|
+
purchases), newest first. Org admin only. Pass the next_cursor value from one page as the cursor
|
|
200
|
+
parameter of the next request to page further back; the cursor is opaque and this API refuses one it
|
|
201
|
+
did not mint rather than silently restarting at page one.
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
cursor (str | Unset):
|
|
205
|
+
limit (int | Unset): Default: 50.
|
|
206
|
+
|
|
207
|
+
Raises:
|
|
208
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
209
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
210
|
+
|
|
211
|
+
Returns:
|
|
212
|
+
Error | OrgLedgerResponse
|
|
213
|
+
"""
|
|
214
|
+
|
|
215
|
+
return (
|
|
216
|
+
await asyncio_detailed(
|
|
217
|
+
client=client,
|
|
218
|
+
cursor=cursor,
|
|
219
|
+
limit=limit,
|
|
220
|
+
)
|
|
221
|
+
).parsed
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error import Error
|
|
9
|
+
from ...models.list_org_matters_status import (
|
|
10
|
+
ListOrgMattersStatus,
|
|
11
|
+
)
|
|
12
|
+
from ...models.org_matters_response import OrgMattersResponse
|
|
13
|
+
from ...types import UNSET, Response, Unset
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _get_kwargs(
|
|
17
|
+
*,
|
|
18
|
+
status: ListOrgMattersStatus | Unset = "open",
|
|
19
|
+
q: str | Unset = UNSET,
|
|
20
|
+
limit: int | Unset = 50,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
|
|
23
|
+
params: dict[str, Any] = {}
|
|
24
|
+
|
|
25
|
+
json_status: str | Unset = UNSET
|
|
26
|
+
if not isinstance(status, Unset):
|
|
27
|
+
json_status = status
|
|
28
|
+
|
|
29
|
+
params["status"] = json_status
|
|
30
|
+
|
|
31
|
+
params["q"] = q
|
|
32
|
+
|
|
33
|
+
params["limit"] = limit
|
|
34
|
+
|
|
35
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
36
|
+
|
|
37
|
+
_kwargs: dict[str, Any] = {
|
|
38
|
+
"method": "get",
|
|
39
|
+
"url": "/v1/org/matters",
|
|
40
|
+
"params": params,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return _kwargs
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _parse_response(
|
|
47
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
48
|
+
) -> Error | OrgMattersResponse | None:
|
|
49
|
+
if response.status_code == 200:
|
|
50
|
+
response_200 = OrgMattersResponse.from_dict(response.json())
|
|
51
|
+
|
|
52
|
+
return response_200
|
|
53
|
+
|
|
54
|
+
if response.status_code == 400:
|
|
55
|
+
response_400 = Error.from_dict(response.json())
|
|
56
|
+
|
|
57
|
+
return response_400
|
|
58
|
+
|
|
59
|
+
if response.status_code == 401:
|
|
60
|
+
response_401 = Error.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
return response_401
|
|
63
|
+
|
|
64
|
+
if response.status_code == 403:
|
|
65
|
+
response_403 = Error.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_403
|
|
68
|
+
|
|
69
|
+
if response.status_code == 429:
|
|
70
|
+
response_429 = Error.from_dict(response.json())
|
|
71
|
+
|
|
72
|
+
return response_429
|
|
73
|
+
|
|
74
|
+
if response.status_code == 500:
|
|
75
|
+
response_500 = Error.from_dict(response.json())
|
|
76
|
+
|
|
77
|
+
return response_500
|
|
78
|
+
|
|
79
|
+
if client.raise_on_unexpected_status:
|
|
80
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
81
|
+
else:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _build_response(
|
|
86
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
87
|
+
) -> Response[Error | OrgMattersResponse]:
|
|
88
|
+
return Response(
|
|
89
|
+
status_code=HTTPStatus(response.status_code),
|
|
90
|
+
content=response.content,
|
|
91
|
+
headers=response.headers,
|
|
92
|
+
parsed=_parse_response(client=client, response=response),
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def sync_detailed(
|
|
97
|
+
*,
|
|
98
|
+
client: AuthenticatedClient,
|
|
99
|
+
status: ListOrgMattersStatus | Unset = "open",
|
|
100
|
+
q: str | Unset = UNSET,
|
|
101
|
+
limit: int | Unset = 50,
|
|
102
|
+
) -> Response[Error | OrgMattersResponse]:
|
|
103
|
+
"""List the caller's organization's matter registry
|
|
104
|
+
|
|
105
|
+
Returns up to 200 rows of the caller's organization's matter registry, ordered by code. Membership
|
|
106
|
+
gated, not admin only: a member filing a transcript under an existing matter is offered this same
|
|
107
|
+
list. Every row here is {id, code, status} for every caller, including an admin's own token -- the
|
|
108
|
+
client a matter belongs to is /api admin only: GET /api/org/matters publishes client_id and the
|
|
109
|
+
client's own code to an admin caller there, but this /v1 route never does, for any caller.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
status (ListOrgMattersStatus | Unset): Default: 'open'.
|
|
113
|
+
q (str | Unset):
|
|
114
|
+
limit (int | Unset): Default: 50.
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Response[Error | OrgMattersResponse]
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
kwargs = _get_kwargs(
|
|
125
|
+
status=status,
|
|
126
|
+
q=q,
|
|
127
|
+
limit=limit,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
response = client.get_httpx_client().request(
|
|
131
|
+
**kwargs,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
return _build_response(client=client, response=response)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def sync(
|
|
138
|
+
*,
|
|
139
|
+
client: AuthenticatedClient,
|
|
140
|
+
status: ListOrgMattersStatus | Unset = "open",
|
|
141
|
+
q: str | Unset = UNSET,
|
|
142
|
+
limit: int | Unset = 50,
|
|
143
|
+
) -> Error | OrgMattersResponse | None:
|
|
144
|
+
"""List the caller's organization's matter registry
|
|
145
|
+
|
|
146
|
+
Returns up to 200 rows of the caller's organization's matter registry, ordered by code. Membership
|
|
147
|
+
gated, not admin only: a member filing a transcript under an existing matter is offered this same
|
|
148
|
+
list. Every row here is {id, code, status} for every caller, including an admin's own token -- the
|
|
149
|
+
client a matter belongs to is /api admin only: GET /api/org/matters publishes client_id and the
|
|
150
|
+
client's own code to an admin caller there, but this /v1 route never does, for any caller.
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
status (ListOrgMattersStatus | Unset): Default: 'open'.
|
|
154
|
+
q (str | Unset):
|
|
155
|
+
limit (int | Unset): Default: 50.
|
|
156
|
+
|
|
157
|
+
Raises:
|
|
158
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Error | OrgMattersResponse
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
return sync_detailed(
|
|
166
|
+
client=client,
|
|
167
|
+
status=status,
|
|
168
|
+
q=q,
|
|
169
|
+
limit=limit,
|
|
170
|
+
).parsed
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
async def asyncio_detailed(
|
|
174
|
+
*,
|
|
175
|
+
client: AuthenticatedClient,
|
|
176
|
+
status: ListOrgMattersStatus | Unset = "open",
|
|
177
|
+
q: str | Unset = UNSET,
|
|
178
|
+
limit: int | Unset = 50,
|
|
179
|
+
) -> Response[Error | OrgMattersResponse]:
|
|
180
|
+
"""List the caller's organization's matter registry
|
|
181
|
+
|
|
182
|
+
Returns up to 200 rows of the caller's organization's matter registry, ordered by code. Membership
|
|
183
|
+
gated, not admin only: a member filing a transcript under an existing matter is offered this same
|
|
184
|
+
list. Every row here is {id, code, status} for every caller, including an admin's own token -- the
|
|
185
|
+
client a matter belongs to is /api admin only: GET /api/org/matters publishes client_id and the
|
|
186
|
+
client's own code to an admin caller there, but this /v1 route never does, for any caller.
|
|
187
|
+
|
|
188
|
+
Args:
|
|
189
|
+
status (ListOrgMattersStatus | Unset): Default: 'open'.
|
|
190
|
+
q (str | Unset):
|
|
191
|
+
limit (int | Unset): Default: 50.
|
|
192
|
+
|
|
193
|
+
Raises:
|
|
194
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
195
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
Response[Error | OrgMattersResponse]
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
kwargs = _get_kwargs(
|
|
202
|
+
status=status,
|
|
203
|
+
q=q,
|
|
204
|
+
limit=limit,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
208
|
+
|
|
209
|
+
return _build_response(client=client, response=response)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
async def asyncio(
|
|
213
|
+
*,
|
|
214
|
+
client: AuthenticatedClient,
|
|
215
|
+
status: ListOrgMattersStatus | Unset = "open",
|
|
216
|
+
q: str | Unset = UNSET,
|
|
217
|
+
limit: int | Unset = 50,
|
|
218
|
+
) -> Error | OrgMattersResponse | None:
|
|
219
|
+
"""List the caller's organization's matter registry
|
|
220
|
+
|
|
221
|
+
Returns up to 200 rows of the caller's organization's matter registry, ordered by code. Membership
|
|
222
|
+
gated, not admin only: a member filing a transcript under an existing matter is offered this same
|
|
223
|
+
list. Every row here is {id, code, status} for every caller, including an admin's own token -- the
|
|
224
|
+
client a matter belongs to is /api admin only: GET /api/org/matters publishes client_id and the
|
|
225
|
+
client's own code to an admin caller there, but this /v1 route never does, for any caller.
|
|
226
|
+
|
|
227
|
+
Args:
|
|
228
|
+
status (ListOrgMattersStatus | Unset): Default: 'open'.
|
|
229
|
+
q (str | Unset):
|
|
230
|
+
limit (int | Unset): Default: 50.
|
|
231
|
+
|
|
232
|
+
Raises:
|
|
233
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
234
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
235
|
+
|
|
236
|
+
Returns:
|
|
237
|
+
Error | OrgMattersResponse
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
return (
|
|
241
|
+
await asyncio_detailed(
|
|
242
|
+
client=client,
|
|
243
|
+
status=status,
|
|
244
|
+
q=q,
|
|
245
|
+
limit=limit,
|
|
246
|
+
)
|
|
247
|
+
).parsed
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.error import Error
|
|
9
|
+
from ...models.org_members_response import OrgMembersResponse
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
cursor: str | Unset = UNSET,
|
|
16
|
+
limit: int | Unset = 50,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
|
|
19
|
+
params: dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
params["cursor"] = cursor
|
|
22
|
+
|
|
23
|
+
params["limit"] = limit
|
|
24
|
+
|
|
25
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
26
|
+
|
|
27
|
+
_kwargs: dict[str, Any] = {
|
|
28
|
+
"method": "get",
|
|
29
|
+
"url": "/v1/org/members",
|
|
30
|
+
"params": params,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return _kwargs
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _parse_response(
|
|
37
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
38
|
+
) -> Error | OrgMembersResponse | None:
|
|
39
|
+
if response.status_code == 200:
|
|
40
|
+
response_200 = OrgMembersResponse.from_dict(response.json())
|
|
41
|
+
|
|
42
|
+
return response_200
|
|
43
|
+
|
|
44
|
+
if response.status_code == 400:
|
|
45
|
+
response_400 = Error.from_dict(response.json())
|
|
46
|
+
|
|
47
|
+
return response_400
|
|
48
|
+
|
|
49
|
+
if response.status_code == 401:
|
|
50
|
+
response_401 = Error.from_dict(response.json())
|
|
51
|
+
|
|
52
|
+
return response_401
|
|
53
|
+
|
|
54
|
+
if response.status_code == 403:
|
|
55
|
+
response_403 = Error.from_dict(response.json())
|
|
56
|
+
|
|
57
|
+
return response_403
|
|
58
|
+
|
|
59
|
+
if response.status_code == 429:
|
|
60
|
+
response_429 = Error.from_dict(response.json())
|
|
61
|
+
|
|
62
|
+
return response_429
|
|
63
|
+
|
|
64
|
+
if response.status_code == 500:
|
|
65
|
+
response_500 = Error.from_dict(response.json())
|
|
66
|
+
|
|
67
|
+
return response_500
|
|
68
|
+
|
|
69
|
+
if client.raise_on_unexpected_status:
|
|
70
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
71
|
+
else:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def _build_response(
|
|
76
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
77
|
+
) -> Response[Error | OrgMembersResponse]:
|
|
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
|
+
cursor: str | Unset = UNSET,
|
|
90
|
+
limit: int | Unset = 50,
|
|
91
|
+
) -> Response[Error | OrgMembersResponse]:
|
|
92
|
+
"""List the caller's organization members
|
|
93
|
+
|
|
94
|
+
Returns a page of the caller's organization's members, most recently joined first. Org admin only.
|
|
95
|
+
Pass the next_cursor value from one page as the cursor parameter of the next request to page further
|
|
96
|
+
back; the cursor is opaque and this API refuses one it did not mint rather than silently restarting
|
|
97
|
+
at page one.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
cursor (str | Unset):
|
|
101
|
+
limit (int | Unset): Default: 50.
|
|
102
|
+
|
|
103
|
+
Raises:
|
|
104
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
105
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
106
|
+
|
|
107
|
+
Returns:
|
|
108
|
+
Response[Error | OrgMembersResponse]
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
kwargs = _get_kwargs(
|
|
112
|
+
cursor=cursor,
|
|
113
|
+
limit=limit,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
response = client.get_httpx_client().request(
|
|
117
|
+
**kwargs,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
return _build_response(client=client, response=response)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def sync(
|
|
124
|
+
*,
|
|
125
|
+
client: AuthenticatedClient,
|
|
126
|
+
cursor: str | Unset = UNSET,
|
|
127
|
+
limit: int | Unset = 50,
|
|
128
|
+
) -> Error | OrgMembersResponse | None:
|
|
129
|
+
"""List the caller's organization members
|
|
130
|
+
|
|
131
|
+
Returns a page of the caller's organization's members, most recently joined first. Org admin only.
|
|
132
|
+
Pass the next_cursor value from one page as the cursor parameter of the next request to page further
|
|
133
|
+
back; the cursor is opaque and this API refuses one it did not mint rather than silently restarting
|
|
134
|
+
at page one.
|
|
135
|
+
|
|
136
|
+
Args:
|
|
137
|
+
cursor (str | Unset):
|
|
138
|
+
limit (int | Unset): Default: 50.
|
|
139
|
+
|
|
140
|
+
Raises:
|
|
141
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
142
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
143
|
+
|
|
144
|
+
Returns:
|
|
145
|
+
Error | OrgMembersResponse
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
return sync_detailed(
|
|
149
|
+
client=client,
|
|
150
|
+
cursor=cursor,
|
|
151
|
+
limit=limit,
|
|
152
|
+
).parsed
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
async def asyncio_detailed(
|
|
156
|
+
*,
|
|
157
|
+
client: AuthenticatedClient,
|
|
158
|
+
cursor: str | Unset = UNSET,
|
|
159
|
+
limit: int | Unset = 50,
|
|
160
|
+
) -> Response[Error | OrgMembersResponse]:
|
|
161
|
+
"""List the caller's organization members
|
|
162
|
+
|
|
163
|
+
Returns a page of the caller's organization's members, most recently joined first. Org admin only.
|
|
164
|
+
Pass the next_cursor value from one page as the cursor parameter of the next request to page further
|
|
165
|
+
back; the cursor is opaque and this API refuses one it did not mint rather than silently restarting
|
|
166
|
+
at page one.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
cursor (str | Unset):
|
|
170
|
+
limit (int | Unset): Default: 50.
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
174
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Response[Error | OrgMembersResponse]
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
kwargs = _get_kwargs(
|
|
181
|
+
cursor=cursor,
|
|
182
|
+
limit=limit,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
186
|
+
|
|
187
|
+
return _build_response(client=client, response=response)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
async def asyncio(
|
|
191
|
+
*,
|
|
192
|
+
client: AuthenticatedClient,
|
|
193
|
+
cursor: str | Unset = UNSET,
|
|
194
|
+
limit: int | Unset = 50,
|
|
195
|
+
) -> Error | OrgMembersResponse | None:
|
|
196
|
+
"""List the caller's organization members
|
|
197
|
+
|
|
198
|
+
Returns a page of the caller's organization's members, most recently joined first. Org admin only.
|
|
199
|
+
Pass the next_cursor value from one page as the cursor parameter of the next request to page further
|
|
200
|
+
back; the cursor is opaque and this API refuses one it did not mint rather than silently restarting
|
|
201
|
+
at page one.
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
cursor (str | Unset):
|
|
205
|
+
limit (int | Unset): Default: 50.
|
|
206
|
+
|
|
207
|
+
Raises:
|
|
208
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
209
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
210
|
+
|
|
211
|
+
Returns:
|
|
212
|
+
Error | OrgMembersResponse
|
|
213
|
+
"""
|
|
214
|
+
|
|
215
|
+
return (
|
|
216
|
+
await asyncio_detailed(
|
|
217
|
+
client=client,
|
|
218
|
+
cursor=cursor,
|
|
219
|
+
limit=limit,
|
|
220
|
+
)
|
|
221
|
+
).parsed
|