@temboplus/afloat 0.1.10 → 0.1.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/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/almost_equals.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/assert/1.0.11 → esm/deps/jsr.io/@std/assert/1.0.10}/array_includes.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/assert/1.0.11 → esm/deps/jsr.io/@std/assert/1.0.10}/assert.d.ts.map +1 -1
- package/{script/deps/jsr.io/@std/assert/1.0.11 → esm/deps/jsr.io/@std/assert/1.0.10}/assertion_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/exists.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/fail.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/false.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/greater.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/greater_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/is_error.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/less.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/less_or_equal.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/mod.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_instance_of.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/object_match.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/rejects.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/strict_equals.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/string_includes.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/throws.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/unimplemented.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/unreachable.d.ts.map +1 -1
- package/esm/src/features/auth/manager.d.ts +9 -1
- package/esm/src/features/auth/manager.d.ts.map +1 -1
- package/esm/src/features/auth/manager.js +21 -3
- package/esm/src/features/contact/repository.d.ts +12 -1
- package/esm/src/features/contact/repository.d.ts.map +1 -1
- package/esm/src/features/contact/repository.js +25 -11
- package/esm/src/features/files-gen/repository.d.ts +4 -1
- package/esm/src/features/files-gen/repository.d.ts.map +1 -1
- package/esm/src/features/files-gen/repository.js +9 -1
- package/esm/src/features/payout/repository.d.ts +6 -1
- package/esm/src/features/payout/repository.d.ts.map +1 -1
- package/esm/src/features/payout/repository.js +12 -7
- package/esm/src/features/wallet/repository.d.ts +8 -1
- package/esm/src/features/wallet/repository.d.ts.map +1 -1
- package/esm/src/features/wallet/repository.js +17 -8
- package/esm/src/shared/base_repository.d.ts +25 -1
- package/esm/src/shared/base_repository.d.ts.map +1 -1
- package/esm/src/shared/base_repository.js +61 -3
- package/package.json +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/almost_equals.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/assert/1.0.11 → script/deps/jsr.io/@std/assert/1.0.10}/array_includes.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/assert/1.0.11 → script/deps/jsr.io/@std/assert/1.0.10}/assert.d.ts.map +1 -1
- package/{esm/deps/jsr.io/@std/assert/1.0.11 → script/deps/jsr.io/@std/assert/1.0.10}/assertion_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/exists.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/fail.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/false.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/greater.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/greater_or_equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/instance_of.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/is_error.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/less.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/less_or_equal.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/match.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/mod.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_instance_of.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_match.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/not_strict_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/object_match.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/rejects.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/strict_equals.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/string_includes.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/throws.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/unimplemented.d.ts.map +1 -1
- package/script/deps/jsr.io/@std/assert/{1.0.11 → 1.0.10}/unreachable.d.ts.map +1 -1
- package/script/src/features/auth/manager.d.ts +9 -1
- package/script/src/features/auth/manager.d.ts.map +1 -1
- package/script/src/features/auth/manager.js +22 -4
- package/script/src/features/contact/repository.d.ts +12 -1
- package/script/src/features/contact/repository.d.ts.map +1 -1
- package/script/src/features/contact/repository.js +31 -17
- package/script/src/features/files-gen/repository.d.ts +4 -1
- package/script/src/features/files-gen/repository.d.ts.map +1 -1
- package/script/src/features/files-gen/repository.js +9 -1
- package/script/src/features/payout/repository.d.ts +6 -1
- package/script/src/features/payout/repository.d.ts.map +1 -1
- package/script/src/features/payout/repository.js +12 -7
- package/script/src/features/wallet/repository.d.ts +8 -1
- package/script/src/features/wallet/repository.d.ts.map +1 -1
- package/script/src/features/wallet/repository.js +17 -8
- package/script/src/shared/base_repository.d.ts +25 -1
- package/script/src/shared/base_repository.d.ts.map +1 -1
- package/script/src/shared/base_repository.js +61 -3
|
@@ -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.10/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.10/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.11 → esm/deps/jsr.io/@std/assert/1.0.10}/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/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.10/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import type { User } from "../../models/index.js";
|
|
2
2
|
import type { Permission } from "../../models/permission.js";
|
|
3
|
+
/**
|
|
4
|
+
* Global context to hold the current auth instance reference.
|
|
5
|
+
* This provides a way to access the auth instance across the application
|
|
6
|
+
* without directly coupling to the singleton pattern.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AuthContext: {
|
|
9
|
+
current: AfloatAuth | undefined;
|
|
10
|
+
};
|
|
3
11
|
/**
|
|
4
12
|
* Main authentication class that works in both client and server environments.
|
|
5
13
|
* Provides authentication functionality and user management.
|
|
@@ -12,7 +20,7 @@ export declare class AfloatAuth {
|
|
|
12
20
|
/** client AfloatAuth instance */
|
|
13
21
|
private static _instance;
|
|
14
22
|
/**
|
|
15
|
-
* Private constructor to
|
|
23
|
+
* Private constructor to maintain control over instantiation.
|
|
16
24
|
* @param {AuthStore} store - The auth store implementation to use
|
|
17
25
|
* @param {TokenHandler} tokenHandler - The token handler implementation to use
|
|
18
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAU7D;;;GAGG;AACH,qBAAa,UAAU;IACrB,oCAAoC;IACpC,OAAO,CAAC,KAAK,CAAY;IAEzB,uCAAuC;IACvC,OAAO,CAAC,YAAY,CAAe;IAEnC,iCAAiC;IACjC,OAAO,CAAC,MAAM,CAAC,SAAS,CAA2B;
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/src/features/auth/manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAU7D;;;;GAIG;AACH,eAAO,MAAM,WAAW;aAEA,UAAU,GAAG,SAAS;CAC7C,CAAC;AAEF;;;GAGG;AACH,qBAAa,UAAU;IACrB,oCAAoC;IACpC,OAAO,CAAC,KAAK,CAAY;IAEzB,uCAAuC;IACvC,OAAO,CAAC,YAAY,CAAe;IAEnC,iCAAiC;IACjC,OAAO,CAAC,MAAM,CAAC,SAAS,CAA2B;IAEnD;;;;OAIG;IACH,OAAO;IAKP;;;;;;;;;;;;OAYG;IACH,WAAkB,QAAQ,IAAI,UAAU,CAYvC;IAED;;;;;;;OAOG;WACiB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IA8BxE;;;;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;IAIlC;;;;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"}
|
|
@@ -3,13 +3,22 @@ import { createClientStore, useClientUser, } from "./storage/client_store.js";
|
|
|
3
3
|
import { ClientTokenHandler } from "./storage/client_token_handler.js";
|
|
4
4
|
import { ServerStore } from "./storage/server_store.js";
|
|
5
5
|
import { ServerTokenHandler } from "./storage/server_token_handler.js";
|
|
6
|
+
/**
|
|
7
|
+
* Global context to hold the current auth instance reference.
|
|
8
|
+
* This provides a way to access the auth instance across the application
|
|
9
|
+
* without directly coupling to the singleton pattern.
|
|
10
|
+
*/
|
|
11
|
+
export const AuthContext = {
|
|
12
|
+
// Default undefined state - will be set during initialization
|
|
13
|
+
current: undefined,
|
|
14
|
+
};
|
|
6
15
|
/**
|
|
7
16
|
* Main authentication class that works in both client and server environments.
|
|
8
17
|
* Provides authentication functionality and user management.
|
|
9
18
|
*/
|
|
10
19
|
export class AfloatAuth {
|
|
11
20
|
/**
|
|
12
|
-
* Private constructor to
|
|
21
|
+
* Private constructor to maintain control over instantiation.
|
|
13
22
|
* @param {AuthStore} store - The auth store implementation to use
|
|
14
23
|
* @param {TokenHandler} tokenHandler - The token handler implementation to use
|
|
15
24
|
*/
|
|
@@ -45,7 +54,12 @@ export class AfloatAuth {
|
|
|
45
54
|
* const serverAuth = await AfloatAuth.initializeServer(token);
|
|
46
55
|
*/
|
|
47
56
|
static get instance() {
|
|
48
|
-
|
|
57
|
+
if (!AfloatAuth._instance) {
|
|
58
|
+
AfloatAuth._instance = new AfloatAuth(createClientStore(), ClientTokenHandler.instance);
|
|
59
|
+
// Set as current instance for global access
|
|
60
|
+
AuthContext.current = AfloatAuth._instance;
|
|
61
|
+
}
|
|
62
|
+
return AfloatAuth._instance;
|
|
49
63
|
}
|
|
50
64
|
/**
|
|
51
65
|
* Creates a new server-side instance of AfloatAuth.
|
|
@@ -66,10 +80,14 @@ export class AfloatAuth {
|
|
|
66
80
|
const user = await tokenHandler.constructUser();
|
|
67
81
|
store.setUser(user);
|
|
68
82
|
// Create and initialize auth instance
|
|
69
|
-
|
|
83
|
+
const auth = new AfloatAuth(store, tokenHandler);
|
|
84
|
+
// Set as current instance for global access
|
|
85
|
+
AuthContext.current = auth;
|
|
86
|
+
return auth;
|
|
70
87
|
}
|
|
71
88
|
catch (error) {
|
|
72
89
|
if (error instanceof Error) {
|
|
90
|
+
console.log(error.stack);
|
|
73
91
|
throw new Error(`Failed to initialize server auth: ${error.message}`);
|
|
74
92
|
}
|
|
75
93
|
throw new Error("Failed to initialize server auth");
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseRepository } from "../../shared/base_repository.js";
|
|
2
2
|
import { contract } from "./contract.js";
|
|
3
3
|
import { Contact, type ContactInput } from "../../models/contact/index.js";
|
|
4
|
+
import type { AfloatAuth } from "../auth/manager.js";
|
|
4
5
|
/**
|
|
5
6
|
* Repository class for managing `Contact` data through API interactions.
|
|
6
7
|
* Extends the `BaseRepository` to leverage shared functionality.
|
|
@@ -8,12 +9,19 @@ import { Contact, type ContactInput } from "../../models/contact/index.js";
|
|
|
8
9
|
export declare class ContactRepository extends BaseRepository<typeof contract> {
|
|
9
10
|
/**
|
|
10
11
|
* Creates an instance of `ContactRepository` using the contact contract.
|
|
12
|
+
* @param {Object} [props] - Optional constructor properties
|
|
13
|
+
* @param {AfloatAuth} [props.auth] - Optional auth instance to use
|
|
14
|
+
* @param {string} [props.root] - Optional API root URL
|
|
11
15
|
*/
|
|
12
|
-
constructor(
|
|
16
|
+
constructor(props?: {
|
|
17
|
+
auth?: AfloatAuth;
|
|
18
|
+
root?: string;
|
|
19
|
+
});
|
|
13
20
|
/**
|
|
14
21
|
* Creates a new contact record.
|
|
15
22
|
* @param {ContactInput} input - The data required to create a new contact.
|
|
16
23
|
* @returns {Promise<Contact>} A promise that resolves to the newly created contact.
|
|
24
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
17
25
|
* @throws {APIError} If the response status code is not 201.
|
|
18
26
|
*/
|
|
19
27
|
create(input: ContactInput): Promise<Contact>;
|
|
@@ -22,6 +30,7 @@ export declare class ContactRepository extends BaseRepository<typeof contract> {
|
|
|
22
30
|
* @param {string} id - The unique identifier of the contact to edit.
|
|
23
31
|
* @param {ContactInput} input - The data to update the contact with.
|
|
24
32
|
* @returns {Promise<Contact>} A promise that resolves to the updated contact.
|
|
33
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
25
34
|
* @throws {APIError} If the response status code is not 200.
|
|
26
35
|
*/
|
|
27
36
|
edit(id: string, input: ContactInput): Promise<Contact>;
|
|
@@ -29,6 +38,7 @@ export declare class ContactRepository extends BaseRepository<typeof contract> {
|
|
|
29
38
|
* Deletes a contact record by ID.
|
|
30
39
|
* @param {string} id - The unique identifier of the contact to remove.
|
|
31
40
|
* @returns {Promise<void>} A promise that resolves when the deletion is complete.
|
|
41
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
32
42
|
* @throws {APIError} If the response status code is not 200.
|
|
33
43
|
*/
|
|
34
44
|
remove(id: string): Promise<void>;
|
|
@@ -37,6 +47,7 @@ export declare class ContactRepository extends BaseRepository<typeof contract> {
|
|
|
37
47
|
* Results are ordered in descending order by default.
|
|
38
48
|
*
|
|
39
49
|
* @returns {Promise<Contact[]>} A promise that resolves to an array of contacts.
|
|
50
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
40
51
|
* @throws {APIError} If the response status code is not 200 or the range is invalid.
|
|
41
52
|
* @example
|
|
42
53
|
* const repository = new ContactRepository();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/contact/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,OAAO,EAEP,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/contact/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,OAAO,EAEP,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,OAAO,QAAQ,CAAC;IACpE;;;;;OAKG;gBACS,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE;IAIxD;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAgBnD;;;;;;;OAOG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAmB7D;;;;;;OAMG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAevC;;;;;;;;;;OAUG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;CAgBnC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BaseRepository } from "../../shared/base_repository.js";
|
|
2
2
|
import { contract } from "./contract.js";
|
|
3
3
|
import { Contact, } from "../../models/contact/index.js";
|
|
4
|
-
import { AfloatAuth } from "../auth/index.js";
|
|
5
4
|
import { Permissions } from "../../models/index.js";
|
|
6
5
|
import { PermissionError } from "../../errors/index.js";
|
|
7
6
|
/**
|
|
@@ -11,21 +10,27 @@ import { PermissionError } from "../../errors/index.js";
|
|
|
11
10
|
export class ContactRepository extends BaseRepository {
|
|
12
11
|
/**
|
|
13
12
|
* Creates an instance of `ContactRepository` using the contact contract.
|
|
13
|
+
* @param {Object} [props] - Optional constructor properties
|
|
14
|
+
* @param {AfloatAuth} [props.auth] - Optional auth instance to use
|
|
15
|
+
* @param {string} [props.root] - Optional API root URL
|
|
14
16
|
*/
|
|
15
|
-
constructor() {
|
|
16
|
-
super("contact", contract);
|
|
17
|
+
constructor(props) {
|
|
18
|
+
super("contact", contract, props);
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Creates a new contact record.
|
|
20
22
|
* @param {ContactInput} input - The data required to create a new contact.
|
|
21
23
|
* @returns {Promise<Contact>} A promise that resolves to the newly created contact.
|
|
24
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
22
25
|
* @throws {APIError} If the response status code is not 201.
|
|
23
26
|
*/
|
|
24
27
|
async create(input) {
|
|
25
|
-
|
|
28
|
+
const auth = this.getAuthForPermissionCheck();
|
|
29
|
+
const requiredPerm = Permissions.Contact.Create;
|
|
30
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
26
31
|
throw new PermissionError({
|
|
27
32
|
message: "You are not authorized to add contacts.",
|
|
28
|
-
requiredPermissions: [
|
|
33
|
+
requiredPermissions: [requiredPerm],
|
|
29
34
|
});
|
|
30
35
|
}
|
|
31
36
|
const result = await this.client.postContact({ body: input });
|
|
@@ -37,13 +42,16 @@ export class ContactRepository extends BaseRepository {
|
|
|
37
42
|
* @param {string} id - The unique identifier of the contact to edit.
|
|
38
43
|
* @param {ContactInput} input - The data to update the contact with.
|
|
39
44
|
* @returns {Promise<Contact>} A promise that resolves to the updated contact.
|
|
45
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
40
46
|
* @throws {APIError} If the response status code is not 200.
|
|
41
47
|
*/
|
|
42
48
|
async edit(id, input) {
|
|
43
|
-
|
|
49
|
+
const auth = this.getAuthForPermissionCheck();
|
|
50
|
+
const requiredPerm = Permissions.Contact.Update;
|
|
51
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
44
52
|
throw new PermissionError({
|
|
45
53
|
message: "You are not authorized to update contacts.",
|
|
46
|
-
requiredPermissions: [
|
|
54
|
+
requiredPermissions: [requiredPerm],
|
|
47
55
|
});
|
|
48
56
|
}
|
|
49
57
|
const result = await this.client.editContact({
|
|
@@ -57,13 +65,16 @@ export class ContactRepository extends BaseRepository {
|
|
|
57
65
|
* Deletes a contact record by ID.
|
|
58
66
|
* @param {string} id - The unique identifier of the contact to remove.
|
|
59
67
|
* @returns {Promise<void>} A promise that resolves when the deletion is complete.
|
|
68
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
60
69
|
* @throws {APIError} If the response status code is not 200.
|
|
61
70
|
*/
|
|
62
71
|
async remove(id) {
|
|
63
|
-
|
|
72
|
+
const auth = this.getAuthForPermissionCheck();
|
|
73
|
+
const requiredPerm = Permissions.Contact.Delete;
|
|
74
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
64
75
|
throw new PermissionError({
|
|
65
76
|
message: "You are not authorized to delete contacts.",
|
|
66
|
-
requiredPermissions: [
|
|
77
|
+
requiredPermissions: [requiredPerm],
|
|
67
78
|
});
|
|
68
79
|
}
|
|
69
80
|
const result = await this.client.deleteContact({ params: { id } });
|
|
@@ -74,16 +85,19 @@ export class ContactRepository extends BaseRepository {
|
|
|
74
85
|
* Results are ordered in descending order by default.
|
|
75
86
|
*
|
|
76
87
|
* @returns {Promise<Contact[]>} A promise that resolves to an array of contacts.
|
|
88
|
+
* @throws {PermissionError} If the user lacks required permissions
|
|
77
89
|
* @throws {APIError} If the response status code is not 200 or the range is invalid.
|
|
78
90
|
* @example
|
|
79
91
|
* const repository = new ContactRepository();
|
|
80
92
|
* repository.getAll().then(contacts => console.log(contacts));
|
|
81
93
|
*/
|
|
82
94
|
async getAll() {
|
|
83
|
-
|
|
95
|
+
const auth = this.getAuthForPermissionCheck();
|
|
96
|
+
const requiredPerm = Permissions.Contact.List;
|
|
97
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
84
98
|
throw new PermissionError({
|
|
85
99
|
message: "You are not authorized to view contacts.",
|
|
86
|
-
requiredPermissions: [
|
|
100
|
+
requiredPermissions: [requiredPerm],
|
|
87
101
|
});
|
|
88
102
|
}
|
|
89
103
|
const query = { orderByDesc: "createdAt" };
|
|
@@ -2,6 +2,7 @@ import { contract } from "./contract.js";
|
|
|
2
2
|
import { BaseRepository } from "../../shared/index.js";
|
|
3
3
|
import type { ClientInferRequest, ClientInferResponseBody } from "@ts-rest/core";
|
|
4
4
|
import type { StatementFile } from "../../models/wallet/index.js";
|
|
5
|
+
import type { AfloatAuth } from "../auth/index.js";
|
|
5
6
|
/**
|
|
6
7
|
* Type definition for statement generation input parameters.
|
|
7
8
|
* Inferred from the contract's genStatementPDF endpoint request body.
|
|
@@ -24,7 +25,9 @@ export declare class AfloatFilesRepo extends BaseRepository<typeof contract> {
|
|
|
24
25
|
* Creates an instance of AfloatFilesRepo initialized with the files generation contract.
|
|
25
26
|
* Configures the repository with the PDF maker service endpoint.
|
|
26
27
|
*/
|
|
27
|
-
constructor(
|
|
28
|
+
constructor(props?: {
|
|
29
|
+
auth?: AfloatAuth;
|
|
30
|
+
});
|
|
28
31
|
/**
|
|
29
32
|
* Generates and downloads a statement PDF based on the provided parameters.
|
|
30
33
|
* @param {GenStatementInput} body - The statement generation parameters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/files-gen/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/files-gen/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;GAIG;AACH,KAAK,iBAAiB,GAAG,kBAAkB,CACzC,OAAO,QAAQ,CAAC,eAAe,CAChC,CAAC,MAAM,CAAC,CAAC;AAEV;;;;GAIG;AACH,KAAK,yBAAyB,GAAG,uBAAuB,CACtD,OAAO,QAAQ,CAAC,oBAAoB,CACrC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,cAAc,CAAC,OAAO,QAAQ,CAAC;IAClE;;;OAGG;gBACS,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,CAAA;KAAE;IAQzC;;;;;;;;;OASG;IACG,iBAAiB,CACrB,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,aAAa,CAAC;IAiBzB;;;;OAIG;IACG,oBAAoB,IAAI,OAAO,CAAC,yBAAyB,CAAC;CAWjE"}
|
|
@@ -11,9 +11,11 @@ export class AfloatFilesRepo extends BaseRepository {
|
|
|
11
11
|
* Creates an instance of AfloatFilesRepo initialized with the files generation contract.
|
|
12
12
|
* Configures the repository with the PDF maker service endpoint.
|
|
13
13
|
*/
|
|
14
|
-
constructor() {
|
|
14
|
+
constructor(props) {
|
|
15
15
|
super("wallet", contract, {
|
|
16
16
|
root: "https://api.afloat.money/pdf-maker/afloat",
|
|
17
|
+
// root: "http://localhost:3000/afloat",
|
|
18
|
+
auth: props?.auth,
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
@@ -31,6 +33,12 @@ export class AfloatFilesRepo extends BaseRepository {
|
|
|
31
33
|
if (result.status === 201) {
|
|
32
34
|
return result.body;
|
|
33
35
|
}
|
|
36
|
+
if (result.status === 202) {
|
|
37
|
+
throw new APIError({
|
|
38
|
+
message: result.body.message,
|
|
39
|
+
statusCode: 202,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
34
42
|
throw APIError.unknown("An error occurred while generating statement PDF");
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseRepository } from "../../shared/index.js";
|
|
2
2
|
import { type PayoutAPI } from "./contract.js";
|
|
3
3
|
import { type GetPayoutsAPIArgs, type PayoutInput } from "../../models/payout/index.js";
|
|
4
|
+
import type { AfloatAuth } from "../auth/manager.js";
|
|
4
5
|
import { Payout } from "../../models/payout/derivatives/payout.js";
|
|
5
6
|
/**
|
|
6
7
|
* Repository class for managing payout operations including creation, approval,
|
|
@@ -10,8 +11,12 @@ import { Payout } from "../../models/payout/derivatives/payout.js";
|
|
|
10
11
|
export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
|
|
11
12
|
/**
|
|
12
13
|
* Creates an instance of PayoutRepository initialized with the payout contract.
|
|
14
|
+
* @param {Object} [props] - Optional constructor properties
|
|
15
|
+
* @param {AfloatAuth} [props.auth] - Optional auth instance to use
|
|
13
16
|
*/
|
|
14
|
-
constructor(
|
|
17
|
+
constructor(props?: {
|
|
18
|
+
auth?: AfloatAuth;
|
|
19
|
+
});
|
|
15
20
|
/**
|
|
16
21
|
* Retrieves a paginated list of payouts with optional filtering for pending status.
|
|
17
22
|
* @param {GetPayoutsAPIArgs} [args] - Optional arguments for filtering and pagination
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/payout/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/payout/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,SAAS,CAAC;IAC7D;;;;OAIG;gBACS,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,UAAU,CAAA;KAAE;IAIzC;;;;;;;;;OASG;IACG,MAAM,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IA6CF;;;;;;OAMG;IACG,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAoB9C;;;;;;;;OAQG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAgCrE;;;;;;;;OAQG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CA+BrE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BaseRepository } from "../../shared/index.js";
|
|
2
2
|
import { contract } from "./contract.js";
|
|
3
3
|
import { PAYOUT_APPROVAL_STATUS, } from "../../models/payout/index.js";
|
|
4
|
-
import { AfloatAuth } from "../auth/manager.js";
|
|
5
4
|
import { Permissions } from "../../models/permission.js";
|
|
6
5
|
import { APIError, PermissionError } from "../../errors/index.js";
|
|
7
6
|
import { Payout } from "../../models/payout/derivatives/payout.js";
|
|
@@ -13,9 +12,11 @@ import { Payout } from "../../models/payout/derivatives/payout.js";
|
|
|
13
12
|
export class PayoutRepository extends BaseRepository {
|
|
14
13
|
/**
|
|
15
14
|
* Creates an instance of PayoutRepository initialized with the payout contract.
|
|
15
|
+
* @param {Object} [props] - Optional constructor properties
|
|
16
|
+
* @param {AfloatAuth} [props.auth] - Optional auth instance to use
|
|
16
17
|
*/
|
|
17
|
-
constructor() {
|
|
18
|
-
super("payout", contract);
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super("payout", contract, { auth: props?.auth });
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
21
22
|
* Retrieves a paginated list of payouts with optional filtering for pending status.
|
|
@@ -28,8 +29,9 @@ export class PayoutRepository extends BaseRepository {
|
|
|
28
29
|
* @returns {Promise<{results: Payout[]; total: number}>} Paginated payout results and total count
|
|
29
30
|
*/
|
|
30
31
|
async getAll(args) {
|
|
32
|
+
const auth = this.getAuthForPermissionCheck();
|
|
31
33
|
const requiredPerm = Permissions.Payout.List;
|
|
32
|
-
if (!
|
|
34
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
33
35
|
throw new PermissionError({
|
|
34
36
|
message: "You are not authorized to view payouts.",
|
|
35
37
|
requiredPermissions: [requiredPerm],
|
|
@@ -70,8 +72,9 @@ export class PayoutRepository extends BaseRepository {
|
|
|
70
72
|
* @returns {Promise<Payout>} The created payout
|
|
71
73
|
*/
|
|
72
74
|
async pay(input) {
|
|
75
|
+
const auth = this.getAuthForPermissionCheck();
|
|
73
76
|
const requiredPerm = Permissions.Payout.Create;
|
|
74
|
-
if (!
|
|
77
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
75
78
|
throw new PermissionError({
|
|
76
79
|
message: "You are not authorized to create payouts.",
|
|
77
80
|
requiredPermissions: [requiredPerm],
|
|
@@ -95,8 +98,9 @@ export class PayoutRepository extends BaseRepository {
|
|
|
95
98
|
* @returns {Promise<Payout>} The approved payout
|
|
96
99
|
*/
|
|
97
100
|
async approve(id, args) {
|
|
101
|
+
const auth = this.getAuthForPermissionCheck();
|
|
98
102
|
const requiredPerm = Permissions.Payout.Approve;
|
|
99
|
-
if (!
|
|
103
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
100
104
|
throw new PermissionError({
|
|
101
105
|
message: "You are not authorized to approve or reject payouts.",
|
|
102
106
|
requiredPermissions: [requiredPerm],
|
|
@@ -130,8 +134,9 @@ export class PayoutRepository extends BaseRepository {
|
|
|
130
134
|
* @returns {Promise<Payout>} The rejected payout
|
|
131
135
|
*/
|
|
132
136
|
async reject(id, args) {
|
|
137
|
+
const auth = this.getAuthForPermissionCheck();
|
|
133
138
|
const requiredPerm = Permissions.Payout.Approve;
|
|
134
|
-
if (!
|
|
139
|
+
if (!auth.checkPermission(requiredPerm)) {
|
|
135
140
|
throw new PermissionError({
|
|
136
141
|
message: "You are not authorized to approve or reject payouts.",
|
|
137
142
|
requiredPermissions: [requiredPerm],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseRepository } from "../../shared/base_repository.js";
|
|
2
2
|
import { contract } from "./contract.js";
|
|
3
3
|
import type { STATEMENT_OUTPUT_TYPE, StatementFile, Wallet, WalletStatementItem } from "../../models/wallet/index.js";
|
|
4
|
+
import type { AfloatAuth } from "../auth/manager.js";
|
|
4
5
|
/**
|
|
5
6
|
* Repository class for managing wallet operations including balance checking,
|
|
6
7
|
* statement generation, and wallet information retrieval.
|
|
@@ -9,8 +10,14 @@ import type { STATEMENT_OUTPUT_TYPE, StatementFile, Wallet, WalletStatementItem
|
|
|
9
10
|
export declare class WalletRepo extends BaseRepository<typeof contract> {
|
|
10
11
|
/**
|
|
11
12
|
* Creates an instance of WalletRepo initialized with the wallet contract.
|
|
13
|
+
* @param {Object} [options] - Optional configuration
|
|
14
|
+
* @param {string} [options.root] - Custom API root URL
|
|
15
|
+
* @param {AfloatAuth} [options.auth] - Auth instance to use
|
|
12
16
|
*/
|
|
13
|
-
constructor(
|
|
17
|
+
constructor(props?: {
|
|
18
|
+
root?: string;
|
|
19
|
+
auth?: AfloatAuth;
|
|
20
|
+
});
|
|
14
21
|
/**
|
|
15
22
|
* Gets an instance of the file generation repository.
|
|
16
23
|
* @private
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/wallet/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,MAAM,EACN,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../../../src/src/features/wallet/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,MAAM,EACN,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,cAAc,CAAC,OAAO,QAAQ,CAAC;IAC7D;;;;;OAKG;gBACS,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,UAAU,CAAA;KAAE;IAOxD;;;;OAIG;IACH,OAAO,KAAK,WAAW,GAEtB;IAED;;;;;OAKG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAoBnC;;;;OAIG;IACG,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAUrC;;;;;;;;;;;OAWG;IACG,YAAY,CAChB,KAAK,EAAE;QACL,KAAK,CAAC,EAAE;YAAE,SAAS,EAAE,IAAI,CAAC;YAAC,OAAO,EAAE,IAAI,CAAA;SAAE,CAAC;QAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,mBAAmB,EAAE,CAAC;IA4BjC;;;;;;;;;OASG;IACG,YAAY,CAChB,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE;QACL,SAAS,EAAE,IAAI,CAAC;QAChB,OAAO,EAAE,IAAI,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GACA,OAAO,CAAC,aAAa,CAAC;IAmBzB;;;;OAIG;IACG,mBAAmB,IAAI,OAAO,CAAC,aAAa,CAAC;CAapD"}
|