outbound-sdk 0.11.0 → 0.12.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.
Files changed (81) hide show
  1. package/dist/alerts/index.js +1 -1
  2. package/dist/cards/index.js +201 -92
  3. package/dist/cards/sender-tool-cards.d.ts +6 -0
  4. package/dist/chunks/{chunk-MEEJIIIA.js → chunk-2ADIGC2N.js} +77 -8
  5. package/dist/chunks/{chunk-V7JKTNRO.js → chunk-3DDYXUDG.js} +1 -1
  6. package/dist/chunks/{chunk-UAHYPASH.js → chunk-3LRIWQEJ.js} +2 -1
  7. package/dist/chunks/{chunk-UZLFZZ2U.js → chunk-AWNH4I5D.js} +11 -2
  8. package/dist/chunks/{chunk-A7DLJUA6.js → chunk-B72F56HF.js} +3 -1
  9. package/dist/chunks/{chunk-KMQHXFIZ.js → chunk-CTRYCW4G.js} +648 -182
  10. package/dist/chunks/{chunk-OVTYA3IB.js → chunk-HDTOGEVN.js} +532 -182
  11. package/dist/chunks/{chunk-POBAY3TI.js → chunk-HXCZMMSD.js} +21 -0
  12. package/dist/chunks/chunk-I7GBBHD2.js +80 -0
  13. package/dist/chunks/{chunk-FTK4JS65.js → chunk-KNWJIJVO.js} +73 -4
  14. package/dist/chunks/{chunk-UOJG4VYF.js → chunk-LD5OAELW.js} +1 -1
  15. package/dist/chunks/{chunk-YFJ3OQZS.js → chunk-OPLXELPS.js} +5 -1
  16. package/dist/chunks/{chunk-CVLGFVDC.js → chunk-UIINRLHQ.js} +11 -7
  17. package/dist/chunks/{chunk-OMCDMELK.js → chunk-UWNQEQIX.js} +1 -1
  18. package/dist/chunks/{chunk-MPE6VLLY.js → chunk-UZ4YWUZ7.js} +1 -1
  19. package/dist/chunks/{tools-AVJ3XJ5A.js → tools-EKLZKXZU.js} +5 -4
  20. package/dist/cli/bin.js +11 -10
  21. package/dist/cli/index.js +10 -9
  22. package/dist/combine/index.js +36 -2
  23. package/dist/emailbison/index.js +4 -4
  24. package/dist/fixtures/index.js +4 -4
  25. package/dist/heyreach/index.js +14 -6
  26. package/dist/identity/index.js +46 -11
  27. package/dist/identity/keys.d.ts +1 -1
  28. package/dist/index.js +8 -6
  29. package/dist/insights/define.d.ts +1 -1
  30. package/dist/insights/index.js +5 -4
  31. package/dist/insights/inputs.generated.d.ts +68 -5
  32. package/dist/insights/ops/channel-mix.d.ts +8 -1
  33. package/dist/insights/ops/period-comparison.d.ts +13 -2
  34. package/dist/insights/ops/shared.d.ts +11 -1
  35. package/dist/insights/ops/tag-rollup.d.ts +8 -1
  36. package/dist/insights/people/dropped-replies-check.d.ts +14 -2
  37. package/dist/insights/people/find.d.ts +5 -4
  38. package/dist/insights/people/hot-leads.d.ts +10 -1
  39. package/dist/insights/people/index.d.ts +26 -2
  40. package/dist/insights/people/person-summary.d.ts +15 -3
  41. package/dist/insights/people/thread-context.d.ts +79 -0
  42. package/dist/insights/people/thread-contexts.d.ts +59 -0
  43. package/dist/insights/people/thread-read.d.ts +22 -0
  44. package/dist/insights/registry.d.ts +25 -3
  45. package/dist/insights/senders/domain-health.d.ts +1 -1
  46. package/dist/insights/senders/index.d.ts +1 -1
  47. package/dist/insights/senders/read.d.ts +9 -0
  48. package/dist/instantly/adapter.d.ts +3 -2
  49. package/dist/instantly/capabilities.d.ts +5 -0
  50. package/dist/instantly/index.js +148 -45
  51. package/dist/instantly/senders.d.ts +3 -0
  52. package/dist/internal/adapter.d.ts +7 -0
  53. package/dist/internal/capabilities.d.ts +8 -0
  54. package/dist/internal/entities.d.ts +20 -0
  55. package/dist/internal/fields.d.ts +8 -0
  56. package/dist/internal/outbound/api.d.ts +12 -0
  57. package/dist/internal/outbound/operations-account.d.ts +4 -1
  58. package/dist/internal/outbound/outbound.d.ts +2 -1
  59. package/dist/internal/outbound/specs-account.d.ts +2 -1
  60. package/dist/internal/person.d.ts +32 -0
  61. package/dist/internal/records.d.ts +2 -2
  62. package/dist/internal/url.d.ts +2 -1
  63. package/dist/loader/index.js +1 -1
  64. package/dist/memory/data.d.ts +2 -1
  65. package/dist/memory/index.js +6 -4
  66. package/dist/redact/index.js +3 -3
  67. package/dist/smartlead/index.js +18 -7
  68. package/dist/tools/account-tools.d.ts +0 -5
  69. package/dist/tools/ai-sdk.js +5 -3
  70. package/dist/tools/campaign-tools.d.ts +0 -4
  71. package/dist/tools/claude-agent.js +5 -3
  72. package/dist/tools/deliverability-check.d.ts +9 -0
  73. package/dist/tools/index.js +6 -4
  74. package/dist/tools/people-tools.d.ts +4 -1
  75. package/dist/tools/person-input.d.ts +17 -0
  76. package/dist/tools/sender-health.d.ts +8 -0
  77. package/dist/tools/sender-impact.d.ts +38 -0
  78. package/dist/tools/shared.d.ts +5 -0
  79. package/dist/webhooks/index.js +6 -6
  80. package/package.json +1 -1
  81. /package/dist/chunks/{chunk-5XLR6XVV.js → chunk-TOZKA7JR.js} +0 -0
