pyrus-api 3.3.3 → 3.4.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 +86 -2
- package/build/cjs/index.cjs +70 -0
- package/build/esm/index.js +69 -1
- package/build/types/index.d.ts +95 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -283,11 +283,95 @@ const announcementResponse = await client.announcements.addComment(
|
|
|
283
283
|
```
|
|
284
284
|
|
|
285
285
|
* Create an announcement
|
|
286
|
-
|
|
286
|
+
|
|
287
287
|
```typescript
|
|
288
288
|
const announcementResponse = await client.announcements.create(
|
|
289
289
|
{
|
|
290
290
|
text: "New announcement"
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
|
-
```
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Knowledge Base
|
|
296
|
+
|
|
297
|
+
* Get a knowledge base entity (article or topic)
|
|
298
|
+
|
|
299
|
+
```typescript
|
|
300
|
+
const response = await client.knowledgeBase.get("LMcleQRnRqB");
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
* Create an article
|
|
304
|
+
|
|
305
|
+
```typescript
|
|
306
|
+
import {KnowledgeBaseEntityType} from "pyrus-api";
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
const response = await client.knowledgeBase.create(
|
|
311
|
+
{
|
|
312
|
+
type: KnowledgeBaseEntityType.Article,
|
|
313
|
+
title: "My Article",
|
|
314
|
+
body: "Article content in MD format",
|
|
315
|
+
parent_topic_id: "KoSjtyL9EWm"
|
|
316
|
+
}
|
|
317
|
+
);
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
* Create a topic
|
|
321
|
+
|
|
322
|
+
```typescript
|
|
323
|
+
const response = await client.knowledgeBase.create(
|
|
324
|
+
{
|
|
325
|
+
type: KnowledgeBaseEntityType.Topic,
|
|
326
|
+
title: "My Topic"
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
* Update a knowledge base entity
|
|
332
|
+
|
|
333
|
+
```typescript
|
|
334
|
+
const response = await client.knowledgeBase.update(
|
|
335
|
+
"LMcleQRnRqB",
|
|
336
|
+
{
|
|
337
|
+
title: "Updated Title",
|
|
338
|
+
body: "Updated content in MD format"
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
* Delete a knowledge base entity
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
const response = await client.knowledgeBase.delete("LMcleQRnRqB", true);
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
* Get knowledge base structure
|
|
350
|
+
|
|
351
|
+
```typescript
|
|
352
|
+
const response = await client.knowledgeBase.getStructure(
|
|
353
|
+
{
|
|
354
|
+
parent_topic_id: "KoSjtyL9EWm",
|
|
355
|
+
depth: 2
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
* Get knowledge base entity permissions
|
|
361
|
+
|
|
362
|
+
```typescript
|
|
363
|
+
const response = await client.knowledgeBase.getPermissions("KoSjtyL9EWm");
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
* Update knowledge base entity permissions
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
const response = await client.knowledgeBase.updatePermissions(
|
|
370
|
+
"KoSjtyL9EWm",
|
|
371
|
+
{
|
|
372
|
+
inherit: false,
|
|
373
|
+
readers: [1732, 4368],
|
|
374
|
+
editors: [2434]
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
```
|
package/build/cjs/index.cjs
CHANGED
|
@@ -45,6 +45,8 @@ const allDateAndTimeResponseKeys = [
|
|
|
45
45
|
"scheduled_date",
|
|
46
46
|
"scheduled_datetime_utc",
|
|
47
47
|
"close_date",
|
|
48
|
+
"created_at",
|
|
49
|
+
"updated_at",
|
|
48
50
|
];
|
|
49
51
|
const dateRequestKeys = ["due_date", "scheduled_date"];
|
|
50
52
|
const dateTimeRequestKeys = [
|
|
@@ -60,6 +62,8 @@ const dateTimeRequestKeys = [
|
|
|
60
62
|
"scheduled_datetime_utc",
|
|
61
63
|
"start_time",
|
|
62
64
|
"end_time",
|
|
65
|
+
"created_at",
|
|
66
|
+
"updated_at",
|
|
63
67
|
];
|
|
64
68
|
|
|
65
69
|
exports.OperatorId = void 0;
|
|
@@ -193,6 +197,17 @@ class ApiError extends Error {
|
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
|
|
200
|
+
const KnowledgeBaseEntityType = {
|
|
201
|
+
Article: "article",
|
|
202
|
+
Topic: "topic",
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const KnowledgeBasePermissionLevel = {
|
|
206
|
+
None: "none",
|
|
207
|
+
Read: "read",
|
|
208
|
+
Write: "write",
|
|
209
|
+
};
|
|
210
|
+
|
|
196
211
|
const FilterMask = {
|
|
197
212
|
Due: 0x1,
|
|
198
213
|
DueDate: 0x2,
|
|
@@ -561,6 +576,9 @@ var Endpoints;
|
|
|
561
576
|
Endpoints["Call"] = "/call";
|
|
562
577
|
Endpoints["AttachCallRecord"] = "/attachcallrecord";
|
|
563
578
|
Endpoints["Bots"] = "/bots";
|
|
579
|
+
Endpoints["KnowledgeBase"] = "/knowledgebase";
|
|
580
|
+
Endpoints["Structure"] = "/structure";
|
|
581
|
+
Endpoints["Permissions"] = "/permissions";
|
|
564
582
|
})(Endpoints || (Endpoints = {}));
|
|
565
583
|
|
|
566
584
|
class RoleApi extends BaseApi {
|
|
@@ -947,6 +965,51 @@ class BotApi extends BaseApi {
|
|
|
947
965
|
}
|
|
948
966
|
}
|
|
949
967
|
|
|
968
|
+
class KnowledgeBaseApi extends BaseApi {
|
|
969
|
+
constructor() {
|
|
970
|
+
super(...arguments);
|
|
971
|
+
this._moduleSubPath = Endpoints.KnowledgeBase;
|
|
972
|
+
}
|
|
973
|
+
get(id) {
|
|
974
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
975
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
create(request) {
|
|
979
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
980
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
update(id, request) {
|
|
984
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
985
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "PUT", JSON.stringify(request));
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
delete(id_1) {
|
|
989
|
+
return __awaiter(this, arguments, void 0, function* (id, deleteWithChildren = false) {
|
|
990
|
+
return yield this.fetchApi((yield this.getModulePath()) +
|
|
991
|
+
`/${id}?delete_with_children=${deleteWithChildren}`, "DELETE");
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
getStructure(request) {
|
|
995
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
996
|
+
const basePath = (yield this.getModulePath()) + Endpoints.Structure;
|
|
997
|
+
const url = request ? basePath + toSearchParams(request) : basePath;
|
|
998
|
+
return yield this.fetchApi(url, "GET");
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
getPermissions(id) {
|
|
1002
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1003
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.Permissions, "GET");
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
updatePermissions(id, request) {
|
|
1007
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1008
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.Permissions, "PUT", JSON.stringify(request));
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
950
1013
|
class PyrusApiClient extends BaseApi {
|
|
951
1014
|
constructor(auth, settings) {
|
|
952
1015
|
const currentSettings = !!settings
|
|
@@ -1054,6 +1117,11 @@ class PyrusApiClient extends BaseApi {
|
|
|
1054
1117
|
this._bot = new BotApi(this.initParams);
|
|
1055
1118
|
return this._bot;
|
|
1056
1119
|
}
|
|
1120
|
+
get knowledgeBase() {
|
|
1121
|
+
if (!this._knowledgeBase)
|
|
1122
|
+
this._knowledgeBase = new KnowledgeBaseApi(this.initParams);
|
|
1123
|
+
return this._knowledgeBase;
|
|
1124
|
+
}
|
|
1057
1125
|
}
|
|
1058
1126
|
|
|
1059
1127
|
exports.ActivityAction = ActivityAction;
|
|
@@ -1064,6 +1132,8 @@ exports.ErrorCodeType = ErrorCodeType;
|
|
|
1064
1132
|
exports.FilterMask = FilterMask;
|
|
1065
1133
|
exports.Flag = Flag;
|
|
1066
1134
|
exports.FormFieldType = FormFieldType;
|
|
1135
|
+
exports.KnowledgeBaseEntityType = KnowledgeBaseEntityType;
|
|
1136
|
+
exports.KnowledgeBasePermissionLevel = KnowledgeBasePermissionLevel;
|
|
1067
1137
|
exports.ListType = ListType;
|
|
1068
1138
|
exports.PermissionLevel = PermissionLevel;
|
|
1069
1139
|
exports.PersonType = PersonType;
|
package/build/esm/index.js
CHANGED
|
@@ -43,6 +43,8 @@ const allDateAndTimeResponseKeys = [
|
|
|
43
43
|
"scheduled_date",
|
|
44
44
|
"scheduled_datetime_utc",
|
|
45
45
|
"close_date",
|
|
46
|
+
"created_at",
|
|
47
|
+
"updated_at",
|
|
46
48
|
];
|
|
47
49
|
const dateRequestKeys = ["due_date", "scheduled_date"];
|
|
48
50
|
const dateTimeRequestKeys = [
|
|
@@ -58,6 +60,8 @@ const dateTimeRequestKeys = [
|
|
|
58
60
|
"scheduled_datetime_utc",
|
|
59
61
|
"start_time",
|
|
60
62
|
"end_time",
|
|
63
|
+
"created_at",
|
|
64
|
+
"updated_at",
|
|
61
65
|
];
|
|
62
66
|
|
|
63
67
|
var OperatorId;
|
|
@@ -191,6 +195,17 @@ class ApiError extends Error {
|
|
|
191
195
|
}
|
|
192
196
|
}
|
|
193
197
|
|
|
198
|
+
const KnowledgeBaseEntityType = {
|
|
199
|
+
Article: "article",
|
|
200
|
+
Topic: "topic",
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const KnowledgeBasePermissionLevel = {
|
|
204
|
+
None: "none",
|
|
205
|
+
Read: "read",
|
|
206
|
+
Write: "write",
|
|
207
|
+
};
|
|
208
|
+
|
|
194
209
|
const FilterMask = {
|
|
195
210
|
Due: 0x1,
|
|
196
211
|
DueDate: 0x2,
|
|
@@ -559,6 +574,9 @@ var Endpoints;
|
|
|
559
574
|
Endpoints["Call"] = "/call";
|
|
560
575
|
Endpoints["AttachCallRecord"] = "/attachcallrecord";
|
|
561
576
|
Endpoints["Bots"] = "/bots";
|
|
577
|
+
Endpoints["KnowledgeBase"] = "/knowledgebase";
|
|
578
|
+
Endpoints["Structure"] = "/structure";
|
|
579
|
+
Endpoints["Permissions"] = "/permissions";
|
|
562
580
|
})(Endpoints || (Endpoints = {}));
|
|
563
581
|
|
|
564
582
|
class RoleApi extends BaseApi {
|
|
@@ -945,6 +963,51 @@ class BotApi extends BaseApi {
|
|
|
945
963
|
}
|
|
946
964
|
}
|
|
947
965
|
|
|
966
|
+
class KnowledgeBaseApi extends BaseApi {
|
|
967
|
+
constructor() {
|
|
968
|
+
super(...arguments);
|
|
969
|
+
this._moduleSubPath = Endpoints.KnowledgeBase;
|
|
970
|
+
}
|
|
971
|
+
get(id) {
|
|
972
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
973
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
create(request) {
|
|
977
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
978
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
update(id, request) {
|
|
982
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
983
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "PUT", JSON.stringify(request));
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
delete(id_1) {
|
|
987
|
+
return __awaiter(this, arguments, void 0, function* (id, deleteWithChildren = false) {
|
|
988
|
+
return yield this.fetchApi((yield this.getModulePath()) +
|
|
989
|
+
`/${id}?delete_with_children=${deleteWithChildren}`, "DELETE");
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
getStructure(request) {
|
|
993
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
994
|
+
const basePath = (yield this.getModulePath()) + Endpoints.Structure;
|
|
995
|
+
const url = request ? basePath + toSearchParams(request) : basePath;
|
|
996
|
+
return yield this.fetchApi(url, "GET");
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
getPermissions(id) {
|
|
1000
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1001
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.Permissions, "GET");
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
updatePermissions(id, request) {
|
|
1005
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1006
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.Permissions, "PUT", JSON.stringify(request));
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
|
|
948
1011
|
class PyrusApiClient extends BaseApi {
|
|
949
1012
|
constructor(auth, settings) {
|
|
950
1013
|
const currentSettings = !!settings
|
|
@@ -1052,6 +1115,11 @@ class PyrusApiClient extends BaseApi {
|
|
|
1052
1115
|
this._bot = new BotApi(this.initParams);
|
|
1053
1116
|
return this._bot;
|
|
1054
1117
|
}
|
|
1118
|
+
get knowledgeBase() {
|
|
1119
|
+
if (!this._knowledgeBase)
|
|
1120
|
+
this._knowledgeBase = new KnowledgeBaseApi(this.initParams);
|
|
1121
|
+
return this._knowledgeBase;
|
|
1122
|
+
}
|
|
1055
1123
|
}
|
|
1056
1124
|
|
|
1057
|
-
export { ActivityAction, ApiError, ApprovalChoice, CallEventType, ErrorCodeType, FilterMask, Flag, FormFieldType, ListType, OperatorId, PermissionLevel, PersonRights, PersonType, PyrusApiClient, SendSmsError, SendSmsStatus, SourceType, fromJson, prepareHeadersForCatalogApiRequest, toDateString, toDateTimeString, toJson, toTimeString };
|
|
1125
|
+
export { ActivityAction, ApiError, ApprovalChoice, CallEventType, ErrorCodeType, FilterMask, Flag, FormFieldType, KnowledgeBaseEntityType, KnowledgeBasePermissionLevel, ListType, OperatorId, PermissionLevel, PersonRights, PersonType, PyrusApiClient, SendSmsError, SendSmsStatus, SourceType, fromJson, prepareHeadersForCatalogApiRequest, toDateString, toDateTimeString, toJson, toTimeString };
|
package/build/types/index.d.ts
CHANGED
|
@@ -165,6 +165,17 @@ declare module "pyrus-api" {
|
|
|
165
165
|
error: ErrorResponse;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
+
export const KnowledgeBaseEntityType: {
|
|
169
|
+
readonly Article: "article";
|
|
170
|
+
readonly Topic: "topic";
|
|
171
|
+
};
|
|
172
|
+
export type KnowledgeBaseEntityType = typeof KnowledgeBaseEntityType[keyof typeof KnowledgeBaseEntityType];
|
|
173
|
+
export const KnowledgeBasePermissionLevel: {
|
|
174
|
+
readonly None: "none";
|
|
175
|
+
readonly Read: "read";
|
|
176
|
+
readonly Write: "write";
|
|
177
|
+
};
|
|
178
|
+
export type KnowledgeBasePermissionLevel = typeof KnowledgeBasePermissionLevel[keyof typeof KnowledgeBasePermissionLevel];
|
|
168
179
|
export const FilterMask: {
|
|
169
180
|
/**
|
|
170
181
|
* Events whose deadline is indicated in UTC+0
|
|
@@ -303,6 +314,74 @@ declare module "pyrus-api" {
|
|
|
303
314
|
readonly SendFailed: "send_failed";
|
|
304
315
|
};
|
|
305
316
|
export type SendSmsStatus = typeof SendSmsStatus[keyof typeof SendSmsStatus];
|
|
317
|
+
export type KnowledgeBasePersonInfo = {
|
|
318
|
+
id: number;
|
|
319
|
+
first_name: string;
|
|
320
|
+
last_name: string;
|
|
321
|
+
email: string;
|
|
322
|
+
type: string;
|
|
323
|
+
};
|
|
324
|
+
export type KnowledgeBaseStructureItem = {
|
|
325
|
+
id: string;
|
|
326
|
+
title: string;
|
|
327
|
+
type: KnowledgeBaseEntityType;
|
|
328
|
+
parent_topic_id: string;
|
|
329
|
+
created_at: Date;
|
|
330
|
+
updated_at: Date;
|
|
331
|
+
access_right: KnowledgeBasePermissionLevel;
|
|
332
|
+
is_open_for_organization: boolean;
|
|
333
|
+
children: KnowledgeBaseStructureItem[];
|
|
334
|
+
};
|
|
335
|
+
export type CreateKnowledgeBaseEntityRequest = {
|
|
336
|
+
type: KnowledgeBaseEntityType;
|
|
337
|
+
title: string;
|
|
338
|
+
body?: string;
|
|
339
|
+
parent_topic_id?: string;
|
|
340
|
+
};
|
|
341
|
+
export type UpdateKnowledgeBaseEntityRequest = {
|
|
342
|
+
title?: string;
|
|
343
|
+
body?: string;
|
|
344
|
+
parent_topic_id_changed?: boolean;
|
|
345
|
+
parent_topic_id?: string;
|
|
346
|
+
};
|
|
347
|
+
export type UpdateKnowledgeBasePermissionsRequest = {
|
|
348
|
+
inherit?: boolean;
|
|
349
|
+
readers?: number[];
|
|
350
|
+
editors?: number[];
|
|
351
|
+
};
|
|
352
|
+
export type GetKnowledgeBaseStructureRequest = {
|
|
353
|
+
parent_topic_id?: string;
|
|
354
|
+
depth?: number;
|
|
355
|
+
};
|
|
356
|
+
export type KnowledgeBaseEntityResponse = {
|
|
357
|
+
id: string;
|
|
358
|
+
title: string;
|
|
359
|
+
type: KnowledgeBaseEntityType;
|
|
360
|
+
body: string;
|
|
361
|
+
parent_topic_id: string;
|
|
362
|
+
author: KnowledgeBasePersonInfo;
|
|
363
|
+
created_at: Date;
|
|
364
|
+
updated_at: Date;
|
|
365
|
+
last_edited_by: KnowledgeBasePersonInfo;
|
|
366
|
+
version: number;
|
|
367
|
+
access_right: KnowledgeBasePermissionLevel;
|
|
368
|
+
is_open_for_organization: boolean;
|
|
369
|
+
is_public: boolean;
|
|
370
|
+
};
|
|
371
|
+
export type KnowledgeBaseDeleteResponse = {
|
|
372
|
+
deleted: boolean;
|
|
373
|
+
};
|
|
374
|
+
export type KnowledgeBaseStructureResponse = {
|
|
375
|
+
parent_topic_id?: string;
|
|
376
|
+
depth?: number;
|
|
377
|
+
items: KnowledgeBaseStructureItem[];
|
|
378
|
+
};
|
|
379
|
+
export type KnowledgeBasePermissionsResponse = {
|
|
380
|
+
global_permission: KnowledgeBasePermissionLevel;
|
|
381
|
+
inherit: boolean;
|
|
382
|
+
readers: KnowledgeBasePersonInfo[];
|
|
383
|
+
editors: KnowledgeBasePersonInfo[];
|
|
384
|
+
};
|
|
306
385
|
export type NewFile = {
|
|
307
386
|
guid?: string;
|
|
308
387
|
root_id?: number;
|
|
@@ -834,7 +913,10 @@ declare module "pyrus-api" {
|
|
|
834
913
|
Integrations = "/integrations",
|
|
835
914
|
Call = "/call",
|
|
836
915
|
AttachCallRecord = "/attachcallrecord",
|
|
837
|
-
Bots = "/bots"
|
|
916
|
+
Bots = "/bots",
|
|
917
|
+
KnowledgeBase = "/knowledgebase",
|
|
918
|
+
Structure = "/structure",
|
|
919
|
+
Permissions = "/permissions"
|
|
838
920
|
}
|
|
839
921
|
export type RolesResponse = {
|
|
840
922
|
roles: Role[];
|
|
@@ -1428,6 +1510,16 @@ declare module "pyrus-api" {
|
|
|
1428
1510
|
update(request: UpdateBotRequest): Promise<Bot>;
|
|
1429
1511
|
delete(request: DeleteBotRequest): Promise<Bot>;
|
|
1430
1512
|
}
|
|
1513
|
+
class KnowledgeBaseApi extends BaseApi {
|
|
1514
|
+
protected _moduleSubPath: Endpoints;
|
|
1515
|
+
get(id: string): Promise<KnowledgeBaseEntityResponse>;
|
|
1516
|
+
create(request: CreateKnowledgeBaseEntityRequest): Promise<KnowledgeBaseEntityResponse>;
|
|
1517
|
+
update(id: string, request: UpdateKnowledgeBaseEntityRequest): Promise<KnowledgeBaseEntityResponse>;
|
|
1518
|
+
delete(id: string, deleteWithChildren?: boolean): Promise<KnowledgeBaseDeleteResponse>;
|
|
1519
|
+
getStructure(request?: GetKnowledgeBaseStructureRequest): Promise<KnowledgeBaseStructureResponse>;
|
|
1520
|
+
getPermissions(id: string): Promise<KnowledgeBasePermissionsResponse>;
|
|
1521
|
+
updatePermissions(id: string, request: UpdateKnowledgeBasePermissionsRequest): Promise<KnowledgeBasePermissionsResponse>;
|
|
1522
|
+
}
|
|
1431
1523
|
export class PyrusApiClient extends BaseApi {
|
|
1432
1524
|
private _role;
|
|
1433
1525
|
private _profile;
|
|
@@ -1443,6 +1535,7 @@ declare module "pyrus-api" {
|
|
|
1443
1535
|
private _logs;
|
|
1444
1536
|
private _call;
|
|
1445
1537
|
private _bot;
|
|
1538
|
+
private _knowledgeBase;
|
|
1446
1539
|
/**
|
|
1447
1540
|
*
|
|
1448
1541
|
* @param auth
|
|
@@ -1468,6 +1561,7 @@ declare module "pyrus-api" {
|
|
|
1468
1561
|
get logs(): LogsApi;
|
|
1469
1562
|
get call(): CallApi;
|
|
1470
1563
|
get bot(): BotApi;
|
|
1564
|
+
get knowledgeBase(): KnowledgeBaseApi;
|
|
1471
1565
|
}
|
|
1472
1566
|
|
|
1473
1567
|
export {};
|