@ondewo/nlu-client-typescript 3.4.0 → 4.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 CHANGED
@@ -1,20 +1,34 @@
1
- <p align="center">
2
- <a href="https://www.ondewo.com">
3
- <img alt="ONDEWO Logo" src="https://raw.githubusercontent.com/ondewo/ondewo-logos/master/github/ondewo_logo_github_2.png"/>
4
- </a>
1
+ <div align="center">
2
+ <table>
3
+ <tr>
4
+ <td>
5
+ <a href="https://ondewo.com/en/products/natural-language-understanding/">
6
+ <img width="400px" src="https://raw.githubusercontent.com/ondewo/ondewo-logos/master/ondewo_we_automate_your_phone_calls.png"/>
7
+ </a>
8
+ </td>
9
+ </tr>
10
+ <tr>
11
+ <td align="center">
12
+ <a href="https://www.linkedin.com/company/ondewo "><img width="40px" src="https://cdn-icons-png.flaticon.com/512/3536/3536505.png"></a>
13
+ <a href="https://www.facebook.com/ondewo"><img width="40px" src="https://cdn-icons-png.flaticon.com/512/733/733547.png"></a>
14
+ <a href="https://twitter.com/ondewo"><img width="40px" src="https://cdn-icons-png.flaticon.com/512/733/733579.png"> </a>
15
+ <a href="https://www.instagram.com/ondewo.ai/"><img width="40px" src="https://cdn-icons-png.flaticon.com/512/174/174855.png"></a>
16
+ <a href="https://badge.fury.io/js/%40ondewo%2Fnlu-client-typescript"><img src="https://badge.fury.io/js/%40ondewo%2Fnlu-client-typescript.svg" alt="npm version" height="32"></a>
17
+ </td>
18
+ </tr>
19
+ </table>
5
20
  <h1 align="center">
6
21
  ONDEWO NLU Client Typescript
7
22
  </h1>
8
- <p align="center">
9
- <a href="https://badge.fury.io/js/%40ondewo%2Fnlu-client-typescript"><img src="https://badge.fury.io/js/%40ondewo%2Fnlu-client-typescript.svg" alt="npm version" height="18"></a>
10
- </p>
11
- </p>
23
+ </div>
12
24
 
13
- # @ondewo/nlu-client-typescript
25
+ ## Overview
14
26
 