@@ -23,6 +23,8 @@ export interface Capabilities {
23
23
  "senders.warmup": boolean;
24
24
  /** DNS records, connection state and warmup traffic for one sender. */
25
25
  "senders.health": boolean;
26
+ /** The same health for every sender, a page at a time, in a few requests a page instead of a few per sender. */
27
+ "senders.healthList": boolean;
26
28
  /** List every lead on the credential, across campaigns. */
27
29
  "leads.list": boolean;
28
30
  "leads.get": boolean;
@@ -81,6 +83,12 @@ export interface Capabilities {
81
83
  "stats.byDay": StatGrade;
82
84
  "stats.byStep": StatGrade;
83
85
  "stats.bySender": StatGrade;
86
+ /**
87
+ * Several senders in one read: `stats({ scope: "sender", scopeIds })`,
88
+ * a row per sender (and day) in a few requests instead of a few per sender.
89
+ * Graded like `stats.bySender`.
90
+ */
91
+ "stats.bySenders": StatGrade;
84
92
  workspaces: boolean;
85
93
  /** The addresses, domains and profiles the account never contacts. */
86
94
  blocklist: boolean;
@@ -113,6 +113,18 @@ export declare const recipientMailProviderSchema: z.ZodEnum<{
113
113
  other: "other";
114
114
  }>;
115
115
  export type RecipientMailProvider = z.infer<typeof recipientMailProviderSchema>;
116
+ /**
117
+ * Where a lead's meeting stands, as the vendor records it on the lead:
118
+ * `booked`, `completed`, `no_show` (booked and missed) or `won` (the deal
119
+ * closed, so the meeting happened).
120
+ */
121
+ export declare const meetingStatusSchema: z.ZodEnum<{
122
+ completed: "completed";
123
+ booked: "booked";
124
+ no_show: "no_show";
125
+ won: "won";
126
+ }>;
127
+ export type MeetingStatus = z.infer<typeof meetingStatusSchema>;
116
128
  export declare const senderSchema: z.ZodObject<{
117
129
  address: z.ZodNullable<z.ZodString>;
118
130
  dailyLimit: z.ZodNullable<z.ZodNumber>;
@@ -216,6 +228,12 @@ export declare const leadSchema: z.ZodObject<{
216
228
  }>>;
217
229
  lastName: z.ZodNullable<z.ZodString>;
218
230
  linkedinUrl: z.ZodNullable<z.ZodString>;
231
+ meeting: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
232
+ completed: "completed";
233
+ booked: "booked";
234
+ no_show: "no_show";
235
+ won: "won";
236
+ }>>>;
219
237
  location: z.ZodNullable<z.ZodString>;
220
238
  phone: z.ZodNullable<z.ZodString>;
221
239
  progress: z.ZodEnum<{
@@ -282,6 +300,7 @@ export declare const messageSchema: z.ZodObject<{
282
300
  stepIndex: z.ZodNullable<z.ZodNumber>;
283
301
  subject: z.ZodNullable<z.ZodString>;
284
302
  threadId: z.ZodNullable<z.ZodString>;
303
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
285
304
  variantKey: z.ZodNullable<z.ZodString>;
286
305
  provider: z.ZodString;
287
306
  raw: z.ZodJSONSchema;
@@ -331,6 +350,7 @@ export declare const replySchema: z.ZodObject<{
331
350
  stepIndex: z.ZodNullable<z.ZodNumber>;
332
351
  subject: z.ZodNullable<z.ZodString>;
333
352
  threadId: z.ZodNullable<z.ZodString>;
353
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
334
354
  variantKey: z.ZodNullable<z.ZodString>;
335
355
  provider: z.ZodString;
336
356
  raw: z.ZodJSONSchema;
@@ -117,6 +117,12 @@ export declare const RECORD_SCHEMAS: {
117
117
  }>>;
118
118
  lastName: z.ZodNullable<z.ZodString>;
119
119
  linkedinUrl: z.ZodNullable<z.ZodString>;
120
+ meeting: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
121
+ completed: "completed";
122
+ booked: "booked";
123
+ no_show: "no_show";
124
+ won: "won";
125
+ }>>>;
120
126
  location: z.ZodNullable<z.ZodString>;
121
127
  phone: z.ZodNullable<z.ZodString>;
122
128
  progress: z.ZodEnum<{
@@ -191,6 +197,7 @@ export declare const RECORD_SCHEMAS: {
191
197
  stepIndex: z.ZodNullable<z.ZodNumber>;
192
198
  subject: z.ZodNullable<z.ZodString>;
193
199
  threadId: z.ZodNullable<z.ZodString>;
200
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
194
201
  variantKey: z.ZodNullable<z.ZodString>;
195
202
  provider: z.ZodString;
196
203
  raw: z.ZodJSONSchema;
@@ -314,6 +321,7 @@ export declare const RECORD_SCHEMAS: {
314
321
  stepIndex: z.ZodNullable<z.ZodNumber>;
315
322
  subject: z.ZodNullable<z.ZodString>;
316
323
  threadId: z.ZodNullable<z.ZodString>;
324
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
317
325
  variantKey: z.ZodNullable<z.ZodString>;
318
326
  provider: z.ZodString;
319
327
  raw: z.ZodJSONSchema;
@@ -151,6 +151,12 @@ export interface TopLevelStatsOptions extends StatsOptions {
151
151
  * The `campaign` scope without one returns a row per campaign, in one call.
152
152
  */
153
153
  readonly scopeId?: string | undefined;
154
+ /**
155
+ * Several senders in one read, for the `sender` scope in place of
156
+ * `scopeId`. Each row's `scopeRef` says which sender it is; a sender the
157
+ * vendor has no rows for has none. Needs `stats.bySenders`.
158
+ */
159
+ readonly scopeIds?: readonly string[] | undefined;
154
160
  }
155
161
  export interface StatsResult {
156
162
  readonly rows: readonly MetricRow[];
@@ -276,6 +282,12 @@ export interface OutboundApi {
276
282
  readonly fields: FieldCoverage;
277
283
  readonly campaigns: Collection<Campaign, CampaignFilters>;
278
284
  readonly senders: Collection<Sender, SenderFilters>;
285
+ /**
286
+ * Every sender's health, listed like `senders`: DNS records, connection
287
+ * state and warmup traffic in a few requests a page, where one sender's
288
+ * `health()` costs a few requests each. Needs `senders.healthList`.
289
+ */
290
+ readonly senderHealth: ReadCollection<SenderHealth, SenderFilters>;
279
291
  readonly leads: Collection<Lead, LeadFilters>;
280
292
  readonly messages: ReadCollection<Message, MessageFilters>;
281
293
  readonly replies: ReadCollection<Reply, ReplyFilters>;
@@ -1,4 +1,4 @@
1
- import type { PageQuery, SubsequenceQuery, WebhookQuery } from "../adapter.ts";
1
+ import type { PageQuery, SenderQuery, SubsequenceQuery, WebhookQuery } from "../adapter.ts";
2
2
  import type { DispatchTarget, OperationOutput } from "./operation-shared.ts";
3
3
  export type AccountOperation = {
4
4
  readonly kind: "blocklist.list";
@@ -21,6 +21,9 @@ export type AccountOperation = {
21
21
  } | {
22
22
  readonly kind: "senders.health";
23
23
  readonly id: string;
24
+ } | {
25
+ readonly kind: "senders.healthList";
26
+ readonly query: SenderQuery;
24
27
  } | {
25
28
  readonly kind: "sequence.subsequences";
26
29
  readonly query: SubsequenceQuery;
@@ -4,7 +4,7 @@ import { RequestEngine } from "../engine/engine.ts";
4
4
  import type { LimitsSnapshot, OperationOptions } from "../engine/engine.ts";
5
5
  import type { RateLimitStore } from "../engine/rate-store.ts";
6
6
  import type { Runtime } from "../engine/runtime.ts";
7
- import type { BlockEntry, LeadList, PlacementTest, Tag, WebhookSubscription } from "../entities-account.ts";
7
+ import type { BlockEntry, LeadList, PlacementTest, SenderHealth, Tag, WebhookSubscription } from "../entities-account.ts";
8
8
  import type { Campaign, Lead, Message, Reply, Sender, Workspace } from "../entities.ts";
9
9
  import type { FieldCoverage } from "../fields.ts";
10
10
  import type { OutboundHooks } from "../hooks.ts";
@@ -45,6 +45,7 @@ export declare class Outbound<Native extends NativeCatalog = NoNative> implement
45
45
  #private;
46
46
  readonly campaigns: Collection<Campaign, CampaignFilters>;
47
47
  readonly senders: Collection<Sender, SenderFilters>;
48
+ readonly senderHealth: ReadCollection<SenderHealth, SenderFilters>;
48
49
  readonly leads: Collection<Lead, LeadFilters>;
49
50
  readonly messages: ReadCollection<Message, MessageFilters>;
50
51
  readonly replies: ReadCollection<Reply, ReplyFilters>;
@@ -1,12 +1,13 @@
1
1
  import type { BlockEntry, CampaignProgress, CampaignSettings, LeadList, PlacementTest, SenderHealth, Tag, WebhookSubscription } from "../entities-account.ts";
2
2
  import type { Sequence } from "../entities.ts";
3
- import type { WebhookFilters } from "./api.ts";
3
+ import type { SenderFilters, WebhookFilters } from "./api.ts";
4
4
  import type { GetSpec, ListSpec } from "./collections.ts";
5
5
  import type { Core } from "./core.ts";
6
6
  type NoFilters = Record<never, never>;
7
7
  export declare const settingsGet: (core: Core) => GetSpec<CampaignSettings>;
8
8
  export declare const progressGet: (core: Core) => GetSpec<CampaignProgress>;
9
9
  export declare const healthGet: (core: Core) => GetSpec<SenderHealth>;
10
+ export declare const healthList: (core: Core) => ListSpec<SenderHealth, SenderFilters>;
10
11
  export declare const subsequenceList: (core: Core) => ListSpec<Sequence, {
11
12
  readonly campaignId?: string | undefined;
12
13
  }>;
@@ -0,0 +1,32 @@
1
+ import type { OutboundApi } from "./outbound/api.ts";
2
+ import type { RefParts } from "./ref.ts";
3
+ /** What a person input accepts, for the messages that refuse one. */
4
+ export declare const PERSON_FORMS = "an email address, a LinkedIn profile URL or a lead ref as another tool returned it (provider:workspace:id)";
5
+ /** The provider, workspace and vendor id of a lead ref, or `null` when the text is not one. */
6
+ export declare const leadRefParts: (identifier: string) => RefParts | null;
7
+ /** `email:<address>` or `linkedin:<slug>`, or `null` when the text is neither, a lead ref included. */
8
+ export declare const personKey: (identifier: string) => string | null;
9
+ /** Why the text names no person. */
10
+ export declare const notAPerson: (identifier: string) => string;
11
+ export interface PersonInput {
12
+ /**
13
+ * The identifier to look the person up by. For a lead ref, the one its
14
+ * vendor id already is (an Instantly reply's ref holds the address, a
15
+ * HeyReach ref the profile URL); `null` when the lead must be read for it.
16
+ */
17
+ readonly key: string | null;
18
+ /** Set when the input is a lead ref. */
19
+ readonly ref: (RefParts & {
20
+ readonly text: string;
21
+ }) | null;
22
+ }
23
+ /** Reads a person input, or throws `Invalid` saying what is accepted. */
24
+ export declare const parsePerson: (identifier: string, provider: string) => PersonInput;
25
+ type Instance = Pick<OutboundApi, "provider" | "workspace" | "workspaceId">;
26
+ /**
27
+ * Refuses, before any request, a lead ref of a tool or workspace this
28
+ * instance does not read. On a combined instance the ref's provider and
29
+ * workspace name the member that reads it.
30
+ */
31
+ export declare const assertRefReadable: (outbound: Instance, ref: NonNullable<PersonInput["ref"]>) => void;
32
+ export {};
@@ -1,5 +1,5 @@
1
- export { campaignSchema, campaignStatusSchema, channelSchema, eventDataSchema, eventTypeSchema, evidenceSchema, leadProgressSchema, leadSchema, leadStatusSchema, mailProviderSchema, messageSchema, metricRowSchema, metricScopeSchema, outboundEventSchema, recipientMailProviderSchema, replyCategorySchema, replySchema, SCHEMA_VERSION, senderSchema, senderStatusSchema, sequenceSchema, workspaceSchema, } from "./entities.ts";
2
- export type { Campaign, CampaignStatus, Channel, EventData, EventType, Evidence, Lead, LeadEngagement, LeadProgress, LeadStatus, MailProvider, Message, MetricRow, MetricScope, OutboundEvent, RecipientMailProvider, Reply, ReplyCategory, Sender, SenderStatus, Sequence, SequenceStep, SequenceVariant, Workspace, } from "./entities.ts";
1
+ export { campaignSchema, campaignStatusSchema, channelSchema, eventDataSchema, eventTypeSchema, evidenceSchema, leadProgressSchema, leadSchema, leadStatusSchema, mailProviderSchema, meetingStatusSchema, messageSchema, metricRowSchema, metricScopeSchema, outboundEventSchema, recipientMailProviderSchema, replyCategorySchema, replySchema, SCHEMA_VERSION, senderSchema, senderStatusSchema, sequenceSchema, workspaceSchema, } from "./entities.ts";
2
+ export type { Campaign, CampaignStatus, Channel, EventData, EventType, Evidence, Lead, LeadEngagement, LeadProgress, LeadStatus, MailProvider, MeetingStatus, Message, MetricRow, MetricScope, OutboundEvent, RecipientMailProvider, Reply, ReplyCategory, Sender, SenderStatus, Sequence, SequenceStep, SequenceVariant, Workspace, } from "./entities.ts";
3
3
  export { blockEntrySchema, campaignProgressSchema, campaignSettingsSchema, leadListSchema, placementTestSchema, senderHealthSchema, tagSchema, webhookSubscriptionSchema, } from "./entities-account.ts";
4
4
  export type { BlockEntry, CampaignProgress, CampaignSettings, Entity, LeadList, PlacementTest, SenderHealth, SendingWindow, Tag, WebhookSubscription, } from "./entities-account.ts";
5
5
  export { resolveFields } from "./fields.ts";
@@ -1,4 +1,5 @@
1
- export type QueryValue = string | number | boolean | null | undefined;
1
+ /** A list is sent as the key repeated, once per item. */
2
+ export type QueryValue = string | number | boolean | readonly string[] | null | undefined;
2
3
  /** Joins a base URL and a path and appends the defined query values. */
3
4
  export declare const buildUrl: (baseUrl: string, path: string, query?: Readonly<Record<string, QueryValue>>) => string;
4
5
  /**
@@ -3,7 +3,7 @@ import {
3
3
  configuredProviders,
4
4
  fromEnv,
5
5
  loadableProviders
6
- } from "../chunks/chunk-5XLR6XVV.js";
6
+ } from "../chunks/chunk-TOZKA7JR.js";
7
7
  import "../chunks/chunk-NFWWA7MI.js";
8
8
  import "../chunks/chunk-XYHM4KHC.js";
9
9
  import "../chunks/chunk-45TXPJW7.js";
@@ -1,4 +1,4 @@
1
- import type { Campaign, CampaignStatus, Channel, Lead, LeadEngagement, LeadProgress, LeadStatus, MailProvider, Message, MetricRow, RecipientMailProvider, Reply, ReplyCategory, Sender, SenderStatus, Sequence } from "../internal/entities.ts";
1
+ import type { Campaign, CampaignStatus, Channel, Lead, LeadEngagement, LeadProgress, LeadStatus, MailProvider, Message, MetricRow, MeetingStatus, RecipientMailProvider, Reply, ReplyCategory, Sender, SenderStatus, Sequence } from "../internal/entities.ts";
2
2
  import type { MetricCounts } from "../internal/metrics.ts";
3
3
  import type { Identity } from "../internal/record.ts";
4
4
  import type { MemoryBlockEntry, MemoryHealth, MemoryList, MemoryPlacementTest, MemorySettings, MemoryTag, MemoryWebhook } from "./account.ts";
@@ -72,6 +72,7 @@ export interface MemoryLead {
72
72
  readonly companyLinkedinUrl?: string;
73
73
  readonly recipientMailProvider?: RecipientMailProvider;
74
74
  readonly location?: string;
75
+ readonly meeting?: MeetingStatus;
75
76
  readonly phone?: string;
76
77
  readonly website?: string;
77
78
  readonly tags?: readonly string[];
@@ -5,7 +5,7 @@ import {
5
5
  } from "../chunks/chunk-U5AK6OJM.js";
6
6
  import {
7
7
  leadProgressSchema
8
- } from "../chunks/chunk-POBAY3TI.js";
8
+ } from "../chunks/chunk-HXCZMMSD.js";
9
9
  import {
10
10
  emptyCounts,
11
11
  sumCounts
@@ -13,13 +13,13 @@ import {
13
13
  import {
14
14
  SCHEMA_VERSION
15
15
  } from "../chunks/chunk-QGRZDTX4.js";
16
+ import {
17
+ profileSlug
18
+ } from "../chunks/chunk-OPLXELPS.js";
16
19
  import {
17
20
  assertWorkspaceId,
18
21
  makeRef
19
22
  } from "../chunks/chunk-HXB2IOJJ.js";
20
- import {
21
- profileSlug
22
- } from "../chunks/chunk-YFJ3OQZS.js";
23
23
  import {
24
24
  stableId
25
25
  } from "../chunks/chunk-KVAG5GM2.js";
@@ -212,6 +212,7 @@ var toLead = (identity, seed) => ({
212
212
  lastName: seed.lastName ?? null,
213
213
  linkedinUrl: seed.linkedinUrl ?? null,
214
214
  location: seed.location ?? null,
215
+ meeting: seed.meeting ?? null,
215
216
  phone: seed.phone ?? null,
216
217
  recipientMailProvider: seed.recipientMailProvider ?? null,
217
218
  title: seed.title ?? null,
@@ -229,6 +230,7 @@ var messageFields = (identity, seed, channel, includeBody) => ({
229
230
  stepIndex: seed.stepIndex ?? null,
230
231
  subject: seed.subject ?? null,
231
232
  threadId: seed.threadId ?? null,
233
+ url: null,
232
234
  variantKey: seed.variantKey ?? null
233
235
  });
234
236
  var toMessage = (identity, seed, channel, includeBody) => {
@@ -1,10 +1,10 @@
1
+ import {
2
+ profileSlug
3
+ } from "../chunks/chunk-OPLXELPS.js";
1
4
  import {
2
5
  makeRef,
3
6
  parseRef
4
7
  } from "../chunks/chunk-HXB2IOJJ.js";
5
- import {
6
- profileSlug
7
- } from "../chunks/chunk-YFJ3OQZS.js";
8
8
  import {
9
9
  hmacSha256Hex,
10
10
  stableId
@@ -13,7 +13,7 @@ import {
13
13
  toWorkspace,
14
14
  unwrap,
15
15
  withoutSecrets
16
- } from "../chunks/chunk-UAHYPASH.js";
16
+ } from "../chunks/chunk-3LRIWQEJ.js";
17
17
  import {
18
18
  applyTracking,
19
19
  ownTracking,
@@ -32,7 +32,7 @@ import {
32
32
  createVendorClient,
33
33
  fromOne,
34
34
  listIn
35
- } from "../chunks/chunk-UOJG4VYF.js";
35
+ } from "../chunks/chunk-LD5OAELW.js";
36
36
  import {
37
37
  normalizeBody
38
38
  } from "../chunks/chunk-FALWG5U3.js";
@@ -50,7 +50,7 @@ import {
50
50
  refTo,
51
51
  refsTo
52
52
  } from "../chunks/chunk-U5AK6OJM.js";
53
- import "../chunks/chunk-POBAY3TI.js";
53
+ import "../chunks/chunk-HXCZMMSD.js";
54
54
  import {
55
55
  emptyCounts,
56
56
  metricRow
@@ -58,10 +58,10 @@ import {
58
58
  import {
59
59
  replyCategorySchema
60
60
  } from "../chunks/chunk-QGRZDTX4.js";
61
+ import "../chunks/chunk-OPLXELPS.js";
61
62
  import {
62
63
  assertWorkspaceId
63
64
  } from "../chunks/chunk-HXB2IOJJ.js";
64
- import "../chunks/chunk-YFJ3OQZS.js";
65
65
  import {
66
66
  stableId
67
67
  } from "../chunks/chunk-KVAG5GM2.js";
@@ -186,11 +186,18 @@ var fields = {
186
186
  lead: {
187
187
  companyLinkedinUrl: false,
188
188
  engagement: false,
189
+ meeting: false,
189
190
  recipientMailProvider: false,
190
191
  title: false
191
192
  },
192
- // A message is not marked automatic; a reply is.
193
- message: { isAuto: false, isAutoSource: false, variantKey: false },
193
+ // A message is not marked automatic; a reply is. No link to one master
194
+ // inbox conversation is documented.
195
+ message: {
196
+ isAuto: false,
197
+ isAutoSource: false,
198
+ url: false,
199
+ variantKey: false
200
+ },
194
201
  metricRow: {
195
202
  completed: false,
196
203
  connectionsAccepted: false,
@@ -218,6 +225,7 @@ var fields = {
218
225
  leftCompany: "derived",
219
226
  // The master inbox does not say which step a reply answers.
220
227
  stepIndex: false,
228
+ url: false,
221
229
  variantKey: false
222
230
  },
223
231
  sender: { linkedinUrl: false },
@@ -308,7 +316,8 @@ var caveats = [
308
316
  "Tags come from GET /email-accounts/tags; whether campaign tags share that list is unconfirmed.",
309
317
  "Webhooks are listed per campaign; without one the adapter walks the campaigns and returns each once. User-level or client-level webhooks may appear under none.",
310
318
  "Placement tests are read from SmartDelivery (smartdelivery.smartlead.ai) with the same key: an account without the product is refused. The list is documented without pages, and manual is read as a one-time test. A test's results stay native, because SmartDelivery reports them as rates.",
311
- "Block list entries with an @ are emails, the rest domains."
319
+ "Block list entries with an @ are emails, the rest domains.",
320
+ "A message's or reply's url is null: Smartlead documents no link to one master inbox conversation. The app_url and ui_master_inbox_link of its webhooks are documented with the master inbox page only (https://app.smartlead.ai/app/master-inbox), and no read returns a link."
312
321
  ];
313
322
 
314
323
  // src/smartlead/map-account.ts
@@ -551,6 +560,8 @@ var messageFields = (identity, place, parts, includeBody) => ({
551
560
  stepIndex: place.stepIndex ?? null,
552
561
  subject: parts.subject,
553
562
  threadId: place.threadId ?? null,
563
+ // Smartlead documents no link to one master inbox conversation.
564
+ url: null,
554
565
  variantKey: null
555
566
  });
556
567
  var activityMessages = (identity, row, activity, includeBody) => {
@@ -4,11 +4,6 @@ declare const setupInput: z.ZodObject<{
4
4
  campaign: z.ZodString;
5
5
  }, z.core.$strip>;
6
6
  export declare const campaignSetup: ToolDefinition<z.infer<typeof setupInput>>;
7
- declare const deliverabilityInput: z.ZodObject<{
8
- campaign: z.ZodOptional<z.ZodString>;
9
- limit: z.ZodDefault<z.ZodNumber>;
10
- }, z.core.$strip>;
11
- export declare const deliverabilityCheck: ToolDefinition<z.infer<typeof deliverabilityInput>>;
12
7
  declare const nativeInput: z.ZodObject<{
13
8
  name: z.ZodOptional<z.ZodString>;
14
9
  params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
@@ -1,14 +1,16 @@
1
1
  import {
2
2
  createTools
3
- } from "../chunks/chunk-OVTYA3IB.js";
4
- import "../chunks/chunk-FTK4JS65.js";
3
+ } from "../chunks/chunk-HDTOGEVN.js";
4
+ import "../chunks/chunk-KNWJIJVO.js";
5
5
  import "../chunks/chunk-4PA526S7.js";
6
+ import "../chunks/chunk-I7GBBHD2.js";
6
7
  import "../chunks/chunk-HZCTYL22.js";
7
8
  import "../chunks/chunk-HPNGSG5E.js";
8
9
  import "../chunks/chunk-PTZO4QXR.js";
9
- import "../chunks/chunk-POBAY3TI.js";
10
+ import "../chunks/chunk-HXCZMMSD.js";
10
11
  import "../chunks/chunk-CPACP4YD.js";
11
12
  import "../chunks/chunk-QGRZDTX4.js";
13
+ import "../chunks/chunk-OPLXELPS.js";
12
14
  import "../chunks/chunk-HXB2IOJJ.js";
13
15
  import "../chunks/chunk-XYHM4KHC.js";
14
16
  import "../chunks/chunk-45TXPJW7.js";
@@ -38,10 +38,6 @@ declare const stepsInput: z.ZodObject<{
38
38
  to: z.ZodOptional<z.ZodString>;
39
39
  }, z.core.$strip>;
40
40
  export declare const winningSteps: ToolDefinition<z.infer<typeof stepsInput>>;
41
- declare const healthInput: z.ZodObject<{
42
- limit: z.ZodDefault<z.ZodNumber>;
43
- }, z.core.$strip>;
44
- export declare const senderHealth: ToolDefinition<z.infer<typeof healthInput>>;
45
41
  declare const samplesInput: z.ZodObject<{
46
42
  campaign: z.ZodOptional<z.ZodString>;
47
43
  by: z.ZodDefault<z.ZodEnum<{
@@ -1,14 +1,16 @@
1
1
  import {
2
2
  createTools
3
- } from "../chunks/chunk-OVTYA3IB.js";
4
- import "../chunks/chunk-FTK4JS65.js";
3
+ } from "../chunks/chunk-HDTOGEVN.js";
4
+ import "../chunks/chunk-KNWJIJVO.js";
5
5
  import "../chunks/chunk-4PA526S7.js";
6
+ import "../chunks/chunk-I7GBBHD2.js";
6
7
  import "../chunks/chunk-HZCTYL22.js";
7
8
  import "../chunks/chunk-HPNGSG5E.js";
8
9
  import "../chunks/chunk-PTZO4QXR.js";
9
- import "../chunks/chunk-POBAY3TI.js";
10
+ import "../chunks/chunk-HXCZMMSD.js";
10
11
  import "../chunks/chunk-CPACP4YD.js";
11
12
  import "../chunks/chunk-QGRZDTX4.js";
13
+ import "../chunks/chunk-OPLXELPS.js";
12
14
  import "../chunks/chunk-HXB2IOJJ.js";
13
15
  import "../chunks/chunk-XYHM4KHC.js";
14
16
  import "../chunks/chunk-45TXPJW7.js";
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ import type { ToolDefinition } from "./shared.ts";
3
+ declare const checkInput: z.ZodObject<{
4
+ campaign: z.ZodOptional<z.ZodString>;
5
+ limit: z.ZodDefault<z.ZodNumber>;
6
+ max_checked: z.ZodOptional<z.ZodNumber>;
7
+ }, z.core.$strip>;
8
+ export declare const deliverabilityCheck: ToolDefinition<z.infer<typeof checkInput>>;
9
+ export {};
@@ -1,22 +1,24 @@
1
1
  import {
2
2
  openaiTools
3
- } from "../chunks/chunk-OMCDMELK.js";
3
+ } from "../chunks/chunk-UWNQEQIX.js";
4
4
  import {
5
5
  TOOL_NAMES,
6
6
  createTools
7
- } from "../chunks/chunk-OVTYA3IB.js";
7
+ } from "../chunks/chunk-HDTOGEVN.js";
8
8
  import {
9
9
  DEFAULT_BODY_CHARS,
10
10
  DEFAULT_TOOL_REQUESTS,
11
11
  UNTRUSTED_NOTE
12
- } from "../chunks/chunk-FTK4JS65.js";
12
+ } from "../chunks/chunk-KNWJIJVO.js";
13
13
  import "../chunks/chunk-4PA526S7.js";
14
+ import "../chunks/chunk-I7GBBHD2.js";
14
15
  import "../chunks/chunk-HZCTYL22.js";
15
16
  import "../chunks/chunk-HPNGSG5E.js";
16
17
  import "../chunks/chunk-PTZO4QXR.js";
17
- import "../chunks/chunk-POBAY3TI.js";
18
+ import "../chunks/chunk-HXCZMMSD.js";
18
19
  import "../chunks/chunk-CPACP4YD.js";
19
20
  import "../chunks/chunk-QGRZDTX4.js";
21
+ import "../chunks/chunk-OPLXELPS.js";
20
22
  import "../chunks/chunk-HXB2IOJJ.js";
21
23
  import "../chunks/chunk-XYHM4KHC.js";
22
24
  import "../chunks/chunk-45TXPJW7.js";
@@ -12,8 +12,11 @@ declare const compareInput: z.ZodObject<{
12
12
  }, z.core.$strip>;
13
13
  export declare const compareClients: ToolDefinition<z.infer<typeof compareInput>>;
14
14
  declare const personInput: z.ZodObject<{
15
+ email: z.ZodOptional<z.ZodString>;
16
+ lead_ref: z.ZodOptional<z.ZodString>;
17
+ linkedin_url: z.ZodOptional<z.ZodString>;
18
+ person: z.ZodOptional<z.ZodString>;
15
19
  include_bodies: z.ZodDefault<z.ZodBoolean>;
16
- person: z.ZodString;
17
20
  }, z.core.$strip>;
18
21
  export declare const crossChannelLead: ToolDefinition<z.infer<typeof personInput>>;
19
22
  export {};
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ export declare const personFields: {
3
+ email: z.ZodOptional<z.ZodString>;
4
+ lead_ref: z.ZodOptional<z.ZodString>;
5
+ linkedin_url: z.ZodOptional<z.ZodString>;
6
+ person: z.ZodOptional<z.ZodString>;
7
+ };
8
+ export interface PersonFields {
9
+ readonly email?: string | undefined;
10
+ readonly lead_ref?: string | undefined;
11
+ readonly linkedin_url?: string | undefined;
12
+ readonly person?: string | undefined;
13
+ }
14
+ /** For `superRefine`: exactly one person field, holding its own kind. */
15
+ export declare const checkPerson: (values: PersonFields, context: z.RefinementCtx) => void;
16
+ /** The one person field given. Call it on values `checkPerson` passed. */
17
+ export declare const personOf: (values: PersonFields) => string;
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ import type { ToolDefinition } from "./shared.ts";
3
+ declare const healthInput: z.ZodObject<{
4
+ impact: z.ZodDefault<z.ZodBoolean>;
5
+ limit: z.ZodDefault<z.ZodNumber>;
6
+ }, z.core.$strip>;
7
+ export declare const senderHealth: ToolDefinition<z.infer<typeof healthInput>>;
8
+ export {};
@@ -0,0 +1,38 @@
1
+ import type { SenderHealth } from "../internal/entities-account.ts";
2
+ import type { Sender } from "../internal/entities.ts";
3
+ import type { JsonObject } from "../internal/json.ts";
4
+ import type { OutboundApi } from "../internal/outbound/api.ts";
5
+ /** The days of sends read for each failing sender, today included. */
6
+ export declare const IMPACT_DAYS = 14;
7
+ /**
8
+ * Failing senders past this many get no impact, with a note, where each
9
+ * sender's days cost a read of their own.
10
+ */
11
+ export declare const IMPACT_AT_MOST = 10;
12
+ /**
13
+ * The same where one call reads many senders' days: each sender then costs
14
+ * only the listing of its campaigns.
15
+ */
16
+ export declare const IMPACT_BATCHED_AT_MOST = 200;
17
+ /** The vendor reports the sender disconnected or failing, or that it cannot sign in. */
18
+ export declare const isFailing: (sender: Sender, health?: SenderHealth | null) => boolean;
19
+ /** A request cap the caller set stopped the read: retrying stops there again. */
20
+ export declare const isCapStop: (cause: unknown) => boolean;
21
+ export interface Impact {
22
+ readonly impact: JsonObject;
23
+ readonly requests: number;
24
+ }
25
+ export interface Impacts {
26
+ /** By sender ref. */
27
+ readonly bySender: ReadonlyMap<string, JsonObject>;
28
+ readonly requests: number;
29
+ readonly notes: readonly string[];
30
+ /** Failing senders left without impact. */
31
+ readonly skipped: number;
32
+ }
33
+ /**
34
+ * The impact of the first failing senders, in the order given:
35
+ * `IMPACT_BATCHED_AT_MOST` where the adapter reads many senders' days in one
36
+ * call, `IMPACT_AT_MOST` where each sender's days cost a read of their own.
37
+ */
38
+ export declare const readImpacts: (outbound: OutboundApi, failing: readonly Sender[], now?: number) => Promise<Impacts>;
@@ -18,6 +18,11 @@ export interface ToolSuccess {
18
18
  * otherwise guesses the range it asks for.
19
19
  */
20
20
  readonly today?: string | undefined;
21
+ /**
22
+ * When the answer was computed, ISO 8601 UTC: the time the numbers are
23
+ * as of. Set on every result a tool from `createTools` returns.
24
+ */
25
+ readonly computedAt?: string | undefined;
21
26
  /**
22
27
  * `false` when the answer covers part of what was asked, for example
23
28
  * when `limit` cut a list or a cap stopped a read; `notes` says why.
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  instantlyEvents
3
- } from "../chunks/chunk-MPE6VLLY.js";
3
+ } from "../chunks/chunk-UZ4YWUZ7.js";
4
4
  import {
5
5
  smartleadEvents
6
- } from "../chunks/chunk-UAHYPASH.js";
6
+ } from "../chunks/chunk-3LRIWQEJ.js";
7
7
  import {
8
8
  heyreachEvents
9
9
  } from "../chunks/chunk-UWD65SK7.js";
10
10
  import {
11
11
  emailbisonEvents
12
- } from "../chunks/chunk-UZLFZZ2U.js";
12
+ } from "../chunks/chunk-AWNH4I5D.js";
13
13
  import "../chunks/chunk-SYUMA3CP.js";
14
- import "../chunks/chunk-UOJG4VYF.js";
14
+ import "../chunks/chunk-LD5OAELW.js";
15
15
  import "../chunks/chunk-FALWG5U3.js";
16
16
  import "../chunks/chunk-U5AK6OJM.js";
17
- import "../chunks/chunk-POBAY3TI.js";
17
+ import "../chunks/chunk-HXCZMMSD.js";
18
18
  import {
19
19
  SCHEMA_VERSION
20
20
  } from "../chunks/chunk-QGRZDTX4.js";
21
+ import "../chunks/chunk-OPLXELPS.js";
21
22
  import "../chunks/chunk-HXB2IOJJ.js";
22
- import "../chunks/chunk-YFJ3OQZS.js";
23
23
  import {
24
24
  stableId
25
25
  } from "../chunks/chunk-KVAG5GM2.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "outbound-sdk",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "One small, typed, read-only API over outbound sending tools.",
5
5
  "keywords": [
6
6
  "cold-email",