@fonoster/common 0.7.56 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
19
+ syntax = "proto3";
20
+
21
+ package fonoster.authz.v1beta2;
22
+
23
+ import "google/protobuf/struct.proto";
24
+ import "google/protobuf/empty.proto";
25
+
26
+ import "voice.proto";
27
+
28
+ // Authentication service definition
29
+ service Authz {
30
+ // Check if a user has permission to perform an action
31
+ rpc CheckSessionAuthorized (fonoster.voice.v1beta2.CreateSessionRequest) returns (CheckSessionAuthorizedResponse) {}
32
+ // Check if a given accessKeyId has permission to access a method
33
+ rpc CheckMethodAuthorized (CheckMethodAuthorizedRequest) returns (CheckMethodAuthorizedResponse) {}
34
+ // Add billing meter event to an account
35
+ rpc AddBillingMeterEvent (AddBillingMeterEventRequest) returns (google.protobuf.Empty) {}
36
+ }
37
+
38
+ // Response message for the CheckVoiceRequestAuthorized method
39
+ message CheckSessionAuthorizedResponse {
40
+ // The authorization server will look for one or more parameters in the request
41
+ // to determine if the request is authorized. If the request is authorized, the
42
+ // response will have the value true.
43
+ bool authorized = 1;
44
+ }
45
+
46
+ // Request message for the CheckMethodAuthorized method
47
+ message CheckMethodAuthorizedRequest {
48
+ // The accessKeyId to check
49
+ string accessKeyId = 1;
50
+ // The method to check
51
+ string method = 2;
52
+ }
53
+
54
+ // Response message for the CheckMethodAuthorized method
55
+ message CheckMethodAuthorizedResponse {
56
+ // The authorization server will check the accessKeyId and method to determine if
57
+ // the request is authorized. If the request is authorized, the response will have
58
+ // the value true.
59
+ bool authorized = 1;
60
+ }
61
+
62
+ // Request message for the ChargeAccount method
63
+ message AddBillingMeterEventRequest {
64
+ // The accessKeyId to charge
65
+ string accessKeyId = 1;
66
+ // The payload for the event
67
+ google.protobuf.Struct payload = 2;
68
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/common",
3
- "version": "0.7.56",
3
+ "version": "0.8.4",
4
4
  "description": "Common library for Fonoster projects",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -18,7 +18,7 @@
18
18
  "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
19
19
  },
20
20
  "dependencies": {
21
- "@fonoster/logger": "^0.7.56",
21
+ "@fonoster/logger": "^0.8.4",
22
22
  "@grpc/grpc-js": "~1.10.6",
23
23
  "@grpc/proto-loader": "^0.7.12",
24
24
  "dotenv": "^16.4.7",
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@types/nodemailer": "^6.4.14"
47
47
  },
48
- "gitHead": "f918235ae68a49970b45022637347f673ca63941"
48
+ "gitHead": "230bf0c9b793e5de49ffeb30ee1bd62226f55cba"
49
49
  }