@wildix/wim-knowledge-base-client 0.0.27 → 0.0.28

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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchStrategy = exports.SyncLogLevel = exports.DownloadDocumentType = exports.DocumentStatus = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DataSourceType = exports.DataSourceConfig = exports.ProxyMethod = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.UnauthorizedException = exports.ForbiddenException = exports.ValidationException = void 0;
3
+ exports.SearchStrategy = exports.SyncLogLevel = exports.DownloadDocumentType = exports.DocumentStatus = exports.DataSourceType = exports.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DataSourceConfig = exports.ProxyMethod = exports.KnowledgeBaseNotFoundException = exports.DocumentNotFoundException = exports.DataSourceNotFoundException = exports.UnauthorizedException = exports.ForbiddenException = exports.ValidationException = void 0;
4
4
  const KnowledgeBaseServiceException_1 = require("./KnowledgeBaseServiceException");
5
5
  class ValidationException extends KnowledgeBaseServiceException_1.KnowledgeBaseServiceException {
6
6
  name = "ValidationException";
@@ -98,12 +98,6 @@ var DataSourceConfig;
98
98
  return visitor._(value.$unknown[0], value.$unknown[1]);
99
99
  };
100
100
  })(DataSourceConfig || (exports.DataSourceConfig = DataSourceConfig = {}));
101
- exports.DataSourceType = {
102
- CONFLUENCE: "confluence",
103
- FILES: "files",
104
- GDRIVE: "gdrive",
105
- PROXY: "proxy",
106
- };
107
101
  exports.SyncDataSourceMode = {
108
102
  FULL: "full",
109
103
  INCREMENTAL: "incremental",
@@ -115,6 +109,12 @@ exports.SyncDataSourceStatus = {
115
109
  RUNNING: "running",
116
110
  SUCCESS: "success",
117
111
  };
112
+ exports.DataSourceType = {
113
+ CONFLUENCE: "confluence",
114
+ FILES: "files",
115
+ GDRIVE: "gdrive",
116
+ PROXY: "proxy",
117
+ };
118
118
  exports.DocumentStatus = {
119
119
  COMPLETED: "completed",
120
120
  DRAFT: "draft",
@@ -50,12 +50,8 @@ const se_CreateDataSourceCommand = async (input, context) => {
50
50
  });
51
51
  let body;
52
52
  body = JSON.stringify((0, smithy_client_1.take)(input, {
53
- 'config': _ => se_DataSourceConfig(_, context),
54
53
  'description': [],
55
- 'enabled': [],
56
54
  'name': [],
57
- 'syncSchedule': [],
58
- 'type': [],
59
55
  }));
60
56
  b.m("POST")
61
57
  .h(headers)
@@ -324,6 +320,8 @@ const se_ListDocumentsCommand = async (input, context) => {
324
320
  b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
325
321
  const query = (0, smithy_client_1.map)({
326
322
  [_c]: [, input[_cI]],
323
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
324
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
327
325
  });
328
326
  let body;
329
327
  b.m("GET")
@@ -89,12 +89,6 @@ export var DataSourceConfig;
89
89
  return visitor._(value.$unknown[0], value.$unknown[1]);
90
90
  };
91
91
  })(DataSourceConfig || (DataSourceConfig = {}));
