outbound-sdk 0.6.0 → 0.7.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.
- package/dist/alerts/check-schema.d.ts +1 -1
- package/dist/alerts/index.js +6 -6
- package/dist/audit/index.js +2 -2
- package/dist/benchmarks/index.js +4 -4
- package/dist/budget/index.js +2 -2
- package/dist/cards/index.js +54 -44
- package/dist/chunks/{chunk-BLCJHP5H.js → chunk-45TXPJW7.js} +1 -0
- package/dist/chunks/chunk-4AVYRVN5.js +239 -0
- package/dist/chunks/{chunk-YYCT3NGV.js → chunk-65YAGEWZ.js} +24 -7
- package/dist/chunks/{chunk-W22SDX6S.js → chunk-7I3EPR23.js} +3 -3
- package/dist/chunks/{chunk-MGR6HREO.js → chunk-BNDHEDHD.js} +2 -2
- package/dist/chunks/chunk-DNPNTD5W.js +81 -0
- package/dist/chunks/{chunk-53DCVFUB.js → chunk-FALWG5U3.js} +1 -0
- package/dist/chunks/{chunk-OLPMBRXM.js → chunk-GL7BABF2.js} +2 -2
- package/dist/chunks/{chunk-ZOAG2C6V.js → chunk-HIAK2GCI.js} +9 -2
- package/dist/chunks/{chunk-SXGCKCAR.js → chunk-I7DXXGNZ.js} +40 -9
- package/dist/chunks/{chunk-BK5SLY32.js → chunk-JRL3QRBS.js} +264 -76
- package/dist/chunks/{chunk-PHNQ3WC2.js → chunk-KTYTE2BU.js} +4 -3
- package/dist/chunks/{chunk-JWGSB7PT.js → chunk-LD6F46UT.js} +2 -2
- package/dist/chunks/{chunk-2D42TQFU.js → chunk-LVZGIKNF.js} +2 -2
- package/dist/chunks/{chunk-PQSTQKRD.js → chunk-M2VXGLLZ.js} +35 -2
- package/dist/chunks/{chunk-UWUPUMM2.js → chunk-MW4C6LTN.js} +2 -2
- package/dist/chunks/chunk-OK3GAZMT.js +51 -0
- package/dist/chunks/{chunk-BOWXGMN3.js → chunk-POBAY3TI.js} +80 -4
- package/dist/chunks/{chunk-J7DDZ4C2.js → chunk-QFC4ZHD3.js} +1 -1
- package/dist/chunks/{chunk-GFDNRWR3.js → chunk-UFQ4WMLU.js} +1 -1
- package/dist/chunks/{chunk-TFICTGM2.js → chunk-Y7KECJAV.js} +1 -1
- package/dist/chunks/{chunk-QAKJ76HB.js → chunk-YW6FFVSZ.js} +1 -1
- package/dist/chunks/{chunk-3JOC5DGD.js → chunk-ZJCVLBAE.js} +424 -117
- package/dist/cli/bin.js +14 -14
- package/dist/cli/by-name.d.ts +28 -0
- package/dist/cli/commands.d.ts +2 -1
- package/dist/cli/config.d.ts +3 -2
- package/dist/cli/envelope.d.ts +50 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +13 -13
- package/dist/cli/listing.d.ts +13 -0
- package/dist/cli/native.d.ts +4 -0
- package/dist/cli/options.d.ts +88 -0
- package/dist/cli/output.d.ts +13 -1
- package/dist/cli/suggest.d.ts +10 -0
- package/dist/clients/index.js +6 -6
- package/dist/combine/index.js +7 -7
- package/dist/emailbison/capabilities.d.ts +1 -0
- package/dist/emailbison/index.js +38 -14
- package/dist/emailbison/map-stats.d.ts +10 -0
- package/dist/exporter/index.js +2 -2
- package/dist/failover/index.js +2 -2
- package/dist/fixtures/index.js +4 -4
- package/dist/heyreach/capabilities.d.ts +3 -0
- package/dist/heyreach/index.js +34 -12
- package/dist/heyreach/map-account.d.ts +2 -2
- package/dist/identity/index.js +2 -2
- package/dist/index.js +9 -7
- package/dist/insights/copy/audit-samples.d.ts +24 -0
- package/dist/insights/copy/audit-variant.d.ts +34 -0
- package/dist/insights/copy/copy-audit.d.ts +26 -12
- package/dist/insights/copy/copy-preview.d.ts +16 -3
- package/dist/insights/copy/index.d.ts +6 -0
- package/dist/insights/copy/reply-timing.d.ts +4 -0
- package/dist/insights/copy/shared.d.ts +4 -1
- package/dist/insights/copy/step-funnel.d.ts +20 -6
- package/dist/insights/copy/variant-test.d.ts +2 -3
- package/dist/insights/index.js +1138 -589
- package/dist/insights/inputs.generated.d.ts +47 -11
- package/dist/insights/ops/campaign-diagnosis.d.ts +2 -0
- package/dist/insights/ops/diagnosis-checks.d.ts +20 -1
- package/dist/insights/ops/index.d.ts +2 -0
- package/dist/insights/ops/pipeline-forecast.d.ts +17 -6
- package/dist/insights/people/account-summary.d.ts +14 -1
- package/dist/insights/people/auto-replies.d.ts +14 -0
- package/dist/insights/people/dropped-replies.d.ts +1 -1
- package/dist/insights/people/hot-leads.d.ts +5 -1
- package/dist/insights/people/index.d.ts +4 -0
- package/dist/insights/people/lead-collisions.d.ts +11 -2
- package/dist/insights/people/person-summary.d.ts +19 -3
- package/dist/insights/people/personalization-gaps.d.ts +14 -8
- package/dist/insights/people/suppression-check.d.ts +9 -0
- package/dist/insights/registry.d.ts +12 -0
- package/dist/insights/step.d.ts +15 -0
- package/dist/insights/variables.d.ts +2 -0
- package/dist/instantly/capabilities.d.ts +4 -0
- package/dist/instantly/index.js +263 -53
- package/dist/instantly/map-stats.d.ts +4 -0
- package/dist/instantly/stats-tracking.d.ts +19 -0
- package/dist/instantly/thread.d.ts +9 -0
- package/dist/internal/adapter.d.ts +5 -0
- package/dist/internal/auto-reply.d.ts +20 -0
- package/dist/internal/capabilities.d.ts +2 -0
- package/dist/internal/entities-account.d.ts +1 -0
- package/dist/internal/entities.d.ts +79 -2
- package/dist/internal/fields.d.ts +37 -1
- package/dist/internal/metrics.d.ts +23 -1
- package/dist/internal/outbound/api.d.ts +2 -0
- package/dist/internal/records.d.ts +2 -2
- package/dist/internal/reply-people.d.ts +37 -0
- package/dist/internal/runway.d.ts +42 -0
- package/dist/internal/sender-screen.d.ts +9 -0
- package/dist/internal/tracking.d.ts +33 -0
- package/dist/loader/index.js +4 -4
- package/dist/memory/data.d.ts +2 -1
- package/dist/memory/index.js +23 -12
- package/dist/redact/index.js +3 -3
- package/dist/smartlead/capabilities.d.ts +4 -0
- package/dist/smartlead/index.js +152 -38
- package/dist/smartlead/map-account.d.ts +3 -0
- package/dist/smartlead/stats-tracking.d.ts +22 -0
- package/dist/sync/index.js +2 -2
- package/dist/tools/ai-sdk.js +8 -7
- package/dist/tools/by-name.d.ts +18 -0
- package/dist/tools/campaign-tools.d.ts +6 -2
- package/dist/tools/claude-agent.js +8 -7
- package/dist/tools/index.js +9 -8
- package/dist/tools/shared.d.ts +7 -0
- package/dist/tracing/index.js +2 -2
- package/dist/webhooks/index.js +12 -11
- package/package.json +1 -1
- package/dist/chunks/chunk-HWHI4LFY.js +0 -102
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
eventData,
|
|
3
3
|
refTo
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LVZGIKNF.js";
|
|
5
5
|
import {
|
|
6
6
|
SCHEMA_VERSION
|
|
7
7
|
} from "./chunk-QGRZDTX4.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
objects,
|
|
20
20
|
text,
|
|
21
21
|
timestamp
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-45TXPJW7.js";
|
|
23
23
|
|
|
24
24
|
// src/heyreach/webhooks.ts
|
|
25
25
|
var EVENT_TYPES = /* @__PURE__ */ new Map([
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-QGRZDTX4.js";
|
|
4
4
|
import {
|
|
5
5
|
makeRef
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YW6FFVSZ.js";
|
|
7
7
|
import {
|
|
8
8
|
compactObject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-45TXPJW7.js";
|
|
10
10
|
|
|
11
11
|
// src/internal/record.ts
|
|
12
12
|
var recordBase = (identity, sourceId, raw) => ({
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-QGRZDTX4.js";
|
|
4
4
|
import {
|
|
5
5
|
makeRef
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YW6FFVSZ.js";
|
|
7
7
|
|
|
8
8
|
// src/internal/metrics.ts
|
|
9
9
|
var METRIC_DEFINITIONS = {
|
|
@@ -48,20 +48,28 @@ var computeRates = (row) => ({
|
|
|
48
48
|
replyRate: perLead(row, row.replied),
|
|
49
49
|
unsubscribeRate: perLead(row, row.unsubscribed)
|
|
50
50
|
});
|
|
51
|
+
var CONTACTED_LEADS_LIMIT = 2;
|
|
52
|
+
var contactedBeyondLeads = (contacted, leads) => contacted !== null && leads !== null && leads !== void 0 && leads > 0 && contacted > leads * CONTACTED_LEADS_LIMIT;
|
|
51
53
|
var COUNT_KEYS = [
|
|
52
54
|
"bounced",
|
|
53
55
|
"clicked",
|
|
54
56
|
"clickedTotal",
|
|
57
|
+
"completed",
|
|
55
58
|
"connectionsAccepted",
|
|
56
59
|
"connectionsSent",
|
|
57
60
|
"contacted",
|
|
58
61
|
"delivered",
|
|
59
62
|
"inmailsSent",
|
|
63
|
+
"leads",
|
|
60
64
|
"opened",
|
|
61
65
|
"openedTotal",
|
|
66
|
+
"opportunities",
|
|
67
|
+
"opportunityValue",
|
|
62
68
|
"positive",
|
|
63
69
|
"replied",
|
|
64
70
|
"repliedAuto",
|
|
71
|
+
"repliedAutoTotal",
|
|
72
|
+
"repliedTotal",
|
|
65
73
|
"sent",
|
|
66
74
|
"unsubscribed"
|
|
67
75
|
];
|
|
@@ -69,16 +77,22 @@ var emptyCounts = () => ({
|
|
|
69
77
|
bounced: null,
|
|
70
78
|
clicked: null,
|
|
71
79
|
clickedTotal: null,
|
|
80
|
+
completed: null,
|
|
72
81
|
connectionsAccepted: null,
|
|
73
82
|
connectionsSent: null,
|
|
74
83
|
contacted: null,
|
|
75
84
|
delivered: null,
|
|
76
85
|
inmailsSent: null,
|
|
86
|
+
leads: null,
|
|
77
87
|
opened: null,
|
|
78
88
|
openedTotal: null,
|
|
89
|
+
opportunities: null,
|
|
90
|
+
opportunityValue: null,
|
|
79
91
|
positive: null,
|
|
80
92
|
replied: null,
|
|
81
93
|
repliedAuto: null,
|
|
94
|
+
repliedAutoTotal: null,
|
|
95
|
+
repliedTotal: null,
|
|
82
96
|
sent: null,
|
|
83
97
|
unsubscribed: null
|
|
84
98
|
});
|
|
@@ -87,13 +101,29 @@ var sumCounts = (rows) => {
|
|
|
87
101
|
for (const row of rows) {
|
|
88
102
|
for (const key of COUNT_KEYS) {
|
|
89
103
|
const value = row[key];
|
|
90
|
-
if (value !== null) {
|
|
104
|
+
if (value !== null && value !== void 0) {
|
|
91
105
|
total[key] = (total[key] ?? 0) + value;
|
|
92
106
|
}
|
|
93
107
|
}
|
|
94
108
|
}
|
|
95
109
|
return total;
|
|
96
110
|
};
|
|
111
|
+
var TRACKED_KEYS = [
|
|
112
|
+
"clicked",
|
|
113
|
+
"clickedTotal",
|
|
114
|
+
"opened",
|
|
115
|
+
"openedTotal"
|
|
116
|
+
];
|
|
117
|
+
var sumMeasured = (rows) => {
|
|
118
|
+
const total = sumCounts(rows);
|
|
119
|
+
const sending = rows.filter((row) => (row.sent ?? 0) > 0);
|
|
120
|
+
for (const key of TRACKED_KEYS) {
|
|
121
|
+
if (total[key] !== null && sending.some((row) => row[key] === null || row[key] === void 0)) {
|
|
122
|
+
total[key] = null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return total;
|
|
126
|
+
};
|
|
97
127
|
var metricRow = (scope, counts, extra = {}) => ({
|
|
98
128
|
...counts,
|
|
99
129
|
contentHash: null,
|
|
@@ -112,7 +142,10 @@ var metricRow = (scope, counts, extra = {}) => ({
|
|
|
112
142
|
export {
|
|
113
143
|
METRIC_DEFINITIONS,
|
|
114
144
|
computeRates,
|
|
145
|
+
CONTACTED_LEADS_LIMIT,
|
|
146
|
+
contactedBeyondLeads,
|
|
115
147
|
emptyCounts,
|
|
116
148
|
sumCounts,
|
|
149
|
+
sumMeasured,
|
|
117
150
|
metricRow
|
|
118
151
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
htmlToText,
|
|
3
|
+
looksLikeHtml,
|
|
4
|
+
stripQuotedHistory
|
|
5
|
+
} from "./chunk-FALWG5U3.js";
|
|
6
|
+
|
|
7
|
+
// src/internal/auto-reply.ts
|
|
8
|
+
var AUTO_REPLY_WITHIN_MS = 6e4;
|
|
9
|
+
var MACHINE_SENDER = /^[^@]*(?:no-?reply|do-?not-?reply|auto-?respon|auto-?reply|mailer-daemon|postmaster)[^@]*@/iu;
|
|
10
|
+
var AUTOMATIC_SUBJECT = /^(?:(?:re|fw|fwd|aw|sv)\s*:\s*)*(?:ooo\b|out\s+of\s+(?:the\s+)?office\b|automatic\s+reply\b|auto(?:matic)?[-\s]?reply\b|autoreply\b|auto[-\s]?response\b|away\s+from\s+(?:the\s+)?office\b|undeliverable\b|delivery\s+status\s+notification\b)/iu;
|
|
11
|
+
var LEFT_SUBJECT = /\bis\s+no\s+longer\s+(?:at|with|employed)\b/iu;
|
|
12
|
+
var AUTOMATIC_BODY = [
|
|
13
|
+
/\bthis\s+is\s+an\s+auto(?:mated|matic)(?:ally\s+generated)?\s+(?:reply|response|message|email|notification)\b/iu,
|
|
14
|
+
/\b(?:i\s+am|i'm|i\s+will\s+be)\s+(?:currently\s+)?out\s+of\s+(?:the\s+)?office\s+(?:until|from|through|and\s+will|with\s+(?:limited|no))\b/iu,
|
|
15
|
+
/\b(?:i\s+am|i'm|i\s+will\s+be)\s+(?:currently\s+)?(?:on\s+(?:maternity|paternity|parental)\s+leave)\b/iu,
|
|
16
|
+
/\b(?:with|have)\s+(?:limited|no)\s+access\s+to\s+(?:my\s+)?e-?mail\b/iu,
|
|
17
|
+
/\bthis\s+(?:mailbox|inbox|e-?mail\s+address)\s+is\s+(?:not|no\s+longer)\s+(?:monitored|active|in\s+use)\b/iu,
|
|
18
|
+
/\bfor\s+(?:technical\s+)?support,?\s+please\s+(?:contact|email|e-mail|reach\s+out\s+to)\b/iu,
|
|
19
|
+
/\b(?:thank\s+you|thanks)\s+for\s+(?:your\s+)?(?:e-?mail|message)\.?\s+(?:we|our\s+team)\s+(?:have|has)\s+received\b/iu
|
|
20
|
+
];
|
|
21
|
+
var LEFT_NOTICE = /\byour\s+contact\s+(?:with|at)\s+.{1,80}?\s+has\s+changed\b/iu;
|
|
22
|
+
var LEFT_BODY = [
|
|
23
|
+
LEFT_NOTICE,
|
|
24
|
+
/\b(?:is|are)\s+no\s+longer\s+(?:with|at|employed\s+(?:by|at|with))\b/iu,
|
|
25
|
+
/\bhas\s+(?:left|departed)\s+(?:the\s+company|the\s+organi[sz]ation|our\s+(?:company|organi[sz]ation|team))\b/iu
|
|
26
|
+
];
|
|
27
|
+
var ownText = (body) => {
|
|
28
|
+
if (body === null) {
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
return stripQuotedHistory(looksLikeHtml(body) ? htmlToText(body) : body);
|
|
32
|
+
};
|
|
33
|
+
var detectAutoReply = (input) => {
|
|
34
|
+
const subject = input.subject ?? "";
|
|
35
|
+
const body = ownText(input.body);
|
|
36
|
+
const leftCompany = LEFT_SUBJECT.test(subject) || LEFT_BODY.some((rule) => rule.test(body));
|
|
37
|
+
const isAuto = LEFT_SUBJECT.test(subject) || LEFT_NOTICE.test(body) || MACHINE_SENDER.test(input.from ?? "") || AUTOMATIC_SUBJECT.test(subject) || AUTOMATIC_BODY.some((rule) => rule.test(body));
|
|
38
|
+
return { isAuto, leftCompany };
|
|
39
|
+
};
|
|
40
|
+
var answeredAtOnce = (sentAt, repliedAt) => {
|
|
41
|
+
if (sentAt === null || repliedAt === null) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
const gap = Date.parse(repliedAt) - Date.parse(sentAt);
|
|
45
|
+
return Number.isFinite(gap) && gap >= 0 && gap < AUTO_REPLY_WITHIN_MS;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
detectAutoReply,
|
|
50
|
+
answeredAtOnce
|
|
51
|
+
};
|
|
@@ -71,6 +71,11 @@ var mailProviderSchema = z.enum([
|
|
|
71
71
|
"other",
|
|
72
72
|
"smtp"
|
|
73
73
|
]);
|
|
74
|
+
var recipientMailProviderSchema = z.enum([
|
|
75
|
+
"google",
|
|
76
|
+
"microsoft",
|
|
77
|
+
"other"
|
|
78
|
+
]);
|
|
74
79
|
var senderSchema = z.object({
|
|
75
80
|
...base,
|
|
76
81
|
/** Lowercased mailbox address. `null` for a LinkedIn seat. */
|
|
@@ -95,6 +100,7 @@ var leadStatusSchema = z.enum([
|
|
|
95
100
|
"completed",
|
|
96
101
|
"paused",
|
|
97
102
|
"replied",
|
|
103
|
+
"skipped",
|
|
98
104
|
"unknown",
|
|
99
105
|
"unsubscribed"
|
|
100
106
|
]);
|
|
@@ -102,6 +108,7 @@ var leadProgressSchema = z.enum([
|
|
|
102
108
|
"active",
|
|
103
109
|
"completed",
|
|
104
110
|
"paused",
|
|
111
|
+
"skipped",
|
|
105
112
|
"unknown"
|
|
106
113
|
]);
|
|
107
114
|
var leadEngagementSchema = z.object({
|
|
@@ -146,6 +153,12 @@ var leadSchema = z.object({
|
|
|
146
153
|
phone: z.string().nullable(),
|
|
147
154
|
/** Where the lead is in its sequence, whatever came back from it. */
|
|
148
155
|
progress: leadProgressSchema,
|
|
156
|
+
/**
|
|
157
|
+
* Who hosts the lead's own mailbox, as the vendor detected it. `null` when
|
|
158
|
+
* the vendor has not detected it or does not say. Optional, so a lead built
|
|
159
|
+
* or stored before the field existed still matches the schema.
|
|
160
|
+
*/
|
|
161
|
+
recipientMailProvider: recipientMailProviderSchema.nullable().optional(),
|
|
149
162
|
/** `true` once the lead replied. `null` when the vendor does not say. */
|
|
150
163
|
replied: z.boolean().nullable(),
|
|
151
164
|
/**
|
|
@@ -176,9 +189,17 @@ var messageFields = {
|
|
|
176
189
|
threadId: z.string().nullable(),
|
|
177
190
|
variantKey: z.string().nullable()
|
|
178
191
|
};
|
|
192
|
+
var autoSourceSchema = z.enum(["rule", "vendor"]);
|
|
193
|
+
var isAutoSource = autoSourceSchema.nullable().optional();
|
|
179
194
|
var messageSchema = z.object({
|
|
180
195
|
...messageFields,
|
|
181
|
-
direction: z.enum(["in", "out"])
|
|
196
|
+
direction: z.enum(["in", "out"]),
|
|
197
|
+
/**
|
|
198
|
+
* On a received message, `true` for an auto-reply and `false` when it is
|
|
199
|
+
* known not to be one. Absent or `null` when nothing says.
|
|
200
|
+
*/
|
|
201
|
+
isAuto: z.boolean().nullable().optional(),
|
|
202
|
+
isAutoSource
|
|
182
203
|
});
|
|
183
204
|
var replySchema = z.object({
|
|
184
205
|
...messageFields,
|
|
@@ -190,8 +211,15 @@ var replySchema = z.object({
|
|
|
190
211
|
*/
|
|
191
212
|
categorySource: z.enum(["lead", "rule", "vendor"]).nullable(),
|
|
192
213
|
direction: z.literal("in"),
|
|
193
|
-
/** `true` for an auto-reply, `null` when the vendor
|
|
214
|
+
/** `true` for an auto-reply, `null` when neither the vendor nor a fixed rule says. */
|
|
194
215
|
isAuto: z.boolean().nullable(),
|
|
216
|
+
isAutoSource,
|
|
217
|
+
/**
|
|
218
|
+
* `true` when the reply says the person left the company or that the
|
|
219
|
+
* contact changed ("is no longer with", "your contact with Acme has
|
|
220
|
+
* changed"). Absent or `null` when nothing says.
|
|
221
|
+
*/
|
|
222
|
+
leftCompany: z.boolean().nullable().optional(),
|
|
195
223
|
/** `true` while the reply, or the thread it is in, is unread in the vendor's inbox. */
|
|
196
224
|
unread: z.boolean().nullable()
|
|
197
225
|
});
|
|
@@ -202,6 +230,11 @@ var metricScopeSchema = z.enum([
|
|
|
202
230
|
"workspace"
|
|
203
231
|
]);
|
|
204
232
|
var evidenceSchema = z.enum(["derived", "exact", "sampled"]);
|
|
233
|
+
var trackingStateSchema = z.enum(["mixed", "off", "on"]).nullable();
|
|
234
|
+
var trackingSchema = z.object({
|
|
235
|
+
clicks: trackingStateSchema,
|
|
236
|
+
opens: trackingStateSchema
|
|
237
|
+
});
|
|
205
238
|
var metricRowSchema = z.object({
|
|
206
239
|
bounced: count,
|
|
207
240
|
/** Unique clicks: leads who clicked at least once. */
|
|
@@ -212,6 +245,11 @@ var metricRowSchema = z.object({
|
|
|
212
245
|
connectionsAccepted: count,
|
|
213
246
|
/** LinkedIn only. */
|
|
214
247
|
connectionsSent: count,
|
|
248
|
+
/**
|
|
249
|
+
* Leads who reached the end of the sequence. Optional: absent or `null`
|
|
250
|
+
* where the vendor does not report it.
|
|
251
|
+
*/
|
|
252
|
+
completed: count.optional(),
|
|
215
253
|
/** Unique leads contacted. */
|
|
216
254
|
contacted: count,
|
|
217
255
|
contentHash: z.string().nullable(),
|
|
@@ -221,14 +259,43 @@ var metricRowSchema = z.object({
|
|
|
221
259
|
evidence: evidenceSchema,
|
|
222
260
|
/** LinkedIn only. */
|
|
223
261
|
inmailsSent: count,
|
|
224
|
-
/**
|
|
262
|
+
/**
|
|
263
|
+
* Leads in the campaign now, whatever their progress. A lead removed after
|
|
264
|
+
* its sequence started is still in `contacted`, so `contacted` can be a
|
|
265
|
+
* little over `leads`. Optional, like `completed`.
|
|
266
|
+
*/
|
|
267
|
+
leads: count.optional(),
|
|
268
|
+
/**
|
|
269
|
+
* Unique opens. `null` when a campaign behind the row had open tracking
|
|
270
|
+
* off and recorded no opens, including when tracking is `mixed`.
|
|
271
|
+
*/
|
|
225
272
|
opened: count,
|
|
226
273
|
openedTotal: count,
|
|
274
|
+
/** Opportunities the vendor counts for the leads. Optional, like `completed`. */
|
|
275
|
+
opportunities: count.optional(),
|
|
276
|
+
/**
|
|
277
|
+
* What those opportunities are worth, in the vendor workspace's own
|
|
278
|
+
* currency, which the vendor does not name. Optional, like `completed`.
|
|
279
|
+
*/
|
|
280
|
+
opportunityValue: count.optional(),
|
|
227
281
|
positive: count,
|
|
228
282
|
provider: z.string().min(1),
|
|
229
|
-
/**
|
|
283
|
+
/**
|
|
284
|
+
* People who replied, auto-replies left out: each lead is counted once,
|
|
285
|
+
* however many replies they sent. Auto-replies are counted in `repliedAuto`.
|
|
286
|
+
*/
|
|
230
287
|
replied: count,
|
|
288
|
+
/** People whose replies were automatic, counted once each. */
|
|
231
289
|
repliedAuto: count,
|
|
290
|
+
/** Automatic reply messages, each one counted. Optional, like `repliedTotal`. */
|
|
291
|
+
repliedAutoTotal: count.optional(),
|
|
292
|
+
/**
|
|
293
|
+
* Reply messages from people, auto-replies left out: a lead who replied
|
|
294
|
+
* twice counts 2. Optional: absent or `null` where the vendor does not
|
|
295
|
+
* report it. Instantly's dashboard "Replies" is `repliedTotal` plus
|
|
296
|
+
* `repliedAutoTotal`.
|
|
297
|
+
*/
|
|
298
|
+
repliedTotal: count.optional(),
|
|
232
299
|
schemaVersion: z.literal(SCHEMA_VERSION),
|
|
233
300
|
scope: metricScopeSchema,
|
|
234
301
|
scopeRef: z.string(),
|
|
@@ -241,6 +308,14 @@ var metricRowSchema = z.object({
|
|
|
241
308
|
* lifetime total. A vendor's "day" is not always UTC.
|
|
242
309
|
*/
|
|
243
310
|
timezone: z.string().nullable(),
|
|
311
|
+
/**
|
|
312
|
+
* The open and click tracking of the campaigns behind the row, as their
|
|
313
|
+
* settings are now: `on`, `off`, `mixed` when some campaigns track and
|
|
314
|
+
* some do not, or `null` when a setting is unknown. Optional: absent when
|
|
315
|
+
* the adapter did not read the settings. A count the campaigns did not
|
|
316
|
+
* measure is `null`; see `docs/api/stats`.
|
|
317
|
+
*/
|
|
318
|
+
tracking: trackingSchema.optional(),
|
|
244
319
|
unsubscribed: count,
|
|
245
320
|
variantKey: z.string().nullable(),
|
|
246
321
|
workspaceId: z.string().min(1)
|
|
@@ -326,6 +401,7 @@ export {
|
|
|
326
401
|
sequenceSchema,
|
|
327
402
|
senderStatusSchema,
|
|
328
403
|
mailProviderSchema,
|
|
404
|
+
recipientMailProviderSchema,
|
|
329
405
|
senderSchema,
|
|
330
406
|
leadStatusSchema,
|
|
331
407
|
leadProgressSchema,
|