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

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.SyncDataSourceStatus = exports.SyncDataSourceMode = exports.DataSourceConfig = exports.ProxyMethod = exports.DataSourceType = 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";
@@ -80,6 +80,12 @@ class KnowledgeBaseNotFoundException extends KnowledgeBaseServiceException_1.Kno
80
80
  }
81
81
  }
82
82
  exports.KnowledgeBaseNotFoundException = KnowledgeBaseNotFoundException;
83
+ exports.DataSourceType = {
84
+ CONFLUENCE: "confluence",
85
+ FILES: "files",
86
+ GDRIVE: "gdrive",
87
+ PROXY: "proxy",
88
+ };
83
89
  exports.ProxyMethod = {
84
90
  GET: "GET",
85
91
  POST: "POST",
@@ -98,12 +104,6 @@ var DataSourceConfig;
98
104
  return visitor._(value.$unknown[0], value.$unknown[1]);
99
105
  };
100
106
  })(DataSourceConfig || (exports.DataSourceConfig = DataSourceConfig = {}));
101
- exports.DataSourceType = {
102
- CONFLUENCE: "confluence",
103
- FILES: "files",
104
- GDRIVE: "gdrive",
105
- PROXY: "proxy",
106
- };
107
107
  exports.SyncDataSourceMode = {
108
108
  FULL: "full",
109
109
  INCREMENTAL: "incremental",
@@ -50,11 +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
55
  'type': [],
59
56
  }));
60
57
  b.m("POST")
@@ -324,6 +321,8 @@ const se_ListDocumentsCommand = async (input, context) => {
324
321
  b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
325
322
  const query = (0, smithy_client_1.map)({
326
323
  [_c]: [, input[_cI]],
324
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
325
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
327
326
  });
328
327
  let body;
329
328
  b.m("GET")
@@ -71,6 +71,12 @@ export class KnowledgeBaseNotFoundException extends __BaseException {
71
71
  Object.setPrototypeOf(this, KnowledgeBaseNotFoundException.prototype);
72
72
  }
73
73
  }
74
+ export const DataSourceType = {
75
+ CONFLUENCE: "confluence",
76
+ FILES: "files",
77
+ GDRIVE: "gdrive",
78
+ PROXY: "proxy",
79
+ };
74
80
  export const ProxyMethod = {
75
81
  GET: "GET",
76
82
  POST: "POST",
@@ -89,12 +95,6 @@ export var DataSourceConfig;
89
95
  return visitor._(value.$unknown[0], value.$unknown[1]);
90
96
  };
91
97
  })(DataSourceConfig || (DataSourceConfig = {}));
92
- export const DataSourceType = {
93
- CONFLUENCE: "confluence",
94
- FILES: "files",
95
- GDRIVE: "gdrive",
96
- PROXY: "proxy",
97
- };
98
98
  export const SyncDataSourceMode = {
99
99
  FULL: "full",
100
100
  INCREMENTAL: "incremental",
@@ -44,11 +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
49
  'type': [],
53
50
  }));
54
51
  b.m("POST")
@@ -303,6 +300,8 @@ export const se_ListDocumentsCommand = async (input, context) => {
303
300
  b.p('dataSourceId', () => input.dataSourceId, '{dataSourceId}', false);
304
301
  const query = map({
305
302
  [_c]: [, input[_cI]],
303
+ [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
304
+ [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
306
305
  });
307
306
  let body;
308
307
  b.m("GET")
@@ -27,7 +27,7 @@ declare const CreateDataSourceCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Create a new data source
30
+ * Register a new data source with minimal configuration. All other parameters will be set in update operation.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -38,55 +38,6 @@ declare const CreateDataSourceCommand_base: {
38
38
  * name: "STRING_VALUE", // required
39
39
  * description: "STRING_VALUE",
40
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
41
  * companyId: "STRING_VALUE",
91
42
  * };
92
43
  * 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,45 @@ export interface ConfluenceConfig {
163
163
  spaceId: string;
164
164
  pages?: ConfluencePagesConfig | undefined;
165
165
  }
166
+ /**
167
+ * @public
168
+ * @enum
169
+ */
170
+ export declare const DataSourceType: {
171
+ readonly CONFLUENCE: "confluence";
172
+ readonly FILES: "files";
173
+ readonly GDRIVE: "gdrive";
174
+ readonly PROXY: "proxy";
175
+ };
176
+ /**
177
+ * @public
178
+ */
179
+ export type DataSourceType = typeof DataSourceType[keyof typeof DataSourceType];
180
+ /**
181
+ * @public
182
+ */
183
+ export interface CreateDataSourceInput {
184
+ /**
185
+ * The name of the data source. Example: Product Confluence
186
+ * @public
187
+ */
188
+ name: string;
189
+ /**
190
+ * The description of the data source. Example: This data source contains information about the products and services we offer in Confluence.
191
+ * @public
192
+ */
193
+ description?: string | undefined;
194
+ /**
195
+ * The type of the data source. Example: confluence
196
+ * @public
197
+ */
198
+ type: DataSourceType;
199
+ /**
200
+ * The unique identifier of the tenant when a service token is used.
201
+ * @public
202
+ */
203
+ companyId?: string | undefined;
204
+ }
166
205
  /**
167
206
  * @public
168
207
  */
@@ -304,56 +343,6 @@ export declare namespace DataSourceConfig {
304
343
  }
305
344
  const visit: <T>(value: DataSourceConfig, visitor: Visitor<T>) => T;
306
345
  }
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
346
  /**
358
347
  * @public
359
348
  * @enum
@@ -1184,6 +1173,16 @@ export interface ListDocumentsInput {
1184
1173
  * @public
1185
1174
  */
1186
1175
  dataSourceId: string;
1176
+ /**
1177
+ * The number of documents to return. Example: 50
1178
+ * @public
1179
+ */
1180
+ limit?: number | undefined;
1181
+ /**
1182
+ * The offset of the documents to return. Example: 0
1183
+ * @public
1184
+ */
1185
+ offset?: number | undefined;
1187
1186
  }
1188
1187
  /**
1189
1188
  * @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.29",
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",