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,98 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.transaction import Transaction
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="TransactionsResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class TransactionsResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
transactions (list[Transaction]):
|
|
21
|
+
next_cursor (None | str): An opaque token for the next page's cursor parameter, or null on the last page. This
|
|
22
|
+
API refuses a cursor it did not mint.
|
|
23
|
+
account_reference (str):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
transactions: list[Transaction]
|
|
27
|
+
next_cursor: None | str
|
|
28
|
+
account_reference: str
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
transactions = []
|
|
33
|
+
for transactions_item_data in self.transactions:
|
|
34
|
+
transactions_item = transactions_item_data.to_dict()
|
|
35
|
+
transactions.append(transactions_item)
|
|
36
|
+
|
|
37
|
+
next_cursor: None | str
|
|
38
|
+
next_cursor = self.next_cursor
|
|
39
|
+
|
|
40
|
+
account_reference = self.account_reference
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update(
|
|
45
|
+
{
|
|
46
|
+
"transactions": transactions,
|
|
47
|
+
"next_cursor": next_cursor,
|
|
48
|
+
"account_reference": account_reference,
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
56
|
+
from ..models.transaction import Transaction # noqa: PLC0415
|
|
57
|
+
|
|
58
|
+
d = dict(src_dict)
|
|
59
|
+
transactions = []
|
|
60
|
+
_transactions = d.pop("transactions")
|
|
61
|
+
for transactions_item_data in _transactions:
|
|
62
|
+
transactions_item = Transaction.from_dict(transactions_item_data)
|
|
63
|
+
|
|
64
|
+
transactions.append(transactions_item)
|
|
65
|
+
|
|
66
|
+
def _parse_next_cursor(data: object) -> None | str:
|
|
67
|
+
if data is None:
|
|
68
|
+
return data
|
|
69
|
+
return cast(None | str, data)
|
|
70
|
+
|
|
71
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
72
|
+
|
|
73
|
+
account_reference = d.pop("account_reference")
|
|
74
|
+
|
|
75
|
+
transactions_response = cls(
|
|
76
|
+
transactions=transactions,
|
|
77
|
+
next_cursor=next_cursor,
|
|
78
|
+
account_reference=account_reference,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
transactions_response.additional_properties = d
|
|
82
|
+
return transactions_response
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def additional_keys(self) -> list[str]:
|
|
86
|
+
return list(self.additional_properties.keys())
|
|
87
|
+
|
|
88
|
+
def __getitem__(self, key: str) -> Any:
|
|
89
|
+
return self.additional_properties[key]
|
|
90
|
+
|
|
91
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
92
|
+
self.additional_properties[key] = value
|
|
93
|
+
|
|
94
|
+
def __delitem__(self, key: str) -> None:
|
|
95
|
+
del self.additional_properties[key]
|
|
96
|
+
|
|
97
|
+
def __contains__(self, key: str) -> bool:
|
|
98
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.transcript_detail_speaker_names import TranscriptDetailSpeakerNames
|
|
11
|
+
from ..models.transcript_envelope import TranscriptEnvelope
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="TranscriptDetail")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class TranscriptDetail:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
id (str):
|
|
22
|
+
title (str):
|
|
23
|
+
language_detected (None | str):
|
|
24
|
+
duration_seconds (int):
|
|
25
|
+
speaker_names (TranscriptDetailSpeakerNames): Provider speaker label mapped to a display name, for every speaker
|
|
26
|
+
the caller has renamed.
|
|
27
|
+
tags (list[str]):
|
|
28
|
+
created_at (int):
|
|
29
|
+
updated_at (int):
|
|
30
|
+
auto_delete_at (int | None): When this transcript is scheduled to be purged, or null to keep it indefinitely.
|
|
31
|
+
edited (bool): Whether the original body has been edited since transcription.
|
|
32
|
+
matter_code (None | str): The workspace matter this transcript is filed under, or null. Set at upload time and
|
|
33
|
+
editable afterwards; always null for a transcript that was never funded by a workspace.
|
|
34
|
+
client_code (None | str): The workspace client this transcript is filed under, or null. Set at upload time and
|
|
35
|
+
editable afterwards; always null for a transcript that was never funded by a workspace.
|
|
36
|
+
body (TranscriptEnvelope): The transcript's full structured body.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
id: str
|
|
40
|
+
title: str
|
|
41
|
+
language_detected: None | str
|
|
42
|
+
duration_seconds: int
|
|
43
|
+
speaker_names: TranscriptDetailSpeakerNames
|
|
44
|
+
tags: list[str]
|
|
45
|
+
created_at: int
|
|
46
|
+
updated_at: int
|
|
47
|
+
auto_delete_at: int | None
|
|
48
|
+
edited: bool
|
|
49
|
+
matter_code: None | str
|
|
50
|
+
client_code: None | str
|
|
51
|
+
body: TranscriptEnvelope
|
|
52
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> dict[str, Any]:
|
|
55
|
+
id = self.id
|
|
56
|
+
|
|
57
|
+
title = self.title
|
|
58
|
+
|
|
59
|
+
language_detected: None | str
|
|
60
|
+
language_detected = self.language_detected
|
|
61
|
+
|
|
62
|
+
duration_seconds = self.duration_seconds
|
|
63
|
+
|
|
64
|
+
speaker_names = self.speaker_names.to_dict()
|
|
65
|
+
|
|
66
|
+
tags = self.tags
|
|
67
|
+
|
|
68
|
+
created_at = self.created_at
|
|
69
|
+
|
|
70
|
+
updated_at = self.updated_at
|
|
71
|
+
|
|
72
|
+
auto_delete_at: int | None
|
|
73
|
+
auto_delete_at = self.auto_delete_at
|
|
74
|
+
|
|
75
|
+
edited = self.edited
|
|
76
|
+
|
|
77
|
+
matter_code: None | str
|
|
78
|
+
matter_code = self.matter_code
|
|
79
|
+
|
|
80
|
+
client_code: None | str
|
|
81
|
+
client_code = self.client_code
|
|
82
|
+
|
|
83
|
+
body = self.body.to_dict()
|
|
84
|
+
|
|
85
|
+
field_dict: dict[str, Any] = {}
|
|
86
|
+
field_dict.update(self.additional_properties)
|
|
87
|
+
field_dict.update(
|
|
88
|
+
{
|
|
89
|
+
"id": id,
|
|
90
|
+
"title": title,
|
|
91
|
+
"language_detected": language_detected,
|
|
92
|
+
"duration_seconds": duration_seconds,
|
|
93
|
+
"speaker_names": speaker_names,
|
|
94
|
+
"tags": tags,
|
|
95
|
+
"created_at": created_at,
|
|
96
|
+
"updated_at": updated_at,
|
|
97
|
+
"auto_delete_at": auto_delete_at,
|
|
98
|
+
"edited": edited,
|
|
99
|
+
"matter_code": matter_code,
|
|
100
|
+
"client_code": client_code,
|
|
101
|
+
"body": body,
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
return field_dict
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
109
|
+
from ..models.transcript_detail_speaker_names import (
|
|
110
|
+
TranscriptDetailSpeakerNames, # noqa: PLC0415
|
|
111
|
+
)
|
|
112
|
+
from ..models.transcript_envelope import TranscriptEnvelope # noqa: PLC0415
|
|
113
|
+
|
|
114
|
+
d = dict(src_dict)
|
|
115
|
+
id = d.pop("id")
|
|
116
|
+
|
|
117
|
+
title = d.pop("title")
|
|
118
|
+
|
|
119
|
+
def _parse_language_detected(data: object) -> None | str:
|
|
120
|
+
if data is None:
|
|
121
|
+
return data
|
|
122
|
+
return cast(None | str, data)
|
|
123
|
+
|
|
124
|
+
language_detected = _parse_language_detected(d.pop("language_detected"))
|
|
125
|
+
|
|
126
|
+
duration_seconds = d.pop("duration_seconds")
|
|
127
|
+
|
|
128
|
+
speaker_names = TranscriptDetailSpeakerNames.from_dict(d.pop("speaker_names"))
|
|
129
|
+
|
|
130
|
+
tags = cast(list[str], d.pop("tags"))
|
|
131
|
+
|
|
132
|
+
created_at = d.pop("created_at")
|
|
133
|
+
|
|
134
|
+
updated_at = d.pop("updated_at")
|
|
135
|
+
|
|
136
|
+
def _parse_auto_delete_at(data: object) -> int | None:
|
|
137
|
+
if data is None:
|
|
138
|
+
return data
|
|
139
|
+
return cast(int | None, data)
|
|
140
|
+
|
|
141
|
+
auto_delete_at = _parse_auto_delete_at(d.pop("auto_delete_at"))
|
|
142
|
+
|
|
143
|
+
edited = d.pop("edited")
|
|
144
|
+
|
|
145
|
+
def _parse_matter_code(data: object) -> None | str:
|
|
146
|
+
if data is None:
|
|
147
|
+
return data
|
|
148
|
+
return cast(None | str, data)
|
|
149
|
+
|
|
150
|
+
matter_code = _parse_matter_code(d.pop("matter_code"))
|
|
151
|
+
|
|
152
|
+
def _parse_client_code(data: object) -> None | str:
|
|
153
|
+
if data is None:
|
|
154
|
+
return data
|
|
155
|
+
return cast(None | str, data)
|
|
156
|
+
|
|
157
|
+
client_code = _parse_client_code(d.pop("client_code"))
|
|
158
|
+
|
|
159
|
+
body = TranscriptEnvelope.from_dict(d.pop("body"))
|
|
160
|
+
|
|
161
|
+
transcript_detail = cls(
|
|
162
|
+
id=id,
|
|
163
|
+
title=title,
|
|
164
|
+
language_detected=language_detected,
|
|
165
|
+
duration_seconds=duration_seconds,
|
|
166
|
+
speaker_names=speaker_names,
|
|
167
|
+
tags=tags,
|
|
168
|
+
created_at=created_at,
|
|
169
|
+
updated_at=updated_at,
|
|
170
|
+
auto_delete_at=auto_delete_at,
|
|
171
|
+
edited=edited,
|
|
172
|
+
matter_code=matter_code,
|
|
173
|
+
client_code=client_code,
|
|
174
|
+
body=body,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
transcript_detail.additional_properties = d
|
|
178
|
+
return transcript_detail
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def additional_keys(self) -> list[str]:
|
|
182
|
+
return list(self.additional_properties.keys())
|
|
183
|
+
|
|
184
|
+
def __getitem__(self, key: str) -> Any:
|
|
185
|
+
return self.additional_properties[key]
|
|
186
|
+
|
|
187
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
188
|
+
self.additional_properties[key] = value
|
|
189
|
+
|
|
190
|
+
def __delitem__(self, key: str) -> None:
|
|
191
|
+
del self.additional_properties[key]
|
|
192
|
+
|
|
193
|
+
def __contains__(self, key: str) -> bool:
|
|
194
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="TranscriptDetailSpeakerNames")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class TranscriptDetailSpeakerNames:
|
|
14
|
+
"""Provider speaker label mapped to a display name, for every speaker the caller has renamed."""
|
|
15
|
+
|
|
16
|
+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
|
|
17
|
+
|
|
18
|
+
def to_dict(self) -> dict[str, Any]:
|
|
19
|
+
|
|
20
|
+
field_dict: dict[str, Any] = {}
|
|
21
|
+
field_dict.update(self.additional_properties)
|
|
22
|
+
|
|
23
|
+
return field_dict
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
27
|
+
d = dict(src_dict)
|
|
28
|
+
transcript_detail_speaker_names = cls()
|
|
29
|
+
|
|
30
|
+
transcript_detail_speaker_names.additional_properties = d
|
|
31
|
+
return transcript_detail_speaker_names
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def additional_keys(self) -> list[str]:
|
|
35
|
+
return list(self.additional_properties.keys())
|
|
36
|
+
|
|
37
|
+
def __getitem__(self, key: str) -> str:
|
|
38
|
+
return self.additional_properties[key]
|
|
39
|
+
|
|
40
|
+
def __setitem__(self, key: str, value: str) -> None:
|
|
41
|
+
self.additional_properties[key] = value
|
|
42
|
+
|
|
43
|
+
def __delitem__(self, key: str) -> None:
|
|
44
|
+
del self.additional_properties[key]
|
|
45
|
+
|
|
46
|
+
def __contains__(self, key: str) -> bool:
|
|
47
|
+
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 TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.transcript_envelope_translations import TranscriptEnvelopeTranslations
|
|
11
|
+
from ..models.transcript_language import TranscriptLanguage
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="TranscriptEnvelope")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@_attrs_define
|
|
18
|
+
class TranscriptEnvelope:
|
|
19
|
+
"""The transcript's full structured body.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
version (int):
|
|
23
|
+
original (TranscriptLanguage):
|
|
24
|
+
translations (TranscriptEnvelopeTranslations): Keyed by target locale, plus the reserved key cleaned for the AI-
|
|
25
|
+
rewritten cleaned body when one exists.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
version: int
|
|
29
|
+
original: TranscriptLanguage
|
|
30
|
+
translations: TranscriptEnvelopeTranslations
|
|
31
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
32
|
+
|
|
33
|
+
def to_dict(self) -> dict[str, Any]:
|
|
34
|
+
version = self.version
|
|
35
|
+
|
|
36
|
+
original = self.original.to_dict()
|
|
37
|
+
|
|
38
|
+
translations = self.translations.to_dict()
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"version": version,
|
|
45
|
+
"original": original,
|
|
46
|
+
"translations": translations,
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return field_dict
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
54
|
+
from ..models.transcript_envelope_translations import (
|
|
55
|
+
TranscriptEnvelopeTranslations, # noqa: PLC0415
|
|
56
|
+
)
|
|
57
|
+
from ..models.transcript_language import TranscriptLanguage # noqa: PLC0415
|
|
58
|
+
|
|
59
|
+
d = dict(src_dict)
|
|
60
|
+
version = d.pop("version")
|
|
61
|
+
|
|
62
|
+
original = TranscriptLanguage.from_dict(d.pop("original"))
|
|
63
|
+
|
|
64
|
+
translations = TranscriptEnvelopeTranslations.from_dict(d.pop("translations"))
|
|
65
|
+
|
|
66
|
+
transcript_envelope = cls(
|
|
67
|
+
version=version,
|
|
68
|
+
original=original,
|
|
69
|
+
translations=translations,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
transcript_envelope.additional_properties = d
|
|
73
|
+
return transcript_envelope
|
|
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,62 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.transcript_language import TranscriptLanguage
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="TranscriptEnvelopeTranslations")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class TranscriptEnvelopeTranslations:
|
|
18
|
+
"""Keyed by target locale, plus the reserved key cleaned for the AI-rewritten cleaned body when one exists."""
|
|
19
|
+
|
|
20
|
+
additional_properties: dict[str, TranscriptLanguage] = _attrs_field(
|
|
21
|
+
init=False, factory=dict
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
|
|
26
|
+
field_dict: dict[str, Any] = {}
|
|
27
|
+
for prop_name, prop in self.additional_properties.items():
|
|
28
|
+
field_dict[prop_name] = prop.to_dict()
|
|
29
|
+
|
|
30
|
+
return field_dict
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
34
|
+
from ..models.transcript_language import TranscriptLanguage # noqa: PLC0415
|
|
35
|
+
|
|
36
|
+
d = dict(src_dict)
|
|
37
|
+
transcript_envelope_translations = cls()
|
|
38
|
+
|
|
39
|
+
additional_properties = {}
|
|
40
|
+
for prop_name, prop_dict in d.items():
|
|
41
|
+
additional_property = TranscriptLanguage.from_dict(prop_dict)
|
|
42
|
+
|
|
43
|
+
additional_properties[prop_name] = additional_property
|
|
44
|
+
|
|
45
|
+
transcript_envelope_translations.additional_properties = additional_properties
|
|
46
|
+
return transcript_envelope_translations
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def additional_keys(self) -> list[str]:
|
|
50
|
+
return list(self.additional_properties.keys())
|
|
51
|
+
|
|
52
|
+
def __getitem__(self, key: str) -> TranscriptLanguage:
|
|
53
|
+
return self.additional_properties[key]
|
|
54
|
+
|
|
55
|
+
def __setitem__(self, key: str, value: TranscriptLanguage) -> None:
|
|
56
|
+
self.additional_properties[key] = value
|
|
57
|
+
|
|
58
|
+
def __delitem__(self, key: str) -> None:
|
|
59
|
+
del self.additional_properties[key]
|
|
60
|
+
|
|
61
|
+
def __contains__(self, key: str) -> bool:
|
|
62
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.utterance import Utterance
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="TranscriptLanguage")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class TranscriptLanguage:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
utterances (list[Utterance]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
utterances: list[Utterance]
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
utterances = []
|
|
28
|
+
for utterances_item_data in self.utterances:
|
|
29
|
+
utterances_item = utterances_item_data.to_dict()
|
|
30
|
+
utterances.append(utterances_item)
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"utterances": utterances,
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
return field_dict
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
44
|
+
from ..models.utterance import Utterance # noqa: PLC0415
|
|
45
|
+
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
utterances = []
|
|
48
|
+
_utterances = d.pop("utterances")
|
|
49
|
+
for utterances_item_data in _utterances:
|
|
50
|
+
utterances_item = Utterance.from_dict(utterances_item_data)
|
|
51
|
+
|
|
52
|
+
utterances.append(utterances_item)
|
|
53
|
+
|
|
54
|
+
transcript_language = cls(
|
|
55
|
+
utterances=utterances,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
transcript_language.additional_properties = d
|
|
59
|
+
return transcript_language
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def additional_keys(self) -> list[str]:
|
|
63
|
+
return list(self.additional_properties.keys())
|
|
64
|
+
|
|
65
|
+
def __getitem__(self, key: str) -> Any:
|
|
66
|
+
return self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
69
|
+
self.additional_properties[key] = value
|
|
70
|
+
|
|
71
|
+
def __delitem__(self, key: str) -> None:
|
|
72
|
+
del self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __contains__(self, key: str) -> bool:
|
|
75
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ..models.transcript_list_row import TranscriptListRow
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="TranscriptList")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class TranscriptList:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
transcripts (list[TranscriptListRow]):
|
|
21
|
+
next_cursor (None | str): An opaque token for the next page's cursor parameter, or null on the last page. This
|
|
22
|
+
API refuses a cursor it did not mint.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
transcripts: list[TranscriptListRow]
|
|
26
|
+
next_cursor: None | str
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
transcripts = []
|
|
31
|
+
for transcripts_item_data in self.transcripts:
|
|
32
|
+
transcripts_item = transcripts_item_data.to_dict()
|
|
33
|
+
transcripts.append(transcripts_item)
|
|
34
|
+
|
|
35
|
+
next_cursor: None | str
|
|
36
|
+
next_cursor = self.next_cursor
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"transcripts": transcripts,
|
|
43
|
+
"next_cursor": next_cursor,
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
from ..models.transcript_list_row import TranscriptListRow # noqa: PLC0415
|
|
52
|
+
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
transcripts = []
|
|
55
|
+
_transcripts = d.pop("transcripts")
|
|
56
|
+
for transcripts_item_data in _transcripts:
|
|
57
|
+
transcripts_item = TranscriptListRow.from_dict(transcripts_item_data)
|
|
58
|
+
|
|
59
|
+
transcripts.append(transcripts_item)
|
|
60
|
+
|
|
61
|
+
def _parse_next_cursor(data: object) -> None | str:
|
|
62
|
+
if data is None:
|
|
63
|
+
return data
|
|
64
|
+
return cast(None | str, data)
|
|
65
|
+
|
|
66
|
+
next_cursor = _parse_next_cursor(d.pop("next_cursor"))
|
|
67
|
+
|
|
68
|
+
transcript_list = cls(
|
|
69
|
+
transcripts=transcripts,
|
|
70
|
+
next_cursor=next_cursor,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
transcript_list.additional_properties = d
|
|
74
|
+
return transcript_list
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def additional_keys(self) -> list[str]:
|
|
78
|
+
return list(self.additional_properties.keys())
|
|
79
|
+
|
|
80
|
+
def __getitem__(self, key: str) -> Any:
|
|
81
|
+
return self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
84
|
+
self.additional_properties[key] = value
|
|
85
|
+
|
|
86
|
+
def __delitem__(self, key: str) -> None:
|
|
87
|
+
del self.additional_properties[key]
|
|
88
|
+
|
|
89
|
+
def __contains__(self, key: str) -> bool:
|
|
90
|
+
return key in self.additional_properties
|