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
@@ -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)),
|
@@ -15,31 +15,31 @@ from typing import Dict, List, Optional
|
|
15
15
|
from typing_extensions import Annotated, NotRequired, TypedDict
|
16
16
|
|
17
17
|
|
18
|
-
|
18
|
+
GET_BEST_ANSWER_OP_SERVERS = [
|
19
19
|
# aiservices
|
20
20
|
"https://${API_DOMAIN}/core/aiservices/v4",
|
21
21
|
]
|
22
22
|
|
23
23
|
|
24
|
-
class
|
24
|
+
class GetBestAnswerRequestTypedDict(TypedDict):
|
25
25
|
q: str
|
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
|
|
41
41
|
|
42
|
-
class
|
42
|
+
class GetBestAnswerRequest(BaseModel):
|
43
43
|
q: Annotated[
|
44
44
|
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
45
45
|
]
|
@@ -52,7 +52,7 @@ class PostPortalIDAnswersRequest(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 PostPortalIDAnswersRequest(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 PostPortalIDAnswersRequest(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)),
|
@@ -1,6 +1,7 @@
|
|
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
|
4
5
|
from egain_api_python.types import BaseModel
|
5
6
|
import pydantic
|
6
7
|
from typing import Literal, Optional
|
@@ -14,16 +15,131 @@ ImportStatusStatus = Literal[
|
|
14
15
|
"Failed",
|
15
16
|
"Cancelled",
|
16
17
|
]
|
18
|
+
r"""Status of the job."""
|
19
|
+
|
20
|
+
|
21
|
+
JobType = Literal[
|
22
|
+
"Import",
|
23
|
+
"Validation",
|
24
|
+
]
|
25
|
+
|
26
|
+
|
27
|
+
class ImportStatusProgressTypedDict(TypedDict):
|
28
|
+
r"""Progress of the job."""
|
29
|
+
|
30
|
+
processed: NotRequired[float]
|
31
|
+
r"""Number of items processed."""
|
32
|
+
total: NotRequired[float]
|
33
|
+
r"""Number of total items to process."""
|
34
|
+
percentage: NotRequired[float]
|
35
|
+
r"""Percentage of total items that have been processed."""
|
36
|
+
|
37
|
+
|
38
|
+
class ImportStatusProgress(BaseModel):
|
39
|
+
r"""Progress of the job."""
|
40
|
+
|
41
|
+
processed: Optional[float] = None
|
42
|
+
r"""Number of items processed."""
|
43
|
+
|
44
|
+
total: Optional[float] = None
|
45
|
+
r"""Number of total items to process."""
|
46
|
+
|
47
|
+
percentage: Optional[float] = None
|
48
|
+
r"""Percentage of total items that have been processed."""
|
49
|
+
|
50
|
+
|
51
|
+
class ImportStatusResultsTypedDict(TypedDict):
|
52
|
+
r"""Result of job."""
|
53
|
+
|
54
|
+
succesfull: NotRequired[float]
|
55
|
+
r"""Number of item succesfully processed by job."""
|
56
|
+
warnings: NotRequired[float]
|
57
|
+
r"""Number of warnings encountered during job."""
|
58
|
+
errors: NotRequired[float]
|
59
|
+
r"""Number of errors encountered during job."""
|
60
|
+
|
61
|
+
|
62
|
+
class ImportStatusResults(BaseModel):
|
63
|
+
r"""Result of job."""
|
64
|
+
|
65
|
+
succesfull: Optional[float] = None
|
66
|
+
r"""Number of item succesfully processed by job."""
|
67
|
+
|
68
|
+
warnings: Optional[float] = None
|
69
|
+
r"""Number of warnings encountered during job."""
|
70
|
+
|
71
|
+
errors: Optional[float] = None
|
72
|
+
r"""Number of errors encountered during job."""
|
17
73
|
|
18
74
|
|
19
75
|
class ImportStatusTypedDict(TypedDict):
|
20
76
|
status: ImportStatusStatus
|
77
|
+
r"""Status of the job."""
|
78
|
+
job_type: JobType
|
79
|
+
progress: NotRequired[ImportStatusProgressTypedDict]
|
80
|
+
r"""Progress of the job."""
|
21
81
|
log_file_location: NotRequired[str]
|
82
|
+
r"""Location of the job log file."""
|
83
|
+
start_time: NotRequired[datetime]
|
84
|
+
r"""Start time of job."""
|
85
|
+
estimated_completion: NotRequired[datetime]
|
86
|
+
r"""Estimated completion time of job."""
|
87
|
+
current_operation: NotRequired[str]
|
88
|
+
r"""Current operation of job being processed."""
|
89
|
+
completion_time: NotRequired[datetime]
|
90
|
+
r"""Completion time of job."""
|
91
|
+
failure_time: NotRequired[datetime]
|
92
|
+
r"""Failure time of job."""
|
93
|
+
results: NotRequired[ImportStatusResultsTypedDict]
|
94
|
+
r"""Result of job."""
|
95
|
+
error: NotRequired[str]
|
96
|
+
r"""Error of job."""
|
97
|
+
retryable: NotRequired[bool]
|
98
|
+
r"""Indicates if job is retryable."""
|
22
99
|
|
23
100
|
|
24
101
|
class ImportStatus(BaseModel):
|
25
102
|
status: ImportStatusStatus
|
103
|
+
r"""Status of the job."""
|
104
|
+
|
105
|
+
job_type: Annotated[JobType, pydantic.Field(alias="jobType")]
|
106
|
+
|
107
|
+
progress: Optional[ImportStatusProgress] = None
|
108
|
+
r"""Progress of the job."""
|
26
109
|
|
27
110
|
log_file_location: Annotated[
|
28
111
|
Optional[str], pydantic.Field(alias="logFileLocation")
|
29
112
|
] = None
|
113
|
+
r"""Location of the job log file."""
|
114
|
+
|
115
|
+
start_time: Annotated[Optional[datetime], pydantic.Field(alias="startTime")] = None
|
116
|
+
r"""Start time of job."""
|
117
|
+
|
118
|
+
estimated_completion: Annotated[
|
119
|
+
Optional[datetime], pydantic.Field(alias="estimatedCompletion")
|
120
|
+
] = None
|
121
|
+
r"""Estimated completion time of job."""
|
122
|
+
|
123
|
+
current_operation: Annotated[
|
124
|
+
Optional[str], pydantic.Field(alias="currentOperation")
|
125
|
+
] = None
|
126
|
+
r"""Current operation of job being processed."""
|
127
|
+
|
128
|
+
completion_time: Annotated[
|
129
|
+
Optional[datetime], pydantic.Field(alias="completionTime")
|
130
|
+
] = None
|
131
|
+
r"""Completion time of job."""
|
132
|
+
|
133
|
+
failure_time: Annotated[Optional[datetime], pydantic.Field(alias="failureTime")] = (
|
134
|
+
None
|
135
|
+
)
|
136
|
+
r"""Failure time of job."""
|
137
|
+
|
138
|
+
results: Optional[ImportStatusResults] = None
|
139
|
+
r"""Result of job."""
|
140
|
+
|
141
|
+
error: Optional[str] = None
|
142
|
+
r"""Error of job."""
|
143
|
+
|
144
|
+
retryable: Optional[bool] = None
|
145
|
+
r"""Indicates if job is retryable."""
|
@@ -48,7 +48,7 @@ class KnowledgeExportLanguage(BaseModel):
|
|
48
48
|
r"""The code of the language."""
|
49
49
|
|
50
50
|
|
51
|
-
|
51
|
+
ResourceType = Literal[
|
52
52
|
"articles",
|
53
53
|
"topics",
|
54
54
|
"portals",
|
@@ -104,7 +104,7 @@ class KnowledgeExportTypedDict(TypedDict):
|
|
104
104
|
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."""
|
105
105
|
language: KnowledgeExportLanguageTypedDict
|
106
106
|
r"""The Knowledge Base language in which the content is created."""
|
107
|
-
resource_types: List[
|
107
|
+
resource_types: List[ResourceType]
|
108
108
|
r"""Types of Knowledge Hub resources to export. Multiple values can be specified using a comma-separated list. Details of a single portal are exported.
|
109
109
|
Articles whose state is Published are returned.
|
110
110
|
| Portal Attribute Name | Description
|
@@ -170,9 +170,7 @@ class KnowledgeExport(BaseModel):
|
|
170
170
|
language: KnowledgeExportLanguage
|
171
171
|
r"""The Knowledge Base language in which the content is created."""
|
172
172
|
|
173
|
-
resource_types: Annotated[
|
174
|
-
List[KnowledgeExportResourceType], pydantic.Field(alias="resourceTypes")
|
175
|
-
]
|
173
|
+
resource_types: Annotated[List[ResourceType], pydantic.Field(alias="resourceTypes")]
|
176
174
|
r"""Types of Knowledge Hub resources to export. Multiple values can be specified using a comma-separated list. Details of a single portal are exported.
|
177
175
|
Articles whose state is Published are returned.
|
178
176
|
| Portal Attribute Name | Description
|