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,482 @@
|
|
|
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
|
+
T = TypeVar("T", bound="OrgSummaryResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class OrgSummaryResponse:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
id (str):
|
|
17
|
+
name (str):
|
|
18
|
+
role (str): The caller's own role in this organization: admin or member.
|
|
19
|
+
plan (str):
|
|
20
|
+
plan_term (None | str): annual or monthly, or null if the org has never had a plan.
|
|
21
|
+
plan_active_until (int | None): Unix seconds the current term runs until, or null before the org's first plan is
|
|
22
|
+
paid.
|
|
23
|
+
plan_active (bool): Whether the term itself is still running (ignores grace).
|
|
24
|
+
plan_state (str): pending, active, grace, or frozen.
|
|
25
|
+
grace_until (int | None):
|
|
26
|
+
seats_limit (int | None):
|
|
27
|
+
seats_used (int):
|
|
28
|
+
seats_pending (int): Seats held by pending, unexpired invites.
|
|
29
|
+
balance_seconds (int): The pool's raw balance. Can be negative after a void clawback or a negative pool
|
|
30
|
+
adjustment.
|
|
31
|
+
spendable_seconds (int): balance_seconds floored at zero, and zeroed outright when the org is outside its
|
|
32
|
+
funding window (frozen or lapsed past grace).
|
|
33
|
+
pool_expires_at (int | None): Unix seconds the pool's own rolling 365-day expiry falls at, re-anchored on every
|
|
34
|
+
credit and every settle. Null if the pool has never held a positive balance.
|
|
35
|
+
default_retention_days (int | None):
|
|
36
|
+
max_retention_days (int | None):
|
|
37
|
+
billing_email (None | str): The workspace's billing contact. Null unless the caller is an admin or holds the
|
|
38
|
+
billing right.
|
|
39
|
+
billing_details (None | str): Free-text billing details shown on invoices. Null when none are set, and always
|
|
40
|
+
null unless the caller is an admin or holds the billing right.
|
|
41
|
+
tax_id (None | str): The buyer's self-declared tax id, shown on invoices. Not validated against any registry.
|
|
42
|
+
Null unless the caller is an admin or holds the billing right.
|
|
43
|
+
tax_id_label (None | str): The buyer's own word for tax_id, e.g. VAT, EIN, ABN. Null unless the caller is an
|
|
44
|
+
admin or holds the billing right.
|
|
45
|
+
created_at (int):
|
|
46
|
+
auto_renew (bool):
|
|
47
|
+
renewal_failures (int):
|
|
48
|
+
renewal_capped (bool): Whether renewal_failures has reached the cap the daily renewal lane stops retrying at.
|
|
49
|
+
renewal_source_stored (bool): Whether a saved card is on file for the renewal lane to charge. Never the payment
|
|
50
|
+
method id itself.
|
|
51
|
+
renewal_user_id (None | str): The id of the member whose saved card the renewal lane charges. Visible to admins
|
|
52
|
+
only; a non-admin member always sees null here regardless of whether a source is stored (see
|
|
53
|
+
renewal_source_stored).
|
|
54
|
+
member_cap_seconds (int | None): The workspace-wide default per-member monthly spending cap against the pool.
|
|
55
|
+
Null means no org-wide default.
|
|
56
|
+
caller_effective_cap_seconds (int | None): The signed-in caller's own effective monthly cap: their personal
|
|
57
|
+
override if one is set, else member_cap_seconds, else null for no cap. Also null when the caller is outside the
|
|
58
|
+
org's current funding window.
|
|
59
|
+
caller_spent_seconds_this_month (int | None): The signed-in caller's own month-to-date spend against the pool.
|
|
60
|
+
Null under the same condition caller_effective_cap_seconds is null.
|
|
61
|
+
is_owner (bool): Whether the signed-in caller is the workspace's single transferable owner (distinct from
|
|
62
|
+
is_admin).
|
|
63
|
+
owner_user_id (str): The id of the workspace's transferable owner, visible to every member. Falls back to the
|
|
64
|
+
org's creator if owner_user_id was never explicitly set on the row.
|
|
65
|
+
custody (str): private or firm. private: transcripts belong to the member, no reviewer can open them. firm: a
|
|
66
|
+
transcript created while a member belongs to the workspace is workspace property; is_reviewer members can open
|
|
67
|
+
it.
|
|
68
|
+
custody_switch_at (int | None): Unix seconds the pending private-to-firm switch takes effect, or null when no
|
|
69
|
+
switch is scheduled. Only ever set while custody is still private.
|
|
70
|
+
retention_reclamp_at (int | None): Unix seconds the currently armed retention re-clamp takes effect, or null
|
|
71
|
+
when none is scheduled. Set only while a tightened max_retention_days still has existing transcripts left to
|
|
72
|
+
pull in.
|
|
73
|
+
retention_reclamp_days (int | None): The retention day count the armed re-clamp will apply, or null when none is
|
|
74
|
+
scheduled. Mirrors max_retention_days at the moment the re-clamp was armed, not necessarily the current value.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
id: str
|
|
78
|
+
name: str
|
|
79
|
+
role: str
|
|
80
|
+
plan: str
|
|
81
|
+
plan_term: None | str
|
|
82
|
+
plan_active_until: int | None
|
|
83
|
+
plan_active: bool
|
|
84
|
+
plan_state: str
|
|
85
|
+
grace_until: int | None
|
|
86
|
+
seats_limit: int | None
|
|
87
|
+
seats_used: int
|
|
88
|
+
seats_pending: int
|
|
89
|
+
balance_seconds: int
|
|
90
|
+
spendable_seconds: int
|
|
91
|
+
pool_expires_at: int | None
|
|
92
|
+
default_retention_days: int | None
|
|
93
|
+
max_retention_days: int | None
|
|
94
|
+
billing_email: None | str
|
|
95
|
+
billing_details: None | str
|
|
96
|
+
tax_id: None | str
|
|
97
|
+
tax_id_label: None | str
|
|
98
|
+
created_at: int
|
|
99
|
+
auto_renew: bool
|
|
100
|
+
renewal_failures: int
|
|
101
|
+
renewal_capped: bool
|
|
102
|
+
renewal_source_stored: bool
|
|
103
|
+
renewal_user_id: None | str
|
|
104
|
+
member_cap_seconds: int | None
|
|
105
|
+
caller_effective_cap_seconds: int | None
|
|
106
|
+
caller_spent_seconds_this_month: int | None
|
|
107
|
+
is_owner: bool
|
|
108
|
+
owner_user_id: str
|
|
109
|
+
custody: str
|
|
110
|
+
custody_switch_at: int | None
|
|
111
|
+
retention_reclamp_at: int | None
|
|
112
|
+
retention_reclamp_days: int | None
|
|
113
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
114
|
+
|
|
115
|
+
def to_dict(self) -> dict[str, Any]:
|
|
116
|
+
id = self.id
|
|
117
|
+
|
|
118
|
+
name = self.name
|
|
119
|
+
|
|
120
|
+
role = self.role
|
|
121
|
+
|
|
122
|
+
plan = self.plan
|
|
123
|
+
|
|
124
|
+
plan_term: None | str
|
|
125
|
+
plan_term = self.plan_term
|
|
126
|
+
|
|
127
|
+
plan_active_until: int | None
|
|
128
|
+
plan_active_until = self.plan_active_until
|
|
129
|
+
|
|
130
|
+
plan_active = self.plan_active
|
|
131
|
+
|
|
132
|
+
plan_state = self.plan_state
|
|
133
|
+
|
|
134
|
+
grace_until: int | None
|
|
135
|
+
grace_until = self.grace_until
|
|
136
|
+
|
|
137
|
+
seats_limit: int | None
|
|
138
|
+
seats_limit = self.seats_limit
|
|
139
|
+
|
|
140
|
+
seats_used = self.seats_used
|
|
141
|
+
|
|
142
|
+
seats_pending = self.seats_pending
|
|
143
|
+
|
|
144
|
+
balance_seconds = self.balance_seconds
|
|
145
|
+
|
|
146
|
+
spendable_seconds = self.spendable_seconds
|
|
147
|
+
|
|
148
|
+
pool_expires_at: int | None
|
|
149
|
+
pool_expires_at = self.pool_expires_at
|
|
150
|
+
|
|
151
|
+
default_retention_days: int | None
|
|
152
|
+
default_retention_days = self.default_retention_days
|
|
153
|
+
|
|
154
|
+
max_retention_days: int | None
|
|
155
|
+
max_retention_days = self.max_retention_days
|
|
156
|
+
|
|
157
|
+
billing_email: None | str
|
|
158
|
+
billing_email = self.billing_email
|
|
159
|
+
|
|
160
|
+
billing_details: None | str
|
|
161
|
+
billing_details = self.billing_details
|
|
162
|
+
|
|
163
|
+
tax_id: None | str
|
|
164
|
+
tax_id = self.tax_id
|
|
165
|
+
|
|
166
|
+
tax_id_label: None | str
|
|
167
|
+
tax_id_label = self.tax_id_label
|
|
168
|
+
|
|
169
|
+
created_at = self.created_at
|
|
170
|
+
|
|
171
|
+
auto_renew = self.auto_renew
|
|
172
|
+
|
|
173
|
+
renewal_failures = self.renewal_failures
|
|
174
|
+
|
|
175
|
+
renewal_capped = self.renewal_capped
|
|
176
|
+
|
|
177
|
+
renewal_source_stored = self.renewal_source_stored
|
|
178
|
+
|
|
179
|
+
renewal_user_id: None | str
|
|
180
|
+
renewal_user_id = self.renewal_user_id
|
|
181
|
+
|
|
182
|
+
member_cap_seconds: int | None
|
|
183
|
+
member_cap_seconds = self.member_cap_seconds
|
|
184
|
+
|
|
185
|
+
caller_effective_cap_seconds: int | None
|
|
186
|
+
caller_effective_cap_seconds = self.caller_effective_cap_seconds
|
|
187
|
+
|
|
188
|
+
caller_spent_seconds_this_month: int | None
|
|
189
|
+
caller_spent_seconds_this_month = self.caller_spent_seconds_this_month
|
|
190
|
+
|
|
191
|
+
is_owner = self.is_owner
|
|
192
|
+
|
|
193
|
+
owner_user_id = self.owner_user_id
|
|
194
|
+
|
|
195
|
+
custody = self.custody
|
|
196
|
+
|
|
197
|
+
custody_switch_at: int | None
|
|
198
|
+
custody_switch_at = self.custody_switch_at
|
|
199
|
+
|
|
200
|
+
retention_reclamp_at: int | None
|
|
201
|
+
retention_reclamp_at = self.retention_reclamp_at
|
|
202
|
+
|
|
203
|
+
retention_reclamp_days: int | None
|
|
204
|
+
retention_reclamp_days = self.retention_reclamp_days
|
|
205
|
+
|
|
206
|
+
field_dict: dict[str, Any] = {}
|
|
207
|
+
field_dict.update(self.additional_properties)
|
|
208
|
+
field_dict.update(
|
|
209
|
+
{
|
|
210
|
+
"id": id,
|
|
211
|
+
"name": name,
|
|
212
|
+
"role": role,
|
|
213
|
+
"plan": plan,
|
|
214
|
+
"plan_term": plan_term,
|
|
215
|
+
"plan_active_until": plan_active_until,
|
|
216
|
+
"plan_active": plan_active,
|
|
217
|
+
"plan_state": plan_state,
|
|
218
|
+
"grace_until": grace_until,
|
|
219
|
+
"seats_limit": seats_limit,
|
|
220
|
+
"seats_used": seats_used,
|
|
221
|
+
"seats_pending": seats_pending,
|
|
222
|
+
"balance_seconds": balance_seconds,
|
|
223
|
+
"spendable_seconds": spendable_seconds,
|
|
224
|
+
"pool_expires_at": pool_expires_at,
|
|
225
|
+
"default_retention_days": default_retention_days,
|
|
226
|
+
"max_retention_days": max_retention_days,
|
|
227
|
+
"billing_email": billing_email,
|
|
228
|
+
"billing_details": billing_details,
|
|
229
|
+
"tax_id": tax_id,
|
|
230
|
+
"tax_id_label": tax_id_label,
|
|
231
|
+
"created_at": created_at,
|
|
232
|
+
"auto_renew": auto_renew,
|
|
233
|
+
"renewal_failures": renewal_failures,
|
|
234
|
+
"renewal_capped": renewal_capped,
|
|
235
|
+
"renewal_source_stored": renewal_source_stored,
|
|
236
|
+
"renewal_user_id": renewal_user_id,
|
|
237
|
+
"member_cap_seconds": member_cap_seconds,
|
|
238
|
+
"caller_effective_cap_seconds": caller_effective_cap_seconds,
|
|
239
|
+
"caller_spent_seconds_this_month": caller_spent_seconds_this_month,
|
|
240
|
+
"is_owner": is_owner,
|
|
241
|
+
"owner_user_id": owner_user_id,
|
|
242
|
+
"custody": custody,
|
|
243
|
+
"custody_switch_at": custody_switch_at,
|
|
244
|
+
"retention_reclamp_at": retention_reclamp_at,
|
|
245
|
+
"retention_reclamp_days": retention_reclamp_days,
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
|
|
249
|
+
return field_dict
|
|
250
|
+
|
|
251
|
+
@classmethod
|
|
252
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
253
|
+
d = dict(src_dict)
|
|
254
|
+
id = d.pop("id")
|
|
255
|
+
|
|
256
|
+
name = d.pop("name")
|
|
257
|
+
|
|
258
|
+
role = d.pop("role")
|
|
259
|
+
|
|
260
|
+
plan = d.pop("plan")
|
|
261
|
+
|
|
262
|
+
def _parse_plan_term(data: object) -> None | str:
|
|
263
|
+
if data is None:
|
|
264
|
+
return data
|
|
265
|
+
return cast(None | str, data)
|
|
266
|
+
|
|
267
|
+
plan_term = _parse_plan_term(d.pop("plan_term"))
|
|
268
|
+
|
|
269
|
+
def _parse_plan_active_until(data: object) -> int | None:
|
|
270
|
+
if data is None:
|
|
271
|
+
return data
|
|
272
|
+
return cast(int | None, data)
|
|
273
|
+
|
|
274
|
+
plan_active_until = _parse_plan_active_until(d.pop("plan_active_until"))
|
|
275
|
+
|
|
276
|
+
plan_active = d.pop("plan_active")
|
|
277
|
+
|
|
278
|
+
plan_state = d.pop("plan_state")
|
|
279
|
+
|
|
280
|
+
def _parse_grace_until(data: object) -> int | None:
|
|
281
|
+
if data is None:
|
|
282
|
+
return data
|
|
283
|
+
return cast(int | None, data)
|
|
284
|
+
|
|
285
|
+
grace_until = _parse_grace_until(d.pop("grace_until"))
|
|
286
|
+
|
|
287
|
+
def _parse_seats_limit(data: object) -> int | None:
|
|
288
|
+
if data is None:
|
|
289
|
+
return data
|
|
290
|
+
return cast(int | None, data)
|
|
291
|
+
|
|
292
|
+
seats_limit = _parse_seats_limit(d.pop("seats_limit"))
|
|
293
|
+
|
|
294
|
+
seats_used = d.pop("seats_used")
|
|
295
|
+
|
|
296
|
+
seats_pending = d.pop("seats_pending")
|
|
297
|
+
|
|
298
|
+
balance_seconds = d.pop("balance_seconds")
|
|
299
|
+
|
|
300
|
+
spendable_seconds = d.pop("spendable_seconds")
|
|
301
|
+
|
|
302
|
+
def _parse_pool_expires_at(data: object) -> int | None:
|
|
303
|
+
if data is None:
|
|
304
|
+
return data
|
|
305
|
+
return cast(int | None, data)
|
|
306
|
+
|
|
307
|
+
pool_expires_at = _parse_pool_expires_at(d.pop("pool_expires_at"))
|
|
308
|
+
|
|
309
|
+
def _parse_default_retention_days(data: object) -> int | None:
|
|
310
|
+
if data is None:
|
|
311
|
+
return data
|
|
312
|
+
return cast(int | None, data)
|
|
313
|
+
|
|
314
|
+
default_retention_days = _parse_default_retention_days(
|
|
315
|
+
d.pop("default_retention_days")
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
def _parse_max_retention_days(data: object) -> int | None:
|
|
319
|
+
if data is None:
|
|
320
|
+
return data
|
|
321
|
+
return cast(int | None, data)
|
|
322
|
+
|
|
323
|
+
max_retention_days = _parse_max_retention_days(d.pop("max_retention_days"))
|
|
324
|
+
|
|
325
|
+
def _parse_billing_email(data: object) -> None | str:
|
|
326
|
+
if data is None:
|
|
327
|
+
return data
|
|
328
|
+
return cast(None | str, data)
|
|
329
|
+
|
|
330
|
+
billing_email = _parse_billing_email(d.pop("billing_email"))
|
|
331
|
+
|
|
332
|
+
def _parse_billing_details(data: object) -> None | str:
|
|
333
|
+
if data is None:
|
|
334
|
+
return data
|
|
335
|
+
return cast(None | str, data)
|
|
336
|
+
|
|
337
|
+
billing_details = _parse_billing_details(d.pop("billing_details"))
|
|
338
|
+
|
|
339
|
+
def _parse_tax_id(data: object) -> None | str:
|
|
340
|
+
if data is None:
|
|
341
|
+
return data
|
|
342
|
+
return cast(None | str, data)
|
|
343
|
+
|
|
344
|
+
tax_id = _parse_tax_id(d.pop("tax_id"))
|
|
345
|
+
|
|
346
|
+
def _parse_tax_id_label(data: object) -> None | str:
|
|
347
|
+
if data is None:
|
|
348
|
+
return data
|
|
349
|
+
return cast(None | str, data)
|
|
350
|
+
|
|
351
|
+
tax_id_label = _parse_tax_id_label(d.pop("tax_id_label"))
|
|
352
|
+
|
|
353
|
+
created_at = d.pop("created_at")
|
|
354
|
+
|
|
355
|
+
auto_renew = d.pop("auto_renew")
|
|
356
|
+
|
|
357
|
+
renewal_failures = d.pop("renewal_failures")
|
|
358
|
+
|
|
359
|
+
renewal_capped = d.pop("renewal_capped")
|
|
360
|
+
|
|
361
|
+
renewal_source_stored = d.pop("renewal_source_stored")
|
|
362
|
+
|
|
363
|
+
def _parse_renewal_user_id(data: object) -> None | str:
|
|
364
|
+
if data is None:
|
|
365
|
+
return data
|
|
366
|
+
return cast(None | str, data)
|
|
367
|
+
|
|
368
|
+
renewal_user_id = _parse_renewal_user_id(d.pop("renewal_user_id"))
|
|
369
|
+
|
|
370
|
+
def _parse_member_cap_seconds(data: object) -> int | None:
|
|
371
|
+
if data is None:
|
|
372
|
+
return data
|
|
373
|
+
return cast(int | None, data)
|
|
374
|
+
|
|
375
|
+
member_cap_seconds = _parse_member_cap_seconds(d.pop("member_cap_seconds"))
|
|
376
|
+
|
|
377
|
+
def _parse_caller_effective_cap_seconds(data: object) -> int | None:
|
|
378
|
+
if data is None:
|
|
379
|
+
return data
|
|
380
|
+
return cast(int | None, data)
|
|
381
|
+
|
|
382
|
+
caller_effective_cap_seconds = _parse_caller_effective_cap_seconds(
|
|
383
|
+
d.pop("caller_effective_cap_seconds")
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
def _parse_caller_spent_seconds_this_month(data: object) -> int | None:
|
|
387
|
+
if data is None:
|
|
388
|
+
return data
|
|
389
|
+
return cast(int | None, data)
|
|
390
|
+
|
|
391
|
+
caller_spent_seconds_this_month = _parse_caller_spent_seconds_this_month(
|
|
392
|
+
d.pop("caller_spent_seconds_this_month")
|
|
393
|
+
)
|
|
394
|
+
|
|
395
|
+
is_owner = d.pop("is_owner")
|
|
396
|
+
|
|
397
|
+
owner_user_id = d.pop("owner_user_id")
|
|
398
|
+
|
|
399
|
+
custody = d.pop("custody")
|
|
400
|
+
|
|
401
|
+
def _parse_custody_switch_at(data: object) -> int | None:
|
|
402
|
+
if data is None:
|
|
403
|
+
return data
|
|
404
|
+
return cast(int | None, data)
|
|
405
|
+
|
|
406
|
+
custody_switch_at = _parse_custody_switch_at(d.pop("custody_switch_at"))
|
|
407
|
+
|
|
408
|
+
def _parse_retention_reclamp_at(data: object) -> int | None:
|
|
409
|
+
if data is None:
|
|
410
|
+
return data
|
|
411
|
+
return cast(int | None, data)
|
|
412
|
+
|
|
413
|
+
retention_reclamp_at = _parse_retention_reclamp_at(
|
|
414
|
+
d.pop("retention_reclamp_at")
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
def _parse_retention_reclamp_days(data: object) -> int | None:
|
|
418
|
+
if data is None:
|
|
419
|
+
return data
|
|
420
|
+
return cast(int | None, data)
|
|
421
|
+
|
|
422
|
+
retention_reclamp_days = _parse_retention_reclamp_days(
|
|
423
|
+
d.pop("retention_reclamp_days")
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
org_summary_response = cls(
|
|
427
|
+
id=id,
|
|
428
|
+
name=name,
|
|
429
|
+
role=role,
|
|
430
|
+
plan=plan,
|
|
431
|
+
plan_term=plan_term,
|
|
432
|
+
plan_active_until=plan_active_until,
|
|
433
|
+
plan_active=plan_active,
|
|
434
|
+
plan_state=plan_state,
|
|
435
|
+
grace_until=grace_until,
|
|
436
|
+
seats_limit=seats_limit,
|
|
437
|
+
seats_used=seats_used,
|
|
438
|
+
seats_pending=seats_pending,
|
|
439
|
+
balance_seconds=balance_seconds,
|
|
440
|
+
spendable_seconds=spendable_seconds,
|
|
441
|
+
pool_expires_at=pool_expires_at,
|
|
442
|
+
default_retention_days=default_retention_days,
|
|
443
|
+
max_retention_days=max_retention_days,
|
|
444
|
+
billing_email=billing_email,
|
|
445
|
+
billing_details=billing_details,
|
|
446
|
+
tax_id=tax_id,
|
|
447
|
+
tax_id_label=tax_id_label,
|
|
448
|
+
created_at=created_at,
|
|
449
|
+
auto_renew=auto_renew,
|
|
450
|
+
renewal_failures=renewal_failures,
|
|
451
|
+
renewal_capped=renewal_capped,
|
|
452
|
+
renewal_source_stored=renewal_source_stored,
|
|
453
|
+
renewal_user_id=renewal_user_id,
|
|
454
|
+
member_cap_seconds=member_cap_seconds,
|
|
455
|
+
caller_effective_cap_seconds=caller_effective_cap_seconds,
|
|
456
|
+
caller_spent_seconds_this_month=caller_spent_seconds_this_month,
|
|
457
|
+
is_owner=is_owner,
|
|
458
|
+
owner_user_id=owner_user_id,
|
|
459
|
+
custody=custody,
|
|
460
|
+
custody_switch_at=custody_switch_at,
|
|
461
|
+
retention_reclamp_at=retention_reclamp_at,
|
|
462
|
+
retention_reclamp_days=retention_reclamp_days,
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
org_summary_response.additional_properties = d
|
|
466
|
+
return org_summary_response
|
|
467
|
+
|
|
468
|
+
@property
|
|
469
|
+
def additional_keys(self) -> list[str]:
|
|
470
|
+
return list(self.additional_properties.keys())
|
|
471
|
+
|
|
472
|
+
def __getitem__(self, key: str) -> Any:
|
|
473
|
+
return self.additional_properties[key]
|
|
474
|
+
|
|
475
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
476
|
+
self.additional_properties[key] = value
|
|
477
|
+
|
|
478
|
+
def __delitem__(self, key: str) -> None:
|
|
479
|
+
del self.additional_properties[key]
|
|
480
|
+
|
|
481
|
+
def __contains__(self, key: str) -> bool:
|
|
482
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,103 @@
|
|
|
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="OrgTranscript")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class OrgTranscript:
|
|
14
|
+
"""One row of the organization's firm-custody transcript index. Never carries transcript body or content beyond the
|
|
15
|
+
title.
|
|
16
|
+
|
|
17
|
+
Attributes:
|
|
18
|
+
id (str):
|
|
19
|
+
title (str):
|
|
20
|
+
created_at (int):
|
|
21
|
+
duration_seconds (int):
|
|
22
|
+
user_id (str): The transcript owner's user id.
|
|
23
|
+
legal_hold (bool):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
id: str
|
|
27
|
+
title: str
|
|
28
|
+
created_at: int
|
|
29
|
+
duration_seconds: int
|
|
30
|
+
user_id: str
|
|
31
|
+
legal_hold: bool
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
id = self.id
|
|
36
|
+
|
|
37
|
+
title = self.title
|
|
38
|
+
|
|
39
|
+
created_at = self.created_at
|
|
40
|
+
|
|
41
|
+
duration_seconds = self.duration_seconds
|
|
42
|
+
|
|
43
|
+
user_id = self.user_id
|
|
44
|
+
|
|
45
|
+
legal_hold = self.legal_hold
|
|
46
|
+
|
|
47
|
+
field_dict: dict[str, Any] = {}
|
|
48
|
+
field_dict.update(self.additional_properties)
|
|
49
|
+
field_dict.update(
|
|
50
|
+
{
|
|
51
|
+
"id": id,
|
|
52
|
+
"title": title,
|
|
53
|
+
"created_at": created_at,
|
|
54
|
+
"duration_seconds": duration_seconds,
|
|
55
|
+
"user_id": user_id,
|
|
56
|
+
"legal_hold": legal_hold,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
return field_dict
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
64
|
+
d = dict(src_dict)
|
|
65
|
+
id = d.pop("id")
|
|
66
|
+
|
|
67
|
+
title = d.pop("title")
|
|
68
|
+
|
|
69
|
+
created_at = d.pop("created_at")
|
|
70
|
+
|
|
71
|
+
duration_seconds = d.pop("duration_seconds")
|
|
72
|
+
|
|
73
|
+
user_id = d.pop("user_id")
|
|
74
|
+
|
|
75
|
+
legal_hold = d.pop("legal_hold")
|
|
76
|
+
|
|
77
|
+
org_transcript = cls(
|
|
78
|
+
id=id,
|
|
79
|
+
title=title,
|
|
80
|
+
created_at=created_at,
|
|
81
|
+
duration_seconds=duration_seconds,
|
|
82
|
+
user_id=user_id,
|
|
83
|
+
legal_hold=legal_hold,
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
org_transcript.additional_properties = d
|
|
87
|
+
return org_transcript
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def additional_keys(self) -> list[str]:
|
|
91
|
+
return list(self.additional_properties.keys())
|
|
92
|
+
|
|
93
|
+
def __getitem__(self, key: str) -> Any:
|
|
94
|
+
return self.additional_properties[key]
|
|
95
|
+
|
|
96
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
97
|
+
self.additional_properties[key] = value
|
|
98
|
+
|
|
99
|
+
def __delitem__(self, key: str) -> None:
|
|
100
|
+
del self.additional_properties[key]
|
|
101
|
+
|
|
102
|
+
def __contains__(self, key: str) -> bool:
|
|
103
|
+
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.org_transcript import OrgTranscript
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="OrgTranscriptsResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class OrgTranscriptsResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
transcripts (list[OrgTranscript]):
|
|
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[OrgTranscript]
|
|
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.org_transcript import OrgTranscript # 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 = OrgTranscript.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
|
+
org_transcripts_response = cls(
|
|
69
|
+
transcripts=transcripts,
|
|
70
|
+
next_cursor=next_cursor,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
org_transcripts_response.additional_properties = d
|
|
74
|
+
return org_transcripts_response
|
|
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
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
OrgUsageReportCsvGroupBy = Literal["client", "matter", "member"]
|
|
4
|
+
|
|
5
|
+
ORG_USAGE_REPORT_CSV_GROUP_BY_VALUES: set[OrgUsageReportCsvGroupBy] = {
|
|
6
|
+
"client",
|
|
7
|
+
"matter",
|
|
8
|
+
"member",
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def check_org_usage_report_csv_group_by(value: str) -> OrgUsageReportCsvGroupBy:
|
|
13
|
+
if value in ORG_USAGE_REPORT_CSV_GROUP_BY_VALUES:
|
|
14
|
+
return value
|
|
15
|
+
raise TypeError(
|
|
16
|
+
f"Unexpected value {value!r}. Expected one of {ORG_USAGE_REPORT_CSV_GROUP_BY_VALUES!r}"
|
|
17
|
+
)
|