@hogsend/cli 0.22.0 → 0.23.1

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/bin.js CHANGED
@@ -15174,7 +15174,23 @@ var trackedLinks = pgTable(
15174
15174
  "tracked_links",
15175
15175
  {
15176
15176
  id: uuid("id").defaultRandom().primaryKey(),
15177
- emailSendId: uuid("email_send_id").notNull().references(() => emailSends.id, { onDelete: "cascade" }),
15177
+ // NULLABLE since the identity-stitching minor: a tracked link no longer has
15178
+ // to belong to an email send. Broadcast/non-email links (Discord, referral,
15179
+ // ad-hoc `createTrackedLink`) carry NULL here. Email-link inserts keep
15180
+ // populating it; the FK + index are unchanged.
15181
+ emailSendId: uuid("email_send_id").references(() => emailSends.id, {
15182
+ onDelete: "cascade"
15183
+ }),
15184
+ // Subject of a stitch-bearing NON-email link: the canonical contact key the
15185
+ // click should fold the visitor's anon session into. NULL for broadcast
15186
+ // links (Discord/referral default) — broadcast links are tracked for click
15187
+ // counts but carry no identity. Email links resolve their subject from the
15188
+ // `email_sends` row instead, so this stays NULL for them too.
15189
+ distinctId: text2("distinct_id"),
15190
+ // Where the link originated: "email" | "discord" | "link". Drives the click
15191
+ // route's per-hit outbound emit (email links emit `email.clicked`; non-email
15192
+ // links emit `link.clicked`). NULL on legacy/email rows.
15193
+ source: text2("source"),
15178
15194
  originalUrl: text2("original_url").notNull(),
15179
15195
  clickCount: integer("click_count").notNull().default(0),
15180
15196
  // Semantic link metadata, lifted from the template's data-hs-* attributes
@@ -16315,6 +16331,7 @@ var WEBHOOK_EVENT_TYPES = [
16315
16331
  "email.action",
16316
16332
  "email.bounced",
16317
16333
  "email.complained",
16334
+ "link.clicked",
16318
16335
  "journey.completed",
16319
16336
  "bucket.entered",
16320
16337
  "bucket.left"