egain-api-python 0.1.1__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.
- egain_api_python/__init__.py +17 -0
- egain_api_python/_hooks/__init__.py +5 -0
- egain_api_python/_hooks/registration.py +13 -0
- egain_api_python/_hooks/sdkhooks.py +76 -0
- egain_api_python/_hooks/types.py +112 -0
- egain_api_python/_version.py +15 -0
- egain_api_python/aiservices.py +23 -0
- egain_api_python/answers.py +281 -0
- egain_api_python/articlelists.py +469 -0
- egain_api_python/basesdk.py +368 -0
- egain_api_python/connectorssearchevents.py +537 -0
- egain_api_python/content.py +23 -0
- egain_api_python/errors/__init__.py +78 -0
- egain_api_python/errors/egaindefaulterror.py +40 -0
- egain_api_python/errors/egainerror.py +30 -0
- egain_api_python/errors/gethealthop.py +74 -0
- egain_api_python/errors/no_response_error.py +17 -0
- egain_api_python/errors/responsevalidationerror.py +27 -0
- egain_api_python/errors/schemas_wserrorcommon.py +51 -0
- egain_api_python/errors/wserrorcommon.py +49 -0
- egain_api_python/escalation.py +955 -0
- egain_api_python/export.py +487 -0
- egain_api_python/federatedsearchevent.py +287 -0
- egain_api_python/general.py +925 -0
- egain_api_python/guidedhelp.py +3373 -0
- egain_api_python/health.py +253 -0
- egain_api_python/httpclient.py +125 -0
- egain_api_python/import_.py +1161 -0
- egain_api_python/models/__init__.py +2136 -0
- egain_api_python/models/acceptghsolutionop.py +52 -0
- egain_api_python/models/acceptlanguage.py +23 -0
- egain_api_python/models/accessibleportal.py +37 -0
- egain_api_python/models/action.py +56 -0
- egain_api_python/models/actionsearch.py +92 -0
- egain_api_python/models/addasreferenceop.py +52 -0
- egain_api_python/models/addbookmarkop.py +43 -0
- egain_api_python/models/additionalsnippets.py +57 -0
- egain_api_python/models/addtoreplyop.py +52 -0
- egain_api_python/models/aisearchop.py +131 -0
- egain_api_python/models/aisearchresponse.py +67 -0
- egain_api_python/models/allaccessibleportals.py +28 -0
- egain_api_python/models/answer.py +21 -0
- egain_api_python/models/answeredquestion.py +125 -0
- egain_api_python/models/answerrange.py +41 -0
- egain_api_python/models/answersrequest.py +78 -0
- egain_api_python/models/answersresponse.py +93 -0
- egain_api_python/models/article.py +241 -0
- egain_api_python/models/articleactivitylink.py +62 -0
- egain_api_python/models/articleadditionalattributes.py +23 -0
- egain_api_python/models/articleaisearchresult.py +254 -0
- egain_api_python/models/articleattachment.py +44 -0
- egain_api_python/models/articlelist.py +48 -0
- egain_api_python/models/articlelistresult.py +38 -0
- egain_api_python/models/articlelistsresult.py +22 -0
- egain_api_python/models/articlepermissions.py +25 -0
- egain_api_python/models/articlepermissionsresult.py +27 -0
- egain_api_python/models/articlerating.py +51 -0
- egain_api_python/models/articleratingsresponse.py +28 -0
- egain_api_python/models/articleresult.py +159 -0
- egain_api_python/models/articleresultadditionalattributes.py +22 -0
- egain_api_python/models/articleresults.py +32 -0
- egain_api_python/models/articlesearchresult.py +243 -0
- egain_api_python/models/articlesearchresults.py +32 -0
- egain_api_python/models/articlesort.py +11 -0
- egain_api_python/models/articlesortorder.py +11 -0
- egain_api_python/models/articletype.py +56 -0
- egain_api_python/models/articlewitheditions.py +227 -0
- egain_api_python/models/attachment.py +31 -0
- egain_api_python/models/attachmentadditionalattributes.py +10 -0
- egain_api_python/models/attachmentcontent.py +57 -0
- egain_api_python/models/attachmentcontentresult.py +22 -0
- egain_api_python/models/attachmentforcreatesuggestion.py +25 -0
- egain_api_python/models/attachments.py +35 -0
- egain_api_python/models/attachmentsummary.py +37 -0
- egain_api_python/models/attachmentupload.py +20 -0
- egain_api_python/models/avertcustomerescalationop.py +44 -0
- egain_api_python/models/bookmark.py +57 -0
- egain_api_python/models/bookmarkresult.py +26 -0
- egain_api_python/models/bookmarkstatus.py +34 -0
- egain_api_python/models/case.py +158 -0
- egain_api_python/models/caseadditionalattributes.py +11 -0
- egain_api_python/models/caseanswer.py +21 -0
- egain_api_python/models/casebase.py +67 -0
- egain_api_python/models/casebaseresult.py +28 -0
- egain_api_python/models/casebasesearchsettings.py +26 -0
- egain_api_python/models/caselistresult.py +74 -0
- egain_api_python/models/caselistresults.py +28 -0
- egain_api_python/models/casequestion.py +16 -0
- egain_api_python/models/casequestiondetail.py +29 -0
- egain_api_python/models/casesearch.py +80 -0
- egain_api_python/models/clusterid.py +16 -0
- egain_api_python/models/clusterresult.py +37 -0
- egain_api_python/models/clusterresults.py +28 -0
- egain_api_python/models/comment.py +33 -0
- egain_api_python/models/comments.py +26 -0
- egain_api_python/models/completecustomerescalationop.py +44 -0
- egain_api_python/models/compliancearticleresult.py +166 -0
- egain_api_python/models/compliancearticleresultadditionalattributes.py +22 -0
- egain_api_python/models/compliancearticleresults.py +35 -0
- egain_api_python/models/complianceforarticle.py +59 -0
- egain_api_python/models/complyarticleop.py +40 -0
- egain_api_python/models/components_schemas_tag.py +25 -0
- egain_api_python/models/components_schemas_tagcategory.py +39 -0
- egain_api_python/models/components_schemas_taggroup.py +25 -0
- egain_api_python/models/configurableattribute.py +25 -0
- egain_api_python/models/configurableattributes.py +15 -0
- egain_api_python/models/contactperson.py +43 -0
- egain_api_python/models/contacts.py +21 -0
- egain_api_python/models/createbookmark.py +64 -0
- egain_api_python/models/createdby.py +37 -0
- egain_api_python/models/createfederatedsearchevent.py +85 -0
- egain_api_python/models/createfederatedsearchresulteventop.py +46 -0
- egain_api_python/models/createimportop.py +20 -0
- egain_api_python/models/createimportvalidationop.py +20 -0
- egain_api_python/models/createquickpick.py +34 -0
- egain_api_python/models/createquickpickop.py +55 -0
- egain_api_python/models/createsearchresulteventforconnectors.py +71 -0
- egain_api_python/models/createsearchresulteventforconnectorsop.py +48 -0
- egain_api_python/models/createsignedurlop.py +29 -0
- egain_api_python/models/createsuggestion.py +126 -0
- egain_api_python/models/createviewedsearchresulteventforconnectors.py +76 -0
- egain_api_python/models/createviewedsearchresultseventforconnectorsop.py +48 -0
- egain_api_python/models/customattribute.py +35 -0
- egain_api_python/models/deletebookmarkop.py +40 -0
- egain_api_python/models/deletesuggestionop.py +40 -0
- egain_api_python/models/department.py +21 -0
- egain_api_python/models/detailfield.py +32 -0
- egain_api_python/models/displayfield.py +27 -0
- egain_api_python/models/dynamiccluster.py +21 -0
- egain_api_python/models/dynamicsearch.py +40 -0
- egain_api_python/models/edition.py +79 -0
- egain_api_python/models/editionwithcontent.py +68 -0
- egain_api_python/models/email.py +21 -0
- egain_api_python/models/exportcontentop.py +14 -0
- egain_api_python/models/exportstatus.py +106 -0
- egain_api_python/models/exportstatusop.py +31 -0
- egain_api_python/models/feedbackarticleforsuggestion.py +34 -0
- egain_api_python/models/folderbreadcrumb.py +24 -0
- egain_api_python/models/foldersummary.py +29 -0
- egain_api_python/models/getacknowledgedcompliancearticlesop.py +119 -0
- egain_api_python/models/getallarticlelistsop.py +47 -0
- egain_api_python/models/getallcasebasesreleasesop.py +65 -0
- egain_api_python/models/getallcasesop.py +83 -0
- egain_api_python/models/getallportalsop.py +60 -0
- egain_api_python/models/getallprofilesinportalop.py +64 -0
- egain_api_python/models/getallquickpicksop.py +83 -0
- egain_api_python/models/getalltopicsop.py +132 -0
- egain_api_python/models/getalluserprofilesop.py +47 -0
- egain_api_python/models/getancestortopicsop.py +133 -0
- egain_api_python/models/getannouncementarticlesop.py +134 -0
- egain_api_python/models/getarticleattachmentbyidop.py +31 -0
- egain_api_python/models/getarticlebyidop.py +257 -0
- egain_api_python/models/getarticlebyidwitheditionsop.py +46 -0
- egain_api_python/models/getarticleeditiondetailsop.py +55 -0
- egain_api_python/models/getarticlelistdetailsop.py +115 -0
- egain_api_python/models/getarticlepermissionsbyidop.py +40 -0
- egain_api_python/models/getarticlepersonalizationop.py +73 -0
- egain_api_python/models/getarticleratingsop.py +74 -0
- egain_api_python/models/getarticlesintopicop.py +172 -0
- egain_api_python/models/getattachmentbyidinportalop.py +56 -0
- egain_api_python/models/getbookmarkop.py +31 -0
- egain_api_python/models/getcasebasereleasebyidop.py +64 -0
- egain_api_python/models/getcasebyidop.py +75 -0
- egain_api_python/models/getchildtopicsop.py +150 -0
- egain_api_python/models/getclusterbycasebasereleaseidop.py +74 -0
- egain_api_python/models/gethealthop.py +130 -0
- egain_api_python/models/getimportcontentop.py +46 -0
- egain_api_python/models/getmyportalsop.py +97 -0
- egain_api_python/models/getmysubscriptionop.py +115 -0
- egain_api_python/models/getpendingcompliancearticlesop.py +119 -0
- egain_api_python/models/getpopulararticlesop.py +133 -0
- egain_api_python/models/getportaldetailsbyidop.py +47 -0
- egain_api_python/models/getrelatedarticlesforsuggestionop.py +96 -0
- egain_api_python/models/getrelatedarticlesop.py +143 -0
- egain_api_python/models/getsuggestionattachmentbyidop.py +76 -0
- egain_api_python/models/getsuggestionattachmentsop.py +40 -0
- egain_api_python/models/getsuggestioncommentsop.py +40 -0
- egain_api_python/models/getsuggestionop.py +107 -0
- egain_api_python/models/gettagcategoriesforinterestforportalop.py +46 -0
- egain_api_python/models/gettopicbreadcrumbforarticleop.py +55 -0
- egain_api_python/models/getuserdetailsop.py +22 -0
- egain_api_python/models/getusermilestonesop.py +22 -0
- egain_api_python/models/ghsearchrequest.py +67 -0
- egain_api_python/models/ghsearchresult.py +75 -0
- egain_api_python/models/ghstepsearchrequest.py +64 -0
- egain_api_python/models/image.py +17 -0
- egain_api_python/models/importcontent.py +79 -0
- egain_api_python/models/importstatus.py +29 -0
- egain_api_python/models/kblanguage.py +63 -0
- egain_api_python/models/kblanguagecode.py +48 -0
- egain_api_python/models/kblanguages.py +22 -0
- egain_api_python/models/knowledgeexport.py +237 -0
- egain_api_python/models/l10nstring.py +22 -0
- egain_api_python/models/languagecode.py +39 -0
- egain_api_python/models/languagecode_parameter.py +39 -0
- egain_api_python/models/languagequeryparameter.py +39 -0
- egain_api_python/models/link.py +25 -0
- egain_api_python/models/makesuggestionop.py +44 -0
- egain_api_python/models/mandatorylanguagequeryparameter.py +38 -0
- egain_api_python/models/metadata.py +29 -0
- egain_api_python/models/milestone.py +21 -0
- egain_api_python/models/milestonename.py +26 -0
- egain_api_python/models/milestones.py +21 -0
- egain_api_python/models/modifiedby.py +37 -0
- egain_api_python/models/modifysuggestion.py +78 -0
- egain_api_python/models/modifysuggestionsop.py +44 -0
- egain_api_python/models/optionalarticleattributes.py +20 -0
- egain_api_python/models/order.py +10 -0
- egain_api_python/models/ownedby.py +37 -0
- egain_api_python/models/paginationinfo.py +32 -0
- egain_api_python/models/patchimportcontentvalidationop.py +46 -0
- egain_api_python/models/personalization.py +67 -0
- egain_api_python/models/phone.py +21 -0
- egain_api_python/models/portal.py +102 -0
- egain_api_python/models/portalresult.py +28 -0
- egain_api_python/models/portalsettings.py +398 -0
- egain_api_python/models/post_portalid_answersop.py +88 -0
- egain_api_python/models/post_portalid_retrieveop.py +88 -0
- egain_api_python/models/profile.py +26 -0
- egain_api_python/models/profileresult.py +24 -0
- egain_api_python/models/publishprofile.py +30 -0
- egain_api_python/models/publishview.py +38 -0
- egain_api_python/models/question.py +101 -0
- egain_api_python/models/questionandanswer.py +26 -0
- egain_api_python/models/quickpickrating.py +32 -0
- egain_api_python/models/quickpickresult.py +38 -0
- egain_api_python/models/quickpickresults.py +28 -0
- egain_api_python/models/ratearticleop.py +71 -0
- egain_api_python/models/referenceresponse.py +80 -0
- egain_api_python/models/rejectghsolutionop.py +52 -0
- egain_api_python/models/relatedquestions.py +28 -0
- egain_api_python/models/resourcetype_parameter.py +10 -0
- egain_api_python/models/restorequickpickop.py +63 -0
- egain_api_python/models/retrieverequest.py +47 -0
- egain_api_python/models/retrieveresponse.py +96 -0
- egain_api_python/models/role.py +26 -0
- egain_api_python/models/roletemplate.py +25 -0
- egain_api_python/models/schemas_answer.py +94 -0
- egain_api_python/models/schemas_customattribute.py +35 -0
- egain_api_python/models/schemas_link.py +27 -0
- egain_api_python/models/schemas_tag.py +21 -0
- egain_api_python/models/schemas_tagcategory.py +75 -0
- egain_api_python/models/schemas_taggroup.py +31 -0
- egain_api_python/models/schemas_tags.py +19 -0
- egain_api_python/models/schemas_wserrorcommon.py +17 -0
- egain_api_python/models/searchfilterattribute.py +61 -0
- egain_api_python/models/searchpriortoescalationop.py +108 -0
- egain_api_python/models/searchresult.py +101 -0
- egain_api_python/models/searchsuggestionop.py +93 -0
- egain_api_python/models/security.py +25 -0
- egain_api_python/models/selectuserprofileop.py +44 -0
- egain_api_python/models/sessioncontextvariable.py +17 -0
- egain_api_python/models/shorturl.py +32 -0
- egain_api_python/models/sortidname.py +10 -0
- egain_api_python/models/sortidnamedepartment.py +11 -0
- egain_api_python/models/stage.py +26 -0
- egain_api_python/models/startcustomerescalationop.py +66 -0
- egain_api_python/models/startescalationrequest.py +94 -0
- egain_api_python/models/startghsearchop.py +74 -0
- egain_api_python/models/startquestionandanswer.py +26 -0
- egain_api_python/models/stepghsearchop.py +62 -0
- egain_api_python/models/stringattributevalue.py +30 -0
- egain_api_python/models/structuredauthoringfields.py +33 -0
- egain_api_python/models/subscribearticleop.py +40 -0
- egain_api_python/models/suggestion.py +190 -0
- egain_api_python/models/suggestionadditionalattributes.py +11 -0
- egain_api_python/models/suggestionattachment.py +46 -0
- egain_api_python/models/suggestions.py +28 -0
- egain_api_python/models/tag.py +17 -0
- egain_api_python/models/tagcategoriesforinterest.py +22 -0
- egain_api_python/models/tagcategory.py +34 -0
- egain_api_python/models/taggroup.py +17 -0
- egain_api_python/models/taggroups.py +20 -0
- egain_api_python/models/tags.py +17 -0
- egain_api_python/models/topic.py +113 -0
- egain_api_python/models/topicadditionalattributes.py +20 -0
- egain_api_python/models/topicaisearchresult.py +67 -0
- egain_api_python/models/topicbreadcrumb.py +24 -0
- egain_api_python/models/topicresult.py +26 -0
- egain_api_python/models/topicsummary.py +31 -0
- egain_api_python/models/topictreenode.py +27 -0
- egain_api_python/models/topictreeresult.py +28 -0
- egain_api_python/models/unsubscribearticleop.py +55 -0
- egain_api_python/models/uploadattachmentop.py +36 -0
- egain_api_python/models/userdetails.py +44 -0
- egain_api_python/models/userprofile.py +33 -0
- egain_api_python/models/userprofiles.py +21 -0
- egain_api_python/models/userview.py +33 -0
- egain_api_python/models/validateimportcontent.py +58 -0
- egain_api_python/models/virtualcase.py +52 -0
- egain_api_python/models/workflow.py +21 -0
- egain_api_python/models/workflowmilestone.py +11 -0
- egain_api_python/models/wserrorcommon.py +17 -0
- egain_api_python/populararticles.py +287 -0
- egain_api_python/portal_article.py +4935 -0
- egain_api_python/portal_attachment.py +494 -0
- egain_api_python/portal_bookmark.py +707 -0
- egain_api_python/portal_sdk.py +88 -0
- egain_api_python/portal_suggestion.py +2283 -0
- egain_api_python/portal_topic.py +975 -0
- egain_api_python/portal_userdetails.py +211 -0
- egain_api_python/portal_userprofile.py +431 -0
- egain_api_python/py.typed +1 -0
- egain_api_python/retrieve.py +265 -0
- egain_api_python/sdk.py +216 -0
- egain_api_python/sdkconfiguration.py +50 -0
- egain_api_python/search.py +251 -0
- egain_api_python/types/__init__.py +21 -0
- egain_api_python/types/basemodel.py +39 -0
- egain_api_python/usermilestones.py +219 -0
- egain_api_python/utils/__init__.py +200 -0
- egain_api_python/utils/annotations.py +79 -0
- egain_api_python/utils/datetimes.py +23 -0
- egain_api_python/utils/enums.py +74 -0
- egain_api_python/utils/eventstreaming.py +248 -0
- egain_api_python/utils/forms.py +223 -0
- egain_api_python/utils/headers.py +136 -0
- egain_api_python/utils/logger.py +27 -0
- egain_api_python/utils/metadata.py +118 -0
- egain_api_python/utils/queryparams.py +205 -0
- egain_api_python/utils/requestbodies.py +66 -0
- egain_api_python/utils/retries.py +217 -0
- egain_api_python/utils/security.py +192 -0
- egain_api_python/utils/serializers.py +249 -0
- egain_api_python/utils/unmarshal_json_response.py +24 -0
- egain_api_python/utils/url.py +155 -0
- egain_api_python/utils/values.py +137 -0
- egain_api_python-0.1.1.dist-info/METADATA +827 -0
- egain_api_python-0.1.1.dist-info/RECORD +332 -0
- egain_api_python-0.1.1.dist-info/WHEEL +5 -0
- egain_api_python-0.1.1.dist-info/licenses/LICENSE +21 -0
- egain_api_python-0.1.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
import httpx
|
4
|
+
from typing import Optional
|
5
|
+
from dataclasses import dataclass, field
|
6
|
+
|
7
|
+
|
8
|
+
@dataclass(frozen=True)
|
9
|
+
class EgainError(Exception):
|
10
|
+
"""The base class for all HTTP error responses."""
|
11
|
+
|
12
|
+
message: str
|
13
|
+
status_code: int
|
14
|
+
body: str
|
15
|
+
headers: httpx.Headers = field(hash=False)
|
16
|
+
raw_response: httpx.Response = field(hash=False)
|
17
|
+
|
18
|
+
def __init__(
|
19
|
+
self, message: str, raw_response: httpx.Response, body: Optional[str] = None
|
20
|
+
):
|
21
|
+
object.__setattr__(self, "message", message)
|
22
|
+
object.__setattr__(self, "status_code", raw_response.status_code)
|
23
|
+
object.__setattr__(
|
24
|
+
self, "body", body if body is not None else raw_response.text
|
25
|
+
)
|
26
|
+
object.__setattr__(self, "headers", raw_response.headers)
|
27
|
+
object.__setattr__(self, "raw_response", raw_response)
|
28
|
+
|
29
|
+
def __str__(self):
|
30
|
+
return self.message
|
@@ -0,0 +1,74 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from dataclasses import dataclass, field
|
5
|
+
from datetime import datetime
|
6
|
+
from egain_api_python.errors import EgainError
|
7
|
+
from egain_api_python.types import BaseModel
|
8
|
+
import httpx
|
9
|
+
from typing import Optional
|
10
|
+
|
11
|
+
|
12
|
+
class ServiceUnavailableErrorData(BaseModel):
|
13
|
+
status: Optional[str] = None
|
14
|
+
r"""**Health Status**
|
15
|
+
|
16
|
+
The overall health status of the service. When unhealthy:
|
17
|
+
- Service may not process requests correctly
|
18
|
+
- Performance may be significantly degraded
|
19
|
+
- Some features may be unavailable
|
20
|
+
- Immediate attention is required
|
21
|
+
|
22
|
+
"""
|
23
|
+
|
24
|
+
timestamp: Optional[datetime] = None
|
25
|
+
r"""**Health Check Timestamp**
|
26
|
+
|
27
|
+
The exact date and time when this health check was performed. This helps with:
|
28
|
+
- Incident timeline analysis
|
29
|
+
- Problem duration tracking
|
30
|
+
- Recovery time measurement
|
31
|
+
- Historical incident analysis
|
32
|
+
|
33
|
+
"""
|
34
|
+
|
35
|
+
version: Optional[str] = None
|
36
|
+
r"""**API Version**
|
37
|
+
|
38
|
+
The current version of the Import Content API. This information is useful for:
|
39
|
+
- Support team identification
|
40
|
+
- Known issue correlation
|
41
|
+
- Version-specific troubleshooting
|
42
|
+
- Upgrade planning
|
43
|
+
|
44
|
+
"""
|
45
|
+
|
46
|
+
|
47
|
+
@dataclass(frozen=True)
|
48
|
+
class ServiceUnavailableError(EgainError):
|
49
|
+
r"""## Service is Unhealthy
|
50
|
+
|
51
|
+
The Import Content service is experiencing critical issues and may not be able to process requests properly.
|
52
|
+
|
53
|
+
**Health Status Details:**
|
54
|
+
- **Overall Status**: Service is unhealthy and may not function correctly
|
55
|
+
|
56
|
+
**Response Information:**
|
57
|
+
- **Status**: Current health state (unhealthy)
|
58
|
+
- **Timestamp**: When health check was performed
|
59
|
+
- **Version**: Current API version
|
60
|
+
- **Issues**: List of detected health problems
|
61
|
+
|
62
|
+
"""
|
63
|
+
|
64
|
+
data: ServiceUnavailableErrorData = field(hash=False)
|
65
|
+
|
66
|
+
def __init__(
|
67
|
+
self,
|
68
|
+
data: ServiceUnavailableErrorData,
|
69
|
+
raw_response: httpx.Response,
|
70
|
+
body: Optional[str] = None,
|
71
|
+
):
|
72
|
+
message = body or raw_response.text
|
73
|
+
super().__init__(message, raw_response, body)
|
74
|
+
object.__setattr__(self, "data", data)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from dataclasses import dataclass
|
4
|
+
|
5
|
+
|
6
|
+
@dataclass(frozen=True)
|
7
|
+
class NoResponseError(Exception):
|
8
|
+
"""Error raised when no HTTP response is received from the server."""
|
9
|
+
|
10
|
+
message: str
|
11
|
+
|
12
|
+
def __init__(self, message: str = "No response received"):
|
13
|
+
object.__setattr__(self, "message", message)
|
14
|
+
super().__init__(message)
|
15
|
+
|
16
|
+
def __str__(self):
|
17
|
+
return self.message
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
import httpx
|
4
|
+
from typing import Optional
|
5
|
+
from dataclasses import dataclass
|
6
|
+
|
7
|
+
from egain_api_python.errors import EgainError
|
8
|
+
|
9
|
+
|
10
|
+
@dataclass(frozen=True)
|
11
|
+
class ResponseValidationError(EgainError):
|
12
|
+
"""Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
|
13
|
+
|
14
|
+
def __init__(
|
15
|
+
self,
|
16
|
+
message: str,
|
17
|
+
raw_response: httpx.Response,
|
18
|
+
cause: Exception,
|
19
|
+
body: Optional[str] = None,
|
20
|
+
):
|
21
|
+
message = f"{message}: {cause}"
|
22
|
+
super().__init__(message, raw_response, body)
|
23
|
+
|
24
|
+
@property
|
25
|
+
def cause(self):
|
26
|
+
"""Normally the Pydantic ValidationError"""
|
27
|
+
return self.__cause__
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from dataclasses import dataclass, field
|
5
|
+
from egain_api_python.errors import EgainError
|
6
|
+
from egain_api_python.models import (
|
7
|
+
schemas_wserrorcommon as models_schemas_wserrorcommon,
|
8
|
+
)
|
9
|
+
from egain_api_python.types import BaseModel
|
10
|
+
import httpx
|
11
|
+
import pydantic
|
12
|
+
from typing import List, Optional
|
13
|
+
from typing_extensions import Annotated
|
14
|
+
|
15
|
+
|
16
|
+
class SchemasWSErrorCommonData(BaseModel):
|
17
|
+
code: str
|
18
|
+
r"""String that follow the pattern {integer}-{integer}.
|
19
|
+
* The first part is http status code. The code is unique as a whole. Nothing common between 400-101 and 404-101
|
20
|
+
|
21
|
+
"""
|
22
|
+
|
23
|
+
developer_message: Annotated[str, pydantic.Field(alias="developerMessage")]
|
24
|
+
r"""Response explaining what happened"""
|
25
|
+
|
26
|
+
details: Optional[List[models_schemas_wserrorcommon.SchemasWSErrorCommonDetail]] = (
|
27
|
+
None
|
28
|
+
)
|
29
|
+
|
30
|
+
user_message: Annotated[Optional[str], pydantic.Field(alias="userMessage")] = None
|
31
|
+
r"""UI friendly message only supported by some API.
|
32
|
+
* Client must request explicitly by passing X-egain-error-message=yes header
|
33
|
+
|
34
|
+
"""
|
35
|
+
|
36
|
+
|
37
|
+
@dataclass(frozen=True)
|
38
|
+
class SchemasWSErrorCommon(EgainError):
|
39
|
+
r"""Preconditions failed"""
|
40
|
+
|
41
|
+
data: SchemasWSErrorCommonData = field(hash=False)
|
42
|
+
|
43
|
+
def __init__(
|
44
|
+
self,
|
45
|
+
data: SchemasWSErrorCommonData,
|
46
|
+
raw_response: httpx.Response,
|
47
|
+
body: Optional[str] = None,
|
48
|
+
):
|
49
|
+
message = body or raw_response.text
|
50
|
+
super().__init__(message, raw_response, body)
|
51
|
+
object.__setattr__(self, "data", data)
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from dataclasses import dataclass, field
|
5
|
+
from egain_api_python.errors import EgainError
|
6
|
+
from egain_api_python.models import wserrorcommon as models_wserrorcommon
|
7
|
+
from egain_api_python.types import BaseModel
|
8
|
+
import httpx
|
9
|
+
import pydantic
|
10
|
+
from typing import List, Optional
|
11
|
+
from typing_extensions import Annotated
|
12
|
+
|
13
|
+
|
14
|
+
class WSErrorCommonData(BaseModel):
|
15
|
+
code: str
|
16
|
+
r"""A string that follows the pattern *{integer}-{integer}*.
|
17
|
+
|
18
|
+
The first *{integer}* is the http status code. This code as a whole is unique.
|
19
|
+
* For example, error codes \"400-101\" and \"404-101\" are distinctly different.
|
20
|
+
|
21
|
+
"""
|
22
|
+
|
23
|
+
developer_message: Annotated[str, pydantic.Field(alias="developerMessage")]
|
24
|
+
r"""A summary of the error."""
|
25
|
+
|
26
|
+
details: Optional[List[models_wserrorcommon.WSErrorCommonDetail]] = None
|
27
|
+
|
28
|
+
user_message: Annotated[Optional[str], pydantic.Field(alias="userMessage")] = None
|
29
|
+
r"""UI friendly messages are only supported by some APIs.
|
30
|
+
* The client must explicitly request UI friendly messages by passing the *X-egain-error-message=yes* header.
|
31
|
+
|
32
|
+
"""
|
33
|
+
|
34
|
+
|
35
|
+
@dataclass(frozen=True)
|
36
|
+
class WSErrorCommon(EgainError):
|
37
|
+
r"""Bad Request"""
|
38
|
+
|
39
|
+
data: WSErrorCommonData = field(hash=False)
|
40
|
+
|
41
|
+
def __init__(
|
42
|
+
self,
|
43
|
+
data: WSErrorCommonData,
|
44
|
+
raw_response: httpx.Response,
|
45
|
+
body: Optional[str] = None,
|
46
|
+
):
|
47
|
+
message = body or raw_response.text
|
48
|
+
super().__init__(message, raw_response, body)
|
49
|
+
object.__setattr__(self, "data", data)
|