@aceplus/smartace-api 3.7.0-alpha.5 → 3.7.0-alpha.7

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.
@@ -27,12 +27,16 @@ var auth_authn_pb = require('./auth.authn_pb.js');
27
27
  goog.object.extend(proto, auth_authn_pb);
28
28
  var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
29
29
  goog.object.extend(proto, google_protobuf_timestamp_pb);
30
+ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
31
+ goog.object.extend(proto, google_protobuf_empty_pb);
30
32
  goog.exportSymbol('proto.Auth.PasskeyProto', null, global);
31
33
  goog.exportSymbol('proto.Auth.PasskeyProto.AssertionOptions', null, global);
32
34
  goog.exportSymbol('proto.Auth.PasskeyProto.CreateCredentialsRequest', null, global);
33
35
  goog.exportSymbol('proto.Auth.PasskeyProto.CredentialCreateOptions', null, global);
36
+ goog.exportSymbol('proto.Auth.PasskeyProto.DeleteCredentialRequest', null, global);
34
37
  goog.exportSymbol('proto.Auth.PasskeyProto.GetAssertionOptionsRequest', null, global);
35
38
  goog.exportSymbol('proto.Auth.PasskeyProto.GetCredentialsRequest', null, global);
39
+ goog.exportSymbol('proto.Auth.PasskeyProto.ListCredentialsReply', null, global);
36
40
  goog.exportSymbol('proto.Auth.PasskeyProto.MakeAssertionRequest', null, global);
37
41
  /**
38
42
  * Generated by JsPbCodeGenerator.
@@ -181,6 +185,48 @@ if (goog.DEBUG && !COMPILED) {
181
185
  */
182
186
  proto.Auth.PasskeyProto.MakeAssertionRequest.displayName = 'proto.Auth.PasskeyProto.MakeAssertionRequest';
183
187
  }
188
+ /**
189
+ * Generated by JsPbCodeGenerator.
190
+ * @param {Array=} opt_data Optional initial data array, typically from a
191
+ * server response, or constructed directly in Javascript. The array is used
192
+ * in place and becomes part of the constructed object. It is not cloned.
193
+ * If no data is provided, the constructed object will be empty, but still
194
+ * valid.
195
+ * @extends {jspb.Message}
196
+ * @constructor
197
+ */
198
+ proto.Auth.PasskeyProto.ListCredentialsReply = function(opt_data) {
199
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.Auth.PasskeyProto.ListCredentialsReply.repeatedFields_, null);
200
+ };
201
+ goog.inherits(proto.Auth.PasskeyProto.ListCredentialsReply, jspb.Message);
202
+ if (goog.DEBUG && !COMPILED) {
203
+ /**
204
+ * @public
205
+ * @override
206
+ */
207
+ proto.Auth.PasskeyProto.ListCredentialsReply.displayName = 'proto.Auth.PasskeyProto.ListCredentialsReply';
208
+ }
209
+ /**
210
+ * Generated by JsPbCodeGenerator.
211
+ * @param {Array=} opt_data Optional initial data array, typically from a
212
+ * server response, or constructed directly in Javascript. The array is used
213
+ * in place and becomes part of the constructed object. It is not cloned.
214
+ * If no data is provided, the constructed object will be empty, but still
215
+ * valid.
216
+ * @extends {jspb.Message}
217
+ * @constructor
218
+ */
219
+ proto.Auth.PasskeyProto.DeleteCredentialRequest = function(opt_data) {
220
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
221
+ };
222
+ goog.inherits(proto.Auth.PasskeyProto.DeleteCredentialRequest, jspb.Message);
223
+ if (goog.DEBUG && !COMPILED) {
224
+ /**
225
+ * @public
226
+ * @override
227
+ */
228
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.displayName = 'proto.Auth.PasskeyProto.DeleteCredentialRequest';
229
+ }
184
230
 
185
231
 
186
232
 
@@ -796,7 +842,8 @@ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.prototype.toObject = function
796
842
  */
