@routr/pgdata 2.6.1 → 2.7.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.
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.create = void 0;
36
36
  /*
37
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
38
38
  * http://github.com/fonoster/routr
39
39
  *
40
40
  * This file is part of Routr
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.del = void 0;
36
36
  /*
37
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
38
38
  * http://github.com/fonoster/routr
39
39
  *
40
40
  * This file is part of Routr
@@ -55,7 +55,6 @@ exports.del = void 0;
55
55
  const grpc = __importStar(require("@grpc/grpc-js"));
56
56
  const library_1 = require("@prisma/client/runtime/library");
57
57
  const common_1 = require("@routr/common");
58
- // TODO: Fix the error handling. We should return the error
59
58
  function del(operation) {
60
59
  return (call, callback) => __awaiter(this, void 0, void 0, function* () {
61
60
  if (!call.request.ref) {
package/dist/api/find.js CHANGED
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.findBy = void 0;
36
36
  /*
37
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
38
38
  * http://github.com/fonoster/routr
39
39
  *
40
40
  * This file is part of Routr
package/dist/api/get.js CHANGED
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.get = void 0;
36
36
  /*
37
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
38
38
  * http://github.com/fonoster/routr
39
39
  *
40
40
  * This file is part of Routr
package/dist/api/index.js CHANGED
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /*
18
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
18
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/routr
20
20
  *
21
21
  * This file is part of Routr.
package/dist/api/list.js CHANGED
@@ -34,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.list = void 0;
36
36
  /*
37
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
38
38
  * http://github.com/fonoster/routr
39
39
  *
40
40
  * This file is part of Routr
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.update = void 0;
13
13
  /*
14
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
14
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
15
15
  * http://github.com/fonoster/routr
16
16
  *
17
17
  * This file is part of Routr
package/dist/envs.js CHANGED
@@ -3,7 +3,7 @@ var _a, _b, _c, _d, _e;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.EXTERNAL_SERVER_BIND_ADDR = exports.BIND_ADDR = exports.SERVER_KEY = exports.SERVER_CERT = exports.CACERT = exports.VERIFY_CLIENT_CERT = exports.TLS_ON = void 0;
5
5
  /*
6
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
7
7
  * http://github.com/fonoster/routr
8
8
  *
9
9
  * This file is part of Routr.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AgentManager = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr.
@@ -69,6 +69,8 @@ class AgentManager extends manager_1.EntityManager {
69
69
  updatedAt: this.agent.updatedAt
70
70
  ? new Date(this.agent.updatedAt * 1000)
71
71
  : undefined,
72
+ maxContacts: this.agent.maxContacts,
73
+ expires: this.agent.expires,
72
74
  extended: this.agent.extended || {}
73
75
  };
74
76
  }
@@ -85,6 +87,8 @@ class AgentManager extends manager_1.EntityManager {
85
87
  credentialsRef: agent.credentialsRef,
86
88
  domain: domain_1.DomainManager.mapToDto(agent.domain),
87
89
  credentials: credentials_1.CredentialsManager.mapToDto(agent.credentials),
90
+ maxContacts: agent.maxContacts,
91
+ expires: agent.expires,
88
92
  extended: (agent.extended || {}),
89
93
  createdAt: agent.createdAt.getTime() / 1000,
90
94
  updatedAt: agent.updatedAt.getTime() / 1000
@@ -1,6 +1,6 @@
1
1
  import { JsonObject } from "pb-util/build";
2
2
  export declare abstract class EntityManager {
3
- static includeFields: () => JsonObject;
3
+ static readonly includeFields: () => JsonObject;
4
4
  abstract validOrThrowCreate(): void;
5
5
  abstract validOrThrowUpdate(): void;
6
6
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EntityManager = void 0;
4
- /* eslint-disable require-jsdoc */
5
4
  class EntityManager {
6
5
  }
7
6
  exports.EntityManager = EntityManager;
