@schorts/shared-kernel 8.6.0 → 8.7.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/README.md CHANGED
@@ -13,6 +13,7 @@ npm install @schorts/shared-kernel --save
13
13
  ### 🔐 Auth
14
14
 
15
15
  - **AuthProvider:** Abstract interface for authentication strategies.
16
+ - **IdentityProvider:** Contract for external identity services (e.g., Firebase, Auth0, Cognito). Defines methods for registering users, authenticating credentials, verifying tokens, and retrieving user profiles in a vendor‑agnostic way.
16
17
  - **RequireAuthDecorator:** Method-level decorator for enforcing authentication.
17
18
 
18
19
  ### 🛡️ RBAC (Role-Based Access Control)
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=identity-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-provider.js","sourceRoot":"","sources":["../../../src/identity-providers/identity-provider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/identity-providers/index.ts"],"names":[],"mappings":""}
package/dist/cjs/index.js CHANGED
@@ -27,6 +27,7 @@ __exportStar(require("./event-bus"), exports);
27
27
  __exportStar(require("./formatters"), exports);
28
28
  __exportStar(require("./http"), exports);
29
29
  __exportStar(require("./i18n"), exports);
30
+ __exportStar(require("./identity-providers"), exports);
30
31
  __exportStar(require("./json-api"), exports);
31
32
  __exportStar(require("./logger"), exports);
32
33
  __exportStar(require("./mail"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB;AACtB,kDAAgC;AAChC,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB;AACvB,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,kDAAgC;AAChC,+CAA6B;AAC7B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB;AACtB,kDAAgC;AAChC,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB;AACvB,uDAAqC;AACrC,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,kDAAgC;AAChC,+CAA6B;AAC7B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,kDAAgC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=identity-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-provider.js","sourceRoot":"","sources":["../../../src/identity-providers/identity-provider.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/identity-providers/index.ts"],"names":[],"mappings":""}
package/dist/esm/index.js CHANGED
@@ -27,6 +27,7 @@ __exportStar(require("./event-bus"), exports);
27
27
  __exportStar(require("./formatters"), exports);
28
28
  __exportStar(require("./http"), exports);
29
29
  __exportStar(require("./i18n"), exports);
30
+ __exportStar(require("./identity-providers"), exports);
30
31
  __exportStar(require("./json-api"), exports);
31
32
  __exportStar(require("./logger"), exports);
32
33
  __exportStar(require("./mail"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB;AACtB,kDAAgC;AAChC,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB;AACvB,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,kDAAgC;AAChC,+CAA6B;AAC7B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAuB;AACvB,6CAA2B;AAC3B,wCAAsB;AACtB,kDAAgC;AAChC,6CAA2B;AAC3B,8CAA4B;AAC5B,+CAA6B;AAC7B,yCAAuB;AACvB,yCAAuB;AACvB,uDAAqC;AACrC,6CAA2B;AAC3B,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,kDAAgC;AAChC,+CAA6B;AAC7B,0CAAwB;AACxB,iDAA+B;AAC/B,0CAAwB;AACxB,kDAAgC"}
@@ -0,0 +1,12 @@
1
+ export interface IdentityProvider<IdentityUser> {
2
+ createUser(): Promise<{
3
+ providerId: string;
4
+ }>;
5
+ verifyToken(token: string): Promise<{
6
+ userId: string;
7
+ claims: Record<string, any>;
8
+ }>;
9
+ getUser(userId: string): Promise<IdentityUser>;
10
+ getUsers(userIds: Array<string>): Promise<IdentityUser[]>;
11
+ }
12
+ //# sourceMappingURL=identity-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity-provider.d.ts","sourceRoot":"","sources":["../../../src/identity-providers/identity-provider.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB,CAAC,YAAY;IAC5C,UAAU,IAAI,OAAO,CAAC;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAC,CAAC;IACrF,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC3D"}
@@ -0,0 +1,2 @@
1
+ export type { IdentityProvider } from "./identity-provider";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/identity-providers/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -11,6 +11,7 @@ export * from "./event-bus";
11
11
  export * from "./formatters";
12
12
  export * from "./http";
13
13
  export * from "./i18n";
14
+ export * from "./identity-providers";
14
15
  export * from "./json-api";
15
16
  export * from "./logger";
16
17
  export * from "./mail";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,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;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schorts/shared-kernel",
3
- "version": "8.6.0",
3
+ "version": "8.7.1",
4
4
  "description": "A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more — designed to be framework-agnostic and highly extensible.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -76,6 +76,11 @@
76
76
  "require": "./dist/cjs/i18n/index.js",
77
77
  "types": "./dist/types/i18n/index.d.ts"
78
78
  },
79
+ "./identity-providers": {
80
+ "import": "./dist/esm/identity-providers/index.js",
81
+ "require": "./dist/cjs/identity-providers/index.js",
82
+ "types": "./dist/types/identity-providers/index.d.ts"
83
+ },
79
84
  "./json-api": {
80
85
  "import": "./dist/esm/json-api/index.js",
81
86
  "require": "./dist/cjs/json-api/index.js",
@@ -186,7 +191,8 @@
186
191
  "hexagonal-architecture",
187
192
  "domain-model",
188
193
  "ddd",
189
- "cqrs"
194
+ "cqrs",
195
+ "identity-provider"
190
196
  ],
191
197
  "bugs": {
192
198
  "url": "https://github.com/schorts99/shared-kernel/issues"