@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 @@
|
|
|
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,61 @@
|
|
|
1
|
+
import { Deno } from "@deno/shim-deno";
|
|
2
|
+
export { Deno } from "@deno/shim-deno";
|
|
3
|
+
const dntGlobals = {
|
|
4
|
+
Deno,
|
|
5
|
+
};
|
|
6
|
+
export const dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
7
|
+
function createMergeProxy(baseObj, extObj) {
|
|
8
|
+
return new Proxy(baseObj, {
|
|
9
|
+
get(_target, prop, _receiver) {
|
|
10
|
+
if (prop in extObj) {
|
|
11
|
+
return extObj[prop];
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
return baseObj[prop];
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
set(_target, prop, value) {
|
|
18
|
+
if (prop in extObj) {
|
|
19
|
+
delete extObj[prop];
|
|
20
|
+
}
|
|
21
|
+
baseObj[prop] = value;
|
|
22
|
+
return true;
|
|
23
|
+
},
|
|
24
|
+
deleteProperty(_target, prop) {
|
|
25
|
+
let success = false;
|
|
26
|
+
if (prop in extObj) {
|
|
27
|
+
delete extObj[prop];
|
|
28
|
+
success = true;
|
|
29
|
+
}
|
|
30
|
+
if (prop in baseObj) {
|
|
31
|
+
delete baseObj[prop];
|
|
32
|
+
success = true;
|
|
33
|
+
}
|
|
34
|
+
return success;
|
|
35
|
+
},
|
|
36
|
+
ownKeys(_target) {
|
|
37
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
38
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
39
|
+
const extKeysSet = new Set(extKeys);
|
|
40
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
41
|
+
},
|
|
42
|
+
defineProperty(_target, prop, desc) {
|
|
43
|
+
if (prop in extObj) {
|
|
44
|
+
delete extObj[prop];
|
|
45
|
+
}
|
|
46
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
47
|
+
return true;
|
|
48
|
+
},
|
|
49
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
50
|
+
if (prop in extObj) {
|
|
51
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
has(_target, prop) {
|
|
58
|
+
return prop in extObj || prop in baseObj;
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -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/{script/deps/jsr.io/@std/assert/1.0.10 → esm/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"}
|
|
@@ -23,6 +23,14 @@ export const authContract = initContract().router({
|
|
|
23
23
|
400: z.object({}),
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
+
access: {
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: "/access",
|
|
29
|
+
headers: z.object({ token: z.string() }),
|
|
30
|
+
responses: {
|
|
31
|
+
200: z.string().array(),
|
|
32
|
+
},
|
|
33
|
+
},
|
|
26
34
|
resetPassword: {
|
|
27
35
|
method: "PUT",
|
|
28
36
|
path: "/password",
|
|
@@ -33,18 +41,3 @@ export const authContract = initContract().router({
|
|
|
33
41
|
responses: {},
|
|
34
42
|
},
|
|
35
43
|
});
|
|
36
|
-
export const identityContract = initContract().router({
|
|
37
|
-
getUserCredentials: {
|
|
38
|
-
method: "GET",
|
|
39
|
-
path: "/me",
|
|
40
|
-
headers: z.object({
|
|
41
|
-
token: z.string(),
|
|
42
|
-
}),
|
|
43
|
-
responses: {
|
|
44
|
-
200: z.object({
|
|
45
|
-
name: z.string(),
|
|
46
|
-
identity: z.string(),
|
|
47
|
-
}),
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
});
|
|
@@ -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,18 @@
|
|
|
1
|
+
import { initContract } from "@ts-rest/core";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* Identity API contract
|
|
5
|
+
*/
|
|
6
|
+
export const identityContract = initContract().router({
|
|
7
|
+
getUserCredentials: {
|
|
8
|
+
method: "GET",
|
|
9
|
+
path: "/me",
|
|
10
|
+
headers: z.object({ token: z.string() }),
|
|
11
|
+
responses: {
|
|
12
|
+
200: z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
identity: z.string(),
|
|
15
|
+
}),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { APIError } from "../../../errors/api_error.js";
|
|
2
|
+
import { BaseRepository } from "../../../shared/index.js";
|
|
3
|
+
import { identityContract } from "./contract.js";
|
|
4
|
+
/**
|
|
5
|
+
* Class representing the LoginRepository.
|
|
6
|
+
* Provides methods to retrieve user identity-related information.
|
|
7
|
+
*/
|
|
8
|
+
export class LoginRepository extends BaseRepository {
|
|
9
|
+
/**
|
|
10
|
+
* Initializes an instance of LoginRepository.
|
|
11
|
+
*/
|
|
12
|
+
constructor() {
|
|
13
|
+
super("login", identityContract);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves the user's login credentials.
|
|
17
|
+
* @returns A promise that resolves to the user's login credentials on success.
|
|
18
|
+
* @throws {APIError} If an error occurs while retrieving the credentials.
|
|
19
|
+
*/
|
|
20
|
+
async getIdentity(token) {
|
|
21
|
+
const headers = { token };
|
|
22
|
+
const result = await this.client.getUserCredentials({ headers });
|
|
23
|
+
if (result.status === 200)
|
|
24
|
+
return result.body;
|
|
25
|
+
throw new APIError({
|
|
26
|
+
message: "An error occurred while trying to get login credentials",
|
|
27
|
+
statusCode: 502,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,69 +1,92 @@
|
|
|
1
|
-
import { User } from "../../models/index.js";
|
|
1
|
+
import type { User } from "../../models/index.js";
|
|
2
2
|
import type { Permission } from "../../models/permission.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Main authentication class that works in both client and server environments.
|
|
5
|
+
* Provides authentication functionality and user management.
|
|
5
6
|
*/
|
|
6
7
|
export declare class AfloatAuth {
|
|
8
|
+
/** Singleton instance */
|
|
7
9
|
private static _instance;
|
|
10
|
+
/** The auth store implementation */
|
|
11
|
+
private store;
|
|
12
|
+
/** The token handler implementation */
|
|
13
|
+
private tokenHandler;
|
|
8
14
|
/**
|
|
9
15
|
* Private constructor to prevent direct instantiation.
|
|
16
|
+
* @param {AuthStore} store - The auth store implementation to use
|
|
17
|
+
* @param {TokenHandler} tokenHandler - The token handler implementation to use
|
|
10
18
|
*/
|
|
11
19
|
private constructor();
|
|
20
|
+
/**
|
|
21
|
+
* Initializes AfloatAuth for client-side use.
|
|
22
|
+
* This should be called once at application startup in client environments.
|
|
23
|
+
* @returns {AfloatAuth} The singleton instance configured for client-side
|
|
24
|
+
*/
|
|
25
|
+
static initializeClient(): AfloatAuth;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new instance of AfloatAuth configured for server-side use.
|
|
28
|
+
* Initializes the user by fetching necessary data using the provided token.
|
|
29
|
+
* @param {string} token - Authentication token
|
|
30
|
+
* @returns {Promise<AfloatAuth>} A new instance configured for server-side
|
|
31
|
+
* @throws {Error} If token is invalid or required data cannot be fetched
|
|
32
|
+
*/
|
|
33
|
+
static initializeServer(token: string): Promise<AfloatAuth>;
|
|
12
34
|
/**
|
|
13
35
|
* Gets the singleton instance of AfloatAuth.
|
|
14
|
-
* @
|
|
36
|
+
* @throws {Error} If AfloatAuth hasn't been initialized
|
|
37
|
+
* @returns {AfloatAuth} The singleton instance
|
|
15
38
|
*/
|
|
16
39
|
static get instance(): AfloatAuth;
|
|
17
40
|
/**
|
|
18
|
-
*
|
|
41
|
+
* Gets the authentication repository instance.
|
|
19
42
|
* @private
|
|
20
|
-
* @returns {AuthRepository} The repository
|
|
43
|
+
* @returns {AuthRepository} The repository for auth operations
|
|
21
44
|
*/
|
|
22
45
|
private get repo();
|
|
23
46
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @returns {string | undefined} The token
|
|
47
|
+
* Gets the current authentication token.
|
|
48
|
+
* @returns {string | undefined} The current token or undefined if not authenticated
|
|
26
49
|
*/
|
|
27
50
|
getUserToken(): string | undefined;
|
|
28
51
|
/**
|
|
29
|
-
* Gets the currently
|
|
30
|
-
* @returns {User | undefined} The current user
|
|
52
|
+
* Gets the currently authenticated user.
|
|
53
|
+
* @returns {User | undefined} The current user or undefined if not authenticated
|
|
31
54
|
*/
|
|
32
55
|
get currentUser(): User | undefined;
|
|
33
56
|
/**
|
|
34
|
-
* React hook
|
|
35
|
-
*
|
|
36
|
-
* @returns {User | undefined} The current user
|
|
57
|
+
* React hook for accessing the current user in client-side code.
|
|
58
|
+
* @throws {Error} If called in a server environment
|
|
59
|
+
* @returns {User | undefined} The current user or undefined if not authenticated
|
|
37
60
|
*/
|
|
38
61
|
useCurrentUser(): User | undefined;
|
|
39
62
|
/**
|
|
40
|
-
* Checks if the current user has
|
|
41
|
-
* @param {Permission} perm - The permission to check
|
|
42
|
-
* @returns {boolean}
|
|
63
|
+
* Checks if the current user has a specific permission.
|
|
64
|
+
* @param {Permission} perm - The permission to check
|
|
65
|
+
* @returns {boolean} True if the user has the permission, false otherwise
|
|
43
66
|
*/
|
|
44
67
|
checkPermission(perm: Permission): boolean;
|
|
45
68
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @param {string} email - The user's email
|
|
48
|
-
* @param {string} password - The user's password
|
|
49
|
-
* @returns {Promise<User>}
|
|
50
|
-
* @throws Will throw an error if authentication fails
|
|
69
|
+
* Authenticates a user with email and password.
|
|
70
|
+
* @param {string} email - The user's email
|
|
71
|
+
* @param {string} password - The user's password
|
|
72
|
+
* @returns {Promise<User>} Promise resolving to the authenticated user
|
|
73
|
+
* @throws Will throw an error if authentication fails
|
|
51
74
|
*/
|
|
52
75
|
logIn(email: string, password: string): Promise<User>;
|
|
53
76
|
/**
|
|
54
|
-
*
|
|
55
|
-
* @param {string} current - The current password
|
|
56
|
-
* @param {string} updated - The new password
|
|
57
|
-
* @returns {Promise<boolean>}
|
|
58
|
-
* @throws Will throw an error if the
|
|
77
|
+
* Updates the user's password.
|
|
78
|
+
* @param {string} current - The current password
|
|
79
|
+
* @param {string} updated - The new password
|
|
80
|
+
* @returns {Promise<boolean>} Promise resolving to true if successful
|
|
81
|
+
* @throws Will throw an error if the password update fails
|
|
59
82
|
*/
|
|
60
83
|
resetPassword(current: string, updated: string): Promise<boolean>;
|
|
61
84
|
/**
|
|
62
|
-
* Logs out the current user
|
|
85
|
+
* Logs out the current user.
|
|
63
86
|
*/
|
|
64
87
|
logOut(): void;
|
|
65
88
|
/**
|
|
66
|
-
* Clears
|
|
89
|
+
* Clears all authentication data.
|
|
67
90
|
* @private
|
|
68
91
|
*/
|
|
69
92
|
private clearSavedData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/manager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAU7D;;;GAGG;AACH,qBAAa,UAAU;IACrB,yBAAyB;IACzB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAa;IAErC,oCAAoC;IACpC,OAAO,CAAC,KAAK,CAAY;IAEzB,uCAAuC;IACvC,OAAO,CAAC,YAAY,CAAe;IAEnC;;;;OAIG;IACH,OAAO;IAKP;;;;OAIG;WACW,gBAAgB,IAAI,UAAU;IAU5C;;;;;;OAMG;WACiB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAwBxE;;;;OAIG;IACH,WAAkB,QAAQ,IAAI,UAAU,CAOvC;IAED;;;;OAIG;IACH,OAAO,KAAK,IAAI,GAEf;IAED;;;OAGG;IACH,YAAY,IAAI,MAAM,GAAG,SAAS;IAIlC;;;OAGG;IACH,IAAI,WAAW,IAAI,IAAI,GAAG,SAAS,CAElC;IAED;;;;OAIG;IACH,cAAc,IAAI,IAAI,GAAG,SAAS;IASlC;;;;OAIG;IACH,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAI1C;;;;;;OAMG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3D;;;;;;OAMG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMvE;;OAEG;IACH,MAAM,IAAI,IAAI;IAId;;;OAGG;IACH,OAAO,CAAC,cAAc;CAIvB"}
|