@camstack/sdk 0.1.45 → 0.1.47

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/dist/index.cjs CHANGED
@@ -1078,6 +1078,34 @@ class System {
1078
1078
  const me = await this._trpcClient.auth.me.query();
1079
1079
  return me;
1080
1080
  }
1081
+ // ── Self-service auth (the signed-in user acting on themselves) ─────
1082
+ //
1083
+ // The hand-written `auth.*` router exposes 5 procedures that operate
1084
+ // on `ctx.user` (the JWT-bound identity), distinct from the admin
1085
+ // `user-management` cap that operates on arbitrary userIds. They live
1086
+ // on `System` rather than as codegen'd hooks because `auth.*` is a
1087
+ // legacy core router, not a `.cap.ts` — see the no-restricted-imports
1088
+ // rule in `eslint.config.mjs` for the canonical entry-point design.
1089
+ async changeOwnPassword(input) {
1090
+ const result = await this._trpcClient.auth.changeOwnPassword.mutate(input);
1091
+ return result;
1092
+ }
1093
+ async setupOwnTotp() {
1094
+ const result = await this._trpcClient.auth.setupOwnTotp.mutate();
1095
+ return result;
1096
+ }
1097
+ async confirmOwnTotp(input) {
1098
+ const result = await this._trpcClient.auth.confirmOwnTotp.mutate(input);
1099
+ return result;
1100
+ }
1101
+ async disableOwnTotp() {
1102
+ const result = await this._trpcClient.auth.disableOwnTotp.mutate();
1103
+ return result;
1104
+ }
1105
+ async getOwnTotpStatus() {
1106
+ const result = await this._trpcClient.auth.getOwnTotpStatus.query();
1107
+ return result;
1108
+ }
1081
1109
  /** Update the auth token (e.g. after login or token refresh). */
1082
1110
  setToken(token) {
1083
1111
  this.token = token;