outbound-sdk 0.6.0 → 0.7.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.
Files changed (119) hide show
  1. package/dist/alerts/check-schema.d.ts +1 -1
  2. package/dist/alerts/index.js +6 -6
  3. package/dist/audit/index.js +2 -2
  4. package/dist/benchmarks/index.js +4 -4
  5. package/dist/budget/index.js +2 -2
  6. package/dist/cards/index.js +54 -44
  7. package/dist/chunks/{chunk-BLCJHP5H.js → chunk-45TXPJW7.js} +1 -0
  8. package/dist/chunks/chunk-4AVYRVN5.js +239 -0
  9. package/dist/chunks/{chunk-YYCT3NGV.js → chunk-65YAGEWZ.js} +24 -7
  10. package/dist/chunks/{chunk-3JOC5DGD.js → chunk-6NSCPTOY.js} +488 -127
  11. package/dist/chunks/{chunk-W22SDX6S.js → chunk-7I3EPR23.js} +3 -3
  12. package/dist/chunks/{chunk-MGR6HREO.js → chunk-BNDHEDHD.js} +2 -2
  13. package/dist/chunks/chunk-DNPNTD5W.js +81 -0
  14. package/dist/chunks/{chunk-53DCVFUB.js → chunk-FALWG5U3.js} +1 -0
  15. package/dist/chunks/{chunk-OLPMBRXM.js → chunk-GL7BABF2.js} +2 -2
  16. package/dist/chunks/{chunk-ZOAG2C6V.js → chunk-HIAK2GCI.js} +9 -2
  17. package/dist/chunks/{chunk-SXGCKCAR.js → chunk-I7DXXGNZ.js} +40 -9
  18. package/dist/chunks/{chunk-BK5SLY32.js → chunk-JRL3QRBS.js} +264 -76
  19. package/dist/chunks/{chunk-PHNQ3WC2.js → chunk-KTYTE2BU.js} +4 -3
  20. package/dist/chunks/{chunk-JWGSB7PT.js → chunk-LD6F46UT.js} +2 -2
  21. package/dist/chunks/{chunk-2D42TQFU.js → chunk-LVZGIKNF.js} +2 -2
  22. package/dist/chunks/{chunk-PQSTQKRD.js → chunk-M2VXGLLZ.js} +35 -2
  23. package/dist/chunks/{chunk-UWUPUMM2.js → chunk-MW4C6LTN.js} +2 -2
  24. package/dist/chunks/chunk-OK3GAZMT.js +51 -0
  25. package/dist/chunks/{chunk-BOWXGMN3.js → chunk-POBAY3TI.js} +80 -4
  26. package/dist/chunks/{chunk-J7DDZ4C2.js → chunk-QFC4ZHD3.js} +1 -1
  27. package/dist/chunks/{chunk-TFICTGM2.js → chunk-T5MJMW3R.js} +1 -1
  28. package/dist/chunks/{chunk-GFDNRWR3.js → chunk-UFQ4WMLU.js} +1 -1
  29. package/dist/chunks/{chunk-QAKJ76HB.js → chunk-YW6FFVSZ.js} +1 -1
  30. package/dist/cli/bin.js +14 -14
  31. package/dist/cli/by-name.d.ts +28 -0
  32. package/dist/cli/commands.d.ts +2 -1
  33. package/dist/cli/config.d.ts +3 -2
  34. package/dist/cli/envelope.d.ts +50 -0
  35. package/dist/cli/index.d.ts +5 -0
  36. package/dist/cli/index.js +13 -13
  37. package/dist/cli/listing.d.ts +13 -0
  38. package/dist/cli/native.d.ts +4 -0
  39. package/dist/cli/options.d.ts +88 -0
  40. package/dist/cli/output.d.ts +13 -1
  41. package/dist/cli/suggest.d.ts +10 -0
  42. package/dist/cli/update.d.ts +25 -2
  43. package/dist/clients/index.js +6 -6
  44. package/dist/combine/index.js +7 -7
  45. package/dist/emailbison/capabilities.d.ts +1 -0
  46. package/dist/emailbison/index.js +38 -14
  47. package/dist/emailbison/map-stats.d.ts +10 -0
  48. package/dist/exporter/index.js +2 -2
  49. package/dist/failover/index.js +2 -2
  50. package/dist/fixtures/index.js +4 -4
  51. package/dist/heyreach/capabilities.d.ts +3 -0
  52. package/dist/heyreach/index.js +34 -12
  53. package/dist/heyreach/map-account.d.ts +2 -2
  54. package/dist/identity/index.js +2 -2
  55. package/dist/index.js +9 -7
  56. package/dist/insights/copy/audit-samples.d.ts +24 -0
  57. package/dist/insights/copy/audit-variant.d.ts +34 -0
  58. package/dist/insights/copy/copy-audit.d.ts +26 -12
  59. package/dist/insights/copy/copy-preview.d.ts +16 -3
  60. package/dist/insights/copy/index.d.ts +6 -0
  61. package/dist/insights/copy/reply-timing.d.ts +4 -0
  62. package/dist/insights/copy/shared.d.ts +4 -1
  63. package/dist/insights/copy/step-funnel.d.ts +20 -6
  64. package/dist/insights/copy/variant-test.d.ts +2 -3
  65. package/dist/insights/index.js +1138 -589
  66. package/dist/insights/inputs.generated.d.ts +47 -11
  67. package/dist/insights/ops/campaign-diagnosis.d.ts +2 -0
  68. package/dist/insights/ops/diagnosis-checks.d.ts +20 -1
  69. package/dist/insights/ops/index.d.ts +2 -0
  70. package/dist/insights/ops/pipeline-forecast.d.ts +17 -6
  71. package/dist/insights/people/account-summary.d.ts +14 -1
  72. package/dist/insights/people/auto-replies.d.ts +14 -0
  73. package/dist/insights/people/dropped-replies.d.ts +1 -1
  74. package/dist/insights/people/hot-leads.d.ts +5 -1
  75. package/dist/insights/people/index.d.ts +4 -0
  76. package/dist/insights/people/lead-collisions.d.ts +11 -2
  77. package/dist/insights/people/person-summary.d.ts +19 -3
  78. package/dist/insights/people/personalization-gaps.d.ts +14 -8
  79. package/dist/insights/people/suppression-check.d.ts +9 -0
  80. package/dist/insights/registry.d.ts +12 -0
  81. package/dist/insights/step.d.ts +15 -0
  82. package/dist/insights/variables.d.ts +2 -0
  83. package/dist/instantly/capabilities.d.ts +4 -0
  84. package/dist/instantly/index.js +263 -53
  85. package/dist/instantly/map-stats.d.ts +4 -0
  86. package/dist/instantly/stats-tracking.d.ts +19 -0
  87. package/dist/instantly/thread.d.ts +9 -0
  88. package/dist/internal/adapter.d.ts +5 -0
  89. package/dist/internal/auto-reply.d.ts +20 -0
  90. package/dist/internal/capabilities.d.ts +2 -0
  91. package/dist/internal/entities-account.d.ts +1 -0
  92. package/dist/internal/entities.d.ts +79 -2
  93. package/dist/internal/fields.d.ts +37 -1
  94. package/dist/internal/metrics.d.ts +23 -1
  95. package/dist/internal/outbound/api.d.ts +2 -0
  96. package/dist/internal/records.d.ts +2 -2
  97. package/dist/internal/reply-people.d.ts +37 -0
  98. package/dist/internal/runway.d.ts +42 -0
  99. package/dist/internal/sender-screen.d.ts +9 -0
  100. package/dist/internal/tracking.d.ts +33 -0
  101. package/dist/loader/index.js +4 -4
  102. package/dist/memory/data.d.ts +2 -1
  103. package/dist/memory/index.js +23 -12
  104. package/dist/redact/index.js +3 -3
  105. package/dist/smartlead/capabilities.d.ts +4 -0
  106. package/dist/smartlead/index.js +152 -38
  107. package/dist/smartlead/map-account.d.ts +3 -0
  108. package/dist/smartlead/stats-tracking.d.ts +22 -0
  109. package/dist/sync/index.js +2 -2
  110. package/dist/tools/ai-sdk.js +8 -7
  111. package/dist/tools/by-name.d.ts +18 -0
  112. package/dist/tools/campaign-tools.d.ts +6 -2
  113. package/dist/tools/claude-agent.js +8 -7
  114. package/dist/tools/index.js +9 -8
  115. package/dist/tools/shared.d.ts +7 -0
  116. package/dist/tracing/index.js +2 -2
  117. package/dist/webhooks/index.js +12 -11
  118. package/package.json +1 -1
  119. package/dist/chunks/chunk-HWHI4LFY.js +0 -102