92
- export const DataSourceType = {
93
- CONFLUENCE: "confluence",
94
- FILES: "files",
95
- GDRIVE: "gdrive",
96
- PROXY: "proxy",
97
- };
98
92
  export const SyncDataSourceMode = {
99
93
  FULL: "full",
100
94
  INCREMENTAL: "incremental",
@@ -106,6 +100,12 @@ export const SyncDataSourceStatus = {
106
100
  RUNNING: "running",
107
101
  SUCCESS: "success",
108
102
  };
103
+ export const DataSourceType = {
104
+ CONFLUENCE: "confluence",
105
+ FILES: "files",
106
+ GDRIVE: "gdrive",
107
+ PROXY: "proxy",
108
+ };
109
109
  export const DocumentStatus = {
110
110
  COMPLETED: "completed",
111
111
  DRAFT: "draft",
@@ -44,12 +44,8 @@ export const se_CreateDataSourceCommand = async (input, context) => {
44
44
  });
45
45
  let body;
46
46
  body = JSON.stringify(take(input, {
47
- 'config': _ => se_DataSourceConfig(_, context),
48
47
  'description': [],
49
- 'enabled': [],
50
48
  'name': [],
51
- 'syncSchedule': [],
52
- 'type': [],
53
49
  }));
54
50
  b.m("POST")
55
51
  .h(headers)
@@ -303,6 +299,8 @@ export const se_ListDocumentsCommand = async (input, context) => {
303
299
  b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
304
300
  const query = map({
305
301
  [_c]: [, input[_cI]],
302
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
303
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
306
304
  });
307
305
  let body;
308
306
  b.m("GET")
@@ -37,56 +37,6 @@ declare const CreateDataSourceCommand_base: {
37
37
  * const input = { // CreateDataSourceInput
38
38
  * name: "STRING_VALUE", // required
39
39
  * description: "STRING_VALUE",
40
- * type: "files" || "confluence" || "gdrive" || "proxy", // required
41
- * config: { // DataSourceConfig Union: only one key present
42
- * confluence: { // ConfluenceConfig
43
- * baseUrl: "STRING_VALUE", // required
44
- * username: "STRING_VALUE", // required
45
- * apiKey: "STRING_VALUE", // required
46
- * spaceId: "STRING_VALUE", // required
47
- * pages: { // ConfluencePagesConfig
48
- * enabled: [ // StringList // required
49
- * "STRING_VALUE",
50
- * ],
51
- * disabled: [ // required
52
- * "STRING_VALUE",
53
- * ],
54
- * },
55
- * },
56
- * gdrive: { // GDriveConfig
57
- * nangoConnectionId: "STRING_VALUE", // required
58
- * folders: { // GDriveFoldersConfig
59
- * enabled: [ // GDriveFolderIds // required
60
- * "STRING_VALUE",
61
- * ],
62
- * disabled: [ // required
63
- * "STRING_VALUE",
64
- * ],
65
- * },
66
- * },
67
- * files: { // UserFilesConfig
68
- * allowedExtensions: [ // required
69
- * "STRING_VALUE",
70
- * ],
71
- * },
72
- * proxy: { // ProxyConfig
73
- * url: "STRING_VALUE", // required
74
- * method: "GET" || "POST",
75
- * token: "STRING_VALUE",
76
- * username: "STRING_VALUE",
77
- * password: "STRING_VALUE",
78
- * headers: [
79
- * "STRING_VALUE",
80
- * ],
81
- * body: "DOCUMENT_VALUE",
82
- * timeoutMs: Number("int"),
83
- * responseMapping: [
84
- * "STRING_VALUE",
85
- * ],
86
- * },
87
- * },
88
- * enabled: true || false, // required
89
- * syncSchedule: "STRING_VALUE",
90
40
  * companyId: "STRING_VALUE",
91
41
  * };
92
42
  * const command = new CreateDataSourceCommand(input);
@@ -37,6 +37,8 @@ declare const ListDocumentsCommand_base: {
37
37
  * const input = { // ListDocumentsInput
38
38
  * companyId: "STRING_VALUE",
39
39
  * dataSourceId: "STRING_VALUE", // required
40
+ * limit: Number("int"),
41
+ * offset: Number("int"),
40
42
  * };
41
43
  * const command = new ListDocumentsCommand(input);
42
44
  * const response = await client.send(command);
@@ -163,6 +163,26 @@ export interface ConfluenceConfig {
163
163
  spaceId: string;
164
164
  pages?: ConfluencePagesConfig | undefined;
165
165
  }
166
+ /**
167
+ * @public
168
+ */
169
+ export interface CreateDataSourceInput {
170
+ /**
171
+ * The name of the data source. Example: Product Confluence
172
+ * @public
173
+ */
174
+ name: string;
175
+ /**
176
+ * The description of the data source. Example: This data source contains information about the products and services we offer in Confluence.
177
+ * @public
178
+ */
179
+ description?: string | undefined;
180
+ /**
181
+ * The unique identifier of the tenant when a service token is used.
182
+ * @public
183
+ */
184
+ companyId?: string | undefined;
185
+ }
166
186
  /**
167
187
  * @public
168
188
  */
@@ -304,56 +324,6 @@ export declare namespace DataSourceConfig {
304
324
  }
305
325
  const visit: <T>(value: DataSourceConfig, visitor: Visitor<T>) => T;
306
326
  }
307
- /**
308
- * @public
309
- * @enum
310
- */
311
- export declare const DataSourceType: {
312
- readonly CONFLUENCE: "confluence";
313
- readonly FILES: "files";
314
- readonly GDRIVE: "gdrive";
315
- readonly PROXY: "proxy";
316
- };
317
- /**
318
- * @public
319
- */
320
- export type DataSourceType = typeof DataSourceType[keyof typeof DataSourceType];
321
- /**
322
- * @public
323
- */
324
- export interface CreateDataSourceInput {
325
- /**
326
- * The name of the data source. Example: Product Confluence
327
- * @public
328
- */
329
- name: string;
330
- /**
331
- * The description of the data source. Example: This data source contains information about the products and services we offer in Confluence.
332
- * @public
333
- */
334
- description?: string | undefined;
335
- /**
336
- * The type of the data source. Example: confluence
337
- * @public
338
- */
339
- type: DataSourceType;
340
- config: DataSourceConfig;
341
- /**
342
- * Whether the data source is enabled. Example: true
343
- * @public
344
- */
345
- enabled: boolean;
346
- /**
347
- * The sync schedule of the data source. Example: 0 *\/6 * * * (every 6 hours)
348
- * @public
349
- */
350
- syncSchedule?: string | undefined;
351
- /**
352
- * The unique identifier of the tenant when a service token is used.
353
- * @public
354
- */
355
- companyId?: string | undefined;
356
- }
357
327
  /**
358
328
  * @public
359
329
  * @enum
@@ -381,6 +351,20 @@ export declare const SyncDataSourceStatus: {
381
351
  * @public
382
352
  */
383
353
  export type SyncDataSourceStatus = typeof SyncDataSourceStatus[keyof typeof SyncDataSourceStatus];
354
+ /**
355
+ * @public
356
+ * @enum
357
+ */
358
+ export declare const DataSourceType: {
359
+ readonly CONFLUENCE: "confluence";
360
+ readonly FILES: "files";
361
+ readonly GDRIVE: "gdrive";
362
+ readonly PROXY: "proxy";
363
+ };
364
+ /**
365
+ * @public
366
+ */
367
+ export type DataSourceType = typeof DataSourceType[keyof typeof DataSourceType];
384
368
  /**
385
369
  * @public
386
370
  */
@@ -1184,6 +1168,16 @@ export interface ListDocumentsInput {
1184
1168
  * @public
1185
1169
  */
1186
1170
  dataSourceId: string;
1171
+ /**
1172
+ * The number of documents to return. Example: 50
1173
+ * @public
1174
+ */
1175
+ limit?: number | undefined;
1176
+ /**
1177
+ * The offset of the documents to return. Example: 0
1178
+ * @public
1179
+ */
1180
+ offset?: number | undefined;
1187
1181
  }
1188
1182
  /**
1189
1183
  * @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.27",
4
+ "version": "0.0.28",
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",