egain-api-python 0.1.2__py3-none-any.whl → 0.1.4__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 -38
- egain_api_python/articlelists.py +10 -10
- egain_api_python/connectorssearchevents.py +4 -4
- egain_api_python/errors/gethealthop.py +33 -19
- egain_api_python/escalation.py +8 -8
- egain_api_python/export.py +6 -6
- egain_api_python/federatedsearchevent.py +2 -2
- egain_api_python/general.py +8 -8
- egain_api_python/guidedhelp.py +26 -26
- egain_api_python/health.py +2 -8
- egain_api_python/import_.py +56 -74
- egain_api_python/models/__init__.py +106 -95
- egain_api_python/models/aisearchop.py +6 -34
- egain_api_python/models/aisearchresponse.py +0 -4
- egain_api_python/models/answersrequest.py +0 -31
- egain_api_python/models/answersresponse.py +9 -11
- egain_api_python/models/articleaisearchresult.py +16 -45
- egain_api_python/models/articletype.py +3 -5
- egain_api_python/models/{getimportcontentop.py → cancelimportop.py} +3 -3
- egain_api_python/models/{createimportop.py → createimportjobop.py} +3 -3
- egain_api_python/models/{createimportvalidationop.py → createimportvalidationjobop.py} +3 -3
- 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/{patchimportcontentvalidationop.py → getimportstatusop.py} +3 -3
- 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/retrieveresponse.py +10 -12
- egain_api_python/models/searchresult.py +7 -23
- egain_api_python/populararticles.py +14 -14
- egain_api_python/portal_article.py +64 -64
- egain_api_python/portal_attachment.py +4 -4
- egain_api_python/portal_bookmark.py +6 -6
- egain_api_python/portal_suggestion.py +18 -18
- egain_api_python/portal_topic.py +8 -8
- egain_api_python/portal_userdetails.py +2 -2
- egain_api_python/portal_userprofile.py +4 -4
- egain_api_python/retrieve.py +22 -28
- egain_api_python/sdk.py +25 -24
- egain_api_python/sdkconfiguration.py +3 -4
- egain_api_python/search.py +24 -40
- egain_api_python/usermilestones.py +2 -2
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/METADATA +44 -78
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/RECORD +55 -57
- 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.4.dist-info}/WHEEL +0 -0
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/licenses/LICENSE +0 -0
- {egain_api_python-0.1.2.dist-info → egain_api_python-0.1.4.dist-info}/top_level.txt +0 -0
@@ -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:
|
@@ -6,13 +6,13 @@ from egain_api_python.utils import FieldMetadata, PathParamMetadata
|
|
6
6
|
from typing_extensions import Annotated, TypedDict
|
7
7
|
|
8
8
|
|
9
|
-
|
9
|
+
GET_IMPORT_STATUS_OP_SERVERS = [
|
10
10
|
# Production Server
|
11
11
|
"https://${API_DOMAIN}/knowledge/contentmgr/v4",
|
12
12
|
]
|
13
13
|
|
14
14
|
|
15
|
-
class
|
15
|
+
class GetImportStatusRequestTypedDict(TypedDict):
|
16
16
|
job_id: str
|
17
17
|
r"""**Job ID Parameter**
|
18
18
|
|
@@ -28,7 +28,7 @@ class PatchImportContentValidationRequestTypedDict(TypedDict):
|
|
28
28
|
"""
|
29
29
|
|
30
30
|
|
31
|
-
class
|
31
|
+
class GetImportStatusRequest(BaseModel):
|
32
32
|
job_id: Annotated[
|
33
33
|
str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
34
34
|
]
|
@@ -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
|
@@ -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 .topicbreadcrumb import TopicBreadcrumb, TopicBreadcrumbTypedDict
|
4
5
|
from egain_api_python.types import BaseModel
|
5
6
|
import pydantic
|
6
7
|
from typing import Literal, Optional
|
@@ -22,25 +23,6 @@ ReferenceResponseSource = Literal[
|
|
22
23
|
r"""Source Type"""
|
23
24
|
|
24
25
|
|
25
|
-
class ReferenceResponseLinkTypedDict(TypedDict):
|
26
|
-
r"""Defines the relationship between this resource and another object."""
|
27
|
-
|
28
|
-
rel: NotRequired[str]
|
29
|
-
r"""Defines the relationship between a linked resource and the current object. <br><br> For example: self, prev, next or an object name such as 'user', 'folder' etc."""
|
30
|
-
href: NotRequired[str]
|
31
|
-
r"""The URL that specifies the link's destination."""
|
32
|
-
|
33
|
-
|
34
|
-
class ReferenceResponseLink(BaseModel):
|
35
|
-
r"""Defines the relationship between this resource and another object."""
|
36
|
-
|
37
|
-
rel: Optional[str] = None
|
38
|
-
r"""Defines the relationship between a linked resource and the current object. <br><br> For example: self, prev, next or an object name such as 'user', 'folder' etc."""
|
39
|
-
|
40
|
-
href: Optional[str] = None
|
41
|
-
r"""The URL that specifies the link's destination."""
|
42
|
-
|
43
|
-
|
44
26
|
class ReferenceResponseTypedDict(TypedDict):
|
45
27
|
r"""One document used in generated response"""
|
46
28
|
|
@@ -54,8 +36,8 @@ class ReferenceResponseTypedDict(TypedDict):
|
|
54
36
|
r"""Source Type"""
|
55
37
|
doc_name: NotRequired[str]
|
56
38
|
r"""Name of the attachment, if an attachment was used as the source content."""
|
57
|
-
|
58
|
-
r"""
|
39
|
+
topic_bread_crumb: NotRequired[TopicBreadcrumbTypedDict]
|
40
|
+
r"""This schema contains one or more TopicSummary instances."""
|
59
41
|
|
60
42
|
|
61
43
|
class ReferenceResponse(BaseModel):
|
@@ -76,5 +58,7 @@ class ReferenceResponse(BaseModel):
|
|
76
58
|
doc_name: Annotated[Optional[str], pydantic.Field(alias="docName")] = None
|
77
59
|
r"""Name of the attachment, if an attachment was used as the source content."""
|
78
60
|
|
79
|
-
|
80
|
-
|
61
|
+
topic_bread_crumb: Annotated[
|
62
|
+
Optional[TopicBreadcrumb], pydantic.Field(alias="topicBreadCrumb")
|
63
|
+
] = None
|
64
|
+
r"""This schema contains one or more TopicSummary instances."""
|
@@ -26,15 +26,15 @@ class RetrieveChunksRequestTypedDict(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
|
retrieve_request: NotRequired[RetrieveRequestTypedDict]
|
40
40
|
|
@@ -52,7 +52,7 @@ class RetrieveChunksRequest(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 RetrieveChunksRequest(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 RetrieveChunksRequest(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)),
|
@@ -67,30 +67,28 @@ class RetrieveResponseChannel(BaseModel):
|
|
67
67
|
|
68
68
|
|
69
69
|
class RetrieveResponseTypedDict(TypedDict):
|
70
|
+
search_results: List[SearchResultTypedDict]
|
71
|
+
r"""Top search results with relevance scores and metadata."""
|
72
|
+
session_id: str
|
73
|
+
r"""ID that ties multiple API calls to the same user session. Will be used as part of to tie events back to a session."""
|
70
74
|
answer: NotRequired[RetrieveResponseAnswerTypedDict]
|
71
75
|
r"""If a certified answer is given. The answer object will be present. <br><br> This will be shown only if certified answers are configured and the certified answer meets the configured threshold."""
|
72
|
-
search_results: NotRequired[List[SearchResultTypedDict]]
|
73
|
-
r"""Top search results with relevance scores and metadata."""
|
74
76
|
channel: NotRequired[RetrieveResponseChannelTypedDict]
|
75
77
|
event_id: NotRequired[str]
|
76
78
|
r"""Unique ID for this specific API call or event."""
|
77
|
-
session_id: NotRequired[str]
|
78
|
-
r"""ID that ties multiple API calls to the same user session. Will be used as part of to tie events back to a session."""
|
79
79
|
|
80
80
|
|
81
81
|
class RetrieveResponse(BaseModel):
|
82
|
+
search_results: Annotated[List[SearchResult], pydantic.Field(alias="searchResults")]
|
83
|
+
r"""Top search results with relevance scores and metadata."""
|
84
|
+
|
85
|
+
session_id: Annotated[str, pydantic.Field(alias="sessionId")]
|
86
|
+
r"""ID that ties multiple API calls to the same user session. Will be used as part of to tie events back to a session."""
|
87
|
+
|
82
88
|
answer: Optional[RetrieveResponseAnswer] = None
|
83
89
|
r"""If a certified answer is given. The answer object will be present. <br><br> This will be shown only if certified answers are configured and the certified answer meets the configured threshold."""
|
84
90
|
|
85
|
-
search_results: Annotated[
|
86
|
-
Optional[List[SearchResult]], pydantic.Field(alias="searchResults")
|
87
|
-
] = None
|
88
|
-
r"""Top search results with relevance scores and metadata."""
|
89
|
-
|
90
91
|
channel: Optional[RetrieveResponseChannel] = None
|
91
92
|
|
92
93
|
event_id: Annotated[Optional[str], pydantic.Field(alias="eventId")] = None
|
93
94
|
r"""Unique ID for this specific API call or event."""
|
94
|
-
|
95
|
-
session_id: Annotated[Optional[str], pydantic.Field(alias="sessionId")] = None
|
96
|
-
r"""ID that ties multiple API calls to the same user session. Will be used as part of to tie events back to a session."""
|
@@ -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 .topicbreadcrumb import TopicBreadcrumb, TopicBreadcrumbTypedDict
|
4
5
|
from egain_api_python.types import BaseModel
|
5
6
|
import pydantic
|
6
7
|
from typing import Literal, Optional
|
@@ -28,25 +29,6 @@ SnippetType = Literal[
|
|
28
29
|
]
|
29
30
|
|
30
31
|
|
31
|
-
class SearchResultLinkTypedDict(TypedDict):
|
32
|
-
r"""Defines the relationship between this resource and another object."""
|
33
|
-
|
34
|
-
rel: NotRequired[str]
|
35
|
-
r"""Defines the relationship between a linked resource and the current object. <br><br> For example: self, prev, next or an object name such as 'user', 'folder' etc."""
|
36
|
-
href: NotRequired[str]
|
37
|
-
r"""The URL that specifies the link's destination."""
|
38
|
-
|
39
|
-
|
40
|
-
class SearchResultLink(BaseModel):
|
41
|
-
r"""Defines the relationship between this resource and another object."""
|
42
|
-
|
43
|
-
rel: Optional[str] = None
|
44
|
-
r"""Defines the relationship between a linked resource and the current object. <br><br> For example: self, prev, next or an object name such as 'user', 'folder' etc."""
|
45
|
-
|
46
|
-
href: Optional[str] = None
|
47
|
-
r"""The URL that specifies the link's destination."""
|
48
|
-
|
49
|
-
|
50
32
|
class SearchResultTypedDict(TypedDict):
|
51
33
|
r"""Represents a single document or snippet returned by search, along with its metadata and relevance score."""
|
52
34
|
|
@@ -65,8 +47,8 @@ class SearchResultTypedDict(TypedDict):
|
|
65
47
|
doc_name: NotRequired[str]
|
66
48
|
r"""Name of the attachment, if an attachment was used as the source content."""
|
67
49
|
snippet_type: NotRequired[SnippetType]
|
68
|
-
|
69
|
-
r"""
|
50
|
+
topic_bread_crumb: NotRequired[TopicBreadcrumbTypedDict]
|
51
|
+
r"""This schema contains one or more TopicSummary instances."""
|
70
52
|
|
71
53
|
|
72
54
|
class SearchResult(BaseModel):
|
@@ -97,5 +79,7 @@ class SearchResult(BaseModel):
|
|
97
79
|
Optional[SnippetType], pydantic.Field(alias="snippetType")
|
98
80
|
] = None
|
99
81
|
|
100
|
-
|
101
|
-
|
82
|
+
topic_bread_crumb: Annotated[
|
83
|
+
Optional[TopicBreadcrumb], pydantic.Field(alias="topicBreadCrumb")
|
84
|
+
] = None
|
85
|
+
r"""This schema contains one or more TopicSummary instances."""
|