15
- `@ondewo/nlu-client-typescript` is a compiled version of the [ONDEWO NLU API](https://github.com/ondewo/ondewo-nlu-api). Here you can find the NLU API [documentation](https://ondewo.github.io/ondewo-nlu-api/).
27
+ `@ondewo/nlu-client-typescript` is a compiled version of the [ONDEWO NLU API](https://github.com/ondewo/ondewo-nlu-api) using the [ONDEWO PROTO COMPILER](https://github.com/ondewo/ondewo-proto-compiler). Here you can find the NLU API [documentation](https://ondewo.github.io).
16
28
 
17
- ## Installation
29
+ ONDEWO APIs use [Protocol Buffers](https://github.com/google/protobuf) version 3 (proto3) as their Interface Definition Language (IDL) to define the API interface and the structure of the payload messages. The same interface definition is used for gRPC versions of the API in all languages.
30
+
31
+ ## Setup
18
32
 
19
33
  Using NPM:
20
34
 
@@ -22,6 +36,59 @@ Using NPM:
22
36
  npm i --save @ondewo/nlu-client-typescript
23
37
  ```
24
38
 
25
- ## Documentation
39
+ Using GitHub:
40
+
41
+ ```shell
42
+ git clone https://github.com/ondewo/ondewo-nlu-client-typescript.git ## Clone repository
43
+ cd ondewo-nlu-client-typescript ## Change into repo-directoy
44
+ make setup_developer_environment_locally ## Install dependencies
45
+ ```
46
+
47
+ ## Package structure
48
+
49
+ ```
50
+ npm
51
+ ├── api
52
+ │ ├── google
53
+ │ │ ├── api
54
+ │ │ │ ├── annotations_pb.d.ts
55
+ │ │ │ └── annotations_pb.js
56
+ │ │ ├── protobuf
57
+ │ │ │ ├── any_pb.d.ts
58
+ │ │ │ ├── any_pb.js
59
+ │ │ │ ├── empty_pb.d.ts
60
+ │ │ │ ├── empty_pb.js
61
+ │ │ │ ├── field_mask_pb.d.ts
62
+ │ │ │ ├── field_mask_pb.js
63
+ │ │ │ ├── struct_pb.d.ts
64
+ │ │ │ ├── struct_pb.js
65
+ │ │ │ ├── timestamp_pb.d.ts
66
+ │ │ │ └── timestamp_pb.js
67
+ │ │ ├── rpc
68
+ │ │ │ ├── status_pb.d.ts
69
+ │ │ │ └── status_pb.js
70
+ │ │ └── type
71
+ │ │ ├── latlng_pb.d.ts
72
+ │ │ └── latlng_pb.js
73
+ │ └── ondewo
74
+ │ ├── nlu
75
+ │ │ ├── agent_grpc_web_pb.d.ts
76
+ │ │ ├── agent_grpc_web_pb.js
77
+ │ │ ├── agent_pb.d.ts
78
+ │ │ ├── agent_pb.js
79
+ │ │ ├── aiservices_grpc_web_pb.d.ts
80
+ │ │ ├── aiservices_grpc_web_pb.js
81
+ │ │ ├── aiservices_pb.d.ts
82
+ │ │ ├── aiservices_pb.js
83
+ │ │ ├── ...
84
+ │ └── qa
85
+ │ ├── qa_grpc_web_pb.d.ts
86
+ │ ├── qa_grpc_web_pb.js
87
+ │ ├── qa_pb.d.ts
88
+ │ └── qa_pb.js
89
+ ├── LICENSE
90
+ ├── package.json
91
+ ├── public-api.d.ts
92
+ └── README.md
93
+ ```
26
94
 
27
- Read the full documentation on [GitHub](https://github.com/ondewo/ondewo-nlu-client-typescript).
@@ -157,6 +157,13 @@ export class AgentsClient {
157
157
  response: ondewo_nlu_agent_pb.GetAgentStatisticsResponse) => void
158
158
  ): grpcWeb.ClientReadableStream<ondewo_nlu_agent_pb.GetAgentStatisticsResponse>;
159
159
 
160
+ getSessionsStatistics(
161
+ request: ondewo_nlu_agent_pb.GetSessionsStatisticsRequest,
162
+ metadata: grpcWeb.Metadata | undefined,
163
+ callback: (err: grpcWeb.RpcError,
164
+ response: ondewo_nlu_agent_pb.GetSessionsStatisticsResponse) => void
165
+ ): grpcWeb.ClientReadableStream<ondewo_nlu_agent_pb.GetSessionsStatisticsResponse>;
166
+
160
167
  setAgentStatus(
161
168
  request: ondewo_nlu_agent_pb.SetAgentStatusRequest,
162
169
  metadata: grpcWeb.Metadata | undefined,
@@ -395,6 +402,11 @@ export class AgentsPromiseClient {
395
402
  metadata?: grpcWeb.Metadata
396
403
  ): Promise<ondewo_nlu_agent_pb.GetAgentStatisticsResponse>;
397
404
 
405
+ getSessionsStatistics(
406
+ request: ondewo_nlu_agent_pb.GetSessionsStatisticsRequest,
407
+ metadata?: grpcWeb.Metadata
408
+ ): Promise<ondewo_nlu_agent_pb.GetSessionsStatisticsResponse>;
409
+
398
410
  setAgentStatus(
399
411
  request: ondewo_nlu_agent_pb.SetAgentStatusRequest,
400
412
  metadata?: grpcWeb.Metadata
@@ -24,8 +24,6 @@ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb
24
24
 
25
25
  var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js')
26
26
 
27
- var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js')
28
-
29
27
  var ondewo_nlu_common_pb = require('../../ondewo/nlu/common_pb.js')
30
28
 
31
29
  var ondewo_nlu_intent_pb = require('../../ondewo/nlu/intent_pb.js')
@@ -36,6 +34,8 @@ var ondewo_nlu_project_role_pb = require('../../ondewo/nlu/project_role_pb.js')
36
34
 
37
35
  var ondewo_nlu_operations_pb = require('../../ondewo/nlu/operations_pb.js')
38
36
 
37
+ var ondewo_nlu_session_pb = require('../../ondewo/nlu/session_pb.js')
38
+
39
39
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js')
40
40
  const proto = {};
41
41
  proto.ondewo = {};
@@ -1374,6 +1374,67 @@ proto.ondewo.nlu.AgentsPromiseClient.prototype.getAgentStatistics =
1374
1374
  };
1375
1375
 
1376
1376
 
1377
+ /**
1378
+ * @const
1379
+ * @type {!grpc.web.MethodDescriptor<
1380
+ * !proto.ondewo.nlu.GetSessionsStatisticsRequest,
1381
+ * !proto.ondewo.nlu.GetSessionsStatisticsResponse>}
1382
+ */
1383
+ const methodDescriptor_Agents_GetSessionsStatistics = new grpc.web.MethodDescriptor(
1384
+ '/ondewo.nlu.Agents/GetSessionsStatistics',
1385
+ grpc.web.MethodType.UNARY,
1386
+ proto.ondewo.nlu.GetSessionsStatisticsRequest,
1387
+ proto.ondewo.nlu.GetSessionsStatisticsResponse,
1388
+ /**
1389
+ * @param {!proto.ondewo.nlu.GetSessionsStatisticsRequest} request
1390
+ * @return {!Uint8Array}
1391
+ */
1392
+ function(request) {
1393
+ return request.serializeBinary();
1394
+ },
1395
+ proto.ondewo.nlu.GetSessionsStatisticsResponse.deserializeBinary
1396
+ );
1397
+
1398
+
1399
+ /**
1400
+ * @param {!proto.ondewo.nlu.GetSessionsStatisticsRequest} request The
1401
+ * request proto
1402
+ * @param {?Object<string, string>} metadata User defined
1403
+ * call metadata
1404
+ * @param {function(?grpc.web.RpcError, ?proto.ondewo.nlu.GetSessionsStatisticsResponse)}
1405
+ * callback The callback function(error, response)
1406
+ * @return {!grpc.web.ClientReadableStream<!proto.ondewo.nlu.GetSessionsStatisticsResponse>|undefined}
1407
+ * The XHR Node Readable Stream
1408
+ */
1409
+ proto.ondewo.nlu.AgentsClient.prototype.getSessionsStatistics =
1410
+ function(request, metadata, callback) {
1411
+ return this.client_.rpcCall(this.hostname_ +
1412
+ '/ondewo.nlu.Agents/GetSessionsStatistics',
1413
+ request,
1414
+ metadata || {},
1415
+ methodDescriptor_Agents_GetSessionsStatistics,
1416
+ callback);
1417
+ };
1418
+
1419
+
1420
+ /**
1421
+ * @param {!proto.ondewo.nlu.GetSessionsStatisticsRequest} request The
1422
+ * request proto
1423
+ * @param {?Object<string, string>=} metadata User defined
1424
+ * call metadata
1425
+ * @return {!Promise<!proto.ondewo.nlu.GetSessionsStatisticsResponse>}
1426
+ * Promise that resolves to the response
1427
+ */
1428
+ proto.ondewo.nlu.AgentsPromiseClient.prototype.getSessionsStatistics =
1429
+ function(request, metadata) {
1430
+ return this.client_.unaryCall(this.hostname_ +
1431
+ '/ondewo.nlu.Agents/GetSessionsStatistics',
1432
+ request,
1433
+ metadata || {},
1434
+ methodDescriptor_Agents_GetSessionsStatistics);
1435
+ };
1436
+
1437
+
1377
1438
  /**
1378
1439
  * @const
1379
1440
  * @type {!grpc.web.MethodDescriptor<
@@ -4,12 +4,12 @@ import * as google_api_annotations_pb from '../../google/api/annotations_pb';
4
4
  import * as google_protobuf_field_mask_pb from 'google-protobuf/google/protobuf/field_mask_pb';
5
5
  import * as google_protobuf_empty_pb from 'google-protobuf/google/protobuf/empty_pb';
6
6
  import * as google_protobuf_struct_pb from 'google-protobuf/google/protobuf/struct_pb';
7
- import * as google_protobuf_any_pb from 'google-protobuf/google/protobuf/any_pb';
8
7
  import * as ondewo_nlu_common_pb from '../../ondewo/nlu/common_pb';
9
8
  import * as ondewo_nlu_intent_pb from '../../ondewo/nlu/intent_pb';
10
9
  import * as ondewo_nlu_user_pb from '../../ondewo/nlu/user_pb';
11
10
  import * as ondewo_nlu_project_role_pb from '../../ondewo/nlu/project_role_pb';
12
11
  import * as ondewo_nlu_operations_pb from '../../ondewo/nlu/operations_pb';
12
+ import * as ondewo_nlu_session_pb from '../../ondewo/nlu/session_pb';
13
13
  import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb';
14
14
 
15
15
 
@@ -679,6 +679,98 @@ export namespace GetAgentStatisticsResponse {
679
679
  }
680
680
  }
681
681
 
682
+ export class GetSessionsStatisticsRequest extends jspb.Message {
683
+ getParent(): string;
684
+ setParent(value: string): GetSessionsStatisticsRequest;
685
+
686
+ getFormat(): ReportFormat;
687
+ setFormat(value: ReportFormat): GetSessionsStatisticsRequest;
688
+
689
+ getType(): SessionsReportType;
690
+ setType(value: SessionsReportType): GetSessionsStatisticsRequest;
691
+
692
+ getSessionFilter(): ondewo_nlu_session_pb.SessionFilter | undefined;
693
+ setSessionFilter(value?: ondewo_nlu_session_pb.SessionFilter): GetSessionsStatisticsRequest;
694
+ hasSessionFilter(): boolean;
695
+ clearSessionFilter(): GetSessionsStatisticsRequest;
696
+
697
+ getContextFiltersList(): Array<ondewo_nlu_session_pb.ContextFilter>;
698
+ setContextFiltersList(value: Array<ondewo_nlu_session_pb.ContextFilter>): GetSessionsStatisticsRequest;
699
+ clearContextFiltersList(): GetSessionsStatisticsRequest;
700
+ addContextFilters(value?: ondewo_nlu_session_pb.ContextFilter, index?: number): ondewo_nlu_session_pb.ContextFilter;
701
+
702
+ getLimit(): number;
703
+ setLimit(value: number): GetSessionsStatisticsRequest;
704
+
705
+ getGroupBysList(): Array<string>;
706
+ setGroupBysList(value: Array<string>): GetSessionsStatisticsRequest;
707
+ clearGroupBysList(): GetSessionsStatisticsRequest;
708
+ addGroupBys(value: string, index?: number): GetSessionsStatisticsRequest;
709
+
710
+ getOrderBysList(): Array<string>;
711
+ setOrderBysList(value: Array<string>): GetSessionsStatisticsRequest;
712
+ clearOrderBysList(): GetSessionsStatisticsRequest;
713
+ addOrderBys(value: string, index?: number): GetSessionsStatisticsRequest;
714
+
715
+ getFieldMask(): google_protobuf_field_mask_pb.FieldMask | undefined;
716
+ setFieldMask(value?: google_protobuf_field_mask_pb.FieldMask): GetSessionsStatisticsRequest;
717
+ hasFieldMask(): boolean;
718
+ clearFieldMask(): GetSessionsStatisticsRequest;
719
+
720
+ getSqlQuery(): string;
721
+ setSqlQuery(value: string): GetSessionsStatisticsRequest;
722
+
723
+ serializeBinary(): Uint8Array;
724
+ toObject(includeInstance?: boolean): GetSessionsStatisticsRequest.AsObject;
725
+ static toObject(includeInstance: boolean, msg: GetSessionsStatisticsRequest): GetSessionsStatisticsRequest.AsObject;
726
+ static serializeBinaryToWriter(message: GetSessionsStatisticsRequest, writer: jspb.BinaryWriter): void;
727
+ static deserializeBinary(bytes: Uint8Array): GetSessionsStatisticsRequest;
728
+ static deserializeBinaryFromReader(message: GetSessionsStatisticsRequest, reader: jspb.BinaryReader): GetSessionsStatisticsRequest;
729
+ }
730
+
731
+ export namespace GetSessionsStatisticsRequest {
732
+ export type AsObject = {
733
+ parent: string,
734
+ format: ReportFormat,
735
+ type: SessionsReportType,
736
+ sessionFilter?: ondewo_nlu_session_pb.SessionFilter.AsObject,
737
+ contextFiltersList: Array<ondewo_nlu_session_pb.ContextFilter.AsObject>,
738
+ limit: number,
739
+ groupBysList: Array<string>,
740
+ orderBysList: Array<string>,
741
+ fieldMask?: google_protobuf_field_mask_pb.FieldMask.AsObject,
742
+ sqlQuery: string,
743
+ }
744
+ }
745
+
746
+ export class GetSessionsStatisticsResponse extends jspb.Message {
747
+ getReports(): Uint8Array | string;
748
+ getReports_asU8(): Uint8Array;
749
+ getReports_asB64(): string;
750
+ setReports(value: Uint8Array | string): GetSessionsStatisticsResponse;
751
+
752
+ getFormat(): ReportFormat;
753
+ setFormat(value: ReportFormat): GetSessionsStatisticsResponse;
754
+
755
+ getType(): SessionsReportType;
756
+ setType(value: SessionsReportType): GetSessionsStatisticsResponse;
757
+
758
+ serializeBinary(): Uint8Array;
759
+ toObject(includeInstance?: boolean): GetSessionsStatisticsResponse.AsObject;
760
+ static toObject(includeInstance: boolean, msg: GetSessionsStatisticsResponse): GetSessionsStatisticsResponse.AsObject;
761
+ static serializeBinaryToWriter(message: GetSessionsStatisticsResponse, writer: jspb.BinaryWriter): void;
762
+ static deserializeBinary(bytes: Uint8Array): GetSessionsStatisticsResponse;
763
+ static deserializeBinaryFromReader(message: GetSessionsStatisticsResponse, reader: jspb.BinaryReader): GetSessionsStatisticsResponse;
764
+ }
765
+
766
+ export namespace GetSessionsStatisticsResponse {
767
+ export type AsObject = {
768
+ reports: Uint8Array | string,
769
+ format: ReportFormat,
770
+ type: SessionsReportType,
771
+ }
772
+ }
773
+
682
774
  export class AddUserToProjectRequest extends jspb.Message {
683
775
  getParent(): string;
684
776
  setParent(value: string): AddUserToProjectRequest;
@@ -2147,6 +2239,19 @@ export enum ReportType {
2147
2239
  ENTITY_COLLISION = 3,
2148
2240
  INTENT_GENERAL = 4,
2149
2241
  }
2242
+ export enum SessionsReportType {
2243
+ SESSIONS = 0,
2244
+ SESSION_STEPS = 1,
2245
+ SESSION_TOP_X_INTENTS = 2,
2246
+ SESSION_TOP_X_ENTITY_TYPES = 3,
2247
+ SESSION_TOP_X_ENTITY_VALUES = 4,
2248
+ SESSION_TOP_X_USERS = 5,
2249
+ SESSION_TOP_X_LABELS = 6,
2250
+ SESSION_TOP_X_TAGS = 7,
2251
+ SESSION_TOP_X_PHONE_NUMBERS = 8,
2252
+ SESSION_HUMAN_HANDOVERS = 9,
2253
+ SESSION_SQL_QUERY = 10,
2254
+ }
2150
2255
  export enum ReportFormat {
2151
2256
  CSV = 0,
2152
2257
  HTML = 1,