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,955 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from .basesdk import BaseSDK
|
4
|
+
from egain_api_python import errors, models, utils
|
5
|
+
from egain_api_python._hooks import HookContext
|
6
|
+
from egain_api_python.types import OptionalNullable, UNSET
|
7
|
+
from egain_api_python.utils import get_security_from_env
|
8
|
+
from egain_api_python.utils.unmarshal_json_response import unmarshal_json_response
|
9
|
+
from typing import Any, Mapping, Optional, Union
|
10
|
+
|
11
|
+
|
12
|
+
class Escalation(BaseSDK):
|
13
|
+
def start_customer_escalation(
|
14
|
+
self,
|
15
|
+
*,
|
16
|
+
accept_language: models.AcceptLanguage,
|
17
|
+
portal_id: str,
|
18
|
+
language: models.MandatoryLanguageQueryParameter,
|
19
|
+
subject: str,
|
20
|
+
body: str,
|
21
|
+
channel: models.ChannelEnum,
|
22
|
+
url: str,
|
23
|
+
customer: Optional[Union[models.Customer, models.CustomerTypedDict]] = None,
|
24
|
+
captcha: Optional[Union[models.Captcha, models.CaptchaTypedDict]] = None,
|
25
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
26
|
+
server_url: Optional[str] = None,
|
27
|
+
timeout_ms: Optional[int] = None,
|
28
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
29
|
+
) -> models.StartCustomerEscalationResponse:
|
30
|
+
r"""Start Customer Escalation
|
31
|
+
|
32
|
+
## Overview
|
33
|
+
The Start Escalation API is called to initiate an escalation and it must be called before any other escalation API.
|
34
|
+
An escalation occurs when a customer is referred to a higher level of support, such as chat or email, to address their issue.
|
35
|
+
This process is initiated when the initial support resources are insufficient by themselves.
|
36
|
+
|
37
|
+
Customer object is optional for authenticated customers. Values provided in request takes precedence over the values provided during customer registration.
|
38
|
+
|
39
|
+
|
40
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
41
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
42
|
+
:param language: The language used for fetching the details of a resource. Resources available in different languages may differ from each other.
|
43
|
+
:param subject: The subject of the email message.
|
44
|
+
:param body: The body of the email message.
|
45
|
+
:param channel: The type of escalation
|
46
|
+
:param url: The url of the page that the customer was viewing at the time when the ecalation started.
|
47
|
+
:param customer: The contact point details of the customer who is starting the escalation.
|
48
|
+
:param captcha: Only required when captcha is enabled for portal.
|
49
|
+
:param retries: Override the default retry configuration for this method
|
50
|
+
:param server_url: Override the default server URL for this method
|
51
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
52
|
+
:param http_headers: Additional headers to set or replace on requests.
|
53
|
+
"""
|
54
|
+
base_url = None
|
55
|
+
url_variables = None
|
56
|
+
if timeout_ms is None:
|
57
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
58
|
+
|
59
|
+
if server_url is not None:
|
60
|
+
base_url = server_url
|
61
|
+
else:
|
62
|
+
base_url = self._get_url(base_url, url_variables)
|
63
|
+
|
64
|
+
request = models.StartCustomerEscalationRequest(
|
65
|
+
accept_language=accept_language,
|
66
|
+
portal_id=portal_id,
|
67
|
+
language=language,
|
68
|
+
start_escalation_request=models.StartEscalationRequest(
|
69
|
+
customer=utils.get_pydantic_model(customer, Optional[models.Customer]),
|
70
|
+
subject=subject,
|
71
|
+
body=body,
|
72
|
+
channel=channel,
|
73
|
+
url=url,
|
74
|
+
captcha=utils.get_pydantic_model(captcha, Optional[models.Captcha]),
|
75
|
+
),
|
76
|
+
)
|
77
|
+
|
78
|
+
req = self._build_request(
|
79
|
+
method="POST",
|
80
|
+
path="/portals/{portalID}/escalate",
|
81
|
+
base_url=base_url,
|
82
|
+
url_variables=url_variables,
|
83
|
+
request=request,
|
84
|
+
request_body_required=True,
|
85
|
+
request_has_path_params=True,
|
86
|
+
request_has_query_params=True,
|
87
|
+
user_agent_header="user-agent",
|
88
|
+
accept_header_value="application/json",
|
89
|
+
http_headers=http_headers,
|
90
|
+
security=self.sdk_configuration.security,
|
91
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
92
|
+
request.start_escalation_request,
|
93
|
+
False,
|
94
|
+
False,
|
95
|
+
"json",
|
96
|
+
models.StartEscalationRequest,
|
97
|
+
),
|
98
|
+
timeout_ms=timeout_ms,
|
99
|
+
)
|
100
|
+
|
101
|
+
if retries == UNSET:
|
102
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
103
|
+
retries = self.sdk_configuration.retry_config
|
104
|
+
|
105
|
+
retry_config = None
|
106
|
+
if isinstance(retries, utils.RetryConfig):
|
107
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
108
|
+
|
109
|
+
http_res = self.do_request(
|
110
|
+
hook_ctx=HookContext(
|
111
|
+
config=self.sdk_configuration,
|
112
|
+
base_url=base_url or "",
|
113
|
+
operation_id="startCustomerEscalation",
|
114
|
+
oauth2_scopes=[],
|
115
|
+
security_source=get_security_from_env(
|
116
|
+
self.sdk_configuration.security, models.Security
|
117
|
+
),
|
118
|
+
),
|
119
|
+
request=req,
|
120
|
+
error_status_codes=["400", "401", "403", "406", "415", "4XX", "500", "5XX"],
|
121
|
+
retry_config=retry_config,
|
122
|
+
)
|
123
|
+
|
124
|
+
response_data: Any = None
|
125
|
+
if utils.match_response(http_res, "201", "*"):
|
126
|
+
return models.StartCustomerEscalationResponse(
|
127
|
+
headers=utils.get_response_headers(http_res.headers)
|
128
|
+
)
|
129
|
+
if utils.match_response(
|
130
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
131
|
+
):
|
132
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
133
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
134
|
+
if utils.match_response(http_res, "500", "application/json"):
|
135
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
136
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
137
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
138
|
+
http_res_text = utils.stream_to_text(http_res)
|
139
|
+
raise errors.EgainDefaultError(
|
140
|
+
"API error occurred", http_res, http_res_text
|
141
|
+
)
|
142
|
+
if utils.match_response(http_res, "5XX", "*"):
|
143
|
+
http_res_text = utils.stream_to_text(http_res)
|
144
|
+
raise errors.EgainDefaultError(
|
145
|
+
"API error occurred", http_res, http_res_text
|
146
|
+
)
|
147
|
+
|
148
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
149
|
+
|
150
|
+
async def start_customer_escalation_async(
|
151
|
+
self,
|
152
|
+
*,
|
153
|
+
accept_language: models.AcceptLanguage,
|
154
|
+
portal_id: str,
|
155
|
+
language: models.MandatoryLanguageQueryParameter,
|
156
|
+
subject: str,
|
157
|
+
body: str,
|
158
|
+
channel: models.ChannelEnum,
|
159
|
+
url: str,
|
160
|
+
customer: Optional[Union[models.Customer, models.CustomerTypedDict]] = None,
|
161
|
+
captcha: Optional[Union[models.Captcha, models.CaptchaTypedDict]] = None,
|
162
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
163
|
+
server_url: Optional[str] = None,
|
164
|
+
timeout_ms: Optional[int] = None,
|
165
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
166
|
+
) -> models.StartCustomerEscalationResponse:
|
167
|
+
r"""Start Customer Escalation
|
168
|
+
|
169
|
+
## Overview
|
170
|
+
The Start Escalation API is called to initiate an escalation and it must be called before any other escalation API.
|
171
|
+
An escalation occurs when a customer is referred to a higher level of support, such as chat or email, to address their issue.
|
172
|
+
This process is initiated when the initial support resources are insufficient by themselves.
|
173
|
+
|
174
|
+
Customer object is optional for authenticated customers. Values provided in request takes precedence over the values provided during customer registration.
|
175
|
+
|
176
|
+
|
177
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
178
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
179
|
+
:param language: The language used for fetching the details of a resource. Resources available in different languages may differ from each other.
|
180
|
+
:param subject: The subject of the email message.
|
181
|
+
:param body: The body of the email message.
|
182
|
+
:param channel: The type of escalation
|
183
|
+
:param url: The url of the page that the customer was viewing at the time when the ecalation started.
|
184
|
+
:param customer: The contact point details of the customer who is starting the escalation.
|
185
|
+
:param captcha: Only required when captcha is enabled for portal.
|
186
|
+
:param retries: Override the default retry configuration for this method
|
187
|
+
:param server_url: Override the default server URL for this method
|
188
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
189
|
+
:param http_headers: Additional headers to set or replace on requests.
|
190
|
+
"""
|
191
|
+
base_url = None
|
192
|
+
url_variables = None
|
193
|
+
if timeout_ms is None:
|
194
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
195
|
+
|
196
|
+
if server_url is not None:
|
197
|
+
base_url = server_url
|
198
|
+
else:
|
199
|
+
base_url = self._get_url(base_url, url_variables)
|
200
|
+
|
201
|
+
request = models.StartCustomerEscalationRequest(
|
202
|
+
accept_language=accept_language,
|
203
|
+
portal_id=portal_id,
|
204
|
+
language=language,
|
205
|
+
start_escalation_request=models.StartEscalationRequest(
|
206
|
+
customer=utils.get_pydantic_model(customer, Optional[models.Customer]),
|
207
|
+
subject=subject,
|
208
|
+
body=body,
|
209
|
+
channel=channel,
|
210
|
+
url=url,
|
211
|
+
captcha=utils.get_pydantic_model(captcha, Optional[models.Captcha]),
|
212
|
+
),
|
213
|
+
)
|
214
|
+
|
215
|
+
req = self._build_request_async(
|
216
|
+
method="POST",
|
217
|
+
path="/portals/{portalID}/escalate",
|
218
|
+
base_url=base_url,
|
219
|
+
url_variables=url_variables,
|
220
|
+
request=request,
|
221
|
+
request_body_required=True,
|
222
|
+
request_has_path_params=True,
|
223
|
+
request_has_query_params=True,
|
224
|
+
user_agent_header="user-agent",
|
225
|
+
accept_header_value="application/json",
|
226
|
+
http_headers=http_headers,
|
227
|
+
security=self.sdk_configuration.security,
|
228
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
229
|
+
request.start_escalation_request,
|
230
|
+
False,
|
231
|
+
False,
|
232
|
+
"json",
|
233
|
+
models.StartEscalationRequest,
|
234
|
+
),
|
235
|
+
timeout_ms=timeout_ms,
|
236
|
+
)
|
237
|
+
|
238
|
+
if retries == UNSET:
|
239
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
240
|
+
retries = self.sdk_configuration.retry_config
|
241
|
+
|
242
|
+
retry_config = None
|
243
|
+
if isinstance(retries, utils.RetryConfig):
|
244
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
245
|
+
|
246
|
+
http_res = await self.do_request_async(
|
247
|
+
hook_ctx=HookContext(
|
248
|
+
config=self.sdk_configuration,
|
249
|
+
base_url=base_url or "",
|
250
|
+
operation_id="startCustomerEscalation",
|
251
|
+
oauth2_scopes=[],
|
252
|
+
security_source=get_security_from_env(
|
253
|
+
self.sdk_configuration.security, models.Security
|
254
|
+
),
|
255
|
+
),
|
256
|
+
request=req,
|
257
|
+
error_status_codes=["400", "401", "403", "406", "415", "4XX", "500", "5XX"],
|
258
|
+
retry_config=retry_config,
|
259
|
+
)
|
260
|
+
|
261
|
+
response_data: Any = None
|
262
|
+
if utils.match_response(http_res, "201", "*"):
|
263
|
+
return models.StartCustomerEscalationResponse(
|
264
|
+
headers=utils.get_response_headers(http_res.headers)
|
265
|
+
)
|
266
|
+
if utils.match_response(
|
267
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
268
|
+
):
|
269
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
270
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
271
|
+
if utils.match_response(http_res, "500", "application/json"):
|
272
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
273
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
274
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
275
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
276
|
+
raise errors.EgainDefaultError(
|
277
|
+
"API error occurred", http_res, http_res_text
|
278
|
+
)
|
279
|
+
if utils.match_response(http_res, "5XX", "*"):
|
280
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
281
|
+
raise errors.EgainDefaultError(
|
282
|
+
"API error occurred", http_res, http_res_text
|
283
|
+
)
|
284
|
+
|
285
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
286
|
+
|
287
|
+
def search_prior_to_escalation(
|
288
|
+
self,
|
289
|
+
*,
|
290
|
+
accept_language: models.AcceptLanguage,
|
291
|
+
portal_id: str,
|
292
|
+
escalation_id: str,
|
293
|
+
filter_articles_in_topic_tree: Optional[str] = None,
|
294
|
+
additional_attributes: Optional[models.OptionalArticleAttributes] = None,
|
295
|
+
max_results: Optional[int] = None,
|
296
|
+
pagenum: Optional[int] = 1,
|
297
|
+
pagesize: Optional[int] = 25,
|
298
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
299
|
+
server_url: Optional[str] = None,
|
300
|
+
timeout_ms: Optional[int] = None,
|
301
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
302
|
+
) -> Optional[models.ArticleSearchResults]:
|
303
|
+
r"""Search Prior To Customer Escalation
|
304
|
+
|
305
|
+
## Overview
|
306
|
+
The Search Prior to Customer Escalation API performs search on the subject and description parameters, but filters out any articles that the customer has viewed in the current session.
|
307
|
+
|
308
|
+
|
309
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
310
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
311
|
+
:param escalation_id: The ID (uuid) of the customer escalation.
|
312
|
+
:param filter_articles_in_topic_tree: This parameter will restrict the search scope to the provided topic and it's sub topic.
|
313
|
+
:param additional_attributes: The fields of the article to be returned.
|
314
|
+
:param max_results: The \"maxResults\" parameter specifies the number of articles that should be included in the response. It is only required when the escalation type is chat escalation.If not specified then default value 5 will be considered for chat escalation. If the escalation type is email, the maximum results value specified in the portal settings for email escalation will be taken into consideration.
|
315
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
316
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.<br>Valid range of 5-75<br>_Default value_: 25
|
317
|
+
:param retries: Override the default retry configuration for this method
|
318
|
+
:param server_url: Override the default server URL for this method
|
319
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
320
|
+
:param http_headers: Additional headers to set or replace on requests.
|
321
|
+
"""
|
322
|
+
base_url = None
|
323
|
+
url_variables = None
|
324
|
+
if timeout_ms is None:
|
325
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
326
|
+
|
327
|
+
if server_url is not None:
|
328
|
+
base_url = server_url
|
329
|
+
else:
|
330
|
+
base_url = self._get_url(base_url, url_variables)
|
331
|
+
|
332
|
+
request = models.SearchPriorToEscalationRequest(
|
333
|
+
accept_language=accept_language,
|
334
|
+
portal_id=portal_id,
|
335
|
+
escalation_id=escalation_id,
|
336
|
+
filter_articles_in_topic_tree=filter_articles_in_topic_tree,
|
337
|
+
additional_attributes=additional_attributes,
|
338
|
+
max_results=max_results,
|
339
|
+
pagenum=pagenum,
|
340
|
+
pagesize=pagesize,
|
341
|
+
)
|
342
|
+
|
343
|
+
req = self._build_request(
|
344
|
+
method="GET",
|
345
|
+
path="/portals/{portalID}/escalate/{escalationId}/search",
|
346
|
+
base_url=base_url,
|
347
|
+
url_variables=url_variables,
|
348
|
+
request=request,
|
349
|
+
request_body_required=False,
|
350
|
+
request_has_path_params=True,
|
351
|
+
request_has_query_params=True,
|
352
|
+
user_agent_header="user-agent",
|
353
|
+
accept_header_value="application/json",
|
354
|
+
http_headers=http_headers,
|
355
|
+
security=self.sdk_configuration.security,
|
356
|
+
timeout_ms=timeout_ms,
|
357
|
+
)
|
358
|
+
|
359
|
+
if retries == UNSET:
|
360
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
361
|
+
retries = self.sdk_configuration.retry_config
|
362
|
+
|
363
|
+
retry_config = None
|
364
|
+
if isinstance(retries, utils.RetryConfig):
|
365
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
366
|
+
|
367
|
+
http_res = self.do_request(
|
368
|
+
hook_ctx=HookContext(
|
369
|
+
config=self.sdk_configuration,
|
370
|
+
base_url=base_url or "",
|
371
|
+
operation_id="searchPriorToEscalation",
|
372
|
+
oauth2_scopes=[],
|
373
|
+
security_source=get_security_from_env(
|
374
|
+
self.sdk_configuration.security, models.Security
|
375
|
+
),
|
376
|
+
),
|
377
|
+
request=req,
|
378
|
+
error_status_codes=["400", "401", "403", "406", "4XX", "500", "5XX"],
|
379
|
+
retry_config=retry_config,
|
380
|
+
)
|
381
|
+
|
382
|
+
response_data: Any = None
|
383
|
+
if utils.match_response(http_res, "200", "application/json"):
|
384
|
+
return unmarshal_json_response(models.ArticleSearchResults, http_res)
|
385
|
+
if utils.match_response(http_res, "204", "*"):
|
386
|
+
return None
|
387
|
+
if utils.match_response(
|
388
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
389
|
+
):
|
390
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
391
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
392
|
+
if utils.match_response(http_res, "500", "application/json"):
|
393
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
394
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
395
|
+
if utils.match_response(http_res, "4XX", "*"):
|
396
|
+
http_res_text = utils.stream_to_text(http_res)
|
397
|
+
raise errors.EgainDefaultError(
|
398
|
+
"API error occurred", http_res, http_res_text
|
399
|
+
)
|
400
|
+
if utils.match_response(http_res, "5XX", "*"):
|
401
|
+
http_res_text = utils.stream_to_text(http_res)
|
402
|
+
raise errors.EgainDefaultError(
|
403
|
+
"API error occurred", http_res, http_res_text
|
404
|
+
)
|
405
|
+
|
406
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
407
|
+
|
408
|
+
async def search_prior_to_escalation_async(
|
409
|
+
self,
|
410
|
+
*,
|
411
|
+
accept_language: models.AcceptLanguage,
|
412
|
+
portal_id: str,
|
413
|
+
escalation_id: str,
|
414
|
+
filter_articles_in_topic_tree: Optional[str] = None,
|
415
|
+
additional_attributes: Optional[models.OptionalArticleAttributes] = None,
|
416
|
+
max_results: Optional[int] = None,
|
417
|
+
pagenum: Optional[int] = 1,
|
418
|
+
pagesize: Optional[int] = 25,
|
419
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
420
|
+
server_url: Optional[str] = None,
|
421
|
+
timeout_ms: Optional[int] = None,
|
422
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
423
|
+
) -> Optional[models.ArticleSearchResults]:
|
424
|
+
r"""Search Prior To Customer Escalation
|
425
|
+
|
426
|
+
## Overview
|
427
|
+
The Search Prior to Customer Escalation API performs search on the subject and description parameters, but filters out any articles that the customer has viewed in the current session.
|
428
|
+
|
429
|
+
|
430
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
431
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
432
|
+
:param escalation_id: The ID (uuid) of the customer escalation.
|
433
|
+
:param filter_articles_in_topic_tree: This parameter will restrict the search scope to the provided topic and it's sub topic.
|
434
|
+
:param additional_attributes: The fields of the article to be returned.
|
435
|
+
:param max_results: The \"maxResults\" parameter specifies the number of articles that should be included in the response. It is only required when the escalation type is chat escalation.If not specified then default value 5 will be considered for chat escalation. If the escalation type is email, the maximum results value specified in the portal settings for email escalation will be taken into consideration.
|
436
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
437
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.<br>Valid range of 5-75<br>_Default value_: 25
|
438
|
+
:param retries: Override the default retry configuration for this method
|
439
|
+
:param server_url: Override the default server URL for this method
|
440
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
441
|
+
:param http_headers: Additional headers to set or replace on requests.
|
442
|
+
"""
|
443
|
+
base_url = None
|
444
|
+
url_variables = None
|
445
|
+
if timeout_ms is None:
|
446
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
447
|
+
|
448
|
+
if server_url is not None:
|
449
|
+
base_url = server_url
|
450
|
+
else:
|
451
|
+
base_url = self._get_url(base_url, url_variables)
|
452
|
+
|
453
|
+
request = models.SearchPriorToEscalationRequest(
|
454
|
+
accept_language=accept_language,
|
455
|
+
portal_id=portal_id,
|
456
|
+
escalation_id=escalation_id,
|
457
|
+
filter_articles_in_topic_tree=filter_articles_in_topic_tree,
|
458
|
+
additional_attributes=additional_attributes,
|
459
|
+
max_results=max_results,
|
460
|
+
pagenum=pagenum,
|
461
|
+
pagesize=pagesize,
|
462
|
+
)
|
463
|
+
|
464
|
+
req = self._build_request_async(
|
465
|
+
method="GET",
|
466
|
+
path="/portals/{portalID}/escalate/{escalationId}/search",
|
467
|
+
base_url=base_url,
|
468
|
+
url_variables=url_variables,
|
469
|
+
request=request,
|
470
|
+
request_body_required=False,
|
471
|
+
request_has_path_params=True,
|
472
|
+
request_has_query_params=True,
|
473
|
+
user_agent_header="user-agent",
|
474
|
+
accept_header_value="application/json",
|
475
|
+
http_headers=http_headers,
|
476
|
+
security=self.sdk_configuration.security,
|
477
|
+
timeout_ms=timeout_ms,
|
478
|
+
)
|
479
|
+
|
480
|
+
if retries == UNSET:
|
481
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
482
|
+
retries = self.sdk_configuration.retry_config
|
483
|
+
|
484
|
+
retry_config = None
|
485
|
+
if isinstance(retries, utils.RetryConfig):
|
486
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
487
|
+
|
488
|
+
http_res = await self.do_request_async(
|
489
|
+
hook_ctx=HookContext(
|
490
|
+
config=self.sdk_configuration,
|
491
|
+
base_url=base_url or "",
|
492
|
+
operation_id="searchPriorToEscalation",
|
493
|
+
oauth2_scopes=[],
|
494
|
+
security_source=get_security_from_env(
|
495
|
+
self.sdk_configuration.security, models.Security
|
496
|
+
),
|
497
|
+
),
|
498
|
+
request=req,
|
499
|
+
error_status_codes=["400", "401", "403", "406", "4XX", "500", "5XX"],
|
500
|
+
retry_config=retry_config,
|
501
|
+
)
|
502
|
+
|
503
|
+
response_data: Any = None
|
504
|
+
if utils.match_response(http_res, "200", "application/json"):
|
505
|
+
return unmarshal_json_response(models.ArticleSearchResults, http_res)
|
506
|
+
if utils.match_response(http_res, "204", "*"):
|
507
|
+
return None
|
508
|
+
if utils.match_response(
|
509
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
510
|
+
):
|
511
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
512
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
513
|
+
if utils.match_response(http_res, "500", "application/json"):
|
514
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
515
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
516
|
+
if utils.match_response(http_res, "4XX", "*"):
|
517
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
518
|
+
raise errors.EgainDefaultError(
|
519
|
+
"API error occurred", http_res, http_res_text
|
520
|
+
)
|
521
|
+
if utils.match_response(http_res, "5XX", "*"):
|
522
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
523
|
+
raise errors.EgainDefaultError(
|
524
|
+
"API error occurred", http_res, http_res_text
|
525
|
+
)
|
526
|
+
|
527
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
528
|
+
|
529
|
+
def complete_customer_escalation(
|
530
|
+
self,
|
531
|
+
*,
|
532
|
+
accept_language: models.AcceptLanguage,
|
533
|
+
portal_id: str,
|
534
|
+
escalation_id: str,
|
535
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
536
|
+
server_url: Optional[str] = None,
|
537
|
+
timeout_ms: Optional[int] = None,
|
538
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
539
|
+
):
|
540
|
+
r"""Complete Customer Escalation
|
541
|
+
|
542
|
+
## Overview
|
543
|
+
The Complete Customer Escalation API allows customer to complete escalation and send an email to a customer service agent on behalf of the customer.
|
544
|
+
|
545
|
+
After invoking the Complete Escalation or Avert Escalation APIs, the escalation ID associated with the escalation becomes invalid.
|
546
|
+
**Important:** Further attempts to use or reference the same escalation ID results in an error or failure.
|
547
|
+
|
548
|
+
|
549
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
550
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
551
|
+
:param escalation_id: The ID (uuid) of the customer escalation.
|
552
|
+
:param retries: Override the default retry configuration for this method
|
553
|
+
:param server_url: Override the default server URL for this method
|
554
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
555
|
+
:param http_headers: Additional headers to set or replace on requests.
|
556
|
+
"""
|
557
|
+
base_url = None
|
558
|
+
url_variables = None
|
559
|
+
if timeout_ms is None:
|
560
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
561
|
+
|
562
|
+
if server_url is not None:
|
563
|
+
base_url = server_url
|
564
|
+
else:
|
565
|
+
base_url = self._get_url(base_url, url_variables)
|
566
|
+
|
567
|
+
request = models.CompleteCustomerEscalationRequest(
|
568
|
+
accept_language=accept_language,
|
569
|
+
portal_id=portal_id,
|
570
|
+
escalation_id=escalation_id,
|
571
|
+
)
|
572
|
+
|
573
|
+
req = self._build_request(
|
574
|
+
method="PUT",
|
575
|
+
path="/portals/{portalID}/escalate/{escalationId}/complete",
|
576
|
+
base_url=base_url,
|
577
|
+
url_variables=url_variables,
|
578
|
+
request=request,
|
579
|
+
request_body_required=False,
|
580
|
+
request_has_path_params=True,
|
581
|
+
request_has_query_params=True,
|
582
|
+
user_agent_header="user-agent",
|
583
|
+
accept_header_value="application/json",
|
584
|
+
http_headers=http_headers,
|
585
|
+
security=self.sdk_configuration.security,
|
586
|
+
timeout_ms=timeout_ms,
|
587
|
+
)
|
588
|
+
|
589
|
+
if retries == UNSET:
|
590
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
591
|
+
retries = self.sdk_configuration.retry_config
|
592
|
+
|
593
|
+
retry_config = None
|
594
|
+
if isinstance(retries, utils.RetryConfig):
|
595
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
596
|
+
|
597
|
+
http_res = self.do_request(
|
598
|
+
hook_ctx=HookContext(
|
599
|
+
config=self.sdk_configuration,
|
600
|
+
base_url=base_url or "",
|
601
|
+
operation_id="completeCustomerEscalation",
|
602
|
+
oauth2_scopes=[],
|
603
|
+
security_source=get_security_from_env(
|
604
|
+
self.sdk_configuration.security, models.Security
|
605
|
+
),
|
606
|
+
),
|
607
|
+
request=req,
|
608
|
+
error_status_codes=["400", "401", "403", "406", "4XX", "500", "5XX"],
|
609
|
+
retry_config=retry_config,
|
610
|
+
)
|
611
|
+
|
612
|
+
response_data: Any = None
|
613
|
+
if utils.match_response(http_res, "204", "*"):
|
614
|
+
return
|
615
|
+
if utils.match_response(
|
616
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
617
|
+
):
|
618
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
619
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
620
|
+
if utils.match_response(http_res, "500", "application/json"):
|
621
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
622
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
623
|
+
if utils.match_response(http_res, "4XX", "*"):
|
624
|
+
http_res_text = utils.stream_to_text(http_res)
|
625
|
+
raise errors.EgainDefaultError(
|
626
|
+
"API error occurred", http_res, http_res_text
|
627
|
+
)
|
628
|
+
if utils.match_response(http_res, "5XX", "*"):
|
629
|
+
http_res_text = utils.stream_to_text(http_res)
|
630
|
+
raise errors.EgainDefaultError(
|
631
|
+
"API error occurred", http_res, http_res_text
|
632
|
+
)
|
633
|
+
|
634
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
635
|
+
|
636
|
+
async def complete_customer_escalation_async(
|
637
|
+
self,
|
638
|
+
*,
|
639
|
+
accept_language: models.AcceptLanguage,
|
640
|
+
portal_id: str,
|
641
|
+
escalation_id: str,
|
642
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
643
|
+
server_url: Optional[str] = None,
|
644
|
+
timeout_ms: Optional[int] = None,
|
645
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
646
|
+
):
|
647
|
+
r"""Complete Customer Escalation
|
648
|
+
|
649
|
+
## Overview
|
650
|
+
The Complete Customer Escalation API allows customer to complete escalation and send an email to a customer service agent on behalf of the customer.
|
651
|
+
|
652
|
+
After invoking the Complete Escalation or Avert Escalation APIs, the escalation ID associated with the escalation becomes invalid.
|
653
|
+
**Important:** Further attempts to use or reference the same escalation ID results in an error or failure.
|
654
|
+
|
655
|
+
|
656
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
657
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
658
|
+
:param escalation_id: The ID (uuid) of the customer escalation.
|
659
|
+
:param retries: Override the default retry configuration for this method
|
660
|
+
:param server_url: Override the default server URL for this method
|
661
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
662
|
+
:param http_headers: Additional headers to set or replace on requests.
|
663
|
+
"""
|
664
|
+
base_url = None
|
665
|
+
url_variables = None
|
666
|
+
if timeout_ms is None:
|
667
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
668
|
+
|
669
|
+
if server_url is not None:
|
670
|
+
base_url = server_url
|
671
|
+
else:
|
672
|
+
base_url = self._get_url(base_url, url_variables)
|
673
|
+
|
674
|
+
request = models.CompleteCustomerEscalationRequest(
|
675
|
+
accept_language=accept_language,
|
676
|
+
portal_id=portal_id,
|
677
|
+
escalation_id=escalation_id,
|
678
|
+
)
|
679
|
+
|
680
|
+
req = self._build_request_async(
|
681
|
+
method="PUT",
|
682
|
+
path="/portals/{portalID}/escalate/{escalationId}/complete",
|
683
|
+
base_url=base_url,
|
684
|
+
url_variables=url_variables,
|
685
|
+
request=request,
|
686
|
+
request_body_required=False,
|
687
|
+
request_has_path_params=True,
|
688
|
+
request_has_query_params=True,
|
689
|
+
user_agent_header="user-agent",
|
690
|
+
accept_header_value="application/json",
|
691
|
+
http_headers=http_headers,
|
692
|
+
security=self.sdk_configuration.security,
|
693
|
+
timeout_ms=timeout_ms,
|
694
|
+
)
|
695
|
+
|
696
|
+
if retries == UNSET:
|
697
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
698
|
+
retries = self.sdk_configuration.retry_config
|
699
|
+
|
700
|
+
retry_config = None
|
701
|
+
if isinstance(retries, utils.RetryConfig):
|
702
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
703
|
+
|
704
|
+
http_res = await self.do_request_async(
|
705
|
+
hook_ctx=HookContext(
|
706
|
+
config=self.sdk_configuration,
|
707
|
+
base_url=base_url or "",
|
708
|
+
operation_id="completeCustomerEscalation",
|
709
|
+
oauth2_scopes=[],
|
710
|
+
security_source=get_security_from_env(
|
711
|
+
self.sdk_configuration.security, models.Security
|
712
|
+
),
|
713
|
+
),
|
714
|
+
request=req,
|
715
|
+
error_status_codes=["400", "401", "403", "406", "4XX", "500", "5XX"],
|
716
|
+
retry_config=retry_config,
|
717
|
+
)
|
718
|
+
|
719
|
+
response_data: Any = None
|
720
|
+
if utils.match_response(http_res, "204", "*"):
|
721
|
+
return
|
722
|
+
if utils.match_response(
|
723
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
724
|
+
):
|
725
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
726
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
727
|
+
if utils.match_response(http_res, "500", "application/json"):
|
728
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
729
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
730
|
+
if utils.match_response(http_res, "4XX", "*"):
|
731
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
732
|
+
raise errors.EgainDefaultError(
|
733
|
+
"API error occurred", http_res, http_res_text
|
734
|
+
)
|
735
|
+
if utils.match_response(http_res, "5XX", "*"):
|
736
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
737
|
+
raise errors.EgainDefaultError(
|
738
|
+
"API error occurred", http_res, http_res_text
|
739
|
+
)
|
740
|
+
|
741
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
742
|
+
|
743
|
+
def avert_customer_escalation(
|
744
|
+
self,
|
745
|
+
*,
|
746
|
+
accept_language: models.AcceptLanguage,
|
747
|
+
portal_id: str,
|
748
|
+
escalation_id: str,
|
749
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
750
|
+
server_url: Optional[str] = None,
|
751
|
+
timeout_ms: Optional[int] = None,
|
752
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
753
|
+
):
|
754
|
+
r"""Avert Customer Escalation
|
755
|
+
|
756
|
+
## Overview
|
757
|
+
The Avert Customer Escalation API notifies the server that escalation to a live agent has been averted. Usually this means that the customer found the information they needed.
|
758
|
+
|
759
|
+
After invoking the Complete Escalation or Avert Escalation APIs, the escalation ID associated with the escalation becomes invalid.
|
760
|
+
**Important:** Further attempts to use or reference the same escalation ID results in an error or failure.
|
761
|
+
|
762
|
+
|
763
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
764
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
765
|
+
:param escalation_id: The ID (uuid) of the customer escalation.
|
766
|
+
:param retries: Override the default retry configuration for this method
|
767
|
+
:param server_url: Override the default server URL for this method
|
768
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
769
|
+
:param http_headers: Additional headers to set or replace on requests.
|
770
|
+
"""
|
771
|
+
base_url = None
|
772
|
+
url_variables = None
|
773
|
+
if timeout_ms is None:
|
774
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
775
|
+
|
776
|
+
if server_url is not None:
|
777
|
+
base_url = server_url
|
778
|
+
else:
|
779
|
+
base_url = self._get_url(base_url, url_variables)
|
780
|
+
|
781
|
+
request = models.AvertCustomerEscalationRequest(
|
782
|
+
accept_language=accept_language,
|
783
|
+
portal_id=portal_id,
|
784
|
+
escalation_id=escalation_id,
|
785
|
+
)
|
786
|
+
|
787
|
+
req = self._build_request(
|
788
|
+
method="PUT",
|
789
|
+
path="/portals/{portalID}/escalate/{escalationId}/avert",
|
790
|
+
base_url=base_url,
|
791
|
+
url_variables=url_variables,
|
792
|
+
request=request,
|
793
|
+
request_body_required=False,
|
794
|
+
request_has_path_params=True,
|
795
|
+
request_has_query_params=True,
|
796
|
+
user_agent_header="user-agent",
|
797
|
+
accept_header_value="application/json",
|
798
|
+
http_headers=http_headers,
|
799
|
+
security=self.sdk_configuration.security,
|
800
|
+
timeout_ms=timeout_ms,
|
801
|
+
)
|
802
|
+
|
803
|
+
if retries == UNSET:
|
804
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
805
|
+
retries = self.sdk_configuration.retry_config
|
806
|
+
|
807
|
+
retry_config = None
|
808
|
+
if isinstance(retries, utils.RetryConfig):
|
809
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
810
|
+
|
811
|
+
http_res = self.do_request(
|
812
|
+
hook_ctx=HookContext(
|
813
|
+
config=self.sdk_configuration,
|
814
|
+
base_url=base_url or "",
|
815
|
+
operation_id="avertCustomerEscalation",
|
816
|
+
oauth2_scopes=[],
|
817
|
+
security_source=get_security_from_env(
|
818
|
+
self.sdk_configuration.security, models.Security
|
819
|
+
),
|
820
|
+
),
|
821
|
+
request=req,
|
822
|
+
error_status_codes=["400", "401", "403", "406", "4XX", "500", "5XX"],
|
823
|
+
retry_config=retry_config,
|
824
|
+
)
|
825
|
+
|
826
|
+
response_data: Any = None
|
827
|
+
if utils.match_response(http_res, "204", "*"):
|
828
|
+
return
|
829
|
+
if utils.match_response(
|
830
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
831
|
+
):
|
832
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
833
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
834
|
+
if utils.match_response(http_res, "500", "application/json"):
|
835
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
836
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
837
|
+
if utils.match_response(http_res, "4XX", "*"):
|
838
|
+
http_res_text = utils.stream_to_text(http_res)
|
839
|
+
raise errors.EgainDefaultError(
|
840
|
+
"API error occurred", http_res, http_res_text
|
841
|
+
)
|
842
|
+
if utils.match_response(http_res, "5XX", "*"):
|
843
|
+
http_res_text = utils.stream_to_text(http_res)
|
844
|
+
raise errors.EgainDefaultError(
|
845
|
+
"API error occurred", http_res, http_res_text
|
846
|
+
)
|
847
|
+
|
848
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
849
|
+
|
850
|
+
async def avert_customer_escalation_async(
|
851
|
+
self,
|
852
|
+
*,
|
853
|
+
accept_language: models.AcceptLanguage,
|
854
|
+
portal_id: str,
|
855
|
+
escalation_id: str,
|
856
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
857
|
+
server_url: Optional[str] = None,
|
858
|
+
timeout_ms: Optional[int] = None,
|
859
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
860
|
+
):
|
861
|
+
r"""Avert Customer Escalation
|
862
|
+
|
863
|
+
## Overview
|
864
|
+
The Avert Customer Escalation API notifies the server that escalation to a live agent has been averted. Usually this means that the customer found the information they needed.
|
865
|
+
|
866
|
+
After invoking the Complete Escalation or Avert Escalation APIs, the escalation ID associated with the escalation becomes invalid.
|
867
|
+
**Important:** Further attempts to use or reference the same escalation ID results in an error or failure.
|
868
|
+
|
869
|
+
|
870
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
871
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
872
|
+
:param escalation_id: The ID (uuid) of the customer escalation.
|
873
|
+
:param retries: Override the default retry configuration for this method
|
874
|
+
:param server_url: Override the default server URL for this method
|
875
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
876
|
+
:param http_headers: Additional headers to set or replace on requests.
|
877
|
+
"""
|
878
|
+
base_url = None
|
879
|
+
url_variables = None
|
880
|
+
if timeout_ms is None:
|
881
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
882
|
+
|
883
|
+
if server_url is not None:
|
884
|
+
base_url = server_url
|
885
|
+
else:
|
886
|
+
base_url = self._get_url(base_url, url_variables)
|
887
|
+
|
888
|
+
request = models.AvertCustomerEscalationRequest(
|
889
|
+
accept_language=accept_language,
|
890
|
+
portal_id=portal_id,
|
891
|
+
escalation_id=escalation_id,
|
892
|
+
)
|
893
|
+
|
894
|
+
req = self._build_request_async(
|
895
|
+
method="PUT",
|
896
|
+
path="/portals/{portalID}/escalate/{escalationId}/avert",
|
897
|
+
base_url=base_url,
|
898
|
+
url_variables=url_variables,
|
899
|
+
request=request,
|
900
|
+
request_body_required=False,
|
901
|
+
request_has_path_params=True,
|
902
|
+
request_has_query_params=True,
|
903
|
+
user_agent_header="user-agent",
|
904
|
+
accept_header_value="application/json",
|
905
|
+
http_headers=http_headers,
|
906
|
+
security=self.sdk_configuration.security,
|
907
|
+
timeout_ms=timeout_ms,
|
908
|
+
)
|
909
|
+
|
910
|
+
if retries == UNSET:
|
911
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
912
|
+
retries = self.sdk_configuration.retry_config
|
913
|
+
|
914
|
+
retry_config = None
|
915
|
+
if isinstance(retries, utils.RetryConfig):
|
916
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
917
|
+
|
918
|
+
http_res = await self.do_request_async(
|
919
|
+
hook_ctx=HookContext(
|
920
|
+
config=self.sdk_configuration,
|
921
|
+
base_url=base_url or "",
|
922
|
+
operation_id="avertCustomerEscalation",
|
923
|
+
oauth2_scopes=[],
|
924
|
+
security_source=get_security_from_env(
|
925
|
+
self.sdk_configuration.security, models.Security
|
926
|
+
),
|
927
|
+
),
|
928
|
+
request=req,
|
929
|
+
error_status_codes=["400", "401", "403", "406", "4XX", "500", "5XX"],
|
930
|
+
retry_config=retry_config,
|
931
|
+
)
|
932
|
+
|
933
|
+
response_data: Any = None
|
934
|
+
if utils.match_response(http_res, "204", "*"):
|
935
|
+
return
|
936
|
+
if utils.match_response(
|
937
|
+
http_res, ["400", "401", "403", "406"], "application/json"
|
938
|
+
):
|
939
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
940
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
941
|
+
if utils.match_response(http_res, "500", "application/json"):
|
942
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
943
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
944
|
+
if utils.match_response(http_res, "4XX", "*"):
|
945
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
946
|
+
raise errors.EgainDefaultError(
|
947
|
+
"API error occurred", http_res, http_res_text
|
948
|
+
)
|
949
|
+
if utils.match_response(http_res, "5XX", "*"):
|
950
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
951
|
+
raise errors.EgainDefaultError(
|
952
|
+
"API error occurred", http_res, http_res_text
|
953
|
+
)
|
954
|
+
|
955
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|