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,193 @@
|
|
|
1
|
+
"""Contains all the data models used in inputs/outputs"""
|
|
2
|
+
|
|
3
|
+
from .account_response import AccountResponse
|
|
4
|
+
from .active_hold import ActiveHold
|
|
5
|
+
from .active_hold_kind import ActiveHoldKind
|
|
6
|
+
from .agent_claim_request import AgentClaimRequest
|
|
7
|
+
from .agent_claim_response import AgentClaimResponse
|
|
8
|
+
from .agent_credentials_rotate_response import AgentCredentialsRotateResponse
|
|
9
|
+
from .agent_signup_request import AgentSignupRequest
|
|
10
|
+
from .agent_signup_request_agent import AgentSignupRequestAgent
|
|
11
|
+
from .agent_signup_response import AgentSignupResponse
|
|
12
|
+
from .buy_minutes_body import BuyMinutesBody
|
|
13
|
+
from .card import Card
|
|
14
|
+
from .cards_response import CardsResponse
|
|
15
|
+
from .complete_upload_body import CompleteUploadBody
|
|
16
|
+
from .complete_upload_body_parts_type_0_item import CompleteUploadBodyPartsType0Item
|
|
17
|
+
from .context_dictionary import ContextDictionary
|
|
18
|
+
from .context_prompt_preset import ContextPromptPreset
|
|
19
|
+
from .create_setup_session_body import CreateSetupSessionBody
|
|
20
|
+
from .create_upload_body import CreateUploadBody
|
|
21
|
+
from .create_upload_body_transcription_options_type_0 import (
|
|
22
|
+
CreateUploadBodyTranscriptionOptionsType0,
|
|
23
|
+
)
|
|
24
|
+
from .credit_ledger_entry import CreditLedgerEntry
|
|
25
|
+
from .credit_ledger_response import CreditLedgerResponse
|
|
26
|
+
from .deleted_transcript import DeletedTranscript
|
|
27
|
+
from .deleted_transcript_cause import DeletedTranscriptCause
|
|
28
|
+
from .deleted_transcript_receipt_type_0 import DeletedTranscriptReceiptType0
|
|
29
|
+
from .deleted_transcript_receipt_type_0_items_item import (
|
|
30
|
+
DeletedTranscriptReceiptType0ItemsItem,
|
|
31
|
+
)
|
|
32
|
+
from .deleted_transcripts_response import DeletedTranscriptsResponse
|
|
33
|
+
from .dictionary_entry import DictionaryEntry
|
|
34
|
+
from .dictionary_entry_category import DictionaryEntryCategory
|
|
35
|
+
from .error import Error
|
|
36
|
+
from .error_details import ErrorDetails
|
|
37
|
+
from .get_upload_part_urls_response_200_type_0 import GetUploadPartUrlsResponse200Type0
|
|
38
|
+
from .heartbeat_upload_response_200 import HeartbeatUploadResponse200
|
|
39
|
+
from .holds_response import HoldsResponse
|
|
40
|
+
from .job import Job
|
|
41
|
+
from .job_failure_kind_type_1 import JobFailureKindType1
|
|
42
|
+
from .job_failure_kind_type_2_type_1 import JobFailureKindType2Type1
|
|
43
|
+
from .job_failure_kind_type_3_type_1 import JobFailureKindType3Type1
|
|
44
|
+
from .job_list import JobList
|
|
45
|
+
from .lift_transcript_hold_response_200 import LiftTranscriptHoldResponse200
|
|
46
|
+
from .list_jobs_active import ListJobsActive
|
|
47
|
+
from .list_org_matters_status import ListOrgMattersStatus
|
|
48
|
+
from .options_summary import OptionsSummary
|
|
49
|
+
from .org_audit_entry import OrgAuditEntry
|
|
50
|
+
from .org_audit_response import OrgAuditResponse
|
|
51
|
+
from .org_invoice import OrgInvoice
|
|
52
|
+
from .org_invoices_response import OrgInvoicesResponse
|
|
53
|
+
from .org_ledger_entry import OrgLedgerEntry
|
|
54
|
+
from .org_ledger_response import OrgLedgerResponse
|
|
55
|
+
from .org_matter import OrgMatter
|
|
56
|
+
from .org_matter_status import OrgMatterStatus
|
|
57
|
+
from .org_matters_response import OrgMattersResponse
|
|
58
|
+
from .org_member import OrgMember
|
|
59
|
+
from .org_members_response import OrgMembersResponse
|
|
60
|
+
from .org_summary_response import OrgSummaryResponse
|
|
61
|
+
from .org_transcript import OrgTranscript
|
|
62
|
+
from .org_transcripts_response import OrgTranscriptsResponse
|
|
63
|
+
from .org_usage_report_csv_group_by import OrgUsageReportCsvGroupBy
|
|
64
|
+
from .org_usage_report_group_by import OrgUsageReportGroupBy
|
|
65
|
+
from .org_usage_response import OrgUsageResponse
|
|
66
|
+
from .org_usage_response_group_by import OrgUsageResponseGroupBy
|
|
67
|
+
from .org_usage_row import OrgUsageRow
|
|
68
|
+
from .pack import Pack
|
|
69
|
+
from .packs_response import PacksResponse
|
|
70
|
+
from .patch_org_member_body import PatchOrgMemberBody
|
|
71
|
+
from .patch_org_member_response_200 import PatchOrgMemberResponse200
|
|
72
|
+
from .place_transcript_hold_response_200 import PlaceTranscriptHoldResponse200
|
|
73
|
+
from .presigned_part_url import PresignedPartUrl
|
|
74
|
+
from .purchase_response import PurchaseResponse
|
|
75
|
+
from .schedule_org_custody_body import ScheduleOrgCustodyBody
|
|
76
|
+
from .schedule_org_custody_body_custody import ScheduleOrgCustodyBodyCustody
|
|
77
|
+
from .schedule_org_custody_response_200 import ScheduleOrgCustodyResponse200
|
|
78
|
+
from .set_default_card_body import SetDefaultCardBody
|
|
79
|
+
from .set_default_card_response_200 import SetDefaultCardResponse200
|
|
80
|
+
from .setup_session_response import SetupSessionResponse
|
|
81
|
+
from .transaction import Transaction
|
|
82
|
+
from .transactions_response import TransactionsResponse
|
|
83
|
+
from .transcript_detail import TranscriptDetail
|
|
84
|
+
from .transcript_detail_speaker_names import TranscriptDetailSpeakerNames
|
|
85
|
+
from .transcript_envelope import TranscriptEnvelope
|
|
86
|
+
from .transcript_envelope_translations import TranscriptEnvelopeTranslations
|
|
87
|
+
from .transcript_language import TranscriptLanguage
|
|
88
|
+
from .transcript_list import TranscriptList
|
|
89
|
+
from .transcript_list_row import TranscriptListRow
|
|
90
|
+
from .transcript_list_row_insights_state import TranscriptListRowInsightsState
|
|
91
|
+
from .transcription_context_response import TranscriptionContextResponse
|
|
92
|
+
from .upload_complete_response import UploadCompleteResponse
|
|
93
|
+
from .upload_create_response import UploadCreateResponse
|
|
94
|
+
from .upload_create_response_funding import UploadCreateResponseFunding
|
|
95
|
+
from .upload_create_response_upload_type_0 import UploadCreateResponseUploadType0
|
|
96
|
+
from .upload_limits import UploadLimits
|
|
97
|
+
from .upload_part_response_200 import UploadPartResponse200
|
|
98
|
+
from .utterance import Utterance
|
|
99
|
+
|
|
100
|
+
__all__ = (
|
|
101
|
+
"AccountResponse",
|
|
102
|
+
"ActiveHold",
|
|
103
|
+
"ActiveHoldKind",
|
|
104
|
+
"AgentClaimRequest",
|
|
105
|
+
"AgentClaimResponse",
|
|
106
|
+
"AgentCredentialsRotateResponse",
|
|
107
|
+
"AgentSignupRequest",
|
|
108
|
+
"AgentSignupRequestAgent",
|
|
109
|
+
"AgentSignupResponse",
|
|
110
|
+
"BuyMinutesBody",
|
|
111
|
+
"Card",
|
|
112
|
+
"CardsResponse",
|
|
113
|
+
"CompleteUploadBody",
|
|
114
|
+
"CompleteUploadBodyPartsType0Item",
|
|
115
|
+
"ContextDictionary",
|
|
116
|
+
"ContextPromptPreset",
|
|
117
|
+
"CreateSetupSessionBody",
|
|
118
|
+
"CreateUploadBody",
|
|
119
|
+
"CreateUploadBodyTranscriptionOptionsType0",
|
|
120
|
+
"CreditLedgerEntry",
|
|
121
|
+
"CreditLedgerResponse",
|
|
122
|
+
"DeletedTranscript",
|
|
123
|
+
"DeletedTranscriptCause",
|
|
124
|
+
"DeletedTranscriptReceiptType0",
|
|
125
|
+
"DeletedTranscriptReceiptType0ItemsItem",
|
|
126
|
+
"DeletedTranscriptsResponse",
|
|
127
|
+
"DictionaryEntry",
|
|
128
|
+
"DictionaryEntryCategory",
|
|
129
|
+
"Error",
|
|
130
|
+
"ErrorDetails",
|
|
131
|
+
"GetUploadPartUrlsResponse200Type0",
|
|
132
|
+
"HeartbeatUploadResponse200",
|
|
133
|
+
"HoldsResponse",
|
|
134
|
+
"Job",
|
|
135
|
+
"JobFailureKindType1",
|
|
136
|
+
"JobFailureKindType2Type1",
|
|
137
|
+
"JobFailureKindType3Type1",
|
|
138
|
+
"JobList",
|
|
139
|
+
"LiftTranscriptHoldResponse200",
|
|
140
|
+
"ListJobsActive",
|
|
141
|
+
"ListOrgMattersStatus",
|
|
142
|
+
"OptionsSummary",
|
|
143
|
+
"OrgAuditEntry",
|
|
144
|
+
"OrgAuditResponse",
|
|
145
|
+
"OrgInvoice",
|
|
146
|
+
"OrgInvoicesResponse",
|
|
147
|
+
"OrgLedgerEntry",
|
|
148
|
+
"OrgLedgerResponse",
|
|
149
|
+
"OrgMatter",
|
|
150
|
+
"OrgMattersResponse",
|
|
151
|
+
"OrgMatterStatus",
|
|
152
|
+
"OrgMember",
|
|
153
|
+
"OrgMembersResponse",
|
|
154
|
+
"OrgSummaryResponse",
|
|
155
|
+
"OrgTranscript",
|
|
156
|
+
"OrgTranscriptsResponse",
|
|
157
|
+
"OrgUsageReportCsvGroupBy",
|
|
158
|
+
"OrgUsageReportGroupBy",
|
|
159
|
+
"OrgUsageResponse",
|
|
160
|
+
"OrgUsageResponseGroupBy",
|
|
161
|
+
"OrgUsageRow",
|
|
162
|
+
"Pack",
|
|
163
|
+
"PacksResponse",
|
|
164
|
+
"PatchOrgMemberBody",
|
|
165
|
+
"PatchOrgMemberResponse200",
|
|
166
|
+
"PlaceTranscriptHoldResponse200",
|
|
167
|
+
"PresignedPartUrl",
|
|
168
|
+
"PurchaseResponse",
|
|
169
|
+
"ScheduleOrgCustodyBody",
|
|
170
|
+
"ScheduleOrgCustodyBodyCustody",
|
|
171
|
+
"ScheduleOrgCustodyResponse200",
|
|
172
|
+
"SetDefaultCardBody",
|
|
173
|
+
"SetDefaultCardResponse200",
|
|
174
|
+
"SetupSessionResponse",
|
|
175
|
+
"Transaction",
|
|
176
|
+
"TransactionsResponse",
|
|
177
|
+
"TranscriptDetail",
|
|
178
|
+
"TranscriptDetailSpeakerNames",
|
|
179
|
+
"TranscriptEnvelope",
|
|
180
|
+
"TranscriptEnvelopeTranslations",
|
|
181
|
+
"TranscriptionContextResponse",
|
|
182
|
+
"TranscriptLanguage",
|
|
183
|
+
"TranscriptList",
|
|
184
|
+
"TranscriptListRow",
|
|
185
|
+
"TranscriptListRowInsightsState",
|
|
186
|
+
"UploadCompleteResponse",
|
|
187
|
+
"UploadCreateResponse",
|
|
188
|
+
"UploadCreateResponseFunding",
|
|
189
|
+
"UploadCreateResponseUploadType0",
|
|
190
|
+
"UploadLimits",
|
|
191
|
+
"UploadPartResponse200",
|
|
192
|
+
"Utterance",
|
|
193
|
+
)
|
|
@@ -0,0 +1,114 @@
|
|
|
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.upload_limits import UploadLimits
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="AccountResponse")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class AccountResponse:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
balance_seconds (int): Net balance in seconds: the raw balance minus any clawback debt. May be negative.
|
|
21
|
+
held_seconds (int): Seconds currently committed to in-flight jobs and not yet settled.
|
|
22
|
+
credits_expire_at (int | None): Unix seconds after which the balance expires without a completed transcription
|
|
23
|
+
or purchase, or null if no expiry is currently armed.
|
|
24
|
+
card_on_file (bool):
|
|
25
|
+
data_region (str): The region this account's data lives in, e.g. us, eu, apac or oc.
|
|
26
|
+
limits (UploadLimits): The caller's current upload admission limits, shared by every response that carries them.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
balance_seconds: int
|
|
30
|
+
held_seconds: int
|
|
31
|
+
credits_expire_at: int | None
|
|
32
|
+
card_on_file: bool
|
|
33
|
+
data_region: str
|
|
34
|
+
limits: UploadLimits
|
|
35
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
36
|
+
|
|
37
|
+
def to_dict(self) -> dict[str, Any]:
|
|
38
|
+
balance_seconds = self.balance_seconds
|
|
39
|
+
|
|
40
|
+
held_seconds = self.held_seconds
|
|
41
|
+
|
|
42
|
+
credits_expire_at: int | None
|
|
43
|
+
credits_expire_at = self.credits_expire_at
|
|
44
|
+
|
|
45
|
+
card_on_file = self.card_on_file
|
|
46
|
+
|
|
47
|
+
data_region = self.data_region
|
|
48
|
+
|
|
49
|
+
limits = self.limits.to_dict()
|
|
50
|
+
|
|
51
|
+
field_dict: dict[str, Any] = {}
|
|
52
|
+
field_dict.update(self.additional_properties)
|
|
53
|
+
field_dict.update(
|
|
54
|
+
{
|
|
55
|
+
"balance_seconds": balance_seconds,
|
|
56
|
+
"held_seconds": held_seconds,
|
|
57
|
+
"credits_expire_at": credits_expire_at,
|
|
58
|
+
"card_on_file": card_on_file,
|
|
59
|
+
"data_region": data_region,
|
|
60
|
+
"limits": limits,
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
return field_dict
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
68
|
+
from ..models.upload_limits import UploadLimits # noqa: PLC0415
|
|
69
|
+
|
|
70
|
+
d = dict(src_dict)
|
|
71
|
+
balance_seconds = d.pop("balance_seconds")
|
|
72
|
+
|
|
73
|
+
held_seconds = d.pop("held_seconds")
|
|
74
|
+
|
|
75
|
+
def _parse_credits_expire_at(data: object) -> int | None:
|
|
76
|
+
if data is None:
|
|
77
|
+
return data
|
|
78
|
+
return cast(int | None, data)
|
|
79
|
+
|
|
80
|
+
credits_expire_at = _parse_credits_expire_at(d.pop("credits_expire_at"))
|
|
81
|
+
|
|
82
|
+
card_on_file = d.pop("card_on_file")
|
|
83
|
+
|
|
84
|
+
data_region = d.pop("data_region")
|
|
85
|
+
|
|
86
|
+
limits = UploadLimits.from_dict(d.pop("limits"))
|
|
87
|
+
|
|
88
|
+
account_response = cls(
|
|
89
|
+
balance_seconds=balance_seconds,
|
|
90
|
+
held_seconds=held_seconds,
|
|
91
|
+
credits_expire_at=credits_expire_at,
|
|
92
|
+
card_on_file=card_on_file,
|
|
93
|
+
data_region=data_region,
|
|
94
|
+
limits=limits,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
account_response.additional_properties = d
|
|
98
|
+
return account_response
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def additional_keys(self) -> list[str]:
|
|
102
|
+
return list(self.additional_properties.keys())
|
|
103
|
+
|
|
104
|
+
def __getitem__(self, key: str) -> Any:
|
|
105
|
+
return self.additional_properties[key]
|
|
106
|
+
|
|
107
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
108
|
+
self.additional_properties[key] = value
|
|
109
|
+
|
|
110
|
+
def __delitem__(self, key: str) -> None:
|
|
111
|
+
del self.additional_properties[key]
|
|
112
|
+
|
|
113
|
+
def __contains__(self, key: str) -> bool:
|
|
114
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,88 @@
|
|
|
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 ..models.active_hold_kind import ActiveHoldKind, check_active_hold_kind
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="ActiveHold")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class ActiveHold:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
id (str):
|
|
19
|
+
kind (ActiveHoldKind): Which kind of work reserved these seconds. The id is that work's own id and is unique
|
|
20
|
+
only within its kind.
|
|
21
|
+
seconds (int):
|
|
22
|
+
created_at (int):
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
id: str
|
|
26
|
+
kind: ActiveHoldKind
|
|
27
|
+
seconds: int
|
|
28
|
+
created_at: int
|
|
29
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
30
|
+
|
|
31
|
+
def to_dict(self) -> dict[str, Any]:
|
|
32
|
+
id = self.id
|
|
33
|
+
|
|
34
|
+
kind: str = self.kind
|
|
35
|
+
|
|
36
|
+
seconds = self.seconds
|
|
37
|
+
|
|
38
|
+
created_at = self.created_at
|
|
39
|
+
|
|
40
|
+
field_dict: dict[str, Any] = {}
|
|
41
|
+
field_dict.update(self.additional_properties)
|
|
42
|
+
field_dict.update(
|
|
43
|
+
{
|
|
44
|
+
"id": id,
|
|
45
|
+
"kind": kind,
|
|
46
|
+
"seconds": seconds,
|
|
47
|
+
"created_at": created_at,
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
id = d.pop("id")
|
|
57
|
+
|
|
58
|
+
kind = check_active_hold_kind(d.pop("kind"))
|
|
59
|
+
|
|
60
|
+
seconds = d.pop("seconds")
|
|
61
|
+
|
|
62
|
+
created_at = d.pop("created_at")
|
|
63
|
+
|
|
64
|
+
active_hold = cls(
|
|
65
|
+
id=id,
|
|
66
|
+
kind=kind,
|
|
67
|
+
seconds=seconds,
|
|
68
|
+
created_at=created_at,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
active_hold.additional_properties = d
|
|
72
|
+
return active_hold
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def additional_keys(self) -> list[str]:
|
|
76
|
+
return list(self.additional_properties.keys())
|
|
77
|
+
|
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
|
79
|
+
return self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
82
|
+
self.additional_properties[key] = value
|
|
83
|
+
|
|
84
|
+
def __delitem__(self, key: str) -> None:
|
|
85
|
+
del self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key: str) -> bool:
|
|
88
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
ActiveHoldKind = Literal["insights", "qa", "transcription", "translation"]
|
|
4
|
+
|
|
5
|
+
ACTIVE_HOLD_KIND_VALUES: set[ActiveHoldKind] = {
|
|
6
|
+
"insights",
|
|
7
|
+
"qa",
|
|
8
|
+
"transcription",
|
|
9
|
+
"translation",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def check_active_hold_kind(value: str) -> ActiveHoldKind:
|
|
14
|
+
if value in ACTIVE_HOLD_KIND_VALUES:
|
|
15
|
+
return value
|
|
16
|
+
raise TypeError(
|
|
17
|
+
f"Unexpected value {value!r}. Expected one of {ACTIVE_HOLD_KIND_VALUES!r}"
|
|
18
|
+
)
|
|
@@ -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="AgentClaimRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class AgentClaimRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
claim_secret (str): The secret returned exactly once by POST /v1/agent/accounts.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
claim_secret: str
|
|
20
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
21
|
+
|
|
22
|
+
def to_dict(self) -> dict[str, Any]:
|
|
23
|
+
claim_secret = self.claim_secret
|
|
24
|
+
|
|
25
|
+
field_dict: dict[str, Any] = {}
|
|
26
|
+
field_dict.update(self.additional_properties)
|
|
27
|
+
field_dict.update(
|
|
28
|
+
{
|
|
29
|
+
"claim_secret": claim_secret,
|
|
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
|
+
claim_secret = d.pop("claim_secret")
|
|
39
|
+
|
|
40
|
+
agent_claim_request = cls(
|
|
41
|
+
claim_secret=claim_secret,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
agent_claim_request.additional_properties = d
|
|
45
|
+
return agent_claim_request
|
|
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,85 @@
|
|
|
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="AgentClaimResponse")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class AgentClaimResponse:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
user_id (str): The account created by this claim. There is no login path for it; authenticate with pat instead.
|
|
17
|
+
pat (str): Returned exactly once. Only its hash is stored; there is no way to recover it later.
|
|
18
|
+
scopes (list[str]): The scopes carried by pat.
|
|
19
|
+
balance_seconds (int): The account's balance immediately after the pack this signup paid for was granted.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
user_id: str
|
|
23
|
+
pat: str
|
|
24
|
+
scopes: list[str]
|
|
25
|
+
balance_seconds: int
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
user_id = self.user_id
|
|
30
|
+
|
|
31
|
+
pat = self.pat
|
|
32
|
+
|
|
33
|
+
scopes = self.scopes
|
|
34
|
+
|
|
35
|
+
balance_seconds = self.balance_seconds
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"user_id": user_id,
|
|
42
|
+
"pat": pat,
|
|
43
|
+
"scopes": scopes,
|
|
44
|
+
"balance_seconds": balance_seconds,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
return field_dict
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
user_id = d.pop("user_id")
|
|
54
|
+
|
|
55
|
+
pat = d.pop("pat")
|
|
56
|
+
|
|
57
|
+
scopes = cast(list[str], d.pop("scopes"))
|
|
58
|
+
|
|
59
|
+
balance_seconds = d.pop("balance_seconds")
|
|
60
|
+
|
|
61
|
+
agent_claim_response = cls(
|
|
62
|
+
user_id=user_id,
|
|
63
|
+
pat=pat,
|
|
64
|
+
scopes=scopes,
|
|
65
|
+
balance_seconds=balance_seconds,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
agent_claim_response.additional_properties = d
|
|
69
|
+
return agent_claim_response
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def additional_keys(self) -> list[str]:
|
|
73
|
+
return list(self.additional_properties.keys())
|
|
74
|
+
|
|
75
|
+
def __getitem__(self, key: str) -> Any:
|
|
76
|
+
return self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
79
|
+
self.additional_properties[key] = value
|
|
80
|
+
|
|
81
|
+
def __delitem__(self, key: str) -> None:
|
|
82
|
+
del self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __contains__(self, key: str) -> bool:
|
|
85
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,101 @@
|
|
|
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="AgentCredentialsRotateResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class AgentCredentialsRotateResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
pat (str): The successor token, returned exactly once. Only its hash is stored; there is no way to recover it
|
|
19
|
+
later. The predecessor that authenticated this request stops working immediately.
|
|
20
|
+
pat_id (str): The successor's id.
|
|
21
|
+
scopes (list[str]): The scopes carried by pat, identical to the predecessor's.
|
|
22
|
+
expires_at (int | None | Unset): The successor's expiry policy, carried over from the predecessor unchanged.
|
|
23
|
+
Null when the predecessor never expired.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
pat: str
|
|
27
|
+
pat_id: str
|
|
28
|
+
scopes: list[str]
|
|
29
|
+
expires_at: int | None | Unset = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
pat = self.pat
|
|
34
|
+
|
|
35
|
+
pat_id = self.pat_id
|
|
36
|
+
|
|
37
|
+
scopes = self.scopes
|
|
38
|
+
|
|
39
|
+
expires_at: int | None | Unset
|
|
40
|
+
if isinstance(self.expires_at, Unset):
|
|
41
|
+
expires_at = UNSET
|
|
42
|
+
else:
|
|
43
|
+
expires_at = self.expires_at
|
|
44
|
+
|
|
45
|
+
field_dict: dict[str, Any] = {}
|
|
46
|
+
field_dict.update(self.additional_properties)
|
|
47
|
+
field_dict.update(
|
|
48
|
+
{
|
|
49
|
+
"pat": pat,
|
|
50
|
+
"pat_id": pat_id,
|
|
51
|
+
"scopes": scopes,
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
if expires_at is not UNSET:
|
|
55
|
+
field_dict["expires_at"] = expires_at
|
|
56
|
+
|
|
57
|
+
return field_dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
61
|
+
d = dict(src_dict)
|
|
62
|
+
pat = d.pop("pat")
|
|
63
|
+
|
|
64
|
+
pat_id = d.pop("pat_id")
|
|
65
|
+
|
|
66
|
+
scopes = cast(list[str], d.pop("scopes"))
|
|
67
|
+
|
|
68
|
+
def _parse_expires_at(data: object) -> int | None | Unset:
|
|
69
|
+
if data is None:
|
|
70
|
+
return data
|
|
71
|
+
if isinstance(data, Unset):
|
|
72
|
+
return data
|
|
73
|
+
return cast(int | None | Unset, data)
|
|
74
|
+
|
|
75
|
+
expires_at = _parse_expires_at(d.pop("expires_at", UNSET))
|
|
76
|
+
|
|
77
|
+
agent_credentials_rotate_response = cls(
|
|
78
|
+
pat=pat,
|
|
79
|
+
pat_id=pat_id,
|
|
80
|
+
scopes=scopes,
|
|
81
|
+
expires_at=expires_at,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
agent_credentials_rotate_response.additional_properties = d
|
|
85
|
+
return agent_credentials_rotate_response
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> list[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|