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,52 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .detailfield import DetailField, DetailFieldTypedDict
|
5
|
+
from .displayfield import DisplayField, DisplayFieldTypedDict
|
6
|
+
from egain_api_python.types import BaseModel
|
7
|
+
import pydantic
|
8
|
+
from typing import List, Optional
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class VirtualCaseTypedDict(TypedDict):
|
13
|
+
id: NotRequired[str]
|
14
|
+
r"""ID of the case"""
|
15
|
+
detail_field: NotRequired[List[DetailFieldTypedDict]]
|
16
|
+
r"""detail fields"""
|
17
|
+
display_field: NotRequired[List[DisplayFieldTypedDict]]
|
18
|
+
r"""display fields"""
|
19
|
+
dynamic_cluster_id: NotRequired[str]
|
20
|
+
r"""Cluster id"""
|
21
|
+
title: NotRequired[str]
|
22
|
+
r"""name of the case"""
|
23
|
+
virtual_case_id: NotRequired[str]
|
24
|
+
r"""virtual case id"""
|
25
|
+
|
26
|
+
|
27
|
+
class VirtualCase(BaseModel):
|
28
|
+
id: Optional[str] = None
|
29
|
+
r"""ID of the case"""
|
30
|
+
|
31
|
+
detail_field: Annotated[
|
32
|
+
Optional[List[DetailField]], pydantic.Field(alias="detailField")
|
33
|
+
] = None
|
34
|
+
r"""detail fields"""
|
35
|
+
|
36
|
+
display_field: Annotated[
|
37
|
+
Optional[List[DisplayField]], pydantic.Field(alias="displayField")
|
38
|
+
] = None
|
39
|
+
r"""display fields"""
|
40
|
+
|
41
|
+
dynamic_cluster_id: Annotated[
|
42
|
+
Optional[str], pydantic.Field(alias="dynamicClusterId")
|
43
|
+
] = None
|
44
|
+
r"""Cluster id"""
|
45
|
+
|
46
|
+
title: Optional[str] = None
|
47
|
+
r"""name of the case"""
|
48
|
+
|
49
|
+
virtual_case_id: Annotated[Optional[str], pydantic.Field(alias="virtualCaseId")] = (
|
50
|
+
None
|
51
|
+
)
|
52
|
+
r"""virtual case id"""
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .stage import Stage, StageTypedDict
|
5
|
+
from egain_api_python.types import BaseModel
|
6
|
+
from typing import List, Optional
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
8
|
+
|
9
|
+
|
10
|
+
class WorkflowTypedDict(TypedDict):
|
11
|
+
r"""The Article's workflow."""
|
12
|
+
|
13
|
+
stages: NotRequired[List[StageTypedDict]]
|
14
|
+
r"""An array of stages for the workflow."""
|
15
|
+
|
16
|
+
|
17
|
+
class Workflow(BaseModel):
|
18
|
+
r"""The Article's workflow."""
|
19
|
+
|
20
|
+
stages: Optional[List[Stage]] = None
|
21
|
+
r"""An array of stages for the workflow."""
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from egain_api_python.types import BaseModel
|
5
|
+
from typing import Optional
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class WSErrorCommonDetailTypedDict(TypedDict):
|
10
|
+
key: str
|
11
|
+
value: NotRequired[str]
|
12
|
+
|
13
|
+
|
14
|
+
class WSErrorCommonDetail(BaseModel):
|
15
|
+
key: str
|
16
|
+
|
17
|
+
value: Optional[str] = None
|
@@ -0,0 +1,287 @@
|
|
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, List, Mapping, Optional
|
10
|
+
|
11
|
+
|
12
|
+
class Populararticles(BaseSDK):
|
13
|
+
def getpopulararticles(
|
14
|
+
self,
|
15
|
+
*,
|
16
|
+
accept_language: models.AcceptLanguage,
|
17
|
+
portal_id: str,
|
18
|
+
dollar_filter_topic_id: Optional[str] = None,
|
19
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
20
|
+
dollar_filter_tags: Optional[str] = None,
|
21
|
+
pagenum: Optional[int] = 1,
|
22
|
+
pagesize: Optional[int] = 10,
|
23
|
+
article_result_additional_attributes: Optional[
|
24
|
+
List[models.ArticleResultAdditionalAttributes]
|
25
|
+
] = None,
|
26
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
27
|
+
server_url: Optional[str] = None,
|
28
|
+
timeout_ms: Optional[int] = None,
|
29
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
30
|
+
) -> Optional[models.ArticleResults]:
|
31
|
+
r"""Get Popular Articles
|
32
|
+
|
33
|
+
## Overview
|
34
|
+
The Popular Articles API allows a user to retrieve popular articles.
|
35
|
+
## Prerequisites
|
36
|
+
* Only displayable articles are returned. An Article is displayable when \"Include in browse on portals\" property is enable for the Article.
|
37
|
+
## Permissions
|
38
|
+
* Agent permissions: The following permissions are required if user is an Agent:
|
39
|
+
* If Article has Access Tags, Article must be available for agent's current user profile.
|
40
|
+
* If Article has Publish Views, at least one edition of Article must be available for agent's current user profile.
|
41
|
+
* If Article has filters and tags query parameter provided, Article filters must match provided tags or tag groups.
|
42
|
+
* Customer permissions: The following permissions are required if user is a Customer:
|
43
|
+
* If Article has Access tags:
|
44
|
+
* Portal must have default user profile, and;
|
45
|
+
* Article must be available for portal's default user profile.
|
46
|
+
* If Article has Publish Views:
|
47
|
+
* Portal must have default user profile, and;
|
48
|
+
* At least one edition must be available for portal's default user profile.
|
49
|
+
* If Article has filters and tags query parameter provided, Article filters must match provided tags or tag groups.
|
50
|
+
|
51
|
+
|
52
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
53
|
+
: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.
|
54
|
+
:param dollar_filter_topic_id: The ID of the topic. It is used to restrict to a specific topic.
|
55
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
56
|
+
:param dollar_filter_tags: A comma separated list of Tag / Tag Group IDs. The query results will be filtered by the tags that are specified.<br><br>Tag IDs and Tag Group IDs can be mixed together.
|
57
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
58
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
59
|
+
:param article_result_additional_attributes: The attributes of an Article to be returned *in addition to* the default list of attributes, listed below. Multiple additional attributes can be specified using a comma-separated list. Passing 'all' will return all attributes. #### Default Attributes These Article attributes are always returned: | Name | Description | ---- | ----------- | id | The ID of the Article. | name | The name of the Article. | articleType | The Article Type and its attributes. | createdBy | The ID, first name, middle name and last name of the user that created the Article. | createdDate | The date that the Article was created. | hasAttachments | True: The Article has one or more attachments.<br>False: The Article does not have any attachments. | languageCode | The language code of the Article language. | modifiedBy | The ID, first name, middle name and last name of the user that last modified the Article. | modifiedDate | The date that the Article was last modified on. | link | The link object, used to retrieve the details of the Article. | versionId | The ID of the Article version that is returned.
|
60
|
+
:param retries: Override the default retry configuration for this method
|
61
|
+
:param server_url: Override the default server URL for this method
|
62
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
63
|
+
:param http_headers: Additional headers to set or replace on requests.
|
64
|
+
"""
|
65
|
+
base_url = None
|
66
|
+
url_variables = None
|
67
|
+
if timeout_ms is None:
|
68
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
69
|
+
|
70
|
+
if server_url is not None:
|
71
|
+
base_url = server_url
|
72
|
+
else:
|
73
|
+
base_url = self._get_url(base_url, url_variables)
|
74
|
+
|
75
|
+
request = models.GetpopulararticlesRequest(
|
76
|
+
accept_language=accept_language,
|
77
|
+
portal_id=portal_id,
|
78
|
+
dollar_filter_topic_id=dollar_filter_topic_id,
|
79
|
+
language=language,
|
80
|
+
dollar_filter_tags=dollar_filter_tags,
|
81
|
+
pagenum=pagenum,
|
82
|
+
pagesize=pagesize,
|
83
|
+
article_result_additional_attributes=article_result_additional_attributes,
|
84
|
+
)
|
85
|
+
|
86
|
+
req = self._build_request(
|
87
|
+
method="GET",
|
88
|
+
path="/portals/{portalID}/populararticles",
|
89
|
+
base_url=base_url,
|
90
|
+
url_variables=url_variables,
|
91
|
+
request=request,
|
92
|
+
request_body_required=False,
|
93
|
+
request_has_path_params=True,
|
94
|
+
request_has_query_params=True,
|
95
|
+
user_agent_header="user-agent",
|
96
|
+
accept_header_value="application/json",
|
97
|
+
http_headers=http_headers,
|
98
|
+
security=self.sdk_configuration.security,
|
99
|
+
timeout_ms=timeout_ms,
|
100
|
+
)
|
101
|
+
|
102
|
+
if retries == UNSET:
|
103
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
104
|
+
retries = self.sdk_configuration.retry_config
|
105
|
+
|
106
|
+
retry_config = None
|
107
|
+
if isinstance(retries, utils.RetryConfig):
|
108
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
109
|
+
|
110
|
+
http_res = self.do_request(
|
111
|
+
hook_ctx=HookContext(
|
112
|
+
config=self.sdk_configuration,
|
113
|
+
base_url=base_url or "",
|
114
|
+
operation_id="getpopulararticles",
|
115
|
+
oauth2_scopes=[],
|
116
|
+
security_source=get_security_from_env(
|
117
|
+
self.sdk_configuration.security, models.Security
|
118
|
+
),
|
119
|
+
),
|
120
|
+
request=req,
|
121
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
122
|
+
retry_config=retry_config,
|
123
|
+
)
|
124
|
+
|
125
|
+
response_data: Any = None
|
126
|
+
if utils.match_response(http_res, "200", "application/json"):
|
127
|
+
return unmarshal_json_response(models.ArticleResults, http_res)
|
128
|
+
if utils.match_response(http_res, "204", "*"):
|
129
|
+
return None
|
130
|
+
if utils.match_response(
|
131
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
132
|
+
):
|
133
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
134
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
135
|
+
if utils.match_response(http_res, "500", "application/json"):
|
136
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
137
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
138
|
+
if utils.match_response(http_res, "4XX", "*"):
|
139
|
+
http_res_text = utils.stream_to_text(http_res)
|
140
|
+
raise errors.EgainDefaultError(
|
141
|
+
"API error occurred", http_res, http_res_text
|
142
|
+
)
|
143
|
+
if utils.match_response(http_res, "5XX", "*"):
|
144
|
+
http_res_text = utils.stream_to_text(http_res)
|
145
|
+
raise errors.EgainDefaultError(
|
146
|
+
"API error occurred", http_res, http_res_text
|
147
|
+
)
|
148
|
+
|
149
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
150
|
+
|
151
|
+
async def getpopulararticles_async(
|
152
|
+
self,
|
153
|
+
*,
|
154
|
+
accept_language: models.AcceptLanguage,
|
155
|
+
portal_id: str,
|
156
|
+
dollar_filter_topic_id: Optional[str] = None,
|
157
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
158
|
+
dollar_filter_tags: Optional[str] = None,
|
159
|
+
pagenum: Optional[int] = 1,
|
160
|
+
pagesize: Optional[int] = 10,
|
161
|
+
article_result_additional_attributes: Optional[
|
162
|
+
List[models.ArticleResultAdditionalAttributes]
|
163
|
+
] = None,
|
164
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
165
|
+
server_url: Optional[str] = None,
|
166
|
+
timeout_ms: Optional[int] = None,
|
167
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
168
|
+
) -> Optional[models.ArticleResults]:
|
169
|
+
r"""Get Popular Articles
|
170
|
+
|
171
|
+
## Overview
|
172
|
+
The Popular Articles API allows a user to retrieve popular articles.
|
173
|
+
## Prerequisites
|
174
|
+
* Only displayable articles are returned. An Article is displayable when \"Include in browse on portals\" property is enable for the Article.
|
175
|
+
## Permissions
|
176
|
+
* Agent permissions: The following permissions are required if user is an Agent:
|
177
|
+
* If Article has Access Tags, Article must be available for agent's current user profile.
|
178
|
+
* If Article has Publish Views, at least one edition of Article must be available for agent's current user profile.
|
179
|
+
* If Article has filters and tags query parameter provided, Article filters must match provided tags or tag groups.
|
180
|
+
* Customer permissions: The following permissions are required if user is a Customer:
|
181
|
+
* If Article has Access tags:
|
182
|
+
* Portal must have default user profile, and;
|
183
|
+
* Article must be available for portal's default user profile.
|
184
|
+
* If Article has Publish Views:
|
185
|
+
* Portal must have default user profile, and;
|
186
|
+
* At least one edition must be available for portal's default user profile.
|
187
|
+
* If Article has filters and tags query parameter provided, Article filters must match provided tags or tag groups.
|
188
|
+
|
189
|
+
|
190
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
191
|
+
: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.
|
192
|
+
:param dollar_filter_topic_id: The ID of the topic. It is used to restrict to a specific topic.
|
193
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
194
|
+
:param dollar_filter_tags: A comma separated list of Tag / Tag Group IDs. The query results will be filtered by the tags that are specified.<br><br>Tag IDs and Tag Group IDs can be mixed together.
|
195
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
196
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
197
|
+
:param article_result_additional_attributes: The attributes of an Article to be returned *in addition to* the default list of attributes, listed below. Multiple additional attributes can be specified using a comma-separated list. Passing 'all' will return all attributes. #### Default Attributes These Article attributes are always returned: | Name | Description | ---- | ----------- | id | The ID of the Article. | name | The name of the Article. | articleType | The Article Type and its attributes. | createdBy | The ID, first name, middle name and last name of the user that created the Article. | createdDate | The date that the Article was created. | hasAttachments | True: The Article has one or more attachments.<br>False: The Article does not have any attachments. | languageCode | The language code of the Article language. | modifiedBy | The ID, first name, middle name and last name of the user that last modified the Article. | modifiedDate | The date that the Article was last modified on. | link | The link object, used to retrieve the details of the Article. | versionId | The ID of the Article version that is returned.
|
198
|
+
:param retries: Override the default retry configuration for this method
|
199
|
+
:param server_url: Override the default server URL for this method
|
200
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
201
|
+
:param http_headers: Additional headers to set or replace on requests.
|
202
|
+
"""
|
203
|
+
base_url = None
|
204
|
+
url_variables = None
|
205
|
+
if timeout_ms is None:
|
206
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
207
|
+
|
208
|
+
if server_url is not None:
|
209
|
+
base_url = server_url
|
210
|
+
else:
|
211
|
+
base_url = self._get_url(base_url, url_variables)
|
212
|
+
|
213
|
+
request = models.GetpopulararticlesRequest(
|
214
|
+
accept_language=accept_language,
|
215
|
+
portal_id=portal_id,
|
216
|
+
dollar_filter_topic_id=dollar_filter_topic_id,
|
217
|
+
language=language,
|
218
|
+
dollar_filter_tags=dollar_filter_tags,
|
219
|
+
pagenum=pagenum,
|
220
|
+
pagesize=pagesize,
|
221
|
+
article_result_additional_attributes=article_result_additional_attributes,
|
222
|
+
)
|
223
|
+
|
224
|
+
req = self._build_request_async(
|
225
|
+
method="GET",
|
226
|
+
path="/portals/{portalID}/populararticles",
|
227
|
+
base_url=base_url,
|
228
|
+
url_variables=url_variables,
|
229
|
+
request=request,
|
230
|
+
request_body_required=False,
|
231
|
+
request_has_path_params=True,
|
232
|
+
request_has_query_params=True,
|
233
|
+
user_agent_header="user-agent",
|
234
|
+
accept_header_value="application/json",
|
235
|
+
http_headers=http_headers,
|
236
|
+
security=self.sdk_configuration.security,
|
237
|
+
timeout_ms=timeout_ms,
|
238
|
+
)
|
239
|
+
|
240
|
+
if retries == UNSET:
|
241
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
242
|
+
retries = self.sdk_configuration.retry_config
|
243
|
+
|
244
|
+
retry_config = None
|
245
|
+
if isinstance(retries, utils.RetryConfig):
|
246
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
247
|
+
|
248
|
+
http_res = await self.do_request_async(
|
249
|
+
hook_ctx=HookContext(
|
250
|
+
config=self.sdk_configuration,
|
251
|
+
base_url=base_url or "",
|
252
|
+
operation_id="getpopulararticles",
|
253
|
+
oauth2_scopes=[],
|
254
|
+
security_source=get_security_from_env(
|
255
|
+
self.sdk_configuration.security, models.Security
|
256
|
+
),
|
257
|
+
),
|
258
|
+
request=req,
|
259
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
260
|
+
retry_config=retry_config,
|
261
|
+
)
|
262
|
+
|
263
|
+
response_data: Any = None
|
264
|
+
if utils.match_response(http_res, "200", "application/json"):
|
265
|
+
return unmarshal_json_response(models.ArticleResults, http_res)
|
266
|
+
if utils.match_response(http_res, "204", "*"):
|
267
|
+
return None
|
268
|
+
if utils.match_response(
|
269
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
270
|
+
):
|
271
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
272
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
273
|
+
if utils.match_response(http_res, "500", "application/json"):
|
274
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
275
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
276
|
+
if utils.match_response(http_res, "4XX", "*"):
|
277
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
278
|
+
raise errors.EgainDefaultError(
|
279
|
+
"API error occurred", http_res, http_res_text
|
280
|
+
)
|
281
|
+
if utils.match_response(http_res, "5XX", "*"):
|
282
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
283
|
+
raise errors.EgainDefaultError(
|
284
|
+
"API error occurred", http_res, http_res_text
|
285
|
+
)
|
286
|
+
|
287
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|