@acontplus/core 1.0.11 → 1.0.12

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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acontplus/core",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Core library for Acontplus projects, providing essential utilities and functionalities.",
5
5
  "dependencies": {
6
- "@acontplus/utils": "^1.0.5",
6
+ "@acontplus/utils": "^1.0.6",
7
7
  "tslib": "^2.8.1",
8
8
  "uuid": "^13.0.0"
9
9
  },
@@ -4,4 +4,5 @@ export interface Environment {
4
4
  tokenKey: string;
5
5
  refreshTokenKey: string;
6
6
  clientId: string;
7
+ loginRoute: string;
7
8
  }
@@ -1,5 +1,5 @@
1
1
  export * from './api-response';
2
2
  export * from './base-entity';
3
- export * from './legacy-api-response';
4
3
  export * from './paginated-result';
5
4
  export * from './pagination-params';
5
+ export * from './user-data';
@@ -1,6 +1,6 @@
1
1
  export * from './api-response';
2
2
  export * from './base-entity';
3
- export * from './legacy-api-response';
4
3
  export * from './paginated-result';
5
4
  export * from './pagination-params';
5
+ export * from './user-data';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ export interface UserData {
2
+ email: string;
3
+ name: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=user-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-data.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/models/user-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { BaseVo } from './base.vo';
2
+ export declare class AuthTokens extends BaseVo<{
3
+ token: string;
4
+ refreshToken: string;
5
+ }> {
6
+ constructor(token: string, refreshToken: string);
7
+ protected validate(value: {
8
+ token: string;
9
+ refreshToken: string;
10
+ }): void;
11
+ get token(): string;
12
+ get refreshToken(): string;
13
+ }
@@ -0,0 +1,22 @@
1
+ // src/lib/value-objects/auth-tokens.vo.ts
2
+ import { BaseVo } from './base.vo';
3
+ export class AuthTokens extends BaseVo {
4
+ constructor(token, refreshToken) {
5
+ super({ token, refreshToken });
6
+ }
7
+ validate(value) {
8
+ if (!value.token || typeof value.token !== 'string') {
9
+ throw new Error('Token must be a non-empty string');
10
+ }
11
+ if (!value.refreshToken || typeof value.refreshToken !== 'string') {
12
+ throw new Error('Refresh token must be a non-empty string');
13
+ }
14
+ }
15
+ get token() {
16
+ return this.value.token;
17
+ }
18
+ get refreshToken() {
19
+ return this.value.refreshToken;
20
+ }
21
+ }
22
+ //# sourceMappingURL=auth-tokens.vo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-tokens.vo.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/value-objects/auth-tokens.vo.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,OAAO,UAAW,SAAQ,MAA+C;IAC7E,YAAY,KAAa,EAAE,YAAoB;QAC7C,KAAK,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;IACjC,CAAC;IAES,QAAQ,CAAC,KAA8C;QAC/D,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,OAAO,KAAK,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;YAClE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;IACjC,CAAC;CACF"}
@@ -1,4 +1,5 @@
1
+ export * from './auth-tokens.vo';
1
2
  export * from './base.vo';
2
3
  export * from './entity-id.vo';
3
- export * from './money.vo';
4
4
  export * from './identification-number.vo';
5
+ export * from './money.vo';
@@ -1,5 +1,6 @@
1
+ export * from './auth-tokens.vo';
1
2
  export * from './base.vo';
2
3
  export * from './entity-id.vo';
3
- export * from './money.vo';
4
4
  export * from './identification-number.vo';
5
+ export * from './money.vo';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/value-objects/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/core/src/lib/value-objects/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC"}