egain-api-python 0.1.2__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 +18 -18
- 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 +65 -42
- 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/getbestanswerop.py +6 -6
- 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/retrievechunksop.py +6 -6
- 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 +18 -18
- egain_api_python/sdk.py +1 -0
- egain_api_python/search.py +18 -36
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.3.dist-info}/METADATA +14 -9
- {egain_api_python-0.1.2.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.2.dist-info → egain_api_python-0.1.3.dist-info}/WHEEL +0 -0
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.3.dist-info}/licenses/LICENSE +0 -0
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.3.dist-info}/top_level.txt +0 -0
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from .languagecode_parameter import LanguageCodeParameter
|
5
|
-
from .resourcetype_parameter import ResourceTypeParameter
|
6
5
|
from egain_api_python.types import BaseModel
|
7
6
|
from egain_api_python.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
|
8
7
|
import pydantic
|
@@ -15,27 +14,21 @@ class AiSearchRequestTypedDict(TypedDict):
|
|
15
14
|
r"""The search query string. The string must be escaped as required by the URL syntax rules."""
|
16
15
|
portal_id: str
|
17
16
|
r"""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."""
|
18
|
-
|
17
|
+
filter_user_profile_id: NotRequired[str]
|
19
18
|
r"""The ID of the user profile.
|
20
19
|
|
21
20
|
"""
|
22
21
|
language: NotRequired[LanguageCodeParameter]
|
23
22
|
r"""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."""
|
24
|
-
|
23
|
+
filter_tags: NotRequired[Dict[str, List[str]]]
|
25
24
|
r"""An object where each key is a **Category Tag ID** (numeric string),
|
26
25
|
and each value is an array of **Tag IDs** for that category.
|
27
26
|
|
28
27
|
"""
|
29
|
-
|
28
|
+
filter_topic_ids: NotRequired[List[str]]
|
30
29
|
r"""An array of topic IDs. It is used to restrict search results to specific topics."""
|
31
|
-
dollar_filter_exclude_topic_ids: NotRequired[List[str]]
|
32
|
-
r"""An array of topic IDs that will be excluded from the search. It includes articles that belong to the topic."""
|
33
|
-
resource_type: NotRequired[ResourceTypeParameter]
|
34
|
-
r"""Type of resource to be fetched."""
|
35
30
|
article_custom_additional_attributes: NotRequired[str]
|
36
31
|
r"""One or more comma-separated names for article custom attributes defined by the user to be returned."""
|
37
|
-
topic_custom_additional_attributes: NotRequired[str]
|
38
|
-
r"""One or more comma-separated names for topic custom attributes defined by the user to be returned."""
|
39
32
|
pagenum: NotRequired[int]
|
40
33
|
r"""Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize."""
|
41
34
|
pagesize: NotRequired[int]
|
@@ -55,7 +48,7 @@ class AiSearchRequest(BaseModel):
|
|
55
48
|
]
|
56
49
|
r"""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."""
|
57
50
|
|
58
|
-
|
51
|
+
filter_user_profile_id: Annotated[
|
59
52
|
Optional[str],
|
60
53
|
pydantic.Field(alias="$filter[userProfileID]"),
|
61
54
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -71,7 +64,7 @@ class AiSearchRequest(BaseModel):
|
|
71
64
|
] = None
|
72
65
|
r"""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."""
|
73
66
|
|
74
|
-
|
67
|
+
filter_tags: Annotated[
|
75
68
|
Optional[Dict[str, List[str]]],
|
76
69
|
pydantic.Field(alias="$filter[tags]"),
|
77
70
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -81,27 +74,13 @@ class AiSearchRequest(BaseModel):
|
|
81
74
|
|
82
75
|
"""
|
83
76
|
|
84
|
-
|
77
|
+
filter_topic_ids: Annotated[
|
85
78
|
Optional[List[str]],
|
86
79
|
pydantic.Field(alias="$filter[topicIds]"),
|
87
80
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
88
81
|
] = None
|
89
82
|
r"""An array of topic IDs. It is used to restrict search results to specific topics."""
|
90
83
|
|
91
|
-
dollar_filter_exclude_topic_ids: Annotated[
|
92
|
-
Optional[List[str]],
|
93
|
-
pydantic.Field(alias="$filter[excludeTopicIds]"),
|
94
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
95
|
-
] = None
|
96
|
-
r"""An array of topic IDs that will be excluded from the search. It includes articles that belong to the topic."""
|
97
|
-
|
98
|
-
resource_type: Annotated[
|
99
|
-
Optional[ResourceTypeParameter],
|
100
|
-
pydantic.Field(alias="resourceType"),
|
101
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
102
|
-
] = None
|
103
|
-
r"""Type of resource to be fetched."""
|
104
|
-
|
105
84
|
article_custom_additional_attributes: Annotated[
|
106
85
|
Optional[str],
|
107
86
|
pydantic.Field(alias="articleCustomAdditionalAttributes"),
|
@@ -109,13 +88,6 @@ class AiSearchRequest(BaseModel):
|
|
109
88
|
] = None
|
110
89
|
r"""One or more comma-separated names for article custom attributes defined by the user to be returned."""
|
111
90
|
|
112
|
-
topic_custom_additional_attributes: Annotated[
|
113
|
-
Optional[str],
|
114
|
-
pydantic.Field(alias="topicCustomAdditionalAttributes"),
|
115
|
-
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
116
|
-
] = None
|
117
|
-
r"""One or more comma-separated names for topic custom attributes defined by the user to be returned."""
|
118
|
-
|
119
91
|
pagenum: Annotated[
|
120
92
|
Optional[int],
|
121
93
|
pydantic.Field(alias="$pagenum"),
|
@@ -3,7 +3,6 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from .articleaisearchresult import ArticleAISearchResult, ArticleAISearchResultTypedDict
|
5
5
|
from .paginationinfo import PaginationInfo, PaginationInfoTypedDict
|
6
|
-
from .topicaisearchresult import TopicAISearchResult, TopicAISearchResultTypedDict
|
7
6
|
from egain_api_python.types import BaseModel
|
8
7
|
import pydantic
|
9
8
|
from typing import List, Literal, Optional
|
@@ -36,7 +35,6 @@ class SearchResultsTypedDict(TypedDict):
|
|
36
35
|
r"""Top search results with relevance scores"""
|
37
36
|
|
38
37
|
article: NotRequired[List[ArticleAISearchResultTypedDict]]
|
39
|
-
topic: NotRequired[List[TopicAISearchResultTypedDict]]
|
40
38
|
|
41
39
|
|
42
40
|
class SearchResults(BaseModel):
|
@@ -44,8 +42,6 @@ class SearchResults(BaseModel):
|
|
44
42
|
|
45
43
|
article: Optional[List[ArticleAISearchResult]] = None
|
46
44
|
|
47
|
-
topic: Optional[List[TopicAISearchResult]] = None
|
48
|
-
|
49
45
|
|
50
46
|
class AISearchResponseTypedDict(TypedDict):
|
51
47
|
channel: NotRequired[AISearchResponseChannelTypedDict]
|
@@ -6,7 +6,7 @@ from .schemas_tags import SchemasTags, SchemasTagsTypedDict
|
|
6
6
|
from .topicbreadcrumb import TopicBreadcrumb, TopicBreadcrumbTypedDict
|
7
7
|
from egain_api_python.types import BaseModel
|
8
8
|
import pydantic
|
9
|
-
from typing import List, Literal, Optional
|
9
|
+
from typing import Any, List, Literal, Optional
|
10
10
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
11
11
|
|
12
12
|
|
@@ -68,33 +68,26 @@ class OpensearchHighlightingRaw(BaseModel):
|
|
68
68
|
] = None
|
69
69
|
|
70
70
|
|
71
|
-
ArticleAISearchResultTypeName = Literal[
|
72
|
-
"General",
|
73
|
-
"Guided Help",
|
74
|
-
"Data Link",
|
75
|
-
"Topic Home",
|
76
|
-
"Suggestion",
|
77
|
-
"Virtaul Assistant Action",
|
78
|
-
"Rich Message",
|
79
|
-
]
|
80
|
-
r"""Indicates the article category name."""
|
81
|
-
|
82
|
-
|
83
71
|
class ArticleTypeAttributesTypedDict(TypedDict):
|
84
|
-
r"""The type of the Article."""
|
72
|
+
r"""The type of the Article and its attributes."""
|
85
73
|
|
86
|
-
type_name: NotRequired[
|
74
|
+
type_name: NotRequired[str]
|
87
75
|
r"""Indicates the article category name."""
|
76
|
+
article_type_id: NotRequired[Any]
|
77
|
+
r"""The ID of the Article Type."""
|
88
78
|
|
89
79
|
|
90
80
|
class ArticleTypeAttributes(BaseModel):
|
91
|
-
r"""The type of the Article."""
|
81
|
+
r"""The type of the Article and its attributes."""
|
92
82
|
|
93
|
-
type_name: Annotated[
|
94
|
-
Optional[ArticleAISearchResultTypeName], pydantic.Field(alias="typeName")
|
95
|
-
] = None
|
83
|
+
type_name: Annotated[Optional[str], pydantic.Field(alias="typeName")] = None
|
96
84
|
r"""Indicates the article category name."""
|
97
85
|
|
86
|
+
article_type_id: Annotated[Optional[Any], pydantic.Field(alias="articleTypeId")] = (
|
87
|
+
None
|
88
|
+
)
|
89
|
+
r"""The ID of the Article Type."""
|
90
|
+
|
98
91
|
|
99
92
|
class ArticleAISearchResultLinkTypedDict(TypedDict):
|
100
93
|
r"""Defines the relationship between this resource and another object."""
|
@@ -158,7 +151,7 @@ class ArticleAISearchResultTypedDict(TypedDict):
|
|
158
151
|
r"""An array of tag categories. Note that the total number of tag categories cannot exceed 20."""
|
159
152
|
keywords: NotRequired[str]
|
160
153
|
article_type_attributes: NotRequired[ArticleTypeAttributesTypedDict]
|
161
|
-
r"""The type of the Article."""
|
154
|
+
r"""The type of the Article and its attributes."""
|
162
155
|
link: NotRequired[ArticleAISearchResultLinkTypedDict]
|
163
156
|
r"""Defines the relationship between this resource and another object."""
|
164
157
|
|
@@ -248,7 +241,7 @@ class ArticleAISearchResult(BaseModel):
|
|
248
241
|
article_type_attributes: Annotated[
|
249
242
|
Optional[ArticleTypeAttributes], pydantic.Field(alias="articleTypeAttributes")
|
250
243
|
] = None
|
251
|
-
r"""The type of the Article."""
|
244
|
+
r"""The type of the Article and its attributes."""
|
252
245
|
|
253
246
|
link: Optional[ArticleAISearchResultLink] = None
|
254
247
|
r"""Defines the relationship between this resource and another object."""
|
@@ -7,7 +7,7 @@ from typing import Literal, Optional
|
|
7
7
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
8
8
|
|
9
9
|
|
10
|
-
|
10
|
+
TypeName = Literal[
|
11
11
|
"General",
|
12
12
|
"Guided Help",
|
13
13
|
"Data Link",
|
@@ -24,7 +24,7 @@ class ArticleTypeTypedDict(TypedDict):
|
|
24
24
|
|
25
25
|
article_category_id: NotRequired[int]
|
26
26
|
r"""Specifies the article category ID."""
|
27
|
-
type_name: NotRequired[
|
27
|
+
type_name: NotRequired[TypeName]
|
28
28
|
r"""Indicates the article category name."""
|
29
29
|
use_structured_authoring: NotRequired[bool]
|
30
30
|
r"""Indicates whether to use Structured Authoring for the Article Type."""
|
@@ -40,9 +40,7 @@ class ArticleType(BaseModel):
|
|
40
40
|
] = None
|
41
41
|
r"""Specifies the article category ID."""
|
42
42
|
|
43
|
-
type_name: Annotated[
|
44
|
-
Optional[ArticleTypeTypeName], pydantic.Field(alias="typeName")
|
45
|
-
] = None
|
43
|
+
type_name: Annotated[Optional[TypeName], pydantic.Field(alias="typeName")] = None
|
46
44
|
r"""Indicates the article category name."""
|
47
45
|
|
48
46
|
use_structured_authoring: Annotated[
|
@@ -16,7 +16,7 @@ ExportStatusStatus = Literal[
|
|
16
16
|
]
|
17
17
|
|
18
18
|
|
19
|
-
class
|
19
|
+
class ExportStatusProgressTypedDict(TypedDict):
|
20
20
|
r"""Details about the job's progress."""
|
21
21
|
|
22
22
|
processed: NotRequired[int]
|
@@ -27,7 +27,7 @@ class ProgressTypedDict(TypedDict):
|
|
27
27
|
r"""The percentage of the job that is complete."""
|
28
28
|
|
29
29
|
|
30
|
-
class
|
30
|
+
class ExportStatusProgress(BaseModel):
|
31
31
|
r"""Details about the job's progress."""
|
32
32
|
|
33
33
|
processed: Optional[int] = None
|
@@ -40,7 +40,7 @@ class Progress(BaseModel):
|
|
40
40
|
r"""The percentage of the job that is complete."""
|
41
41
|
|
42
42
|
|
43
|
-
class
|
43
|
+
class ExportStatusResultsTypedDict(TypedDict):
|
44
44
|
r"""Breakdown of completed job results."""
|
45
45
|
|
46
46
|
successful: NotRequired[int]
|
@@ -51,7 +51,7 @@ class ResultsTypedDict(TypedDict):
|
|
51
51
|
r"""The count of items with errors."""
|
52
52
|
|
53
53
|
|
54
|
-
class
|
54
|
+
class ExportStatusResults(BaseModel):
|
55
55
|
r"""Breakdown of completed job results."""
|
56
56
|
|
57
57
|
successful: Optional[int] = None
|
@@ -66,15 +66,17 @@ class Results(BaseModel):
|
|
66
66
|
|
67
67
|
class ExportStatusTypedDict(TypedDict):
|
68
68
|
status: ExportStatusStatus
|
69
|
-
progress: NotRequired[
|
69
|
+
progress: NotRequired[ExportStatusProgressTypedDict]
|
70
70
|
r"""Details about the job's progress."""
|
71
71
|
start_time: NotRequired[datetime]
|
72
72
|
r"""The timestamp when the job started."""
|
73
73
|
estimated_completion: NotRequired[datetime]
|
74
74
|
r"""The estimated timestamp when the job is expected to finish."""
|
75
|
+
completion_time: NotRequired[datetime]
|
76
|
+
r"""The timestamp when the job completed."""
|
75
77
|
failure_time: NotRequired[datetime]
|
76
78
|
r"""The timestamp when the job failed."""
|
77
|
-
results: NotRequired[
|
79
|
+
results: NotRequired[ExportStatusResultsTypedDict]
|
78
80
|
r"""Breakdown of completed job results."""
|
79
81
|
error: NotRequired[str]
|
80
82
|
r"""A description of the job failure reason."""
|
@@ -83,7 +85,7 @@ class ExportStatusTypedDict(TypedDict):
|
|
83
85
|
class ExportStatus(BaseModel):
|
84
86
|
status: ExportStatusStatus
|
85
87
|
|
86
|
-
progress: Optional[
|
88
|
+
progress: Optional[ExportStatusProgress] = None
|
87
89
|
r"""Details about the job's progress."""
|
88
90
|
|
89
91
|
start_time: Annotated[Optional[datetime], pydantic.Field(alias="startTime")] = None
|
@@ -94,12 +96,17 @@ class ExportStatus(BaseModel):
|
|
94
96
|
] = None
|
95
97
|
r"""The estimated timestamp when the job is expected to finish."""
|
96
98
|
|
99
|
+
completion_time: Annotated[
|
100
|
+
Optional[datetime], pydantic.Field(alias="completionTime")
|
101
|
+
] = None
|
102
|
+
r"""The timestamp when the job completed."""
|
103
|
+
|
97
104
|
failure_time: Annotated[Optional[datetime], pydantic.Field(alias="failureTime")] = (
|
98
105
|
None
|
99
106
|
)
|
100
107
|
r"""The timestamp when the job failed."""
|
101
108
|
|
102
|
-
results: Optional[
|
109
|
+
results: Optional[ExportStatusResults] = None
|
103
110
|
r"""Breakdown of completed job results."""
|
104
111
|
|
105
112
|
error: Optional[str] = None
|
@@ -22,7 +22,7 @@ class GetAnnouncementArticlesRequestTypedDict(TypedDict):
|
|
22
22
|
r"""The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses)."""
|
23
23
|
portal_id: str
|
24
24
|
r"""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."""
|
25
|
-
|
25
|
+
filter_tags: NotRequired[str]
|
26
26
|
r"""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."""
|
27
27
|
article_result_additional_attributes: NotRequired[
|
28
28
|
List[ArticleResultAdditionalAttributes]
|
@@ -72,7 +72,7 @@ class GetAnnouncementArticlesRequest(BaseModel):
|
|
72
72
|
]
|
73
73
|
r"""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."""
|
74
74
|
|
75
|
-
|
75
|
+
filter_tags: Annotated[
|
76
76
|
Optional[str],
|
77
77
|
pydantic.Field(alias="$filter[tags]"),
|
78
78
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -23,7 +23,7 @@ class GetArticleListDetailsRequestTypedDict(TypedDict):
|
|
23
23
|
r"""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."""
|
24
24
|
list_id: str
|
25
25
|
r"""The ID of the list to be returned."""
|
26
|
-
|
26
|
+
filter_topic_id: NotRequired[str]
|
27
27
|
r"""The ID of the topic. It is used to restrict to a specific topic."""
|
28
28
|
article_result_additional_attributes: NotRequired[
|
29
29
|
List[ArticleResultAdditionalAttributes]
|
@@ -74,7 +74,7 @@ class GetArticleListDetailsRequest(BaseModel):
|
|
74
74
|
]
|
75
75
|
r"""The ID of the list to be returned."""
|
76
76
|
|
77
|
-
|
77
|
+
filter_topic_id: Annotated[
|
78
78
|
Optional[str],
|
79
79
|
pydantic.Field(alias="$filter[topicId]"),
|
80
80
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -24,7 +24,7 @@ class GetArticlesInTopicRequestTypedDict(TypedDict):
|
|
24
24
|
r"""The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses)."""
|
25
25
|
portal_id: str
|
26
26
|
r"""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."""
|
27
|
-
|
27
|
+
filter_topic_id: str
|
28
28
|
r"""The ID of the topic. It is used to restrict to a specific topic."""
|
29
29
|
search_profile_id: NotRequired[str]
|
30
30
|
r"""Search Profile ID"""
|
@@ -51,7 +51,7 @@ class GetArticlesInTopicRequestTypedDict(TypedDict):
|
|
51
51
|
| versionId | The ID of the Article version that is returned.
|
52
52
|
|
53
53
|
"""
|
54
|
-
|
54
|
+
filter_tags: NotRequired[str]
|
55
55
|
r"""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."""
|
56
56
|
workflow_milestone: NotRequired[WorkflowMilestone]
|
57
57
|
r"""For agents with the View Author Portal or View Staging Portal actions, this determines which version of the Article is returned.<li>'Authoring' returns the most recent version of an Article checked-in by an author.</li><li>'Staging' returns the updated version currently being processed in a workflow.</li><li>'Publish' returns the most recently published version.</li>"""
|
@@ -82,7 +82,7 @@ class GetArticlesInTopicRequest(BaseModel):
|
|
82
82
|
]
|
83
83
|
r"""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."""
|
84
84
|
|
85
|
-
|
85
|
+
filter_topic_id: Annotated[
|
86
86
|
str,
|
87
87
|
pydantic.Field(alias="$filter[topicId]"),
|
88
88
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -122,7 +122,7 @@ class GetArticlesInTopicRequest(BaseModel):
|
|
122
122
|
|
123
123
|
"""
|
124
124
|
|
125
|
-
|
125
|
+
filter_tags: Annotated[
|
126
126
|
Optional[str],
|
127
127
|
pydantic.Field(alias="$filter[tags]"),
|
128
128
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -26,15 +26,15 @@ class GetBestAnswerRequestTypedDict(TypedDict):
|
|
26
26
|
r"""The search query string. The string must be escaped as required by the URL syntax rules."""
|
27
27
|
portal_id: str
|
28
28
|
r"""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."""
|
29
|
-
|
29
|
+
filter_user_profile_id: NotRequired[str]
|
30
30
|
language: NotRequired[LanguageCodeParameter]
|
31
31
|
r"""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."""
|
32
|
-
|
32
|
+
filter_tags: NotRequired[Dict[str, List[str]]]
|
33
33
|
r"""An object where each key is a **Category Tag ID** (numeric string),
|
34
34
|
and each value is an array of **Tag IDs** for that category.
|
35
35
|
|
36
36
|
"""
|
37
|
-
|
37
|
+
filter_topic_ids: NotRequired[List[str]]
|
38
38
|
r"""An array of topic IDs. It is used to restrict search results to specific topics."""
|
39
39
|
answers_request: NotRequired[AnswersRequestTypedDict]
|
40
40
|
|
@@ -52,7 +52,7 @@ class GetBestAnswerRequest(BaseModel):
|
|
52
52
|
]
|
53
53
|
r"""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
54
|
|
55
|
-
|
55
|
+
filter_user_profile_id: Annotated[
|
56
56
|
Optional[str],
|
57
57
|
pydantic.Field(alias="$filter[userProfileID]"),
|
58
58
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -65,7 +65,7 @@ class GetBestAnswerRequest(BaseModel):
|
|
65
65
|
] = None
|
66
66
|
r"""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."""
|
67
67
|
|
68
|
-
|
68
|
+
filter_tags: Annotated[
|
69
69
|
Optional[Dict[str, List[str]]],
|
70
70
|
pydantic.Field(alias="$filter[tags]"),
|
71
71
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -75,7 +75,7 @@ class GetBestAnswerRequest(BaseModel):
|
|
75
75
|
|
76
76
|
"""
|
77
77
|
|
78
|
-
|
78
|
+
filter_topic_ids: Annotated[
|
79
79
|
Optional[List[str]],
|
80
80
|
pydantic.Field(alias="$filter[topicIds]"),
|
81
81
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
-
from datetime import datetime
|
5
4
|
from egain_api_python.types import BaseModel
|
6
|
-
|
7
|
-
from
|
5
|
+
import pydantic
|
6
|
+
from typing import Any, Literal, Optional
|
7
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
8
8
|
|
9
9
|
|
10
10
|
GET_HEALTH_OP_SERVERS = [
|
@@ -13,6 +13,133 @@ GET_HEALTH_OP_SERVERS = [
|
|
13
13
|
]
|
14
14
|
|
15
15
|
|
16
|
+
ServiceUnavailableStatus = Literal[
|
17
|
+
"healthy",
|
18
|
+
"degraded",
|
19
|
+
"unhealthy",
|
20
|
+
"maintenance",
|
21
|
+
]
|
22
|
+
r"""**Health Status**
|
23
|
+
|
24
|
+
The overall health status of the service. Possible values:
|
25
|
+
- **healthy**: Service is operating normally
|
26
|
+
- **degraded**: Service is functional but with performance issues
|
27
|
+
- **unhealthy**: Service is experiencing critical issues
|
28
|
+
- **maintenance**: Service is under planned maintenance
|
29
|
+
|
30
|
+
"""
|
31
|
+
|
32
|
+
|
33
|
+
Database = Literal[
|
34
|
+
"healthy",
|
35
|
+
"degraded",
|
36
|
+
"unhealthy",
|
37
|
+
"maintenance",
|
38
|
+
]
|
39
|
+
r"""Health status of database component."""
|
40
|
+
|
41
|
+
|
42
|
+
FileSystem = Literal[
|
43
|
+
"healthy",
|
44
|
+
"degraded",
|
45
|
+
"unhealthy",
|
46
|
+
"maintenance",
|
47
|
+
]
|
48
|
+
r"""Health status of file system component."""
|
49
|
+
|
50
|
+
|
51
|
+
ExternalServices = Literal[
|
52
|
+
"healthy",
|
53
|
+
"degraded",
|
54
|
+
"unhealthy",
|
55
|
+
"maintenance",
|
56
|
+
]
|
57
|
+
r"""Health status of external services components."""
|
58
|
+
|
59
|
+
|
60
|
+
ProcessingEngine = Literal[
|
61
|
+
"healthy",
|
62
|
+
"degraded",
|
63
|
+
"unhealthy",
|
64
|
+
"maintenance",
|
65
|
+
]
|
66
|
+
r"""Health status of processing engine component."""
|
67
|
+
|
68
|
+
|
69
|
+
Storage = Literal[
|
70
|
+
"healthy",
|
71
|
+
"degraded",
|
72
|
+
"unhealthy",
|
73
|
+
"maintenance",
|
74
|
+
]
|
75
|
+
r"""Health status of storage component."""
|
76
|
+
|
77
|
+
|
78
|
+
class ComponentsTypedDict(TypedDict):
|
79
|
+
r"""**Comonents**:
|
80
|
+
|
81
|
+
Health status of import service componenets
|
82
|
+
|
83
|
+
"""
|
84
|
+
|
85
|
+
database: NotRequired[Database]
|
86
|
+
r"""Health status of database component."""
|
87
|
+
file_system: NotRequired[FileSystem]
|
88
|
+
r"""Health status of file system component."""
|
89
|
+
external_services: NotRequired[ExternalServices]
|
90
|
+
r"""Health status of external services components."""
|
91
|
+
processing_engine: NotRequired[ProcessingEngine]
|
92
|
+
r"""Health status of processing engine component."""
|
93
|
+
storage: NotRequired[Storage]
|
94
|
+
r"""Health status of storage component."""
|
95
|
+
|
96
|
+
|
97
|
+
class Components(BaseModel):
|
98
|
+
r"""**Comonents**:
|
99
|
+
|
100
|
+
Health status of import service componenets
|
101
|
+
|
102
|
+
"""
|
103
|
+
|
104
|
+
database: Optional[Database] = None
|
105
|
+
r"""Health status of database component."""
|
106
|
+
|
107
|
+
file_system: Annotated[Optional[FileSystem], pydantic.Field(alias="fileSystem")] = (
|
108
|
+
None
|
109
|
+
)
|
110
|
+
r"""Health status of file system component."""
|
111
|
+
|
112
|
+
external_services: Annotated[
|
113
|
+
Optional[ExternalServices], pydantic.Field(alias="externalServices")
|
114
|
+
] = None
|
115
|
+
r"""Health status of external services components."""
|
116
|
+
|
117
|
+
processing_engine: Annotated[
|
118
|
+
Optional[ProcessingEngine], pydantic.Field(alias="processingEngine")
|
119
|
+
] = None
|
120
|
+
r"""Health status of processing engine component."""
|
121
|
+
|
122
|
+
storage: Optional[Storage] = None
|
123
|
+
r"""Health status of storage component."""
|
124
|
+
|
125
|
+
|
126
|
+
GetHealthStatus = Literal[
|
127
|
+
"healthy",
|
128
|
+
"degraded",
|
129
|
+
"unhealthy",
|
130
|
+
"maintenance",
|
131
|
+
]
|
132
|
+
r"""**Health Status**
|
133
|
+
|
134
|
+
The overall health status of the service. Possible values:
|
135
|
+
- **healthy**: Service is operating normally
|
136
|
+
- **degraded**: Service is functional but with performance issues
|
137
|
+
- **unhealthy**: Service is experiencing critical issues
|
138
|
+
- **maintenance**: Service is under planned maintenance
|
139
|
+
|
140
|
+
"""
|
141
|
+
|
142
|
+
|
16
143
|
class GetHealthResponseTypedDict(TypedDict):
|
17
144
|
r"""## Service is Healthy
|
18
145
|
|
@@ -28,7 +155,7 @@ class GetHealthResponseTypedDict(TypedDict):
|
|
28
155
|
|
29
156
|
"""
|
30
157
|
|
31
|
-
status: NotRequired[
|
158
|
+
status: NotRequired[GetHealthStatus]
|
32
159
|
r"""**Health Status**
|
33
160
|
|
34
161
|
The overall health status of the service. Possible values:
|
@@ -38,7 +165,7 @@ class GetHealthResponseTypedDict(TypedDict):
|
|
38
165
|
- **maintenance**: Service is under planned maintenance
|
39
166
|
|
40
167
|
"""
|
41
|
-
timestamp: NotRequired[
|
168
|
+
timestamp: NotRequired[Any]
|
42
169
|
r"""**Health Check Timestamp**
|
43
170
|
|
44
171
|
The exact date and time when this health check was performed. This is useful for:
|
@@ -85,7 +212,7 @@ class GetHealthResponse(BaseModel):
|
|
85
212
|
|
86
213
|
"""
|
87
214
|
|
88
|
-
status: Optional[
|
215
|
+
status: Optional[GetHealthStatus] = None
|
89
216
|
r"""**Health Status**
|
90
217
|
|
91
218
|
The overall health status of the service. Possible values:
|
@@ -96,7 +223,7 @@ class GetHealthResponse(BaseModel):
|
|
96
223
|
|
97
224
|
"""
|
98
225
|
|
99
|
-
timestamp: Optional[
|
226
|
+
timestamp: Optional[Any] = None
|
100
227
|
r"""**Health Check Timestamp**
|
101
228
|
|
102
229
|
The exact date and time when this health check was performed. This is useful for:
|
@@ -21,11 +21,11 @@ class GetpopulararticlesRequestTypedDict(TypedDict):
|
|
21
21
|
r"""The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses)."""
|
22
22
|
portal_id: str
|
23
23
|
r"""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."""
|
24
|
-
|
24
|
+
filter_topic_id: NotRequired[str]
|
25
25
|
r"""The ID of the topic. It is used to restrict to a specific topic."""
|
26
26
|
language: NotRequired[LanguageQueryParameter]
|
27
27
|
r"""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>"""
|
28
|
-
|
28
|
+
filter_tags: NotRequired[str]
|
29
29
|
r"""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."""
|
30
30
|
pagenum: NotRequired[int]
|
31
31
|
r"""Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize."""
|
@@ -71,7 +71,7 @@ class GetpopulararticlesRequest(BaseModel):
|
|
71
71
|
]
|
72
72
|
r"""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."""
|
73
73
|
|
74
|
-
|
74
|
+
filter_topic_id: Annotated[
|
75
75
|
Optional[str],
|
76
76
|
pydantic.Field(alias="$filter[topicId]"),
|
77
77
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -85,7 +85,7 @@ class GetpopulararticlesRequest(BaseModel):
|
|
85
85
|
] = None
|
86
86
|
r"""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>"""
|
87
87
|
|
88
|
-
|
88
|
+
filter_tags: Annotated[
|
89
89
|
Optional[str],
|
90
90
|
pydantic.Field(alias="$filter[tags]"),
|
91
91
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
@@ -24,7 +24,7 @@ class GetRelatedArticlesRequestTypedDict(TypedDict):
|
|
24
24
|
r"""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."""
|
25
25
|
article_id: str
|
26
26
|
r"""The ID of the Article.<br><br>An Article ID is composed of a 2-4 letter prefix followed by a dash and 4-15 digits."""
|
27
|
-
|
27
|
+
filter_tags: NotRequired[str]
|
28
28
|
r"""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."""
|
29
29
|
article_result_additional_attributes: NotRequired[
|
30
30
|
List[ArticleResultAdditionalAttributes]
|
@@ -81,7 +81,7 @@ class GetRelatedArticlesRequest(BaseModel):
|
|
81
81
|
]
|
82
82
|
r"""The ID of the Article.<br><br>An Article ID is composed of a 2-4 letter prefix followed by a dash and 4-15 digits."""
|
83
83
|
|
84
|
-
|
84
|
+
filter_tags: Annotated[
|
85
85
|
Optional[str],
|
86
86
|
pydantic.Field(alias="$filter[tags]"),
|
87
87
|
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|