@@ -18,7 +18,7 @@ import {
18
18
  senderHealthSchema,
19
19
  tagSchema,
20
20
  webhookSubscriptionSchema
21
- } from "./chunk-ZOAG2C6V.js";
21
+ } from "./chunk-HIAK2GCI.js";
22
22
  import {
23
23
  plural
24
24
  } from "./chunk-PTZO4QXR.js";
@@ -31,10 +31,10 @@ import {
31
31
  senderSchema,
32
32
  sequenceSchema,
33
33
  workspaceSchema
34
- } from "./chunk-BOWXGMN3.js";
34
+ } from "./chunk-POBAY3TI.js";
35
35
  import {
36
36
  sourceIdFor
37
- } from "./chunk-QAKJ76HB.js";
37
+ } from "./chunk-YW6FFVSZ.js";
38
38
  import {
39
39
  buildUrl
40
40
  } from "./chunk-NAWZ73QS.js";
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  OutboundError,
46
46
  redactUrl
47
- } from "./chunk-J7DDZ4C2.js";
47
+ } from "./chunk-QFC4ZHD3.js";
48
48
  import {
49
49
  count,
50
50
  field,
@@ -52,7 +52,7 @@ import {
52
52
  isString,
53
53
  parseJson,
54
54
  strayKey
55
- } from "./chunk-BLCJHP5H.js";
55
+ } from "./chunk-45TXPJW7.js";
56
56
 
