@tdxvolt/volt-client-grpc 0.20.20 → 0.20.21
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/lib/index.cjs +64 -13
- package/package.json +3 -3
- package/src/volt-client.js +4 -0
- package/src/volt-proto-literals.js +60 -13
package/lib/index.cjs
CHANGED
|
@@ -2237,6 +2237,15 @@ enum SecureMode {
|
|
|
2237
2237
|
SECURE_MODE_TLS = 2;
|
|
2238
2238
|
}
|
|
2239
2239
|
|
|
2240
|
+
// Per-method gRPC rate limit (unary: each RPC; client/bidi streams: first client message only).
|
|
2241
|
+
message GrpcRpcRateLimit {
|
|
2242
|
+
// Full gRPC method path, e.g. "/tdx.volt_api.volt.v1.VoltAPI/SendEmail"
|
|
2243
|
+
string method_full_name = 1;
|
|
2244
|
+
|
|
2245
|
+
// Maximum requests allowed per rolling 60-second window per identity. Zero disables this rule.
|
|
2246
|
+
uint32 max_requests_per_minute = 2;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2240
2249
|
// Encapsulates the various Volt parameters that are configurable by the Volt owner.
|
|
2241
2250
|
message VoltParameters {
|
|
2242
2251
|
string id = 1;
|
|
@@ -2412,6 +2421,9 @@ message VoltParameters {
|
|
|
2412
2421
|
// Number of gRPC event processing threads.
|
|
2413
2422
|
// If unset or zero, the server default thread count is used.
|
|
2414
2423
|
uint32 grpc_num_event_threads = 56;
|
|
2424
|
+
|
|
2425
|
+
// Optional per-method gRPC rate limits (see GrpcRpcRateLimit). Keyed by peer identity or fingerprint.
|
|
2426
|
+
repeated GrpcRpcRateLimit grpc_rpc_rate_limit = 57;
|
|
2415
2427
|
}
|
|
2416
2428
|
|
|
2417
2429
|
message VoltEndpoint {
|
|
@@ -2802,6 +2814,27 @@ message Session {
|
|
|
2802
2814
|
|
|
2803
2815
|
SessionStatus status = 10;
|
|
2804
2816
|
}
|
|
2817
|
+
|
|
2818
|
+
message Email {
|
|
2819
|
+
// The email address to send to.
|
|
2820
|
+
repeated string to = 1;
|
|
2821
|
+
|
|
2822
|
+
// The email address to send cc to.
|
|
2823
|
+
repeated string cc = 2;
|
|
2824
|
+
|
|
2825
|
+
// The email address to send bcc to.
|
|
2826
|
+
repeated string bcc = 3;
|
|
2827
|
+
|
|
2828
|
+
// The subject of the email.
|
|
2829
|
+
string subject = 4;
|
|
2830
|
+
|
|
2831
|
+
// The body of the email.
|
|
2832
|
+
string body = 5;
|
|
2833
|
+
|
|
2834
|
+
// The email address to send from.
|
|
2835
|
+
string from = 6;
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2805
2838
|
`;
|
|
2806
2839
|
const volt_api = `syntax = "proto3";
|
|
2807
2840
|
|
|
@@ -2950,6 +2983,10 @@ service VoltAPI {
|
|
|
2950
2983
|
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2951
2984
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2952
2985
|
|
|
2986
|
+
// Send an email.
|
|
2987
|
+
// This is a privileged API call and requires volt:api-call / volt:send-email permission.
|
|
2988
|
+
rpc SendEmail(SendEmailRequest) returns (SendEmailResponse);
|
|
2989
|
+
|
|
2953
2990
|
// Set Volt access request decision.
|
|
2954
2991
|
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2955
2992
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
@@ -3970,6 +4007,29 @@ message SaveSessionResponse {
|
|
|
3970
4007
|
Session session = 2;
|
|
3971
4008
|
}
|
|
3972
4009
|
|
|
4010
|
+
message SendEmailRequest {
|
|
4011
|
+
// The email to send.
|
|
4012
|
+
Email email = 1;
|
|
4013
|
+
}
|
|
4014
|
+
|
|
4015
|
+
message SendEmailResponse {
|
|
4016
|
+
// Details of any error that occurred on the call.
|
|
4017
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
message SetAccessRequestDecisionRequest {
|
|
4021
|
+
// The id of the access request.
|
|
4022
|
+
string id = 1;
|
|
4023
|
+
|
|
4024
|
+
// The decision to save against the access request.
|
|
4025
|
+
PolicyDecision decision = 2;
|
|
4026
|
+
}
|
|
4027
|
+
|
|
4028
|
+
message SetAccessRequestDecisionResponse {
|
|
4029
|
+
// Details of any error that occurred on the call.
|
|
4030
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
4031
|
+
}
|
|
4032
|
+
|
|
3973
4033
|
message SetPolicyRequest {
|
|
3974
4034
|
// The id of the policy to set.
|
|
3975
4035
|
// Should be either 00000000-0000-0000-0000-000000000000 or 00000000-0000-0000-0000-000000000001 for the first or last custom policy respectively.
|
|
@@ -3997,19 +4057,6 @@ message SetServiceStatusResponse {
|
|
|
3997
4057
|
Resource resource = 2;
|
|
3998
4058
|
}
|
|
3999
4059
|
|
|
4000
|
-
message SetAccessRequestDecisionRequest {
|
|
4001
|
-
// The id of the access request.
|
|
4002
|
-
string id = 1;
|
|
4003
|
-
|
|
4004
|
-
// The decision to save against the access request.
|
|
4005
|
-
PolicyDecision decision = 2;
|
|
4006
|
-
}
|
|
4007
|
-
|
|
4008
|
-
message SetAccessRequestDecisionResponse {
|
|
4009
|
-
// Details of any error that occurred on the call.
|
|
4010
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
4011
|
-
}
|
|
4012
|
-
|
|
4013
4060
|
// This message is emtpy.
|
|
4014
4061
|
message ShutdownRequest {
|
|
4015
4062
|
}
|
|
@@ -6348,6 +6395,10 @@ class VoltClient extends EventEmitter__default["default"] {
|
|
|
6348
6395
|
return unaryCallInternal.call(this, "SaveSession", request);
|
|
6349
6396
|
}
|
|
6350
6397
|
|
|
6398
|
+
SendEmail(request) {
|
|
6399
|
+
return unaryCallInternal.call(this, "SendEmail", request);
|
|
6400
|
+
}
|
|
6401
|
+
|
|
6351
6402
|
SetAccessRequestDecision(request) {
|
|
6352
6403
|
return unaryCallInternal.call(this, "SetAccessRequestDecision", request);
|
|
6353
6404
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.20.
|
|
6
|
+
"version": "0.20.21",
|
|
7
7
|
"description": "tdx Volt library for nodejs clients",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"author": "toby.ealden@gmail.com",
|
|
34
34
|
"license": "ISC",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tdxvolt/volt-client-web": "^0.20.
|
|
37
|
-
"@tdxvolt/volt-utility": "^0.20.
|
|
36
|
+
"@tdxvolt/volt-client-web": "^0.20.21",
|
|
37
|
+
"@tdxvolt/volt-utility": "^0.20.21",
|
|
38
38
|
"debug": "^4.1.1",
|
|
39
39
|
"ip": "^1.1.5",
|
|
40
40
|
"jsonwebtoken": "^8.5.1",
|
package/src/volt-client.js
CHANGED
|
@@ -471,6 +471,10 @@ export class VoltClient extends EventEmitter {
|
|
|
471
471
|
return unaryCallInternal.call(this, "SaveSession", request);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
+
SendEmail(request) {
|
|
475
|
+
return unaryCallInternal.call(this, "SendEmail", request);
|
|
476
|
+
}
|
|
477
|
+
|
|
474
478
|
SetAccessRequestDecision(request) {
|
|
475
479
|
return unaryCallInternal.call(this, "SetAccessRequestDecision", request);
|
|
476
480
|
}
|
|
@@ -1689,6 +1689,15 @@ enum SecureMode {
|
|
|
1689
1689
|
SECURE_MODE_TLS = 2;
|
|
1690
1690
|
}
|
|
1691
1691
|
|
|
1692
|
+
// Per-method gRPC rate limit (unary: each RPC; client/bidi streams: first client message only).
|
|
1693
|
+
message GrpcRpcRateLimit {
|
|
1694
|
+
// Full gRPC method path, e.g. "/tdx.volt_api.volt.v1.VoltAPI/SendEmail"
|
|
1695
|
+
string method_full_name = 1;
|
|
1696
|
+
|
|
1697
|
+
// Maximum requests allowed per rolling 60-second window per identity. Zero disables this rule.
|
|
1698
|
+
uint32 max_requests_per_minute = 2;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1692
1701
|
// Encapsulates the various Volt parameters that are configurable by the Volt owner.
|
|
1693
1702
|
message VoltParameters {
|
|
1694
1703
|
string id = 1;
|
|
@@ -1864,6 +1873,9 @@ message VoltParameters {
|
|
|
1864
1873
|
// Number of gRPC event processing threads.
|
|
1865
1874
|
// If unset or zero, the server default thread count is used.
|
|
1866
1875
|
uint32 grpc_num_event_threads = 56;
|
|
1876
|
+
|
|
1877
|
+
// Optional per-method gRPC rate limits (see GrpcRpcRateLimit). Keyed by peer identity or fingerprint.
|
|
1878
|
+
repeated GrpcRpcRateLimit grpc_rpc_rate_limit = 57;
|
|
1867
1879
|
}
|
|
1868
1880
|
|
|
1869
1881
|
message VoltEndpoint {
|
|
@@ -2254,6 +2266,27 @@ message Session {
|
|
|
2254
2266
|
|
|
2255
2267
|
SessionStatus status = 10;
|
|
2256
2268
|
}
|
|
2269
|
+
|
|
2270
|
+
message Email {
|
|
2271
|
+
// The email address to send to.
|
|
2272
|
+
repeated string to = 1;
|
|
2273
|
+
|
|
2274
|
+
// The email address to send cc to.
|
|
2275
|
+
repeated string cc = 2;
|
|
2276
|
+
|
|
2277
|
+
// The email address to send bcc to.
|
|
2278
|
+
repeated string bcc = 3;
|
|
2279
|
+
|
|
2280
|
+
// The subject of the email.
|
|
2281
|
+
string subject = 4;
|
|
2282
|
+
|
|
2283
|
+
// The body of the email.
|
|
2284
|
+
string body = 5;
|
|
2285
|
+
|
|
2286
|
+
// The email address to send from.
|
|
2287
|
+
string from = 6;
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2257
2290
|
`;
|
|
2258
2291
|
export const volt_api = `syntax = "proto3";
|
|
2259
2292
|
|
|
@@ -2402,6 +2435,10 @@ service VoltAPI {
|
|
|
2402
2435
|
// Requires \`volt:session-write\` permission. Authenticated sessions have this privilege by default.
|
|
2403
2436
|
rpc SaveSession(SaveSessionRequest) returns (SaveSessionResponse);
|
|
2404
2437
|
|
|
2438
|
+
// Send an email.
|
|
2439
|
+
// This is a privileged API call and requires volt:api-call / volt:send-email permission.
|
|
2440
|
+
rpc SendEmail(SendEmailRequest) returns (SendEmailResponse);
|
|
2441
|
+
|
|
2405
2442
|
// Set Volt access request decision.
|
|
2406
2443
|
// This is a privileged API call and requires volt:api-call / volt:set-access-request-decision permission.
|
|
2407
2444
|
rpc SetAccessRequestDecision(SetAccessRequestDecisionRequest) returns (SetAccessRequestDecisionResponse);
|
|
@@ -3422,6 +3459,29 @@ message SaveSessionResponse {
|
|
|
3422
3459
|
Session session = 2;
|
|
3423
3460
|
}
|
|
3424
3461
|
|
|
3462
|
+
message SendEmailRequest {
|
|
3463
|
+
// The email to send.
|
|
3464
|
+
Email email = 1;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
message SendEmailResponse {
|
|
3468
|
+
// Details of any error that occurred on the call.
|
|
3469
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3470
|
+
}
|
|
3471
|
+
|
|
3472
|
+
message SetAccessRequestDecisionRequest {
|
|
3473
|
+
// The id of the access request.
|
|
3474
|
+
string id = 1;
|
|
3475
|
+
|
|
3476
|
+
// The decision to save against the access request.
|
|
3477
|
+
PolicyDecision decision = 2;
|
|
3478
|
+
}
|
|
3479
|
+
|
|
3480
|
+
message SetAccessRequestDecisionResponse {
|
|
3481
|
+
// Details of any error that occurred on the call.
|
|
3482
|
+
tdx.volt_api.volt.v1.Status status = 1;
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3425
3485
|
message SetPolicyRequest {
|
|
3426
3486
|
// The id of the policy to set.
|
|
3427
3487
|
// Should be either 00000000-0000-0000-0000-000000000000 or 00000000-0000-0000-0000-000000000001 for the first or last custom policy respectively.
|
|
@@ -3449,19 +3509,6 @@ message SetServiceStatusResponse {
|
|
|
3449
3509
|
Resource resource = 2;
|
|
3450
3510
|
}
|
|
3451
3511
|
|
|
3452
|
-
message SetAccessRequestDecisionRequest {
|
|
3453
|
-
// The id of the access request.
|
|
3454
|
-
string id = 1;
|
|
3455
|
-
|
|
3456
|
-
// The decision to save against the access request.
|
|
3457
|
-
PolicyDecision decision = 2;
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
message SetAccessRequestDecisionResponse {
|
|
3461
|
-
// Details of any error that occurred on the call.
|
|
3462
|
-
tdx.volt_api.volt.v1.Status status = 1;
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
3512
|
// This message is emtpy.
|
|
3466
3513
|
message ShutdownRequest {
|
|
3467
3514
|
}
|