outbound-sdk 0.1.0 → 0.2.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/README.md +0 -2
- package/dist/alerts/index.js +5 -1
- package/dist/audit/index.js +2 -2
- package/dist/benchmarks/index.js +5 -3
- package/dist/budget/index.js +31 -10
- package/dist/cache/index.js +2 -2
- package/dist/cards/index.js +1 -1
- package/dist/chunks/{chunk-WAM6N4OF.js → chunk-4PSO6JEK.js} +107 -19
- package/dist/chunks/chunk-6CVZOUHB.js +152 -0
- package/dist/chunks/{chunk-OCV66TS2.js → chunk-AFU5E5QB.js} +17 -8
- package/dist/chunks/{chunk-R6AM4GJR.js → chunk-DJ2IUQEU.js} +24 -18
- package/dist/chunks/{chunk-LOXBLQ3I.js → chunk-E7JHLNLG.js} +9 -2
- package/dist/chunks/{chunk-LNCOGBMI.js → chunk-FHKSLCVW.js} +13 -3
- package/dist/chunks/chunk-FKH5N47I.js +40 -0
- package/dist/chunks/chunk-HZCTYL22.js +29 -0
- package/dist/chunks/{chunk-CMQ5ZHLZ.js → chunk-IPUYZD4O.js} +1 -1
- package/dist/chunks/{chunk-VURTOVGI.js → chunk-IVH3NMQZ.js} +1 -1
- package/dist/chunks/{chunk-ZGHQYZEH.js → chunk-LVYG7XZJ.js} +1 -1
- package/dist/chunks/chunk-NAKXLBA6.js +30 -0
- package/dist/chunks/{chunk-7BCYLIDG.js → chunk-P3IJBJUI.js} +203 -34
- package/dist/chunks/{chunk-Q465X22Y.js → chunk-PURHK3JU.js} +93 -209
- package/dist/chunks/{chunk-F7MKFVIG.js → chunk-R3Y56YVF.js} +2 -2
- package/dist/chunks/chunk-RCZ7ZZFU.js +92 -0
- package/dist/chunks/chunk-SBIZDCRY.js +106 -0
- package/dist/chunks/{chunk-IBC52BX3.js → chunk-U2D34ARZ.js} +20 -3
- package/dist/chunks/chunk-UAT3JSJZ.js +331 -0
- package/dist/chunks/{chunk-QZNNCXXD.js → chunk-VQSCHOBV.js} +20 -1
- package/dist/chunks/{chunk-B7V6EOAC.js → chunk-XNFESPZH.js} +160 -126
- package/dist/chunks/{chunk-WW746NJF.js → chunk-YOTW5ESM.js} +25 -1
- package/dist/cli/bin.js +14 -13
- package/dist/cli/commands.d.ts +3 -0
- package/dist/cli/config.d.ts +22 -0
- package/dist/cli/index.d.ts +5 -1
- package/dist/cli/index.js +20 -15
- package/dist/cli/stdio.d.ts +9 -0
- package/dist/cli/version.d.ts +2 -0
- package/dist/clients/index.js +13 -3
- package/dist/combine/account.d.ts +1 -1
- package/dist/combine/index.js +90 -15
- package/dist/combine/route.d.ts +7 -0
- package/dist/exporter/index.js +2 -2
- package/dist/failover/index.js +4 -4
- package/dist/fixtures/index.js +40 -21
- package/dist/heyreach/account.d.ts +1 -1
- package/dist/heyreach/adapter.d.ts +1 -1
- package/dist/heyreach/capabilities.d.ts +2 -0
- package/dist/heyreach/client.d.ts +3 -5
- package/dist/heyreach/index.d.ts +7 -0
- package/dist/heyreach/index.js +428 -205
- package/dist/heyreach/leads.d.ts +4 -0
- package/dist/heyreach/map-account.d.ts +7 -1
- package/dist/heyreach/map-stats.d.ts +8 -5
- package/dist/heyreach/map.d.ts +3 -1
- package/dist/heyreach/webhooks.d.ts +1 -0
- package/dist/identity/index.js +22 -11
- package/dist/index.d.ts +1 -4
- package/dist/index.js +29 -17
- package/dist/insights/copy/index.d.ts +2 -2
- package/dist/insights/copy/variant-test.d.ts +2 -2
- package/dist/insights/index.js +248 -184
- package/dist/insights/ops/anomalies.d.ts +3 -3
- package/dist/insights/ops/index.d.ts +2 -2
- package/dist/insights/ops/shared.d.ts +7 -1
- package/dist/insights/registry.d.ts +4 -4
- package/dist/instantly/adapter-account.d.ts +1 -1
- package/dist/instantly/capabilities.d.ts +2 -0
- package/dist/instantly/client.d.ts +4 -9
- package/dist/instantly/index.d.ts +7 -0
- package/dist/instantly/index.js +410 -155
- package/dist/instantly/map-account.d.ts +20 -5
- package/dist/instantly/map-stats.d.ts +9 -6
- package/dist/instantly/map.d.ts +0 -2
- package/dist/instantly/native-agents-sales.d.ts +41 -41
- package/dist/instantly/native-agents.d.ts +44 -44
- package/dist/instantly/native-campaigns.d.ts +21 -21
- package/dist/instantly/native-leads.d.ts +12 -12
- package/dist/instantly/native-params.d.ts +2 -19
- package/dist/instantly/native-search.d.ts +10 -10
- package/dist/instantly/native-senders.d.ts +56 -56
- package/dist/instantly/native-supersearch.d.ts +33 -33
- package/dist/instantly/native-workspace.d.ts +45 -45
- package/dist/instantly/native.d.ts +262 -262
- package/dist/instantly/webhooks.d.ts +1 -0
- package/dist/internal/adapter.d.ts +24 -2
- package/dist/internal/capabilities.d.ts +18 -0
- package/dist/internal/client.d.ts +15 -0
- package/dist/internal/concurrency.d.ts +8 -0
- package/dist/internal/engine/request.d.ts +7 -0
- package/dist/internal/entities-account.d.ts +73 -3
- package/dist/internal/entities.d.ts +116 -12
- package/dist/internal/errors.d.ts +6 -1
- package/dist/internal/fields.d.ts +462 -0
- package/dist/internal/json.d.ts +9 -0
- package/dist/internal/lead-fields.d.ts +21 -0
- package/dist/internal/lead-status.d.ts +13 -0
- package/dist/internal/metrics.d.ts +14 -2
- package/dist/internal/native.d.ts +15 -0
- package/dist/internal/outbound/api.d.ts +29 -4
- package/dist/internal/outbound/operations-account.d.ts +12 -0
- package/dist/internal/outbound/outbound.d.ts +6 -3
- package/dist/internal/outbound/specs-account.d.ts +5 -1
- package/dist/internal/page.d.ts +14 -0
- package/dist/internal/record.d.ts +17 -0
- package/dist/internal/records.d.ts +7 -0
- package/dist/internal/sequence.d.ts +14 -0
- package/dist/internal/sha256.d.ts +2 -0
- package/dist/loader/index.d.ts +14 -2
- package/dist/loader/index.js +8 -4
- package/dist/memory/account-reads.d.ts +1 -1
- package/dist/memory/account.d.ts +15 -1
- package/dist/memory/data.d.ts +17 -2
- package/dist/memory/index.js +110 -35
- package/dist/redact/index.js +11 -6
- package/dist/redact/plugin.d.ts +1 -1
- package/dist/smartlead/account.d.ts +1 -1
- package/dist/smartlead/adapter.d.ts +1 -1
- package/dist/smartlead/capabilities.d.ts +2 -0
- package/dist/smartlead/client.d.ts +6 -11
- package/dist/smartlead/hmac.d.ts +0 -2
- package/dist/smartlead/index.d.ts +7 -0
- package/dist/smartlead/index.js +731 -572
- package/dist/smartlead/leads.d.ts +4 -1
- package/dist/smartlead/map-account.d.ts +17 -5
- package/dist/smartlead/map-stats.d.ts +9 -10
- package/dist/smartlead/map.d.ts +15 -5
- package/dist/smartlead/native-analytics.d.ts +87 -87
- package/dist/smartlead/native-campaigns.d.ts +64 -64
- package/dist/smartlead/native-inbox.d.ts +51 -51
- package/dist/smartlead/native-params.d.ts +2 -23
- package/dist/smartlead/native-services.d.ts +34 -34
- package/dist/smartlead/native.d.ts +236 -236
- package/dist/smartlead/shared.d.ts +6 -5
- package/dist/smartlead/webhooks.d.ts +1 -0
- package/dist/sync/index.js +3 -3
- package/dist/tools/ai-sdk.js +7 -5
- package/dist/tools/campaign-tools.d.ts +1 -1
- package/dist/tools/claude-agent.js +7 -5
- package/dist/tools/index.js +8 -6
- package/dist/tracing/index.js +2 -2
- package/dist/webhooks/index.js +10 -9
- package/package.json +1 -1
- package/dist/chunks/chunk-FZF6CLPX.js +0 -232
- package/dist/chunks/chunk-GPEJG34O.js +0 -53
- package/dist/chunks/chunk-HEC7XFFH.js +0 -65
- package/dist/chunks/chunk-QTB747K4.js +0 -100
- package/dist/chunks/chunk-TIJKJJDW.js +0 -6
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
/** Every record the SDK returns, by the name the coverage uses for it. */
|
|
3
|
+
export declare const RECORD_SCHEMAS: {
|
|
4
|
+
readonly blockEntry: z.ZodObject<{
|
|
5
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
6
|
+
kind: z.ZodEnum<{
|
|
7
|
+
email: "email";
|
|
8
|
+
linkedin: "linkedin";
|
|
9
|
+
other: "other";
|
|
10
|
+
company: "company";
|
|
11
|
+
domain: "domain";
|
|
12
|
+
}>;
|
|
13
|
+
value: z.ZodString;
|
|
14
|
+
provider: z.ZodString;
|
|
15
|
+
raw: z.ZodJSONSchema;
|
|
16
|
+
ref: z.ZodString;
|
|
17
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
18
|
+
sourceId: z.ZodString;
|
|
19
|
+
workspaceId: z.ZodString;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
readonly campaign: z.ZodObject<{
|
|
22
|
+
channel: z.ZodEnum<{
|
|
23
|
+
email: "email";
|
|
24
|
+
linkedin: "linkedin";
|
|
25
|
+
}>;
|
|
26
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
status: z.ZodEnum<{
|
|
29
|
+
active: "active";
|
|
30
|
+
archived: "archived";
|
|
31
|
+
completed: "completed";
|
|
32
|
+
draft: "draft";
|
|
33
|
+
paused: "paused";
|
|
34
|
+
unknown: "unknown";
|
|
35
|
+
}>;
|
|
36
|
+
tags: z.ZodArray<z.ZodString>;
|
|
37
|
+
provider: z.ZodString;
|
|
38
|
+
raw: z.ZodJSONSchema;
|
|
39
|
+
ref: z.ZodString;
|
|
40
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
41
|
+
sourceId: z.ZodString;
|
|
42
|
+
workspaceId: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
readonly campaignProgress: z.ZodObject<{
|
|
45
|
+
blocked: z.ZodNullable<z.ZodNumber>;
|
|
46
|
+
campaignRef: z.ZodString;
|
|
47
|
+
completed: z.ZodNullable<z.ZodNumber>;
|
|
48
|
+
failed: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
inProgress: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
leads: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
notStarted: z.ZodNullable<z.ZodNumber>;
|
|
52
|
+
stopped: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
provider: z.ZodString;
|
|
54
|
+
raw: z.ZodJSONSchema;
|
|
55
|
+
ref: z.ZodString;
|
|
56
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
57
|
+
sourceId: z.ZodString;
|
|
58
|
+
workspaceId: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
readonly campaignSettings: z.ZodObject<{
|
|
61
|
+
campaignRef: z.ZodString;
|
|
62
|
+
dailyLimit: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
dailyNewLeads: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
endDate: z.ZodNullable<z.ZodISODate>;
|
|
65
|
+
gapMinutes: z.ZodNullable<z.ZodNumber>;
|
|
66
|
+
plainText: z.ZodNullable<z.ZodBoolean>;
|
|
67
|
+
schedule: z.ZodArray<z.ZodObject<{
|
|
68
|
+
days: z.ZodArray<z.ZodNumber>;
|
|
69
|
+
from: z.ZodNullable<z.ZodString>;
|
|
70
|
+
name: z.ZodNullable<z.ZodString>;
|
|
71
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
72
|
+
to: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
startDate: z.ZodNullable<z.ZodISODate>;
|
|
75
|
+
stopOnAutoReply: z.ZodNullable<z.ZodBoolean>;
|
|
76
|
+
stopOnReply: z.ZodNullable<z.ZodBoolean>;
|
|
77
|
+
tracking: z.ZodObject<{
|
|
78
|
+
clicks: z.ZodNullable<z.ZodBoolean>;
|
|
79
|
+
opens: z.ZodNullable<z.ZodBoolean>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
provider: z.ZodString;
|
|
82
|
+
raw: z.ZodJSONSchema;
|
|
83
|
+
ref: z.ZodString;
|
|
84
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
85
|
+
sourceId: z.ZodString;
|
|
86
|
+
workspaceId: z.ZodString;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
readonly lead: z.ZodObject<{
|
|
89
|
+
bounced: z.ZodNullable<z.ZodBoolean>;
|
|
90
|
+
campaignRef: z.ZodNullable<z.ZodString>;
|
|
91
|
+
company: z.ZodNullable<z.ZodString>;
|
|
92
|
+
companyLinkedinUrl: z.ZodNullable<z.ZodString>;
|
|
93
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
94
|
+
custom: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
95
|
+
email: z.ZodNullable<z.ZodString>;
|
|
96
|
+
engagement: z.ZodNullable<z.ZodObject<{
|
|
97
|
+
clicks: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
lastContactedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
99
|
+
lastOpenedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
100
|
+
lastRepliedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
101
|
+
opens: z.ZodNullable<z.ZodNumber>;
|
|
102
|
+
replies: z.ZodNullable<z.ZodNumber>;
|
|
103
|
+
repliedStepIndex: z.ZodNullable<z.ZodNumber>;
|
|
104
|
+
stepIndex: z.ZodNullable<z.ZodNumber>;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
107
|
+
interest: z.ZodNullable<z.ZodString>;
|
|
108
|
+
interestCategory: z.ZodNullable<z.ZodEnum<{
|
|
109
|
+
unknown: "unknown";
|
|
110
|
+
bounce: "bounce";
|
|
111
|
+
negative: "negative";
|
|
112
|
+
neutral: "neutral";
|
|
113
|
+
ooo: "ooo";
|
|
114
|
+
positive: "positive";
|
|
115
|
+
unsubscribe: "unsubscribe";
|
|
116
|
+
}>>;
|
|
117
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
118
|
+
linkedinUrl: z.ZodNullable<z.ZodString>;
|
|
119
|
+
location: z.ZodNullable<z.ZodString>;
|
|
120
|
+
phone: z.ZodNullable<z.ZodString>;
|
|
121
|
+
progress: z.ZodEnum<{
|
|
122
|
+
active: "active";
|
|
123
|
+
completed: "completed";
|
|
124
|
+
paused: "paused";
|
|
125
|
+
unknown: "unknown";
|
|
126
|
+
}>;
|
|
127
|
+
replied: z.ZodNullable<z.ZodBoolean>;
|
|
128
|
+
status: z.ZodEnum<{
|
|
129
|
+
active: "active";
|
|
130
|
+
completed: "completed";
|
|
131
|
+
paused: "paused";
|
|
132
|
+
unknown: "unknown";
|
|
133
|
+
bounced: "bounced";
|
|
134
|
+
replied: "replied";
|
|
135
|
+
unsubscribed: "unsubscribed";
|
|
136
|
+
}>;
|
|
137
|
+
tags: z.ZodArray<z.ZodString>;
|
|
138
|
+
title: z.ZodNullable<z.ZodString>;
|
|
139
|
+
unsubscribed: z.ZodNullable<z.ZodBoolean>;
|
|
140
|
+
website: z.ZodNullable<z.ZodString>;
|
|
141
|
+
provider: z.ZodString;
|
|
142
|
+
raw: z.ZodJSONSchema;
|
|
143
|
+
ref: z.ZodString;
|
|
144
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
145
|
+
sourceId: z.ZodString;
|
|
146
|
+
workspaceId: z.ZodString;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
readonly leadList: z.ZodObject<{
|
|
149
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
150
|
+
kind: z.ZodEnum<{
|
|
151
|
+
leads: "leads";
|
|
152
|
+
companies: "companies";
|
|
153
|
+
}>;
|
|
154
|
+
name: z.ZodString;
|
|
155
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
156
|
+
provider: z.ZodString;
|
|
157
|
+
raw: z.ZodJSONSchema;
|
|
158
|
+
ref: z.ZodString;
|
|
159
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
160
|
+
sourceId: z.ZodString;
|
|
161
|
+
workspaceId: z.ZodString;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
readonly message: z.ZodObject<{
|
|
164
|
+
direction: z.ZodEnum<{
|
|
165
|
+
in: "in";
|
|
166
|
+
out: "out";
|
|
167
|
+
}>;
|
|
168
|
+
bodyHtml: z.ZodNullable<z.ZodString>;
|
|
169
|
+
bodyText: z.ZodNullable<z.ZodString>;
|
|
170
|
+
campaignRef: z.ZodNullable<z.ZodString>;
|
|
171
|
+
channel: z.ZodEnum<{
|
|
172
|
+
email: "email";
|
|
173
|
+
linkedin: "linkedin";
|
|
174
|
+
}>;
|
|
175
|
+
leadRef: z.ZodNullable<z.ZodString>;
|
|
176
|
+
senderRef: z.ZodNullable<z.ZodString>;
|
|
177
|
+
sentAt: z.ZodNullable<z.ZodISODateTime>;
|
|
178
|
+
stepIndex: z.ZodNullable<z.ZodNumber>;
|
|
179
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
180
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
181
|
+
variantKey: z.ZodNullable<z.ZodString>;
|
|
182
|
+
provider: z.ZodString;
|
|
183
|
+
raw: z.ZodJSONSchema;
|
|
184
|
+
ref: z.ZodString;
|
|
185
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
186
|
+
sourceId: z.ZodString;
|
|
187
|
+
workspaceId: z.ZodString;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
readonly metricRow: z.ZodObject<{
|
|
190
|
+
bounced: z.ZodNullable<z.ZodNumber>;
|
|
191
|
+
clicked: z.ZodNullable<z.ZodNumber>;
|
|
192
|
+
clickedTotal: z.ZodNullable<z.ZodNumber>;
|
|
193
|
+
connectionsAccepted: z.ZodNullable<z.ZodNumber>;
|
|
194
|
+
connectionsSent: z.ZodNullable<z.ZodNumber>;
|
|
195
|
+
contacted: z.ZodNullable<z.ZodNumber>;
|
|
196
|
+
contentHash: z.ZodNullable<z.ZodString>;
|
|
197
|
+
date: z.ZodNullable<z.ZodISODate>;
|
|
198
|
+
delivered: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
evidence: z.ZodEnum<{
|
|
200
|
+
derived: "derived";
|
|
201
|
+
exact: "exact";
|
|
202
|
+
sampled: "sampled";
|
|
203
|
+
}>;
|
|
204
|
+
inmailsSent: z.ZodNullable<z.ZodNumber>;
|
|
205
|
+
opened: z.ZodNullable<z.ZodNumber>;
|
|
206
|
+
openedTotal: z.ZodNullable<z.ZodNumber>;
|
|
207
|
+
positive: z.ZodNullable<z.ZodNumber>;
|
|
208
|
+
provider: z.ZodString;
|
|
209
|
+
replied: z.ZodNullable<z.ZodNumber>;
|
|
210
|
+
repliedAuto: z.ZodNullable<z.ZodNumber>;
|
|
211
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
212
|
+
scope: z.ZodEnum<{
|
|
213
|
+
campaign: "campaign";
|
|
214
|
+
sender: "sender";
|
|
215
|
+
step: "step";
|
|
216
|
+
workspace: "workspace";
|
|
217
|
+
}>;
|
|
218
|
+
scopeRef: z.ZodString;
|
|
219
|
+
sent: z.ZodNullable<z.ZodNumber>;
|
|
220
|
+
stepIndex: z.ZodNullable<z.ZodNumber>;
|
|
221
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
222
|
+
unsubscribed: z.ZodNullable<z.ZodNumber>;
|
|
223
|
+
variantKey: z.ZodNullable<z.ZodString>;
|
|
224
|
+
workspaceId: z.ZodString;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
readonly placementTest: z.ZodObject<{
|
|
227
|
+
campaignRef: z.ZodNullable<z.ZodString>;
|
|
228
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
229
|
+
endsAt: z.ZodNullable<z.ZodISODateTime>;
|
|
230
|
+
kind: z.ZodNullable<z.ZodEnum<{
|
|
231
|
+
automated: "automated";
|
|
232
|
+
one_time: "one_time";
|
|
233
|
+
}>>;
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
nextRunAt: z.ZodNullable<z.ZodISODateTime>;
|
|
236
|
+
startsAt: z.ZodNullable<z.ZodISODateTime>;
|
|
237
|
+
status: z.ZodEnum<{
|
|
238
|
+
active: "active";
|
|
239
|
+
completed: "completed";
|
|
240
|
+
paused: "paused";
|
|
241
|
+
unknown: "unknown";
|
|
242
|
+
}>;
|
|
243
|
+
provider: z.ZodString;
|
|
244
|
+
raw: z.ZodJSONSchema;
|
|
245
|
+
ref: z.ZodString;
|
|
246
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
247
|
+
sourceId: z.ZodString;
|
|
248
|
+
workspaceId: z.ZodString;
|
|
249
|
+
}, z.core.$strip>;
|
|
250
|
+
readonly reply: z.ZodObject<{
|
|
251
|
+
category: z.ZodEnum<{
|
|
252
|
+
unknown: "unknown";
|
|
253
|
+
bounce: "bounce";
|
|
254
|
+
negative: "negative";
|
|
255
|
+
neutral: "neutral";
|
|
256
|
+
ooo: "ooo";
|
|
257
|
+
positive: "positive";
|
|
258
|
+
unsubscribe: "unsubscribe";
|
|
259
|
+
}>;
|
|
260
|
+
categorySource: z.ZodNullable<z.ZodEnum<{
|
|
261
|
+
vendor: "vendor";
|
|
262
|
+
lead: "lead";
|
|
263
|
+
rule: "rule";
|
|
264
|
+
}>>;
|
|
265
|
+
direction: z.ZodLiteral<"in">;
|
|
266
|
+
isAuto: z.ZodNullable<z.ZodBoolean>;
|
|
267
|
+
unread: z.ZodNullable<z.ZodBoolean>;
|
|
268
|
+
bodyHtml: z.ZodNullable<z.ZodString>;
|
|
269
|
+
bodyText: z.ZodNullable<z.ZodString>;
|
|
270
|
+
campaignRef: z.ZodNullable<z.ZodString>;
|
|
271
|
+
channel: z.ZodEnum<{
|
|
272
|
+
email: "email";
|
|
273
|
+
linkedin: "linkedin";
|
|
274
|
+
}>;
|
|
275
|
+
leadRef: z.ZodNullable<z.ZodString>;
|
|
276
|
+
senderRef: z.ZodNullable<z.ZodString>;
|
|
277
|
+
sentAt: z.ZodNullable<z.ZodISODateTime>;
|
|
278
|
+
stepIndex: z.ZodNullable<z.ZodNumber>;
|
|
279
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
280
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
281
|
+
variantKey: z.ZodNullable<z.ZodString>;
|
|
282
|
+
provider: z.ZodString;
|
|
283
|
+
raw: z.ZodJSONSchema;
|
|
284
|
+
ref: z.ZodString;
|
|
285
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
286
|
+
sourceId: z.ZodString;
|
|
287
|
+
workspaceId: z.ZodString;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
readonly sender: z.ZodObject<{
|
|
290
|
+
address: z.ZodNullable<z.ZodString>;
|
|
291
|
+
dailyLimit: z.ZodNullable<z.ZodNumber>;
|
|
292
|
+
kind: z.ZodEnum<{
|
|
293
|
+
linkedin: "linkedin";
|
|
294
|
+
mailbox: "mailbox";
|
|
295
|
+
}>;
|
|
296
|
+
linkedinUrl: z.ZodNullable<z.ZodString>;
|
|
297
|
+
mailProvider: z.ZodNullable<z.ZodEnum<{
|
|
298
|
+
google: "google";
|
|
299
|
+
microsoft: "microsoft";
|
|
300
|
+
other: "other";
|
|
301
|
+
smtp: "smtp";
|
|
302
|
+
}>>;
|
|
303
|
+
name: z.ZodNullable<z.ZodString>;
|
|
304
|
+
status: z.ZodEnum<{
|
|
305
|
+
error: "error";
|
|
306
|
+
active: "active";
|
|
307
|
+
paused: "paused";
|
|
308
|
+
unknown: "unknown";
|
|
309
|
+
disconnected: "disconnected";
|
|
310
|
+
}>;
|
|
311
|
+
tags: z.ZodArray<z.ZodString>;
|
|
312
|
+
warmup: z.ZodNullable<z.ZodObject<{
|
|
313
|
+
enabled: z.ZodNullable<z.ZodBoolean>;
|
|
314
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
315
|
+
}, z.core.$strip>>;
|
|
316
|
+
provider: z.ZodString;
|
|
317
|
+
raw: z.ZodJSONSchema;
|
|
318
|
+
ref: z.ZodString;
|
|
319
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
320
|
+
sourceId: z.ZodString;
|
|
321
|
+
workspaceId: z.ZodString;
|
|
322
|
+
}, z.core.$strip>;
|
|
323
|
+
readonly senderHealth: z.ZodObject<{
|
|
324
|
+
blacklisted: z.ZodNullable<z.ZodBoolean>;
|
|
325
|
+
checkedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
326
|
+
connected: z.ZodNullable<z.ZodBoolean>;
|
|
327
|
+
dns: z.ZodObject<{
|
|
328
|
+
dkim: z.ZodNullable<z.ZodBoolean>;
|
|
329
|
+
dmarc: z.ZodNullable<z.ZodBoolean>;
|
|
330
|
+
mx: z.ZodNullable<z.ZodBoolean>;
|
|
331
|
+
spf: z.ZodNullable<z.ZodBoolean>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
domain: z.ZodNullable<z.ZodString>;
|
|
334
|
+
issues: z.ZodArray<z.ZodString>;
|
|
335
|
+
senderRef: z.ZodString;
|
|
336
|
+
warmup: z.ZodNullable<z.ZodObject<{
|
|
337
|
+
inbox: z.ZodNullable<z.ZodNumber>;
|
|
338
|
+
received: z.ZodNullable<z.ZodNumber>;
|
|
339
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
340
|
+
sent: z.ZodNullable<z.ZodNumber>;
|
|
341
|
+
spam: z.ZodNullable<z.ZodNumber>;
|
|
342
|
+
}, z.core.$strip>>;
|
|
343
|
+
provider: z.ZodString;
|
|
344
|
+
raw: z.ZodJSONSchema;
|
|
345
|
+
ref: z.ZodString;
|
|
346
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
347
|
+
sourceId: z.ZodString;
|
|
348
|
+
workspaceId: z.ZodString;
|
|
349
|
+
}, z.core.$strip>;
|
|
350
|
+
readonly sequence: z.ZodObject<{
|
|
351
|
+
campaignRef: z.ZodString;
|
|
352
|
+
kind: z.ZodEnum<{
|
|
353
|
+
main: "main";
|
|
354
|
+
subsequence: "subsequence";
|
|
355
|
+
}>;
|
|
356
|
+
name: z.ZodNullable<z.ZodString>;
|
|
357
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
358
|
+
action: z.ZodString;
|
|
359
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
360
|
+
delayDays: z.ZodNullable<z.ZodNumber>;
|
|
361
|
+
index: z.ZodNumber;
|
|
362
|
+
parentIndex: z.ZodNullable<z.ZodNumber>;
|
|
363
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
364
|
+
body: z.ZodNullable<z.ZodString>;
|
|
365
|
+
contentHash: z.ZodString;
|
|
366
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
367
|
+
variantKey: z.ZodString;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
}, z.core.$strip>>;
|
|
370
|
+
provider: z.ZodString;
|
|
371
|
+
raw: z.ZodJSONSchema;
|
|
372
|
+
ref: z.ZodString;
|
|
373
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
374
|
+
sourceId: z.ZodString;
|
|
375
|
+
workspaceId: z.ZodString;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
readonly tag: z.ZodObject<{
|
|
378
|
+
description: z.ZodNullable<z.ZodString>;
|
|
379
|
+
name: z.ZodString;
|
|
380
|
+
provider: z.ZodString;
|
|
381
|
+
raw: z.ZodJSONSchema;
|
|
382
|
+
ref: z.ZodString;
|
|
383
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
384
|
+
sourceId: z.ZodString;
|
|
385
|
+
workspaceId: z.ZodString;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
readonly webhook: z.ZodObject<{
|
|
388
|
+
active: z.ZodNullable<z.ZodBoolean>;
|
|
389
|
+
campaignRefs: z.ZodArray<z.ZodString>;
|
|
390
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
391
|
+
eventTypes: z.ZodArray<z.ZodEnum<{
|
|
392
|
+
unknown: "unknown";
|
|
393
|
+
"campaign.status_changed": "campaign.status_changed";
|
|
394
|
+
"lead.status_changed": "lead.status_changed";
|
|
395
|
+
"lead.unsubscribed": "lead.unsubscribed";
|
|
396
|
+
"linkedin.connection_accepted": "linkedin.connection_accepted";
|
|
397
|
+
"linkedin.connection_sent": "linkedin.connection_sent";
|
|
398
|
+
"linkedin.message_received": "linkedin.message_received";
|
|
399
|
+
"linkedin.message_sent": "linkedin.message_sent";
|
|
400
|
+
"meeting.booked": "meeting.booked";
|
|
401
|
+
"message.bounced": "message.bounced";
|
|
402
|
+
"message.clicked": "message.clicked";
|
|
403
|
+
"message.opened": "message.opened";
|
|
404
|
+
"message.sent": "message.sent";
|
|
405
|
+
"reply.categorized": "reply.categorized";
|
|
406
|
+
"reply.received": "reply.received";
|
|
407
|
+
"sender.status_changed": "sender.status_changed";
|
|
408
|
+
}>>;
|
|
409
|
+
events: z.ZodArray<z.ZodString>;
|
|
410
|
+
name: z.ZodNullable<z.ZodString>;
|
|
411
|
+
url: z.ZodString;
|
|
412
|
+
provider: z.ZodString;
|
|
413
|
+
raw: z.ZodJSONSchema;
|
|
414
|
+
ref: z.ZodString;
|
|
415
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
416
|
+
sourceId: z.ZodString;
|
|
417
|
+
workspaceId: z.ZodString;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
readonly workspace: z.ZodObject<{
|
|
420
|
+
name: z.ZodString;
|
|
421
|
+
provider: z.ZodString;
|
|
422
|
+
raw: z.ZodJSONSchema;
|
|
423
|
+
ref: z.ZodString;
|
|
424
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
425
|
+
sourceId: z.ZodString;
|
|
426
|
+
workspaceId: z.ZodString;
|
|
427
|
+
}, z.core.$strip>;
|
|
428
|
+
};
|
|
429
|
+
export type RecordName = keyof typeof RECORD_SCHEMAS;
|
|
430
|
+
/**
|
|
431
|
+
* `exact`: the vendor reports the field and the adapter reads it. `derived`:
|
|
432
|
+
* the adapter computes it, or takes it from a neighbouring record. `false`:
|
|
433
|
+
* this adapter never fills it, so it is always empty (`null`, `[]`, `{}` or
|
|
434
|
+
* `unknown`).
|
|
435
|
+
*/
|
|
436
|
+
export type FieldGrade = "derived" | "exact" | false;
|
|
437
|
+
type Identity = "provider" | "raw" | "ref" | "schemaVersion" | "sourceId" | "workspaceId";
|
|
438
|
+
type FieldOf<Name extends RecordName> = Exclude<keyof z.infer<(typeof RECORD_SCHEMAS)[Name]>, Identity>;
|
|
439
|
+
/**
|
|
440
|
+
* What an adapter declares: for each record, the fields it derives or never
|
|
441
|
+
* fills, or `false` for a record it never returns.
|
|
442
|
+
*/
|
|
443
|
+
export type FieldDeclaration = {
|
|
444
|
+
readonly [Name in RecordName]?: false | {
|
|
445
|
+
readonly [Field in FieldOf<Name>]?: "derived" | false;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
/** Every field of every record, with its grade. */
|
|
449
|
+
export type FieldCoverage = {
|
|
450
|
+
readonly [Name in RecordName]: Readonly<Record<string, FieldGrade>>;
|
|
451
|
+
};
|
|
452
|
+
export declare const RECORD_NAMES: RecordName[];
|
|
453
|
+
/** The fields of a record that an adapter maps, in the schema's order. */
|
|
454
|
+
export declare const fieldsOf: (name: RecordName) => string[];
|
|
455
|
+
/** The full coverage behind a declaration. Saying nothing means `exact`. */
|
|
456
|
+
export declare const resolveFields: (declared?: FieldDeclaration) => FieldCoverage;
|
|
457
|
+
/**
|
|
458
|
+
* The coverage of several adapters read as one: a field is filled when any
|
|
459
|
+
* of them fills it, and `exact` when any of them reads it from its vendor.
|
|
460
|
+
*/
|
|
461
|
+
export declare const mergeFields: (coverages: readonly FieldCoverage[]) => FieldCoverage;
|
|
462
|
+
export {};
|
package/dist/internal/json.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export declare const field: (value: Json | undefined, key: string) => Json | und
|
|
|
13
13
|
export declare const text: (value: Json | undefined) => string | null;
|
|
14
14
|
/** A finite number, or `null`. Numeric strings are parsed. */
|
|
15
15
|
export declare const count: (value: Json | undefined) => number | null;
|
|
16
|
+
/** A first and a last name as one, or `null` when the vendor gave neither. */
|
|
17
|
+
export declare const fullName: (first: Json | undefined, last: Json | undefined) => string | null;
|
|
16
18
|
export declare const flag: (value: Json | undefined) => boolean | null;
|
|
17
19
|
export declare const list: (value: Json | undefined) => Json[];
|
|
18
20
|
export declare const objects: (value: Json | undefined) => JsonObject[];
|
|
@@ -38,3 +40,10 @@ export declare const toJson: <Value>(value: Value) => Json;
|
|
|
38
40
|
* key is. Used so an input that would be ignored is refused instead.
|
|
39
41
|
*/
|
|
40
42
|
export declare const unknownKey: (known: readonly string[], input: Json | undefined) => string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* A copy of `value` without any key that matches `secret`, at any depth. A
|
|
45
|
+
* vendor payload kept on a record's `raw` can carry a mailbox password, a
|
|
46
|
+
* webhook's signing secret or the headers it sends, and none of them belongs
|
|
47
|
+
* in a record a caller logs or stores.
|
|
48
|
+
*/
|
|
49
|
+
export declare const withoutKeys: (value: Json, secret: RegExp) => Json;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Adapter } from "./adapter.ts";
|
|
2
|
+
import type { Lead } from "./entities.ts";
|
|
3
|
+
import type { FieldDeclaration } from "./fields.ts";
|
|
4
|
+
declare const MAPPABLE: readonly ["company", "companyLinkedinUrl", "linkedinUrl", "location", "phone", "title", "website"];
|
|
5
|
+
type Mappable = (typeof MAPPABLE)[number];
|
|
6
|
+
/**
|
|
7
|
+
* A lead field and the name of the custom field that holds it, for example
|
|
8
|
+
* `{ title: "job_title" }`. The name is matched exactly.
|
|
9
|
+
*/
|
|
10
|
+
export type LeadFieldMap = Readonly<Partial<Record<Mappable, string>>>;
|
|
11
|
+
/** `lead` with each mapped field the vendor left empty read from `custom`. */
|
|
12
|
+
export declare const fillFromCustom: (lead: Lead, map: LeadFieldMap) => Lead;
|
|
13
|
+
type LeadReaders = Pick<Adapter, "getLead" | "listLeads">;
|
|
14
|
+
/** The adapter's lead reads, with the mapped fields filled on every lead. */
|
|
15
|
+
export declare const withLeadFields: <Readers extends LeadReaders>(readers: Readers, map: LeadFieldMap | undefined) => Readers;
|
|
16
|
+
/**
|
|
17
|
+
* The adapter's field declaration once a map is given: a field it never
|
|
18
|
+
* filled is now worked out from a custom field, so it is `derived`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const withMappedFields: (declared: FieldDeclaration, map: LeadFieldMap | undefined) => FieldDeclaration;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Lead, LeadProgress } from "./entities.ts";
|
|
2
|
+
export interface LeadOutcome {
|
|
3
|
+
/** `true` once the lead replied. `null` when the vendor does not say. */
|
|
4
|
+
readonly replied: boolean | null;
|
|
5
|
+
readonly bounced: boolean | null;
|
|
6
|
+
readonly unsubscribed: boolean | null;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The four status fields of a lead. `status` is the outcome when one is
|
|
10
|
+
* known, in the order unsubscribed, bounced, replied, and the progress
|
|
11
|
+
* otherwise.
|
|
12
|
+
*/
|
|
13
|
+
export declare const leadStanding: (progress: LeadProgress, outcome: LeadOutcome) => Pick<Lead, "bounced" | "progress" | "replied" | "status" | "unsubscribed">;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { MetricRow } from "./entities.ts";
|
|
1
|
+
import type { MetricRow, MetricScope } from "./entities.ts";
|
|
2
|
+
import type { Identity } from "./record.ts";
|
|
2
3
|
export interface MetricDefinition {
|
|
3
4
|
readonly name: string;
|
|
4
5
|
readonly description: string;
|
|
@@ -39,7 +40,7 @@ export interface Rate {
|
|
|
39
40
|
}
|
|
40
41
|
/** Computes every rate for one row of counts. */
|
|
41
42
|
export declare const computeRates: (row: MetricRow) => Record<MetricName, Rate>;
|
|
42
|
-
declare const COUNT_KEYS: readonly ["bounced", "clicked", "connectionsAccepted", "connectionsSent", "contacted", "delivered", "inmailsSent", "opened", "openedTotal", "positive", "replied", "repliedAuto", "sent", "unsubscribed"];
|
|
43
|
+
declare const COUNT_KEYS: readonly ["bounced", "clicked", "clickedTotal", "connectionsAccepted", "connectionsSent", "contacted", "delivered", "inmailsSent", "opened", "openedTotal", "positive", "replied", "repliedAuto", "sent", "unsubscribed"];
|
|
43
44
|
export type MetricCounts = Pick<MetricRow, (typeof COUNT_KEYS)[number]>;
|
|
44
45
|
/** A row of counts with every value unknown. */
|
|
45
46
|
export declare const emptyCounts: () => MetricCounts;
|
|
@@ -49,4 +50,15 @@ export declare const emptyCounts: () => MetricCounts;
|
|
|
49
50
|
* are summed, which over-counts people who appear in more than one row.
|
|
50
51
|
*/
|
|
51
52
|
export declare const sumCounts: (rows: readonly MetricCounts[]) => MetricCounts;
|
|
53
|
+
/** What a row of counts is for: a workspace, a campaign, a step or a sender. */
|
|
54
|
+
export interface RowScope extends Identity {
|
|
55
|
+
readonly scope: MetricScope;
|
|
56
|
+
readonly scopeId: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* One `MetricRow` from the counts an adapter read. A total with nothing else
|
|
60
|
+
* to say needs only the scope and the counts; a daily, step or derived row
|
|
61
|
+
* says so in `extra`.
|
|
62
|
+
*/
|
|
63
|
+
export declare const metricRow: (scope: RowScope, counts: MetricCounts, extra?: Partial<Pick<MetricRow, "date" | "evidence" | "stepIndex" | "timezone" | "variantKey">>) => MetricRow;
|
|
52
64
|
export {};
|
|
@@ -34,6 +34,21 @@ export type NativeCatalog = Readonly<Record<string, NativeRead>>;
|
|
|
34
34
|
export type NoNative = Record<never, never>;
|
|
35
35
|
/** Keeps each read's name and parameters as literal types. */
|
|
36
36
|
export declare const defineNative: <const Catalog extends NativeCatalog>(catalog: Catalog) => Catalog;
|
|
37
|
+
/** A parameter and where it goes. Exported so a catalog's type can be named. */
|
|
38
|
+
export interface PlacedParam<Place extends NativeParam["in"], Type extends NativeParam["type"]> {
|
|
39
|
+
readonly description: string;
|
|
40
|
+
readonly in: Place;
|
|
41
|
+
readonly type: Type;
|
|
42
|
+
}
|
|
43
|
+
export interface NeededParam<Place extends NativeParam["in"], Type extends NativeParam["type"]> extends PlacedParam<Place, Type> {
|
|
44
|
+
readonly required: true;
|
|
45
|
+
}
|
|
46
|
+
export declare const inQuery: <const Type extends NativeParam["type"]>(type: Type, description: string) => PlacedParam<"query", Type>;
|
|
47
|
+
export declare const inQueryRequired: <const Type extends NativeParam["type"]>(type: Type, description: string) => NeededParam<"query", Type>;
|
|
48
|
+
export declare const inBody: <const Type extends NativeParam["type"]>(type: Type, description: string) => PlacedParam<"body", Type>;
|
|
49
|
+
export declare const inBodyRequired: <const Type extends NativeParam["type"]>(type: Type, description: string) => NeededParam<"body", Type>;
|
|
50
|
+
/** A path parameter. Ids are strings in the SDK, whatever the vendor uses. */
|
|
51
|
+
export declare const inPath: (description: string) => PlacedParam<"path", "string">;
|
|
37
52
|
interface ValueTypes {
|
|
38
53
|
readonly boolean: boolean;
|
|
39
54
|
readonly json: Json;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { TimeRange } from "../adapter.ts";
|
|
2
2
|
import type { Capabilities } from "../capabilities.ts";
|
|
3
3
|
import type { LimitsSnapshot, OperationOptions } from "../engine/engine.ts";
|
|
4
|
-
import type { BlockEntry, CampaignSettings, LeadList, SenderHealth, Tag, WebhookSubscription } from "../entities-account.ts";
|
|
4
|
+
import type { BlockEntry, CampaignProgress, CampaignSettings, LeadList, PlacementTest, SenderHealth, Tag, WebhookSubscription } from "../entities-account.ts";
|
|
5
5
|
import type { Campaign, CampaignStatus, Evidence, Lead, Message, MetricRow, MetricScope, Reply, ReplyCategory, Sender, Sequence, Workspace } from "../entities.ts";
|
|
6
6
|
import type { OutboundError } from "../errors.ts";
|
|
7
|
+
import type { FieldCoverage } from "../fields.ts";
|
|
7
8
|
import type { Json } from "../json.ts";
|
|
8
9
|
import type { NativeCatalog, NativeParamsOf, NeedsParams, NoNative } from "../native.ts";
|
|
9
10
|
export interface ResultMeta {
|
|
@@ -85,6 +86,8 @@ export interface Collection<Item, Filters> extends ReadCollection<Item, Filters>
|
|
|
85
86
|
export type Include = "body";
|
|
86
87
|
export interface CampaignFilters {
|
|
87
88
|
readonly status?: CampaignStatus | undefined;
|
|
89
|
+
/** Only the campaigns this sender is attached to. */
|
|
90
|
+
readonly senderId?: string | undefined;
|
|
88
91
|
}
|
|
89
92
|
export interface SenderFilters {
|
|
90
93
|
readonly campaignId?: string | undefined;
|
|
@@ -111,6 +114,8 @@ export interface MessageFilters extends TimeRange {
|
|
|
111
114
|
export interface ReplyFilters extends TimeRange {
|
|
112
115
|
readonly campaignId?: string | undefined;
|
|
113
116
|
readonly category?: ReplyCategory | undefined;
|
|
117
|
+
/** `true` for unread replies only, `false` for read ones only. */
|
|
118
|
+
readonly unread?: boolean | undefined;
|
|
114
119
|
readonly include?: readonly Include[] | undefined;
|
|
115
120
|
}
|
|
116
121
|
export interface StatsOptions extends OperationOptions {
|
|
@@ -123,7 +128,10 @@ export interface StatsOptions extends OperationOptions {
|
|
|
123
128
|
}
|
|
124
129
|
export interface TopLevelStatsOptions extends StatsOptions {
|
|
125
130
|
readonly scope?: MetricScope | undefined;
|
|
126
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* The campaign or sender, for the `campaign`, `step` and `sender` scopes.
|
|
133
|
+
* The `campaign` scope without one returns a row per campaign, in one call.
|
|
134
|
+
*/
|
|
127
135
|
readonly scopeId?: string | undefined;
|
|
128
136
|
}
|
|
129
137
|
export interface StatsResult {
|
|
@@ -137,6 +145,8 @@ export interface CampaignHandle {
|
|
|
137
145
|
readonly sequence: (options?: OperationOptions) => Promise<WithMeta<Sequence>>;
|
|
138
146
|
/** The schedule, daily caps, tracking and stop rules. */
|
|
139
147
|
readonly settings: (options?: OperationOptions) => Promise<WithMeta<CampaignSettings>>;
|
|
148
|
+
/** How many of the campaign's leads are waiting, in progress, finished or stopped. */
|
|
149
|
+
readonly progress: (options?: OperationOptions) => Promise<WithMeta<CampaignProgress>>;
|
|
140
150
|
/** The follow-up sequences attached to the campaign. */
|
|
141
151
|
readonly subsequences: ReadCollection<Sequence, Record<never, never>>;
|
|
142
152
|
readonly webhooks: ReadCollection<WebhookSubscription, Record<never, never>>;
|
|
@@ -152,6 +162,8 @@ export interface CampaignHandle {
|
|
|
152
162
|
export interface SenderHandle {
|
|
153
163
|
readonly id: string;
|
|
154
164
|
readonly get: (options?: OperationOptions) => Promise<WithMeta<Sender>>;
|
|
165
|
+
/** The campaigns the sender is attached to. */
|
|
166
|
+
readonly campaigns: ReadCollection<Campaign, Scoped<CampaignFilters, "senderId">>;
|
|
155
167
|
readonly stats: (options?: StatsOptions) => Promise<StatsResult>;
|
|
156
168
|
readonly warmup: (options?: OperationOptions) => Promise<NonNullable<Sender["warmup"]>>;
|
|
157
169
|
/** DNS records, connection state and warmup traffic. */
|
|
@@ -159,6 +171,7 @@ export interface SenderHandle {
|
|
|
159
171
|
}
|
|
160
172
|
export interface ListHandle {
|
|
161
173
|
readonly id: string;
|
|
174
|
+
readonly get: (options?: OperationOptions) => Promise<WithMeta<LeadList>>;
|
|
162
175
|
readonly leads: ReadCollection<Lead, Scoped<LeadFilters, "campaignId" | "listId">>;
|
|
163
176
|
}
|
|
164
177
|
export interface ThreadHandle {
|
|
@@ -229,10 +242,20 @@ export interface OutboundApi {
|
|
|
229
242
|
readonly workspaceId: string;
|
|
230
243
|
/** What this instance can do, after plugins narrowed it. */
|
|
231
244
|
readonly capabilities: Capabilities;
|
|
245
|
+
/** The plugins on this instance, outermost first. */
|
|
246
|
+
readonly plugins: readonly {
|
|
247
|
+
readonly name: string;
|
|
248
|
+
}[];
|
|
232
249
|
/** How far the adapter has been verified. */
|
|
233
250
|
readonly maturity: "beta" | "stable" | "unverified";
|
|
234
251
|
/** What the adapter assumes and has not confirmed against the live API. */
|
|
235
252
|
readonly caveats: readonly string[];
|
|
253
|
+
/**
|
|
254
|
+
* Which fields of each record this adapter fills: `exact` from the vendor,
|
|
255
|
+
* `derived` by the adapter, or `false` when a `null` means the vendor has no
|
|
256
|
+
* such field.
|
|
257
|
+
*/
|
|
258
|
+
readonly fields: FieldCoverage;
|
|
236
259
|
readonly campaigns: Collection<Campaign, CampaignFilters>;
|
|
237
260
|
readonly senders: Collection<Sender, SenderFilters>;
|
|
238
261
|
readonly leads: Collection<Lead, LeadFilters>;
|
|
@@ -240,12 +263,14 @@ export interface OutboundApi {
|
|
|
240
263
|
readonly replies: ReadCollection<Reply, ReplyFilters>;
|
|
241
264
|
readonly workspaces: ReadCollection<Workspace, Record<never, never>>;
|
|
242
265
|
/** Saved lead lists. */
|
|
243
|
-
readonly lists:
|
|
266
|
+
readonly lists: Collection<LeadList, Record<never, never>>;
|
|
244
267
|
/** The addresses, domains and profiles the account never contacts. */
|
|
245
268
|
readonly blocklist: ReadCollection<BlockEntry, Record<never, never>>;
|
|
246
269
|
readonly tags: ReadCollection<Tag, Record<never, never>>;
|
|
270
|
+
/** The inbox placement tests the account has set up. Their results are native reads. */
|
|
271
|
+
readonly placementTests: ReadCollection<PlacementTest, Record<never, never>>;
|
|
247
272
|
/** The webhooks registered with the vendor. */
|
|
248
|
-
readonly webhooks:
|
|
273
|
+
readonly webhooks: Collection<WebhookSubscription, WebhookFilters>;
|
|
249
274
|
readonly raw: RawClient;
|
|
250
275
|
/** The vendor's own reads, by name, for what has no normalized form. */
|
|
251
276
|
readonly native: NativeClient;
|