@wildix/wim-knowledge-base-client 0.0.59 → 0.0.61

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.
@@ -1,20 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchThresholdValue = exports.SearchStrategy = exports.SyncLogLevel = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DocumentStatus = exports.DataSourceType = exports.ScheduleConfiguration = exports.DataSourceConfig = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.UnauthorizedException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.SearchThresholdValue = exports.SearchStrategy = exports.SyncLogLevel = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DocumentStatus = exports.DataSourceType = exports.ScheduleConfiguration = exports.DataSourceConfig = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.ValidationException = exports.UnauthorizedException = exports.ForbiddenException = void 0;
4
4
  const KnowledgeBaseServiceException_1 = require("./KnowledgeBaseServiceException");
5
- class ValidationException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
6
- name = "ValidationException";
7
- $fault = "client";
8
- constructor(opts) {
9
- super({
10
- name: "ValidationException",
11
- $fault: "client",
12
- ...opts
13
- });
14
- Object.setPrototypeOf(this, ValidationException.prototype);
15
- }
16
- }
17
- exports.ValidationException = ValidationException;
18
5
  class ForbiddenException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
19
6
  name = "ForbiddenException";
20
7
  $fault = "client";
@@ -41,6 +28,19 @@ class UnauthorizedException extends KnowledgeBaseServiceException_1.KnowledgeBas
41
28
  }
42
29
  }
43
30
  exports.UnauthorizedException = UnauthorizedException;
31
+ class ValidationException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
32
+ name = "ValidationException";
33
+ $fault = "client";
34
+ constructor(opts) {
35
+ super({
36
+ name: "ValidationException",
37
+ $fault: "client",
38
+ ...opts
39
+ });
40
+ Object.setPrototypeOf(this, ValidationException.prototype);
41
+ }
42
+ }
43
+ exports.ValidationException = ValidationException;
44
44
  class DataSourceNotFoundException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
45
45
  name = "DataSourceNotFoundException";
46
46
  $fault = "client";
@@ -480,6 +480,7 @@ const se_ListSearchQueriesHistoryCommand = async (input, context) => {
480
480
  body = JSON.stringify((0, smithy_client_1.take)(input, {
481
481
  'filter': _ => (0, smithy_client_1._json)(_),
482
482
  'search': [],
483
+ 'withContent': [],
483
484
  }));
484
485
  b.m("POST")
485
486
  .h(headers)
@@ -795,6 +796,7 @@ const de_GetDataSourceSyncStatusCommand = async (output, context) => {
795
796
  });
