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,17 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
OrgUsageReportGroupBy = Literal["client", "matter", "member"]
|
|
4
|
+
|
|
5
|
+
ORG_USAGE_REPORT_GROUP_BY_VALUES: set[OrgUsageReportGroupBy] = {
|
|
6
|
+
"client",
|
|
7
|
+
"matter",
|
|
8
|
+
"member",
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def check_org_usage_report_group_by(value: str) -> OrgUsageReportGroupBy:
|
|
13
|
+
if value in ORG_USAGE_REPORT_GROUP_BY_VALUES:
|
|
14
|
+
return value
|
|
15
|
+
raise TypeError(
|
|
16
|
+
f"Unexpected value {value!r}. Expected one of {ORG_USAGE_REPORT_GROUP_BY_VALUES!r}"
|
|
17
|
+
)
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
from ..models.org_usage_response_group_by import (
|
|
10
|
+
OrgUsageResponseGroupBy,
|
|
11
|
+
check_org_usage_response_group_by,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING:
|
|
15
|
+
from ..models.org_usage_row import OrgUsageRow
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
T = TypeVar("T", bound="OrgUsageResponse")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@_attrs_define
|
|
22
|
+
class OrgUsageResponse:
|
|
23
|
+
"""
|
|
24
|
+
Attributes:
|
|
25
|
+
rows (list[OrgUsageRow]):
|
|
26
|
+
from_ (int):
|
|
27
|
+
to (int):
|
|
28
|
+
group_by (OrgUsageResponseGroupBy):
|
|
29
|
+
rate_cents_per_hour (int):
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
rows: list[OrgUsageRow]
|
|
33
|
+
from_: int
|
|
34
|
+
to: int
|
|
35
|
+
group_by: OrgUsageResponseGroupBy
|
|
36
|
+
rate_cents_per_hour: int
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
rows = []
|
|
41
|
+
for rows_item_data in self.rows:
|
|
42
|
+
rows_item = rows_item_data.to_dict()
|
|
43
|
+
rows.append(rows_item)
|
|
44
|
+
|
|
45
|
+
from_ = self.from_
|
|
46
|
+
|
|
47
|
+
to = self.to
|
|
48
|
+
|
|
49
|
+
group_by: str = self.group_by
|
|
50
|
+
|
|
51
|
+
rate_cents_per_hour = self.rate_cents_per_hour
|
|
52
|
+
|
|
53
|
+
field_dict: dict[str, Any] = {}
|
|
54
|
+
field_dict.update(self.additional_properties)
|
|
55
|
+
field_dict.update(
|
|
56
|
+
{
|
|
57
|
+
"rows": rows,
|
|
58
|
+
"from": from_,
|
|
59
|
+
"to": to,
|
|
60
|
+
"group_by": group_by,
|
|
61
|
+
"rate_cents_per_hour": rate_cents_per_hour,
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return field_dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
69
|
+
from ..models.org_usage_row import OrgUsageRow # noqa: PLC0415
|
|
70
|
+
|
|
71
|
+
d = dict(src_dict)
|
|
72
|
+
rows = []
|
|
73
|
+
_rows = d.pop("rows")
|
|
74
|
+
for rows_item_data in _rows:
|
|
75
|
+
rows_item = OrgUsageRow.from_dict(rows_item_data)
|
|
76
|
+
|
|
77
|
+
rows.append(rows_item)
|
|
78
|
+
|
|
79
|
+
from_ = d.pop("from")
|
|
80
|
+
|
|
81
|
+
to = d.pop("to")
|
|
82
|
+
|
|
83
|
+
group_by = check_org_usage_response_group_by(d.pop("group_by"))
|
|
84
|
+
|
|
85
|
+
rate_cents_per_hour = d.pop("rate_cents_per_hour")
|
|
86
|
+
|
|
87
|
+
org_usage_response = cls(
|
|
88
|
+
rows=rows,
|
|
89
|
+
from_=from_,
|
|
90
|
+
to=to,
|
|
91
|
+
group_by=group_by,
|
|
92
|
+
rate_cents_per_hour=rate_cents_per_hour,
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
org_usage_response.additional_properties = d
|
|
96
|
+
return org_usage_response
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
def additional_keys(self) -> list[str]:
|
|
100
|
+
return list(self.additional_properties.keys())
|
|
101
|
+
|
|
102
|
+
def __getitem__(self, key: str) -> Any:
|
|
103
|
+
return self.additional_properties[key]
|
|
104
|
+
|
|
105
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
106
|
+
self.additional_properties[key] = value
|
|
107
|
+
|
|
108
|
+
def __delitem__(self, key: str) -> None:
|
|
109
|
+
del self.additional_properties[key]
|
|
110
|
+
|
|
111
|
+
def __contains__(self, key: str) -> bool:
|
|
112
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
OrgUsageResponseGroupBy = Literal["client", "matter", "member"]
|
|
4
|
+
|
|
5
|
+
ORG_USAGE_RESPONSE_GROUP_BY_VALUES: set[OrgUsageResponseGroupBy] = {
|
|
6
|
+
"client",
|
|
7
|
+
"matter",
|
|
8
|
+
"member",
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def check_org_usage_response_group_by(value: str) -> OrgUsageResponseGroupBy:
|
|
13
|
+
if value in ORG_USAGE_RESPONSE_GROUP_BY_VALUES:
|
|
14
|
+
return value
|
|
15
|
+
raise TypeError(
|
|
16
|
+
f"Unexpected value {value!r}. Expected one of {ORG_USAGE_RESPONSE_GROUP_BY_VALUES!r}"
|
|
17
|
+
)
|
|
@@ -0,0 +1,86 @@
|
|
|
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="OrgUsageRow")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class OrgUsageRow:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
key (str): The member email, matter code or client code this row aggregates, or "(none)" for an unfiled job or a
|
|
17
|
+
purged member.
|
|
18
|
+
jobs (int):
|
|
19
|
+
billed_seconds (int):
|
|
20
|
+
cost_cents (int): billed_seconds priced at the workspace's rebill_rate_cents_per_hour, rounded up to the cent.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
key: str
|
|
24
|
+
jobs: int
|
|
25
|
+
billed_seconds: int
|
|
26
|
+
cost_cents: int
|
|
27
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
28
|
+
|
|
29
|
+
def to_dict(self) -> dict[str, Any]:
|
|
30
|
+
key = self.key
|
|
31
|
+
|
|
32
|
+
jobs = self.jobs
|
|
33
|
+
|
|
34
|
+
billed_seconds = self.billed_seconds
|
|
35
|
+
|
|
36
|
+
cost_cents = self.cost_cents
|
|
37
|
+
|
|
38
|
+
field_dict: dict[str, Any] = {}
|
|
39
|
+
field_dict.update(self.additional_properties)
|
|
40
|
+
field_dict.update(
|
|
41
|
+
{
|
|
42
|
+
"key": key,
|
|
43
|
+
"jobs": jobs,
|
|
44
|
+
"billed_seconds": billed_seconds,
|
|
45
|
+
"cost_cents": cost_cents,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return field_dict
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
53
|
+
d = dict(src_dict)
|
|
54
|
+
key = d.pop("key")
|
|
55
|
+
|
|
56
|
+
jobs = d.pop("jobs")
|
|
57
|
+
|
|
58
|
+
billed_seconds = d.pop("billed_seconds")
|
|
59
|
+
|
|
60
|
+
cost_cents = d.pop("cost_cents")
|
|
61
|
+
|
|
62
|
+
org_usage_row = cls(
|
|
63
|
+
key=key,
|
|
64
|
+
jobs=jobs,
|
|
65
|
+
billed_seconds=billed_seconds,
|
|
66
|
+
cost_cents=cost_cents,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
org_usage_row.additional_properties = d
|
|
70
|
+
return org_usage_row
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def additional_keys(self) -> list[str]:
|
|
74
|
+
return list(self.additional_properties.keys())
|
|
75
|
+
|
|
76
|
+
def __getitem__(self, key: str) -> Any:
|
|
77
|
+
return self.additional_properties[key]
|
|
78
|
+
|
|
79
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
80
|
+
self.additional_properties[key] = value
|
|
81
|
+
|
|
82
|
+
def __delitem__(self, key: str) -> None:
|
|
83
|
+
del self.additional_properties[key]
|
|
84
|
+
|
|
85
|
+
def __contains__(self, key: str) -> bool:
|
|
86
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="Pack")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class Pack:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
id (str):
|
|
19
|
+
amount (int): The price in minor units of currency, already localized for the account's country.
|
|
20
|
+
currency (str):
|
|
21
|
+
seconds (int):
|
|
22
|
+
referral_bonus_seconds (int): Extra seconds this purchase would add from an available referral buyer bonus. Zero
|
|
23
|
+
when none is available.
|
|
24
|
+
available (bool | Unset): Whether the caller's account may buy this pack right now. Present for agent accounts
|
|
25
|
+
only: an agent's pack tier gates the larger packs until enough prior payments have settled past the dispute
|
|
26
|
+
window. Absent on every human caller's response, whose packs are all always available.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
id: str
|
|
30
|
+
amount: int
|
|
31
|
+
currency: str
|
|
32
|
+
seconds: int
|
|
33
|
+
referral_bonus_seconds: int
|
|
34
|
+
available: bool | Unset = UNSET
|
|
35
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
id = self.id
|
|
39
|
+
|
|
40
|
+
amount = self.amount
|
|
41
|
+
|
|
42
|
+
currency = self.currency
|
|
43
|
+
|
|
44
|
+
seconds = self.seconds
|
|
45
|
+
|
|
46
|
+
referral_bonus_seconds = self.referral_bonus_seconds
|
|
47
|
+
|
|
48
|
+
available = self.available
|
|
49
|
+
|
|
50
|
+
field_dict: dict[str, Any] = {}
|
|
51
|
+
field_dict.update(self.additional_properties)
|
|
52
|
+
field_dict.update(
|
|
53
|
+
{
|
|
54
|
+
"id": id,
|
|
55
|
+
"amount": amount,
|
|
56
|
+
"currency": currency,
|
|
57
|
+
"seconds": seconds,
|
|
58
|
+
"referral_bonus_seconds": referral_bonus_seconds,
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
if available is not UNSET:
|
|
62
|
+
field_dict["available"] = available
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
|
+
d = dict(src_dict)
|
|
69
|
+
id = d.pop("id")
|
|
70
|
+
|
|
71
|
+
amount = d.pop("amount")
|
|
72
|
+
|
|
73
|
+
currency = d.pop("currency")
|
|
74
|
+
|
|
75
|
+
seconds = d.pop("seconds")
|
|
76
|
+
|
|
77
|
+
referral_bonus_seconds = d.pop("referral_bonus_seconds")
|
|
78
|
+
|
|
79
|
+
available = d.pop("available", UNSET)
|
|
80
|
+
|
|
81
|
+
pack = cls(
|
|
82
|
+
id=id,
|
|
83
|
+
amount=amount,
|
|
84
|
+
currency=currency,
|
|
85
|
+
seconds=seconds,
|
|
86
|
+
referral_bonus_seconds=referral_bonus_seconds,
|
|
87
|
+
available=available,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
pack.additional_properties = d
|
|
91
|
+
return pack
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def additional_keys(self) -> list[str]:
|
|
95
|
+
return list(self.additional_properties.keys())
|
|
96
|
+
|
|
97
|
+
def __getitem__(self, key: str) -> Any:
|
|
98
|
+
return self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
101
|
+
self.additional_properties[key] = value
|
|
102
|
+
|
|
103
|
+
def __delitem__(self, key: str) -> None:
|
|
104
|
+
del self.additional_properties[key]
|
|
105
|
+
|
|
106
|
+
def __contains__(self, key: str) -> bool:
|
|
107
|
+
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.pack import Pack
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PacksResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PacksResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
packs (list[Pack]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
packs: list[Pack]
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
packs = []
|
|
28
|
+
for packs_item_data in self.packs:
|
|
29
|
+
packs_item = packs_item_data.to_dict()
|
|
30
|
+
packs.append(packs_item)
|
|
31
|
+
|
|
32
|
+
field_dict: dict[str, Any] = {}
|
|
33
|
+
field_dict.update(self.additional_properties)
|
|
34
|
+
field_dict.update(
|
|
35
|
+
{
|
|
36
|
+
"packs": packs,
|
|
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.pack import Pack # noqa: PLC0415
|
|
45
|
+
|
|
46
|
+
d = dict(src_dict)
|
|
47
|
+
packs = []
|
|
48
|
+
_packs = d.pop("packs")
|
|
49
|
+
for packs_item_data in _packs:
|
|
50
|
+
packs_item = Pack.from_dict(packs_item_data)
|
|
51
|
+
|
|
52
|
+
packs.append(packs_item)
|
|
53
|
+
|
|
54
|
+
packs_response = cls(
|
|
55
|
+
packs=packs,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
packs_response.additional_properties = d
|
|
59
|
+
return packs_response
|
|
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,102 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PatchOrgMemberBody")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchOrgMemberBody:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
is_admin (bool | Unset): Grant or revoke the admin right. Omit to leave unchanged.
|
|
19
|
+
is_billing (bool | Unset): Grant or revoke the billing right. Omit to leave unchanged.
|
|
20
|
+
is_reviewer (bool | Unset): Grant or revoke the reviewer right. Omit to leave unchanged.
|
|
21
|
+
monthly_cap_seconds (int | None | Unset): The member's monthly spend cap in seconds against the pool, or null to
|
|
22
|
+
clear it. Omit to leave unchanged.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
is_admin: bool | Unset = UNSET
|
|
26
|
+
is_billing: bool | Unset = UNSET
|
|
27
|
+
is_reviewer: bool | Unset = UNSET
|
|
28
|
+
monthly_cap_seconds: int | None | Unset = UNSET
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
is_admin = self.is_admin
|
|
33
|
+
|
|
34
|
+
is_billing = self.is_billing
|
|
35
|
+
|
|
36
|
+
is_reviewer = self.is_reviewer
|
|
37
|
+
|
|
38
|
+
monthly_cap_seconds: int | None | Unset
|
|
39
|
+
if isinstance(self.monthly_cap_seconds, Unset):
|
|
40
|
+
monthly_cap_seconds = UNSET
|
|
41
|
+
else:
|
|
42
|
+
monthly_cap_seconds = self.monthly_cap_seconds
|
|
43
|
+
|
|
44
|
+
field_dict: dict[str, Any] = {}
|
|
45
|
+
field_dict.update(self.additional_properties)
|
|
46
|
+
field_dict.update({})
|
|
47
|
+
if is_admin is not UNSET:
|
|
48
|
+
field_dict["is_admin"] = is_admin
|
|
49
|
+
if is_billing is not UNSET:
|
|
50
|
+
field_dict["is_billing"] = is_billing
|
|
51
|
+
if is_reviewer is not UNSET:
|
|
52
|
+
field_dict["is_reviewer"] = is_reviewer
|
|
53
|
+
if monthly_cap_seconds is not UNSET:
|
|
54
|
+
field_dict["monthly_cap_seconds"] = monthly_cap_seconds
|
|
55
|
+
|
|
56
|
+
return field_dict
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
60
|
+
d = dict(src_dict)
|
|
61
|
+
is_admin = d.pop("is_admin", UNSET)
|
|
62
|
+
|
|
63
|
+
is_billing = d.pop("is_billing", UNSET)
|
|
64
|
+
|
|
65
|
+
is_reviewer = d.pop("is_reviewer", UNSET)
|
|
66
|
+
|
|
67
|
+
def _parse_monthly_cap_seconds(data: object) -> int | None | Unset:
|
|
68
|
+
if data is None:
|
|
69
|
+
return data
|
|
70
|
+
if isinstance(data, Unset):
|
|
71
|
+
return data
|
|
72
|
+
return cast(int | None | Unset, data)
|
|
73
|
+
|
|
74
|
+
monthly_cap_seconds = _parse_monthly_cap_seconds(
|
|
75
|
+
d.pop("monthly_cap_seconds", UNSET)
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
patch_org_member_body = cls(
|
|
79
|
+
is_admin=is_admin,
|
|
80
|
+
is_billing=is_billing,
|
|
81
|
+
is_reviewer=is_reviewer,
|
|
82
|
+
monthly_cap_seconds=monthly_cap_seconds,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
patch_org_member_body.additional_properties = d
|
|
86
|
+
return patch_org_member_body
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def additional_keys(self) -> list[str]:
|
|
90
|
+
return list(self.additional_properties.keys())
|
|
91
|
+
|
|
92
|
+
def __getitem__(self, key: str) -> Any:
|
|
93
|
+
return self.additional_properties[key]
|
|
94
|
+
|
|
95
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
96
|
+
self.additional_properties[key] = value
|
|
97
|
+
|
|
98
|
+
def __delitem__(self, key: str) -> None:
|
|
99
|
+
del self.additional_properties[key]
|
|
100
|
+
|
|
101
|
+
def __contains__(self, key: str) -> bool:
|
|
102
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
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="PatchOrgMemberResponse200")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PatchOrgMemberResponse200:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
ok (bool):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
ok: bool
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
ok = self.ok
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"ok": ok,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
ok = d.pop("ok")
|
|
39
|
+
|
|
40
|
+
patch_org_member_response_200 = cls(
|
|
41
|
+
ok=ok,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
patch_org_member_response_200.additional_properties = d
|
|
45
|
+
return patch_org_member_response_200
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,61 @@
|
|
|
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="PlaceTranscriptHoldResponse200")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PlaceTranscriptHoldResponse200:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
ok (bool):
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
ok: bool
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
ok = self.ok
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"ok": ok,
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return field_dict
|
|
34
|
+
|
|
35
|
+
@classmethod
|
|
36
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
37
|
+
d = dict(src_dict)
|
|
38
|
+
ok = d.pop("ok")
|
|
39
|
+
|
|
40
|
+
place_transcript_hold_response_200 = cls(
|
|
41
|
+
ok=ok,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
place_transcript_hold_response_200.additional_properties = d
|
|
45
|
+
return place_transcript_hold_response_200
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def additional_keys(self) -> list[str]:
|
|
49
|
+
return list(self.additional_properties.keys())
|
|
50
|
+
|
|
51
|
+
def __getitem__(self, key: str) -> Any:
|
|
52
|
+
return self.additional_properties[key]
|
|
53
|
+
|
|
54
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
55
|
+
self.additional_properties[key] = value
|
|
56
|
+
|
|
57
|
+
def __delitem__(self, key: str) -> None:
|
|
58
|
+
del self.additional_properties[key]
|
|
59
|
+
|
|
60
|
+
def __contains__(self, key: str) -> bool:
|
|
61
|
+
return key in self.additional_properties
|