797
843
  proto.Auth.PasskeyProto.GetAssertionOptionsRequest.toObject = function(includeInstance, msg) {
798
844
  var f, obj = {
799
-
845
+ email: jspb.Message.getFieldWithDefault(msg, 1, ""),
846
+ phone: jspb.Message.getFieldWithDefault(msg, 2, "")
800
847
  };
801
848
 
802
849
  if (includeInstance) {
@@ -833,6 +880,14 @@ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.deserializeBinaryFromReader =
833
880
  }
834
881
  var field = reader.getFieldNumber();
835
882
  switch (field) {
883
+ case 1:
884
+ var value = /** @type {string} */ (reader.readString());
885
+ msg.setEmail(value);
886
+ break;
887
+ case 2:
888
+ var value = /** @type {string} */ (reader.readString());
889
+ msg.setPhone(value);
890
+ break;
836
891
  default:
837
892
  reader.skipField();
838
893
  break;
@@ -862,6 +917,56 @@ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.prototype.serializeBinary = f
862
917
  */
863
918
  proto.Auth.PasskeyProto.GetAssertionOptionsRequest.serializeBinaryToWriter = function(message, writer) {
864
919
  var f = undefined;
920
+ f = message.getEmail();
921
+ if (f.length > 0) {
922
+ writer.writeString(
923
+ 1,
924
+ f
925
+ );
926
+ }
927
+ f = message.getPhone();
928
+ if (f.length > 0) {
929
+ writer.writeString(
930
+ 2,
931
+ f
932
+ );
933
+ }
934
+ };
935
+
936
+
937
+ /**
938
+ * optional string email = 1;
939
+ * @return {string}
940
+ */
941
+ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.prototype.getEmail = function() {
942
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
943
+ };
944
+
945
+
946
+ /**
947
+ * @param {string} value
948
+ * @return {!proto.Auth.PasskeyProto.GetAssertionOptionsRequest} returns this
949
+ */
950
+ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.prototype.setEmail = function(value) {
951
+ return jspb.Message.setProto3StringField(this, 1, value);
952
+ };
953
+
954
+
955
+ /**
956
+ * optional string phone = 2;
957
+ * @return {string}
958
+ */
959
+ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.prototype.getPhone = function() {
960
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
961
+ };
962
+
963
+
964
+ /**
965
+ * @param {string} value
966
+ * @return {!proto.Auth.PasskeyProto.GetAssertionOptionsRequest} returns this
967
+ */
968
+ proto.Auth.PasskeyProto.GetAssertionOptionsRequest.prototype.setPhone = function(value) {
969
+ return jspb.Message.setProto3StringField(this, 2, value);
865
970
  };
866
971
 
867
972
 
@@ -1125,6 +1230,320 @@ proto.Auth.PasskeyProto.MakeAssertionRequest.prototype.setAuthenticatorAssertion
1125
1230
  };
1126
1231
 
1127
1232
 
1233
+
1234
+ /**
1235
+ * List of repeated fields within this message type.
1236
+ * @private {!Array<number>}
1237
+ * @const
1238
+ */
1239
+ proto.Auth.PasskeyProto.ListCredentialsReply.repeatedFields_ = [1];
1240
+
1241
+
1242
+
1243
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1244
+ /**
1245
+ * Creates an object representation of this proto.
1246
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1247
+ * Optional fields that are not set will be set to undefined.
1248
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1249
+ * For the list of reserved names please see:
1250
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1251
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1252
+ * JSPB instance for transitional soy proto support:
1253
+ * http://goto/soy-param-migration
1254
+ * @return {!Object}
1255
+ */
1256
+ proto.Auth.PasskeyProto.ListCredentialsReply.prototype.toObject = function(opt_includeInstance) {
1257
+ return proto.Auth.PasskeyProto.ListCredentialsReply.toObject(opt_includeInstance, this);
1258
+ };
1259
+
1260
+
1261
+ /**
1262
+ * Static version of the {@see toObject} method.
1263
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1264
+ * the JSPB instance for transitional soy proto support:
1265
+ * http://goto/soy-param-migration
1266
+ * @param {!proto.Auth.PasskeyProto.ListCredentialsReply} msg The msg instance to transform.
1267
+ * @return {!Object}
1268
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1269
+ */
1270
+ proto.Auth.PasskeyProto.ListCredentialsReply.toObject = function(includeInstance, msg) {
1271
+ var f, obj = {
1272
+ passkeysList: jspb.Message.toObjectList(msg.getPasskeysList(),
1273
+ proto.Auth.PasskeyProto.toObject, includeInstance)
1274
+ };
1275
+
1276
+ if (includeInstance) {
1277
+ obj.$jspbMessageInstance = msg;
1278
+ }
1279
+ return obj;
1280
+ };
1281
+ }
1282
+
1283
+
1284
+ /**
1285
+ * Deserializes binary data (in protobuf wire format).
1286
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1287
+ * @return {!proto.Auth.PasskeyProto.ListCredentialsReply}
1288
+ */
1289
+ proto.Auth.PasskeyProto.ListCredentialsReply.deserializeBinary = function(bytes) {
1290
+ var reader = new jspb.BinaryReader(bytes);
1291
+ var msg = new proto.Auth.PasskeyProto.ListCredentialsReply;
1292
+ return proto.Auth.PasskeyProto.ListCredentialsReply.deserializeBinaryFromReader(msg, reader);
1293
+ };
1294
+
1295
+
1296
+ /**
1297
+ * Deserializes binary data (in protobuf wire format) from the
1298
+ * given reader into the given message object.
1299
+ * @param {!proto.Auth.PasskeyProto.ListCredentialsReply} msg The message object to deserialize into.
1300
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1301
+ * @return {!proto.Auth.PasskeyProto.ListCredentialsReply}
1302
+ */
1303
+ proto.Auth.PasskeyProto.ListCredentialsReply.deserializeBinaryFromReader = function(msg, reader) {
1304
+ while (reader.nextField()) {
1305
+ if (reader.isEndGroup()) {
1306
+ break;
1307
+ }
1308
+ var field = reader.getFieldNumber();
1309
+ switch (field) {
1310
+ case 1:
1311
+ var value = new proto.Auth.PasskeyProto;
1312
+ reader.readMessage(value,proto.Auth.PasskeyProto.deserializeBinaryFromReader);
1313
+ msg.addPasskeys(value);
1314
+ break;
1315
+ default:
1316
+ reader.skipField();
1317
+ break;
1318
+ }
1319
+ }
1320
+ return msg;
1321
+ };
1322
+
1323
+
1324
+ /**
1325
+ * Serializes the message to binary data (in protobuf wire format).
1326
+ * @return {!Uint8Array}
1327
+ */
1328
+ proto.Auth.PasskeyProto.ListCredentialsReply.prototype.serializeBinary = function() {
1329
+ var writer = new jspb.BinaryWriter();
1330
+ proto.Auth.PasskeyProto.ListCredentialsReply.serializeBinaryToWriter(this, writer);
1331
+ return writer.getResultBuffer();
1332
+ };
1333
+
1334
+
1335
+ /**
1336
+ * Serializes the given message to binary data (in protobuf wire
1337
+ * format), writing to the given BinaryWriter.
1338
+ * @param {!proto.Auth.PasskeyProto.ListCredentialsReply} message
1339
+ * @param {!jspb.BinaryWriter} writer
1340
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1341
+ */
1342
+ proto.Auth.PasskeyProto.ListCredentialsReply.serializeBinaryToWriter = function(message, writer) {
1343
+ var f = undefined;
1344
+ f = message.getPasskeysList();
1345
+ if (f.length > 0) {
1346
+ writer.writeRepeatedMessage(
1347
+ 1,
1348
+ f,
1349
+ proto.Auth.PasskeyProto.serializeBinaryToWriter
1350
+ );
1351
+ }
1352
+ };
1353
+
1354
+
1355
+ /**
1356
+ * repeated PasskeyProto passkeys = 1;
1357
+ * @return {!Array<!proto.Auth.PasskeyProto>}
1358
+ */
1359
+ proto.Auth.PasskeyProto.ListCredentialsReply.prototype.getPasskeysList = function() {
1360
+ return /** @type{!Array<!proto.Auth.PasskeyProto>} */ (
1361
+ jspb.Message.getRepeatedWrapperField(this, proto.Auth.PasskeyProto, 1));
1362
+ };
1363
+
1364
+
1365
+ /**
1366
+ * @param {!Array<!proto.Auth.PasskeyProto>} value
1367
+ * @return {!proto.Auth.PasskeyProto.ListCredentialsReply} returns this
1368
+ */
1369
+ proto.Auth.PasskeyProto.ListCredentialsReply.prototype.setPasskeysList = function(value) {
1370
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1371
+ };
1372
+
1373
+
1374
+ /**
1375
+ * @param {!proto.Auth.PasskeyProto=} opt_value
1376
+ * @param {number=} opt_index
1377
+ * @return {!proto.Auth.PasskeyProto}
1378
+ */
1379
+ proto.Auth.PasskeyProto.ListCredentialsReply.prototype.addPasskeys = function(opt_value, opt_index) {
1380
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Auth.PasskeyProto, opt_index);
1381
+ };
1382
+
1383
+
1384
+ /**
1385
+ * Clears the list making it empty but non-null.
1386
+ * @return {!proto.Auth.PasskeyProto.ListCredentialsReply} returns this
1387
+ */
1388
+ proto.Auth.PasskeyProto.ListCredentialsReply.prototype.clearPasskeysList = function() {
1389
+ return this.setPasskeysList([]);
1390
+ };
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1397
+ /**
1398
+ * Creates an object representation of this proto.
1399
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1400
+ * Optional fields that are not set will be set to undefined.
1401
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1402
+ * For the list of reserved names please see:
1403
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1404
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1405
+ * JSPB instance for transitional soy proto support:
1406
+ * http://goto/soy-param-migration
1407
+ * @return {!Object}
1408
+ */
1409
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.prototype.toObject = function(opt_includeInstance) {
1410
+ return proto.Auth.PasskeyProto.DeleteCredentialRequest.toObject(opt_includeInstance, this);
1411
+ };
1412
+
1413
+
1414
+ /**
1415
+ * Static version of the {@see toObject} method.
1416
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1417
+ * the JSPB instance for transitional soy proto support:
1418
+ * http://goto/soy-param-migration
1419
+ * @param {!proto.Auth.PasskeyProto.DeleteCredentialRequest} msg The msg instance to transform.
1420
+ * @return {!Object}
1421
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1422
+ */
1423
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.toObject = function(includeInstance, msg) {
1424
+ var f, obj = {
1425
+ id: msg.getId_asB64()
1426
+ };
1427
+
1428
+ if (includeInstance) {
1429
+ obj.$jspbMessageInstance = msg;
1430
+ }
1431
+ return obj;
1432
+ };
1433
+ }
1434
+
1435
+
1436
+ /**
1437
+ * Deserializes binary data (in protobuf wire format).
1438
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1439
+ * @return {!proto.Auth.PasskeyProto.DeleteCredentialRequest}
1440
+ */
1441
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.deserializeBinary = function(bytes) {
1442
+ var reader = new jspb.BinaryReader(bytes);
1443
+ var msg = new proto.Auth.PasskeyProto.DeleteCredentialRequest;
1444
+ return proto.Auth.PasskeyProto.DeleteCredentialRequest.deserializeBinaryFromReader(msg, reader);
1445
+ };
1446
+
1447
+
1448
+ /**
1449
+ * Deserializes binary data (in protobuf wire format) from the
1450
+ * given reader into the given message object.
1451
+ * @param {!proto.Auth.PasskeyProto.DeleteCredentialRequest} msg The message object to deserialize into.
1452
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1453
+ * @return {!proto.Auth.PasskeyProto.DeleteCredentialRequest}
1454
+ */
1455
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.deserializeBinaryFromReader = function(msg, reader) {
1456
+ while (reader.nextField()) {
1457
+ if (reader.isEndGroup()) {
1458
+ break;
1459
+ }
1460
+ var field = reader.getFieldNumber();
1461
+ switch (field) {
1462
+ case 1:
1463
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
1464
+ msg.setId(value);
1465
+ break;
1466
+ default:
1467
+ reader.skipField();
1468
+ break;
1469
+ }
1470
+ }
1471
+ return msg;
1472
+ };
1473
+
1474
+
1475
+ /**
1476
+ * Serializes the message to binary data (in protobuf wire format).
1477
+ * @return {!Uint8Array}
1478
+ */
1479
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.prototype.serializeBinary = function() {
1480
+ var writer = new jspb.BinaryWriter();
1481
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.serializeBinaryToWriter(this, writer);
1482
+ return writer.getResultBuffer();
1483
+ };
1484
+
1485
+
1486
+ /**
1487
+ * Serializes the given message to binary data (in protobuf wire
1488
+ * format), writing to the given BinaryWriter.
1489
+ * @param {!proto.Auth.PasskeyProto.DeleteCredentialRequest} message
1490
+ * @param {!jspb.BinaryWriter} writer
1491
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1492
+ */
1493
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.serializeBinaryToWriter = function(message, writer) {
1494
+ var f = undefined;
1495
+ f = message.getId_asU8();
1496
+ if (f.length > 0) {
1497
+ writer.writeBytes(
1498
+ 1,
1499
+ f
1500
+ );
1501
+ }
1502
+ };
1503
+
1504
+
1505
+ /**
1506
+ * optional bytes id = 1;
1507
+ * @return {!(string|Uint8Array)}
1508
+ */
1509
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.prototype.getId = function() {
1510
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1511
+ };
1512
+
1513
+
1514
+ /**
1515
+ * optional bytes id = 1;
1516
+ * This is a type-conversion wrapper around `getId()`
1517
+ * @return {string}
1518
+ */
1519
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.prototype.getId_asB64 = function() {
1520
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
1521
+ this.getId()));
1522
+ };
1523
+
1524
+
1525
+ /**
1526
+ * optional bytes id = 1;
1527
+ * Note that Uint8Array is not supported on all browsers.
1528
+ * @see http://caniuse.com/Uint8Array
1529
+ * This is a type-conversion wrapper around `getId()`
1530
+ * @return {!Uint8Array}
1531
+ */
1532
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.prototype.getId_asU8 = function() {
1533
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1534
+ this.getId()));
1535
+ };
1536
+
1537
+
1538
+ /**
1539
+ * @param {!(string|Uint8Array)} value
1540
+ * @return {!proto.Auth.PasskeyProto.DeleteCredentialRequest} returns this
1541
+ */
1542
+ proto.Auth.PasskeyProto.DeleteCredentialRequest.prototype.setId = function(value) {
1543
+ return jspb.Message.setProto3BytesField(this, 1, value);
1544
+ };
1545
+
1546
+
1128
1547
  /**
1129
1548
  * optional bytes id = 1;
1130
1549
  * @return {!(string|Uint8Array)}
@@ -3,6 +3,7 @@
3
3
 
4
4
  import * as auth_passkey_pb from "./auth.passkey_pb";
5
5
  import * as auth_authn_pb from "./auth.authn_pb";
6
+ import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
6
7
  import {grpc} from "@improbable-eng/grpc-web";
7
8
 
8
9
  type PassKeyGRPCGetCredentialsOptions = {
@@ -41,12 +42,32 @@ type PassKeyGRPCMakeAssertion = {
41
42
  readonly responseType: typeof auth_authn_pb.AuthnProto;
42
43
  };
43
44
 
45
+ type PassKeyGRPCListCredentials = {
46
+ readonly methodName: string;
47
+ readonly service: typeof PassKeyGRPC;
48
+ readonly requestStream: false;
49
+ readonly responseStream: false;
50
+ readonly requestType: typeof google_protobuf_empty_pb.Empty;
51
+ readonly responseType: typeof auth_passkey_pb.PasskeyProto.ListCredentialsReply;
52
+ };
53
+
54
+ type PassKeyGRPCDeleteCredential = {
55
+ readonly methodName: string;
56
+ readonly service: typeof PassKeyGRPC;
57
+ readonly requestStream: false;
58
+ readonly responseStream: false;
59
+ readonly requestType: typeof auth_passkey_pb.PasskeyProto.DeleteCredentialRequest;
60
+ readonly responseType: typeof google_protobuf_empty_pb.Empty;
61
+ };
62
+
44
63
  export class PassKeyGRPC {
45
64
  static readonly serviceName: string;
46
65
  static readonly GetCredentialsOptions: PassKeyGRPCGetCredentialsOptions;
47
66
  static readonly CreateCredential: PassKeyGRPCCreateCredential;
48
67
  static readonly GetAssertionOptions: PassKeyGRPCGetAssertionOptions;
49
68
  static readonly MakeAssertion: PassKeyGRPCMakeAssertion;
69
+ static readonly ListCredentials: PassKeyGRPCListCredentials;
70
+ static readonly DeleteCredential: PassKeyGRPCDeleteCredential;
50
71
  }
51
72
 
52
73
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -117,5 +138,23 @@ export class PassKeyGRPCClient {
117
138
  requestMessage: auth_passkey_pb.PasskeyProto.MakeAssertionRequest,
118
139
  callback: (error: ServiceError|null, responseMessage: auth_authn_pb.AuthnProto|null) => void
119
140
  ): UnaryResponse;
141
+ listCredentials(
142
+ requestMessage: google_protobuf_empty_pb.Empty,
143
+ metadata: grpc.Metadata,
144
+ callback: (error: ServiceError|null, responseMessage: auth_passkey_pb.PasskeyProto.ListCredentialsReply|null) => void
145
+ ): UnaryResponse;
146
+ listCredentials(
147
+ requestMessage: google_protobuf_empty_pb.Empty,
148
+ callback: (error: ServiceError|null, responseMessage: auth_passkey_pb.PasskeyProto.ListCredentialsReply|null) => void
149
+ ): UnaryResponse;
150
+ deleteCredential(
151
+ requestMessage: auth_passkey_pb.PasskeyProto.DeleteCredentialRequest,
152
+ metadata: grpc.Metadata,
153
+ callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void
154
+ ): UnaryResponse;
155
+ deleteCredential(
156
+ requestMessage: auth_passkey_pb.PasskeyProto.DeleteCredentialRequest,
157
+ callback: (error: ServiceError|null, responseMessage: google_protobuf_empty_pb.Empty|null) => void
158
+ ): UnaryResponse;
120
159
  }
121
160
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  var auth_passkey_pb = require("./auth.passkey_pb");
5
5
  var auth_authn_pb = require("./auth.authn_pb");
6
+ var google_protobuf_empty_pb = require("google-protobuf/google/protobuf/empty_pb");
6
7
  var grpc = require("@improbable-eng/grpc-web").grpc;
7
8
 
8
9
  var PassKeyGRPC = (function () {
@@ -47,6 +48,24 @@ PassKeyGRPC.MakeAssertion = {
47
48
  responseType: auth_authn_pb.AuthnProto
48
49
  };
49
50
 
51
+ PassKeyGRPC.ListCredentials = {
52
+ methodName: "ListCredentials",
53
+ service: PassKeyGRPC,
54
+ requestStream: false,
55
+ responseStream: false,
56
+ requestType: google_protobuf_empty_pb.Empty,
57
+ responseType: auth_passkey_pb.PasskeyProto.ListCredentialsReply
58
+ };
59
+
60
+ PassKeyGRPC.DeleteCredential = {
61
+ methodName: "DeleteCredential",
62
+ service: PassKeyGRPC,
63
+ requestStream: false,
64
+ responseStream: false,
65
+ requestType: auth_passkey_pb.PasskeyProto.DeleteCredentialRequest,
66
+ responseType: google_protobuf_empty_pb.Empty
67
+ };
68
+
50
69
  exports.PassKeyGRPC = PassKeyGRPC;
51
70
 
52
71
  function PassKeyGRPCClient(serviceHost, options) {
@@ -178,5 +197,67 @@ PassKeyGRPCClient.prototype.makeAssertion = function makeAssertion(requestMessag
178
197
  };
179
198
  };
180
199
 
200
+ PassKeyGRPCClient.prototype.listCredentials = function listCredentials(requestMessage, metadata, callback) {
201
+ if (arguments.length === 2) {
202
+ callback = arguments[1];
203
+ }
204
+ var client = grpc.unary(PassKeyGRPC.ListCredentials, {
205
+ request: requestMessage,
206
+ host: this.serviceHost,
207
+ metadata: metadata,
208
+ transport: this.options.transport,
209
+ debug: this.options.debug,
210
+ onEnd: function (response) {
211
+ if (callback) {
212
+ if (response.status !== grpc.Code.OK) {
213
+ var err = new Error(response.statusMessage);
214
+ err.code = response.status;
215
+ err.metadata = response.trailers;
216
+ callback(err, null);
217
+ } else {
218
+ callback(null, response.message);
219
+ }
220
+ }
221
+ }
222
+ });
223
+ return {
224
+ cancel: function () {
225
+ callback = null;
226
+ client.close();
227
+ }
228
+ };
229
+ };
230
+
231
+ PassKeyGRPCClient.prototype.deleteCredential = function deleteCredential(requestMessage, metadata, callback) {
232
+ if (arguments.length === 2) {
233
+ callback = arguments[1];
234
+ }
235
+ var client = grpc.unary(PassKeyGRPC.DeleteCredential, {
236
+ request: requestMessage,
237
+ host: this.serviceHost,
238
+ metadata: metadata,
239
+ transport: this.options.transport,
240
+ debug: this.options.debug,
241
+ onEnd: function (response) {
242
+ if (callback) {
243
+ if (response.status !== grpc.Code.OK) {
244
+ var err = new Error(response.statusMessage);
245
+ err.code = response.status;
246
+ err.metadata = response.trailers;
247
+ callback(err, null);
248
+ } else {
249
+ callback(null, response.message);
250
+ }
251
+ }
252
+ }
253
+ });
254
+ return {
255
+ cancel: function () {
256
+ callback = null;
257
+ client.close();
258
+ }
259
+ };
260
+ };
261
+
181
262
  exports.PassKeyGRPCClient = PassKeyGRPCClient;
182
263
 
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": "3.7.0-alpha.5",
8
+ "version": "3.7.0-alpha.7",
9
9
  "description": "Generated proto files.",
10
10
  "author": "TKF",
11
11
  "files": [
@@ -270,6 +270,26 @@ export namespace LocalAccountProto {
270
270
  }
271
271
  }
272
272
 
273
+ export class DeleteRequest extends jspb.Message {
274
+ getId(): number;
275
+ setId(value: number): void;
276
+
277
+ serializeBinary(): Uint8Array;
278
+ toObject(includeInstance?: boolean): DeleteRequest.AsObject;
279
+ static toObject(includeInstance: boolean, msg: DeleteRequest): DeleteRequest.AsObject;
280
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
281
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
282
+ static serializeBinaryToWriter(message: DeleteRequest, writer: jspb.BinaryWriter): void;
283
+ static deserializeBinary(bytes: Uint8Array): DeleteRequest;
284
+ static deserializeBinaryFromReader(message: DeleteRequest, reader: jspb.BinaryReader): DeleteRequest;
285
+ }
286
+
287
+ export namespace DeleteRequest {
288
+ export type AsObject = {
289
+ id: number,
290
+ }
291
+ }
292
+
273
293
  export class SearchRequest extends jspb.Message {
274
294
  getSearch(): string;
275
295
  setSearch(value: string): void;