@skillstew/common 1.0.35 → 1.0.37
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/build/events/EventMap.d.ts +5 -1
- package/build/events/schemas/userConnectionEventSchemas.d.ts +10 -2
- package/build/events/schemas/userConnectionEventSchemas.js +5 -1
- package/build/index.d.ts +0 -2
- package/build/index.js +0 -4
- package/package.json +1 -1
- package/src/events/schemas/userConnectionEventSchemas.ts +5 -1
- package/src/index.ts +0 -6
- package/build/constants/HttpStatus.d.ts +0 -27
- package/build/constants/HttpStatus.js +0 -35
- package/build/types/UserRoles.d.ts +0 -2
- package/build/types/UserRoles.js +0 -4
- package/src/constants/HttpStatus.ts +0 -34
- package/src/types/UserRoles.ts +0 -2
- package/src/types/express/index.d.ts +0 -16
|
@@ -3,8 +3,8 @@ export declare const EventSchemas: {
|
|
|
3
3
|
readonly "connection.requested": z.ZodObject<{
|
|
4
4
|
connectionId: z.ZodString;
|
|
5
5
|
requesterId: z.ZodString;
|
|
6
|
-
recipientId: z.ZodString;
|
|
7
6
|
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
7
|
+
recipientId: z.ZodString;
|
|
8
8
|
recipientUsername: z.ZodOptional<z.ZodString>;
|
|
9
9
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
10
10
|
}, z.core.$strict>;
|
|
@@ -12,12 +12,16 @@ export declare const EventSchemas: {
|
|
|
12
12
|
connectionId: z.ZodString;
|
|
13
13
|
accepterId: z.ZodString;
|
|
14
14
|
accepterUsername: z.ZodOptional<z.ZodString>;
|
|
15
|
+
requesterId: z.ZodString;
|
|
16
|
+
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
15
17
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
16
18
|
}, z.core.$strip>;
|
|
17
19
|
readonly "connection.rejected": z.ZodObject<{
|
|
18
20
|
connectionId: z.ZodString;
|
|
19
21
|
rejecterId: z.ZodString;
|
|
20
22
|
rejecterUsername: z.ZodOptional<z.ZodString>;
|
|
23
|
+
requesterId: z.ZodString;
|
|
24
|
+
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
21
25
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
22
26
|
}, z.core.$strip>;
|
|
23
27
|
readonly "skill.created": z.ZodObject<{
|
|
@@ -2,8 +2,8 @@ import z from "zod";
|
|
|
2
2
|
export declare const connectionRequestedSchema: z.ZodObject<{
|
|
3
3
|
connectionId: z.ZodString;
|
|
4
4
|
requesterId: z.ZodString;
|
|
5
|
-
recipientId: z.ZodString;
|
|
6
5
|
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
6
|
+
recipientId: z.ZodString;
|
|
7
7
|
recipientUsername: z.ZodOptional<z.ZodString>;
|
|
8
8
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
9
9
|
}, z.core.$strict>;
|
|
@@ -11,20 +11,24 @@ export declare const connectionAcceptedSchema: z.ZodObject<{
|
|
|
11
11
|
connectionId: z.ZodString;
|
|
12
12
|
accepterId: z.ZodString;
|
|
13
13
|
accepterUsername: z.ZodOptional<z.ZodString>;
|
|
14
|
+
requesterId: z.ZodString;
|
|
15
|
+
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
14
16
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
15
17
|
}, z.core.$strip>;
|
|
16
18
|
export declare const connectionRejectedSchema: z.ZodObject<{
|
|
17
19
|
connectionId: z.ZodString;
|
|
18
20
|
rejecterId: z.ZodString;
|
|
19
21
|
rejecterUsername: z.ZodOptional<z.ZodString>;
|
|
22
|
+
requesterId: z.ZodString;
|
|
23
|
+
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
20
24
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
21
25
|
}, z.core.$strip>;
|
|
22
26
|
export declare const ConnectionEventSchemas: {
|
|
23
27
|
readonly "connection.requested": z.ZodObject<{
|
|
24
28
|
connectionId: z.ZodString;
|
|
25
29
|
requesterId: z.ZodString;
|
|
26
|
-
recipientId: z.ZodString;
|
|
27
30
|
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
31
|
+
recipientId: z.ZodString;
|
|
28
32
|
recipientUsername: z.ZodOptional<z.ZodString>;
|
|
29
33
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
30
34
|
}, z.core.$strict>;
|
|
@@ -32,12 +36,16 @@ export declare const ConnectionEventSchemas: {
|
|
|
32
36
|
connectionId: z.ZodString;
|
|
33
37
|
accepterId: z.ZodString;
|
|
34
38
|
accepterUsername: z.ZodOptional<z.ZodString>;
|
|
39
|
+
requesterId: z.ZodString;
|
|
40
|
+
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
35
41
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
36
42
|
}, z.core.$strip>;
|
|
37
43
|
readonly "connection.rejected": z.ZodObject<{
|
|
38
44
|
connectionId: z.ZodString;
|
|
39
45
|
rejecterId: z.ZodString;
|
|
40
46
|
rejecterUsername: z.ZodOptional<z.ZodString>;
|
|
47
|
+
requesterId: z.ZodString;
|
|
48
|
+
requesterUsername: z.ZodOptional<z.ZodString>;
|
|
41
49
|
timestamp: z.ZodCoercedDate<unknown>;
|
|
42
50
|
}, z.core.$strip>;
|
|
43
51
|
};
|
|
@@ -9,8 +9,8 @@ exports.connectionRequestedSchema = zod_1.default
|
|
|
9
9
|
.object({
|
|
10
10
|
connectionId: zod_1.default.string(),
|
|
11
11
|
requesterId: zod_1.default.string(),
|
|
12
|
-
recipientId: zod_1.default.string(),
|
|
13
12
|
requesterUsername: zod_1.default.string().optional(),
|
|
13
|
+
recipientId: zod_1.default.string(),
|
|
14
14
|
recipientUsername: zod_1.default.string().optional(),
|
|
15
15
|
timestamp: zod_1.default.coerce.date(),
|
|
16
16
|
})
|
|
@@ -19,12 +19,16 @@ exports.connectionAcceptedSchema = zod_1.default.object({
|
|
|
19
19
|
connectionId: zod_1.default.string(),
|
|
20
20
|
accepterId: zod_1.default.string(),
|
|
21
21
|
accepterUsername: zod_1.default.string().optional(),
|
|
22
|
+
requesterId: zod_1.default.string(),
|
|
23
|
+
requesterUsername: zod_1.default.string().optional(),
|
|
22
24
|
timestamp: zod_1.default.coerce.date(),
|
|
23
25
|
});
|
|
24
26
|
exports.connectionRejectedSchema = zod_1.default.object({
|
|
25
27
|
connectionId: zod_1.default.string(),
|
|
26
28
|
rejecterId: zod_1.default.string(),
|
|
27
29
|
rejecterUsername: zod_1.default.string().optional(),
|
|
30
|
+
requesterId: zod_1.default.string(),
|
|
31
|
+
requesterUsername: zod_1.default.string().optional(),
|
|
28
32
|
timestamp: zod_1.default.coerce.date(),
|
|
29
33
|
});
|
|
30
34
|
exports.ConnectionEventSchemas = {
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -14,10 +14,6 @@ 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
|
-
// Types
|
|
18
|
-
__exportStar(require("./types/UserRoles"), exports);
|
|
19
|
-
// Constants
|
|
20
|
-
__exportStar(require("./constants/HttpStatus"), exports);
|
|
21
17
|
// Events
|
|
22
18
|
__exportStar(require("./events/AppEvent"), exports);
|
|
23
19
|
__exportStar(require("./events/schemas/userEventsSchema"), exports);
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@ export const connectionRequestedSchema = z
|
|
|
4
4
|
.object({
|
|
5
5
|
connectionId: z.string(),
|
|
6
6
|
requesterId: z.string(),
|
|
7
|
-
recipientId: z.string(),
|
|
8
7
|
requesterUsername: z.string().optional(),
|
|
8
|
+
recipientId: z.string(),
|
|
9
9
|
recipientUsername: z.string().optional(),
|
|
10
10
|
timestamp: z.coerce.date(),
|
|
11
11
|
})
|
|
@@ -15,6 +15,8 @@ export const connectionAcceptedSchema = z.object({
|
|
|
15
15
|
connectionId: z.string(),
|
|
16
16
|
accepterId: z.string(),
|
|
17
17
|
accepterUsername: z.string().optional(),
|
|
18
|
+
requesterId: z.string(),
|
|
19
|
+
requesterUsername: z.string().optional(),
|
|
18
20
|
timestamp: z.coerce.date(),
|
|
19
21
|
});
|
|
20
22
|
|
|
@@ -22,6 +24,8 @@ export const connectionRejectedSchema = z.object({
|
|
|
22
24
|
connectionId: z.string(),
|
|
23
25
|
rejecterId: z.string(),
|
|
24
26
|
rejecterUsername: z.string().optional(),
|
|
27
|
+
requesterId: z.string(),
|
|
28
|
+
requesterUsername: z.string().optional(),
|
|
25
29
|
timestamp: z.coerce.date(),
|
|
26
30
|
});
|
|
27
31
|
|
package/src/index.ts
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare enum HttpStatus {
|
|
2
|
-
OK = 200,
|
|
3
|
-
CREATED = 201,
|
|
4
|
-
ACCEPTED = 202,
|
|
5
|
-
NO_CONTENT = 204,
|
|
6
|
-
MOVED_PERMANENTLY = 301,
|
|
7
|
-
FOUND = 302,
|
|
8
|
-
NOT_MODIFIED = 304,
|
|
9
|
-
BAD_REQUEST = 400,
|
|
10
|
-
UNAUTHORIZED = 401,
|
|
11
|
-
PAYMENT_REQUIRED = 402,
|
|
12
|
-
FORBIDDEN = 403,
|
|
13
|
-
NOT_FOUND = 404,
|
|
14
|
-
METHOD_NOT_ALLOWED = 405,
|
|
15
|
-
NOT_ACCEPTABLE = 406,
|
|
16
|
-
REQUEST_TIMEOUT = 408,
|
|
17
|
-
CONFLICT = 409,
|
|
18
|
-
GONE = 410,
|
|
19
|
-
PAYLOAD_TOO_LARGE = 413,
|
|
20
|
-
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
21
|
-
TOO_MANY_REQUESTS = 429,
|
|
22
|
-
INTERNAL_SERVER_ERROR = 500,
|
|
23
|
-
NOT_IMPLEMENTED = 501,
|
|
24
|
-
BAD_GATEWAY = 502,
|
|
25
|
-
SERVICE_UNAVAILABLE = 503,
|
|
26
|
-
GATEWAY_TIMEOUT = 504
|
|
27
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HttpStatus = void 0;
|
|
4
|
-
var HttpStatus;
|
|
5
|
-
(function (HttpStatus) {
|
|
6
|
-
// 2xx Success
|
|
7
|
-
HttpStatus[HttpStatus["OK"] = 200] = "OK";
|
|
8
|
-
HttpStatus[HttpStatus["CREATED"] = 201] = "CREATED";
|
|
9
|
-
HttpStatus[HttpStatus["ACCEPTED"] = 202] = "ACCEPTED";
|
|
10
|
-
HttpStatus[HttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT";
|
|
11
|
-
// 3xx Redirection
|
|
12
|
-
HttpStatus[HttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
|
|
13
|
-
HttpStatus[HttpStatus["FOUND"] = 302] = "FOUND";
|
|
14
|
-
HttpStatus[HttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
|
|
15
|
-
// 4xx Client Errors
|
|
16
|
-
HttpStatus[HttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
17
|
-
HttpStatus[HttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
18
|
-
HttpStatus[HttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
|
|
19
|
-
HttpStatus[HttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
20
|
-
HttpStatus[HttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
21
|
-
HttpStatus[HttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
|
|
22
|
-
HttpStatus[HttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
|
|
23
|
-
HttpStatus[HttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
24
|
-
HttpStatus[HttpStatus["CONFLICT"] = 409] = "CONFLICT";
|
|
25
|
-
HttpStatus[HttpStatus["GONE"] = 410] = "GONE";
|
|
26
|
-
HttpStatus[HttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
|
27
|
-
HttpStatus[HttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
|
|
28
|
-
HttpStatus[HttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
29
|
-
// 5xx Server Errors
|
|
30
|
-
HttpStatus[HttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
31
|
-
HttpStatus[HttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
32
|
-
HttpStatus[HttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
|
|
33
|
-
HttpStatus[HttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
|
34
|
-
HttpStatus[HttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
|
|
35
|
-
})(HttpStatus || (exports.HttpStatus = HttpStatus = {}));
|
package/build/types/UserRoles.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export enum HttpStatus {
|
|
2
|
-
// 2xx Success
|
|
3
|
-
OK = 200,
|
|
4
|
-
CREATED = 201,
|
|
5
|
-
ACCEPTED = 202,
|
|
6
|
-
NO_CONTENT = 204,
|
|
7
|
-
|
|
8
|
-
// 3xx Redirection
|
|
9
|
-
MOVED_PERMANENTLY = 301,
|
|
10
|
-
FOUND = 302,
|
|
11
|
-
NOT_MODIFIED = 304,
|
|
12
|
-
|
|
13
|
-
// 4xx Client Errors
|
|
14
|
-
BAD_REQUEST = 400,
|
|
15
|
-
UNAUTHORIZED = 401,
|
|
16
|
-
PAYMENT_REQUIRED = 402,
|
|
17
|
-
FORBIDDEN = 403,
|
|
18
|
-
NOT_FOUND = 404,
|
|
19
|
-
METHOD_NOT_ALLOWED = 405,
|
|
20
|
-
NOT_ACCEPTABLE = 406,
|
|
21
|
-
REQUEST_TIMEOUT = 408,
|
|
22
|
-
CONFLICT = 409,
|
|
23
|
-
GONE = 410,
|
|
24
|
-
PAYLOAD_TOO_LARGE = 413,
|
|
25
|
-
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
26
|
-
TOO_MANY_REQUESTS = 429,
|
|
27
|
-
|
|
28
|
-
// 5xx Server Errors
|
|
29
|
-
INTERNAL_SERVER_ERROR = 500,
|
|
30
|
-
NOT_IMPLEMENTED = 501,
|
|
31
|
-
BAD_GATEWAY = 502,
|
|
32
|
-
SERVICE_UNAVAILABLE = 503,
|
|
33
|
-
GATEWAY_TIMEOUT = 504,
|
|
34
|
-
}
|
package/src/types/UserRoles.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RequestUser } from "../../3-presentation/types/RequestType";
|
|
2
|
-
import { UserRoles } from "../../0-domain/entities/UserRoles";
|
|
3
|
-
|
|
4
|
-
export interface RequestUser {
|
|
5
|
-
id: string | number;
|
|
6
|
-
email: string;
|
|
7
|
-
role: UserRoles;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare global {
|
|
11
|
-
namespace Express {
|
|
12
|
-
interface Request {
|
|
13
|
-
user: RequestUser;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|