@conduitplatform/grpc-sdk 0.17.0-alpha.8 → 0.17.0-alpha.9
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/dist/index.cjs +1778 -318
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +350 -30
- package/dist/index.d.ts +350 -30
- package/dist/index.esm.js +1762 -318
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -3,11 +3,11 @@ var ConduitError = class _ConduitError extends Error {
|
|
|
3
3
|
message;
|
|
4
4
|
name;
|
|
5
5
|
status;
|
|
6
|
-
constructor(name,
|
|
6
|
+
constructor(name, status3, message) {
|
|
7
7
|
super(message);
|
|
8
8
|
this.name = name;
|
|
9
9
|
this.message = message;
|
|
10
|
-
this.status =
|
|
10
|
+
this.status = status3;
|
|
11
11
|
}
|
|
12
12
|
static unauthorized(message = "Unauthorized") {
|
|
13
13
|
return new _ConduitError("UNAUTHORIZED", 401, message);
|
|
@@ -154,7 +154,7 @@ function validateAccessTokenResponse_StatusToJSON(object) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function createBaseUserLoginRequest() {
|
|
157
|
-
return { userId: "", clientId: "" };
|
|
157
|
+
return { userId: "", clientId: "", realm: void 0 };
|
|
158
158
|
}
|
|
159
159
|
var UserLoginRequest = {
|
|
160
160
|
encode(message, writer = new BinaryWriter2()) {
|
|
@@ -164,6 +164,9 @@ var UserLoginRequest = {
|
|
|
164
164
|
if (message.clientId !== "") {
|
|
165
165
|
writer.uint32(18).string(message.clientId);
|
|
166
166
|
}
|
|
167
|
+
if (message.realm !== void 0) {
|
|
168
|
+
writer.uint32(26).string(message.realm);
|
|
169
|
+
}
|
|
167
170
|
return writer;
|
|
168
171
|
},
|
|
169
172
|
decode(input, length) {
|
|
@@ -193,6 +196,13 @@ var UserLoginRequest = {
|
|
|
193
196
|
message.clientId = reader.string();
|
|
194
197
|
continue;
|
|
195
198
|
}
|
|
199
|
+
case 3: {
|
|
200
|
+
if (tag !== 26) {
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
message.realm = reader.string();
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
196
206
|
}
|
|
197
207
|
if ((tag & 7) === 4 || tag === 0) {
|
|
198
208
|
break;
|
|
@@ -207,7 +217,8 @@ var UserLoginRequest = {
|
|
|
207
217
|
fromJSON(object) {
|
|
208
218
|
return {
|
|
209
219
|
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
|
|
210
|
-
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : ""
|
|
220
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
221
|
+
realm: isSet(object.realm) ? globalThis.String(object.realm) : void 0
|
|
211
222
|
};
|
|
212
223
|
},
|
|
213
224
|
toJSON(message) {
|
|
@@ -218,6 +229,9 @@ var UserLoginRequest = {
|
|
|
218
229
|
if (message.clientId !== "") {
|
|
219
230
|
obj.clientId = message.clientId;
|
|
220
231
|
}
|
|
232
|
+
if (message.realm !== void 0) {
|
|
233
|
+
obj.realm = message.realm;
|
|
234
|
+
}
|
|
221
235
|
return obj;
|
|
222
236
|
},
|
|
223
237
|
create(base) {
|
|
@@ -227,11 +241,19 @@ var UserLoginRequest = {
|
|
|
227
241
|
const message = createBaseUserLoginRequest();
|
|
228
242
|
message.userId = object.userId ?? "";
|
|
229
243
|
message.clientId = object.clientId ?? "";
|
|
244
|
+
message.realm = object.realm ?? void 0;
|
|
230
245
|
return message;
|
|
231
246
|
}
|
|
232
247
|
};
|
|
233
248
|
function createBaseUserCreateRequest() {
|
|
234
|
-
return {
|
|
249
|
+
return {
|
|
250
|
+
email: "",
|
|
251
|
+
password: void 0,
|
|
252
|
+
verify: false,
|
|
253
|
+
anonymousId: void 0,
|
|
254
|
+
userData: void 0,
|
|
255
|
+
realm: void 0
|
|
256
|
+
};
|
|
235
257
|
}
|
|
236
258
|
var UserCreateRequest = {
|
|
237
259
|
encode(message, writer = new BinaryWriter2()) {
|
|
@@ -250,6 +272,9 @@ var UserCreateRequest = {
|
|
|
250
272
|
if (message.userData !== void 0) {
|
|
251
273
|
writer.uint32(42).string(message.userData);
|
|
252
274
|
}
|
|
275
|
+
if (message.realm !== void 0) {
|
|
276
|
+
writer.uint32(50).string(message.realm);
|
|
277
|
+
}
|
|
253
278
|
return writer;
|
|
254
279
|
},
|
|
255
280
|
decode(input, length) {
|
|
@@ -300,6 +325,13 @@ var UserCreateRequest = {
|
|
|
300
325
|
message.userData = reader.string();
|
|
301
326
|
continue;
|
|
302
327
|
}
|
|
328
|
+
case 6: {
|
|
329
|
+
if (tag !== 50) {
|
|
330
|
+
break;
|
|
331
|
+
}
|
|
332
|
+
message.realm = reader.string();
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
303
335
|
}
|
|
304
336
|
if ((tag & 7) === 4 || tag === 0) {
|
|
305
337
|
break;
|
|
@@ -317,7 +349,8 @@ var UserCreateRequest = {
|
|
|
317
349
|
password: isSet(object.password) ? globalThis.String(object.password) : void 0,
|
|
318
350
|
verify: isSet(object.verify) ? globalThis.Boolean(object.verify) : false,
|
|
319
351
|
anonymousId: isSet(object.anonymousId) ? globalThis.String(object.anonymousId) : void 0,
|
|
320
|
-
userData: isSet(object.userData) ? globalThis.String(object.userData) : void 0
|
|
352
|
+
userData: isSet(object.userData) ? globalThis.String(object.userData) : void 0,
|
|
353
|
+
realm: isSet(object.realm) ? globalThis.String(object.realm) : void 0
|
|
321
354
|
};
|
|
322
355
|
},
|
|
323
356
|
toJSON(message) {
|
|
@@ -337,6 +370,9 @@ var UserCreateRequest = {
|
|
|
337
370
|
if (message.userData !== void 0) {
|
|
338
371
|
obj.userData = message.userData;
|
|
339
372
|
}
|
|
373
|
+
if (message.realm !== void 0) {
|
|
374
|
+
obj.realm = message.realm;
|
|
375
|
+
}
|
|
340
376
|
return obj;
|
|
341
377
|
},
|
|
342
378
|
create(base) {
|
|
@@ -349,11 +385,12 @@ var UserCreateRequest = {
|
|
|
349
385
|
message.verify = object.verify ?? false;
|
|
350
386
|
message.anonymousId = object.anonymousId ?? void 0;
|
|
351
387
|
message.userData = object.userData ?? void 0;
|
|
388
|
+
message.realm = object.realm ?? void 0;
|
|
352
389
|
return message;
|
|
353
390
|
}
|
|
354
391
|
};
|
|
355
392
|
function createBaseUserCreateByUsernameRequest() {
|
|
356
|
-
return { username: "", password: void 0, anonymousId: void 0 };
|
|
393
|
+
return { username: "", password: void 0, anonymousId: void 0, realm: void 0 };
|
|
357
394
|
}
|
|
358
395
|
var UserCreateByUsernameRequest = {
|
|
359
396
|
encode(message, writer = new BinaryWriter2()) {
|
|
@@ -366,6 +403,9 @@ var UserCreateByUsernameRequest = {
|
|
|
366
403
|
if (message.anonymousId !== void 0) {
|
|
367
404
|
writer.uint32(26).string(message.anonymousId);
|
|
368
405
|
}
|
|
406
|
+
if (message.realm !== void 0) {
|
|
407
|
+
writer.uint32(34).string(message.realm);
|
|
408
|
+
}
|
|
369
409
|
return writer;
|
|
370
410
|
},
|
|
371
411
|
decode(input, length) {
|
|
@@ -402,6 +442,13 @@ var UserCreateByUsernameRequest = {
|
|
|
402
442
|
message.anonymousId = reader.string();
|
|
403
443
|
continue;
|
|
404
444
|
}
|
|
445
|
+
case 4: {
|
|
446
|
+
if (tag !== 34) {
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
message.realm = reader.string();
|
|
450
|
+
continue;
|
|
451
|
+
}
|
|
405
452
|
}
|
|
406
453
|
if ((tag & 7) === 4 || tag === 0) {
|
|
407
454
|
break;
|
|
@@ -417,7 +464,8 @@ var UserCreateByUsernameRequest = {
|
|
|
417
464
|
return {
|
|
418
465
|
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
419
466
|
password: isSet(object.password) ? globalThis.String(object.password) : void 0,
|
|
420
|
-
anonymousId: isSet(object.anonymousId) ? globalThis.String(object.anonymousId) : void 0
|
|
467
|
+
anonymousId: isSet(object.anonymousId) ? globalThis.String(object.anonymousId) : void 0,
|
|
468
|
+
realm: isSet(object.realm) ? globalThis.String(object.realm) : void 0
|
|
421
469
|
};
|
|
422
470
|
},
|
|
423
471
|
toJSON(message) {
|
|
@@ -431,6 +479,9 @@ var UserCreateByUsernameRequest = {
|
|
|
431
479
|
if (message.anonymousId !== void 0) {
|
|
432
480
|
obj.anonymousId = message.anonymousId;
|
|
433
481
|
}
|
|
482
|
+
if (message.realm !== void 0) {
|
|
483
|
+
obj.realm = message.realm;
|
|
484
|
+
}
|
|
434
485
|
return obj;
|
|
435
486
|
},
|
|
436
487
|
create(base) {
|
|
@@ -441,11 +492,12 @@ var UserCreateByUsernameRequest = {
|
|
|
441
492
|
message.username = object.username ?? "";
|
|
442
493
|
message.password = object.password ?? void 0;
|
|
443
494
|
message.anonymousId = object.anonymousId ?? void 0;
|
|
495
|
+
message.realm = object.realm ?? void 0;
|
|
444
496
|
return message;
|
|
445
497
|
}
|
|
446
498
|
};
|
|
447
499
|
function createBaseUserChangePass() {
|
|
448
|
-
return { email: "", password: void 0 };
|
|
500
|
+
return { email: "", password: void 0, realm: void 0 };
|
|
449
501
|
}
|
|
450
502
|
var UserChangePass = {
|
|
451
503
|
encode(message, writer = new BinaryWriter2()) {
|
|
@@ -455,6 +507,9 @@ var UserChangePass = {
|
|
|
455
507
|
if (message.password !== void 0) {
|
|
456
508
|
writer.uint32(18).string(message.password);
|
|
457
509
|
}
|
|
510
|
+
if (message.realm !== void 0) {
|
|
511
|
+
writer.uint32(26).string(message.realm);
|
|
512
|
+
}
|
|
458
513
|
return writer;
|
|
459
514
|
},
|
|
460
515
|
decode(input, length) {
|
|
@@ -484,6 +539,13 @@ var UserChangePass = {
|
|
|
484
539
|
message.password = reader.string();
|
|
485
540
|
continue;
|
|
486
541
|
}
|
|
542
|
+
case 3: {
|
|
543
|
+
if (tag !== 26) {
|
|
544
|
+
break;
|
|
545
|
+
}
|
|
546
|
+
message.realm = reader.string();
|
|
547
|
+
continue;
|
|
548
|
+
}
|
|
487
549
|
}
|
|
488
550
|
if ((tag & 7) === 4 || tag === 0) {
|
|
489
551
|
break;
|
|
@@ -498,7 +560,8 @@ var UserChangePass = {
|
|
|
498
560
|
fromJSON(object) {
|
|
499
561
|
return {
|
|
500
562
|
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
501
|
-
password: isSet(object.password) ? globalThis.String(object.password) : void 0
|
|
563
|
+
password: isSet(object.password) ? globalThis.String(object.password) : void 0,
|
|
564
|
+
realm: isSet(object.realm) ? globalThis.String(object.realm) : void 0
|
|
502
565
|
};
|
|
503
566
|
},
|
|
504
567
|
toJSON(message) {
|
|
@@ -509,6 +572,9 @@ var UserChangePass = {
|
|
|
509
572
|
if (message.password !== void 0) {
|
|
510
573
|
obj.password = message.password;
|
|
511
574
|
}
|
|
575
|
+
if (message.realm !== void 0) {
|
|
576
|
+
obj.realm = message.realm;
|
|
577
|
+
}
|
|
512
578
|
return obj;
|
|
513
579
|
},
|
|
514
580
|
create(base) {
|
|
@@ -518,6 +584,7 @@ var UserChangePass = {
|
|
|
518
584
|
const message = createBaseUserChangePass();
|
|
519
585
|
message.email = object.email ?? "";
|
|
520
586
|
message.password = object.password ?? void 0;
|
|
587
|
+
message.realm = object.realm ?? void 0;
|
|
521
588
|
return message;
|
|
522
589
|
}
|
|
523
590
|
};
|
|
@@ -1128,7 +1195,7 @@ var UserCreateResponse = {
|
|
|
1128
1195
|
}
|
|
1129
1196
|
};
|
|
1130
1197
|
function createBaseTeam() {
|
|
1131
|
-
return { id: "", name: "", parentTeam: "", isDefault: false };
|
|
1198
|
+
return { id: "", name: "", parentTeam: "", isDefault: false, realmEnabled: false, realmSlug: void 0 };
|
|
1132
1199
|
}
|
|
1133
1200
|
var Team = {
|
|
1134
1201
|
encode(message, writer = new BinaryWriter2()) {
|
|
@@ -1144,6 +1211,12 @@ var Team = {
|
|
|
1144
1211
|
if (message.isDefault !== false) {
|
|
1145
1212
|
writer.uint32(32).bool(message.isDefault);
|
|
1146
1213
|
}
|
|
1214
|
+
if (message.realmEnabled !== false) {
|
|
1215
|
+
writer.uint32(40).bool(message.realmEnabled);
|
|
1216
|
+
}
|
|
1217
|
+
if (message.realmSlug !== void 0) {
|
|
1218
|
+
writer.uint32(50).string(message.realmSlug);
|
|
1219
|
+
}
|
|
1147
1220
|
return writer;
|
|
1148
1221
|
},
|
|
1149
1222
|
decode(input, length) {
|
|
@@ -1187,6 +1260,20 @@ var Team = {
|
|
|
1187
1260
|
message.isDefault = reader.bool();
|
|
1188
1261
|
continue;
|
|
1189
1262
|
}
|
|
1263
|
+
case 5: {
|
|
1264
|
+
if (tag !== 40) {
|
|
1265
|
+
break;
|
|
1266
|
+
}
|
|
1267
|
+
message.realmEnabled = reader.bool();
|
|
1268
|
+
continue;
|
|
1269
|
+
}
|
|
1270
|
+
case 6: {
|
|
1271
|
+
if (tag !== 50) {
|
|
1272
|
+
break;
|
|
1273
|
+
}
|
|
1274
|
+
message.realmSlug = reader.string();
|
|
1275
|
+
continue;
|
|
1276
|
+
}
|
|
1190
1277
|
}
|
|
1191
1278
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1192
1279
|
break;
|
|
@@ -1203,7 +1290,9 @@ var Team = {
|
|
|
1203
1290
|
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1204
1291
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
1205
1292
|
parentTeam: isSet(object.parentTeam) ? globalThis.String(object.parentTeam) : "",
|
|
1206
|
-
isDefault: isSet(object.isDefault) ? globalThis.Boolean(object.isDefault) : false
|
|
1293
|
+
isDefault: isSet(object.isDefault) ? globalThis.Boolean(object.isDefault) : false,
|
|
1294
|
+
realmEnabled: isSet(object.realmEnabled) ? globalThis.Boolean(object.realmEnabled) : false,
|
|
1295
|
+
realmSlug: isSet(object.realmSlug) ? globalThis.String(object.realmSlug) : void 0
|
|
1207
1296
|
};
|
|
1208
1297
|
},
|
|
1209
1298
|
toJSON(message) {
|
|
@@ -1220,6 +1309,12 @@ var Team = {
|
|
|
1220
1309
|
if (message.isDefault !== false) {
|
|
1221
1310
|
obj.isDefault = message.isDefault;
|
|
1222
1311
|
}
|
|
1312
|
+
if (message.realmEnabled !== false) {
|
|
1313
|
+
obj.realmEnabled = message.realmEnabled;
|
|
1314
|
+
}
|
|
1315
|
+
if (message.realmSlug !== void 0) {
|
|
1316
|
+
obj.realmSlug = message.realmSlug;
|
|
1317
|
+
}
|
|
1223
1318
|
return obj;
|
|
1224
1319
|
},
|
|
1225
1320
|
create(base) {
|
|
@@ -1231,6 +1326,8 @@ var Team = {
|
|
|
1231
1326
|
message.name = object.name ?? "";
|
|
1232
1327
|
message.parentTeam = object.parentTeam ?? "";
|
|
1233
1328
|
message.isDefault = object.isDefault ?? false;
|
|
1329
|
+
message.realmEnabled = object.realmEnabled ?? false;
|
|
1330
|
+
message.realmSlug = object.realmSlug ?? void 0;
|
|
1234
1331
|
return message;
|
|
1235
1332
|
}
|
|
1236
1333
|
};
|
|
@@ -1371,6 +1468,126 @@ var ModifyTeamMembersRequest = {
|
|
|
1371
1468
|
return message;
|
|
1372
1469
|
}
|
|
1373
1470
|
};
|
|
1471
|
+
function createBaseGetUserRequest() {
|
|
1472
|
+
return { userId: "" };
|
|
1473
|
+
}
|
|
1474
|
+
var GetUserRequest = {
|
|
1475
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
1476
|
+
if (message.userId !== "") {
|
|
1477
|
+
writer.uint32(10).string(message.userId);
|
|
1478
|
+
}
|
|
1479
|
+
return writer;
|
|
1480
|
+
},
|
|
1481
|
+
decode(input, length) {
|
|
1482
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
1483
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1484
|
+
if (previousRecursionDepth >= 100) {
|
|
1485
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1486
|
+
}
|
|
1487
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1488
|
+
try {
|
|
1489
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1490
|
+
const message = createBaseGetUserRequest();
|
|
1491
|
+
while (reader.pos < end) {
|
|
1492
|
+
const tag = reader.uint32();
|
|
1493
|
+
switch (tag >>> 3) {
|
|
1494
|
+
case 1: {
|
|
1495
|
+
if (tag !== 10) {
|
|
1496
|
+
break;
|
|
1497
|
+
}
|
|
1498
|
+
message.userId = reader.string();
|
|
1499
|
+
continue;
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1503
|
+
break;
|
|
1504
|
+
}
|
|
1505
|
+
reader.skip(tag & 7);
|
|
1506
|
+
}
|
|
1507
|
+
return message;
|
|
1508
|
+
} finally {
|
|
1509
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
fromJSON(object) {
|
|
1513
|
+
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
|
|
1514
|
+
},
|
|
1515
|
+
toJSON(message) {
|
|
1516
|
+
const obj = {};
|
|
1517
|
+
if (message.userId !== "") {
|
|
1518
|
+
obj.userId = message.userId;
|
|
1519
|
+
}
|
|
1520
|
+
return obj;
|
|
1521
|
+
},
|
|
1522
|
+
create(base) {
|
|
1523
|
+
return GetUserRequest.fromPartial(base ?? {});
|
|
1524
|
+
},
|
|
1525
|
+
fromPartial(object) {
|
|
1526
|
+
const message = createBaseGetUserRequest();
|
|
1527
|
+
message.userId = object.userId ?? "";
|
|
1528
|
+
return message;
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
function createBaseGetUserResponse() {
|
|
1532
|
+
return { user: "" };
|
|
1533
|
+
}
|
|
1534
|
+
var GetUserResponse = {
|
|
1535
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
1536
|
+
if (message.user !== "") {
|
|
1537
|
+
writer.uint32(10).string(message.user);
|
|
1538
|
+
}
|
|
1539
|
+
return writer;
|
|
1540
|
+
},
|
|
1541
|
+
decode(input, length) {
|
|
1542
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
1543
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
1544
|
+
if (previousRecursionDepth >= 100) {
|
|
1545
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1546
|
+
}
|
|
1547
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1548
|
+
try {
|
|
1549
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1550
|
+
const message = createBaseGetUserResponse();
|
|
1551
|
+
while (reader.pos < end) {
|
|
1552
|
+
const tag = reader.uint32();
|
|
1553
|
+
switch (tag >>> 3) {
|
|
1554
|
+
case 1: {
|
|
1555
|
+
if (tag !== 10) {
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1558
|
+
message.user = reader.string();
|
|
1559
|
+
continue;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1563
|
+
break;
|
|
1564
|
+
}
|
|
1565
|
+
reader.skip(tag & 7);
|
|
1566
|
+
}
|
|
1567
|
+
return message;
|
|
1568
|
+
} finally {
|
|
1569
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
fromJSON(object) {
|
|
1573
|
+
return { user: isSet(object.user) ? globalThis.String(object.user) : "" };
|
|
1574
|
+
},
|
|
1575
|
+
toJSON(message) {
|
|
1576
|
+
const obj = {};
|
|
1577
|
+
if (message.user !== "") {
|
|
1578
|
+
obj.user = message.user;
|
|
1579
|
+
}
|
|
1580
|
+
return obj;
|
|
1581
|
+
},
|
|
1582
|
+
create(base) {
|
|
1583
|
+
return GetUserResponse.fromPartial(base ?? {});
|
|
1584
|
+
},
|
|
1585
|
+
fromPartial(object) {
|
|
1586
|
+
const message = createBaseGetUserResponse();
|
|
1587
|
+
message.user = object.user ?? "";
|
|
1588
|
+
return message;
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1374
1591
|
function createBaseValidateAccessTokenRequest() {
|
|
1375
1592
|
return { accessToken: "", path: void 0 };
|
|
1376
1593
|
}
|
|
@@ -1449,7 +1666,7 @@ var ValidateAccessTokenRequest = {
|
|
|
1449
1666
|
}
|
|
1450
1667
|
};
|
|
1451
1668
|
function createBaseValidateAccessTokenResponse() {
|
|
1452
|
-
return { status: 0, userId: void 0 };
|
|
1669
|
+
return { status: 0, userId: void 0, realm: void 0, homeRealm: void 0 };
|
|
1453
1670
|
}
|
|
1454
1671
|
var ValidateAccessTokenResponse = {
|
|
1455
1672
|
encode(message, writer = new BinaryWriter2()) {
|
|
@@ -1459,6 +1676,12 @@ var ValidateAccessTokenResponse = {
|
|
|
1459
1676
|
if (message.userId !== void 0) {
|
|
1460
1677
|
writer.uint32(18).string(message.userId);
|
|
1461
1678
|
}
|
|
1679
|
+
if (message.realm !== void 0) {
|
|
1680
|
+
writer.uint32(26).string(message.realm);
|
|
1681
|
+
}
|
|
1682
|
+
if (message.homeRealm !== void 0) {
|
|
1683
|
+
writer.uint32(34).string(message.homeRealm);
|
|
1684
|
+
}
|
|
1462
1685
|
return writer;
|
|
1463
1686
|
},
|
|
1464
1687
|
decode(input, length) {
|
|
@@ -1488,6 +1711,20 @@ var ValidateAccessTokenResponse = {
|
|
|
1488
1711
|
message.userId = reader.string();
|
|
1489
1712
|
continue;
|
|
1490
1713
|
}
|
|
1714
|
+
case 3: {
|
|
1715
|
+
if (tag !== 26) {
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
message.realm = reader.string();
|
|
1719
|
+
continue;
|
|
1720
|
+
}
|
|
1721
|
+
case 4: {
|
|
1722
|
+
if (tag !== 34) {
|
|
1723
|
+
break;
|
|
1724
|
+
}
|
|
1725
|
+
message.homeRealm = reader.string();
|
|
1726
|
+
continue;
|
|
1727
|
+
}
|
|
1491
1728
|
}
|
|
1492
1729
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1493
1730
|
break;
|
|
@@ -1502,7 +1739,9 @@ var ValidateAccessTokenResponse = {
|
|
|
1502
1739
|
fromJSON(object) {
|
|
1503
1740
|
return {
|
|
1504
1741
|
status: isSet(object.status) ? validateAccessTokenResponse_StatusFromJSON(object.status) : 0,
|
|
1505
|
-
userId: isSet(object.userId) ? globalThis.String(object.userId) : void 0
|
|
1742
|
+
userId: isSet(object.userId) ? globalThis.String(object.userId) : void 0,
|
|
1743
|
+
realm: isSet(object.realm) ? globalThis.String(object.realm) : void 0,
|
|
1744
|
+
homeRealm: isSet(object.homeRealm) ? globalThis.String(object.homeRealm) : void 0
|
|
1506
1745
|
};
|
|
1507
1746
|
},
|
|
1508
1747
|
toJSON(message) {
|
|
@@ -1513,6 +1752,12 @@ var ValidateAccessTokenResponse = {
|
|
|
1513
1752
|
if (message.userId !== void 0) {
|
|
1514
1753
|
obj.userId = message.userId;
|
|
1515
1754
|
}
|
|
1755
|
+
if (message.realm !== void 0) {
|
|
1756
|
+
obj.realm = message.realm;
|
|
1757
|
+
}
|
|
1758
|
+
if (message.homeRealm !== void 0) {
|
|
1759
|
+
obj.homeRealm = message.homeRealm;
|
|
1760
|
+
}
|
|
1516
1761
|
return obj;
|
|
1517
1762
|
},
|
|
1518
1763
|
create(base) {
|
|
@@ -1522,17 +1767,22 @@ var ValidateAccessTokenResponse = {
|
|
|
1522
1767
|
const message = createBaseValidateAccessTokenResponse();
|
|
1523
1768
|
message.status = object.status ?? 0;
|
|
1524
1769
|
message.userId = object.userId ?? void 0;
|
|
1770
|
+
message.realm = object.realm ?? void 0;
|
|
1771
|
+
message.homeRealm = object.homeRealm ?? void 0;
|
|
1525
1772
|
return message;
|
|
1526
1773
|
}
|
|
1527
1774
|
};
|
|
1528
1775
|
function createBaseAnonymousUserCreateRequest() {
|
|
1529
|
-
return { clientId: "" };
|
|
1776
|
+
return { clientId: "", realm: void 0 };
|
|
1530
1777
|
}
|
|
1531
1778
|
var AnonymousUserCreateRequest = {
|
|
1532
1779
|
encode(message, writer = new BinaryWriter2()) {
|
|
1533
1780
|
if (message.clientId !== "") {
|
|
1534
1781
|
writer.uint32(10).string(message.clientId);
|
|
1535
1782
|
}
|
|
1783
|
+
if (message.realm !== void 0) {
|
|
1784
|
+
writer.uint32(18).string(message.realm);
|
|
1785
|
+
}
|
|
1536
1786
|
return writer;
|
|
1537
1787
|
},
|
|
1538
1788
|
decode(input, length) {
|
|
@@ -1555,6 +1805,13 @@ var AnonymousUserCreateRequest = {
|
|
|
1555
1805
|
message.clientId = reader.string();
|
|
1556
1806
|
continue;
|
|
1557
1807
|
}
|
|
1808
|
+
case 2: {
|
|
1809
|
+
if (tag !== 18) {
|
|
1810
|
+
break;
|
|
1811
|
+
}
|
|
1812
|
+
message.realm = reader.string();
|
|
1813
|
+
continue;
|
|
1814
|
+
}
|
|
1558
1815
|
}
|
|
1559
1816
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1560
1817
|
break;
|
|
@@ -1567,13 +1824,19 @@ var AnonymousUserCreateRequest = {
|
|
|
1567
1824
|
}
|
|
1568
1825
|
},
|
|
1569
1826
|
fromJSON(object) {
|
|
1570
|
-
return {
|
|
1827
|
+
return {
|
|
1828
|
+
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
|
|
1829
|
+
realm: isSet(object.realm) ? globalThis.String(object.realm) : void 0
|
|
1830
|
+
};
|
|
1571
1831
|
},
|
|
1572
1832
|
toJSON(message) {
|
|
1573
1833
|
const obj = {};
|
|
1574
1834
|
if (message.clientId !== "") {
|
|
1575
1835
|
obj.clientId = message.clientId;
|
|
1576
1836
|
}
|
|
1837
|
+
if (message.realm !== void 0) {
|
|
1838
|
+
obj.realm = message.realm;
|
|
1839
|
+
}
|
|
1577
1840
|
return obj;
|
|
1578
1841
|
},
|
|
1579
1842
|
create(base) {
|
|
@@ -1582,6 +1845,7 @@ var AnonymousUserCreateRequest = {
|
|
|
1582
1845
|
fromPartial(object) {
|
|
1583
1846
|
const message = createBaseAnonymousUserCreateRequest();
|
|
1584
1847
|
message.clientId = object.clientId ?? "";
|
|
1848
|
+
message.realm = object.realm ?? void 0;
|
|
1585
1849
|
return message;
|
|
1586
1850
|
}
|
|
1587
1851
|
};
|
|
@@ -2148,80 +2412,615 @@ var UpdateTeamRequest = {
|
|
|
2148
2412
|
return message;
|
|
2149
2413
|
}
|
|
2150
2414
|
};
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2415
|
+
function createBaseSetTeamRealmRequest() {
|
|
2416
|
+
return { teamId: "", slug: "", settingsJson: void 0, force: false };
|
|
2417
|
+
}
|
|
2418
|
+
var SetTeamRealmRequest = {
|
|
2419
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
2420
|
+
if (message.teamId !== "") {
|
|
2421
|
+
writer.uint32(10).string(message.teamId);
|
|
2422
|
+
}
|
|
2423
|
+
if (message.slug !== "") {
|
|
2424
|
+
writer.uint32(18).string(message.slug);
|
|
2425
|
+
}
|
|
2426
|
+
if (message.settingsJson !== void 0) {
|
|
2427
|
+
writer.uint32(26).string(message.settingsJson);
|
|
2428
|
+
}
|
|
2429
|
+
if (message.force !== false) {
|
|
2430
|
+
writer.uint32(32).bool(message.force);
|
|
2431
|
+
}
|
|
2432
|
+
return writer;
|
|
2433
|
+
},
|
|
2434
|
+
decode(input, length) {
|
|
2435
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
2436
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
2437
|
+
if (previousRecursionDepth >= 100) {
|
|
2438
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2439
|
+
}
|
|
2440
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2441
|
+
try {
|
|
2442
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2443
|
+
const message = createBaseSetTeamRealmRequest();
|
|
2444
|
+
while (reader.pos < end) {
|
|
2445
|
+
const tag = reader.uint32();
|
|
2446
|
+
switch (tag >>> 3) {
|
|
2447
|
+
case 1: {
|
|
2448
|
+
if (tag !== 10) {
|
|
2449
|
+
break;
|
|
2450
|
+
}
|
|
2451
|
+
message.teamId = reader.string();
|
|
2452
|
+
continue;
|
|
2453
|
+
}
|
|
2454
|
+
case 2: {
|
|
2455
|
+
if (tag !== 18) {
|
|
2456
|
+
break;
|
|
2457
|
+
}
|
|
2458
|
+
message.slug = reader.string();
|
|
2459
|
+
continue;
|
|
2460
|
+
}
|
|
2461
|
+
case 3: {
|
|
2462
|
+
if (tag !== 26) {
|
|
2463
|
+
break;
|
|
2464
|
+
}
|
|
2465
|
+
message.settingsJson = reader.string();
|
|
2466
|
+
continue;
|
|
2467
|
+
}
|
|
2468
|
+
case 4: {
|
|
2469
|
+
if (tag !== 32) {
|
|
2470
|
+
break;
|
|
2471
|
+
}
|
|
2472
|
+
message.force = reader.bool();
|
|
2473
|
+
continue;
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2477
|
+
break;
|
|
2478
|
+
}
|
|
2479
|
+
reader.skip(tag & 7);
|
|
2480
|
+
}
|
|
2481
|
+
return message;
|
|
2482
|
+
} finally {
|
|
2483
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2484
|
+
}
|
|
2485
|
+
},
|
|
2486
|
+
fromJSON(object) {
|
|
2487
|
+
return {
|
|
2488
|
+
teamId: isSet(object.teamId) ? globalThis.String(object.teamId) : "",
|
|
2489
|
+
slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
|
|
2490
|
+
settingsJson: isSet(object.settingsJson) ? globalThis.String(object.settingsJson) : void 0,
|
|
2491
|
+
force: isSet(object.force) ? globalThis.Boolean(object.force) : false
|
|
2492
|
+
};
|
|
2493
|
+
},
|
|
2494
|
+
toJSON(message) {
|
|
2495
|
+
const obj = {};
|
|
2496
|
+
if (message.teamId !== "") {
|
|
2497
|
+
obj.teamId = message.teamId;
|
|
2498
|
+
}
|
|
2499
|
+
if (message.slug !== "") {
|
|
2500
|
+
obj.slug = message.slug;
|
|
2501
|
+
}
|
|
2502
|
+
if (message.settingsJson !== void 0) {
|
|
2503
|
+
obj.settingsJson = message.settingsJson;
|
|
2504
|
+
}
|
|
2505
|
+
if (message.force !== false) {
|
|
2506
|
+
obj.force = message.force;
|
|
2507
|
+
}
|
|
2508
|
+
return obj;
|
|
2509
|
+
},
|
|
2510
|
+
create(base) {
|
|
2511
|
+
return SetTeamRealmRequest.fromPartial(base ?? {});
|
|
2512
|
+
},
|
|
2513
|
+
fromPartial(object) {
|
|
2514
|
+
const message = createBaseSetTeamRealmRequest();
|
|
2515
|
+
message.teamId = object.teamId ?? "";
|
|
2516
|
+
message.slug = object.slug ?? "";
|
|
2517
|
+
message.settingsJson = object.settingsJson ?? void 0;
|
|
2518
|
+
message.force = object.force ?? false;
|
|
2519
|
+
return message;
|
|
2520
|
+
}
|
|
2521
|
+
};
|
|
2522
|
+
function createBaseGetRealmSettingsRequest() {
|
|
2523
|
+
return { teamId: "" };
|
|
2524
|
+
}
|
|
2525
|
+
var GetRealmSettingsRequest = {
|
|
2526
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
2527
|
+
if (message.teamId !== "") {
|
|
2528
|
+
writer.uint32(10).string(message.teamId);
|
|
2529
|
+
}
|
|
2530
|
+
return writer;
|
|
2531
|
+
},
|
|
2532
|
+
decode(input, length) {
|
|
2533
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
2534
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
2535
|
+
if (previousRecursionDepth >= 100) {
|
|
2536
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2537
|
+
}
|
|
2538
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2539
|
+
try {
|
|
2540
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2541
|
+
const message = createBaseGetRealmSettingsRequest();
|
|
2542
|
+
while (reader.pos < end) {
|
|
2543
|
+
const tag = reader.uint32();
|
|
2544
|
+
switch (tag >>> 3) {
|
|
2545
|
+
case 1: {
|
|
2546
|
+
if (tag !== 10) {
|
|
2547
|
+
break;
|
|
2548
|
+
}
|
|
2549
|
+
message.teamId = reader.string();
|
|
2550
|
+
continue;
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2554
|
+
break;
|
|
2555
|
+
}
|
|
2556
|
+
reader.skip(tag & 7);
|
|
2557
|
+
}
|
|
2558
|
+
return message;
|
|
2559
|
+
} finally {
|
|
2560
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2561
|
+
}
|
|
2562
|
+
},
|
|
2563
|
+
fromJSON(object) {
|
|
2564
|
+
return { teamId: isSet(object.teamId) ? globalThis.String(object.teamId) : "" };
|
|
2565
|
+
},
|
|
2566
|
+
toJSON(message) {
|
|
2567
|
+
const obj = {};
|
|
2568
|
+
if (message.teamId !== "") {
|
|
2569
|
+
obj.teamId = message.teamId;
|
|
2570
|
+
}
|
|
2571
|
+
return obj;
|
|
2572
|
+
},
|
|
2573
|
+
create(base) {
|
|
2574
|
+
return GetRealmSettingsRequest.fromPartial(base ?? {});
|
|
2575
|
+
},
|
|
2576
|
+
fromPartial(object) {
|
|
2577
|
+
const message = createBaseGetRealmSettingsRequest();
|
|
2578
|
+
message.teamId = object.teamId ?? "";
|
|
2579
|
+
return message;
|
|
2580
|
+
}
|
|
2581
|
+
};
|
|
2582
|
+
function createBaseRealmResponse() {
|
|
2583
|
+
return { team: void 0, settingsJson: "", homeCount: 0, guestCount: 0 };
|
|
2584
|
+
}
|
|
2585
|
+
var RealmResponse = {
|
|
2586
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
2587
|
+
if (message.team !== void 0) {
|
|
2588
|
+
Team.encode(message.team, writer.uint32(10).fork()).join();
|
|
2589
|
+
}
|
|
2590
|
+
if (message.settingsJson !== "") {
|
|
2591
|
+
writer.uint32(18).string(message.settingsJson);
|
|
2592
|
+
}
|
|
2593
|
+
if (message.homeCount !== 0) {
|
|
2594
|
+
writer.uint32(24).int32(message.homeCount);
|
|
2595
|
+
}
|
|
2596
|
+
if (message.guestCount !== 0) {
|
|
2597
|
+
writer.uint32(32).int32(message.guestCount);
|
|
2598
|
+
}
|
|
2599
|
+
return writer;
|
|
2600
|
+
},
|
|
2601
|
+
decode(input, length) {
|
|
2602
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
2603
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
2604
|
+
if (previousRecursionDepth >= 100) {
|
|
2605
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2606
|
+
}
|
|
2607
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2608
|
+
try {
|
|
2609
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2610
|
+
const message = createBaseRealmResponse();
|
|
2611
|
+
while (reader.pos < end) {
|
|
2612
|
+
const tag = reader.uint32();
|
|
2613
|
+
switch (tag >>> 3) {
|
|
2614
|
+
case 1: {
|
|
2615
|
+
if (tag !== 10) {
|
|
2616
|
+
break;
|
|
2617
|
+
}
|
|
2618
|
+
message.team = Team.decode(reader, reader.uint32());
|
|
2619
|
+
continue;
|
|
2620
|
+
}
|
|
2621
|
+
case 2: {
|
|
2622
|
+
if (tag !== 18) {
|
|
2623
|
+
break;
|
|
2624
|
+
}
|
|
2625
|
+
message.settingsJson = reader.string();
|
|
2626
|
+
continue;
|
|
2627
|
+
}
|
|
2628
|
+
case 3: {
|
|
2629
|
+
if (tag !== 24) {
|
|
2630
|
+
break;
|
|
2631
|
+
}
|
|
2632
|
+
message.homeCount = reader.int32();
|
|
2633
|
+
continue;
|
|
2634
|
+
}
|
|
2635
|
+
case 4: {
|
|
2636
|
+
if (tag !== 32) {
|
|
2637
|
+
break;
|
|
2638
|
+
}
|
|
2639
|
+
message.guestCount = reader.int32();
|
|
2640
|
+
continue;
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2644
|
+
break;
|
|
2645
|
+
}
|
|
2646
|
+
reader.skip(tag & 7);
|
|
2647
|
+
}
|
|
2648
|
+
return message;
|
|
2649
|
+
} finally {
|
|
2650
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
fromJSON(object) {
|
|
2654
|
+
return {
|
|
2655
|
+
team: isSet(object.team) ? Team.fromJSON(object.team) : void 0,
|
|
2656
|
+
settingsJson: isSet(object.settingsJson) ? globalThis.String(object.settingsJson) : "",
|
|
2657
|
+
homeCount: isSet(object.homeCount) ? globalThis.Number(object.homeCount) : 0,
|
|
2658
|
+
guestCount: isSet(object.guestCount) ? globalThis.Number(object.guestCount) : 0
|
|
2659
|
+
};
|
|
2660
|
+
},
|
|
2661
|
+
toJSON(message) {
|
|
2662
|
+
const obj = {};
|
|
2663
|
+
if (message.team !== void 0) {
|
|
2664
|
+
obj.team = Team.toJSON(message.team);
|
|
2665
|
+
}
|
|
2666
|
+
if (message.settingsJson !== "") {
|
|
2667
|
+
obj.settingsJson = message.settingsJson;
|
|
2668
|
+
}
|
|
2669
|
+
if (message.homeCount !== 0) {
|
|
2670
|
+
obj.homeCount = Math.round(message.homeCount);
|
|
2671
|
+
}
|
|
2672
|
+
if (message.guestCount !== 0) {
|
|
2673
|
+
obj.guestCount = Math.round(message.guestCount);
|
|
2674
|
+
}
|
|
2675
|
+
return obj;
|
|
2676
|
+
},
|
|
2677
|
+
create(base) {
|
|
2678
|
+
return RealmResponse.fromPartial(base ?? {});
|
|
2679
|
+
},
|
|
2680
|
+
fromPartial(object) {
|
|
2681
|
+
const message = createBaseRealmResponse();
|
|
2682
|
+
message.team = object.team !== void 0 && object.team !== null ? Team.fromPartial(object.team) : void 0;
|
|
2683
|
+
message.settingsJson = object.settingsJson ?? "";
|
|
2684
|
+
message.homeCount = object.homeCount ?? 0;
|
|
2685
|
+
message.guestCount = object.guestCount ?? 0;
|
|
2686
|
+
return message;
|
|
2687
|
+
}
|
|
2688
|
+
};
|
|
2689
|
+
function createBaseUnsetTeamRealmRequest() {
|
|
2690
|
+
return { teamId: "", force: false };
|
|
2691
|
+
}
|
|
2692
|
+
var UnsetTeamRealmRequest = {
|
|
2693
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
2694
|
+
if (message.teamId !== "") {
|
|
2695
|
+
writer.uint32(10).string(message.teamId);
|
|
2696
|
+
}
|
|
2697
|
+
if (message.force !== false) {
|
|
2698
|
+
writer.uint32(16).bool(message.force);
|
|
2699
|
+
}
|
|
2700
|
+
return writer;
|
|
2701
|
+
},
|
|
2702
|
+
decode(input, length) {
|
|
2703
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
2704
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
2705
|
+
if (previousRecursionDepth >= 100) {
|
|
2706
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2707
|
+
}
|
|
2708
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2709
|
+
try {
|
|
2710
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2711
|
+
const message = createBaseUnsetTeamRealmRequest();
|
|
2712
|
+
while (reader.pos < end) {
|
|
2713
|
+
const tag = reader.uint32();
|
|
2714
|
+
switch (tag >>> 3) {
|
|
2715
|
+
case 1: {
|
|
2716
|
+
if (tag !== 10) {
|
|
2717
|
+
break;
|
|
2718
|
+
}
|
|
2719
|
+
message.teamId = reader.string();
|
|
2720
|
+
continue;
|
|
2721
|
+
}
|
|
2722
|
+
case 2: {
|
|
2723
|
+
if (tag !== 16) {
|
|
2724
|
+
break;
|
|
2725
|
+
}
|
|
2726
|
+
message.force = reader.bool();
|
|
2727
|
+
continue;
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2731
|
+
break;
|
|
2732
|
+
}
|
|
2733
|
+
reader.skip(tag & 7);
|
|
2734
|
+
}
|
|
2735
|
+
return message;
|
|
2736
|
+
} finally {
|
|
2737
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2738
|
+
}
|
|
2739
|
+
},
|
|
2740
|
+
fromJSON(object) {
|
|
2741
|
+
return {
|
|
2742
|
+
teamId: isSet(object.teamId) ? globalThis.String(object.teamId) : "",
|
|
2743
|
+
force: isSet(object.force) ? globalThis.Boolean(object.force) : false
|
|
2744
|
+
};
|
|
2745
|
+
},
|
|
2746
|
+
toJSON(message) {
|
|
2747
|
+
const obj = {};
|
|
2748
|
+
if (message.teamId !== "") {
|
|
2749
|
+
obj.teamId = message.teamId;
|
|
2750
|
+
}
|
|
2751
|
+
if (message.force !== false) {
|
|
2752
|
+
obj.force = message.force;
|
|
2753
|
+
}
|
|
2754
|
+
return obj;
|
|
2755
|
+
},
|
|
2756
|
+
create(base) {
|
|
2757
|
+
return UnsetTeamRealmRequest.fromPartial(base ?? {});
|
|
2758
|
+
},
|
|
2759
|
+
fromPartial(object) {
|
|
2760
|
+
const message = createBaseUnsetTeamRealmRequest();
|
|
2761
|
+
message.teamId = object.teamId ?? "";
|
|
2762
|
+
message.force = object.force ?? false;
|
|
2763
|
+
return message;
|
|
2764
|
+
}
|
|
2765
|
+
};
|
|
2766
|
+
function createBaseUnsetTeamRealmResponse() {
|
|
2767
|
+
return { message: "", blockedUsers: 0 };
|
|
2768
|
+
}
|
|
2769
|
+
var UnsetTeamRealmResponse = {
|
|
2770
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
2771
|
+
if (message.message !== "") {
|
|
2772
|
+
writer.uint32(10).string(message.message);
|
|
2773
|
+
}
|
|
2774
|
+
if (message.blockedUsers !== 0) {
|
|
2775
|
+
writer.uint32(16).int32(message.blockedUsers);
|
|
2776
|
+
}
|
|
2777
|
+
return writer;
|
|
2778
|
+
},
|
|
2779
|
+
decode(input, length) {
|
|
2780
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
2781
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
2782
|
+
if (previousRecursionDepth >= 100) {
|
|
2783
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2784
|
+
}
|
|
2785
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2786
|
+
try {
|
|
2787
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2788
|
+
const message = createBaseUnsetTeamRealmResponse();
|
|
2789
|
+
while (reader.pos < end) {
|
|
2790
|
+
const tag = reader.uint32();
|
|
2791
|
+
switch (tag >>> 3) {
|
|
2792
|
+
case 1: {
|
|
2793
|
+
if (tag !== 10) {
|
|
2794
|
+
break;
|
|
2795
|
+
}
|
|
2796
|
+
message.message = reader.string();
|
|
2797
|
+
continue;
|
|
2798
|
+
}
|
|
2799
|
+
case 2: {
|
|
2800
|
+
if (tag !== 16) {
|
|
2801
|
+
break;
|
|
2802
|
+
}
|
|
2803
|
+
message.blockedUsers = reader.int32();
|
|
2804
|
+
continue;
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
reader.skip(tag & 7);
|
|
2811
|
+
}
|
|
2812
|
+
return message;
|
|
2813
|
+
} finally {
|
|
2814
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2815
|
+
}
|
|
2816
|
+
},
|
|
2817
|
+
fromJSON(object) {
|
|
2818
|
+
return {
|
|
2819
|
+
message: isSet(object.message) ? globalThis.String(object.message) : "",
|
|
2820
|
+
blockedUsers: isSet(object.blockedUsers) ? globalThis.Number(object.blockedUsers) : 0
|
|
2821
|
+
};
|
|
2822
|
+
},
|
|
2823
|
+
toJSON(message) {
|
|
2824
|
+
const obj = {};
|
|
2825
|
+
if (message.message !== "") {
|
|
2826
|
+
obj.message = message.message;
|
|
2827
|
+
}
|
|
2828
|
+
if (message.blockedUsers !== 0) {
|
|
2829
|
+
obj.blockedUsers = Math.round(message.blockedUsers);
|
|
2830
|
+
}
|
|
2831
|
+
return obj;
|
|
2832
|
+
},
|
|
2833
|
+
create(base) {
|
|
2834
|
+
return UnsetTeamRealmResponse.fromPartial(base ?? {});
|
|
2835
|
+
},
|
|
2836
|
+
fromPartial(object) {
|
|
2837
|
+
const message = createBaseUnsetTeamRealmResponse();
|
|
2838
|
+
message.message = object.message ?? "";
|
|
2839
|
+
message.blockedUsers = object.blockedUsers ?? 0;
|
|
2840
|
+
return message;
|
|
2841
|
+
}
|
|
2842
|
+
};
|
|
2843
|
+
function createBaseRealmMembershipRequest() {
|
|
2844
|
+
return { teamId: "", userId: "", type: "", force: false };
|
|
2845
|
+
}
|
|
2846
|
+
var RealmMembershipRequest = {
|
|
2847
|
+
encode(message, writer = new BinaryWriter2()) {
|
|
2848
|
+
if (message.teamId !== "") {
|
|
2849
|
+
writer.uint32(10).string(message.teamId);
|
|
2850
|
+
}
|
|
2851
|
+
if (message.userId !== "") {
|
|
2852
|
+
writer.uint32(18).string(message.userId);
|
|
2853
|
+
}
|
|
2854
|
+
if (message.type !== "") {
|
|
2855
|
+
writer.uint32(26).string(message.type);
|
|
2856
|
+
}
|
|
2857
|
+
if (message.force !== false) {
|
|
2858
|
+
writer.uint32(32).bool(message.force);
|
|
2859
|
+
}
|
|
2860
|
+
return writer;
|
|
2861
|
+
},
|
|
2862
|
+
decode(input, length) {
|
|
2863
|
+
const reader = input instanceof BinaryReader2 ? input : new BinaryReader2(input);
|
|
2864
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
2865
|
+
if (previousRecursionDepth >= 100) {
|
|
2866
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2867
|
+
}
|
|
2868
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2869
|
+
try {
|
|
2870
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2871
|
+
const message = createBaseRealmMembershipRequest();
|
|
2872
|
+
while (reader.pos < end) {
|
|
2873
|
+
const tag = reader.uint32();
|
|
2874
|
+
switch (tag >>> 3) {
|
|
2875
|
+
case 1: {
|
|
2876
|
+
if (tag !== 10) {
|
|
2877
|
+
break;
|
|
2878
|
+
}
|
|
2879
|
+
message.teamId = reader.string();
|
|
2880
|
+
continue;
|
|
2881
|
+
}
|
|
2882
|
+
case 2: {
|
|
2883
|
+
if (tag !== 18) {
|
|
2884
|
+
break;
|
|
2885
|
+
}
|
|
2886
|
+
message.userId = reader.string();
|
|
2887
|
+
continue;
|
|
2888
|
+
}
|
|
2889
|
+
case 3: {
|
|
2890
|
+
if (tag !== 26) {
|
|
2891
|
+
break;
|
|
2892
|
+
}
|
|
2893
|
+
message.type = reader.string();
|
|
2894
|
+
continue;
|
|
2895
|
+
}
|
|
2896
|
+
case 4: {
|
|
2897
|
+
if (tag !== 32) {
|
|
2898
|
+
break;
|
|
2899
|
+
}
|
|
2900
|
+
message.force = reader.bool();
|
|
2901
|
+
continue;
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2905
|
+
break;
|
|
2906
|
+
}
|
|
2907
|
+
reader.skip(tag & 7);
|
|
2908
|
+
}
|
|
2909
|
+
return message;
|
|
2910
|
+
} finally {
|
|
2911
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2912
|
+
}
|
|
2913
|
+
},
|
|
2914
|
+
fromJSON(object) {
|
|
2915
|
+
return {
|
|
2916
|
+
teamId: isSet(object.teamId) ? globalThis.String(object.teamId) : "",
|
|
2917
|
+
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
|
|
2918
|
+
type: isSet(object.type) ? globalThis.String(object.type) : "",
|
|
2919
|
+
force: isSet(object.force) ? globalThis.Boolean(object.force) : false
|
|
2920
|
+
};
|
|
2921
|
+
},
|
|
2922
|
+
toJSON(message) {
|
|
2923
|
+
const obj = {};
|
|
2924
|
+
if (message.teamId !== "") {
|
|
2925
|
+
obj.teamId = message.teamId;
|
|
2926
|
+
}
|
|
2927
|
+
if (message.userId !== "") {
|
|
2928
|
+
obj.userId = message.userId;
|
|
2929
|
+
}
|
|
2930
|
+
if (message.type !== "") {
|
|
2931
|
+
obj.type = message.type;
|
|
2932
|
+
}
|
|
2933
|
+
if (message.force !== false) {
|
|
2934
|
+
obj.force = message.force;
|
|
2935
|
+
}
|
|
2936
|
+
return obj;
|
|
2937
|
+
},
|
|
2938
|
+
create(base) {
|
|
2939
|
+
return RealmMembershipRequest.fromPartial(base ?? {});
|
|
2940
|
+
},
|
|
2941
|
+
fromPartial(object) {
|
|
2942
|
+
const message = createBaseRealmMembershipRequest();
|
|
2943
|
+
message.teamId = object.teamId ?? "";
|
|
2944
|
+
message.userId = object.userId ?? "";
|
|
2945
|
+
message.type = object.type ?? "";
|
|
2946
|
+
message.force = object.force ?? false;
|
|
2947
|
+
return message;
|
|
2948
|
+
}
|
|
2949
|
+
};
|
|
2950
|
+
var AuthenticationDefinition = {
|
|
2951
|
+
name: "Authentication",
|
|
2952
|
+
fullName: "authentication.Authentication",
|
|
2953
|
+
methods: {
|
|
2954
|
+
userLogin: {
|
|
2955
|
+
name: "UserLogin",
|
|
2956
|
+
requestType: UserLoginRequest,
|
|
2957
|
+
requestStream: false,
|
|
2958
|
+
responseType: UserLoginResponse,
|
|
2959
|
+
responseStream: false,
|
|
2960
|
+
options: {}
|
|
2961
|
+
},
|
|
2962
|
+
userCreate: {
|
|
2963
|
+
name: "UserCreate",
|
|
2964
|
+
requestType: UserCreateRequest,
|
|
2965
|
+
requestStream: false,
|
|
2966
|
+
responseType: UserCreateResponse,
|
|
2967
|
+
responseStream: false,
|
|
2968
|
+
options: {}
|
|
2969
|
+
},
|
|
2970
|
+
userCreateByUsername: {
|
|
2971
|
+
name: "UserCreateByUsername",
|
|
2972
|
+
requestType: UserCreateByUsernameRequest,
|
|
2973
|
+
requestStream: false,
|
|
2974
|
+
responseType: UserCreateResponse,
|
|
2975
|
+
responseStream: false,
|
|
2976
|
+
options: {}
|
|
2977
|
+
},
|
|
2978
|
+
userModifyStatus: {
|
|
2979
|
+
name: "UserModifyStatus",
|
|
2980
|
+
requestType: UserModifyStatusRequest,
|
|
2981
|
+
requestStream: false,
|
|
2982
|
+
responseType: UserModifyStatusResponse,
|
|
2983
|
+
responseStream: false,
|
|
2984
|
+
options: {}
|
|
2985
|
+
},
|
|
2986
|
+
anonymousUserCreate: {
|
|
2987
|
+
name: "AnonymousUserCreate",
|
|
2988
|
+
requestType: AnonymousUserCreateRequest,
|
|
2989
|
+
requestStream: false,
|
|
2990
|
+
responseType: UserLoginResponse,
|
|
2991
|
+
responseStream: false,
|
|
2992
|
+
options: {}
|
|
2993
|
+
},
|
|
2994
|
+
changePass: {
|
|
2995
|
+
name: "ChangePass",
|
|
2996
|
+
requestType: UserChangePass,
|
|
2997
|
+
requestStream: false,
|
|
2998
|
+
responseType: UserCreateResponse,
|
|
2999
|
+
responseStream: false,
|
|
3000
|
+
options: {}
|
|
3001
|
+
},
|
|
3002
|
+
changeEmail: {
|
|
3003
|
+
name: "ChangeEmail",
|
|
3004
|
+
requestType: UserChangeEmail,
|
|
3005
|
+
requestStream: false,
|
|
3006
|
+
responseType: UserChangeEmailResponse,
|
|
3007
|
+
responseStream: false,
|
|
3008
|
+
options: {}
|
|
3009
|
+
},
|
|
3010
|
+
userDelete: {
|
|
3011
|
+
name: "UserDelete",
|
|
3012
|
+
requestType: UserDeleteRequest,
|
|
3013
|
+
requestStream: false,
|
|
3014
|
+
responseType: UserDeleteResponse,
|
|
3015
|
+
responseStream: false,
|
|
3016
|
+
options: {}
|
|
3017
|
+
},
|
|
3018
|
+
getTeam: {
|
|
3019
|
+
name: "GetTeam",
|
|
3020
|
+
requestType: GetTeamRequest,
|
|
3021
|
+
requestStream: false,
|
|
3022
|
+
responseType: Team,
|
|
3023
|
+
responseStream: false,
|
|
2225
3024
|
options: {}
|
|
2226
3025
|
},
|
|
2227
3026
|
createTeam: {
|
|
@@ -2256,6 +3055,14 @@ var AuthenticationDefinition = {
|
|
|
2256
3055
|
responseStream: false,
|
|
2257
3056
|
options: {}
|
|
2258
3057
|
},
|
|
3058
|
+
getUser: {
|
|
3059
|
+
name: "GetUser",
|
|
3060
|
+
requestType: GetUserRequest,
|
|
3061
|
+
requestStream: false,
|
|
3062
|
+
responseType: GetUserResponse,
|
|
3063
|
+
responseStream: false,
|
|
3064
|
+
options: {}
|
|
3065
|
+
},
|
|
2259
3066
|
validateAccessToken: {
|
|
2260
3067
|
name: "ValidateAccessToken",
|
|
2261
3068
|
requestType: ValidateAccessTokenRequest,
|
|
@@ -2287,6 +3094,46 @@ var AuthenticationDefinition = {
|
|
|
2287
3094
|
responseType: Team,
|
|
2288
3095
|
responseStream: false,
|
|
2289
3096
|
options: {}
|
|
3097
|
+
},
|
|
3098
|
+
setTeamRealm: {
|
|
3099
|
+
name: "SetTeamRealm",
|
|
3100
|
+
requestType: SetTeamRealmRequest,
|
|
3101
|
+
requestStream: false,
|
|
3102
|
+
responseType: RealmResponse,
|
|
3103
|
+
responseStream: false,
|
|
3104
|
+
options: {}
|
|
3105
|
+
},
|
|
3106
|
+
getRealmSettings: {
|
|
3107
|
+
name: "GetRealmSettings",
|
|
3108
|
+
requestType: GetRealmSettingsRequest,
|
|
3109
|
+
requestStream: false,
|
|
3110
|
+
responseType: RealmResponse,
|
|
3111
|
+
responseStream: false,
|
|
3112
|
+
options: {}
|
|
3113
|
+
},
|
|
3114
|
+
unsetTeamRealm: {
|
|
3115
|
+
name: "UnsetTeamRealm",
|
|
3116
|
+
requestType: UnsetTeamRealmRequest,
|
|
3117
|
+
requestStream: false,
|
|
3118
|
+
responseType: UnsetTeamRealmResponse,
|
|
3119
|
+
responseStream: false,
|
|
3120
|
+
options: {}
|
|
3121
|
+
},
|
|
3122
|
+
grantRealmMembership: {
|
|
3123
|
+
name: "GrantRealmMembership",
|
|
3124
|
+
requestType: RealmMembershipRequest,
|
|
3125
|
+
requestStream: false,
|
|
3126
|
+
responseType: Empty,
|
|
3127
|
+
responseStream: false,
|
|
3128
|
+
options: {}
|
|
3129
|
+
},
|
|
3130
|
+
revokeRealmMembership: {
|
|
3131
|
+
name: "RevokeRealmMembership",
|
|
3132
|
+
requestType: RealmMembershipRequest,
|
|
3133
|
+
requestStream: false,
|
|
3134
|
+
responseType: Empty,
|
|
3135
|
+
responseStream: false,
|
|
3136
|
+
options: {}
|
|
2290
3137
|
}
|
|
2291
3138
|
}
|
|
2292
3139
|
};
|
|
@@ -3035,21 +3882,230 @@ var FindRelationRequest = {
|
|
|
3035
3882
|
if (tag !== 18) {
|
|
3036
3883
|
break;
|
|
3037
3884
|
}
|
|
3038
|
-
message.relation = reader.string();
|
|
3039
|
-
continue;
|
|
3040
|
-
}
|
|
3041
|
-
case 3: {
|
|
3042
|
-
if (tag !== 26) {
|
|
3043
|
-
break;
|
|
3044
|
-
}
|
|
3045
|
-
message.resource = reader.string();
|
|
3046
|
-
continue;
|
|
3047
|
-
}
|
|
3048
|
-
case 4: {
|
|
3049
|
-
if (tag !== 34) {
|
|
3050
|
-
break;
|
|
3051
|
-
}
|
|
3052
|
-
message.subjectType = reader.string();
|
|
3885
|
+
message.relation = reader.string();
|
|
3886
|
+
continue;
|
|
3887
|
+
}
|
|
3888
|
+
case 3: {
|
|
3889
|
+
if (tag !== 26) {
|
|
3890
|
+
break;
|
|
3891
|
+
}
|
|
3892
|
+
message.resource = reader.string();
|
|
3893
|
+
continue;
|
|
3894
|
+
}
|
|
3895
|
+
case 4: {
|
|
3896
|
+
if (tag !== 34) {
|
|
3897
|
+
break;
|
|
3898
|
+
}
|
|
3899
|
+
message.subjectType = reader.string();
|
|
3900
|
+
continue;
|
|
3901
|
+
}
|
|
3902
|
+
case 5: {
|
|
3903
|
+
if (tag !== 42) {
|
|
3904
|
+
break;
|
|
3905
|
+
}
|
|
3906
|
+
message.resourceType = reader.string();
|
|
3907
|
+
continue;
|
|
3908
|
+
}
|
|
3909
|
+
case 6: {
|
|
3910
|
+
if (tag !== 48) {
|
|
3911
|
+
break;
|
|
3912
|
+
}
|
|
3913
|
+
message.skip = reader.int32();
|
|
3914
|
+
continue;
|
|
3915
|
+
}
|
|
3916
|
+
case 7: {
|
|
3917
|
+
if (tag !== 56) {
|
|
3918
|
+
break;
|
|
3919
|
+
}
|
|
3920
|
+
message.limit = reader.int32();
|
|
3921
|
+
continue;
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3925
|
+
break;
|
|
3926
|
+
}
|
|
3927
|
+
reader.skip(tag & 7);
|
|
3928
|
+
}
|
|
3929
|
+
return message;
|
|
3930
|
+
} finally {
|
|
3931
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3932
|
+
}
|
|
3933
|
+
},
|
|
3934
|
+
fromJSON(object) {
|
|
3935
|
+
return {
|
|
3936
|
+
subject: isSet2(object.subject) ? globalThis.String(object.subject) : void 0,
|
|
3937
|
+
relation: isSet2(object.relation) ? globalThis.String(object.relation) : void 0,
|
|
3938
|
+
resource: isSet2(object.resource) ? globalThis.String(object.resource) : void 0,
|
|
3939
|
+
subjectType: isSet2(object.subjectType) ? globalThis.String(object.subjectType) : void 0,
|
|
3940
|
+
resourceType: isSet2(object.resourceType) ? globalThis.String(object.resourceType) : void 0,
|
|
3941
|
+
skip: isSet2(object.skip) ? globalThis.Number(object.skip) : void 0,
|
|
3942
|
+
limit: isSet2(object.limit) ? globalThis.Number(object.limit) : void 0
|
|
3943
|
+
};
|
|
3944
|
+
},
|
|
3945
|
+
toJSON(message) {
|
|
3946
|
+
const obj = {};
|
|
3947
|
+
if (message.subject !== void 0) {
|
|
3948
|
+
obj.subject = message.subject;
|
|
3949
|
+
}
|
|
3950
|
+
if (message.relation !== void 0) {
|
|
3951
|
+
obj.relation = message.relation;
|
|
3952
|
+
}
|
|
3953
|
+
if (message.resource !== void 0) {
|
|
3954
|
+
obj.resource = message.resource;
|
|
3955
|
+
}
|
|
3956
|
+
if (message.subjectType !== void 0) {
|
|
3957
|
+
obj.subjectType = message.subjectType;
|
|
3958
|
+
}
|
|
3959
|
+
if (message.resourceType !== void 0) {
|
|
3960
|
+
obj.resourceType = message.resourceType;
|
|
3961
|
+
}
|
|
3962
|
+
if (message.skip !== void 0) {
|
|
3963
|
+
obj.skip = Math.round(message.skip);
|
|
3964
|
+
}
|
|
3965
|
+
if (message.limit !== void 0) {
|
|
3966
|
+
obj.limit = Math.round(message.limit);
|
|
3967
|
+
}
|
|
3968
|
+
return obj;
|
|
3969
|
+
},
|
|
3970
|
+
create(base) {
|
|
3971
|
+
return FindRelationRequest.fromPartial(base ?? {});
|
|
3972
|
+
},
|
|
3973
|
+
fromPartial(object) {
|
|
3974
|
+
const message = createBaseFindRelationRequest();
|
|
3975
|
+
message.subject = object.subject ?? void 0;
|
|
3976
|
+
message.relation = object.relation ?? void 0;
|
|
3977
|
+
message.resource = object.resource ?? void 0;
|
|
3978
|
+
message.subjectType = object.subjectType ?? void 0;
|
|
3979
|
+
message.resourceType = object.resourceType ?? void 0;
|
|
3980
|
+
message.skip = object.skip ?? void 0;
|
|
3981
|
+
message.limit = object.limit ?? void 0;
|
|
3982
|
+
return message;
|
|
3983
|
+
}
|
|
3984
|
+
};
|
|
3985
|
+
function createBaseFindRelationResponse() {
|
|
3986
|
+
return { relations: [], count: 0 };
|
|
3987
|
+
}
|
|
3988
|
+
var FindRelationResponse = {
|
|
3989
|
+
encode(message, writer = new BinaryWriter3()) {
|
|
3990
|
+
for (const v of message.relations) {
|
|
3991
|
+
Relation.encode(v, writer.uint32(10).fork()).join();
|
|
3992
|
+
}
|
|
3993
|
+
if (message.count !== 0) {
|
|
3994
|
+
writer.uint32(16).int32(message.count);
|
|
3995
|
+
}
|
|
3996
|
+
return writer;
|
|
3997
|
+
},
|
|
3998
|
+
decode(input, length) {
|
|
3999
|
+
const reader = input instanceof BinaryReader3 ? input : new BinaryReader3(input);
|
|
4000
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
4001
|
+
if (previousRecursionDepth >= 100) {
|
|
4002
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4003
|
+
}
|
|
4004
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4005
|
+
try {
|
|
4006
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
4007
|
+
const message = createBaseFindRelationResponse();
|
|
4008
|
+
while (reader.pos < end) {
|
|
4009
|
+
const tag = reader.uint32();
|
|
4010
|
+
switch (tag >>> 3) {
|
|
4011
|
+
case 1: {
|
|
4012
|
+
if (tag !== 10) {
|
|
4013
|
+
break;
|
|
4014
|
+
}
|
|
4015
|
+
message.relations.push(Relation.decode(reader, reader.uint32()));
|
|
4016
|
+
continue;
|
|
4017
|
+
}
|
|
4018
|
+
case 2: {
|
|
4019
|
+
if (tag !== 16) {
|
|
4020
|
+
break;
|
|
4021
|
+
}
|
|
4022
|
+
message.count = reader.int32();
|
|
4023
|
+
continue;
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4027
|
+
break;
|
|
4028
|
+
}
|
|
4029
|
+
reader.skip(tag & 7);
|
|
4030
|
+
}
|
|
4031
|
+
return message;
|
|
4032
|
+
} finally {
|
|
4033
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4034
|
+
}
|
|
4035
|
+
},
|
|
4036
|
+
fromJSON(object) {
|
|
4037
|
+
return {
|
|
4038
|
+
relations: globalThis.Array.isArray(object?.relations) ? object.relations.map((e) => Relation.fromJSON(e)) : [],
|
|
4039
|
+
count: isSet2(object.count) ? globalThis.Number(object.count) : 0
|
|
4040
|
+
};
|
|
4041
|
+
},
|
|
4042
|
+
toJSON(message) {
|
|
4043
|
+
const obj = {};
|
|
4044
|
+
if (message.relations?.length) {
|
|
4045
|
+
obj.relations = message.relations.map((e) => Relation.toJSON(e));
|
|
4046
|
+
}
|
|
4047
|
+
if (message.count !== 0) {
|
|
4048
|
+
obj.count = Math.round(message.count);
|
|
4049
|
+
}
|
|
4050
|
+
return obj;
|
|
4051
|
+
},
|
|
4052
|
+
create(base) {
|
|
4053
|
+
return FindRelationResponse.fromPartial(base ?? {});
|
|
4054
|
+
},
|
|
4055
|
+
fromPartial(object) {
|
|
4056
|
+
const message = createBaseFindRelationResponse();
|
|
4057
|
+
message.relations = object.relations?.map((e) => Relation.fromPartial(e)) || [];
|
|
4058
|
+
message.count = object.count ?? 0;
|
|
4059
|
+
return message;
|
|
4060
|
+
}
|
|
4061
|
+
};
|
|
4062
|
+
function createBaseAllowedResourcesRequest() {
|
|
4063
|
+
return { subject: "", action: "", resourceType: "", skip: 0, limit: 0 };
|
|
4064
|
+
}
|
|
4065
|
+
var AllowedResourcesRequest = {
|
|
4066
|
+
encode(message, writer = new BinaryWriter3()) {
|
|
4067
|
+
if (message.subject !== "") {
|
|
4068
|
+
writer.uint32(10).string(message.subject);
|
|
4069
|
+
}
|
|
4070
|
+
if (message.action !== "") {
|
|
4071
|
+
writer.uint32(18).string(message.action);
|
|
4072
|
+
}
|
|
4073
|
+
if (message.resourceType !== "") {
|
|
4074
|
+
writer.uint32(42).string(message.resourceType);
|
|
4075
|
+
}
|
|
4076
|
+
if (message.skip !== 0) {
|
|
4077
|
+
writer.uint32(48).int32(message.skip);
|
|
4078
|
+
}
|
|
4079
|
+
if (message.limit !== 0) {
|
|
4080
|
+
writer.uint32(56).int32(message.limit);
|
|
4081
|
+
}
|
|
4082
|
+
return writer;
|
|
4083
|
+
},
|
|
4084
|
+
decode(input, length) {
|
|
4085
|
+
const reader = input instanceof BinaryReader3 ? input : new BinaryReader3(input);
|
|
4086
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
4087
|
+
if (previousRecursionDepth >= 100) {
|
|
4088
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4089
|
+
}
|
|
4090
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4091
|
+
try {
|
|
4092
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
4093
|
+
const message = createBaseAllowedResourcesRequest();
|
|
4094
|
+
while (reader.pos < end) {
|
|
4095
|
+
const tag = reader.uint32();
|
|
4096
|
+
switch (tag >>> 3) {
|
|
4097
|
+
case 1: {
|
|
4098
|
+
if (tag !== 10) {
|
|
4099
|
+
break;
|
|
4100
|
+
}
|
|
4101
|
+
message.subject = reader.string();
|
|
4102
|
+
continue;
|
|
4103
|
+
}
|
|
4104
|
+
case 2: {
|
|
4105
|
+
if (tag !== 18) {
|
|
4106
|
+
break;
|
|
4107
|
+
}
|
|
4108
|
+
message.action = reader.string();
|
|
3053
4109
|
continue;
|
|
3054
4110
|
}
|
|
3055
4111
|
case 5: {
|
|
@@ -3086,62 +4142,52 @@ var FindRelationRequest = {
|
|
|
3086
4142
|
},
|
|
3087
4143
|
fromJSON(object) {
|
|
3088
4144
|
return {
|
|
3089
|
-
subject: isSet2(object.subject) ? globalThis.String(object.subject) :
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
skip: isSet2(object.skip) ? globalThis.Number(object.skip) : void 0,
|
|
3095
|
-
limit: isSet2(object.limit) ? globalThis.Number(object.limit) : void 0
|
|
4145
|
+
subject: isSet2(object.subject) ? globalThis.String(object.subject) : "",
|
|
4146
|
+
action: isSet2(object.action) ? globalThis.String(object.action) : "",
|
|
4147
|
+
resourceType: isSet2(object.resourceType) ? globalThis.String(object.resourceType) : "",
|
|
4148
|
+
skip: isSet2(object.skip) ? globalThis.Number(object.skip) : 0,
|
|
4149
|
+
limit: isSet2(object.limit) ? globalThis.Number(object.limit) : 0
|
|
3096
4150
|
};
|
|
3097
4151
|
},
|
|
3098
4152
|
toJSON(message) {
|
|
3099
4153
|
const obj = {};
|
|
3100
|
-
if (message.subject !==
|
|
4154
|
+
if (message.subject !== "") {
|
|
3101
4155
|
obj.subject = message.subject;
|
|
3102
4156
|
}
|
|
3103
|
-
if (message.
|
|
3104
|
-
obj.
|
|
3105
|
-
}
|
|
3106
|
-
if (message.resource !== void 0) {
|
|
3107
|
-
obj.resource = message.resource;
|
|
3108
|
-
}
|
|
3109
|
-
if (message.subjectType !== void 0) {
|
|
3110
|
-
obj.subjectType = message.subjectType;
|
|
4157
|
+
if (message.action !== "") {
|
|
4158
|
+
obj.action = message.action;
|
|
3111
4159
|
}
|
|
3112
|
-
if (message.resourceType !==
|
|
4160
|
+
if (message.resourceType !== "") {
|
|
3113
4161
|
obj.resourceType = message.resourceType;
|
|
3114
4162
|
}
|
|
3115
|
-
if (message.skip !==
|
|
4163
|
+
if (message.skip !== 0) {
|
|
3116
4164
|
obj.skip = Math.round(message.skip);
|
|
3117
4165
|
}
|
|
3118
|
-
if (message.limit !==
|
|
4166
|
+
if (message.limit !== 0) {
|
|
3119
4167
|
obj.limit = Math.round(message.limit);
|
|
3120
4168
|
}
|
|
3121
4169
|
return obj;
|
|
3122
4170
|
},
|
|
3123
4171
|
create(base) {
|
|
3124
|
-
return
|
|
4172
|
+
return AllowedResourcesRequest.fromPartial(base ?? {});
|
|
3125
4173
|
},
|
|
3126
4174
|
fromPartial(object) {
|
|
3127
|
-
const message =
|
|
3128
|
-
message.subject = object.subject ??
|
|
3129
|
-
message.
|
|
3130
|
-
message.
|
|
3131
|
-
message.
|
|
3132
|
-
message.
|
|
3133
|
-
message.skip = object.skip ?? void 0;
|
|
3134
|
-
message.limit = object.limit ?? void 0;
|
|
4175
|
+
const message = createBaseAllowedResourcesRequest();
|
|
4176
|
+
message.subject = object.subject ?? "";
|
|
4177
|
+
message.action = object.action ?? "";
|
|
4178
|
+
message.resourceType = object.resourceType ?? "";
|
|
4179
|
+
message.skip = object.skip ?? 0;
|
|
4180
|
+
message.limit = object.limit ?? 0;
|
|
3135
4181
|
return message;
|
|
3136
4182
|
}
|
|
3137
4183
|
};
|
|
3138
|
-
function
|
|
3139
|
-
return {
|
|
4184
|
+
function createBaseAllowedResourcesResponse() {
|
|
4185
|
+
return { resources: [], count: 0 };
|
|
3140
4186
|
}
|
|
3141
|
-
var
|
|
4187
|
+
var AllowedResourcesResponse = {
|
|
3142
4188
|
encode(message, writer = new BinaryWriter3()) {
|
|
3143
|
-
for (const v of message.
|
|
3144
|
-
|
|
4189
|
+
for (const v of message.resources) {
|
|
4190
|
+
writer.uint32(10).string(v);
|
|
3145
4191
|
}
|
|
3146
4192
|
if (message.count !== 0) {
|
|
3147
4193
|
writer.uint32(16).int32(message.count);
|
|
@@ -3157,7 +4203,7 @@ var FindRelationResponse = {
|
|
|
3157
4203
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3158
4204
|
try {
|
|
3159
4205
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3160
|
-
const message =
|
|
4206
|
+
const message = createBaseAllowedResourcesResponse();
|
|
3161
4207
|
while (reader.pos < end) {
|
|
3162
4208
|
const tag = reader.uint32();
|
|
3163
4209
|
switch (tag >>> 3) {
|
|
@@ -3165,7 +4211,7 @@ var FindRelationResponse = {
|
|
|
3165
4211
|
if (tag !== 10) {
|
|
3166
4212
|
break;
|
|
3167
4213
|
}
|
|
3168
|
-
message.
|
|
4214
|
+
message.resources.push(reader.string());
|
|
3169
4215
|
continue;
|
|
3170
4216
|
}
|
|
3171
4217
|
case 2: {
|
|
@@ -3188,14 +4234,14 @@ var FindRelationResponse = {
|
|
|
3188
4234
|
},
|
|
3189
4235
|
fromJSON(object) {
|
|
3190
4236
|
return {
|
|
3191
|
-
|
|
4237
|
+
resources: globalThis.Array.isArray(object?.resources) ? object.resources.map((e) => globalThis.String(e)) : [],
|
|
3192
4238
|
count: isSet2(object.count) ? globalThis.Number(object.count) : 0
|
|
3193
4239
|
};
|
|
3194
4240
|
},
|
|
3195
4241
|
toJSON(message) {
|
|
3196
4242
|
const obj = {};
|
|
3197
|
-
if (message.
|
|
3198
|
-
obj.
|
|
4243
|
+
if (message.resources?.length) {
|
|
4244
|
+
obj.resources = message.resources;
|
|
3199
4245
|
}
|
|
3200
4246
|
if (message.count !== 0) {
|
|
3201
4247
|
obj.count = Math.round(message.count);
|
|
@@ -3203,19 +4249,19 @@ var FindRelationResponse = {
|
|
|
3203
4249
|
return obj;
|
|
3204
4250
|
},
|
|
3205
4251
|
create(base) {
|
|
3206
|
-
return
|
|
4252
|
+
return AllowedResourcesResponse.fromPartial(base ?? {});
|
|
3207
4253
|
},
|
|
3208
4254
|
fromPartial(object) {
|
|
3209
|
-
const message =
|
|
3210
|
-
message.
|
|
4255
|
+
const message = createBaseAllowedResourcesResponse();
|
|
4256
|
+
message.resources = object.resources?.map((e) => e) || [];
|
|
3211
4257
|
message.count = object.count ?? 0;
|
|
3212
4258
|
return message;
|
|
3213
4259
|
}
|
|
3214
4260
|
};
|
|
3215
|
-
function
|
|
3216
|
-
return { subject: "", action: "",
|
|
4261
|
+
function createBaseResourceAccessListRequest() {
|
|
4262
|
+
return { subject: "", action: "", viewName: void 0, resourceType: "" };
|
|
3217
4263
|
}
|
|
3218
|
-
var
|
|
4264
|
+
var ResourceAccessListRequest = {
|
|
3219
4265
|
encode(message, writer = new BinaryWriter3()) {
|
|
3220
4266
|
if (message.subject !== "") {
|
|
3221
4267
|
writer.uint32(10).string(message.subject);
|
|
@@ -3223,15 +4269,12 @@ var AllowedResourcesRequest = {
|
|
|
3223
4269
|
if (message.action !== "") {
|
|
3224
4270
|
writer.uint32(18).string(message.action);
|
|
3225
4271
|
}
|
|
4272
|
+
if (message.viewName !== void 0) {
|
|
4273
|
+
writer.uint32(26).string(message.viewName);
|
|
4274
|
+
}
|
|
3226
4275
|
if (message.resourceType !== "") {
|
|
3227
4276
|
writer.uint32(42).string(message.resourceType);
|
|
3228
4277
|
}
|
|
3229
|
-
if (message.skip !== 0) {
|
|
3230
|
-
writer.uint32(48).int32(message.skip);
|
|
3231
|
-
}
|
|
3232
|
-
if (message.limit !== 0) {
|
|
3233
|
-
writer.uint32(56).int32(message.limit);
|
|
3234
|
-
}
|
|
3235
4278
|
return writer;
|
|
3236
4279
|
},
|
|
3237
4280
|
decode(input, length) {
|
|
@@ -3243,7 +4286,7 @@ var AllowedResourcesRequest = {
|
|
|
3243
4286
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3244
4287
|
try {
|
|
3245
4288
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3246
|
-
const message =
|
|
4289
|
+
const message = createBaseResourceAccessListRequest();
|
|
3247
4290
|
while (reader.pos < end) {
|
|
3248
4291
|
const tag = reader.uint32();
|
|
3249
4292
|
switch (tag >>> 3) {
|
|
@@ -3261,25 +4304,18 @@ var AllowedResourcesRequest = {
|
|
|
3261
4304
|
message.action = reader.string();
|
|
3262
4305
|
continue;
|
|
3263
4306
|
}
|
|
3264
|
-
case
|
|
3265
|
-
if (tag !==
|
|
3266
|
-
break;
|
|
3267
|
-
}
|
|
3268
|
-
message.resourceType = reader.string();
|
|
3269
|
-
continue;
|
|
3270
|
-
}
|
|
3271
|
-
case 6: {
|
|
3272
|
-
if (tag !== 48) {
|
|
4307
|
+
case 3: {
|
|
4308
|
+
if (tag !== 26) {
|
|
3273
4309
|
break;
|
|
3274
4310
|
}
|
|
3275
|
-
message.
|
|
4311
|
+
message.viewName = reader.string();
|
|
3276
4312
|
continue;
|
|
3277
4313
|
}
|
|
3278
|
-
case
|
|
3279
|
-
if (tag !==
|
|
4314
|
+
case 5: {
|
|
4315
|
+
if (tag !== 42) {
|
|
3280
4316
|
break;
|
|
3281
4317
|
}
|
|
3282
|
-
message.
|
|
4318
|
+
message.resourceType = reader.string();
|
|
3283
4319
|
continue;
|
|
3284
4320
|
}
|
|
3285
4321
|
}
|
|
@@ -3297,9 +4333,8 @@ var AllowedResourcesRequest = {
|
|
|
3297
4333
|
return {
|
|
3298
4334
|
subject: isSet2(object.subject) ? globalThis.String(object.subject) : "",
|
|
3299
4335
|
action: isSet2(object.action) ? globalThis.String(object.action) : "",
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
limit: isSet2(object.limit) ? globalThis.Number(object.limit) : 0
|
|
4336
|
+
viewName: isSet2(object.viewName) ? globalThis.String(object.viewName) : void 0,
|
|
4337
|
+
resourceType: isSet2(object.resourceType) ? globalThis.String(object.resourceType) : ""
|
|
3303
4338
|
};
|
|
3304
4339
|
},
|
|
3305
4340
|
toJSON(message) {
|
|
@@ -3310,40 +4345,99 @@ var AllowedResourcesRequest = {
|
|
|
3310
4345
|
if (message.action !== "") {
|
|
3311
4346
|
obj.action = message.action;
|
|
3312
4347
|
}
|
|
4348
|
+
if (message.viewName !== void 0) {
|
|
4349
|
+
obj.viewName = message.viewName;
|
|
4350
|
+
}
|
|
3313
4351
|
if (message.resourceType !== "") {
|
|
3314
4352
|
obj.resourceType = message.resourceType;
|
|
3315
4353
|
}
|
|
3316
|
-
if (message.skip !== 0) {
|
|
3317
|
-
obj.skip = Math.round(message.skip);
|
|
3318
|
-
}
|
|
3319
|
-
if (message.limit !== 0) {
|
|
3320
|
-
obj.limit = Math.round(message.limit);
|
|
3321
|
-
}
|
|
3322
4354
|
return obj;
|
|
3323
4355
|
},
|
|
3324
4356
|
create(base) {
|
|
3325
|
-
return
|
|
4357
|
+
return ResourceAccessListRequest.fromPartial(base ?? {});
|
|
3326
4358
|
},
|
|
3327
4359
|
fromPartial(object) {
|
|
3328
|
-
const message =
|
|
4360
|
+
const message = createBaseResourceAccessListRequest();
|
|
3329
4361
|
message.subject = object.subject ?? "";
|
|
3330
4362
|
message.action = object.action ?? "";
|
|
4363
|
+
message.viewName = object.viewName ?? void 0;
|
|
3331
4364
|
message.resourceType = object.resourceType ?? "";
|
|
3332
|
-
message.skip = object.skip ?? 0;
|
|
3333
|
-
message.limit = object.limit ?? 0;
|
|
3334
4365
|
return message;
|
|
3335
4366
|
}
|
|
3336
4367
|
};
|
|
3337
|
-
function
|
|
3338
|
-
return {
|
|
4368
|
+
function createBaseResourceAccessListResponse() {
|
|
4369
|
+
return { viewName: "" };
|
|
3339
4370
|
}
|
|
3340
|
-
var
|
|
4371
|
+
var ResourceAccessListResponse = {
|
|
3341
4372
|
encode(message, writer = new BinaryWriter3()) {
|
|
3342
|
-
|
|
3343
|
-
writer.uint32(10).string(
|
|
4373
|
+
if (message.viewName !== "") {
|
|
4374
|
+
writer.uint32(10).string(message.viewName);
|
|
3344
4375
|
}
|
|
3345
|
-
|
|
3346
|
-
|
|
4376
|
+
return writer;
|
|
4377
|
+
},
|
|
4378
|
+
decode(input, length) {
|
|
4379
|
+
const reader = input instanceof BinaryReader3 ? input : new BinaryReader3(input);
|
|
4380
|
+
const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
|
|
4381
|
+
if (previousRecursionDepth >= 100) {
|
|
4382
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
4383
|
+
}
|
|
4384
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
4385
|
+
try {
|
|
4386
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
4387
|
+
const message = createBaseResourceAccessListResponse();
|
|
4388
|
+
while (reader.pos < end) {
|
|
4389
|
+
const tag = reader.uint32();
|
|
4390
|
+
switch (tag >>> 3) {
|
|
4391
|
+
case 1: {
|
|
4392
|
+
if (tag !== 10) {
|
|
4393
|
+
break;
|
|
4394
|
+
}
|
|
4395
|
+
message.viewName = reader.string();
|
|
4396
|
+
continue;
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4400
|
+
break;
|
|
4401
|
+
}
|
|
4402
|
+
reader.skip(tag & 7);
|
|
4403
|
+
}
|
|
4404
|
+
return message;
|
|
4405
|
+
} finally {
|
|
4406
|
+
reader.__tsProtoDecodeDepth = previousRecursionDepth;
|
|
4407
|
+
}
|
|
4408
|
+
},
|
|
4409
|
+
fromJSON(object) {
|
|
4410
|
+
return { viewName: isSet2(object.viewName) ? globalThis.String(object.viewName) : "" };
|
|
4411
|
+
},
|
|
4412
|
+
toJSON(message) {
|
|
4413
|
+
const obj = {};
|
|
4414
|
+
if (message.viewName !== "") {
|
|
4415
|
+
obj.viewName = message.viewName;
|
|
4416
|
+
}
|
|
4417
|
+
return obj;
|
|
4418
|
+
},
|
|
4419
|
+
create(base) {
|
|
4420
|
+
return ResourceAccessListResponse.fromPartial(base ?? {});
|
|
4421
|
+
},
|
|
4422
|
+
fromPartial(object) {
|
|
4423
|
+
const message = createBaseResourceAccessListResponse();
|
|
4424
|
+
message.viewName = object.viewName ?? "";
|
|
4425
|
+
return message;
|
|
4426
|
+
}
|
|
4427
|
+
};
|
|
4428
|
+
function createBasePermissionCheck() {
|
|
4429
|
+
return { subject: "", actions: [], resource: "" };
|
|
4430
|
+
}
|
|
4431
|
+
var PermissionCheck = {
|
|
4432
|
+
encode(message, writer = new BinaryWriter3()) {
|
|
4433
|
+
if (message.subject !== "") {
|
|
4434
|
+
writer.uint32(10).string(message.subject);
|
|
4435
|
+
}
|
|
4436
|
+
for (const v of message.actions) {
|
|
4437
|
+
writer.uint32(18).string(v);
|
|
4438
|
+
}
|
|
4439
|
+
if (message.resource !== "") {
|
|
4440
|
+
writer.uint32(26).string(message.resource);
|
|
3347
4441
|
}
|
|
3348
4442
|
return writer;
|
|
3349
4443
|
},
|
|
@@ -3356,7 +4450,7 @@ var AllowedResourcesResponse = {
|
|
|
3356
4450
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3357
4451
|
try {
|
|
3358
4452
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3359
|
-
const message =
|
|
4453
|
+
const message = createBasePermissionCheck();
|
|
3360
4454
|
while (reader.pos < end) {
|
|
3361
4455
|
const tag = reader.uint32();
|
|
3362
4456
|
switch (tag >>> 3) {
|
|
@@ -3364,14 +4458,21 @@ var AllowedResourcesResponse = {
|
|
|
3364
4458
|
if (tag !== 10) {
|
|
3365
4459
|
break;
|
|
3366
4460
|
}
|
|
3367
|
-
message.
|
|
4461
|
+
message.subject = reader.string();
|
|
3368
4462
|
continue;
|
|
3369
4463
|
}
|
|
3370
4464
|
case 2: {
|
|
3371
|
-
if (tag !==
|
|
4465
|
+
if (tag !== 18) {
|
|
3372
4466
|
break;
|
|
3373
4467
|
}
|
|
3374
|
-
message.
|
|
4468
|
+
message.actions.push(reader.string());
|
|
4469
|
+
continue;
|
|
4470
|
+
}
|
|
4471
|
+
case 3: {
|
|
4472
|
+
if (tag !== 26) {
|
|
4473
|
+
break;
|
|
4474
|
+
}
|
|
4475
|
+
message.resource = reader.string();
|
|
3375
4476
|
continue;
|
|
3376
4477
|
}
|
|
3377
4478
|
}
|
|
@@ -3387,34 +4488,39 @@ var AllowedResourcesResponse = {
|
|
|
3387
4488
|
},
|
|
3388
4489
|
fromJSON(object) {
|
|
3389
4490
|
return {
|
|
3390
|
-
|
|
3391
|
-
|
|
4491
|
+
subject: isSet2(object.subject) ? globalThis.String(object.subject) : "",
|
|
4492
|
+
actions: globalThis.Array.isArray(object?.actions) ? object.actions.map((e) => globalThis.String(e)) : [],
|
|
4493
|
+
resource: isSet2(object.resource) ? globalThis.String(object.resource) : ""
|
|
3392
4494
|
};
|
|
3393
4495
|
},
|
|
3394
4496
|
toJSON(message) {
|
|
3395
4497
|
const obj = {};
|
|
3396
|
-
if (message.
|
|
3397
|
-
obj.
|
|
4498
|
+
if (message.subject !== "") {
|
|
4499
|
+
obj.subject = message.subject;
|
|
3398
4500
|
}
|
|
3399
|
-
if (message.
|
|
3400
|
-
obj.
|
|
4501
|
+
if (message.actions?.length) {
|
|
4502
|
+
obj.actions = message.actions;
|
|
4503
|
+
}
|
|
4504
|
+
if (message.resource !== "") {
|
|
4505
|
+
obj.resource = message.resource;
|
|
3401
4506
|
}
|
|
3402
4507
|
return obj;
|
|
3403
4508
|
},
|
|
3404
4509
|
create(base) {
|
|
3405
|
-
return
|
|
4510
|
+
return PermissionCheck.fromPartial(base ?? {});
|
|
3406
4511
|
},
|
|
3407
4512
|
fromPartial(object) {
|
|
3408
|
-
const message =
|
|
3409
|
-
message.
|
|
3410
|
-
message.
|
|
4513
|
+
const message = createBasePermissionCheck();
|
|
4514
|
+
message.subject = object.subject ?? "";
|
|
4515
|
+
message.actions = object.actions?.map((e) => e) || [];
|
|
4516
|
+
message.resource = object.resource ?? "";
|
|
3411
4517
|
return message;
|
|
3412
4518
|
}
|
|
3413
4519
|
};
|
|
3414
|
-
function
|
|
3415
|
-
return { subject: "", action: "",
|
|
4520
|
+
function createBasePermissionRequest() {
|
|
4521
|
+
return { subject: "", action: "", resource: "" };
|
|
3416
4522
|
}
|
|
3417
|
-
var
|
|
4523
|
+
var PermissionRequest = {
|
|
3418
4524
|
encode(message, writer = new BinaryWriter3()) {
|
|
3419
4525
|
if (message.subject !== "") {
|
|
3420
4526
|
writer.uint32(10).string(message.subject);
|
|
@@ -3422,11 +4528,8 @@ var ResourceAccessListRequest = {
|
|
|
3422
4528
|
if (message.action !== "") {
|
|
3423
4529
|
writer.uint32(18).string(message.action);
|
|
3424
4530
|
}
|
|
3425
|
-
if (message.
|
|
3426
|
-
writer.uint32(26).string(message.
|
|
3427
|
-
}
|
|
3428
|
-
if (message.resourceType !== "") {
|
|
3429
|
-
writer.uint32(42).string(message.resourceType);
|
|
4531
|
+
if (message.resource !== "") {
|
|
4532
|
+
writer.uint32(26).string(message.resource);
|
|
3430
4533
|
}
|
|
3431
4534
|
return writer;
|
|
3432
4535
|
},
|
|
@@ -3439,7 +4542,7 @@ var ResourceAccessListRequest = {
|
|
|
3439
4542
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3440
4543
|
try {
|
|
3441
4544
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3442
|
-
const message =
|
|
4545
|
+
const message = createBasePermissionRequest();
|
|
3443
4546
|
while (reader.pos < end) {
|
|
3444
4547
|
const tag = reader.uint32();
|
|
3445
4548
|
switch (tag >>> 3) {
|
|
@@ -3461,14 +4564,7 @@ var ResourceAccessListRequest = {
|
|
|
3461
4564
|
if (tag !== 26) {
|
|
3462
4565
|
break;
|
|
3463
4566
|
}
|
|
3464
|
-
message.
|
|
3465
|
-
continue;
|
|
3466
|
-
}
|
|
3467
|
-
case 5: {
|
|
3468
|
-
if (tag !== 42) {
|
|
3469
|
-
break;
|
|
3470
|
-
}
|
|
3471
|
-
message.resourceType = reader.string();
|
|
4567
|
+
message.resource = reader.string();
|
|
3472
4568
|
continue;
|
|
3473
4569
|
}
|
|
3474
4570
|
}
|
|
@@ -3486,8 +4582,7 @@ var ResourceAccessListRequest = {
|
|
|
3486
4582
|
return {
|
|
3487
4583
|
subject: isSet2(object.subject) ? globalThis.String(object.subject) : "",
|
|
3488
4584
|
action: isSet2(object.action) ? globalThis.String(object.action) : "",
|
|
3489
|
-
|
|
3490
|
-
resourceType: isSet2(object.resourceType) ? globalThis.String(object.resourceType) : ""
|
|
4585
|
+
resource: isSet2(object.resource) ? globalThis.String(object.resource) : ""
|
|
3491
4586
|
};
|
|
3492
4587
|
},
|
|
3493
4588
|
toJSON(message) {
|
|
@@ -3498,33 +4593,29 @@ var ResourceAccessListRequest = {
|
|
|
3498
4593
|
if (message.action !== "") {
|
|
3499
4594
|
obj.action = message.action;
|
|
3500
4595
|
}
|
|
3501
|
-
if (message.
|
|
3502
|
-
obj.
|
|
3503
|
-
}
|
|
3504
|
-
if (message.resourceType !== "") {
|
|
3505
|
-
obj.resourceType = message.resourceType;
|
|
4596
|
+
if (message.resource !== "") {
|
|
4597
|
+
obj.resource = message.resource;
|
|
3506
4598
|
}
|
|
3507
4599
|
return obj;
|
|
3508
4600
|
},
|
|
3509
4601
|
create(base) {
|
|
3510
|
-
return
|
|
4602
|
+
return PermissionRequest.fromPartial(base ?? {});
|
|
3511
4603
|
},
|
|
3512
4604
|
fromPartial(object) {
|
|
3513
|
-
const message =
|
|
4605
|
+
const message = createBasePermissionRequest();
|
|
3514
4606
|
message.subject = object.subject ?? "";
|
|
3515
4607
|
message.action = object.action ?? "";
|
|
3516
|
-
message.
|
|
3517
|
-
message.resourceType = object.resourceType ?? "";
|
|
4608
|
+
message.resource = object.resource ?? "";
|
|
3518
4609
|
return message;
|
|
3519
4610
|
}
|
|
3520
4611
|
};
|
|
3521
|
-
function
|
|
3522
|
-
return {
|
|
4612
|
+
function createBaseDecision() {
|
|
4613
|
+
return { allow: false };
|
|
3523
4614
|
}
|
|
3524
|
-
var
|
|
4615
|
+
var Decision = {
|
|
3525
4616
|
encode(message, writer = new BinaryWriter3()) {
|
|
3526
|
-
if (message.
|
|
3527
|
-
writer.uint32(
|
|
4617
|
+
if (message.allow !== false) {
|
|
4618
|
+
writer.uint32(8).bool(message.allow);
|
|
3528
4619
|
}
|
|
3529
4620
|
return writer;
|
|
3530
4621
|
},
|
|
@@ -3537,15 +4628,15 @@ var ResourceAccessListResponse = {
|
|
|
3537
4628
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3538
4629
|
try {
|
|
3539
4630
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3540
|
-
const message =
|
|
4631
|
+
const message = createBaseDecision();
|
|
3541
4632
|
while (reader.pos < end) {
|
|
3542
4633
|
const tag = reader.uint32();
|
|
3543
4634
|
switch (tag >>> 3) {
|
|
3544
4635
|
case 1: {
|
|
3545
|
-
if (tag !==
|
|
4636
|
+
if (tag !== 8) {
|
|
3546
4637
|
break;
|
|
3547
4638
|
}
|
|
3548
|
-
message.
|
|
4639
|
+
message.allow = reader.bool();
|
|
3549
4640
|
continue;
|
|
3550
4641
|
}
|
|
3551
4642
|
}
|
|
@@ -3560,37 +4651,37 @@ var ResourceAccessListResponse = {
|
|
|
3560
4651
|
}
|
|
3561
4652
|
},
|
|
3562
4653
|
fromJSON(object) {
|
|
3563
|
-
return {
|
|
4654
|
+
return { allow: isSet2(object.allow) ? globalThis.Boolean(object.allow) : false };
|
|
3564
4655
|
},
|
|
3565
4656
|
toJSON(message) {
|
|
3566
4657
|
const obj = {};
|
|
3567
|
-
if (message.
|
|
3568
|
-
obj.
|
|
4658
|
+
if (message.allow !== false) {
|
|
4659
|
+
obj.allow = message.allow;
|
|
3569
4660
|
}
|
|
3570
4661
|
return obj;
|
|
3571
4662
|
},
|
|
3572
4663
|
create(base) {
|
|
3573
|
-
return
|
|
4664
|
+
return Decision.fromPartial(base ?? {});
|
|
3574
4665
|
},
|
|
3575
4666
|
fromPartial(object) {
|
|
3576
|
-
const message =
|
|
3577
|
-
message.
|
|
4667
|
+
const message = createBaseDecision();
|
|
4668
|
+
message.allow = object.allow ?? false;
|
|
3578
4669
|
return message;
|
|
3579
4670
|
}
|
|
3580
4671
|
};
|
|
3581
|
-
function
|
|
3582
|
-
return { subject: "",
|
|
4672
|
+
function createBaseSubjectPermissionsRequest() {
|
|
4673
|
+
return { subject: "", resource: "", actionPrefix: void 0 };
|
|
3583
4674
|
}
|
|
3584
|
-
var
|
|
4675
|
+
var SubjectPermissionsRequest = {
|
|
3585
4676
|
encode(message, writer = new BinaryWriter3()) {
|
|
3586
4677
|
if (message.subject !== "") {
|
|
3587
4678
|
writer.uint32(10).string(message.subject);
|
|
3588
4679
|
}
|
|
3589
|
-
for (const v of message.actions) {
|
|
3590
|
-
writer.uint32(18).string(v);
|
|
3591
|
-
}
|
|
3592
4680
|
if (message.resource !== "") {
|
|
3593
|
-
writer.uint32(
|
|
4681
|
+
writer.uint32(18).string(message.resource);
|
|
4682
|
+
}
|
|
4683
|
+
if (message.actionPrefix !== void 0) {
|
|
4684
|
+
writer.uint32(26).string(message.actionPrefix);
|
|
3594
4685
|
}
|
|
3595
4686
|
return writer;
|
|
3596
4687
|
},
|
|
@@ -3603,7 +4694,7 @@ var PermissionCheck = {
|
|
|
3603
4694
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3604
4695
|
try {
|
|
3605
4696
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3606
|
-
const message =
|
|
4697
|
+
const message = createBaseSubjectPermissionsRequest();
|
|
3607
4698
|
while (reader.pos < end) {
|
|
3608
4699
|
const tag = reader.uint32();
|
|
3609
4700
|
switch (tag >>> 3) {
|
|
@@ -3618,14 +4709,14 @@ var PermissionCheck = {
|
|
|
3618
4709
|
if (tag !== 18) {
|
|
3619
4710
|
break;
|
|
3620
4711
|
}
|
|
3621
|
-
message.
|
|
4712
|
+
message.resource = reader.string();
|
|
3622
4713
|
continue;
|
|
3623
4714
|
}
|
|
3624
4715
|
case 3: {
|
|
3625
4716
|
if (tag !== 26) {
|
|
3626
4717
|
break;
|
|
3627
4718
|
}
|
|
3628
|
-
message.
|
|
4719
|
+
message.actionPrefix = reader.string();
|
|
3629
4720
|
continue;
|
|
3630
4721
|
}
|
|
3631
4722
|
}
|
|
@@ -3642,8 +4733,8 @@ var PermissionCheck = {
|
|
|
3642
4733
|
fromJSON(object) {
|
|
3643
4734
|
return {
|
|
3644
4735
|
subject: isSet2(object.subject) ? globalThis.String(object.subject) : "",
|
|
3645
|
-
|
|
3646
|
-
|
|
4736
|
+
resource: isSet2(object.resource) ? globalThis.String(object.resource) : "",
|
|
4737
|
+
actionPrefix: isSet2(object.actionPrefix) ? globalThis.String(object.actionPrefix) : void 0
|
|
3647
4738
|
};
|
|
3648
4739
|
},
|
|
3649
4740
|
toJSON(message) {
|
|
@@ -3651,38 +4742,44 @@ var PermissionCheck = {
|
|
|
3651
4742
|
if (message.subject !== "") {
|
|
3652
4743
|
obj.subject = message.subject;
|
|
3653
4744
|
}
|
|
3654
|
-
if (message.actions?.length) {
|
|
3655
|
-
obj.actions = message.actions;
|
|
3656
|
-
}
|
|
3657
4745
|
if (message.resource !== "") {
|
|
3658
4746
|
obj.resource = message.resource;
|
|
3659
4747
|
}
|
|
4748
|
+
if (message.actionPrefix !== void 0) {
|
|
4749
|
+
obj.actionPrefix = message.actionPrefix;
|
|
4750
|
+
}
|
|
3660
4751
|
return obj;
|
|
3661
4752
|
},
|
|
3662
4753
|
create(base) {
|
|
3663
|
-
return
|
|
4754
|
+
return SubjectPermissionsRequest.fromPartial(base ?? {});
|
|
3664
4755
|
},
|
|
3665
4756
|
fromPartial(object) {
|
|
3666
|
-
const message =
|
|
4757
|
+
const message = createBaseSubjectPermissionsRequest();
|
|
3667
4758
|
message.subject = object.subject ?? "";
|
|
3668
|
-
message.actions = object.actions?.map((e) => e) || [];
|
|
3669
4759
|
message.resource = object.resource ?? "";
|
|
4760
|
+
message.actionPrefix = object.actionPrefix ?? void 0;
|
|
3670
4761
|
return message;
|
|
3671
4762
|
}
|
|
3672
4763
|
};
|
|
3673
|
-
function
|
|
3674
|
-
return {
|
|
4764
|
+
function createBaseSubjectPermission() {
|
|
4765
|
+
return { action: "", direct: false, inherited: false, implicit: false, allowed: false };
|
|
3675
4766
|
}
|
|
3676
|
-
var
|
|
4767
|
+
var SubjectPermission = {
|
|
3677
4768
|
encode(message, writer = new BinaryWriter3()) {
|
|
3678
|
-
if (message.subject !== "") {
|
|
3679
|
-
writer.uint32(10).string(message.subject);
|
|
3680
|
-
}
|
|
3681
4769
|
if (message.action !== "") {
|
|
3682
|
-
writer.uint32(
|
|
4770
|
+
writer.uint32(10).string(message.action);
|
|
3683
4771
|
}
|
|
3684
|
-
if (message.
|
|
3685
|
-
writer.uint32(
|
|
4772
|
+
if (message.direct !== false) {
|
|
4773
|
+
writer.uint32(16).bool(message.direct);
|
|
4774
|
+
}
|
|
4775
|
+
if (message.inherited !== false) {
|
|
4776
|
+
writer.uint32(24).bool(message.inherited);
|
|
4777
|
+
}
|
|
4778
|
+
if (message.implicit !== false) {
|
|
4779
|
+
writer.uint32(32).bool(message.implicit);
|
|
4780
|
+
}
|
|
4781
|
+
if (message.allowed !== false) {
|
|
4782
|
+
writer.uint32(40).bool(message.allowed);
|
|
3686
4783
|
}
|
|
3687
4784
|
return writer;
|
|
3688
4785
|
},
|
|
@@ -3695,7 +4792,7 @@ var PermissionRequest = {
|
|
|
3695
4792
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3696
4793
|
try {
|
|
3697
4794
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3698
|
-
const message =
|
|
4795
|
+
const message = createBaseSubjectPermission();
|
|
3699
4796
|
while (reader.pos < end) {
|
|
3700
4797
|
const tag = reader.uint32();
|
|
3701
4798
|
switch (tag >>> 3) {
|
|
@@ -3703,21 +4800,35 @@ var PermissionRequest = {
|
|
|
3703
4800
|
if (tag !== 10) {
|
|
3704
4801
|
break;
|
|
3705
4802
|
}
|
|
3706
|
-
message.
|
|
4803
|
+
message.action = reader.string();
|
|
3707
4804
|
continue;
|
|
3708
4805
|
}
|
|
3709
4806
|
case 2: {
|
|
3710
|
-
if (tag !==
|
|
4807
|
+
if (tag !== 16) {
|
|
3711
4808
|
break;
|
|
3712
4809
|
}
|
|
3713
|
-
message.
|
|
4810
|
+
message.direct = reader.bool();
|
|
3714
4811
|
continue;
|
|
3715
4812
|
}
|
|
3716
4813
|
case 3: {
|
|
3717
|
-
if (tag !==
|
|
4814
|
+
if (tag !== 24) {
|
|
3718
4815
|
break;
|
|
3719
4816
|
}
|
|
3720
|
-
message.
|
|
4817
|
+
message.inherited = reader.bool();
|
|
4818
|
+
continue;
|
|
4819
|
+
}
|
|
4820
|
+
case 4: {
|
|
4821
|
+
if (tag !== 32) {
|
|
4822
|
+
break;
|
|
4823
|
+
}
|
|
4824
|
+
message.implicit = reader.bool();
|
|
4825
|
+
continue;
|
|
4826
|
+
}
|
|
4827
|
+
case 5: {
|
|
4828
|
+
if (tag !== 40) {
|
|
4829
|
+
break;
|
|
4830
|
+
}
|
|
4831
|
+
message.allowed = reader.bool();
|
|
3721
4832
|
continue;
|
|
3722
4833
|
}
|
|
3723
4834
|
}
|
|
@@ -3733,42 +4844,52 @@ var PermissionRequest = {
|
|
|
3733
4844
|
},
|
|
3734
4845
|
fromJSON(object) {
|
|
3735
4846
|
return {
|
|
3736
|
-
subject: isSet2(object.subject) ? globalThis.String(object.subject) : "",
|
|
3737
4847
|
action: isSet2(object.action) ? globalThis.String(object.action) : "",
|
|
3738
|
-
|
|
4848
|
+
direct: isSet2(object.direct) ? globalThis.Boolean(object.direct) : false,
|
|
4849
|
+
inherited: isSet2(object.inherited) ? globalThis.Boolean(object.inherited) : false,
|
|
4850
|
+
implicit: isSet2(object.implicit) ? globalThis.Boolean(object.implicit) : false,
|
|
4851
|
+
allowed: isSet2(object.allowed) ? globalThis.Boolean(object.allowed) : false
|
|
3739
4852
|
};
|
|
3740
4853
|
},
|
|
3741
4854
|
toJSON(message) {
|
|
3742
4855
|
const obj = {};
|
|
3743
|
-
if (message.subject !== "") {
|
|
3744
|
-
obj.subject = message.subject;
|
|
3745
|
-
}
|
|
3746
4856
|
if (message.action !== "") {
|
|
3747
4857
|
obj.action = message.action;
|
|
3748
4858
|
}
|
|
3749
|
-
if (message.
|
|
3750
|
-
obj.
|
|
4859
|
+
if (message.direct !== false) {
|
|
4860
|
+
obj.direct = message.direct;
|
|
4861
|
+
}
|
|
4862
|
+
if (message.inherited !== false) {
|
|
4863
|
+
obj.inherited = message.inherited;
|
|
4864
|
+
}
|
|
4865
|
+
if (message.implicit !== false) {
|
|
4866
|
+
obj.implicit = message.implicit;
|
|
4867
|
+
}
|
|
4868
|
+
if (message.allowed !== false) {
|
|
4869
|
+
obj.allowed = message.allowed;
|
|
3751
4870
|
}
|
|
3752
4871
|
return obj;
|
|
3753
4872
|
},
|
|
3754
4873
|
create(base) {
|
|
3755
|
-
return
|
|
4874
|
+
return SubjectPermission.fromPartial(base ?? {});
|
|
3756
4875
|
},
|
|
3757
4876
|
fromPartial(object) {
|
|
3758
|
-
const message =
|
|
3759
|
-
message.subject = object.subject ?? "";
|
|
4877
|
+
const message = createBaseSubjectPermission();
|
|
3760
4878
|
message.action = object.action ?? "";
|
|
3761
|
-
message.
|
|
4879
|
+
message.direct = object.direct ?? false;
|
|
4880
|
+
message.inherited = object.inherited ?? false;
|
|
4881
|
+
message.implicit = object.implicit ?? false;
|
|
4882
|
+
message.allowed = object.allowed ?? false;
|
|
3762
4883
|
return message;
|
|
3763
4884
|
}
|
|
3764
4885
|
};
|
|
3765
|
-
function
|
|
3766
|
-
return {
|
|
4886
|
+
function createBaseSubjectPermissionsResponse() {
|
|
4887
|
+
return { permissions: [] };
|
|
3767
4888
|
}
|
|
3768
|
-
var
|
|
4889
|
+
var SubjectPermissionsResponse = {
|
|
3769
4890
|
encode(message, writer = new BinaryWriter3()) {
|
|
3770
|
-
|
|
3771
|
-
writer.uint32(
|
|
4891
|
+
for (const v of message.permissions) {
|
|
4892
|
+
SubjectPermission.encode(v, writer.uint32(10).fork()).join();
|
|
3772
4893
|
}
|
|
3773
4894
|
return writer;
|
|
3774
4895
|
},
|
|
@@ -3781,15 +4902,15 @@ var Decision = {
|
|
|
3781
4902
|
reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3782
4903
|
try {
|
|
3783
4904
|
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
3784
|
-
const message =
|
|
4905
|
+
const message = createBaseSubjectPermissionsResponse();
|
|
3785
4906
|
while (reader.pos < end) {
|
|
3786
4907
|
const tag = reader.uint32();
|
|
3787
4908
|
switch (tag >>> 3) {
|
|
3788
4909
|
case 1: {
|
|
3789
|
-
if (tag !==
|
|
4910
|
+
if (tag !== 10) {
|
|
3790
4911
|
break;
|
|
3791
4912
|
}
|
|
3792
|
-
message.
|
|
4913
|
+
message.permissions.push(SubjectPermission.decode(reader, reader.uint32()));
|
|
3793
4914
|
continue;
|
|
3794
4915
|
}
|
|
3795
4916
|
}
|
|
@@ -3804,21 +4925,23 @@ var Decision = {
|
|
|
3804
4925
|
}
|
|
3805
4926
|
},
|
|
3806
4927
|
fromJSON(object) {
|
|
3807
|
-
return {
|
|
4928
|
+
return {
|
|
4929
|
+
permissions: globalThis.Array.isArray(object?.permissions) ? object.permissions.map((e) => SubjectPermission.fromJSON(e)) : []
|
|
4930
|
+
};
|
|
3808
4931
|
},
|
|
3809
4932
|
toJSON(message) {
|
|
3810
4933
|
const obj = {};
|
|
3811
|
-
if (message.
|
|
3812
|
-
obj.
|
|
4934
|
+
if (message.permissions?.length) {
|
|
4935
|
+
obj.permissions = message.permissions.map((e) => SubjectPermission.toJSON(e));
|
|
3813
4936
|
}
|
|
3814
4937
|
return obj;
|
|
3815
4938
|
},
|
|
3816
4939
|
create(base) {
|
|
3817
|
-
return
|
|
4940
|
+
return SubjectPermissionsResponse.fromPartial(base ?? {});
|
|
3818
4941
|
},
|
|
3819
4942
|
fromPartial(object) {
|
|
3820
|
-
const message =
|
|
3821
|
-
message.
|
|
4943
|
+
const message = createBaseSubjectPermissionsResponse();
|
|
4944
|
+
message.permissions = object.permissions?.map((e) => SubjectPermission.fromPartial(e)) || [];
|
|
3822
4945
|
return message;
|
|
3823
4946
|
}
|
|
3824
4947
|
};
|
|
@@ -3914,6 +5037,14 @@ var AuthorizationDefinition = {
|
|
|
3914
5037
|
responseStream: false,
|
|
3915
5038
|
options: {}
|
|
3916
5039
|
},
|
|
5040
|
+
getSubjectPermissions: {
|
|
5041
|
+
name: "GetSubjectPermissions",
|
|
5042
|
+
requestType: SubjectPermissionsRequest,
|
|
5043
|
+
requestStream: false,
|
|
5044
|
+
responseType: SubjectPermissionsResponse,
|
|
5045
|
+
responseStream: false,
|
|
5046
|
+
options: {}
|
|
5047
|
+
},
|
|
3917
5048
|
getAllowedResources: {
|
|
3918
5049
|
name: "GetAllowedResources",
|
|
3919
5050
|
requestType: AllowedResourcesRequest,
|
|
@@ -22601,12 +23732,12 @@ async function checkModuleHealth(clientName, serviceUrl, service = "", grpcToken
|
|
|
22601
23732
|
}
|
|
22602
23733
|
const _healthClient = clientFactory.create(HealthDefinition, channel);
|
|
22603
23734
|
let error;
|
|
22604
|
-
const
|
|
23735
|
+
const status3 = await _healthClient.check({ service }).then((res) => {
|
|
22605
23736
|
return res.status;
|
|
22606
23737
|
}).catch((err) => error = err);
|
|
22607
23738
|
channel.close();
|
|
22608
23739
|
if (!error) {
|
|
22609
|
-
return
|
|
23740
|
+
return status3;
|
|
22610
23741
|
}
|
|
22611
23742
|
throw error;
|
|
22612
23743
|
}
|
|
@@ -23717,6 +24848,16 @@ var Authorization = class extends ConduitModule {
|
|
|
23717
24848
|
can(data) {
|
|
23718
24849
|
return this.client.can(data);
|
|
23719
24850
|
}
|
|
24851
|
+
/**
|
|
24852
|
+
* Lists actions declared on the resource definition.
|
|
24853
|
+
* A direct grant for an undeclared action can still pass `can()` and is omitted.
|
|
24854
|
+
* `actionPrefix` is literal (`overview` also matches `overviewer`; prefer `overview_`).
|
|
24855
|
+
* Subject and resource-definition changes drop the ~60s cache immediately.
|
|
24856
|
+
* Inherited access through an intermediate subject can lag until the TTL, as with `can()`.
|
|
24857
|
+
*/
|
|
24858
|
+
getSubjectPermissions(data) {
|
|
24859
|
+
return this.client.getSubjectPermissions(data);
|
|
24860
|
+
}
|
|
23720
24861
|
grantPermission(data) {
|
|
23721
24862
|
return this.client.grantPermission(data);
|
|
23722
24863
|
}
|
|
@@ -23732,6 +24873,7 @@ var Authorization = class extends ConduitModule {
|
|
|
23732
24873
|
};
|
|
23733
24874
|
|
|
23734
24875
|
// src/modules/authentication/index.ts
|
|
24876
|
+
import { status } from "@grpc/grpc-js";
|
|
23735
24877
|
var Authentication = class extends ConduitModule {
|
|
23736
24878
|
constructor(moduleName, url, grpcToken) {
|
|
23737
24879
|
super(moduleName, "authentication", url, grpcToken);
|
|
@@ -23739,29 +24881,76 @@ var Authentication = class extends ConduitModule {
|
|
|
23739
24881
|
this.initializeClient(AuthenticationDefinition);
|
|
23740
24882
|
}
|
|
23741
24883
|
moduleName;
|
|
23742
|
-
|
|
23743
|
-
|
|
24884
|
+
userCacheProvider;
|
|
24885
|
+
/**
|
|
24886
|
+
* Attaches a cache (or a lazy provider of one, resolved on every `getUser` call so that
|
|
24887
|
+
* no Redis connection is opened until it is needed) that `getUser` reads through.
|
|
24888
|
+
*/
|
|
24889
|
+
attachUserCache(cache) {
|
|
24890
|
+
this.userCacheProvider = typeof cache === "function" ? cache : cache ? () => cache : void 0;
|
|
24891
|
+
}
|
|
24892
|
+
hasUserCache() {
|
|
24893
|
+
return this.userCacheProvider !== void 0;
|
|
24894
|
+
}
|
|
24895
|
+
/**
|
|
24896
|
+
* Fetches a user document (never includes `hashedPassword`), reading through the
|
|
24897
|
+
* attached user cache (5 s TTL, see UserCache) when there is one. Cache problems never
|
|
24898
|
+
* fail or delay the call beyond the cache's own timeout; the cache write is fire-and-forget.
|
|
24899
|
+
*
|
|
24900
|
+
* The server answers gRPC NOT_FOUND for an unknown id and this method rejects with that
|
|
24901
|
+
* error (an empty response is also turned into a `GrpcError` NOT_FOUND).
|
|
24902
|
+
*/
|
|
24903
|
+
async getUser(userId) {
|
|
24904
|
+
let cache;
|
|
24905
|
+
try {
|
|
24906
|
+
cache = this.userCacheProvider?.();
|
|
24907
|
+
} catch {
|
|
24908
|
+
cache = void 0;
|
|
24909
|
+
}
|
|
24910
|
+
const cached = await cache?.get(userId);
|
|
24911
|
+
if (cached) return cached;
|
|
24912
|
+
const res = await this.client.getUser({ userId });
|
|
24913
|
+
if (!res?.user) {
|
|
24914
|
+
throw new GrpcError(status.NOT_FOUND, "User not found");
|
|
24915
|
+
}
|
|
24916
|
+
const user = JSON.parse(res.user);
|
|
24917
|
+
void cache?.set(userId, user);
|
|
24918
|
+
return user;
|
|
24919
|
+
}
|
|
24920
|
+
/**
|
|
24921
|
+
* Issues tokens for a user without a login. Trusted path: it runs no login strategy
|
|
24922
|
+
* and satisfies a realm's `requireTwoFa` policy without a 2FA step. `realm` (slug)
|
|
24923
|
+
* defaults to the user's home realm.
|
|
24924
|
+
*/
|
|
24925
|
+
userLogin(userId, clientId, realm) {
|
|
24926
|
+
return this.client.userLogin({ userId, clientId, realm });
|
|
23744
24927
|
}
|
|
23745
24928
|
userDelete(userId) {
|
|
23746
24929
|
return this.client.userDelete({ userId });
|
|
23747
24930
|
}
|
|
23748
|
-
userCreate(email, verify = false, password, anonymousId, userData) {
|
|
24931
|
+
userCreate(email, verify = false, password, anonymousId, userData, realm) {
|
|
23749
24932
|
return this.client.userCreate({
|
|
23750
24933
|
email,
|
|
23751
24934
|
verify,
|
|
23752
24935
|
password,
|
|
23753
24936
|
anonymousId,
|
|
23754
|
-
userData: JSON.stringify(userData)
|
|
24937
|
+
userData: JSON.stringify(userData),
|
|
24938
|
+
realm
|
|
23755
24939
|
});
|
|
23756
24940
|
}
|
|
23757
|
-
userCreateByUsername(username, password, anonymousId) {
|
|
23758
|
-
return this.client.userCreateByUsername({ username, password, anonymousId });
|
|
24941
|
+
userCreateByUsername(username, password, anonymousId, realm) {
|
|
24942
|
+
return this.client.userCreateByUsername({ username, password, anonymousId, realm });
|
|
23759
24943
|
}
|
|
23760
|
-
anonymousUserCreate(clientId) {
|
|
23761
|
-
return this.client.anonymousUserCreate({ clientId });
|
|
24944
|
+
anonymousUserCreate(clientId, realm) {
|
|
24945
|
+
return this.client.anonymousUserCreate({ clientId, realm });
|
|
23762
24946
|
}
|
|
23763
|
-
|
|
23764
|
-
|
|
24947
|
+
/**
|
|
24948
|
+
* Sets a new password. `realm` picks the account when the email is held by several accounts
|
|
24949
|
+
* (isolated identity mode): a realm slug picks that realm's account, `'global'` picks the
|
|
24950
|
+
* account without a home realm. Without it such an email is refused with FAILED_PRECONDITION.
|
|
24951
|
+
*/
|
|
24952
|
+
changePass(email, password, realm) {
|
|
24953
|
+
return this.client.changePass({ email, password, realm });
|
|
23765
24954
|
}
|
|
23766
24955
|
changeEmail(userId, newEmail) {
|
|
23767
24956
|
return this.client.changeEmail({ userId, newEmail });
|
|
@@ -23803,6 +24992,46 @@ var Authentication = class extends ConduitModule {
|
|
|
23803
24992
|
updateTeam(teamId, name, newParentTeamId) {
|
|
23804
24993
|
return this.client.updateTeam({ teamId, name, newParentTeamId });
|
|
23805
24994
|
}
|
|
24995
|
+
/**
|
|
24996
|
+
* Turns a top-level team into a realm, or updates the settings of an existing realm.
|
|
24997
|
+
* `settings` is the realm settings body (strategies, policies, registration, active);
|
|
24998
|
+
* it may carry OAuth secrets (write-only). Changing the slug of an existing realm
|
|
24999
|
+
* needs `force`.
|
|
25000
|
+
* Errors keep their gRPC code; module errors (REALM_SLUG_TAKEN, REALM_NESTED,
|
|
25001
|
+
* GUESTS_NOT_ALLOWED...) carry a JSON string message (`{"conduitCode", "message"}`),
|
|
25002
|
+
* so key on `conduitCode`.
|
|
25003
|
+
*/
|
|
25004
|
+
setTeamRealm(teamId, slug, settings, force = false) {
|
|
25005
|
+
return this.client.setTeamRealm({
|
|
25006
|
+
teamId,
|
|
25007
|
+
slug,
|
|
25008
|
+
settingsJson: settings === void 0 ? void 0 : JSON.stringify(settings),
|
|
25009
|
+
force
|
|
25010
|
+
});
|
|
25011
|
+
}
|
|
25012
|
+
/** The team, its masked realm settings (`settingsJson`, no secrets) and user counts. */
|
|
25013
|
+
getRealmSettings(teamId) {
|
|
25014
|
+
return this.client.getRealmSettings({ teamId });
|
|
25015
|
+
}
|
|
25016
|
+
/** Demotes a realm. Refused while home users exist unless `force`, which blocks them. */
|
|
25017
|
+
unsetTeamRealm(teamId, force = false) {
|
|
25018
|
+
return this.client.unsetTeamRealm({ teamId, force });
|
|
25019
|
+
}
|
|
25020
|
+
/**
|
|
25021
|
+
* `home` makes the realm the user's home realm, `guest` adds a guest membership.
|
|
25022
|
+
* Fails with FAILED_PRECONDITION when `home` would replace a different home realm
|
|
25023
|
+
* (unless `force`, which moves the user and revokes all their tokens) and when `guest`
|
|
25024
|
+
* is requested for a user whose home realm is this realm.
|
|
25025
|
+
* Errors keep their gRPC code; module errors carry a JSON string message
|
|
25026
|
+
* (`{"conduitCode", "message"}`), so key on `conduitCode`.
|
|
25027
|
+
*/
|
|
25028
|
+
grantRealmMembership(teamId, userId, type, force = false) {
|
|
25029
|
+
return this.client.grantRealmMembership({ teamId, userId, type, force });
|
|
25030
|
+
}
|
|
25031
|
+
/** Removes a guest membership (home users are moved, not removed). */
|
|
25032
|
+
revokeRealmMembership(teamId, userId) {
|
|
25033
|
+
return this.client.revokeRealmMembership({ teamId, userId, type: "", force: false });
|
|
25034
|
+
}
|
|
23806
25035
|
};
|
|
23807
25036
|
|
|
23808
25037
|
// src/modules/communications/index.ts
|
|
@@ -24262,6 +25491,22 @@ async function isLockContention(error) {
|
|
|
24262
25491
|
);
|
|
24263
25492
|
return voteErrors.length > 0 && voteErrors.every((voteError) => voteError instanceof ResourceLockedError);
|
|
24264
25493
|
}
|
|
25494
|
+
var CONSUME_KEY_IF_MATCHES_SCRIPT = `
|
|
25495
|
+
local stored = redis.call('GET', KEYS[1])
|
|
25496
|
+
if not stored then return 0 end
|
|
25497
|
+
if stored == ARGV[1] then
|
|
25498
|
+
redis.call('DEL', KEYS[1], KEYS[2])
|
|
25499
|
+
return 1
|
|
25500
|
+
end
|
|
25501
|
+
local attempts = redis.call('INCR', KEYS[2])
|
|
25502
|
+
if attempts >= tonumber(ARGV[2]) then
|
|
25503
|
+
redis.call('DEL', KEYS[1], KEYS[2])
|
|
25504
|
+
elseif attempts == 1 then
|
|
25505
|
+
local ttl = redis.call('PTTL', KEYS[1])
|
|
25506
|
+
if ttl > 0 then redis.call('PEXPIRE', KEYS[2], ttl) end
|
|
25507
|
+
end
|
|
25508
|
+
return 0
|
|
25509
|
+
`;
|
|
24265
25510
|
var StateManager = class {
|
|
24266
25511
|
redisClient;
|
|
24267
25512
|
redLock;
|
|
@@ -24357,13 +25602,175 @@ var StateManager = class {
|
|
|
24357
25602
|
getKey(keyName) {
|
|
24358
25603
|
return this.redisClient.get(keyName);
|
|
24359
25604
|
}
|
|
25605
|
+
/**
|
|
25606
|
+
* Deletes keyName and resolves true when it holds value. A mismatch is counted in
|
|
25607
|
+
* attemptsKey (expiring with keyName), and the maxAttempts-th mismatch deletes keyName.
|
|
25608
|
+
* Both keys must share a hash tag for Redis Cluster.
|
|
25609
|
+
*/
|
|
25610
|
+
async consumeKeyIfMatches(keyName, attemptsKey, value, maxAttempts) {
|
|
25611
|
+
const result = await this.redisClient.eval(
|
|
25612
|
+
CONSUME_KEY_IF_MATCHES_SCRIPT,
|
|
25613
|
+
2,
|
|
25614
|
+
keyName,
|
|
25615
|
+
attemptsKey,
|
|
25616
|
+
value,
|
|
25617
|
+
maxAttempts
|
|
25618
|
+
);
|
|
25619
|
+
return result === 1;
|
|
25620
|
+
}
|
|
24360
25621
|
incr(keyName) {
|
|
24361
25622
|
return this.redisClient.incr(keyName);
|
|
24362
25623
|
}
|
|
24363
25624
|
};
|
|
24364
25625
|
|
|
25626
|
+
// src/utilities/redisHelpers.ts
|
|
25627
|
+
var RedisTimeoutError = class extends Error {
|
|
25628
|
+
constructor(ms) {
|
|
25629
|
+
super(`Redis operation timed out after ${ms}ms`);
|
|
25630
|
+
}
|
|
25631
|
+
};
|
|
25632
|
+
function withTimeout(op, ms) {
|
|
25633
|
+
let timer;
|
|
25634
|
+
const timeout = new Promise((_, reject) => {
|
|
25635
|
+
timer = setTimeout(() => reject(new RedisTimeoutError(ms)), ms);
|
|
25636
|
+
});
|
|
25637
|
+
let pending;
|
|
25638
|
+
try {
|
|
25639
|
+
pending = op();
|
|
25640
|
+
} catch (e) {
|
|
25641
|
+
clearTimeout(timer);
|
|
25642
|
+
return Promise.reject(e);
|
|
25643
|
+
}
|
|
25644
|
+
return Promise.race([pending, timeout]).finally(() => clearTimeout(timer));
|
|
25645
|
+
}
|
|
25646
|
+
function silenceClientErrors(client, label) {
|
|
25647
|
+
const emitter = client;
|
|
25648
|
+
emitter.on?.("error", (e) => {
|
|
25649
|
+
const logger = getLogger();
|
|
25650
|
+
logger.debug?.(`${label} redis error: ${e?.message}`);
|
|
25651
|
+
});
|
|
25652
|
+
}
|
|
25653
|
+
async function inChunks(items, size, fn) {
|
|
25654
|
+
const failed = [];
|
|
25655
|
+
for (let i = 0; i < items.length; i += size) {
|
|
25656
|
+
const chunk = items.slice(i, i + size);
|
|
25657
|
+
try {
|
|
25658
|
+
await fn(chunk);
|
|
25659
|
+
} catch {
|
|
25660
|
+
failed.push(...chunk);
|
|
25661
|
+
}
|
|
25662
|
+
}
|
|
25663
|
+
return failed;
|
|
25664
|
+
}
|
|
25665
|
+
|
|
25666
|
+
// src/utilities/UserCache.ts
|
|
25667
|
+
var USER_CACHE_PREFIX = "auth_user_";
|
|
25668
|
+
var USER_CACHE_TTL_MS = 5e3;
|
|
25669
|
+
var OP_TIMEOUT_MS = 200;
|
|
25670
|
+
var CHUNK_SIZE = 100;
|
|
25671
|
+
var UserCache = class {
|
|
25672
|
+
client;
|
|
25673
|
+
constructor(redisManager) {
|
|
25674
|
+
const client = redisManager.getClient();
|
|
25675
|
+
silenceClientErrors(client, "UserCache");
|
|
25676
|
+
this.client = client;
|
|
25677
|
+
}
|
|
25678
|
+
key(id) {
|
|
25679
|
+
return USER_CACHE_PREFIX + id;
|
|
25680
|
+
}
|
|
25681
|
+
async get(id) {
|
|
25682
|
+
try {
|
|
25683
|
+
const raw = await withTimeout(() => this.client.get(this.key(id)), OP_TIMEOUT_MS);
|
|
25684
|
+
return raw ? JSON.parse(raw) : null;
|
|
25685
|
+
} catch {
|
|
25686
|
+
return null;
|
|
25687
|
+
}
|
|
25688
|
+
}
|
|
25689
|
+
async set(id, user) {
|
|
25690
|
+
try {
|
|
25691
|
+
await withTimeout(
|
|
25692
|
+
() => this.client.set(this.key(id), JSON.stringify(user), "PX", USER_CACHE_TTL_MS),
|
|
25693
|
+
OP_TIMEOUT_MS
|
|
25694
|
+
);
|
|
25695
|
+
} catch {
|
|
25696
|
+
}
|
|
25697
|
+
}
|
|
25698
|
+
async invalidate(id) {
|
|
25699
|
+
try {
|
|
25700
|
+
await withTimeout(() => this.client.del(this.key(id)), OP_TIMEOUT_MS);
|
|
25701
|
+
} catch {
|
|
25702
|
+
}
|
|
25703
|
+
}
|
|
25704
|
+
async invalidateMany(ids) {
|
|
25705
|
+
await inChunks(
|
|
25706
|
+
ids,
|
|
25707
|
+
CHUNK_SIZE,
|
|
25708
|
+
(chunk) => Promise.all(chunk.map((id) => this.invalidate(id))).then(() => void 0)
|
|
25709
|
+
);
|
|
25710
|
+
}
|
|
25711
|
+
};
|
|
25712
|
+
|
|
25713
|
+
// src/utilities/SessionRegistry.ts
|
|
25714
|
+
var SESSION_REGISTRY_PREFIX = "auth_session_";
|
|
25715
|
+
var OP_TIMEOUT_MS2 = 500;
|
|
25716
|
+
var CHUNK_SIZE2 = 100;
|
|
25717
|
+
var SessionRegistry = class _SessionRegistry {
|
|
25718
|
+
client;
|
|
25719
|
+
constructor(redisManager) {
|
|
25720
|
+
const client = redisManager.getClient();
|
|
25721
|
+
silenceClientErrors(client, "SessionRegistry");
|
|
25722
|
+
this.client = client;
|
|
25723
|
+
}
|
|
25724
|
+
key(sid) {
|
|
25725
|
+
return SESSION_REGISTRY_PREFIX + sid;
|
|
25726
|
+
}
|
|
25727
|
+
async run(op) {
|
|
25728
|
+
try {
|
|
25729
|
+
return await withTimeout(op, OP_TIMEOUT_MS2);
|
|
25730
|
+
} catch {
|
|
25731
|
+
throw new Error("Session registry unavailable");
|
|
25732
|
+
}
|
|
25733
|
+
}
|
|
25734
|
+
static ttl(ttlMs) {
|
|
25735
|
+
return Math.max(1, Math.ceil(ttlMs));
|
|
25736
|
+
}
|
|
25737
|
+
async register(sid, data, ttlMs) {
|
|
25738
|
+
const value = JSON.stringify({
|
|
25739
|
+
user: data.user,
|
|
25740
|
+
clientId: data.clientId,
|
|
25741
|
+
realm: data.realm ?? null
|
|
25742
|
+
});
|
|
25743
|
+
await this.run(
|
|
25744
|
+
() => this.client.set(this.key(sid), value, "PX", _SessionRegistry.ttl(ttlMs))
|
|
25745
|
+
);
|
|
25746
|
+
}
|
|
25747
|
+
/** Extends the session's lifetime. Does nothing for an unknown session. */
|
|
25748
|
+
async touch(sid, ttlMs) {
|
|
25749
|
+
await this.run(() => this.client.pexpire(this.key(sid), _SessionRegistry.ttl(ttlMs)));
|
|
25750
|
+
}
|
|
25751
|
+
async exists(sid) {
|
|
25752
|
+
return await this.run(() => this.client.exists(this.key(sid))) === 1;
|
|
25753
|
+
}
|
|
25754
|
+
async revoke(sid) {
|
|
25755
|
+
await this.run(() => this.client.del(this.key(sid)));
|
|
25756
|
+
}
|
|
25757
|
+
/** Attempts every sid; throws an Error listing the sids that could not be revoked. */
|
|
25758
|
+
async revokeMany(sids) {
|
|
25759
|
+
const failed = [];
|
|
25760
|
+
await inChunks(sids, CHUNK_SIZE2, async (chunk) => {
|
|
25761
|
+
const results = await Promise.allSettled(chunk.map((sid) => this.revoke(sid)));
|
|
25762
|
+
results.forEach((r, i) => {
|
|
25763
|
+
if (r.status === "rejected") failed.push(chunk[i]);
|
|
25764
|
+
});
|
|
25765
|
+
});
|
|
25766
|
+
if (failed.length > 0) {
|
|
25767
|
+
throw new Error(`Failed to revoke sessions: ${failed.join(", ")}`);
|
|
25768
|
+
}
|
|
25769
|
+
}
|
|
25770
|
+
};
|
|
25771
|
+
|
|
24365
25772
|
// src/index.ts
|
|
24366
|
-
import { status } from "@grpc/grpc-js";
|
|
25773
|
+
import { status as status2 } from "@grpc/grpc-js";
|
|
24367
25774
|
import { createSigner } from "fast-jwt";
|
|
24368
25775
|
|
|
24369
25776
|
// src/interfaces/Route.ts
|
|
@@ -24438,6 +25845,8 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
|
|
|
24438
25845
|
_dynamicModules = {};
|
|
24439
25846
|
_eventBus;
|
|
24440
25847
|
_stateManager;
|
|
25848
|
+
_userCache;
|
|
25849
|
+
_sessionRegistry;
|
|
24441
25850
|
lastSearch = Date.now();
|
|
24442
25851
|
urlRemap;
|
|
24443
25852
|
_serviceHealthStatusGetter;
|
|
@@ -24521,6 +25930,20 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
|
|
|
24521
25930
|
return null;
|
|
24522
25931
|
}
|
|
24523
25932
|
}
|
|
25933
|
+
/** Redis-backed user cache. Throws when Redis is not initialized. */
|
|
25934
|
+
get userCache() {
|
|
25935
|
+
if (!this._userCache) {
|
|
25936
|
+
this._userCache = new UserCache(this.redisManager);
|
|
25937
|
+
}
|
|
25938
|
+
return this._userCache;
|
|
25939
|
+
}
|
|
25940
|
+
/** Redis-backed session registry. Throws when Redis is not initialized. */
|
|
25941
|
+
get sessionRegistry() {
|
|
25942
|
+
if (!this._sessionRegistry) {
|
|
25943
|
+
this._sessionRegistry = new SessionRegistry(this.redisManager);
|
|
25944
|
+
}
|
|
25945
|
+
return this._sessionRegistry;
|
|
25946
|
+
}
|
|
24524
25947
|
get core() {
|
|
24525
25948
|
return this._core;
|
|
24526
25949
|
}
|
|
@@ -24638,7 +26061,7 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
|
|
|
24638
26061
|
return;
|
|
24639
26062
|
}
|
|
24640
26063
|
} catch (err) {
|
|
24641
|
-
if (err.code ===
|
|
26064
|
+
if (err.code === status2.PERMISSION_DENIED) {
|
|
24642
26065
|
_ConduitGrpcSdk.Logger.error(err);
|
|
24643
26066
|
throw err;
|
|
24644
26067
|
}
|
|
@@ -24727,7 +26150,7 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
|
|
|
24727
26150
|
this.waitForExistence(moduleName, onlyIfServing),
|
|
24728
26151
|
sleep(options.timeoutMs).then(() => {
|
|
24729
26152
|
throw new GrpcError(
|
|
24730
|
-
|
|
26153
|
+
status2.DEADLINE_EXCEEDED,
|
|
24731
26154
|
`awaitPeer(${moduleName}) timed out after ${options.timeoutMs}ms`
|
|
24732
26155
|
);
|
|
24733
26156
|
})
|
|
@@ -24916,6 +26339,11 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
|
|
|
24916
26339
|
moduleUrl,
|
|
24917
26340
|
this._grpcToken
|
|
24918
26341
|
);
|
|
26342
|
+
if (moduleName === "authentication") {
|
|
26343
|
+
this._modules[moduleName].attachUserCache(
|
|
26344
|
+
() => this._redisManager ? this.userCache : void 0
|
|
26345
|
+
);
|
|
26346
|
+
}
|
|
24919
26347
|
} else if (this._dynamicModules[moduleName]) {
|
|
24920
26348
|
_ConduitGrpcSdk.Logger.info(`Creating gRPC client for ${moduleName}`);
|
|
24921
26349
|
this._modules[moduleName] = new ConduitModule(
|
|
@@ -25150,6 +26578,7 @@ export {
|
|
|
25150
26578
|
GetMessageStatusResponse,
|
|
25151
26579
|
GetNotificationTokensRequest,
|
|
25152
26580
|
GetNotificationTokensResponse,
|
|
26581
|
+
GetRealmSettingsRequest,
|
|
25153
26582
|
GetRedisDetailsResponse,
|
|
25154
26583
|
GetRoomResponse,
|
|
25155
26584
|
GetSchemaRequest,
|
|
@@ -25158,6 +26587,8 @@ export {
|
|
|
25158
26587
|
GetStatusRequest,
|
|
25159
26588
|
GetStatusResponse,
|
|
25160
26589
|
GetTeamRequest,
|
|
26590
|
+
GetUserRequest,
|
|
26591
|
+
GetUserResponse,
|
|
25161
26592
|
GrpcError,
|
|
25162
26593
|
HealthCheckRequest,
|
|
25163
26594
|
HealthCheckResponse,
|
|
@@ -25198,6 +26629,8 @@ export {
|
|
|
25198
26629
|
RawQueryRequest_RawQuery,
|
|
25199
26630
|
RawQueryRequest_RawQuery_MongoQuery,
|
|
25200
26631
|
RawQueryRequest_RawQuery_SQLQuery,
|
|
26632
|
+
RealmMembershipRequest,
|
|
26633
|
+
RealmResponse,
|
|
25201
26634
|
RegisterAdminRouteRequest,
|
|
25202
26635
|
RegisterAdminRouteRequest_ConduitRouteOptions,
|
|
25203
26636
|
RegisterAdminRouteRequest_ConduitRouteReturnDefinition,
|
|
@@ -25235,6 +26668,7 @@ export {
|
|
|
25235
26668
|
Room,
|
|
25236
26669
|
Router,
|
|
25237
26670
|
RouterDefinition,
|
|
26671
|
+
SESSION_REGISTRY_PREFIX,
|
|
25238
26672
|
SMS,
|
|
25239
26673
|
SQLDataType,
|
|
25240
26674
|
Schema,
|
|
@@ -25266,10 +26700,12 @@ export {
|
|
|
25266
26700
|
SendWithFallbackRequest_SendCommunicationParams,
|
|
25267
26701
|
SendWithFallbackResponse,
|
|
25268
26702
|
SendWithFallbackResponse_ChannelResult,
|
|
26703
|
+
SessionRegistry,
|
|
25269
26704
|
SetConfigRequest,
|
|
25270
26705
|
SetConfigResponse,
|
|
25271
26706
|
SetNotificationTokenRequest,
|
|
25272
26707
|
SetNotificationTokenResponse,
|
|
26708
|
+
SetTeamRealmRequest,
|
|
25273
26709
|
SocketData,
|
|
25274
26710
|
SocketPushRequest,
|
|
25275
26711
|
SocketRequest,
|
|
@@ -25278,10 +26714,17 @@ export {
|
|
|
25278
26714
|
StartBackfillResponse,
|
|
25279
26715
|
Storage,
|
|
25280
26716
|
StorageDefinition,
|
|
26717
|
+
SubjectPermission,
|
|
26718
|
+
SubjectPermissionsRequest,
|
|
26719
|
+
SubjectPermissionsResponse,
|
|
25281
26720
|
TYPE,
|
|
25282
26721
|
Team,
|
|
25283
26722
|
TeamDeleteRequest,
|
|
25284
26723
|
TeamDeleteResponse,
|
|
26724
|
+
USER_CACHE_PREFIX,
|
|
26725
|
+
USER_CACHE_TTL_MS,
|
|
26726
|
+
UnsetTeamRealmRequest,
|
|
26727
|
+
UnsetTeamRealmResponse,
|
|
25285
26728
|
UpdateCommunicationTemplateRequest,
|
|
25286
26729
|
UpdateConfigRequest,
|
|
25287
26730
|
UpdateConfigResponse,
|
|
@@ -25293,6 +26736,7 @@ export {
|
|
|
25293
26736
|
UpdateTemplateRequest,
|
|
25294
26737
|
UpsertConfigRequest,
|
|
25295
26738
|
UpsertConfigResponse,
|
|
26739
|
+
UserCache,
|
|
25296
26740
|
UserChangeEmail,
|
|
25297
26741
|
UserChangeEmailResponse,
|
|
25298
26742
|
UserChangePass,
|