egain-api-python 0.1.1__py3-none-any.whl → 0.1.3__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/_version.py +3 -3
- egain_api_python/answers.py +26 -26
- egain_api_python/articlelists.py +6 -6
- egain_api_python/errors/gethealthop.py +33 -19
- egain_api_python/export.py +2 -2
- egain_api_python/models/__init__.py +87 -64
- egain_api_python/models/aisearchop.py +6 -34
- egain_api_python/models/aisearchresponse.py +0 -4
- egain_api_python/models/articleaisearchresult.py +14 -21
- egain_api_python/models/articletype.py +3 -5
- egain_api_python/models/exportstatus.py +15 -8
- egain_api_python/models/getannouncementarticlesop.py +2 -2
- egain_api_python/models/getarticlelistdetailsop.py +2 -2
- egain_api_python/models/getarticlesintopicop.py +4 -4
- egain_api_python/models/{post_portalid_answersop.py → getbestanswerop.py} +9 -9
- egain_api_python/models/gethealthop.py +134 -7
- egain_api_python/models/getpopulararticlesop.py +4 -4
- egain_api_python/models/getrelatedarticlesop.py +2 -2
- egain_api_python/models/importstatus.py +116 -0
- egain_api_python/models/knowledgeexport.py +3 -5
- egain_api_python/models/referenceresponse.py +7 -23
- egain_api_python/models/{post_portalid_retrieveop.py → retrievechunksop.py} +9 -9
- egain_api_python/models/searchresult.py +7 -23
- egain_api_python/populararticles.py +12 -12
- egain_api_python/portal_article.py +24 -24
- egain_api_python/retrieve.py +26 -26
- egain_api_python/sdk.py +1 -0
- egain_api_python/search.py +18 -36
- {egain_api_python-0.1.1.dist-info → egain_api_python-0.1.3.dist-info}/METADATA +16 -11
- {egain_api_python-0.1.1.dist-info → egain_api_python-0.1.3.dist-info}/RECORD +33 -35
- egain_api_python/models/resourcetype_parameter.py +0 -10
- egain_api_python/models/topicaisearchresult.py +0 -67
- {egain_api_python-0.1.1.dist-info → egain_api_python-0.1.3.dist-info}/WHEEL +0 -0
- {egain_api_python-0.1.1.dist-info → egain_api_python-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {egain_api_python-0.1.1.dist-info → egain_api_python-0.1.3.dist-info}/top_level.txt +0 -0
egain_api_python/_version.py
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
import importlib.metadata
|
4
4
|
|
5
5
|
__title__: str = "egain-api-python"
|
6
|
-
__version__: str = "0.1.
|
6
|
+
__version__: str = "0.1.3"
|
7
7
|
__openapi_doc_version__: str = "4.0.0"
|
8
|
-
__gen_version__: str = "2.
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.1.
|
8
|
+
__gen_version__: str = "2.722.2"
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.1.3 2.722.2 4.0.0 egain-api-python"
|
10
10
|
|
11
11
|
try:
|
12
12
|
if __package__ is not None:
|
egain_api_python/answers.py
CHANGED
@@ -10,15 +10,15 @@ from typing import Dict, List, Mapping, Optional, Union
|
|
10
10
|
|
11
11
|
|
12
12
|
class Answers(BaseSDK):
|
13
|
-
def
|
13
|
+
def get_best_answer(
|
14
14
|
self,
|
15
15
|
*,
|
16
16
|
q: str,
|
17
17
|
portal_id: str,
|
18
|
-
|
18
|
+
filter_user_profile_id: Optional[str] = None,
|
19
19
|
language: Optional[models.LanguageCodeParameter] = None,
|
20
|
-
|
21
|
-
|
20
|
+
filter_tags: Optional[Dict[str, List[str]]] = None,
|
21
|
+
filter_topic_ids: Optional[List[str]] = None,
|
22
22
|
channel: Optional[
|
23
23
|
Union[models.AnswersRequestChannel, models.AnswersRequestChannelTypedDict]
|
24
24
|
] = None,
|
@@ -41,10 +41,10 @@ class Answers(BaseSDK):
|
|
41
41
|
|
42
42
|
:param q: The search query string. The string must be escaped as required by the URL syntax rules.
|
43
43
|
: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.
|
44
|
-
:param
|
44
|
+
:param filter_user_profile_id:
|
45
45
|
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other. <br><br> If lang is not passed, then the portal's default language is used.
|
46
|
-
:param
|
47
|
-
:param
|
46
|
+
:param filter_tags: An object where each key is a **Category Tag ID** (numeric string), and each value is an array of **Tag IDs** for that category.
|
47
|
+
:param filter_topic_ids: An array of topic IDs. It is used to restrict search results to specific topics.
|
48
48
|
:param channel:
|
49
49
|
:param context: Additional contextual metadata that enriches the query, providing the LLM with relevant details for tailoring the response.
|
50
50
|
:param event_id: Unique ID for this specific API call or event.
|
@@ -62,18 +62,18 @@ class Answers(BaseSDK):
|
|
62
62
|
if server_url is not None:
|
63
63
|
base_url = server_url
|
64
64
|
else:
|
65
|
-
base_url = models.
|
65
|
+
base_url = models.GET_BEST_ANSWER_OP_SERVERS[0]
|
66
66
|
url_variables = {
|
67
67
|
"API_DOMAIN": "api.egain.cloud",
|
68
68
|
}
|
69
69
|
|
70
|
-
request = models.
|
70
|
+
request = models.GetBestAnswerRequest(
|
71
71
|
q=q,
|
72
72
|
portal_id=portal_id,
|
73
|
-
|
73
|
+
filter_user_profile_id=filter_user_profile_id,
|
74
74
|
language=language,
|
75
|
-
|
76
|
-
|
75
|
+
filter_tags=filter_tags,
|
76
|
+
filter_topic_ids=filter_topic_ids,
|
77
77
|
answers_request=models.AnswersRequest(
|
78
78
|
channel=utils.get_pydantic_model(
|
79
79
|
channel, Optional[models.AnswersRequestChannel]
|
@@ -119,7 +119,7 @@ class Answers(BaseSDK):
|
|
119
119
|
hook_ctx=HookContext(
|
120
120
|
config=self.sdk_configuration,
|
121
121
|
base_url=base_url or "",
|
122
|
-
operation_id="
|
122
|
+
operation_id="getBestAnswer",
|
123
123
|
oauth2_scopes=[],
|
124
124
|
security_source=get_security_from_env(
|
125
125
|
self.sdk_configuration.security, models.Security
|
@@ -145,15 +145,15 @@ class Answers(BaseSDK):
|
|
145
145
|
|
146
146
|
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
147
147
|
|
148
|
-
async def
|
148
|
+
async def get_best_answer_async(
|
149
149
|
self,
|
150
150
|
*,
|
151
151
|
q: str,
|
152
152
|
portal_id: str,
|
153
|
-
|
153
|
+
filter_user_profile_id: Optional[str] = None,
|
154
154
|
language: Optional[models.LanguageCodeParameter] = None,
|
155
|
-
|
156
|
-
|
155
|
+
filter_tags: Optional[Dict[str, List[str]]] = None,
|
156
|
+
filter_topic_ids: Optional[List[str]] = None,
|
157
157
|
channel: Optional[
|
158
158
|
Union[models.AnswersRequestChannel, models.AnswersRequestChannelTypedDict]
|
159
159
|
] = None,
|
@@ -176,10 +176,10 @@ class Answers(BaseSDK):
|
|
176
176
|
|
177
177
|
:param q: The search query string. The string must be escaped as required by the URL syntax rules.
|
178
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
|
179
|
+
:param filter_user_profile_id:
|
180
180
|
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other. <br><br> If lang is not passed, then the portal's default language is used.
|
181
|
-
:param
|
182
|
-
:param
|
181
|
+
:param filter_tags: An object where each key is a **Category Tag ID** (numeric string), and each value is an array of **Tag IDs** for that category.
|
182
|
+
:param filter_topic_ids: An array of topic IDs. It is used to restrict search results to specific topics.
|
183
183
|
:param channel:
|
184
184
|
:param context: Additional contextual metadata that enriches the query, providing the LLM with relevant details for tailoring the response.
|
185
185
|
:param event_id: Unique ID for this specific API call or event.
|
@@ -197,18 +197,18 @@ class Answers(BaseSDK):
|
|
197
197
|
if server_url is not None:
|
198
198
|
base_url = server_url
|
199
199
|
else:
|
200
|
-
base_url = models.
|
200
|
+
base_url = models.GET_BEST_ANSWER_OP_SERVERS[0]
|
201
201
|
url_variables = {
|
202
202
|
"API_DOMAIN": "api.egain.cloud",
|
203
203
|
}
|
204
204
|
|
205
|
-
request = models.
|
205
|
+
request = models.GetBestAnswerRequest(
|
206
206
|
q=q,
|
207
207
|
portal_id=portal_id,
|
208
|
-
|
208
|
+
filter_user_profile_id=filter_user_profile_id,
|
209
209
|
language=language,
|
210
|
-
|
211
|
-
|
210
|
+
filter_tags=filter_tags,
|
211
|
+
filter_topic_ids=filter_topic_ids,
|
212
212
|
answers_request=models.AnswersRequest(
|
213
213
|
channel=utils.get_pydantic_model(
|
214
214
|
channel, Optional[models.AnswersRequestChannel]
|
@@ -254,7 +254,7 @@ class Answers(BaseSDK):
|
|
254
254
|
hook_ctx=HookContext(
|
255
255
|
config=self.sdk_configuration,
|
256
256
|
base_url=base_url or "",
|
257
|
-
operation_id="
|
257
|
+
operation_id="getBestAnswer",
|
258
258
|
oauth2_scopes=[],
|
259
259
|
security_source=get_security_from_env(
|
260
260
|
self.sdk_configuration.security, models.Security
|
egain_api_python/articlelists.py
CHANGED
@@ -228,7 +228,7 @@ class Articlelists(BaseSDK):
|
|
228
228
|
accept_language: models.AcceptLanguage,
|
229
229
|
portal_id: str,
|
230
230
|
list_id: str,
|
231
|
-
|
231
|
+
filter_topic_id: Optional[str] = None,
|
232
232
|
article_result_additional_attributes: Optional[
|
233
233
|
List[models.ArticleResultAdditionalAttributes]
|
234
234
|
] = None,
|
@@ -253,7 +253,7 @@ class Articlelists(BaseSDK):
|
|
253
253
|
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
254
254
|
: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.
|
255
255
|
:param list_id: The ID of the list to be returned.
|
256
|
-
:param
|
256
|
+
:param filter_topic_id: The ID of the topic. It is used to restrict to a specific topic.
|
257
257
|
: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.
|
258
258
|
: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>
|
259
259
|
:param retries: Override the default retry configuration for this method
|
@@ -275,7 +275,7 @@ class Articlelists(BaseSDK):
|
|
275
275
|
accept_language=accept_language,
|
276
276
|
portal_id=portal_id,
|
277
277
|
list_id=list_id,
|
278
|
-
|
278
|
+
filter_topic_id=filter_topic_id,
|
279
279
|
article_result_additional_attributes=article_result_additional_attributes,
|
280
280
|
language=language,
|
281
281
|
)
|
@@ -351,7 +351,7 @@ class Articlelists(BaseSDK):
|
|
351
351
|
accept_language: models.AcceptLanguage,
|
352
352
|
portal_id: str,
|
353
353
|
list_id: str,
|
354
|
-
|
354
|
+
filter_topic_id: Optional[str] = None,
|
355
355
|
article_result_additional_attributes: Optional[
|
356
356
|
List[models.ArticleResultAdditionalAttributes]
|
357
357
|
] = None,
|
@@ -376,7 +376,7 @@ class Articlelists(BaseSDK):
|
|
376
376
|
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
377
377
|
: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.
|
378
378
|
:param list_id: The ID of the list to be returned.
|
379
|
-
:param
|
379
|
+
:param filter_topic_id: The ID of the topic. It is used to restrict to a specific topic.
|
380
380
|
: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.
|
381
381
|
: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>
|
382
382
|
:param retries: Override the default retry configuration for this method
|
@@ -398,7 +398,7 @@ class Articlelists(BaseSDK):
|
|
398
398
|
accept_language=accept_language,
|
399
399
|
portal_id=portal_id,
|
400
400
|
list_id=list_id,
|
401
|
-
|
401
|
+
filter_topic_id=filter_topic_id,
|
402
402
|
article_result_additional_attributes=article_result_additional_attributes,
|
403
403
|
language=language,
|
404
404
|
)
|
@@ -2,44 +2,58 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from dataclasses import dataclass, field
|
5
|
-
from datetime import datetime
|
6
5
|
from egain_api_python.errors import EgainError
|
6
|
+
from egain_api_python.models import gethealthop as models_gethealthop
|
7
7
|
from egain_api_python.types import BaseModel
|
8
8
|
import httpx
|
9
|
-
from typing import Optional
|
9
|
+
from typing import Any, List, Optional
|
10
10
|
|
11
11
|
|
12
12
|
class ServiceUnavailableErrorData(BaseModel):
|
13
|
-
status: Optional[
|
13
|
+
status: Optional[models_gethealthop.ServiceUnavailableStatus] = None
|
14
14
|
r"""**Health Status**
|
15
15
|
|
16
|
-
The overall health status of the service.
|
17
|
-
- Service
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
16
|
+
The overall health status of the service. Possible values:
|
17
|
+
- **healthy**: Service is operating normally
|
18
|
+
- **degraded**: Service is functional but with performance issues
|
19
|
+
- **unhealthy**: Service is experiencing critical issues
|
20
|
+
- **maintenance**: Service is under planned maintenance
|
21
21
|
|
22
22
|
"""
|
23
23
|
|
24
|
-
timestamp: Optional[
|
24
|
+
timestamp: Optional[Any] = None
|
25
25
|
r"""**Health Check Timestamp**
|
26
26
|
|
27
|
-
The exact date and time when this health check was performed. This
|
28
|
-
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
- Historical
|
27
|
+
The exact date and time when this health check was performed. This is useful for:
|
28
|
+
- Tracking health check frequency
|
29
|
+
- Correlating with other system events
|
30
|
+
- Monitoring health check response times
|
31
|
+
- Historical health trend analysis
|
32
32
|
|
33
33
|
"""
|
34
34
|
|
35
35
|
version: Optional[str] = None
|
36
36
|
r"""**API Version**
|
37
37
|
|
38
|
-
The current version of the Import Content API. This
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
38
|
+
The current version of the Import Content API. This helps with:
|
39
|
+
- Version compatibility checking
|
40
|
+
- Feature availability verification
|
41
|
+
- Upgrade planning and coordination
|
42
|
+
- Support and troubleshooting
|
43
|
+
|
44
|
+
"""
|
45
|
+
|
46
|
+
issues: Optional[List[str]] = None
|
47
|
+
r"""**Issues**:
|
48
|
+
|
49
|
+
List of detected health problems
|
50
|
+
|
51
|
+
"""
|
52
|
+
|
53
|
+
components: Optional[models_gethealthop.Components] = None
|
54
|
+
r"""**Comonents**:
|
55
|
+
|
56
|
+
Health status of import service componenets
|
43
57
|
|
44
58
|
"""
|
45
59
|
|
egain_api_python/export.py
CHANGED
@@ -17,7 +17,7 @@ class Export(BaseSDK):
|
|
17
17
|
language: Union[
|
18
18
|
models.KnowledgeExportLanguage, models.KnowledgeExportLanguageTypedDict
|
19
19
|
],
|
20
|
-
resource_types: List[models.
|
20
|
+
resource_types: List[models.ResourceType],
|
21
21
|
data_destination: Union[
|
22
22
|
models.DataDestination, models.DataDestinationTypedDict
|
23
23
|
],
|
@@ -142,7 +142,7 @@ class Export(BaseSDK):
|
|
142
142
|
language: Union[
|
143
143
|
models.KnowledgeExportLanguage, models.KnowledgeExportLanguageTypedDict
|
144
144
|
],
|
145
|
-
resource_types: List[models.
|
145
|
+
resource_types: List[models.ResourceType],
|
146
146
|
data_destination: Union[
|
147
147
|
models.DataDestination, models.DataDestinationTypedDict
|
148
148
|
],
|