@digitaldefiance/suite-core-lib 2.2.26 → 3.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/README.md +32 -3
- package/package.json +2 -2
- package/src/interfaces/models/token-role.d.ts +1 -1
- package/src/interfaces/models/token-role.d.ts.map +1 -1
- package/src/interfaces/models/used-direct-login-token.d.ts +1 -1
- package/src/interfaces/models/used-direct-login-token.d.ts.map +1 -1
- package/src/interfaces/models/user-role.d.ts +1 -1
- package/src/interfaces/models/user-role.d.ts.map +1 -1
- package/src/interfaces/models/user.d.ts +1 -1
- package/src/interfaces/models/user.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -58,12 +58,19 @@ interface AppUser extends IFrontendUser<'en'> {
|
|
|
58
58
|
accountStatus: AccountStatus;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// Backend database interface supporting ObjectId types
|
|
61
|
+
// Backend database interface supporting ObjectId types (Default)
|
|
62
62
|
interface DatabaseUser extends IBackendUser<'en'> {
|
|
63
63
|
_id: Types.ObjectId;
|
|
64
64
|
createdBy: Types.ObjectId;
|
|
65
65
|
updatedBy: Types.ObjectId;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
// Example: Backend interface using UUIDs (Strings)
|
|
69
|
+
interface SqlUser extends IBackendUser<'en', string> {
|
|
70
|
+
_id: string;
|
|
71
|
+
createdBy: string;
|
|
72
|
+
updatedBy: string;
|
|
73
|
+
}
|
|
67
74
|
```
|
|
68
75
|
|
|
69
76
|
### Secure Backup Code System
|
|
@@ -249,7 +256,20 @@ The **@digitaldefiance/node-ecies** and **@digitaldefiance/node-express-suite**
|
|
|
249
256
|
- Mobile and desktop SDKs for React Native, Flutter, Electron, and Tauri
|
|
250
257
|
- DevOps and deployment tooling including Docker, Kubernetes, and CI/CD pipelines
|
|
251
258
|
|
|
252
|
-
## 🆕 What's New in
|
|
259
|
+
## 🆕 What's New in v3.0
|
|
260
|
+
|
|
261
|
+
### Generic ID Support
|
|
262
|
+
Core interfaces (`IBackendUser`, `IBackendRole`, etc.) now support generic ID types. This enables seamless integration with the new **Pluggable ID Providers** (ObjectId, UUID, GUID) introduced in `@digitaldefiance/ecies-lib` v4.1.0.
|
|
263
|
+
|
|
264
|
+
```typescript
|
|
265
|
+
// Default behavior (MongoDB ObjectId)
|
|
266
|
+
interface MongoUser extends IBackendUser<'en'> {}
|
|
267
|
+
|
|
268
|
+
// Custom ID type (e.g. UUID string)
|
|
269
|
+
interface SqlUser extends IBackendUser<'en', string> {}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## ✨ Key Features (v2.1+)
|
|
253
273
|
|
|
254
274
|
### New Modules
|
|
255
275
|
|
|
@@ -365,7 +385,7 @@ yarn test
|
|
|
365
385
|
# ✅ Validators with custom constants
|
|
366
386
|
```
|
|
367
387
|
|
|
368
|
-
### Coverage Metrics
|
|
388
|
+
### Coverage Metrics
|
|
369
389
|
|
|
370
390
|
- **Statements**: 98.47%
|
|
371
391
|
- **Branches**: 94.56%
|
|
@@ -406,6 +426,15 @@ MIT © [Digital Defiance](https://github.com/digitaldefiance)
|
|
|
406
426
|
|
|
407
427
|
## ChangeLog
|
|
408
428
|
|
|
429
|
+
## v3.0.1
|
|
430
|
+
|
|
431
|
+
- Update ECIES to 4.1.1
|
|
432
|
+
|
|
433
|
+
## v3.0.0
|
|
434
|
+
|
|
435
|
+
- Upgrade ECIES to 4.1.0
|
|
436
|
+
- Update backend interfaces (`IBackendUser`, `IBackendUserRole`, `IBackendTokenRole`, `IBackendUsedDirectLoginToken`) to support generic ID types (defaulting to `Types.ObjectId` for backward compatibility). This enables support for pluggable ID providers (e.g. GUIDs, strings, numbers) introduced in `@digitaldefiance/ecies-lib` v4.1.0.
|
|
437
|
+
|
|
409
438
|
## v2.2.26
|
|
410
439
|
|
|
411
440
|
- Add CSS warning logo constants
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/suite-core-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Generic user system and document system common core for applications",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"publish:public": "npm publish --access public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@digitaldefiance/ecies-lib": "
|
|
25
|
+
"@digitaldefiance/ecies-lib": "4.1.1",
|
|
26
26
|
"@digitaldefiance/i18n-lib": "3.6.4"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
@@ -7,5 +7,5 @@ export type IFrontendTokenRole = ITokenRole<string, Date>;
|
|
|
7
7
|
/**
|
|
8
8
|
* Back-end Base interface for token role collection documents
|
|
9
9
|
*/
|
|
10
|
-
export type IBackendTokenRole =
|
|
10
|
+
export type IBackendTokenRole<I = Types.ObjectId> = ITokenRole<I, Date>;
|
|
11
11
|
//# sourceMappingURL=token-role.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-role.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/token-role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC1D;;GAEG;AACH,MAAM,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"token-role.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/token-role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC1D;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,GAAG,KAAK,CAAC,QAAQ,IAAI,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -7,5 +7,5 @@ export type IFrontendUsedDirectLoginToken = IUsedDirectLoginTokenBase<string>;
|
|
|
7
7
|
/**
|
|
8
8
|
* Base interface for back-end used direct login token collection documents
|
|
9
9
|
*/
|
|
10
|
-
export type IBackendUsedDirectLoginToken =
|
|
10
|
+
export type IBackendUsedDirectLoginToken<I = Types.ObjectId> = IUsedDirectLoginTokenBase<I>;
|
|
11
11
|
//# sourceMappingURL=used-direct-login-token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"used-direct-login-token.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/used-direct-login-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC9E;;GAEG;AACH,MAAM,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"used-direct-login-token.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/used-direct-login-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC9E;;GAEG;AACH,MAAM,MAAM,4BAA4B,CAAC,CAAC,GAAG,KAAK,CAAC,QAAQ,IACzD,yBAAyB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -7,5 +7,5 @@ export type IFrontendUserRole = IUserRoleBase<string, Date>;
|
|
|
7
7
|
/**
|
|
8
8
|
* Back-end Base interface for user role collection documents
|
|
9
9
|
*/
|
|
10
|
-
export type IBackendUserRole =
|
|
10
|
+
export type IBackendUserRole<I = Types.ObjectId> = IUserRoleBase<I, Date>;
|
|
11
11
|
//# sourceMappingURL=user-role.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-role.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/user-role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC5D;;GAEG;AACH,MAAM,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"user-role.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/user-role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC5D;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,KAAK,CAAC,QAAQ,IAAI,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC"}
|
|
@@ -8,5 +8,5 @@ export type IFrontendUser<TLanguage extends string> = IUserBase<string, Date, TL
|
|
|
8
8
|
/**
|
|
9
9
|
* Back-end Base interface for user collection documents
|
|
10
10
|
*/
|
|
11
|
-
export type IBackendUser<TLanguage extends string> = IUserBase<
|
|
11
|
+
export type IBackendUser<TLanguage extends string, I = Types.ObjectId> = IUserBase<I, Date, TLanguage, AccountStatus>;
|
|
12
12
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,MAAM,IAAI,SAAS,CAC7D,MAAM,EACN,IAAI,EACJ,SAAS,EACT,aAAa,CACd,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,SAAS,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../../packages/digitaldefiance-suite-core-lib/src/interfaces/models/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,SAAS,SAAS,MAAM,IAAI,SAAS,CAC7D,MAAM,EACN,IAAI,EACJ,SAAS,EACT,aAAa,CACd,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,SAAS,SAAS,MAAM,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,IAAI,SAAS,CAChF,CAAC,EACD,IAAI,EACJ,SAAS,EACT,aAAa,CACd,CAAC"}
|