@fonoster/authz 0.9.20 → 0.9.23

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.
@@ -1,4 +1,4 @@
1
- import { CheckMethodAuthorizedRequest, AddBillingMeterEventRequest, VoiceRequest } from "../types";
1
+ import { AddBillingMeterEventRequest, CheckMethodAuthorizedRequest, VoiceRequest } from "../types";
2
2
  /**
3
3
  * AuthzClient class to interact with the AuthzServer via gRPC.
4
4
  */
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.AuthzClient = void 0;
37
- /*
37
+ /**
38
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
39
39
  * http://github.com/fonoster/fonoster
40
40
  *
@@ -1,5 +1,23 @@
1
+ /**
2
+ * Copyright (C) 2025 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
+ */
1
19
  import * as grpc from "@grpc/grpc-js";
2
- import { CheckMethodAuthorizedRequest, VoiceRequest, AddBillingMeterEventRequest } from "../types";
20
+ import { AddBillingMeterEventRequest, CheckMethodAuthorizedRequest, VoiceRequest } from "../types";
3
21
  /**
4
22
  * Interface representing the AuthzService client methods.
5
23
  * This should match the service definition used by the server.
@@ -11,6 +29,6 @@ interface AuthzServiceClient extends grpc.Client {
11
29
  checkMethodAuthorized(request: CheckMethodAuthorizedRequest, callback: grpc.requestCallback<{
12
30
  authorized: boolean;
13
31
  }>): void;
14
- addBillingMeterEvent(request: AddBillingMeterEventRequest, callback: grpc.requestCallback<{}>): void;
32
+ addBillingMeterEvent(request: AddBillingMeterEventRequest, callback: grpc.requestCallback<object>): void;
15
33
  }
16
34
  export { AuthzServiceClient };
@@ -1,2 +1,20 @@
1
+ /**
2
+ * Copyright (C) 2025 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
+ */
1
19
  export * from "./AuthzClient";
2
20
  export * from "./AuthzServiceClient";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /*
17
+ /**
18
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/fonoster
20
20
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createCheckMethodAuthorized = createCheckMethodAuthorized;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
package/dist/index.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 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
+ */
1
19
  export * from "./server";
2
20
  export * from "./client";
3
21
  export * from "./createCheckMethodAuthorized";
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /*
17
+ /**
18
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/fonoster
20
20
  *
@@ -1,4 +1,4 @@
1
- import { ServerConfig, AuthzHandler } from "../types";
1
+ import { AuthzHandler, ServerConfig } from "../types";
2
2
  declare class AuthzServer {
3
3
  config: ServerConfig;
4
4
  constructor(config?: ServerConfig);
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.AuthzServer = void 0;
40
- /*
40
+ /**
41
41
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
42
42
  * http://github.com/fonoster/fonoster
43
43
  *
@@ -60,9 +60,9 @@ const logger_1 = require("@fonoster/logger");
60
60
  const grpc = __importStar(require("@grpc/grpc-js"));
61
61
  const deepmerge_1 = __importDefault(require("deepmerge"));
62
62
  const grpc_health_check_1 = require("grpc-health-check");
63
- const defaultServerConfig_1 = require("./defaultServerConfig");
64
- const serviceDefinition_1 = require("../serviceDefinition");
65
63
  const pb_util_1 = require("pb-util");
64
+ const serviceDefinition_1 = require("../serviceDefinition");
65
+ const defaultServerConfig_1 = require("./defaultServerConfig");
66
66
  const logger = (0, logger_1.getLogger)({ service: "authz", filePath: __filename });
67
67
  class AuthzServer {
68
68
  constructor(config = defaultServerConfig_1.defaultServerConfig) {
@@ -1,4 +1,4 @@
1
- import { AuthzHandler, AddBillingMeterEventRequest, CheckMethodAuthorizedRequest, VoiceRequest } from "../types";
1
+ import { AddBillingMeterEventRequest, AuthzHandler, CheckMethodAuthorizedRequest, VoiceRequest } from "../types";
2
2
  declare class DummyAuthzHandler implements AuthzHandler {
3
3
  checkSessionAuthorized(request: VoiceRequest): Promise<boolean>;
4
4
  checkMethodAuthorized(request: CheckMethodAuthorizedRequest): Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DummyAuthzHandler = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 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
+ */
1
19
  import { ServerConfig } from "../types";
2
20
  declare const defaultServerConfig: ServerConfig;
3
21
  export { defaultServerConfig };
@@ -1 +1,19 @@
1
+ /**
2
+ * Copyright (C) 2025 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
+ */
1
19
  export * from "./AuthzServer";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /*
17
+ /**
18
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/fonoster
20
20
  *
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- /*
3
+ /**
4
4
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
5
5
  * http://github.com/fonoster/fonoster
6
6
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serviceDefinition = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
package/dist/types.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 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
+ */
1
19
  import { VoiceRequest } from "@fonoster/common";
2
20
  type ServerConfig = {
3
21
  bind?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/authz",
3
- "version": "0.9.20",
3
+ "version": "0.9.23",
4
4
  "description": "Authorization module for Fonoster",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -26,9 +26,9 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@fonoster/common": "^0.9.20",
30
- "@fonoster/identity": "^0.9.20",
31
- "@fonoster/logger": "^0.9.12",
29
+ "@fonoster/common": "^0.9.23",
30
+ "@fonoster/identity": "^0.9.23",
31
+ "@fonoster/logger": "^0.9.22",
32
32
  "@grpc/grpc-js": "~1.10.6",
33
33
  "deepmerge": "^4.3.1",
34
34
  "grpc-health-check": "^2.0.2"
@@ -40,5 +40,5 @@
40
40
  "bugs": {
41
41
  "url": "https://github.com/fonoster/fonoster/issues"
42
42
  },
43
- "gitHead": "d48ba5f00cf72b81a1ed6d9fcc34036a99e3cc8e"
43
+ "gitHead": "32d7a9e95172b4e6e10cc549aec6bc5894f09ee7"
44
44
  }