@fonoster/apiserver 0.44.0 → 0.46.0

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.
@@ -29,7 +29,7 @@ const featuresSchema = zod_1.z
29
29
  billing: zod_1.z
30
30
  .object({
31
31
  enabled: zod_1.z.boolean().default(false),
32
- /** The billing service's Billing API (host:port); defaults to authz.host:50073. */
32
+ /** The billing service's Billing API (host:port); required when billing is enabled. */
33
33
  address: zod_1.z.string().min(1).optional()
34
34
  })
35
35
  .prefault({}),
@@ -301,11 +301,11 @@ const fonosterConfigSchema = zod_1.z
301
301
  message: "required when authz.enabled is true"
302
302
  });
303
303
  }
304
- if (config.features.billing.enabled && !config.authz.enabled) {
304
+ if (config.features.billing.enabled && !config.features.billing.address) {
305
305
  ctx.addIssue({
306
306
  code: "custom",
307
- path: ["features", "billing", "enabled"],
308
- message: "billing needs the authorization service (authz.enabled)"
307
+ path: ["features", "billing", "address"],
308
+ message: "required when features.billing.enabled is true"
309
309
  });
310
310
  }
311
311
  if (config.features.auth.methods.includes("github") &&
package/dist/envs.js CHANGED
@@ -80,7 +80,7 @@ exports.IDENTITY_DATABASE_URL = identity.dbUrl;
80
80
  /** Billing is on (Cloud): stored usage is published for the billing service (add-billing-service D2). */
81
81
  exports.BILLING_ENABLED = config.features.billing.enabled;
82
82
  /** Where the Billing API is served (the billing service). */
83
- exports.BILLING_ADDRESS = (_c = config.features.billing.address) !== null && _c !== void 0 ? _c : `${config.authz.host}:50073`;
83
+ exports.BILLING_ADDRESS = (_c = config.features.billing.address) !== null && _c !== void 0 ? _c : "";
84
84
  // Authz configurations
85
85
  exports.AUTHZ_SERVICE_ENABLED = config.authz.enabled;
86
86
  exports.AUTHZ_SERVICE_HOST = config.authz.host;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/apiserver",
3
- "version": "0.44.0",
3
+ "version": "0.46.0",
4
4
  "description": "APIServer for Fonoster",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -23,14 +23,14 @@
23
23
  "fonoster-owner": "./dist/bin/owner.js"
24
24
  },
25
25
  "dependencies": {
26
- "@fonoster/authz": "^0.44.0",
27
- "@fonoster/autopilot": "^0.44.0",
28
- "@fonoster/callrecord": "^0.44.0",
29
- "@fonoster/common": "^0.44.0",
30
- "@fonoster/identity": "^0.44.0",
31
- "@fonoster/logger": "^0.44.0",
32
- "@fonoster/sipnet": "^0.44.0",
33
- "@fonoster/types": "^0.44.0",
26
+ "@fonoster/authz": "^0.46.0",
27
+ "@fonoster/autopilot": "^0.46.0",
28
+ "@fonoster/callrecord": "^0.46.0",
29
+ "@fonoster/common": "^0.46.0",
30
+ "@fonoster/identity": "^0.46.0",
31
+ "@fonoster/logger": "^0.46.0",
32
+ "@fonoster/sipnet": "^0.46.0",
33
+ "@fonoster/types": "^0.46.0",
34
34
  "@grpc/grpc-js": "~1.14.6",
35
35
  "@prisma/client": "^6.19.1",
36
36
  "@routr/common": "^2.24.0",
@@ -67,7 +67,7 @@
67
67
  "@types/uuid": "^10.0.0",
68
68
  "@types/validator": "^13.15.10"
69
69
  },
70
- "gitHead": "2dbe93e2d836a33e58764f12081cd1e6bb654a3e",
70
+ "gitHead": "32fd292a6832d2e784f8b428c6e7a6b1f3f3f3e2",
71
71
  "prisma": {
72
72
  "seed": "tsx src/core/seed.ts"
73
73
  }