purecloud-platform-client-v2 145.0.0 → 146.0.0
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.
- package/README.md +2 -2
- package/dist/node/purecloud-platform-client-v2.js +1600 -67
- package/dist/web-amd/purecloud-platform-client-v2.js +1600 -67
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +1600 -67
- package/dist/web-cjs/purecloud-platform-client-v2.js +1600 -67
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +743 -4
- package/package.json +1 -1
- package/src/purecloud-platform-client-v2/ApiClient.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +3 -2
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1778 -246
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +2 -2
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/index.js +1 -1
|
@@ -5,7 +5,7 @@ class KnowledgeApi {
|
|
|
5
5
|
/**
|
|
6
6
|
* Knowledge service.
|
|
7
7
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
8
|
-
* @version
|
|
8
|
+
* @version 146.0.0
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -48,28 +48,23 @@ class KnowledgeApi {
|
|
|
48
48
|
/**
|
|
49
49
|
* Delete category
|
|
50
50
|
*
|
|
51
|
-
* @param {String} categoryId Category ID
|
|
52
51
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
53
|
-
* @param {
|
|
52
|
+
* @param {String} categoryId Category ID
|
|
54
53
|
*/
|
|
55
|
-
|
|
56
|
-
// verify the required parameter 'categoryId' is set
|
|
57
|
-
if (categoryId === undefined || categoryId === null) {
|
|
58
|
-
throw 'Missing the required parameter "categoryId" when calling deleteKnowledgeKnowledgebaseLanguageCategory';
|
|
59
|
-
}
|
|
54
|
+
deleteKnowledgeKnowledgebaseCategory(knowledgeBaseId, categoryId) {
|
|
60
55
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
61
56
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
62
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
57
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseCategory';
|
|
63
58
|
}
|
|
64
|
-
// verify the required parameter '
|
|
65
|
-
if (
|
|
66
|
-
throw 'Missing the required parameter "
|
|
59
|
+
// verify the required parameter 'categoryId' is set
|
|
60
|
+
if (categoryId === undefined || categoryId === null) {
|
|
61
|
+
throw 'Missing the required parameter "categoryId" when calling deleteKnowledgeKnowledgebaseCategory';
|
|
67
62
|
}
|
|
68
63
|
|
|
69
64
|
return this.apiClient.callApi(
|
|
70
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
65
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories/{categoryId}',
|
|
71
66
|
'DELETE',
|
|
72
|
-
{ '
|
|
67
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'categoryId': categoryId },
|
|
73
68
|
{ },
|
|
74
69
|
{ },
|
|
75
70
|
{ },
|
|
@@ -81,30 +76,25 @@ class KnowledgeApi {
|
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
/**
|
|
84
|
-
* Delete document
|
|
79
|
+
* Delete document.
|
|
85
80
|
*
|
|
86
|
-
* @param {String}
|
|
87
|
-
* @param {String}
|
|
88
|
-
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
81
|
+
* @param {String} knowledgeBaseId Knowledge base ID.
|
|
82
|
+
* @param {String} documentId Document ID.
|
|
89
83
|
*/
|
|
90
|
-
|
|
91
|
-
// verify the required parameter 'documentId' is set
|
|
92
|
-
if (documentId === undefined || documentId === null) {
|
|
93
|
-
throw 'Missing the required parameter "documentId" when calling deleteKnowledgeKnowledgebaseLanguageDocument';
|
|
94
|
-
}
|
|
84
|
+
deleteKnowledgeKnowledgebaseDocument(knowledgeBaseId, documentId) {
|
|
95
85
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
96
86
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
97
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
87
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseDocument';
|
|
98
88
|
}
|
|
99
|
-
// verify the required parameter '
|
|
100
|
-
if (
|
|
101
|
-
throw 'Missing the required parameter "
|
|
89
|
+
// verify the required parameter 'documentId' is set
|
|
90
|
+
if (documentId === undefined || documentId === null) {
|
|
91
|
+
throw 'Missing the required parameter "documentId" when calling deleteKnowledgeKnowledgebaseDocument';
|
|
102
92
|
}
|
|
103
93
|
|
|
104
94
|
return this.apiClient.callApi(
|
|
105
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
95
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}',
|
|
106
96
|
'DELETE',
|
|
107
|
-
{ '
|
|
97
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
108
98
|
{ },
|
|
109
99
|
{ },
|
|
110
100
|
{ },
|
|
@@ -116,30 +106,30 @@ class KnowledgeApi {
|
|
|
116
106
|
}
|
|
117
107
|
|
|
118
108
|
/**
|
|
119
|
-
* Delete
|
|
109
|
+
* Delete a variation for a document.
|
|
120
110
|
*
|
|
121
|
-
* @param {String}
|
|
122
|
-
* @param {
|
|
123
|
-
* @param {String}
|
|
111
|
+
* @param {String} documentVariationId Globally unique identifier for a document variation.
|
|
112
|
+
* @param {String} documentId Globally unique identifier for a document.
|
|
113
|
+
* @param {String} knowledgeBaseId Globally unique identifier for a knowledge base.
|
|
124
114
|
*/
|
|
125
|
-
|
|
126
|
-
// verify the required parameter '
|
|
127
|
-
if (
|
|
128
|
-
throw 'Missing the required parameter "
|
|
115
|
+
deleteKnowledgeKnowledgebaseDocumentVariation(documentVariationId, documentId, knowledgeBaseId) {
|
|
116
|
+
// verify the required parameter 'documentVariationId' is set
|
|
117
|
+
if (documentVariationId === undefined || documentVariationId === null) {
|
|
118
|
+
throw 'Missing the required parameter "documentVariationId" when calling deleteKnowledgeKnowledgebaseDocumentVariation';
|
|
129
119
|
}
|
|
130
|
-
// verify the required parameter '
|
|
131
|
-
if (
|
|
132
|
-
throw 'Missing the required parameter "
|
|
120
|
+
// verify the required parameter 'documentId' is set
|
|
121
|
+
if (documentId === undefined || documentId === null) {
|
|
122
|
+
throw 'Missing the required parameter "documentId" when calling deleteKnowledgeKnowledgebaseDocumentVariation';
|
|
133
123
|
}
|
|
134
|
-
// verify the required parameter '
|
|
135
|
-
if (
|
|
136
|
-
throw 'Missing the required parameter "
|
|
124
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
125
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
126
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseDocumentVariation';
|
|
137
127
|
}
|
|
138
128
|
|
|
139
129
|
return this.apiClient.callApi(
|
|
140
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
130
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/variations/{documentVariationId}',
|
|
141
131
|
'DELETE',
|
|
142
|
-
{ '
|
|
132
|
+
{ 'documentVariationId': documentVariationId,'documentId': documentId,'knowledgeBaseId': knowledgeBaseId },
|
|
143
133
|
{ },
|
|
144
134
|
{ },
|
|
145
135
|
{ },
|
|
@@ -151,20 +141,25 @@ class KnowledgeApi {
|
|
|
151
141
|
}
|
|
152
142
|
|
|
153
143
|
/**
|
|
154
|
-
*
|
|
144
|
+
* Delete export job
|
|
155
145
|
*
|
|
156
146
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
147
|
+
* @param {String} exportJobId Export job ID
|
|
157
148
|
*/
|
|
158
|
-
|
|
149
|
+
deleteKnowledgeKnowledgebaseExportJob(knowledgeBaseId, exportJobId) {
|
|
159
150
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
160
151
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
161
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
152
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseExportJob';
|
|
153
|
+
}
|
|
154
|
+
// verify the required parameter 'exportJobId' is set
|
|
155
|
+
if (exportJobId === undefined || exportJobId === null) {
|
|
156
|
+
throw 'Missing the required parameter "exportJobId" when calling deleteKnowledgeKnowledgebaseExportJob';
|
|
162
157
|
}
|
|
163
158
|
|
|
164
159
|
return this.apiClient.callApi(
|
|
165
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}',
|
|
166
|
-
'
|
|
167
|
-
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
160
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/export/jobs/{exportJobId}',
|
|
161
|
+
'DELETE',
|
|
162
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'exportJobId': exportJobId },
|
|
168
163
|
{ },
|
|
169
164
|
{ },
|
|
170
165
|
{ },
|
|
@@ -176,34 +171,26 @@ class KnowledgeApi {
|
|
|
176
171
|
}
|
|
177
172
|
|
|
178
173
|
/**
|
|
179
|
-
*
|
|
174
|
+
* Delete import job
|
|
180
175
|
*
|
|
181
176
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
182
|
-
* @param {
|
|
183
|
-
* @param {Object} opts Optional parameters
|
|
184
|
-
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
185
|
-
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
186
|
-
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
187
|
-
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
188
|
-
* @param {String} opts.name Filter to return the categories that starts with the given category name.
|
|
177
|
+
* @param {String} importJobId Import job ID
|
|
189
178
|
*/
|
|
190
|
-
|
|
191
|
-
opts = opts || {};
|
|
192
|
-
|
|
179
|
+
deleteKnowledgeKnowledgebaseImportJob(knowledgeBaseId, importJobId) {
|
|
193
180
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
194
181
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
195
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
182
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseImportJob';
|
|
196
183
|
}
|
|
197
|
-
// verify the required parameter '
|
|
198
|
-
if (
|
|
199
|
-
throw 'Missing the required parameter "
|
|
184
|
+
// verify the required parameter 'importJobId' is set
|
|
185
|
+
if (importJobId === undefined || importJobId === null) {
|
|
186
|
+
throw 'Missing the required parameter "importJobId" when calling deleteKnowledgeKnowledgebaseImportJob';
|
|
200
187
|
}
|
|
201
188
|
|
|
202
189
|
return this.apiClient.callApi(
|
|
203
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
204
|
-
'
|
|
205
|
-
{ 'knowledgeBaseId': knowledgeBaseId,'
|
|
206
|
-
{
|
|
190
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/import/jobs/{importJobId}',
|
|
191
|
+
'DELETE',
|
|
192
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'importJobId': importJobId },
|
|
193
|
+
{ },
|
|
207
194
|
{ },
|
|
208
195
|
{ },
|
|
209
196
|
null,
|
|
@@ -214,30 +201,25 @@ class KnowledgeApi {
|
|
|
214
201
|
}
|
|
215
202
|
|
|
216
203
|
/**
|
|
217
|
-
*
|
|
204
|
+
* Delete label
|
|
218
205
|
*
|
|
219
|
-
* @param {String} categoryId Category ID
|
|
220
206
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
221
|
-
* @param {
|
|
207
|
+
* @param {String} labelId Label ID
|
|
222
208
|
*/
|
|
223
|
-
|
|
224
|
-
// verify the required parameter 'categoryId' is set
|
|
225
|
-
if (categoryId === undefined || categoryId === null) {
|
|
226
|
-
throw 'Missing the required parameter "categoryId" when calling getKnowledgeKnowledgebaseLanguageCategory';
|
|
227
|
-
}
|
|
209
|
+
deleteKnowledgeKnowledgebaseLabel(knowledgeBaseId, labelId) {
|
|
228
210
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
229
211
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
230
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
212
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseLabel';
|
|
231
213
|
}
|
|
232
|
-
// verify the required parameter '
|
|
233
|
-
if (
|
|
234
|
-
throw 'Missing the required parameter "
|
|
214
|
+
// verify the required parameter 'labelId' is set
|
|
215
|
+
if (labelId === undefined || labelId === null) {
|
|
216
|
+
throw 'Missing the required parameter "labelId" when calling deleteKnowledgeKnowledgebaseLabel';
|
|
235
217
|
}
|
|
236
218
|
|
|
237
219
|
return this.apiClient.callApi(
|
|
238
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
239
|
-
'
|
|
240
|
-
{ '
|
|
220
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels/{labelId}',
|
|
221
|
+
'DELETE',
|
|
222
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'labelId': labelId },
|
|
241
223
|
{ },
|
|
242
224
|
{ },
|
|
243
225
|
{ },
|
|
@@ -249,30 +231,30 @@ class KnowledgeApi {
|
|
|
249
231
|
}
|
|
250
232
|
|
|
251
233
|
/**
|
|
252
|
-
*
|
|
234
|
+
* Delete category
|
|
253
235
|
*
|
|
254
|
-
* @param {String}
|
|
236
|
+
* @param {String} categoryId Category ID
|
|
255
237
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
256
238
|
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
257
239
|
*/
|
|
258
|
-
|
|
259
|
-
// verify the required parameter '
|
|
260
|
-
if (
|
|
261
|
-
throw 'Missing the required parameter "
|
|
240
|
+
deleteKnowledgeKnowledgebaseLanguageCategory(categoryId, knowledgeBaseId, languageCode) {
|
|
241
|
+
// verify the required parameter 'categoryId' is set
|
|
242
|
+
if (categoryId === undefined || categoryId === null) {
|
|
243
|
+
throw 'Missing the required parameter "categoryId" when calling deleteKnowledgeKnowledgebaseLanguageCategory';
|
|
262
244
|
}
|
|
263
245
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
264
246
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
265
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
247
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseLanguageCategory';
|
|
266
248
|
}
|
|
267
249
|
// verify the required parameter 'languageCode' is set
|
|
268
250
|
if (languageCode === undefined || languageCode === null) {
|
|
269
|
-
throw 'Missing the required parameter "languageCode" when calling
|
|
251
|
+
throw 'Missing the required parameter "languageCode" when calling deleteKnowledgeKnowledgebaseLanguageCategory';
|
|
270
252
|
}
|
|
271
253
|
|
|
272
254
|
return this.apiClient.callApi(
|
|
273
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/
|
|
274
|
-
'
|
|
275
|
-
{ '
|
|
255
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/categories/{categoryId}',
|
|
256
|
+
'DELETE',
|
|
257
|
+
{ 'categoryId': categoryId,'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
276
258
|
{ },
|
|
277
259
|
{ },
|
|
278
260
|
{ },
|
|
@@ -284,38 +266,31 @@ class KnowledgeApi {
|
|
|
284
266
|
}
|
|
285
267
|
|
|
286
268
|
/**
|
|
287
|
-
*
|
|
269
|
+
* Delete document
|
|
288
270
|
*
|
|
271
|
+
* @param {String} documentId Document ID
|
|
289
272
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
290
273
|
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
291
|
-
* @param {Object} opts Optional parameters
|
|
292
|
-
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
293
|
-
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
294
|
-
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
295
|
-
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
296
|
-
* @param {String} opts.categories Filter by categories ids, comma separated values expected.
|
|
297
|
-
* @param {String} opts.title Filter by document title.
|
|
298
|
-
* @param {Object} opts.sortBy Sort by.
|
|
299
|
-
* @param {Object} opts.sortOrder Sort Order.
|
|
300
|
-
* @param {Array.<String>} opts.documentIds Comma-separated list of document identifiers to fetch by.
|
|
301
274
|
*/
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
275
|
+
deleteKnowledgeKnowledgebaseLanguageDocument(documentId, knowledgeBaseId, languageCode) {
|
|
276
|
+
// verify the required parameter 'documentId' is set
|
|
277
|
+
if (documentId === undefined || documentId === null) {
|
|
278
|
+
throw 'Missing the required parameter "documentId" when calling deleteKnowledgeKnowledgebaseLanguageDocument';
|
|
279
|
+
}
|
|
305
280
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
306
281
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
307
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
282
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseLanguageDocument';
|
|
308
283
|
}
|
|
309
284
|
// verify the required parameter 'languageCode' is set
|
|
310
285
|
if (languageCode === undefined || languageCode === null) {
|
|
311
|
-
throw 'Missing the required parameter "languageCode" when calling
|
|
286
|
+
throw 'Missing the required parameter "languageCode" when calling deleteKnowledgeKnowledgebaseLanguageDocument';
|
|
312
287
|
}
|
|
313
288
|
|
|
314
289
|
return this.apiClient.callApi(
|
|
315
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents',
|
|
316
|
-
'
|
|
317
|
-
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
318
|
-
{
|
|
290
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/{documentId}',
|
|
291
|
+
'DELETE',
|
|
292
|
+
{ 'documentId': documentId,'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
293
|
+
{ },
|
|
319
294
|
{ },
|
|
320
295
|
{ },
|
|
321
296
|
null,
|
|
@@ -326,29 +301,29 @@ class KnowledgeApi {
|
|
|
326
301
|
}
|
|
327
302
|
|
|
328
303
|
/**
|
|
329
|
-
*
|
|
304
|
+
* Delete import operation
|
|
330
305
|
*
|
|
331
306
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
332
307
|
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
333
308
|
* @param {String} importId Import ID
|
|
334
309
|
*/
|
|
335
|
-
|
|
310
|
+
deleteKnowledgeKnowledgebaseLanguageDocumentsImport(knowledgeBaseId, languageCode, importId) {
|
|
336
311
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
337
312
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
338
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
313
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling deleteKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
339
314
|
}
|
|
340
315
|
// verify the required parameter 'languageCode' is set
|
|
341
316
|
if (languageCode === undefined || languageCode === null) {
|
|
342
|
-
throw 'Missing the required parameter "languageCode" when calling
|
|
317
|
+
throw 'Missing the required parameter "languageCode" when calling deleteKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
343
318
|
}
|
|
344
319
|
// verify the required parameter 'importId' is set
|
|
345
320
|
if (importId === undefined || importId === null) {
|
|
346
|
-
throw 'Missing the required parameter "importId" when calling
|
|
321
|
+
throw 'Missing the required parameter "importId" when calling deleteKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
347
322
|
}
|
|
348
323
|
|
|
349
324
|
return this.apiClient.callApi(
|
|
350
325
|
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/imports/{importId}',
|
|
351
|
-
'
|
|
326
|
+
'DELETE',
|
|
352
327
|
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode,'importId': importId },
|
|
353
328
|
{ },
|
|
354
329
|
{ },
|
|
@@ -361,31 +336,33 @@ class KnowledgeApi {
|
|
|
361
336
|
}
|
|
362
337
|
|
|
363
338
|
/**
|
|
364
|
-
* Get
|
|
339
|
+
* Get categories
|
|
365
340
|
*
|
|
366
|
-
* @param {String}
|
|
367
|
-
* @param {Object}
|
|
368
|
-
* @param {String}
|
|
341
|
+
* @param {String} sessionId Knowledge guest session ID.
|
|
342
|
+
* @param {Object} opts Optional parameters
|
|
343
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
344
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
345
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
346
|
+
* @param {String} opts.parentId If specified, retrieves the children categories by parent category ID.
|
|
347
|
+
* @param {Boolean} opts.isRoot If specified, retrieves only the root categories.
|
|
348
|
+
* @param {String} opts.name Filter to return the categories that starts with the given category name.
|
|
349
|
+
* @param {Object} opts.sortBy Name: sort by category names alphabetically; Hierarchy: sort by the full path of hierarchical category names alphabetically (default to Name)
|
|
350
|
+
* @param {String} opts.expand The specified entity attribute will be filled. Supported value:Ancestors: every ancestors will be filled via the parent attribute recursively,but only the id, name, parentId will be present for the ancestors.
|
|
351
|
+
* @param {Boolean} opts.includeDocumentCount If specified, retrieves the number of documents related to category.
|
|
369
352
|
*/
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
if (languageCode === undefined || languageCode === null) {
|
|
377
|
-
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageTraining';
|
|
378
|
-
}
|
|
379
|
-
// verify the required parameter 'trainingId' is set
|
|
380
|
-
if (trainingId === undefined || trainingId === null) {
|
|
381
|
-
throw 'Missing the required parameter "trainingId" when calling getKnowledgeKnowledgebaseLanguageTraining';
|
|
353
|
+
getKnowledgeGuestSessionCategories(sessionId, opts) {
|
|
354
|
+
opts = opts || {};
|
|
355
|
+
|
|
356
|
+
// verify the required parameter 'sessionId' is set
|
|
357
|
+
if (sessionId === undefined || sessionId === null) {
|
|
358
|
+
throw 'Missing the required parameter "sessionId" when calling getKnowledgeGuestSessionCategories';
|
|
382
359
|
}
|
|
383
360
|
|
|
384
361
|
return this.apiClient.callApi(
|
|
385
|
-
'/api/v2/knowledge/
|
|
362
|
+
'/api/v2/knowledge/guest/sessions/{sessionId}/categories',
|
|
386
363
|
'GET',
|
|
387
|
-
{ '
|
|
388
|
-
{
|
|
364
|
+
{ 'sessionId': sessionId },
|
|
365
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'parentId': opts['parentId'],'isRoot': opts['isRoot'],'name': opts['name'],'sortBy': opts['sortBy'],'expand': opts['expand'],'includeDocumentCount': opts['includeDocumentCount'] },
|
|
389
366
|
{ },
|
|
390
367
|
{ },
|
|
391
368
|
null,
|
|
@@ -396,34 +373,26 @@ class KnowledgeApi {
|
|
|
396
373
|
}
|
|
397
374
|
|
|
398
375
|
/**
|
|
399
|
-
* Get
|
|
376
|
+
* Get a knowledge document by ID.
|
|
400
377
|
*
|
|
401
|
-
* @param {String}
|
|
402
|
-
* @param {
|
|
403
|
-
* @param {Object} opts Optional parameters
|
|
404
|
-
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
405
|
-
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
406
|
-
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
407
|
-
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
408
|
-
* @param {Object} opts.knowledgeDocumentsState Return the training with the specified state of the trained documents.
|
|
378
|
+
* @param {String} sessionId Knowledge guest session ID.
|
|
379
|
+
* @param {String} documentId Document ID
|
|
409
380
|
*/
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
415
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageTrainings';
|
|
381
|
+
getKnowledgeGuestSessionDocument(sessionId, documentId) {
|
|
382
|
+
// verify the required parameter 'sessionId' is set
|
|
383
|
+
if (sessionId === undefined || sessionId === null) {
|
|
384
|
+
throw 'Missing the required parameter "sessionId" when calling getKnowledgeGuestSessionDocument';
|
|
416
385
|
}
|
|
417
|
-
// verify the required parameter '
|
|
418
|
-
if (
|
|
419
|
-
throw 'Missing the required parameter "
|
|
386
|
+
// verify the required parameter 'documentId' is set
|
|
387
|
+
if (documentId === undefined || documentId === null) {
|
|
388
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeGuestSessionDocument';
|
|
420
389
|
}
|
|
421
390
|
|
|
422
391
|
return this.apiClient.callApi(
|
|
423
|
-
'/api/v2/knowledge/
|
|
392
|
+
'/api/v2/knowledge/guest/sessions/{sessionId}/documents/{documentId}',
|
|
424
393
|
'GET',
|
|
425
|
-
{ '
|
|
426
|
-
{
|
|
394
|
+
{ 'sessionId': sessionId,'documentId': documentId },
|
|
395
|
+
{ },
|
|
427
396
|
{ },
|
|
428
397
|
{ },
|
|
429
398
|
null,
|
|
@@ -434,28 +403,27 @@ class KnowledgeApi {
|
|
|
434
403
|
}
|
|
435
404
|
|
|
436
405
|
/**
|
|
437
|
-
* Get
|
|
406
|
+
* Get documents.
|
|
438
407
|
*
|
|
408
|
+
* @param {String} sessionId Knowledge guest session ID.
|
|
439
409
|
* @param {Object} opts Optional parameters
|
|
440
|
-
* @param {String} opts.
|
|
441
|
-
* @param {
|
|
442
|
-
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
410
|
+
* @param {Array.<String>} opts.categoryId If specified, retrieves documents associated with category ids, comma separated values expected.
|
|
411
|
+
* @param {Boolean} opts.includeSubcategories Works along with 'categoryId' query parameter. If specified, retrieves documents associated with category ids and its children categories.
|
|
443
412
|
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
444
|
-
* @param {String} opts.name Filter by Name.
|
|
445
|
-
* @param {Object} opts.coreLanguage Filter by core language.
|
|
446
|
-
* @param {Boolean} opts.published Filter by published status.
|
|
447
|
-
* @param {Object} opts.sortBy Sort by.
|
|
448
|
-
* @param {Object} opts.sortOrder Sort Order.
|
|
449
413
|
*/
|
|
450
|
-
|
|
414
|
+
getKnowledgeGuestSessionDocuments(sessionId, opts) {
|
|
451
415
|
opts = opts || {};
|
|
452
416
|
|
|
417
|
+
// verify the required parameter 'sessionId' is set
|
|
418
|
+
if (sessionId === undefined || sessionId === null) {
|
|
419
|
+
throw 'Missing the required parameter "sessionId" when calling getKnowledgeGuestSessionDocuments';
|
|
420
|
+
}
|
|
453
421
|
|
|
454
422
|
return this.apiClient.callApi(
|
|
455
|
-
'/api/v2/knowledge/
|
|
423
|
+
'/api/v2/knowledge/guest/sessions/{sessionId}/documents',
|
|
456
424
|
'GET',
|
|
457
|
-
{
|
|
458
|
-
{ '
|
|
425
|
+
{ 'sessionId': sessionId },
|
|
426
|
+
{ 'categoryId': this.apiClient.buildCollectionParam(opts['categoryId'], 'multi'),'includeSubcategories': opts['includeSubcategories'],'pageSize': opts['pageSize'] },
|
|
459
427
|
{ },
|
|
460
428
|
{ },
|
|
461
429
|
null,
|
|
@@ -466,29 +434,24 @@ class KnowledgeApi {
|
|
|
466
434
|
}
|
|
467
435
|
|
|
468
436
|
/**
|
|
469
|
-
*
|
|
437
|
+
* Get knowledge base
|
|
470
438
|
*
|
|
471
439
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
472
|
-
* @param {Object} body
|
|
473
440
|
*/
|
|
474
|
-
|
|
441
|
+
getKnowledgeKnowledgebase(knowledgeBaseId) {
|
|
475
442
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
476
443
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
477
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
478
|
-
}
|
|
479
|
-
// verify the required parameter 'body' is set
|
|
480
|
-
if (body === undefined || body === null) {
|
|
481
|
-
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebase';
|
|
444
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebase';
|
|
482
445
|
}
|
|
483
446
|
|
|
484
447
|
return this.apiClient.callApi(
|
|
485
448
|
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}',
|
|
486
|
-
'
|
|
449
|
+
'GET',
|
|
487
450
|
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
488
451
|
{ },
|
|
489
452
|
{ },
|
|
490
453
|
{ },
|
|
491
|
-
|
|
454
|
+
null,
|
|
492
455
|
['PureCloud OAuth'],
|
|
493
456
|
['application/json'],
|
|
494
457
|
['application/json']
|
|
@@ -496,35 +459,1465 @@ class KnowledgeApi {
|
|
|
496
459
|
}
|
|
497
460
|
|
|
498
461
|
/**
|
|
499
|
-
*
|
|
462
|
+
* Get categories
|
|
500
463
|
*
|
|
501
|
-
* @param {String} categoryId Category ID
|
|
502
464
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
503
|
-
* @param {Object}
|
|
504
|
-
* @param {
|
|
465
|
+
* @param {Object} opts Optional parameters
|
|
466
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
467
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
468
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
469
|
+
* @param {String} opts.parentId If specified, retrieves the children categories by parent category ID.
|
|
470
|
+
* @param {Boolean} opts.isRoot If specified, retrieves only the root categories.
|
|
471
|
+
* @param {String} opts.name Filter to return the categories that starts with the given category name.
|
|
472
|
+
* @param {Object} opts.sortBy Name: sort by category names alphabetically; Hierarchy: sort by the full path of hierarchical category names alphabetically (default to Name)
|
|
473
|
+
* @param {String} opts.expand The specified entity attribute will be filled. Supported value:Ancestors: every ancestors will be filled via the parent attribute recursively,but only the id, name, parentId will be present for the ancestors.
|
|
474
|
+
* @param {Boolean} opts.includeDocumentCount If specified, retrieves the number of documents related to category.
|
|
475
|
+
*/
|
|
476
|
+
getKnowledgeKnowledgebaseCategories(knowledgeBaseId, opts) {
|
|
477
|
+
opts = opts || {};
|
|
478
|
+
|
|
479
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
480
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
481
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseCategories';
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
return this.apiClient.callApi(
|
|
485
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories',
|
|
486
|
+
'GET',
|
|
487
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
488
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'parentId': opts['parentId'],'isRoot': opts['isRoot'],'name': opts['name'],'sortBy': opts['sortBy'],'expand': opts['expand'],'includeDocumentCount': opts['includeDocumentCount'] },
|
|
489
|
+
{ },
|
|
490
|
+
{ },
|
|
491
|
+
null,
|
|
492
|
+
['PureCloud OAuth'],
|
|
493
|
+
['application/json'],
|
|
494
|
+
['application/json']
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Get category
|
|
500
|
+
*
|
|
501
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
502
|
+
* @param {String} categoryId Category ID
|
|
503
|
+
*/
|
|
504
|
+
getKnowledgeKnowledgebaseCategory(knowledgeBaseId, categoryId) {
|
|
505
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
506
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
507
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseCategory';
|
|
508
|
+
}
|
|
509
|
+
// verify the required parameter 'categoryId' is set
|
|
510
|
+
if (categoryId === undefined || categoryId === null) {
|
|
511
|
+
throw 'Missing the required parameter "categoryId" when calling getKnowledgeKnowledgebaseCategory';
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
return this.apiClient.callApi(
|
|
515
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories/{categoryId}',
|
|
516
|
+
'GET',
|
|
517
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'categoryId': categoryId },
|
|
518
|
+
{ },
|
|
519
|
+
{ },
|
|
520
|
+
{ },
|
|
521
|
+
null,
|
|
522
|
+
['PureCloud OAuth'],
|
|
523
|
+
['application/json'],
|
|
524
|
+
['application/json']
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Get document.
|
|
530
|
+
*
|
|
531
|
+
* @param {String} knowledgeBaseId Knowledge base ID.
|
|
532
|
+
* @param {String} documentId Document ID.
|
|
533
|
+
* @param {Object} opts Optional parameters
|
|
534
|
+
* @param {Array.<String>} opts.expand The specified entity attributes will be filled. Comma separated values expected. Max No. of variations that can be returned on expand is 20.
|
|
535
|
+
* @param {Object} opts.state when state is Draft, draft version of the document is returned,otherwise by default published version is returned in the response.
|
|
536
|
+
*/
|
|
537
|
+
getKnowledgeKnowledgebaseDocument(knowledgeBaseId, documentId, opts) {
|
|
538
|
+
opts = opts || {};
|
|
539
|
+
|
|
540
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
541
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
542
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocument';
|
|
543
|
+
}
|
|
544
|
+
// verify the required parameter 'documentId' is set
|
|
545
|
+
if (documentId === undefined || documentId === null) {
|
|
546
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocument';
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
return this.apiClient.callApi(
|
|
550
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}',
|
|
551
|
+
'GET',
|
|
552
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
553
|
+
{ 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'state': opts['state'] },
|
|
554
|
+
{ },
|
|
555
|
+
{ },
|
|
556
|
+
null,
|
|
557
|
+
['PureCloud OAuth'],
|
|
558
|
+
['application/json'],
|
|
559
|
+
['application/json']
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Get a variation for a document.
|
|
565
|
+
*
|
|
566
|
+
* @param {String} documentVariationId Globally unique identifier for a document variation.
|
|
567
|
+
* @param {String} documentId Globally unique identifier for a document.
|
|
568
|
+
* @param {String} knowledgeBaseId Globally unique identifier for a knowledge base.
|
|
569
|
+
* @param {Object} opts Optional parameters
|
|
570
|
+
* @param {Object} opts.documentState The state of the document.
|
|
571
|
+
*/
|
|
572
|
+
getKnowledgeKnowledgebaseDocumentVariation(documentVariationId, documentId, knowledgeBaseId, opts) {
|
|
573
|
+
opts = opts || {};
|
|
574
|
+
|
|
575
|
+
// verify the required parameter 'documentVariationId' is set
|
|
576
|
+
if (documentVariationId === undefined || documentVariationId === null) {
|
|
577
|
+
throw 'Missing the required parameter "documentVariationId" when calling getKnowledgeKnowledgebaseDocumentVariation';
|
|
578
|
+
}
|
|
579
|
+
// verify the required parameter 'documentId' is set
|
|
580
|
+
if (documentId === undefined || documentId === null) {
|
|
581
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocumentVariation';
|
|
582
|
+
}
|
|
583
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
584
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
585
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocumentVariation';
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
return this.apiClient.callApi(
|
|
589
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/variations/{documentVariationId}',
|
|
590
|
+
'GET',
|
|
591
|
+
{ 'documentVariationId': documentVariationId,'documentId': documentId,'knowledgeBaseId': knowledgeBaseId },
|
|
592
|
+
{ 'documentState': opts['documentState'] },
|
|
593
|
+
{ },
|
|
594
|
+
{ },
|
|
595
|
+
null,
|
|
596
|
+
['PureCloud OAuth'],
|
|
597
|
+
['application/json'],
|
|
598
|
+
['application/json']
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Get variations for a document.
|
|
604
|
+
*
|
|
605
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
606
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
607
|
+
* @param {Object} opts Optional parameters
|
|
608
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
609
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
610
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
611
|
+
* @param {Object} opts.documentState The state of the document.
|
|
612
|
+
*/
|
|
613
|
+
getKnowledgeKnowledgebaseDocumentVariations(knowledgeBaseId, documentId, opts) {
|
|
614
|
+
opts = opts || {};
|
|
615
|
+
|
|
616
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
617
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
618
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocumentVariations';
|
|
619
|
+
}
|
|
620
|
+
// verify the required parameter 'documentId' is set
|
|
621
|
+
if (documentId === undefined || documentId === null) {
|
|
622
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocumentVariations';
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
return this.apiClient.callApi(
|
|
626
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/variations',
|
|
627
|
+
'GET',
|
|
628
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
629
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'documentState': opts['documentState'] },
|
|
630
|
+
{ },
|
|
631
|
+
{ },
|
|
632
|
+
null,
|
|
633
|
+
['PureCloud OAuth'],
|
|
634
|
+
['application/json'],
|
|
635
|
+
['application/json']
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Get document version.
|
|
641
|
+
*
|
|
642
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
643
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
644
|
+
* @param {String} versionId Globally unique identifier for the document version.
|
|
645
|
+
* @param {Object} opts Optional parameters
|
|
646
|
+
* @param {Array.<String>} opts.expand The specified entity attributes will be filled. Comma separated values expected.
|
|
647
|
+
*/
|
|
648
|
+
getKnowledgeKnowledgebaseDocumentVersion(knowledgeBaseId, documentId, versionId, opts) {
|
|
649
|
+
opts = opts || {};
|
|
650
|
+
|
|
651
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
652
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
653
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocumentVersion';
|
|
654
|
+
}
|
|
655
|
+
// verify the required parameter 'documentId' is set
|
|
656
|
+
if (documentId === undefined || documentId === null) {
|
|
657
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocumentVersion';
|
|
658
|
+
}
|
|
659
|
+
// verify the required parameter 'versionId' is set
|
|
660
|
+
if (versionId === undefined || versionId === null) {
|
|
661
|
+
throw 'Missing the required parameter "versionId" when calling getKnowledgeKnowledgebaseDocumentVersion';
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
return this.apiClient.callApi(
|
|
665
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/versions/{versionId}',
|
|
666
|
+
'GET',
|
|
667
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId,'versionId': versionId },
|
|
668
|
+
{ 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
|
|
669
|
+
{ },
|
|
670
|
+
{ },
|
|
671
|
+
null,
|
|
672
|
+
['PureCloud OAuth'],
|
|
673
|
+
['application/json'],
|
|
674
|
+
['application/json']
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Get variation for the given document version.
|
|
680
|
+
*
|
|
681
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
682
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
683
|
+
* @param {String} versionId Globally unique identifier for the document version.
|
|
684
|
+
* @param {String} variationId Globally unique identifier for the document version variation.
|
|
685
|
+
*/
|
|
686
|
+
getKnowledgeKnowledgebaseDocumentVersionVariation(knowledgeBaseId, documentId, versionId, variationId) {
|
|
687
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
688
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
689
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocumentVersionVariation';
|
|
690
|
+
}
|
|
691
|
+
// verify the required parameter 'documentId' is set
|
|
692
|
+
if (documentId === undefined || documentId === null) {
|
|
693
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocumentVersionVariation';
|
|
694
|
+
}
|
|
695
|
+
// verify the required parameter 'versionId' is set
|
|
696
|
+
if (versionId === undefined || versionId === null) {
|
|
697
|
+
throw 'Missing the required parameter "versionId" when calling getKnowledgeKnowledgebaseDocumentVersionVariation';
|
|
698
|
+
}
|
|
699
|
+
// verify the required parameter 'variationId' is set
|
|
700
|
+
if (variationId === undefined || variationId === null) {
|
|
701
|
+
throw 'Missing the required parameter "variationId" when calling getKnowledgeKnowledgebaseDocumentVersionVariation';
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
return this.apiClient.callApi(
|
|
705
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/versions/{versionId}/variations/{variationId}',
|
|
706
|
+
'GET',
|
|
707
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId,'versionId': versionId,'variationId': variationId },
|
|
708
|
+
{ },
|
|
709
|
+
{ },
|
|
710
|
+
{ },
|
|
711
|
+
null,
|
|
712
|
+
['PureCloud OAuth'],
|
|
713
|
+
['application/json'],
|
|
714
|
+
['application/json']
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Get variations for the given document version.
|
|
720
|
+
*
|
|
721
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
722
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
723
|
+
* @param {String} versionId Globally unique identifier for the document version.
|
|
724
|
+
* @param {Object} opts Optional parameters
|
|
725
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
726
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
727
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
728
|
+
*/
|
|
729
|
+
getKnowledgeKnowledgebaseDocumentVersionVariations(knowledgeBaseId, documentId, versionId, opts) {
|
|
730
|
+
opts = opts || {};
|
|
731
|
+
|
|
732
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
733
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
734
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocumentVersionVariations';
|
|
735
|
+
}
|
|
736
|
+
// verify the required parameter 'documentId' is set
|
|
737
|
+
if (documentId === undefined || documentId === null) {
|
|
738
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocumentVersionVariations';
|
|
739
|
+
}
|
|
740
|
+
// verify the required parameter 'versionId' is set
|
|
741
|
+
if (versionId === undefined || versionId === null) {
|
|
742
|
+
throw 'Missing the required parameter "versionId" when calling getKnowledgeKnowledgebaseDocumentVersionVariations';
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return this.apiClient.callApi(
|
|
746
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/versions/{versionId}/variations',
|
|
747
|
+
'GET',
|
|
748
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId,'versionId': versionId },
|
|
749
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'] },
|
|
750
|
+
{ },
|
|
751
|
+
{ },
|
|
752
|
+
null,
|
|
753
|
+
['PureCloud OAuth'],
|
|
754
|
+
['application/json'],
|
|
755
|
+
['application/json']
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Get document versions.
|
|
761
|
+
*
|
|
762
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
763
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
764
|
+
* @param {Object} opts Optional parameters
|
|
765
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
766
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
767
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
768
|
+
* @param {Array.<String>} opts.expand The specified entity attributes will be filled. Comma separated values expected.
|
|
769
|
+
*/
|
|
770
|
+
getKnowledgeKnowledgebaseDocumentVersions(knowledgeBaseId, documentId, opts) {
|
|
771
|
+
opts = opts || {};
|
|
772
|
+
|
|
773
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
774
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
775
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocumentVersions';
|
|
776
|
+
}
|
|
777
|
+
// verify the required parameter 'documentId' is set
|
|
778
|
+
if (documentId === undefined || documentId === null) {
|
|
779
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseDocumentVersions';
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
return this.apiClient.callApi(
|
|
783
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/versions',
|
|
784
|
+
'GET',
|
|
785
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
786
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
|
|
787
|
+
{ },
|
|
788
|
+
{ },
|
|
789
|
+
null,
|
|
790
|
+
['PureCloud OAuth'],
|
|
791
|
+
['application/json'],
|
|
792
|
+
['application/json']
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Get documents.
|
|
798
|
+
*
|
|
799
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
800
|
+
* @param {Object} opts Optional parameters
|
|
801
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
802
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
803
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
804
|
+
* @param {String} opts.interval Retrieves the documents modified in specified date and time range. If the after and before cursor parameters are within this interval, it would return valid data, otherwise it throws an error.The dates in the interval are represented in ISO-8601 format: YYYY-MM-DDThh:mm:ssZ/YYYY-MM-DDThh:mm:ssZ
|
|
805
|
+
* @param {Array.<String>} opts.categoryId If specified, retrieves documents associated with category ids, comma separated values expected.
|
|
806
|
+
* @param {Boolean} opts.includeSubcategories Works along with 'categoryId' query parameter. If specified, retrieves documents associated with category ids and its children categories.
|
|
807
|
+
* @param {Boolean} opts.includeDrafts If includeDrafts is true, Documents in the draft state are also returned in the response.
|
|
808
|
+
* @param {Array.<String>} opts.labelIds If specified, retrieves documents associated with label ids, comma separated values expected.
|
|
809
|
+
* @param {Array.<String>} opts.expand The specified entity attributes will be filled. Comma separated values expected.
|
|
810
|
+
*/
|
|
811
|
+
getKnowledgeKnowledgebaseDocuments(knowledgeBaseId, opts) {
|
|
812
|
+
opts = opts || {};
|
|
813
|
+
|
|
814
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
815
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
816
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseDocuments';
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
return this.apiClient.callApi(
|
|
820
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents',
|
|
821
|
+
'GET',
|
|
822
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
823
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'interval': opts['interval'],'categoryId': this.apiClient.buildCollectionParam(opts['categoryId'], 'multi'),'includeSubcategories': opts['includeSubcategories'],'includeDrafts': opts['includeDrafts'],'labelIds': this.apiClient.buildCollectionParam(opts['labelIds'], 'multi'),'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
|
|
824
|
+
{ },
|
|
825
|
+
{ },
|
|
826
|
+
null,
|
|
827
|
+
['PureCloud OAuth'],
|
|
828
|
+
['application/json'],
|
|
829
|
+
['application/json']
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Get export job report
|
|
835
|
+
*
|
|
836
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
837
|
+
* @param {String} exportJobId Export job ID
|
|
838
|
+
*/
|
|
839
|
+
getKnowledgeKnowledgebaseExportJob(knowledgeBaseId, exportJobId) {
|
|
840
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
841
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
842
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseExportJob';
|
|
843
|
+
}
|
|
844
|
+
// verify the required parameter 'exportJobId' is set
|
|
845
|
+
if (exportJobId === undefined || exportJobId === null) {
|
|
846
|
+
throw 'Missing the required parameter "exportJobId" when calling getKnowledgeKnowledgebaseExportJob';
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
return this.apiClient.callApi(
|
|
850
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/export/jobs/{exportJobId}',
|
|
851
|
+
'GET',
|
|
852
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'exportJobId': exportJobId },
|
|
853
|
+
{ },
|
|
854
|
+
{ },
|
|
855
|
+
{ },
|
|
856
|
+
null,
|
|
857
|
+
['PureCloud OAuth'],
|
|
858
|
+
['application/json'],
|
|
859
|
+
['application/json']
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/**
|
|
864
|
+
* Get import job report
|
|
865
|
+
*
|
|
866
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
867
|
+
* @param {String} importJobId Import job ID
|
|
868
|
+
*/
|
|
869
|
+
getKnowledgeKnowledgebaseImportJob(knowledgeBaseId, importJobId) {
|
|
870
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
871
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
872
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseImportJob';
|
|
873
|
+
}
|
|
874
|
+
// verify the required parameter 'importJobId' is set
|
|
875
|
+
if (importJobId === undefined || importJobId === null) {
|
|
876
|
+
throw 'Missing the required parameter "importJobId" when calling getKnowledgeKnowledgebaseImportJob';
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
return this.apiClient.callApi(
|
|
880
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/import/jobs/{importJobId}',
|
|
881
|
+
'GET',
|
|
882
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'importJobId': importJobId },
|
|
883
|
+
{ },
|
|
884
|
+
{ },
|
|
885
|
+
{ },
|
|
886
|
+
null,
|
|
887
|
+
['PureCloud OAuth'],
|
|
888
|
+
['application/json'],
|
|
889
|
+
['application/json']
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Get label
|
|
895
|
+
*
|
|
896
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
897
|
+
* @param {String} labelId Label ID
|
|
898
|
+
*/
|
|
899
|
+
getKnowledgeKnowledgebaseLabel(knowledgeBaseId, labelId) {
|
|
900
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
901
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
902
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLabel';
|
|
903
|
+
}
|
|
904
|
+
// verify the required parameter 'labelId' is set
|
|
905
|
+
if (labelId === undefined || labelId === null) {
|
|
906
|
+
throw 'Missing the required parameter "labelId" when calling getKnowledgeKnowledgebaseLabel';
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
return this.apiClient.callApi(
|
|
910
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels/{labelId}',
|
|
911
|
+
'GET',
|
|
912
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'labelId': labelId },
|
|
913
|
+
{ },
|
|
914
|
+
{ },
|
|
915
|
+
{ },
|
|
916
|
+
null,
|
|
917
|
+
['PureCloud OAuth'],
|
|
918
|
+
['application/json'],
|
|
919
|
+
['application/json']
|
|
920
|
+
);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Get labels
|
|
925
|
+
*
|
|
926
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
927
|
+
* @param {Object} opts Optional parameters
|
|
928
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
929
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
930
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
931
|
+
* @param {String} opts.name Filter to return the labels that contains the given phrase in the name.
|
|
932
|
+
* @param {Boolean} opts.includeDocumentCount If specified, retrieves the number of documents related to label.
|
|
933
|
+
*/
|
|
934
|
+
getKnowledgeKnowledgebaseLabels(knowledgeBaseId, opts) {
|
|
935
|
+
opts = opts || {};
|
|
936
|
+
|
|
937
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
938
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
939
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLabels';
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
return this.apiClient.callApi(
|
|
943
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels',
|
|
944
|
+
'GET',
|
|
945
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
946
|
+
{ 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'name': opts['name'],'includeDocumentCount': opts['includeDocumentCount'] },
|
|
947
|
+
{ },
|
|
948
|
+
{ },
|
|
949
|
+
null,
|
|
950
|
+
['PureCloud OAuth'],
|
|
951
|
+
['application/json'],
|
|
952
|
+
['application/json']
|
|
953
|
+
);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* Get categories
|
|
958
|
+
*
|
|
959
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
960
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
961
|
+
* @param {Object} opts Optional parameters
|
|
962
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
963
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
964
|
+
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
965
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
966
|
+
* @param {String} opts.name Filter to return the categories that starts with the given category name.
|
|
967
|
+
*/
|
|
968
|
+
getKnowledgeKnowledgebaseLanguageCategories(knowledgeBaseId, languageCode, opts) {
|
|
969
|
+
opts = opts || {};
|
|
970
|
+
|
|
971
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
972
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
973
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageCategories';
|
|
974
|
+
}
|
|
975
|
+
// verify the required parameter 'languageCode' is set
|
|
976
|
+
if (languageCode === undefined || languageCode === null) {
|
|
977
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageCategories';
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
return this.apiClient.callApi(
|
|
981
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/categories',
|
|
982
|
+
'GET',
|
|
983
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
984
|
+
{ 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'name': opts['name'] },
|
|
985
|
+
{ },
|
|
986
|
+
{ },
|
|
987
|
+
null,
|
|
988
|
+
['PureCloud OAuth'],
|
|
989
|
+
['application/json'],
|
|
990
|
+
['application/json']
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Get category
|
|
996
|
+
*
|
|
997
|
+
* @param {String} categoryId Category ID
|
|
998
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
999
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1000
|
+
*/
|
|
1001
|
+
getKnowledgeKnowledgebaseLanguageCategory(categoryId, knowledgeBaseId, languageCode) {
|
|
1002
|
+
// verify the required parameter 'categoryId' is set
|
|
1003
|
+
if (categoryId === undefined || categoryId === null) {
|
|
1004
|
+
throw 'Missing the required parameter "categoryId" when calling getKnowledgeKnowledgebaseLanguageCategory';
|
|
1005
|
+
}
|
|
1006
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1007
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1008
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageCategory';
|
|
1009
|
+
}
|
|
1010
|
+
// verify the required parameter 'languageCode' is set
|
|
1011
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1012
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageCategory';
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
return this.apiClient.callApi(
|
|
1016
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/categories/{categoryId}',
|
|
1017
|
+
'GET',
|
|
1018
|
+
{ 'categoryId': categoryId,'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1019
|
+
{ },
|
|
1020
|
+
{ },
|
|
1021
|
+
{ },
|
|
1022
|
+
null,
|
|
1023
|
+
['PureCloud OAuth'],
|
|
1024
|
+
['application/json'],
|
|
1025
|
+
['application/json']
|
|
1026
|
+
);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Get document
|
|
1031
|
+
*
|
|
1032
|
+
* @param {String} documentId Document ID
|
|
1033
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1034
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1035
|
+
*/
|
|
1036
|
+
getKnowledgeKnowledgebaseLanguageDocument(documentId, knowledgeBaseId, languageCode) {
|
|
1037
|
+
// verify the required parameter 'documentId' is set
|
|
1038
|
+
if (documentId === undefined || documentId === null) {
|
|
1039
|
+
throw 'Missing the required parameter "documentId" when calling getKnowledgeKnowledgebaseLanguageDocument';
|
|
1040
|
+
}
|
|
1041
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1042
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1043
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageDocument';
|
|
1044
|
+
}
|
|
1045
|
+
// verify the required parameter 'languageCode' is set
|
|
1046
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1047
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageDocument';
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
return this.apiClient.callApi(
|
|
1051
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/{documentId}',
|
|
1052
|
+
'GET',
|
|
1053
|
+
{ 'documentId': documentId,'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1054
|
+
{ },
|
|
1055
|
+
{ },
|
|
1056
|
+
{ },
|
|
1057
|
+
null,
|
|
1058
|
+
['PureCloud OAuth'],
|
|
1059
|
+
['application/json'],
|
|
1060
|
+
['application/json']
|
|
1061
|
+
);
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Get documents
|
|
1066
|
+
*
|
|
1067
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1068
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1069
|
+
* @param {Object} opts Optional parameters
|
|
1070
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
1071
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
1072
|
+
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
1073
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
1074
|
+
* @param {String} opts.categories Filter by categories ids, comma separated values expected.
|
|
1075
|
+
* @param {String} opts.title Filter by document title.
|
|
1076
|
+
* @param {Object} opts.sortBy Sort by.
|
|
1077
|
+
* @param {Object} opts.sortOrder Sort Order.
|
|
1078
|
+
* @param {Array.<String>} opts.documentIds Comma-separated list of document identifiers to fetch by.
|
|
1079
|
+
*/
|
|
1080
|
+
getKnowledgeKnowledgebaseLanguageDocuments(knowledgeBaseId, languageCode, opts) {
|
|
1081
|
+
opts = opts || {};
|
|
1082
|
+
|
|
1083
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1084
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1085
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageDocuments';
|
|
1086
|
+
}
|
|
1087
|
+
// verify the required parameter 'languageCode' is set
|
|
1088
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1089
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageDocuments';
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
return this.apiClient.callApi(
|
|
1093
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents',
|
|
1094
|
+
'GET',
|
|
1095
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1096
|
+
{ 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'categories': opts['categories'],'title': opts['title'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'documentIds': this.apiClient.buildCollectionParam(opts['documentIds'], 'multi') },
|
|
1097
|
+
{ },
|
|
1098
|
+
{ },
|
|
1099
|
+
null,
|
|
1100
|
+
['PureCloud OAuth'],
|
|
1101
|
+
['application/json'],
|
|
1102
|
+
['application/json']
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* Get import operation report
|
|
1108
|
+
*
|
|
1109
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1110
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1111
|
+
* @param {String} importId Import ID
|
|
1112
|
+
*/
|
|
1113
|
+
getKnowledgeKnowledgebaseLanguageDocumentsImport(knowledgeBaseId, languageCode, importId) {
|
|
1114
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1115
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1116
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1117
|
+
}
|
|
1118
|
+
// verify the required parameter 'languageCode' is set
|
|
1119
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1120
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1121
|
+
}
|
|
1122
|
+
// verify the required parameter 'importId' is set
|
|
1123
|
+
if (importId === undefined || importId === null) {
|
|
1124
|
+
throw 'Missing the required parameter "importId" when calling getKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
return this.apiClient.callApi(
|
|
1128
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/imports/{importId}',
|
|
1129
|
+
'GET',
|
|
1130
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode,'importId': importId },
|
|
1131
|
+
{ },
|
|
1132
|
+
{ },
|
|
1133
|
+
{ },
|
|
1134
|
+
null,
|
|
1135
|
+
['PureCloud OAuth'],
|
|
1136
|
+
['application/json'],
|
|
1137
|
+
['application/json']
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Get training detail
|
|
1143
|
+
*
|
|
1144
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1145
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1146
|
+
* @param {String} trainingId Training ID
|
|
1147
|
+
*/
|
|
1148
|
+
getKnowledgeKnowledgebaseLanguageTraining(knowledgeBaseId, languageCode, trainingId) {
|
|
1149
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1150
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1151
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageTraining';
|
|
1152
|
+
}
|
|
1153
|
+
// verify the required parameter 'languageCode' is set
|
|
1154
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1155
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageTraining';
|
|
1156
|
+
}
|
|
1157
|
+
// verify the required parameter 'trainingId' is set
|
|
1158
|
+
if (trainingId === undefined || trainingId === null) {
|
|
1159
|
+
throw 'Missing the required parameter "trainingId" when calling getKnowledgeKnowledgebaseLanguageTraining';
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
return this.apiClient.callApi(
|
|
1163
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/trainings/{trainingId}',
|
|
1164
|
+
'GET',
|
|
1165
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode,'trainingId': trainingId },
|
|
1166
|
+
{ },
|
|
1167
|
+
{ },
|
|
1168
|
+
{ },
|
|
1169
|
+
null,
|
|
1170
|
+
['PureCloud OAuth'],
|
|
1171
|
+
['application/json'],
|
|
1172
|
+
['application/json']
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Get all trainings information for a knowledgebase
|
|
1178
|
+
*
|
|
1179
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1180
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1181
|
+
* @param {Object} opts Optional parameters
|
|
1182
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
1183
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
1184
|
+
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
1185
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
1186
|
+
* @param {Object} opts.knowledgeDocumentsState Return the training with the specified state of the trained documents.
|
|
1187
|
+
*/
|
|
1188
|
+
getKnowledgeKnowledgebaseLanguageTrainings(knowledgeBaseId, languageCode, opts) {
|
|
1189
|
+
opts = opts || {};
|
|
1190
|
+
|
|
1191
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1192
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1193
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseLanguageTrainings';
|
|
1194
|
+
}
|
|
1195
|
+
// verify the required parameter 'languageCode' is set
|
|
1196
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1197
|
+
throw 'Missing the required parameter "languageCode" when calling getKnowledgeKnowledgebaseLanguageTrainings';
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
return this.apiClient.callApi(
|
|
1201
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/trainings',
|
|
1202
|
+
'GET',
|
|
1203
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1204
|
+
{ 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'knowledgeDocumentsState': opts['knowledgeDocumentsState'] },
|
|
1205
|
+
{ },
|
|
1206
|
+
{ },
|
|
1207
|
+
null,
|
|
1208
|
+
['PureCloud OAuth'],
|
|
1209
|
+
['application/json'],
|
|
1210
|
+
['application/json']
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Get knowledge base unanswered group for a particular groupId
|
|
1216
|
+
*
|
|
1217
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1218
|
+
* @param {String} groupId The ID of the group to be retrieved.
|
|
1219
|
+
* @param {Object} opts Optional parameters
|
|
1220
|
+
* @param {Object} opts.app The app value to be used for filtering phrases.
|
|
1221
|
+
*/
|
|
1222
|
+
getKnowledgeKnowledgebaseUnansweredGroup(knowledgeBaseId, groupId, opts) {
|
|
1223
|
+
opts = opts || {};
|
|
1224
|
+
|
|
1225
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1226
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1227
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseUnansweredGroup';
|
|
1228
|
+
}
|
|
1229
|
+
// verify the required parameter 'groupId' is set
|
|
1230
|
+
if (groupId === undefined || groupId === null) {
|
|
1231
|
+
throw 'Missing the required parameter "groupId" when calling getKnowledgeKnowledgebaseUnansweredGroup';
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
return this.apiClient.callApi(
|
|
1235
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups/{groupId}',
|
|
1236
|
+
'GET',
|
|
1237
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'groupId': groupId },
|
|
1238
|
+
{ 'app': opts['app'] },
|
|
1239
|
+
{ },
|
|
1240
|
+
{ },
|
|
1241
|
+
null,
|
|
1242
|
+
['PureCloud OAuth'],
|
|
1243
|
+
['application/json'],
|
|
1244
|
+
['application/json']
|
|
1245
|
+
);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* Get knowledge base unanswered phrase group for a particular phraseGroupId
|
|
1250
|
+
*
|
|
1251
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1252
|
+
* @param {String} groupId The ID of the group to be retrieved.
|
|
1253
|
+
* @param {String} phraseGroupId The ID of the phraseGroup to be retrieved.
|
|
1254
|
+
* @param {Object} opts Optional parameters
|
|
1255
|
+
* @param {Object} opts.app The app value to be used for filtering phrases.
|
|
1256
|
+
*/
|
|
1257
|
+
getKnowledgeKnowledgebaseUnansweredGroupPhrasegroup(knowledgeBaseId, groupId, phraseGroupId, opts) {
|
|
1258
|
+
opts = opts || {};
|
|
1259
|
+
|
|
1260
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1261
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1262
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1263
|
+
}
|
|
1264
|
+
// verify the required parameter 'groupId' is set
|
|
1265
|
+
if (groupId === undefined || groupId === null) {
|
|
1266
|
+
throw 'Missing the required parameter "groupId" when calling getKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1267
|
+
}
|
|
1268
|
+
// verify the required parameter 'phraseGroupId' is set
|
|
1269
|
+
if (phraseGroupId === undefined || phraseGroupId === null) {
|
|
1270
|
+
throw 'Missing the required parameter "phraseGroupId" when calling getKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
return this.apiClient.callApi(
|
|
1274
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups/{groupId}/phrasegroups/{phraseGroupId}',
|
|
1275
|
+
'GET',
|
|
1276
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'groupId': groupId,'phraseGroupId': phraseGroupId },
|
|
1277
|
+
{ 'app': opts['app'] },
|
|
1278
|
+
{ },
|
|
1279
|
+
{ },
|
|
1280
|
+
null,
|
|
1281
|
+
['PureCloud OAuth'],
|
|
1282
|
+
['application/json'],
|
|
1283
|
+
['application/json']
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Get knowledge base unanswered groups
|
|
1289
|
+
*
|
|
1290
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1291
|
+
* @param {Object} opts Optional parameters
|
|
1292
|
+
* @param {Object} opts.app The app value to be used for filtering phrases.
|
|
1293
|
+
*/
|
|
1294
|
+
getKnowledgeKnowledgebaseUnansweredGroups(knowledgeBaseId, opts) {
|
|
1295
|
+
opts = opts || {};
|
|
1296
|
+
|
|
1297
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1298
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1299
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling getKnowledgeKnowledgebaseUnansweredGroups';
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
return this.apiClient.callApi(
|
|
1303
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups',
|
|
1304
|
+
'GET',
|
|
1305
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
1306
|
+
{ 'app': opts['app'] },
|
|
1307
|
+
{ },
|
|
1308
|
+
{ },
|
|
1309
|
+
null,
|
|
1310
|
+
['PureCloud OAuth'],
|
|
1311
|
+
['application/json'],
|
|
1312
|
+
['application/json']
|
|
1313
|
+
);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Get knowledge bases
|
|
1318
|
+
*
|
|
1319
|
+
* @param {Object} opts Optional parameters
|
|
1320
|
+
* @param {String} opts.before The cursor that points to the start of the set of entities that has been returned.
|
|
1321
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
1322
|
+
* @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize
|
|
1323
|
+
* @param {String} opts.pageSize Number of entities to return. Maximum of 200.
|
|
1324
|
+
* @param {String} opts.name Filter by Name.
|
|
1325
|
+
* @param {Object} opts.coreLanguage Filter by core language.
|
|
1326
|
+
* @param {Boolean} opts.published Filter by published status.
|
|
1327
|
+
* @param {Object} opts.sortBy Sort by.
|
|
1328
|
+
* @param {Object} opts.sortOrder Sort Order.
|
|
1329
|
+
*/
|
|
1330
|
+
getKnowledgeKnowledgebases(opts) {
|
|
1331
|
+
opts = opts || {};
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
return this.apiClient.callApi(
|
|
1335
|
+
'/api/v2/knowledge/knowledgebases',
|
|
1336
|
+
'GET',
|
|
1337
|
+
{ },
|
|
1338
|
+
{ 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'name': opts['name'],'coreLanguage': opts['coreLanguage'],'published': opts['published'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'] },
|
|
1339
|
+
{ },
|
|
1340
|
+
{ },
|
|
1341
|
+
null,
|
|
1342
|
+
['PureCloud OAuth'],
|
|
1343
|
+
['application/json'],
|
|
1344
|
+
['application/json']
|
|
1345
|
+
);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Update search result.
|
|
1350
|
+
*
|
|
1351
|
+
* @param {String} sessionId Knowledge guest session ID.
|
|
1352
|
+
* @param {String} searchId Search Result ID
|
|
1353
|
+
* @param {Object} body
|
|
1354
|
+
*/
|
|
1355
|
+
patchKnowledgeGuestSessionDocumentsSearchSearchId(sessionId, searchId, body) {
|
|
1356
|
+
// verify the required parameter 'sessionId' is set
|
|
1357
|
+
if (sessionId === undefined || sessionId === null) {
|
|
1358
|
+
throw 'Missing the required parameter "sessionId" when calling patchKnowledgeGuestSessionDocumentsSearchSearchId';
|
|
1359
|
+
}
|
|
1360
|
+
// verify the required parameter 'searchId' is set
|
|
1361
|
+
if (searchId === undefined || searchId === null) {
|
|
1362
|
+
throw 'Missing the required parameter "searchId" when calling patchKnowledgeGuestSessionDocumentsSearchSearchId';
|
|
1363
|
+
}
|
|
1364
|
+
// verify the required parameter 'body' is set
|
|
1365
|
+
if (body === undefined || body === null) {
|
|
1366
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeGuestSessionDocumentsSearchSearchId';
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
return this.apiClient.callApi(
|
|
1370
|
+
'/api/v2/knowledge/guest/sessions/{sessionId}/documents/search/{searchId}',
|
|
1371
|
+
'PATCH',
|
|
1372
|
+
{ 'sessionId': sessionId,'searchId': searchId },
|
|
1373
|
+
{ },
|
|
1374
|
+
{ },
|
|
1375
|
+
{ },
|
|
1376
|
+
body,
|
|
1377
|
+
['PureCloud OAuth'],
|
|
1378
|
+
['application/json'],
|
|
1379
|
+
['application/json']
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
/**
|
|
1384
|
+
* Update knowledge base
|
|
1385
|
+
*
|
|
1386
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1387
|
+
* @param {Object} body
|
|
1388
|
+
*/
|
|
1389
|
+
patchKnowledgeKnowledgebase(knowledgeBaseId, body) {
|
|
1390
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1391
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1392
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebase';
|
|
1393
|
+
}
|
|
1394
|
+
// verify the required parameter 'body' is set
|
|
1395
|
+
if (body === undefined || body === null) {
|
|
1396
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebase';
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
return this.apiClient.callApi(
|
|
1400
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}',
|
|
1401
|
+
'PATCH',
|
|
1402
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
1403
|
+
{ },
|
|
1404
|
+
{ },
|
|
1405
|
+
{ },
|
|
1406
|
+
body,
|
|
1407
|
+
['PureCloud OAuth'],
|
|
1408
|
+
['application/json'],
|
|
1409
|
+
['application/json']
|
|
1410
|
+
);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* Update category
|
|
1415
|
+
*
|
|
1416
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1417
|
+
* @param {String} categoryId Category ID
|
|
1418
|
+
* @param {Object} body
|
|
1419
|
+
*/
|
|
1420
|
+
patchKnowledgeKnowledgebaseCategory(knowledgeBaseId, categoryId, body) {
|
|
1421
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1422
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1423
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseCategory';
|
|
1424
|
+
}
|
|
1425
|
+
// verify the required parameter 'categoryId' is set
|
|
1426
|
+
if (categoryId === undefined || categoryId === null) {
|
|
1427
|
+
throw 'Missing the required parameter "categoryId" when calling patchKnowledgeKnowledgebaseCategory';
|
|
1428
|
+
}
|
|
1429
|
+
// verify the required parameter 'body' is set
|
|
1430
|
+
if (body === undefined || body === null) {
|
|
1431
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseCategory';
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
return this.apiClient.callApi(
|
|
1435
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories/{categoryId}',
|
|
1436
|
+
'PATCH',
|
|
1437
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'categoryId': categoryId },
|
|
1438
|
+
{ },
|
|
1439
|
+
{ },
|
|
1440
|
+
{ },
|
|
1441
|
+
body,
|
|
1442
|
+
['PureCloud OAuth'],
|
|
1443
|
+
['application/json'],
|
|
1444
|
+
['application/json']
|
|
1445
|
+
);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Update document.
|
|
1450
|
+
*
|
|
1451
|
+
* @param {String} knowledgeBaseId Knowledge base ID.
|
|
1452
|
+
* @param {String} documentId Document ID.
|
|
1453
|
+
* @param {Object} body
|
|
1454
|
+
*/
|
|
1455
|
+
patchKnowledgeKnowledgebaseDocument(knowledgeBaseId, documentId, body) {
|
|
1456
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1457
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1458
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseDocument';
|
|
1459
|
+
}
|
|
1460
|
+
// verify the required parameter 'documentId' is set
|
|
1461
|
+
if (documentId === undefined || documentId === null) {
|
|
1462
|
+
throw 'Missing the required parameter "documentId" when calling patchKnowledgeKnowledgebaseDocument';
|
|
1463
|
+
}
|
|
1464
|
+
// verify the required parameter 'body' is set
|
|
1465
|
+
if (body === undefined || body === null) {
|
|
1466
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseDocument';
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
return this.apiClient.callApi(
|
|
1470
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}',
|
|
1471
|
+
'PATCH',
|
|
1472
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
1473
|
+
{ },
|
|
1474
|
+
{ },
|
|
1475
|
+
{ },
|
|
1476
|
+
body,
|
|
1477
|
+
['PureCloud OAuth'],
|
|
1478
|
+
['application/json'],
|
|
1479
|
+
['application/json']
|
|
1480
|
+
);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Update a variation for a document.
|
|
1485
|
+
*
|
|
1486
|
+
* @param {String} documentVariationId Globally unique identifier for a document variation.
|
|
1487
|
+
* @param {String} documentId Globally unique identifier for a document.
|
|
1488
|
+
* @param {String} knowledgeBaseId Globally unique identifier for a knowledge base.
|
|
1489
|
+
* @param {Object} body
|
|
1490
|
+
*/
|
|
1491
|
+
patchKnowledgeKnowledgebaseDocumentVariation(documentVariationId, documentId, knowledgeBaseId, body) {
|
|
1492
|
+
// verify the required parameter 'documentVariationId' is set
|
|
1493
|
+
if (documentVariationId === undefined || documentVariationId === null) {
|
|
1494
|
+
throw 'Missing the required parameter "documentVariationId" when calling patchKnowledgeKnowledgebaseDocumentVariation';
|
|
1495
|
+
}
|
|
1496
|
+
// verify the required parameter 'documentId' is set
|
|
1497
|
+
if (documentId === undefined || documentId === null) {
|
|
1498
|
+
throw 'Missing the required parameter "documentId" when calling patchKnowledgeKnowledgebaseDocumentVariation';
|
|
1499
|
+
}
|
|
1500
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1501
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1502
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseDocumentVariation';
|
|
1503
|
+
}
|
|
1504
|
+
// verify the required parameter 'body' is set
|
|
1505
|
+
if (body === undefined || body === null) {
|
|
1506
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseDocumentVariation';
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
return this.apiClient.callApi(
|
|
1510
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/variations/{documentVariationId}',
|
|
1511
|
+
'PATCH',
|
|
1512
|
+
{ 'documentVariationId': documentVariationId,'documentId': documentId,'knowledgeBaseId': knowledgeBaseId },
|
|
1513
|
+
{ },
|
|
1514
|
+
{ },
|
|
1515
|
+
{ },
|
|
1516
|
+
body,
|
|
1517
|
+
['PureCloud OAuth'],
|
|
1518
|
+
['application/json'],
|
|
1519
|
+
['application/json']
|
|
1520
|
+
);
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* Update search result.
|
|
1525
|
+
*
|
|
1526
|
+
* @param {String} knowledgeBaseId The ID of knowledge base containing the documents to query.
|
|
1527
|
+
* @param {String} searchId Search Result ID
|
|
1528
|
+
* @param {Object} opts Optional parameters
|
|
1529
|
+
* @param {Object} opts.body
|
|
1530
|
+
*/
|
|
1531
|
+
patchKnowledgeKnowledgebaseDocumentsSearchSearchId(knowledgeBaseId, searchId, opts) {
|
|
1532
|
+
opts = opts || {};
|
|
1533
|
+
|
|
1534
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1535
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1536
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseDocumentsSearchSearchId';
|
|
1537
|
+
}
|
|
1538
|
+
// verify the required parameter 'searchId' is set
|
|
1539
|
+
if (searchId === undefined || searchId === null) {
|
|
1540
|
+
throw 'Missing the required parameter "searchId" when calling patchKnowledgeKnowledgebaseDocumentsSearchSearchId';
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
return this.apiClient.callApi(
|
|
1544
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/search/{searchId}',
|
|
1545
|
+
'PATCH',
|
|
1546
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'searchId': searchId },
|
|
1547
|
+
{ },
|
|
1548
|
+
{ },
|
|
1549
|
+
{ },
|
|
1550
|
+
opts['body'],
|
|
1551
|
+
['PureCloud OAuth'],
|
|
1552
|
+
['application/json'],
|
|
1553
|
+
['application/json']
|
|
1554
|
+
);
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Start import job
|
|
1559
|
+
*
|
|
1560
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1561
|
+
* @param {String} importJobId Import job ID
|
|
1562
|
+
* @param {Object} body
|
|
1563
|
+
*/
|
|
1564
|
+
patchKnowledgeKnowledgebaseImportJob(knowledgeBaseId, importJobId, body) {
|
|
1565
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1566
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1567
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseImportJob';
|
|
1568
|
+
}
|
|
1569
|
+
// verify the required parameter 'importJobId' is set
|
|
1570
|
+
if (importJobId === undefined || importJobId === null) {
|
|
1571
|
+
throw 'Missing the required parameter "importJobId" when calling patchKnowledgeKnowledgebaseImportJob';
|
|
1572
|
+
}
|
|
1573
|
+
// verify the required parameter 'body' is set
|
|
1574
|
+
if (body === undefined || body === null) {
|
|
1575
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseImportJob';
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
return this.apiClient.callApi(
|
|
1579
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/import/jobs/{importJobId}',
|
|
1580
|
+
'PATCH',
|
|
1581
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'importJobId': importJobId },
|
|
1582
|
+
{ },
|
|
1583
|
+
{ },
|
|
1584
|
+
{ },
|
|
1585
|
+
body,
|
|
1586
|
+
['PureCloud OAuth'],
|
|
1587
|
+
['application/json'],
|
|
1588
|
+
['application/json']
|
|
1589
|
+
);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* Update label
|
|
1594
|
+
*
|
|
1595
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1596
|
+
* @param {String} labelId Label ID
|
|
1597
|
+
* @param {Object} body
|
|
1598
|
+
*/
|
|
1599
|
+
patchKnowledgeKnowledgebaseLabel(knowledgeBaseId, labelId, body) {
|
|
1600
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1601
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1602
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseLabel';
|
|
1603
|
+
}
|
|
1604
|
+
// verify the required parameter 'labelId' is set
|
|
1605
|
+
if (labelId === undefined || labelId === null) {
|
|
1606
|
+
throw 'Missing the required parameter "labelId" when calling patchKnowledgeKnowledgebaseLabel';
|
|
1607
|
+
}
|
|
1608
|
+
// verify the required parameter 'body' is set
|
|
1609
|
+
if (body === undefined || body === null) {
|
|
1610
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseLabel';
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
return this.apiClient.callApi(
|
|
1614
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels/{labelId}',
|
|
1615
|
+
'PATCH',
|
|
1616
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'labelId': labelId },
|
|
1617
|
+
{ },
|
|
1618
|
+
{ },
|
|
1619
|
+
{ },
|
|
1620
|
+
body,
|
|
1621
|
+
['PureCloud OAuth'],
|
|
1622
|
+
['application/json'],
|
|
1623
|
+
['application/json']
|
|
1624
|
+
);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
/**
|
|
1628
|
+
* Update category
|
|
1629
|
+
*
|
|
1630
|
+
* @param {String} categoryId Category ID
|
|
1631
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1632
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1633
|
+
* @param {Object} body
|
|
505
1634
|
*/
|
|
506
1635
|
patchKnowledgeKnowledgebaseLanguageCategory(categoryId, knowledgeBaseId, languageCode, body) {
|
|
507
1636
|
// verify the required parameter 'categoryId' is set
|
|
508
1637
|
if (categoryId === undefined || categoryId === null) {
|
|
509
1638
|
throw 'Missing the required parameter "categoryId" when calling patchKnowledgeKnowledgebaseLanguageCategory';
|
|
510
1639
|
}
|
|
511
|
-
// verify the required parameter 'knowledgeBaseId' is set
|
|
512
|
-
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
513
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseLanguageCategory';
|
|
1640
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1641
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1642
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseLanguageCategory';
|
|
1643
|
+
}
|
|
1644
|
+
// verify the required parameter 'languageCode' is set
|
|
1645
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1646
|
+
throw 'Missing the required parameter "languageCode" when calling patchKnowledgeKnowledgebaseLanguageCategory';
|
|
1647
|
+
}
|
|
1648
|
+
// verify the required parameter 'body' is set
|
|
1649
|
+
if (body === undefined || body === null) {
|
|
1650
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseLanguageCategory';
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
return this.apiClient.callApi(
|
|
1654
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/categories/{categoryId}',
|
|
1655
|
+
'PATCH',
|
|
1656
|
+
{ 'categoryId': categoryId,'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1657
|
+
{ },
|
|
1658
|
+
{ },
|
|
1659
|
+
{ },
|
|
1660
|
+
body,
|
|
1661
|
+
['PureCloud OAuth'],
|
|
1662
|
+
['application/json'],
|
|
1663
|
+
['application/json']
|
|
1664
|
+
);
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Update document
|
|
1669
|
+
*
|
|
1670
|
+
* @param {String} documentId Document ID
|
|
1671
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1672
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1673
|
+
* @param {Object} body
|
|
1674
|
+
*/
|
|
1675
|
+
patchKnowledgeKnowledgebaseLanguageDocument(documentId, knowledgeBaseId, languageCode, body) {
|
|
1676
|
+
// verify the required parameter 'documentId' is set
|
|
1677
|
+
if (documentId === undefined || documentId === null) {
|
|
1678
|
+
throw 'Missing the required parameter "documentId" when calling patchKnowledgeKnowledgebaseLanguageDocument';
|
|
1679
|
+
}
|
|
1680
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1681
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1682
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseLanguageDocument';
|
|
1683
|
+
}
|
|
1684
|
+
// verify the required parameter 'languageCode' is set
|
|
1685
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1686
|
+
throw 'Missing the required parameter "languageCode" when calling patchKnowledgeKnowledgebaseLanguageDocument';
|
|
1687
|
+
}
|
|
1688
|
+
// verify the required parameter 'body' is set
|
|
1689
|
+
if (body === undefined || body === null) {
|
|
1690
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseLanguageDocument';
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
return this.apiClient.callApi(
|
|
1694
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/{documentId}',
|
|
1695
|
+
'PATCH',
|
|
1696
|
+
{ 'documentId': documentId,'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1697
|
+
{ },
|
|
1698
|
+
{ },
|
|
1699
|
+
{ },
|
|
1700
|
+
body,
|
|
1701
|
+
['PureCloud OAuth'],
|
|
1702
|
+
['application/json'],
|
|
1703
|
+
['application/json']
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* Update documents collection
|
|
1709
|
+
*
|
|
1710
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1711
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1712
|
+
* @param {Array.<Object>} body
|
|
1713
|
+
*/
|
|
1714
|
+
patchKnowledgeKnowledgebaseLanguageDocuments(knowledgeBaseId, languageCode, body) {
|
|
1715
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1716
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1717
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseLanguageDocuments';
|
|
1718
|
+
}
|
|
1719
|
+
// verify the required parameter 'languageCode' is set
|
|
1720
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1721
|
+
throw 'Missing the required parameter "languageCode" when calling patchKnowledgeKnowledgebaseLanguageDocuments';
|
|
1722
|
+
}
|
|
1723
|
+
// verify the required parameter 'body' is set
|
|
1724
|
+
if (body === undefined || body === null) {
|
|
1725
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseLanguageDocuments';
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
return this.apiClient.callApi(
|
|
1729
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents',
|
|
1730
|
+
'PATCH',
|
|
1731
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode },
|
|
1732
|
+
{ },
|
|
1733
|
+
{ },
|
|
1734
|
+
{ },
|
|
1735
|
+
body,
|
|
1736
|
+
['PureCloud OAuth'],
|
|
1737
|
+
['application/json'],
|
|
1738
|
+
['application/json']
|
|
1739
|
+
);
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Start import operation
|
|
1744
|
+
*
|
|
1745
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1746
|
+
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
1747
|
+
* @param {String} importId Import ID
|
|
1748
|
+
* @param {Object} body
|
|
1749
|
+
*/
|
|
1750
|
+
patchKnowledgeKnowledgebaseLanguageDocumentsImport(knowledgeBaseId, languageCode, importId, body) {
|
|
1751
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1752
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1753
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1754
|
+
}
|
|
1755
|
+
// verify the required parameter 'languageCode' is set
|
|
1756
|
+
if (languageCode === undefined || languageCode === null) {
|
|
1757
|
+
throw 'Missing the required parameter "languageCode" when calling patchKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1758
|
+
}
|
|
1759
|
+
// verify the required parameter 'importId' is set
|
|
1760
|
+
if (importId === undefined || importId === null) {
|
|
1761
|
+
throw 'Missing the required parameter "importId" when calling patchKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1762
|
+
}
|
|
1763
|
+
// verify the required parameter 'body' is set
|
|
1764
|
+
if (body === undefined || body === null) {
|
|
1765
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseLanguageDocumentsImport';
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
return this.apiClient.callApi(
|
|
1769
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/imports/{importId}',
|
|
1770
|
+
'PATCH',
|
|
1771
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'languageCode': languageCode,'importId': importId },
|
|
1772
|
+
{ },
|
|
1773
|
+
{ },
|
|
1774
|
+
{ },
|
|
1775
|
+
body,
|
|
1776
|
+
['PureCloud OAuth'],
|
|
1777
|
+
['application/json'],
|
|
1778
|
+
['application/json']
|
|
1779
|
+
);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* Update a Knowledge base unanswered phrase group
|
|
1784
|
+
*
|
|
1785
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
1786
|
+
* @param {String} groupId The ID of the group to be updated.
|
|
1787
|
+
* @param {String} phraseGroupId The ID of the phraseGroup to be updated.
|
|
1788
|
+
* @param {Object} body Request body of the update unanswered group endpoint.
|
|
1789
|
+
*/
|
|
1790
|
+
patchKnowledgeKnowledgebaseUnansweredGroupPhrasegroup(knowledgeBaseId, groupId, phraseGroupId, body) {
|
|
1791
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1792
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1793
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling patchKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1794
|
+
}
|
|
1795
|
+
// verify the required parameter 'groupId' is set
|
|
1796
|
+
if (groupId === undefined || groupId === null) {
|
|
1797
|
+
throw 'Missing the required parameter "groupId" when calling patchKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1798
|
+
}
|
|
1799
|
+
// verify the required parameter 'phraseGroupId' is set
|
|
1800
|
+
if (phraseGroupId === undefined || phraseGroupId === null) {
|
|
1801
|
+
throw 'Missing the required parameter "phraseGroupId" when calling patchKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1802
|
+
}
|
|
1803
|
+
// verify the required parameter 'body' is set
|
|
1804
|
+
if (body === undefined || body === null) {
|
|
1805
|
+
throw 'Missing the required parameter "body" when calling patchKnowledgeKnowledgebaseUnansweredGroupPhrasegroup';
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
return this.apiClient.callApi(
|
|
1809
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups/{groupId}/phrasegroups/{phraseGroupId}',
|
|
1810
|
+
'PATCH',
|
|
1811
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'groupId': groupId,'phraseGroupId': phraseGroupId },
|
|
1812
|
+
{ },
|
|
1813
|
+
{ },
|
|
1814
|
+
{ },
|
|
1815
|
+
body,
|
|
1816
|
+
['PureCloud OAuth'],
|
|
1817
|
+
['application/json'],
|
|
1818
|
+
['application/json']
|
|
1819
|
+
);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* Creates a presigned URL for uploading a knowledge import file with a set of documents
|
|
1824
|
+
*
|
|
1825
|
+
* @param {Object} body query
|
|
1826
|
+
*/
|
|
1827
|
+
postKnowledgeDocumentuploads(body) {
|
|
1828
|
+
// verify the required parameter 'body' is set
|
|
1829
|
+
if (body === undefined || body === null) {
|
|
1830
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeDocumentuploads';
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
return this.apiClient.callApi(
|
|
1834
|
+
'/api/v2/knowledge/documentuploads',
|
|
1835
|
+
'POST',
|
|
1836
|
+
{ },
|
|
1837
|
+
{ },
|
|
1838
|
+
{ },
|
|
1839
|
+
{ },
|
|
1840
|
+
body,
|
|
1841
|
+
['PureCloud OAuth'],
|
|
1842
|
+
['application/json'],
|
|
1843
|
+
['application/json']
|
|
1844
|
+
);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
/**
|
|
1848
|
+
* Search the documents in a guest session.
|
|
1849
|
+
*
|
|
1850
|
+
* @param {String} sessionId Knowledge guest session ID.
|
|
1851
|
+
* @param {Object} opts Optional parameters
|
|
1852
|
+
* @param {Array.<String>} opts.expand Fields, if any, to expand for each document in the search result matching the query.
|
|
1853
|
+
* @param {Object} opts.body
|
|
1854
|
+
*/
|
|
1855
|
+
postKnowledgeGuestSessionDocumentsSearch(sessionId, opts) {
|
|
1856
|
+
opts = opts || {};
|
|
1857
|
+
|
|
1858
|
+
// verify the required parameter 'sessionId' is set
|
|
1859
|
+
if (sessionId === undefined || sessionId === null) {
|
|
1860
|
+
throw 'Missing the required parameter "sessionId" when calling postKnowledgeGuestSessionDocumentsSearch';
|
|
514
1861
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
1862
|
+
|
|
1863
|
+
return this.apiClient.callApi(
|
|
1864
|
+
'/api/v2/knowledge/guest/sessions/{sessionId}/documents/search',
|
|
1865
|
+
'POST',
|
|
1866
|
+
{ 'sessionId': sessionId },
|
|
1867
|
+
{ 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
|
|
1868
|
+
{ },
|
|
1869
|
+
{ },
|
|
1870
|
+
opts['body'],
|
|
1871
|
+
['PureCloud OAuth'],
|
|
1872
|
+
['application/json'],
|
|
1873
|
+
['application/json']
|
|
1874
|
+
);
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
/**
|
|
1878
|
+
* Query the knowledge documents to provide suggestions for auto completion.
|
|
1879
|
+
*
|
|
1880
|
+
* @param {String} sessionId Knowledge guest session ID.
|
|
1881
|
+
* @param {Object} opts Optional parameters
|
|
1882
|
+
* @param {Object} opts.body
|
|
1883
|
+
*/
|
|
1884
|
+
postKnowledgeGuestSessionDocumentsSearchSuggestions(sessionId, opts) {
|
|
1885
|
+
opts = opts || {};
|
|
1886
|
+
|
|
1887
|
+
// verify the required parameter 'sessionId' is set
|
|
1888
|
+
if (sessionId === undefined || sessionId === null) {
|
|
1889
|
+
throw 'Missing the required parameter "sessionId" when calling postKnowledgeGuestSessionDocumentsSearchSuggestions';
|
|
518
1890
|
}
|
|
1891
|
+
|
|
1892
|
+
return this.apiClient.callApi(
|
|
1893
|
+
'/api/v2/knowledge/guest/sessions/{sessionId}/documents/search/suggestions',
|
|
1894
|
+
'POST',
|
|
1895
|
+
{ 'sessionId': sessionId },
|
|
1896
|
+
{ },
|
|
1897
|
+
{ },
|
|
1898
|
+
{ },
|
|
1899
|
+
opts['body'],
|
|
1900
|
+
['PureCloud OAuth'],
|
|
1901
|
+
['application/json'],
|
|
1902
|
+
['application/json']
|
|
1903
|
+
);
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* Create guest session
|
|
1908
|
+
*
|
|
1909
|
+
* @param {Object} body
|
|
1910
|
+
*/
|
|
1911
|
+
postKnowledgeGuestSessions(body) {
|
|
519
1912
|
// verify the required parameter 'body' is set
|
|
520
1913
|
if (body === undefined || body === null) {
|
|
521
|
-
throw 'Missing the required parameter "body" when calling
|
|
1914
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeGuestSessions';
|
|
522
1915
|
}
|
|
523
1916
|
|
|
524
1917
|
return this.apiClient.callApi(
|
|
525
|
-
'/api/v2/knowledge/
|
|
526
|
-
'
|
|
527
|
-
{
|
|
1918
|
+
'/api/v2/knowledge/guest/sessions',
|
|
1919
|
+
'POST',
|
|
1920
|
+
{ },
|
|
528
1921
|
{ },
|
|
529
1922
|
{ },
|
|
530
1923
|
{ },
|
|
@@ -536,35 +1929,95 @@ class KnowledgeApi {
|
|
|
536
1929
|
}
|
|
537
1930
|
|
|
538
1931
|
/**
|
|
539
|
-
*
|
|
1932
|
+
* Create new category
|
|
540
1933
|
*
|
|
541
|
-
* @param {String} documentId Document ID
|
|
542
1934
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
543
|
-
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
544
1935
|
* @param {Object} body
|
|
545
1936
|
*/
|
|
546
|
-
|
|
1937
|
+
postKnowledgeKnowledgebaseCategories(knowledgeBaseId, body) {
|
|
1938
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1939
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1940
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseCategories';
|
|
1941
|
+
}
|
|
1942
|
+
// verify the required parameter 'body' is set
|
|
1943
|
+
if (body === undefined || body === null) {
|
|
1944
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseCategories';
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
return this.apiClient.callApi(
|
|
1948
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories',
|
|
1949
|
+
'POST',
|
|
1950
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
1951
|
+
{ },
|
|
1952
|
+
{ },
|
|
1953
|
+
{ },
|
|
1954
|
+
body,
|
|
1955
|
+
['PureCloud OAuth'],
|
|
1956
|
+
['application/json'],
|
|
1957
|
+
['application/json']
|
|
1958
|
+
);
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/**
|
|
1962
|
+
* Create a variation for a document.
|
|
1963
|
+
*
|
|
1964
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
1965
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
1966
|
+
* @param {Object} body
|
|
1967
|
+
*/
|
|
1968
|
+
postKnowledgeKnowledgebaseDocumentVariations(knowledgeBaseId, documentId, body) {
|
|
1969
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
1970
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
1971
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseDocumentVariations';
|
|
1972
|
+
}
|
|
547
1973
|
// verify the required parameter 'documentId' is set
|
|
548
1974
|
if (documentId === undefined || documentId === null) {
|
|
549
|
-
throw 'Missing the required parameter "documentId" when calling
|
|
1975
|
+
throw 'Missing the required parameter "documentId" when calling postKnowledgeKnowledgebaseDocumentVariations';
|
|
1976
|
+
}
|
|
1977
|
+
// verify the required parameter 'body' is set
|
|
1978
|
+
if (body === undefined || body === null) {
|
|
1979
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseDocumentVariations';
|
|
550
1980
|
}
|
|
1981
|
+
|
|
1982
|
+
return this.apiClient.callApi(
|
|
1983
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/variations',
|
|
1984
|
+
'POST',
|
|
1985
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
1986
|
+
{ },
|
|
1987
|
+
{ },
|
|
1988
|
+
{ },
|
|
1989
|
+
body,
|
|
1990
|
+
['PureCloud OAuth'],
|
|
1991
|
+
['application/json'],
|
|
1992
|
+
['application/json']
|
|
1993
|
+
);
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
/**
|
|
1997
|
+
* Creates or restores a document version.
|
|
1998
|
+
*
|
|
1999
|
+
* @param {String} knowledgeBaseId Globally unique identifier for the knowledge base.
|
|
2000
|
+
* @param {String} documentId Globally unique identifier for the document.
|
|
2001
|
+
* @param {Object} body
|
|
2002
|
+
*/
|
|
2003
|
+
postKnowledgeKnowledgebaseDocumentVersions(knowledgeBaseId, documentId, body) {
|
|
551
2004
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
552
2005
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
553
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
2006
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseDocumentVersions';
|
|
554
2007
|
}
|
|
555
|
-
// verify the required parameter '
|
|
556
|
-
if (
|
|
557
|
-
throw 'Missing the required parameter "
|
|
2008
|
+
// verify the required parameter 'documentId' is set
|
|
2009
|
+
if (documentId === undefined || documentId === null) {
|
|
2010
|
+
throw 'Missing the required parameter "documentId" when calling postKnowledgeKnowledgebaseDocumentVersions';
|
|
558
2011
|
}
|
|
559
2012
|
// verify the required parameter 'body' is set
|
|
560
2013
|
if (body === undefined || body === null) {
|
|
561
|
-
throw 'Missing the required parameter "body" when calling
|
|
2014
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseDocumentVersions';
|
|
562
2015
|
}
|
|
563
2016
|
|
|
564
2017
|
return this.apiClient.callApi(
|
|
565
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
566
|
-
'
|
|
567
|
-
{ '
|
|
2018
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId}/versions',
|
|
2019
|
+
'POST',
|
|
2020
|
+
{ 'knowledgeBaseId': knowledgeBaseId,'documentId': documentId },
|
|
568
2021
|
{ },
|
|
569
2022
|
{ },
|
|
570
2023
|
{ },
|
|
@@ -576,30 +2029,25 @@ class KnowledgeApi {
|
|
|
576
2029
|
}
|
|
577
2030
|
|
|
578
2031
|
/**
|
|
579
|
-
*
|
|
2032
|
+
* Create document.
|
|
580
2033
|
*
|
|
581
2034
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
582
|
-
* @param {Object}
|
|
583
|
-
* @param {Array.<Object>} body
|
|
2035
|
+
* @param {Object} body
|
|
584
2036
|
*/
|
|
585
|
-
|
|
2037
|
+
postKnowledgeKnowledgebaseDocuments(knowledgeBaseId, body) {
|
|
586
2038
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
587
2039
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
588
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
589
|
-
}
|
|
590
|
-
// verify the required parameter 'languageCode' is set
|
|
591
|
-
if (languageCode === undefined || languageCode === null) {
|
|
592
|
-
throw 'Missing the required parameter "languageCode" when calling patchKnowledgeKnowledgebaseLanguageDocuments';
|
|
2040
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseDocuments';
|
|
593
2041
|
}
|
|
594
2042
|
// verify the required parameter 'body' is set
|
|
595
2043
|
if (body === undefined || body === null) {
|
|
596
|
-
throw 'Missing the required parameter "body" when calling
|
|
2044
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseDocuments';
|
|
597
2045
|
}
|
|
598
2046
|
|
|
599
2047
|
return this.apiClient.callApi(
|
|
600
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
601
|
-
'
|
|
602
|
-
{ 'knowledgeBaseId': knowledgeBaseId
|
|
2048
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents',
|
|
2049
|
+
'POST',
|
|
2050
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
603
2051
|
{ },
|
|
604
2052
|
{ },
|
|
605
2053
|
{ },
|
|
@@ -611,35 +2059,114 @@ class KnowledgeApi {
|
|
|
611
2059
|
}
|
|
612
2060
|
|
|
613
2061
|
/**
|
|
614
|
-
*
|
|
2062
|
+
* Search the documents in a knowledge base.
|
|
2063
|
+
*
|
|
2064
|
+
* @param {String} knowledgeBaseId The ID of knowledge base containing the documents to query.
|
|
2065
|
+
* @param {Object} opts Optional parameters
|
|
2066
|
+
* @param {Array.<String>} opts.expand Fields, if any, to expand for each document in the search result matching the query.
|
|
2067
|
+
* @param {Object} opts.body
|
|
2068
|
+
*/
|
|
2069
|
+
postKnowledgeKnowledgebaseDocumentsSearch(knowledgeBaseId, opts) {
|
|
2070
|
+
opts = opts || {};
|
|
2071
|
+
|
|
2072
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
2073
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
2074
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseDocumentsSearch';
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
return this.apiClient.callApi(
|
|
2078
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/search',
|
|
2079
|
+
'POST',
|
|
2080
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
2081
|
+
{ 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') },
|
|
2082
|
+
{ },
|
|
2083
|
+
{ },
|
|
2084
|
+
opts['body'],
|
|
2085
|
+
['PureCloud OAuth'],
|
|
2086
|
+
['application/json'],
|
|
2087
|
+
['application/json']
|
|
2088
|
+
);
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
/**
|
|
2092
|
+
* Query the knowledge documents to provide suggestions for auto completion.
|
|
2093
|
+
*
|
|
2094
|
+
* @param {String} knowledgeBaseId The ID of knowledge base containing the documents to query.
|
|
2095
|
+
* @param {Object} opts Optional parameters
|
|
2096
|
+
* @param {Object} opts.body
|
|
2097
|
+
*/
|
|
2098
|
+
postKnowledgeKnowledgebaseDocumentsSearchSuggestions(knowledgeBaseId, opts) {
|
|
2099
|
+
opts = opts || {};
|
|
2100
|
+
|
|
2101
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
2102
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
2103
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseDocumentsSearchSuggestions';
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
return this.apiClient.callApi(
|
|
2107
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/search/suggestions',
|
|
2108
|
+
'POST',
|
|
2109
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
2110
|
+
{ },
|
|
2111
|
+
{ },
|
|
2112
|
+
{ },
|
|
2113
|
+
opts['body'],
|
|
2114
|
+
['PureCloud OAuth'],
|
|
2115
|
+
['application/json'],
|
|
2116
|
+
['application/json']
|
|
2117
|
+
);
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* Create export job
|
|
615
2122
|
*
|
|
616
2123
|
* @param {String} knowledgeBaseId Knowledge base ID
|
|
617
|
-
* @param {Object} languageCode Language code, format: iso2-LOCALE
|
|
618
|
-
* @param {String} importId Import ID
|
|
619
2124
|
* @param {Object} body
|
|
620
2125
|
*/
|
|
621
|
-
|
|
2126
|
+
postKnowledgeKnowledgebaseExportJobs(knowledgeBaseId, body) {
|
|
622
2127
|
// verify the required parameter 'knowledgeBaseId' is set
|
|
623
2128
|
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
624
|
-
throw 'Missing the required parameter "knowledgeBaseId" when calling
|
|
2129
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseExportJobs';
|
|
625
2130
|
}
|
|
626
|
-
// verify the required parameter '
|
|
627
|
-
if (
|
|
628
|
-
throw 'Missing the required parameter "
|
|
2131
|
+
// verify the required parameter 'body' is set
|
|
2132
|
+
if (body === undefined || body === null) {
|
|
2133
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseExportJobs';
|
|
629
2134
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
2135
|
+
|
|
2136
|
+
return this.apiClient.callApi(
|
|
2137
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/export/jobs',
|
|
2138
|
+
'POST',
|
|
2139
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
2140
|
+
{ },
|
|
2141
|
+
{ },
|
|
2142
|
+
{ },
|
|
2143
|
+
body,
|
|
2144
|
+
['PureCloud OAuth'],
|
|
2145
|
+
['application/json'],
|
|
2146
|
+
['application/json']
|
|
2147
|
+
);
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
/**
|
|
2151
|
+
* Create import job
|
|
2152
|
+
*
|
|
2153
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
2154
|
+
* @param {Object} body
|
|
2155
|
+
*/
|
|
2156
|
+
postKnowledgeKnowledgebaseImportJobs(knowledgeBaseId, body) {
|
|
2157
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
2158
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
2159
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseImportJobs';
|
|
633
2160
|
}
|
|
634
2161
|
// verify the required parameter 'body' is set
|
|
635
2162
|
if (body === undefined || body === null) {
|
|
636
|
-
throw 'Missing the required parameter "body" when calling
|
|
2163
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseImportJobs';
|
|
637
2164
|
}
|
|
638
2165
|
|
|
639
2166
|
return this.apiClient.callApi(
|
|
640
|
-
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/
|
|
641
|
-
'
|
|
642
|
-
{ 'knowledgeBaseId': knowledgeBaseId
|
|
2167
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/import/jobs',
|
|
2168
|
+
'POST',
|
|
2169
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
643
2170
|
{ },
|
|
644
2171
|
{ },
|
|
645
2172
|
{ },
|
|
@@ -651,20 +2178,25 @@ class KnowledgeApi {
|
|
|
651
2178
|
}
|
|
652
2179
|
|
|
653
2180
|
/**
|
|
654
|
-
*
|
|
2181
|
+
* Create new label
|
|
655
2182
|
*
|
|
656
|
-
* @param {
|
|
2183
|
+
* @param {String} knowledgeBaseId Knowledge base ID
|
|
2184
|
+
* @param {Object} body
|
|
657
2185
|
*/
|
|
658
|
-
|
|
2186
|
+
postKnowledgeKnowledgebaseLabels(knowledgeBaseId, body) {
|
|
2187
|
+
// verify the required parameter 'knowledgeBaseId' is set
|
|
2188
|
+
if (knowledgeBaseId === undefined || knowledgeBaseId === null) {
|
|
2189
|
+
throw 'Missing the required parameter "knowledgeBaseId" when calling postKnowledgeKnowledgebaseLabels';
|
|
2190
|
+
}
|
|
659
2191
|
// verify the required parameter 'body' is set
|
|
660
2192
|
if (body === undefined || body === null) {
|
|
661
|
-
throw 'Missing the required parameter "body" when calling
|
|
2193
|
+
throw 'Missing the required parameter "body" when calling postKnowledgeKnowledgebaseLabels';
|
|
662
2194
|
}
|
|
663
2195
|
|
|
664
2196
|
return this.apiClient.callApi(
|
|
665
|
-
'/api/v2/knowledge/
|
|
2197
|
+
'/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels',
|
|
666
2198
|
'POST',
|
|
667
|
-
{
|
|
2199
|
+
{ 'knowledgeBaseId': knowledgeBaseId },
|
|
668
2200
|
{ },
|
|
669
2201
|
{ },
|
|
670
2202
|
{ },
|