796
797
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
797
798
  const doc = (0, smithy_client_1.take)(data, {
799
+ 'documentsStats': smithy_client_1._json,
798
800
  'lastSyncErrorMessage': smithy_client_1.expectString,
799
801
  'lastSyncMode': smithy_client_1.expectString,
800
802
  'lastSyncedAt': smithy_client_1.expectString,
@@ -1317,6 +1319,7 @@ const de_SearchHistoryRequest = (output, context) => {
1317
1319
  const de_SearchHistoryResultItem = (output, context) => {
1318
1320
  return (0, smithy_client_1.take)(output, {
1319
1321
  'chunkId': smithy_client_1.expectString,
1322
+ 'content': smithy_client_1.expectString,
1320
1323
  'dataSourceId': smithy_client_1.expectString,
1321
1324
  'dataSourceType': smithy_client_1.expectString,
1322
1325
  'documentHierarchy': smithy_client_1._json,
@@ -1,16 +1,4 @@
1
1
  import { KnowledgeBaseServiceException as __BaseException } from "./KnowledgeBaseServiceException";
2
- export class ValidationException extends __BaseException {
3
- name = "ValidationException";
4
- $fault = "client";
5
- constructor(opts) {
6
- super({
7
- name: "ValidationException",
8
- $fault: "client",
9
- ...opts
10
- });
11
- Object.setPrototypeOf(this, ValidationException.prototype);
12
- }
13
- }
14
2
  export class ForbiddenException extends __BaseException {
15
3
  name = "ForbiddenException";
16
4
  $fault = "client";
@@ -35,6 +23,18 @@ export class UnauthorizedException extends __BaseException {
35
23
  Object.setPrototypeOf(this, UnauthorizedException.prototype);
36
24
  }
37
25
  }
26
+ export class ValidationException extends __BaseException {
27
+ name = "ValidationException";
28
+ $fault = "client";
29
+ constructor(opts) {
30
+ super({
31
+ name: "ValidationException",
32
+ $fault: "client",
33
+ ...opts
34
+ });
35
+ Object.setPrototypeOf(this, ValidationException.prototype);
36
+ }
37
+ }
38
38
  export class DataSourceNotFoundException extends __BaseException {
39
39
  name = "DataSourceNotFoundException";
40
40
  $fault = "client";
@@ -451,6 +451,7 @@ export const se_ListSearchQueriesHistoryCommand = async (input, context) => {
451
451
  body = JSON.stringify(take(input, {
452
452
  'filter': _ => _json(_),
453
453
  'search': [],
454
+ 'withContent': [],
454
455
  }));
455
456
  b.m("POST")
456
457
  .h(headers)
@@ -747,6 +748,7 @@ export const de_GetDataSourceSyncStatusCommand = async (output, context) => {
747
748
  });
748
749
  const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
749
750
  const doc = take(data, {
751
+ 'documentsStats': _json,
750
752
  'lastSyncErrorMessage': __expectString,
751
753
  'lastSyncMode': __expectString,
752
754
  'lastSyncedAt': __expectString,
@@ -1249,6 +1251,7 @@ const de_SearchHistoryRequest = (output, context) => {
1249
1251
  const de_SearchHistoryResultItem = (output, context) => {
1250
1252
  return take(output, {
1251
1253
  'chunkId': __expectString,
1254
+ 'content': __expectString,
1252
1255
  'dataSourceId': __expectString,
1253
1256
  'dataSourceType': __expectString,
1254
1257
  'documentHierarchy': _json,
@@ -45,6 +45,9 @@ declare const GetDataSourceSyncStatusCommand_base: {
45
45
  * // lastSyncedAt: "STRING_VALUE",
46
46
  * // lastSyncMode: "full" || "incremental",
47
47
  * // lastSyncErrorMessage: "STRING_VALUE",
48
+ * // documentsStats: { // SyncStatusStats
49
+ * // "<keys>": Number("int"),
50
+ * // },
48
51
  * // };
49
52
  *
50
53
  * ```
@@ -47,6 +47,7 @@ declare const ListSearchQueriesHistoryCommand_base: {
47
47
  * searchUser: "STRING_VALUE",
48
48
  * },
49
49
  * search: "STRING_VALUE",
50
+ * withContent: true || false,
50
51
  * };
51
52
  * const command = new ListSearchQueriesHistoryCommand(input);
52
53
  * const response = await client.send(command);
@@ -112,6 +113,7 @@ declare const ListSearchQueriesHistoryCommand_base: {
112
113
  * // documentHierarchy: [ // StringList
113
114
  * // "STRING_VALUE",
114
115
  * // ],
116
+ * // content: "STRING_VALUE",
115
117
  * // },
116
118
  * // ],
117
119
  * // createdAt: "STRING_VALUE", // required
@@ -4,35 +4,35 @@ import { DocumentType as __DocumentType } from "@smithy/types";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare class ValidationException extends __BaseException {
8
- readonly name: "ValidationException";
7
+ export declare class ForbiddenException extends __BaseException {
8
+ readonly name: "ForbiddenException";
9
9
  readonly $fault: "client";
10
10
  /**
11
11
  * @internal
12
12
  */
13
- constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
13
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
14
14
  }
15
15
  /**
16
16
  * @public
17
17
  */
18
- export declare class ForbiddenException extends __BaseException {
19
- readonly name: "ForbiddenException";
18
+ export declare class UnauthorizedException extends __BaseException {
19
+ readonly name: "UnauthorizedException";
20
20
  readonly $fault: "client";
21
21
  /**
22
22
  * @internal
23
23
  */
24
- constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
24
+ constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
25
25
  }
26
26
  /**
27
27
  * @public
28
28
  */
29
- export declare class UnauthorizedException extends __BaseException {
30
- readonly name: "UnauthorizedException";
29
+ export declare class ValidationException extends __BaseException {
30
+ readonly name: "ValidationException";
31
31
  readonly $fault: "client";
32
32
  /**
33
33
  * @internal
34
34
  */
35
- constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
35
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
36
36
  }
37
37
  /**
38
38
  * @public
@@ -1103,6 +1103,7 @@ export interface GetDataSourceSyncStatusOutput {
1103
1103
  lastSyncedAt?: string | undefined;
1104
1104
  lastSyncMode?: SyncDataSourceMode | undefined;
1105
1105
  lastSyncErrorMessage?: string | undefined;
1106
+ documentsStats?: Partial<Record<DocumentStatus, number>> | undefined;
1106
1107
  }
1107
1108
  /**
1108
1109
  * @public
@@ -1486,6 +1487,11 @@ export interface ListSearchQueriesHistoryInput {
1486
1487
  * @public
1487
1488
  */
1488
1489
  search?: string | undefined;
1490
+ /**
1491
+ * Whether to include the content of the chunks in the history results.
1492
+ * @public
1493
+ */
1494
+ withContent?: boolean | undefined;
1489
1495
  }
1490
1496
  /**
1491
1497
  * @public
@@ -1558,6 +1564,7 @@ export interface SearchHistoryResultItem {
1558
1564
  * @public
1559
1565
  */
1560
1566
  documentHierarchy?: (string)[] | undefined;
1567
+ content?: string | undefined;
1561
1568
  }
1562
1569
  /**
1563
1570
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wim-knowledge-base-client",
3
3
  "description": "@wildix/wim-knowledge-base-client client",
4
- "version": "0.0.59",
4
+ "version": "0.0.61",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",