@epztickets/common 1.72.0 → 1.74.0

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.
@@ -29,6 +29,8 @@ export declare enum Subjects {
29
29
  UserDeletionRequested = "events.user.deletion-requested",
30
30
  UserDeletionRejected = "events.user.deletion-rejected",
31
31
  UserEmailVerificationRequested = "events.user.email-verification-requested",
32
+ UserPasswordResetRequested = "events.user.password-reset-requested",
33
+ UserPasswordChanged = "events.user.password-changed",
32
34
  ConnectDisconnectRequested = "events.user.connect-disconnect-requested",
33
35
  ConnectDisconnectApproved = "events.user.connect-disconnect-approved",
34
36
  ConnectDisconnectRejected = "events.user.connect-disconnect-rejected",
@@ -51,6 +51,16 @@ var Subjects;
51
51
  // event payload because the email is the ONE place it surfaces
52
52
  // — auth's User row only has the SHA-256 hash.
53
53
  Subjects["UserEmailVerificationRequested"] = "events.user.email-verification-requested";
54
+ // Password-reset lifecycle. Auth publishes Requested when a user
55
+ // fills out /forgot-password with a known email — the plaintext
56
+ // token rides on the event so notifications-srv can build the
57
+ // reset link (the auth-side row only stores the SHA-256 hash).
58
+ // Auth publishes Changed after /confirm succeeds, so
59
+ // notifications-srv can send the "your password was changed"
60
+ // security-audit email. The Changed event has no token; the
61
+ // password is already updated by the time it publishes.
62
+ Subjects["UserPasswordResetRequested"] = "events.user.password-reset-requested";
63
+ Subjects["UserPasswordChanged"] = "events.user.password-changed";
54
64
  // Owner-initiated "stop hosting" lifecycle. Mirrors the deletion
55
65
  // request triplet — auth publishes Requested at submission, then
56
66
  // either Approved (which IS the disconnect) or Rejected after admin
@@ -5,6 +5,7 @@ export interface UserCreatedEvent {
5
5
  id: string;
6
6
  email: string;
7
7
  phone?: string;
8
+ publicPhone?: string;
8
9
  version: number;
9
10
  };
10
11
  }
@@ -0,0 +1,14 @@
1
+ import { Subjects } from "./subjects";
2
+ export interface UserPasswordChangedEvent {
3
+ subject: Subjects.UserPasswordChanged;
4
+ data: {
5
+ userId: string;
6
+ email: string;
7
+ /** ISO timestamp of when the change was applied. */
8
+ changedAt: string;
9
+ /** Best-effort IP of the /confirm request, if available. */
10
+ ipAddress?: string;
11
+ /** Best-effort User-Agent of the /confirm request, if available. */
12
+ userAgent?: string;
13
+ };
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { Subjects } from "./subjects";
2
+ export interface UserPasswordResetRequestedEvent {
3
+ subject: Subjects.UserPasswordResetRequested;
4
+ data: {
5
+ userId: string;
6
+ email: string;
7
+ /** Plaintext reset token to embed in the email link. */
8
+ token: string;
9
+ /** ISO timestamp of when the token expires (30min after issue). */
10
+ expiresAt: string;
11
+ };
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export interface UserUpdatedEvent {
4
4
  data: {
5
5
  id: string;
6
6
  phone?: string;
7
+ publicPhone?: string;
7
8
  stripeAccountId?: string;
8
9
  stripeChargesEnabled?: boolean;
9
10
  stripePayoutsEnabled?: boolean;
package/build/index.d.ts CHANGED
@@ -49,6 +49,8 @@ export * from "./events/user-deleted-event";
49
49
  export * from "./events/user-deletion-requested-event";
50
50
  export * from "./events/user-deletion-rejected-event";
51
51
  export * from "./events/user-email-verification-requested-event";
52
+ export * from "./events/user-password-reset-requested-event";
53
+ export * from "./events/user-password-changed-event";
52
54
  export * from "./events/user-self-booking-recorded-event";
53
55
  export * from "./events/user-self-booking-trial-changed-event";
54
56
  export * from "./events/user-commission-rate-changed-event";
package/build/index.js CHANGED
@@ -69,6 +69,8 @@ __exportStar(require("./events/user-deleted-event"), exports);
69
69
  __exportStar(require("./events/user-deletion-requested-event"), exports);
70
70
  __exportStar(require("./events/user-deletion-rejected-event"), exports);
71
71
  __exportStar(require("./events/user-email-verification-requested-event"), exports);
72
+ __exportStar(require("./events/user-password-reset-requested-event"), exports);
73
+ __exportStar(require("./events/user-password-changed-event"), exports);
72
74
  __exportStar(require("./events/user-self-booking-recorded-event"), exports);
73
75
  __exportStar(require("./events/user-self-booking-trial-changed-event"), exports);
74
76
  __exportStar(require("./events/user-commission-rate-changed-event"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epztickets/common",
3
- "version": "1.72.0",
3
+ "version": "1.74.0",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [