@aceplus/smartace-api 2.3.1 → 2.3.3

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.
@@ -0,0 +1,121 @@
1
+ // package: Auth
2
+ // file: auth.account_two_factor.proto
3
+
4
+ import * as auth_account_two_factor_pb from "./auth.account_two_factor_pb";
5
+ import * as auth_authn_pb from "./auth.authn_pb";
6
+ import {grpc} from "@improbable-eng/grpc-web";
7
+
8
+ type AccountTwoFactorGRPCSetupTwoFactor = {
9
+ readonly methodName: string;
10
+ readonly service: typeof AccountTwoFactorGRPC;
11
+ readonly requestStream: false;
12
+ readonly responseStream: false;
13
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.SetupRequest;
14
+ readonly responseType: typeof auth_account_two_factor_pb.TwoFactorProto.SetupReply;
15
+ };
16
+
17
+ type AccountTwoFactorGRPCConfirmTwoFactor = {
18
+ readonly methodName: string;
19
+ readonly service: typeof AccountTwoFactorGRPC;
20
+ readonly requestStream: false;
21
+ readonly responseStream: false;
22
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.ConfirmRequest;
23
+ readonly responseType: typeof auth_account_two_factor_pb.TwoFactorProto.ConfirmReply;
24
+ };
25
+
26
+ type AccountTwoFactorGRPCRemove = {
27
+ readonly methodName: string;
28
+ readonly service: typeof AccountTwoFactorGRPC;
29
+ readonly requestStream: false;
30
+ readonly responseStream: false;
31
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.RemoveRequest;
32
+ readonly responseType: typeof auth_account_two_factor_pb.TwoFactorProto;
33
+ };
34
+
35
+ type AccountTwoFactorGRPCValidate = {
36
+ readonly methodName: string;
37
+ readonly service: typeof AccountTwoFactorGRPC;
38
+ readonly requestStream: false;
39
+ readonly responseStream: false;
40
+ readonly requestType: typeof auth_account_two_factor_pb.TwoFactorProto.ValidateRequest;
41
+ readonly responseType: typeof auth_authn_pb.AuthnProto;
42
+ };
43
+
44
+ export class AccountTwoFactorGRPC {
45
+ static readonly serviceName: string;
46
+ static readonly SetupTwoFactor: AccountTwoFactorGRPCSetupTwoFactor;
47
+ static readonly ConfirmTwoFactor: AccountTwoFactorGRPCConfirmTwoFactor;
48
+ static readonly Remove: AccountTwoFactorGRPCRemove;
49
+ static readonly Validate: AccountTwoFactorGRPCValidate;
50
+ }
51
+
52
+ export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
53
+ export type Status = { details: string, code: number; metadata: grpc.Metadata }
54
+
55
+ interface UnaryResponse {
56
+ cancel(): void;
57
+ }
58
+ interface ResponseStream<T> {
59
+ cancel(): void;
60
+ on(type: 'data', handler: (message: T) => void): ResponseStream<T>;
61
+ on(type: 'end', handler: (status?: Status) => void): ResponseStream<T>;
62
+ on(type: 'status', handler: (status: Status) => void): ResponseStream<T>;
63
+ }
64
+ interface RequestStream<T> {
65
+ write(message: T): RequestStream<T>;
66
+ end(): void;
67
+ cancel(): void;
68
+ on(type: 'end', handler: (status?: Status) => void): RequestStream<T>;
69
+ on(type: 'status', handler: (status: Status) => void): RequestStream<T>;
70
+ }
71
+ interface BidirectionalStream<ReqT, ResT> {
72
+ write(message: ReqT): BidirectionalStream<ReqT, ResT>;
73
+ end(): void;
74
+ cancel(): void;
75
+ on(type: 'data', handler: (message: ResT) => void): BidirectionalStream<ReqT, ResT>;
76
+ on(type: 'end', handler: (status?: Status) => void): BidirectionalStream<ReqT, ResT>;
77
+ on(type: 'status', handler: (status: Status) => void): BidirectionalStream<ReqT, ResT>;
78
+ }
79
+
80
+ export class AccountTwoFactorGRPCClient {
81
+ readonly serviceHost: string;
82
+
83
+ constructor(serviceHost: string, options?: grpc.RpcOptions);
84
+ setupTwoFactor(
85
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.SetupRequest,
86
+ metadata: grpc.Metadata,
87
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto.SetupReply|null) => void
88
+ ): UnaryResponse;
89
+ setupTwoFactor(
90
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.SetupRequest,
91
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto.SetupReply|null) => void
92
+ ): UnaryResponse;
93
+ confirmTwoFactor(
94
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.ConfirmRequest,
95
+ metadata: grpc.Metadata,
96
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto.ConfirmReply|null) => void
97
+ ): UnaryResponse;
98
+ confirmTwoFactor(
99
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.ConfirmRequest,
100
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto.ConfirmReply|null) => void
101
+ ): UnaryResponse;
102
+ remove(
103
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.RemoveRequest,
104
+ metadata: grpc.Metadata,
105
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto|null) => void
106
+ ): UnaryResponse;
107
+ remove(
108
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.RemoveRequest,
109
+ callback: (error: ServiceError|null, responseMessage: auth_account_two_factor_pb.TwoFactorProto|null) => void
110
+ ): UnaryResponse;
111
+ validate(
112
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.ValidateRequest,
113
+ metadata: grpc.Metadata,
114
+ callback: (error: ServiceError|null, responseMessage: auth_authn_pb.AuthnProto|null) => void
115
+ ): UnaryResponse;
116
+ validate(
117
+ requestMessage: auth_account_two_factor_pb.TwoFactorProto.ValidateRequest,
118
+ callback: (error: ServiceError|null, responseMessage: auth_authn_pb.AuthnProto|null) => void
119
+ ): UnaryResponse;
120
+ }
121
+
@@ -0,0 +1,182 @@
1
+ // package: Auth
2
+ // file: auth.account_two_factor.proto
3
+
4
+ var auth_account_two_factor_pb = require("./auth.account_two_factor_pb");
5
+ var auth_authn_pb = require("./auth.authn_pb");
6
+ var grpc = require("@improbable-eng/grpc-web").grpc;
7
+
8
+ var AccountTwoFactorGRPC = (function () {
9
+ function AccountTwoFactorGRPC() {}
10
+ AccountTwoFactorGRPC.serviceName = "Auth.AccountTwoFactorGRPC";
11
+ return AccountTwoFactorGRPC;
12
+ }());
13
+
14
+ AccountTwoFactorGRPC.SetupTwoFactor = {
15
+ methodName: "SetupTwoFactor",
16
+ service: AccountTwoFactorGRPC,
17
+ requestStream: false,
18
+ responseStream: false,
19
+ requestType: auth_account_two_factor_pb.TwoFactorProto.SetupRequest,
20
+ responseType: auth_account_two_factor_pb.TwoFactorProto.SetupReply
21
+ };
22
+
23
+ AccountTwoFactorGRPC.ConfirmTwoFactor = {
24
+ methodName: "ConfirmTwoFactor",
25
+ service: AccountTwoFactorGRPC,
26
+ requestStream: false,
27
+ responseStream: false,
28
+ requestType: auth_account_two_factor_pb.TwoFactorProto.ConfirmRequest,
29
+ responseType: auth_account_two_factor_pb.TwoFactorProto.ConfirmReply
30
+ };
31
+
32
+ AccountTwoFactorGRPC.Remove = {
33
+ methodName: "Remove",
34
+ service: AccountTwoFactorGRPC,
35
+ requestStream: false,
36
+ responseStream: false,
37
+ requestType: auth_account_two_factor_pb.TwoFactorProto.RemoveRequest,
38
+ responseType: auth_account_two_factor_pb.TwoFactorProto
39
+ };
40
+
41
+ AccountTwoFactorGRPC.Validate = {
42
+ methodName: "Validate",
43
+ service: AccountTwoFactorGRPC,
44
+ requestStream: false,
45
+ responseStream: false,
46
+ requestType: auth_account_two_factor_pb.TwoFactorProto.ValidateRequest,
47
+ responseType: auth_authn_pb.AuthnProto
48
+ };
49
+
50
+ exports.AccountTwoFactorGRPC = AccountTwoFactorGRPC;
51
+
52
+ function AccountTwoFactorGRPCClient(serviceHost, options) {
53
+ this.serviceHost = serviceHost;
54
+ this.options = options || {};
55
+ }
56
+
57
+ AccountTwoFactorGRPCClient.prototype.setupTwoFactor = function setupTwoFactor(requestMessage, metadata, callback) {
58
+ if (arguments.length === 2) {
59
+ callback = arguments[1];
60
+ }
61
+ var client = grpc.unary(AccountTwoFactorGRPC.SetupTwoFactor, {
62
+ request: requestMessage,
63
+ host: this.serviceHost,
64
+ metadata: metadata,
65
+ transport: this.options.transport,
66
+ debug: this.options.debug,
67
+ onEnd: function (response) {
68
+ if (callback) {
69
+ if (response.status !== grpc.Code.OK) {
70
+ var err = new Error(response.statusMessage);
71
+ err.code = response.status;
72
+ err.metadata = response.trailers;
73
+ callback(err, null);
74
+ } else {
75
+ callback(null, response.message);
76
+ }
77
+ }
78
+ }
79
+ });
80
+ return {
81
+ cancel: function () {
82
+ callback = null;
83
+ client.close();
84
+ }
85
+ };
86
+ };
87
+
88
+ AccountTwoFactorGRPCClient.prototype.confirmTwoFactor = function confirmTwoFactor(requestMessage, metadata, callback) {
89
+ if (arguments.length === 2) {
90
+ callback = arguments[1];
91
+ }
92
+ var client = grpc.unary(AccountTwoFactorGRPC.ConfirmTwoFactor, {
93
+ request: requestMessage,
94
+ host: this.serviceHost,
95
+ metadata: metadata,
96
+ transport: this.options.transport,
97
+ debug: this.options.debug,
98
+ onEnd: function (response) {
99
+ if (callback) {
100
+ if (response.status !== grpc.Code.OK) {
101
+ var err = new Error(response.statusMessage);
102
+ err.code = response.status;
103
+ err.metadata = response.trailers;
104
+ callback(err, null);
105
+ } else {
106
+ callback(null, response.message);
107
+ }
108
+ }
109
+ }
110
+ });
111
+ return {
112
+ cancel: function () {
113
+ callback = null;
114
+ client.close();
115
+ }
116
+ };
117
+ };
118
+
119
+ AccountTwoFactorGRPCClient.prototype.remove = function remove(requestMessage, metadata, callback) {
120
+ if (arguments.length === 2) {
121
+ callback = arguments[1];
122
+ }
123
+ var client = grpc.unary(AccountTwoFactorGRPC.Remove, {
124
+ request: requestMessage,
125
+ host: this.serviceHost,
126
+ metadata: metadata,
127
+ transport: this.options.transport,
128
+ debug: this.options.debug,
129
+ onEnd: function (response) {
130
+ if (callback) {
131
+ if (response.status !== grpc.Code.OK) {
132
+ var err = new Error(response.statusMessage);
133
+ err.code = response.status;
134
+ err.metadata = response.trailers;
135
+ callback(err, null);
136
+ } else {
137
+ callback(null, response.message);
138
+ }
139
+ }
140
+ }
141
+ });
142
+ return {
143
+ cancel: function () {
144
+ callback = null;
145
+ client.close();
146
+ }
147
+ };
148
+ };
149
+
150
+ AccountTwoFactorGRPCClient.prototype.validate = function validate(requestMessage, metadata, callback) {
151
+ if (arguments.length === 2) {
152
+ callback = arguments[1];
153
+ }
154
+ var client = grpc.unary(AccountTwoFactorGRPC.Validate, {
155
+ request: requestMessage,
156
+ host: this.serviceHost,
157
+ metadata: metadata,
158
+ transport: this.options.transport,
159
+ debug: this.options.debug,
160
+ onEnd: function (response) {
161
+ if (callback) {
162
+ if (response.status !== grpc.Code.OK) {
163
+ var err = new Error(response.statusMessage);
164
+ err.code = response.status;
165
+ err.metadata = response.trailers;
166
+ callback(err, null);
167
+ } else {
168
+ callback(null, response.message);
169
+ }
170
+ }
171
+ }
172
+ });
173
+ return {
174
+ cancel: function () {
175
+ callback = null;
176
+ client.close();
177
+ }
178
+ };
179
+ };
180
+
181
+ exports.AccountTwoFactorGRPCClient = AccountTwoFactorGRPCClient;
182
+
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "grpc-web": "^1.4.2",
6
6
  "ts-protoc-gen": "^0.15.0"
7
7
  },
8
- "version": "2.3.1",
8
+ "version": "2.3.3",
9
9
  "description": "Generated proto files.",
10
10
  "author": "TKF",
11
11
  "files": [