57
57
  // src/internal/limits.ts
58
58
  var DEFAULT_CONCURRENCY = 8;
@@ -1192,6 +1192,7 @@ var webhookList = (core) => ({
1192
1192
  });
1193
1193
 
1194
1194
  // src/internal/outbound/specs.ts
1195
+ var DOMAIN = /^[a-z0-9-]+(?:\.[a-z0-9-]+)+$/u;
1195
1196
  var wantsBody = (include) => include?.includes("body") ?? false;
1196
1197
  var hasRange = (filters) => filters.since !== void 0 || filters.until !== void 0;
1197
1198
  var refOf2 = (item) => item.ref;
@@ -1274,6 +1275,7 @@ var leadList = (core) => ({
1274
1275
  action: "leads.list",
1275
1276
  takes: {
1276
1277
  campaignId: true,
1278
+ domain: true,
1277
1279
  email: true,
1278
1280
  linkedinUrl: true,
1279
1281
  listId: true,
@@ -1283,7 +1285,7 @@ var leadList = (core) => ({
1283
1285
  // A lookup returns one record per campaign the person is in. On a vendor
1284
1286
  // whose lead id is the same in every campaign those records share a ref,
1285
1287
  // so the campaign is part of what tells them apart.
1286
- keyOf: (lead, filters) => filters.email === void 0 && filters.linkedinUrl === void 0 ? lead.ref : `${lead.ref} ${lead.campaignRef ?? ""}`,
1288
+ keyOf: (lead, filters) => filters.email === void 0 && filters.linkedinUrl === void 0 && filters.domain === void 0 ? lead.ref : `${lead.ref} ${lead.campaignRef ?? ""}`,
1287
1289
  prepare: (filters) => {
1288
1290
  if (filters.campaignId !== void 0 && filters.listId !== void 0) {
1289
1291
  throw new OutboundError(
@@ -1299,6 +1301,20 @@ var leadList = (core) => ({
1299
1301
  "Finding a lead by email or LinkedIn profile"
1300
1302
  );
1301
1303
  }
1304
+ const domain = filters.domain?.trim().toLowerCase();
1305
+ if (domain !== void 0) {
1306
+ requireCapability(
1307
+ core.gate,
1308
+ "leads.byDomain",
1309
+ "Finding the leads at one email domain"
1310
+ );
1311
+ if (!DOMAIN.test(domain)) {
1312
+ throw new OutboundError(
1313
+ "Invalid",
1314
+ `"${filters.domain}" is not a domain such as acme.com`
1315
+ );
1316
+ }
1317
+ }
1302
1318
  if (filters.listId !== void 0) {
1303
1319
  requireCapability(core.gate, "lists.leads", "Listing a list's leads");
1304
1320
  } else if (filters.campaignId !== void 0) {
@@ -1307,7 +1323,7 @@ var leadList = (core) => ({
1307
1323
  "leads.byCampaign",
1308
1324
  "Listing a campaign's leads"
1309
1325
  );
1310
- } else if (!lookup2) {
1326
+ } else if (!lookup2 && domain === void 0) {
1311
1327
  requireCapability(core.gate, "leads.list", "Listing leads");
1312
1328
  }
1313
1329
  if (hasRange(filters)) {
@@ -1315,6 +1331,7 @@ var leadList = (core) => ({
1315
1331
  }
1316
1332
  return {
1317
1333
  campaignId: filters.campaignId,
1334
+ domain,
1318
1335
  email: filters.email?.trim().toLowerCase(),
1319
1336
  linkedinUrl: filters.linkedinUrl?.trim(),
1320
1337
  listId: filters.listId,