@brightnkhoma/auth 0.0.0-stage → 1.0.1
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/authentication/aggregates/signIn.d.ts +13 -0
- package/dist/authentication/aggregates/signIn.d.ts.map +1 -0
- package/dist/authentication/aggregates/signUp.d.ts +29 -0
- package/dist/authentication/aggregates/signUp.d.ts.map +1 -0
- package/dist/authentication/auth-service/auth-service.d.ts +7 -0
- package/dist/authentication/auth-service/auth-service.d.ts.map +1 -0
- package/dist/authentication/index.d.ts +3 -0
- package/dist/authentication/index.d.ts.map +1 -0
- package/dist/authentication/middleware/middleware.d.ts +3 -0
- package/dist/authentication/middleware/middleware.d.ts.map +1 -0
- package/dist/authentication/router/auth-router.d.ts +3 -0
- package/dist/authentication/router/auth-router.d.ts.map +1 -0
- package/dist/authentication/types/token.d.ts +9 -0
- package/dist/authentication/types/token.d.ts.map +1 -0
- package/dist/domain/userDomain.d.ts +6 -0
- package/dist/domain/userDomain.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4292 -0
- package/dist/index.mjs +4280 -0
- package/dist/mail/mailer.d.ts +2 -0
- package/dist/mail/mailer.d.ts.map +1 -0
- package/dist/middleware/midlleware.d.ts +1 -0
- package/dist/middleware/midlleware.d.ts.map +1 -0
- package/dist/types/activity.d.ts +44 -0
- package/dist/types/activity.d.ts.map +1 -0
- package/dist/types/entity.d.ts +10 -0
- package/dist/types/entity.d.ts.map +1 -0
- package/dist/types/loginProps.d.ts +6 -0
- package/dist/types/loginProps.d.ts.map +1 -0
- package/dist/types/routerQuery.d.ts +19 -0
- package/dist/types/routerQuery.d.ts.map +1 -0
- package/dist/types/signUpProps.d.ts +8 -0
- package/dist/types/signUpProps.d.ts.map +1 -0
- package/dist/types/user.d.ts +12 -0
- package/dist/types/user.d.ts.map +1 -0
- package/package.json +44 -5
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailer.d.ts","sourceRoot":"","sources":["../../src/mail/mailer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,YAAmB,MAAM,QAAQ,MAAM,MAAM,MAAM,QAAO,MAAM,GAAG,SAAS,kBAIjG,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=midlleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"midlleware.d.ts","sourceRoot":"","sources":["../../src/middleware/midlleware.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface DocActivity {
|
|
2
|
+
depth: number;
|
|
3
|
+
userId: string;
|
|
4
|
+
date: string;
|
|
5
|
+
action: string;
|
|
6
|
+
status: "success" | "failed";
|
|
7
|
+
id: string;
|
|
8
|
+
documentId: string;
|
|
9
|
+
collection: string;
|
|
10
|
+
error?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare enum LogLevel {
|
|
13
|
+
DEBUG = "DEBUG",
|
|
14
|
+
INFO = "INFO",
|
|
15
|
+
WARN = "WARN",
|
|
16
|
+
ERROR = "ERROR"
|
|
17
|
+
}
|
|
18
|
+
export interface LogEntry {
|
|
19
|
+
id: string;
|
|
20
|
+
depth: number;
|
|
21
|
+
timestamp: string;
|
|
22
|
+
level: LogLevel;
|
|
23
|
+
message: string;
|
|
24
|
+
method: string;
|
|
25
|
+
collection: string;
|
|
26
|
+
userId?: string | undefined;
|
|
27
|
+
documentId?: string | undefined;
|
|
28
|
+
metadata?: Record<string, any> | undefined;
|
|
29
|
+
error?: {
|
|
30
|
+
message: string;
|
|
31
|
+
stack?: string;
|
|
32
|
+
code?: string;
|
|
33
|
+
} | undefined;
|
|
34
|
+
}
|
|
35
|
+
export interface LoggerConfig {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
logLevel: LogLevel;
|
|
38
|
+
logToConsole: boolean;
|
|
39
|
+
logToDatabase: boolean;
|
|
40
|
+
activityCollection?: string;
|
|
41
|
+
logsCollection?: string;
|
|
42
|
+
includeMetadata: boolean;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../src/types/activity.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,MAAM,EAAG,MAAM,CAAC;IAChB,MAAM,EAAG,SAAS,GAAG,QAAQ,CAAC;IAC9B,EAAE,EAAG,MAAM,CAAC;IACZ,UAAU,EAAG,MAAM,CAAC;IACpB,UAAU,EAAG,MAAM,CAAC;IACpB,KAAM,CAAC,EAAG,MAAM,GAAG,SAAS,CAAC;CAChC;AAID,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAG,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,SAAS,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/types/entity.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,EAAG,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,IAAI,EAAG,MAAM,EAAE,CAAC;IAChB,SAAS,EAAG,MAAM,CAAC;IACnB,SAAU,CAAC,EAAG,MAAM,EAAE,CAAA;CAEzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loginProps.d.ts","sourceRoot":"","sources":["../../src/types/loginProps.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACvB,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,CAAC;IAClB,WAAY,CAAC,EAAG,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface RouterQuery<T> {
|
|
2
|
+
queries: Query<T>[];
|
|
3
|
+
}
|
|
4
|
+
interface Query<T> {
|
|
5
|
+
key: keyof T;
|
|
6
|
+
value: string;
|
|
7
|
+
operator: FirebaseFirestore.WhereFilterOp;
|
|
8
|
+
replacable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface PaginatedQuery<T> extends RouterQuery<T> {
|
|
11
|
+
startAfter?: string;
|
|
12
|
+
limit?: number;
|
|
13
|
+
defaultQueries?: Query<T>[];
|
|
14
|
+
orderBy?: string;
|
|
15
|
+
defultOrderBy?: string;
|
|
16
|
+
hasMore?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=routerQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routerQuery.d.ts","sourceRoot":"","sources":["../../src/types/routerQuery.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW,CAAC,CAAC;IAC1B,OAAO,EAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;CACvB;AAED,UAAU,KAAK,CAAC,CAAC;IACb,GAAG,EAAG,MAAM,CAAC,CAAC;IACd,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,iBAAiB,CAAC,aAAa,CAAC;IAC3C,UAAW,CAAC,EAAG,OAAO,CAAC;CAC1B;AAGD,MAAM,WAAW,cAAc,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACrD,UAAW,CAAC,EAAG,MAAM,CAAC;IACtB,KAAM,CAAC,EAAG,MAAM,CAAC;IACjB,cAAe,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B,OAAQ,CAAC,EAAG,MAAM,CAAC;IACnB,aAAc,CAAC,EAAG,MAAM,CAAC;IACzB,OAAQ,CAAC,EAAG,OAAO,CAAC;CAEvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signUpProps.d.ts","sourceRoot":"","sources":["../../src/types/signUpProps.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAG,MAAM,CAAC;IACd,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,MAAM,CAAC;IAClB,QAAQ,EAAG,MAAM,CAAC;IAClB,GAAI,CAAC,EAAG,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Entity } from "./entity";
|
|
2
|
+
export interface User extends Entity {
|
|
3
|
+
email: string;
|
|
4
|
+
phoneNumber?: string | undefined;
|
|
5
|
+
avatar?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface UserLocation {
|
|
8
|
+
district: string;
|
|
9
|
+
area: string;
|
|
10
|
+
}
|
|
11
|
+
export type PublicUser = Pick<User, "phoneNumber" | "email" | "name" | "dateCreated" | "avatar">;
|
|
12
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/types/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,WAAW,IAAK,SAAQ,MAAM;IAChC,KAAK,EAAG,MAAM,CAAC;IACf,WAAW,CAAC,EAAG,MAAM,GAAG,SAAS,CAAC;IAClC,MAAO,CAAC,EAAG,MAAM,GAAG,SAAS,CAAC;CAEjC;AAGD,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAG,MAAM,CAAC;IAClB,IAAI,EAAG,MAAM,CAAC;CACjB;AAKD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAC,aAAa,GAAG,OAAO,GAAG,MAAM,GAAI,aAAa,GAAG,QAAQ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@brightnkhoma/auth",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A module that automates CRUD functionality and routing and helps you follow DDD(Domain Driven Design) with ease using firebase, express and typescript",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsup src/index.ts --format cjs,esm && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
25
|
+
"dev": "tsup src/index.ts --format cjs,esm --watch",
|
|
26
|
+
"test": "vitest",
|
|
27
|
+
"prepublishOnly": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [],
|
|
30
|
+
"author": "Bright Nkhoma",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"type": "commonjs",
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/express": "^5.0.6",
|
|
35
|
+
"express": "^5.2.1",
|
|
36
|
+
"tsup": "^8.5.1",
|
|
37
|
+
"typescript": "^7.0.2"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"@brightnkhoma/domain": "^1.0.4",
|
|
41
|
+
"express": "^5.2.1",
|
|
42
|
+
"nodemailer": "^10.0.12",
|
|
43
|
+
"@brightnkhoma/credentials": "1.0.2"
|
|
44
|
+
}
|
|
45
|
+
}
|
package/README.md
DELETED