@temboplus/afloat 0.1.2 → 0.1.3
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/esm/_dnt.shims.d.ts +6 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/almost_equals.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/assert/1.0.10 → esm/deps/jsr.io/@std/assert/1.0.11}/array_includes.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/assert/1.0.10 → esm/deps/jsr.io/@std/assert/1.0.11}/assert.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/assert/1.0.10 → esm/deps/jsr.io/@std/assert/1.0.11}/assertion_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/fail.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/false.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/greater.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/greater_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/is_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/less.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/less_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/mod.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/object_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/rejects.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/string_includes.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/throws.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/unimplemented.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/unreachable.d.ts.map +1 -1
- package/esm/src/features/auth/contract.d.ts +14 -25
- package/esm/src/features/auth/contract.d.ts.map +1 -1
- package/esm/src/features/auth/contract.js +8 -15
- package/esm/src/features/auth/identity/contract.d.ts +30 -0
- package/esm/src/features/auth/identity/contract.d.ts.map +1 -0
- package/esm/src/features/auth/identity/contract.js +18 -0
- package/esm/src/features/auth/identity/repository.d.ts +22 -0
- package/esm/src/features/auth/identity/repository.d.ts.map +1 -0
- package/esm/src/features/auth/identity/repository.js +30 -0
- package/esm/src/features/auth/manager.d.ts +50 -27
- package/esm/src/features/auth/manager.d.ts.map +1 -1
- package/esm/src/features/auth/manager.js +105 -58
- package/esm/src/features/auth/profile/contract.d.ts +45 -0
- package/esm/src/features/auth/profile/contract.d.ts.map +1 -0
- package/esm/src/features/auth/profile/contract.js +16 -0
- package/esm/src/features/auth/profile/repository.d.ts +11 -0
- package/esm/src/features/auth/profile/repository.d.ts.map +1 -0
- package/esm/src/features/auth/profile/repository.js +21 -0
- package/esm/src/features/auth/repository.d.ts +1 -0
- package/esm/src/features/auth/repository.d.ts.map +1 -1
- package/esm/src/features/auth/repository.js +5 -22
- package/esm/src/features/auth/storage/client_store.d.ts +30 -0
- package/esm/src/features/auth/storage/client_store.d.ts.map +1 -0
- package/esm/src/features/auth/storage/client_store.js +46 -0
- package/esm/src/features/auth/storage/client_token_handler.d.ts +32 -0
- package/esm/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
- package/esm/src/features/auth/storage/client_token_handler.js +36 -0
- package/esm/src/features/auth/storage/server_store.d.ts +24 -0
- package/esm/src/features/auth/storage/server_store.d.ts.map +1 -0
- package/esm/src/features/auth/storage/server_store.js +34 -0
- package/esm/src/features/auth/storage/server_token_handler.d.ts +35 -0
- package/esm/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
- package/esm/src/features/auth/storage/server_token_handler.js +68 -0
- package/esm/src/features/auth/storage/types.d.ts +42 -0
- package/esm/src/features/auth/storage/types.d.ts.map +1 -0
- package/esm/src/features/auth/storage/types.js +1 -0
- package/esm/src/models/contact/derivatives/contact.d.ts +4 -0
- package/esm/src/models/contact/derivatives/contact.d.ts.map +1 -1
- package/esm/src/models/contact/derivatives/contact.js +6 -0
- package/package.json +4 -4
- package/script/_dnt.shims.d.ts +6 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +65 -0
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/almost_equals.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/assert/1.0.10 → script/deps/jsr.io/@std/assert/1.0.11}/array_includes.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/assert/1.0.10 → script/deps/jsr.io/@std/assert/1.0.11}/assert.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/assert/1.0.10 → script/deps/jsr.io/@std/assert/1.0.11}/assertion_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/exists.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/fail.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/false.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/greater.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/greater_or_equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/instance_of.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/is_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/less.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/less_or_equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/match.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/mod.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_instance_of.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_match.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/not_strict_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/object_match.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/rejects.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/strict_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/string_includes.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/throws.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/unimplemented.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.10 → 1.0.11}/unreachable.d.ts.map +1 -1
- package/script/src/features/auth/contract.d.ts +14 -25
- package/script/src/features/auth/contract.d.ts.map +1 -1
- package/script/src/features/auth/contract.js +9 -16
- package/script/src/features/auth/identity/contract.d.ts +30 -0
- package/script/src/features/auth/identity/contract.d.ts.map +1 -0
- package/script/src/features/auth/identity/contract.js +21 -0
- package/script/src/features/auth/identity/repository.d.ts +22 -0
- package/script/src/features/auth/identity/repository.d.ts.map +1 -0
- package/script/src/features/auth/identity/repository.js +34 -0
- package/script/src/features/auth/manager.d.ts +50 -27
- package/script/src/features/auth/manager.d.ts.map +1 -1
- package/script/src/features/auth/manager.js +128 -58
- package/script/src/features/auth/profile/contract.d.ts +45 -0
- package/script/src/features/auth/profile/contract.d.ts.map +1 -0
- package/script/src/features/auth/profile/contract.js +19 -0
- package/script/src/features/auth/profile/repository.d.ts +11 -0
- package/script/src/features/auth/profile/repository.d.ts.map +1 -0
- package/script/src/features/auth/profile/repository.js +25 -0
- package/script/src/features/auth/repository.d.ts +1 -0
- package/script/src/features/auth/repository.d.ts.map +1 -1
- package/script/src/features/auth/repository.js +6 -23
- package/script/src/features/auth/storage/client_store.d.ts +30 -0
- package/script/src/features/auth/storage/client_store.d.ts.map +1 -0
- package/script/src/features/auth/storage/client_store.js +51 -0
- package/script/src/features/auth/storage/client_token_handler.d.ts +32 -0
- package/script/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
- package/script/src/features/auth/storage/client_token_handler.js +40 -0
- package/script/src/features/auth/storage/server_store.d.ts +24 -0
- package/script/src/features/auth/storage/server_store.d.ts.map +1 -0
- package/script/src/features/auth/storage/server_store.js +38 -0
- package/script/src/features/auth/storage/server_token_handler.d.ts +35 -0
- package/script/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
- package/script/src/features/auth/storage/server_token_handler.js +72 -0
- package/script/src/features/auth/storage/types.d.ts +42 -0
- package/script/src/features/auth/storage/types.d.ts.map +1 -0
- package/script/src/features/auth/storage/types.js +2 -0
- package/script/src/models/contact/derivatives/contact.d.ts +4 -0
- package/script/src/models/contact/derivatives/contact.d.ts.map +1 -1
- package/script/src/models/contact/derivatives/contact.js +6 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { User } from "../../../models/index.js";
|
|
2
|
+
import { ProfileRepository } from "../profile/repository.js";
|
|
3
|
+
import { LoginRepository } from "../identity/repository.js";
|
|
4
|
+
import { AuthRepository } from "../repository.js";
|
|
5
|
+
/**
|
|
6
|
+
* Server-side implementation of TokenHandler.
|
|
7
|
+
* Manages tokens in memory for the duration of a request.
|
|
8
|
+
* @implements {TokenHandler}
|
|
9
|
+
*/
|
|
10
|
+
export class ServerTokenHandler {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new instance of ServerTokenHandler.
|
|
13
|
+
* @param {string} [token] - Optional initial token value
|
|
14
|
+
*/
|
|
15
|
+
constructor(token) {
|
|
16
|
+
Object.defineProperty(this, "token", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: token
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the stored token.
|
|
25
|
+
* @returns {string | undefined} The current token or undefined if not set
|
|
26
|
+
*/
|
|
27
|
+
getUserToken() {
|
|
28
|
+
return this.token;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Stores the provided token in memory.
|
|
32
|
+
* @param {string} token - The token to store
|
|
33
|
+
*/
|
|
34
|
+
setUserToken(token) {
|
|
35
|
+
this.token = token;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Clears the stored token from memory.
|
|
39
|
+
*/
|
|
40
|
+
clearToken() {
|
|
41
|
+
this.token = undefined;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Fetches and constructs the full user data
|
|
45
|
+
* @returns {Promise<User>}
|
|
46
|
+
*/
|
|
47
|
+
async constructUser() {
|
|
48
|
+
if (!this.token) {
|
|
49
|
+
throw new Error("Token is required to construct user");
|
|
50
|
+
}
|
|
51
|
+
const profileRepo = new ProfileRepository();
|
|
52
|
+
const authRepo = new AuthRepository();
|
|
53
|
+
const logInRepo = new LoginRepository();
|
|
54
|
+
const token = this.token;
|
|
55
|
+
const [access, profile, identity] = await Promise.all([
|
|
56
|
+
authRepo.getAccessList(token),
|
|
57
|
+
profileRepo.getCurrentProfile(token),
|
|
58
|
+
logInRepo.getIdentity(token),
|
|
59
|
+
]);
|
|
60
|
+
return new User({
|
|
61
|
+
token,
|
|
62
|
+
profile,
|
|
63
|
+
access,
|
|
64
|
+
resetPassword: false,
|
|
65
|
+
loginCredentials: identity,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { User } from "../../../models/user/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Interface defining the contract for auth storage implementations.
|
|
4
|
+
* This allows for different storage strategies in different environments.
|
|
5
|
+
*/
|
|
6
|
+
export interface AuthStore {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the currently authenticated user.
|
|
9
|
+
* @returns {User | undefined} The current user or undefined if not authenticated
|
|
10
|
+
*/
|
|
11
|
+
getUser(): User | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the current authenticated user.
|
|
14
|
+
* @param {User} user - The user to set as currently authenticated
|
|
15
|
+
*/
|
|
16
|
+
setUser(user: User): void;
|
|
17
|
+
/**
|
|
18
|
+
* Clears the current authentication state.
|
|
19
|
+
*/
|
|
20
|
+
refresh(): void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Interface defining the contract for token handling implementations.
|
|
24
|
+
* This allows for different token storage strategies in different environments.
|
|
25
|
+
*/
|
|
26
|
+
export interface TokenHandler {
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the current authentication token.
|
|
29
|
+
* @returns {string | undefined} The current token or undefined if not present
|
|
30
|
+
*/
|
|
31
|
+
getUserToken(): string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the authentication token.
|
|
34
|
+
* @param {string} token - The token to store
|
|
35
|
+
*/
|
|
36
|
+
setUserToken(token: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Clears the stored authentication token.
|
|
39
|
+
*/
|
|
40
|
+
clearToken(): void;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/storage/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,OAAO,IAAI,IAAI,GAAG,SAAS,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS,CAAC;IAEnC;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,UAAU,IAAI,IAAI,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../../../src/src/models/contact/derivatives/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IAEnC;;OAEG;IACH,OAAO;IAIP;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,WAAW,CAEtB;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,IAAI,CAEpB;IAED;;;;;;;;;;;OAWG;IACH,IAAI,IAAI,IAAI,WAAW,GAAG,SAAS,CAoBlC;IAED;;;;;;OAMG;IACH,IAAI,OAAO,IAAI,MAAM,CAIpB;IAED;;;;;;OAMG;IACH,IAAI,KAAK,IAAI,MAAM,CAIlB;IAED;;;OAGG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED;;;;;;;OAOG;IACH,IAAI,UAAU,IAAI,MAAM,CAKvB;IAED;;;;;;;OAOG;IACH,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED;;;;;;;OAOG;IACH,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED;;;OAGG;WACW,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;IAIhD;;;OAGG;WACW,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE;IAI7D;;;OAGG;WACW,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,IAAI;IAQ3D;;;;;;;;;;;;;;;;;;;;;OAqBG;WACW,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO;IAUxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;WACW,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO;IAO9C;;OAEG;IACH,MAAM,IAAI,WAAW;CAGtB"}
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../../../src/src/models/contact/derivatives/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EACjB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IAEnC;;OAEG;IACH,OAAO;IAIP;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;OAEG;IACH,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,WAAW,CAEtB;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,IAAI,CAEpB;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,IAAI,CAEpB;IAED;;;;;;;;;;;OAWG;IACH,IAAI,IAAI,IAAI,WAAW,GAAG,SAAS,CAoBlC;IAED;;;;;;OAMG;IACH,IAAI,OAAO,IAAI,MAAM,CAIpB;IAED;;;;;;OAMG;IACH,IAAI,KAAK,IAAI,MAAM,CAIlB;IAED;;;OAGG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED;;;;;;;OAOG;IACH,IAAI,UAAU,IAAI,MAAM,CAKvB;IAED;;;;;;;OAOG;IACH,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED;;;;;;;OAOG;IACH,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED;;;OAGG;WACW,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO;IAIhD;;;OAGG;WACW,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE;IAI7D;;;OAGG;WACW,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,IAAI;IAQ3D;;;;;;;;;;;;;;;;;;;;;OAqBG;WACW,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO;IAUxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;WACW,EAAE,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,OAAO;IAO9C;;OAEG;IACH,MAAM,IAAI,WAAW;CAGtB"}
|
|
@@ -48,6 +48,12 @@ export class Contact {
|
|
|
48
48
|
get createdAt() {
|
|
49
49
|
return this.data.createdAt;
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Update timestamp of the contact
|
|
53
|
+
*/
|
|
54
|
+
get updatedAt() {
|
|
55
|
+
return this.data.updatedAt;
|
|
56
|
+
}
|
|
51
57
|
/**
|
|
52
58
|
* Detailed contact information based on contact type
|
|
53
59
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/afloat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A JavaScript/TypeScript package providing common utilities and logic shared across all Temboplus-Afloat Projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"antd": "^5.22.7",
|
|
29
29
|
"uuid": "^11.0.3",
|
|
30
30
|
"zod": "^3.24.1",
|
|
31
|
-
"zustand": "^5.0.2"
|
|
31
|
+
"zustand": "^5.0.2",
|
|
32
|
+
"@deno/shim-deno": "~0.18.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@types/node": "^20.9.0",
|
|
35
36
|
"picocolors": "^1.0.0",
|
|
36
|
-
"@faker-js/faker": "9.3.0"
|
|
37
|
-
"@deno/shim-deno": "~0.18.0"
|
|
37
|
+
"@faker-js/faker": "9.3.0"
|
|
38
38
|
},
|
|
39
39
|
"_generatedBy": "dnt@dev"
|
|
40
40
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAKvC,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dntGlobalThis = exports.Deno = void 0;
|
|
4
|
+
const shim_deno_1 = require("@deno/shim-deno");
|
|
5
|
+
var shim_deno_2 = require("@deno/shim-deno");
|
|
6
|
+
Object.defineProperty(exports, "Deno", { enumerable: true, get: function () { return shim_deno_2.Deno; } });
|
|
7
|
+
const dntGlobals = {
|
|
8
|
+
Deno: shim_deno_1.Deno,
|
|
9
|
+
};
|
|
10
|
+
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
11
|
+
function createMergeProxy(baseObj, extObj) {
|
|
12
|
+
return new Proxy(baseObj, {
|
|
13
|
+
get(_target, prop, _receiver) {
|
|
14
|
+
if (prop in extObj) {
|
|
15
|
+
return extObj[prop];
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return baseObj[prop];
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
set(_target, prop, value) {
|
|
22
|
+
if (prop in extObj) {
|
|
23
|
+
delete extObj[prop];
|
|
24
|
+
}
|
|
25
|
+
baseObj[prop] = value;
|
|
26
|
+
return true;
|
|
27
|
+
},
|
|
28
|
+
deleteProperty(_target, prop) {
|
|
29
|
+
let success = false;
|
|
30
|
+
if (prop in extObj) {
|
|
31
|
+
delete extObj[prop];
|
|
32
|
+
success = true;
|
|
33
|
+
}
|
|
34
|
+
if (prop in baseObj) {
|
|
35
|
+
delete baseObj[prop];
|
|
36
|
+
success = true;
|
|
37
|
+
}
|
|
38
|
+
return success;
|
|
39
|
+
},
|
|
40
|
+
ownKeys(_target) {
|
|
41
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
42
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
43
|
+
const extKeysSet = new Set(extKeys);
|
|
44
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
45
|
+
},
|
|
46
|
+
defineProperty(_target, prop, desc) {
|
|
47
|
+
if (prop in extObj) {
|
|
48
|
+
delete extObj[prop];
|
|
49
|
+
}
|
|
50
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
51
|
+
return true;
|
|
52
|
+
},
|
|
53
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
54
|
+
if (prop in extObj) {
|
|
55
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
has(_target, prop) {
|
|
62
|
+
return prop in extObj || prop in baseObj;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,QAmBb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,QAwBb"}
|
package/{esm/deps/jsr.io/@std/assert/1.0.10 → script/deps/jsr.io/@std/assert/1.0.11}/assert.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/equal.ts"],"names":[],"mappings":"AA2FA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAuGrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"exists.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/exists.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC,CAOlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"fail.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/fail.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"false.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/false.ts"],"names":[],"mappings":"AAIA,uDAAuD;AACvD,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAE3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,IAAI,KAAK,CAI1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"greater.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/greater.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"greater_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/greater_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/instance_of.ts"],"names":[],"mappings":"AAIA,sBAAsB;AAEtB,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AACzD,4BAA4B;AAC5B,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAE9B,CAAC,SAAS,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAE9C,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,CAAC,EACf,GAAG,SAAK,GACP,OAAO,CAAC,MAAM,IAAI,YAAY,CAAC,CAAC,CAAC,CA6BnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"is_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/is_error.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,KAAK,EAAE,OAAO,EAEd,UAAU,CAAC,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/C,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAC5B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,KAAK,IAAI,CAAC,CA8BpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"less.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/less.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAMjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"less_or_equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/less_or_equal.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QASb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/mod.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_equals.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,QAUtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_instance_of.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_instance_of.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EACtC,MAAM,EAAE,CAAC,EAET,cAAc,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAClD,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAKjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"not_strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/not_strict_equals.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAYb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"object_match.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/object_match.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,iBAAiB,CAE/B,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAChC,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,GAAG,CAAC,EAAE,MAAM,GACX,IAAI,CAUN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/rejects.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,MAAM,WAAW,CAAC,OAAO,CAAC,EAC9B,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,OAAO,CAAC,CAAC;AACpB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EACnD,EAAE,EAAE,MAAM,WAAW,CAAC,OAAO,CAAC,EAE9B,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/strict_equals.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,CAAC,CA+BrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/string_includes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/unimplemented.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.
|
|
1
|
+
{"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.11/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
|
|
@@ -79,6 +79,20 @@ export declare const authContract: {
|
|
|
79
79
|
400: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
+
access: {
|
|
83
|
+
method: "GET";
|
|
84
|
+
path: "/access";
|
|
85
|
+
headers: z.ZodObject<{
|
|
86
|
+
token: z.ZodString;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
token: string;
|
|
89
|
+
}, {
|
|
90
|
+
token: string;
|
|
91
|
+
}>;
|
|
92
|
+
responses: {
|
|
93
|
+
200: z.ZodArray<z.ZodString, "many">;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
82
96
|
resetPassword: {
|
|
83
97
|
method: "PUT";
|
|
84
98
|
body: z.ZodObject<{
|
|
@@ -95,29 +109,4 @@ export declare const authContract: {
|
|
|
95
109
|
responses: {};
|
|
96
110
|
};
|
|
97
111
|
};
|
|
98
|
-
export declare const identityContract: {
|
|
99
|
-
getUserCredentials: {
|
|
100
|
-
method: "GET";
|
|
101
|
-
path: "/me";
|
|
102
|
-
headers: z.ZodObject<{
|
|
103
|
-
token: z.ZodString;
|
|
104
|
-
}, "strip", z.ZodTypeAny, {
|
|
105
|
-
token: string;
|
|
106
|
-
}, {
|
|
107
|
-
token: string;
|
|
108
|
-
}>;
|
|
109
|
-
responses: {
|
|
110
|
-
200: z.ZodObject<{
|
|
111
|
-
name: z.ZodString;
|
|
112
|
-
identity: z.ZodString;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
name: string;
|
|
115
|
-
identity: string;
|
|
116
|
-
}, {
|
|
117
|
-
name: string;
|
|
118
|
-
identity: string;
|
|
119
|
-
}>;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
112
|
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCvB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.authContract = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const core_1 = require("@ts-rest/core");
|
|
6
6
|
const index_js_1 = require("../../models/index.js");
|
|
@@ -26,6 +26,14 @@ exports.authContract = (0, core_1.initContract)().router({
|
|
|
26
26
|
400: zod_1.z.object({}),
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
+
access: {
|
|
30
|
+
method: "GET",
|
|
31
|
+
path: "/access",
|
|
32
|
+
headers: zod_1.z.object({ token: zod_1.z.string() }),
|
|
33
|
+
responses: {
|
|
34
|
+
200: zod_1.z.string().array(),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
29
37
|
resetPassword: {
|
|
30
38
|
method: "PUT",
|
|
31
39
|
path: "/password",
|
|
@@ -36,18 +44,3 @@ exports.authContract = (0, core_1.initContract)().router({
|
|
|
36
44
|
responses: {},
|
|
37
45
|
},
|
|
38
46
|
});
|
|
39
|
-
exports.identityContract = (0, core_1.initContract)().router({
|
|
40
|
-
getUserCredentials: {
|
|
41
|
-
method: "GET",
|
|
42
|
-
path: "/me",
|
|
43
|
-
headers: zod_1.z.object({
|
|
44
|
-
token: zod_1.z.string(),
|
|
45
|
-
}),
|
|
46
|
-
responses: {
|
|
47
|
-
200: zod_1.z.object({
|
|
48
|
-
name: zod_1.z.string(),
|
|
49
|
-
identity: zod_1.z.string(),
|
|
50
|
-
}),
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Identity API contract
|
|
4
|
+
*/
|
|
5
|
+
export declare const identityContract: {
|
|
6
|
+
getUserCredentials: {
|
|
7
|
+
method: "GET";
|
|
8
|
+
path: "/me";
|
|
9
|
+
headers: z.ZodObject<{
|
|
10
|
+
token: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
token: string;
|
|
13
|
+
}, {
|
|
14
|
+
token: string;
|
|
15
|
+
}>;
|
|
16
|
+
responses: {
|
|
17
|
+
200: z.ZodObject<{
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
identity: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
name: string;
|
|
22
|
+
identity: string;
|
|
23
|
+
}, {
|
|
24
|
+
name: string;
|
|
25
|
+
identity: string;
|
|
26
|
+
}>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/identity/contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;CAY3B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.identityContract = void 0;
|
|
4
|
+
const core_1 = require("@ts-rest/core");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
/**
|
|
7
|
+
* Identity API contract
|
|
8
|
+
*/
|
|
9
|
+
exports.identityContract = (0, core_1.initContract)().router({
|
|
10
|
+
getUserCredentials: {
|
|
11
|
+
method: "GET",
|
|
12
|
+
path: "/me",
|
|
13
|
+
headers: zod_1.z.object({ token: zod_1.z.string() }),
|
|
14
|
+
responses: {
|
|
15
|
+
200: zod_1.z.object({
|
|
16
|
+
name: zod_1.z.string(),
|
|
17
|
+
identity: zod_1.z.string(),
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseRepository } from "../../../shared/index.js";
|
|
2
|
+
import { identityContract } from "./contract.js";
|
|
3
|
+
import type { ClientInferResponseBody } from "@ts-rest/core";
|
|
4
|
+
type GetUserIdentityResponse = ClientInferResponseBody<typeof identityContract.getUserCredentials>;
|
|
5
|
+
/**
|
|
6
|
+
* Class representing the LoginRepository.
|
|
7
|
+
* Provides methods to retrieve user identity-related information.
|
|
8
|
+
*/
|
|
9
|
+
export declare class LoginRepository extends BaseRepository<typeof identityContract> {
|
|
10
|
+
/**
|
|
11
|
+
* Initializes an instance of LoginRepository.
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves the user's login credentials.
|
|
16
|
+
* @returns A promise that resolves to the user's login credentials on success.
|
|
17
|
+
* @throws {APIError} If an error occurs while retrieving the credentials.
|
|
18
|
+
*/
|
|
19
|
+
getIdentity(token: string): Promise<GetUserIdentityResponse>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../../src/src/features/auth/identity/repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE7D,KAAK,uBAAuB,GAAG,uBAAuB,CACpD,OAAO,gBAAgB,CAAC,kBAAkB,CAC3C,CAAC;AAEF;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,cAAc,CAAC,OAAO,gBAAgB,CAAC;IAC1E;;OAEG;;IAKH;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAUnE"}
|