@@ -25,7 +25,6 @@ class PeerManager extends manager_1.EntityManager {
25
25
  common_1.CommonConnect.hasAOROrThrow(this.peer.aor);
26
26
  common_1.CommonConnect.isValidAOROrThrow(this.peer.aor);
27
27
  common_1.CommonConnect.isValidContactAddressOrThrow(this.peer.contactAddr);
28
- common_1.CommonConnect.isValidBalancingAlgorithmOrThrow(this.peer.aor, this.peer.balancingAlgorithm);
29
28
  }
30
29
  validOrThrowUpdate() {
31
30
  common_1.CommonConnect.hasRefenceOrThrow(this.peer.ref);
@@ -33,7 +32,6 @@ class PeerManager extends manager_1.EntityManager {
33
32
  common_1.CommonConnect.isValidUsernameOrThrow(this.peer.username);
34
33
  common_1.CommonConnect.isValidAOROrThrow(this.peer.aor);
35
34
  common_1.CommonConnect.isValidContactAddressOrThrow(this.peer.contactAddr);
36
- common_1.CommonConnect.isValidBalancingAlgorithmOrThrow(this.peer.aor, this.peer.balancingAlgorithm);
37
35
  }
38
36
  mapToPrisma() {
39
37
  const normalizeAlgorithm = (algorithm) => algorithm === common_1.CommonTypes.LoadBalancingAlgorithm.UNSPECIFIED
@@ -58,6 +56,8 @@ class PeerManager extends manager_1.EntityManager {
58
56
  updatedAt: this.peer.updatedAt
59
57
  ? new Date(this.peer.updatedAt * 1000)
60
58
  : undefined,
59
+ maxContacts: this.peer.maxContacts,
60
+ expires: this.peer.expires,
61
61
  extended: this.peer.extended || {}
62
62
  };
63
63
  }
@@ -79,6 +79,8 @@ class PeerManager extends manager_1.EntityManager {
79
79
  accessControlList: acl_1.ACLManager.mapToDto(peer.accessControlList),
80
80
  createdAt: peer.createdAt.getTime() / 1000,
81
81
  updatedAt: peer.updatedAt.getTime() / 1000,
82
+ maxContacts: peer.maxContacts,
83
+ expires: peer.expires,
82
84
  extended: peer.extended
83
85
  }
84
86
  : undefined;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getManager = void 0;
4
4
  /*
5
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
5
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/routr
7
7
  *
8
8
  * This file is part of Routr.
package/dist/runner.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  /*
8
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/routr
10
10
  *
11
11
  * This file is part of Routr
package/dist/service.js CHANGED
@@ -27,7 +27,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  /*
30
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
30
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
31
31
  * http://github.com/fonoster/routr
32
32
  *
33
33
  * This file is part of Routr
package/dist/tracer.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.init = void 0;
7
7
  /*
8
- * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/routr
10
10
  *
11
11
  * This file is part of Routr
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/pgdata",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "description": "Postgres API Server for Routr Connect",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -32,8 +32,8 @@
32
32
  "@opentelemetry/sdk-trace-node": "^1.0.4",
33
33
  "@opentelemetry/semantic-conventions": "^1.0.4",
34
34
  "@prisma/client": "^4.16.2",
35
- "@routr/common": "^2.6.1",
36
- "@routr/processor": "^2.6.1",
35
+ "@routr/common": "^2.7.0",
36
+ "@routr/processor": "^2.7.0",
37
37
  "google-protobuf": "^3.9.2",
38
38
  "pb-util": "^1.0.3",
39
39
  "phone": "^3.1.32",
@@ -57,5 +57,5 @@
57
57
  "@types/validator": "^13.7.10",
58
58
  "prisma": "^4.16.2"
59
59
  },
60
- "gitHead": "05ec0ffb310a4e4ade49686c768b41ff52e74516"
60
+ "gitHead": "46d067f61a0797fbab905073f70c7ab319979d1d"
61
61
  }