@routr/pgdata 2.13.5 → 2.13.7
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/dist/api/create.js +3 -3
- package/dist/api/delete.js +1 -1
- package/dist/api/find.js +1 -1
- package/dist/api/get.js +3 -3
- package/dist/api/list.js +1 -1
- package/dist/api/update.js +1 -1
- package/dist/mappers/agent.d.ts +1 -1
- package/dist/mappers/credentials.d.ts +1 -1
- package/dist/mappers/domain.d.ts +1 -1
- package/package.json +4 -4
package/dist/api/create.js
CHANGED
|
@@ -80,15 +80,15 @@ function create(operation, kind) {
|
|
|
80
80
|
if (e instanceof library_1.PrismaClientInitializationError) {
|
|
81
81
|
callback({
|
|
82
82
|
code: grpc.status.UNAVAILABLE,
|
|
83
|
-
message: "
|
|
83
|
+
message: "Service unavailable"
|
|
84
84
|
}, null);
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
else if (e.code === "P2002") {
|
|
88
|
-
callback(new common_1.CommonErrors.
|
|
88
|
+
callback(new common_1.CommonErrors.ResourceAlreadyExistsError("Resource already exist for field: " + e.meta.target[0]), null);
|
|
89
89
|
}
|
|
90
90
|
else if (e.code === "P2003") {
|
|
91
|
-
callback(new common_1.CommonErrors.BadRequestError("
|
|
91
|
+
callback(new common_1.CommonErrors.BadRequestError("Dependent resource doesn't exist for: " + e.meta.field_name), null);
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
callback(e, null);
|
package/dist/api/delete.js
CHANGED
package/dist/api/find.js
CHANGED
package/dist/api/get.js
CHANGED
|
@@ -60,7 +60,7 @@ const library_1 = require("@prisma/client/runtime/library");
|
|
|
60
60
|
function get(operation, kind) {
|
|
61
61
|
return (call, callback) => __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
if (!call.request.ref) {
|
|
63
|
-
return callback(new common_1.CommonErrors.BadRequestError("
|
|
63
|
+
return callback(new common_1.CommonErrors.BadRequestError("Parameter ref is required"), null);
|
|
64
64
|
}
|
|
65
65
|
const Manager = (0, utils_1.getManager)(kind);
|
|
66
66
|
try {
|
|
@@ -81,13 +81,13 @@ function get(operation, kind) {
|
|
|
81
81
|
if (e instanceof library_1.PrismaClientInitializationError) {
|
|
82
82
|
callback({
|
|
83
83
|
code: grpc.status.UNAVAILABLE,
|
|
84
|
-
message: "
|
|
84
|
+
message: "Service unavailable"
|
|
85
85
|
}, null);
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
callback({
|
|
89
89
|
code: grpc.status.UNKNOWN,
|
|
90
|
-
message: "
|
|
90
|
+
message: "Unknown error"
|
|
91
91
|
}, null);
|
|
92
92
|
}
|
|
93
93
|
});
|
package/dist/api/list.js
CHANGED
package/dist/api/update.js
CHANGED
|
@@ -74,7 +74,7 @@ function update(operation, kind) {
|
|
|
74
74
|
callback(new common_1.CommonErrors.ResourceNotFoundError(call.request.ref), null);
|
|
75
75
|
}
|
|
76
76
|
else if (e.code === "P2003") {
|
|
77
|
-
callback(new common_1.CommonErrors.BadRequestError("
|
|
77
|
+
callback(new common_1.CommonErrors.BadRequestError("Dependent resource doesn't exist for: " + e.meta.field_name), null);
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
80
|
callback(e, null);
|
package/dist/mappers/agent.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ type AgentWithDomainAndCredentials = Prisma.AgentGetPayload<{
|
|
|
17
17
|
};
|
|
18
18
|
}>;
|
|
19
19
|
export declare class AgentManager extends EntityManager {
|
|
20
|
-
private agent;
|
|
20
|
+
private readonly agent;
|
|
21
21
|
constructor(agent: CC.Agent);
|
|
22
22
|
static includeFields(): Record<string, unknown>;
|
|
23
23
|
validOrThrowCreate(): void;
|
|
@@ -2,7 +2,7 @@ import { Credentials as CredentialsPrismaModel } from "@prisma/client";
|
|
|
2
2
|
import { CommonConnect as CC } from "@routr/common";
|
|
3
3
|
import { EntityManager } from "./manager";
|
|
4
4
|
export declare class CredentialsManager extends EntityManager {
|
|
5
|
-
private credentials;
|
|
5
|
+
private readonly credentials;
|
|
6
6
|
constructor(credentials: CC.Credentials);
|
|
7
7
|
static includeFields(): Record<string, unknown>;
|
|
8
8
|
validOrThrowCreate(): void;
|
package/dist/mappers/domain.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ type DomainWithACL = Prisma.DomainGetPayload<{
|
|
|
12
12
|
};
|
|
13
13
|
}>;
|
|
14
14
|
export declare class DomainManager extends EntityManager {
|
|
15
|
-
private domain;
|
|
15
|
+
private readonly domain;
|
|
16
16
|
constructor(domain: CC.Domain);
|
|
17
17
|
static includeFields(): Record<string, unknown>;
|
|
18
18
|
validOrThrowCreate(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/pgdata",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.7",
|
|
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",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
32
32
|
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
33
33
|
"@prisma/client": "^5.9.1",
|
|
34
|
-
"@routr/common": "^2.13.
|
|
35
|
-
"@routr/processor": "^2.13.
|
|
34
|
+
"@routr/common": "^2.13.7",
|
|
35
|
+
"@routr/processor": "^2.13.7",
|
|
36
36
|
"google-protobuf": "^3.9.2",
|
|
37
37
|
"grpc-health-check": "^2.0.2",
|
|
38
38
|
"pb-util": "^1.0.3",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"@types/validator": "^13.7.10",
|
|
59
59
|
"prisma": "^5.9.1"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "b408f6724aeaf7d42bb10200bc96cbcff0a2390c"
|
|
62
62
|
}
|