spine-framework-cortex 0.1.16 → 0.1.18
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.1.18] — 2026-06-10
|
|
8
|
+
- Fixed `custom_funnel-signal.ts` — added required `account_id` to anonymous_session insert (links to unidentified-visitors account)
|
|
9
|
+
|
|
10
|
+
## [0.1.17] — 2026-06-10
|
|
11
|
+
- Fixed `custom_funnel-signal.ts` — moved `anonymous_id` from nested `data.identity.anonymous_id` to root `data.anonymous_id` to match `anonymous_session` type schema (required field)
|
|
12
|
+
|
|
7
13
|
## [0.1.16] — 2026-06-09
|
|
8
14
|
- Fixed `integrations.json` seed — removed non-existent `description` column, changed `display_name` to `name`, added required `slug`, `provider`, `status` fields
|
|
9
15
|
|
|
@@ -143,8 +143,8 @@ export async function processSignal(
|
|
|
143
143
|
if (signalLinkTypeId) {
|
|
144
144
|
await createLink(signalLinkTypeId, 'account', payload.account_id, 'item', signalId)
|
|
145
145
|
}
|
|
146
|
-
} else if (payload.anonymous_id && sessionTypeId) {
|
|
147
|
-
await upsertAnonymousSession(payload, sessionTypeId, signalId, scoring, engagement, referrerDomain, referrerCategory, scoredAt)
|
|
146
|
+
} else if (payload.anonymous_id && sessionTypeId && unidentifiedAccountId) {
|
|
147
|
+
await upsertAnonymousSession(payload, sessionTypeId, unidentifiedAccountId, signalId, scoring, engagement, referrerDomain, referrerCategory, scoredAt)
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// 7. EVALUATE QUEUE — if rating >= 4
|
|
@@ -285,7 +285,7 @@ async function updateAccountFunnel(
|
|
|
285
285
|
// ============================================
|
|
286
286
|
|
|
287
287
|
async function upsertAnonymousSession(
|
|
288
|
-
payload: SignalPayload, sessionTypeId: string, signalId: string,
|
|
288
|
+
payload: SignalPayload, sessionTypeId: string, accountId: string, signalId: string,
|
|
289
289
|
scoring: { calculated: number; max_possible: number; rating: number },
|
|
290
290
|
engagement: any, referrerDomain: string, referrerCategory: string, now: string
|
|
291
291
|
): Promise<void> {
|
|
@@ -293,7 +293,7 @@ async function upsertAnonymousSession(
|
|
|
293
293
|
.from('items')
|
|
294
294
|
.select('id, data')
|
|
295
295
|
.eq('type_id', sessionTypeId)
|
|
296
|
-
.eq('data
|
|
296
|
+
.eq('data->>anonymous_id' as any, payload.anonymous_id!)
|
|
297
297
|
.order('created_at', { ascending: false })
|
|
298
298
|
.limit(1)
|
|
299
299
|
.maybeSingle()
|
|
@@ -321,9 +321,10 @@ async function upsertAnonymousSession(
|
|
|
321
321
|
} else {
|
|
322
322
|
await adminDb.from('items').insert({
|
|
323
323
|
type_id: sessionTypeId,
|
|
324
|
+
account_id: accountId,
|
|
324
325
|
title: `Anonymous: ${payload.anonymous_id!.slice(0, 8)}`,
|
|
325
326
|
data: {
|
|
326
|
-
|
|
327
|
+
anonymous_id: payload.anonymous_id,
|
|
327
328
|
temperature: ratingToTemperature(scoring.rating),
|
|
328
329
|
current_stage: 'anonymous',
|
|
329
330
|
scoring_rating: scoring.rating,
|
package/package.json
CHANGED