outbound-sdk 0.11.0 → 0.13.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 (105) hide show
  1. package/dist/alerts/index.js +1 -1
  2. package/dist/budget/index.js +1 -1
  3. package/dist/cards/index.js +217 -100
  4. package/dist/cards/sender-tool-cards.d.ts +6 -0
  5. package/dist/chunks/{chunk-UAHYPASH.js → chunk-3LRIWQEJ.js} +2 -1
  6. package/dist/chunks/{chunk-UZLFZZ2U.js → chunk-6BSFR5SF.js} +14 -2
  7. package/dist/chunks/{chunk-FTK4JS65.js → chunk-BTIJ24UY.js} +89 -9
  8. package/dist/chunks/{chunk-OVTYA3IB.js → chunk-EAG5NIPM.js} +614 -206
  9. package/dist/chunks/{chunk-A7DLJUA6.js → chunk-FT6HMMMP.js} +3 -1
  10. package/dist/chunks/chunk-I7GBBHD2.js +80 -0
  11. package/dist/chunks/{chunk-UOJG4VYF.js → chunk-LD5OAELW.js} +1 -1
  12. package/dist/chunks/{chunk-KMQHXFIZ.js → chunk-LJNU4LAR.js} +2094 -1014
  13. package/dist/chunks/{chunk-POBAY3TI.js → chunk-NLYGMVXS.js} +30 -0
  14. package/dist/chunks/{chunk-V7JKTNRO.js → chunk-OE45PREW.js} +1 -1
  15. package/dist/chunks/{chunk-MEEJIIIA.js → chunk-OP2GL7ZT.js} +77 -8
  16. package/dist/chunks/{chunk-YFJ3OQZS.js → chunk-OPLXELPS.js} +5 -1
  17. package/dist/chunks/{chunk-CVLGFVDC.js → chunk-PDYE6CWS.js} +136 -64
  18. package/dist/chunks/{chunk-OMCDMELK.js → chunk-PUIHJFK4.js} +1 -1
  19. package/dist/chunks/{chunk-MPE6VLLY.js → chunk-UZ4YWUZ7.js} +1 -1
  20. package/dist/chunks/{tools-AVJ3XJ5A.js → tools-VCCH3JNL.js} +13 -6
  21. package/dist/cli/bin.js +11 -10
  22. package/dist/cli/config.d.ts +0 -2
  23. package/dist/cli/index.js +10 -9
  24. package/dist/cli/offered.d.ts +31 -2
  25. package/dist/cli/serve.d.ts +4 -2
  26. package/dist/combine/index.js +60 -4
  27. package/dist/emailbison/index.js +4 -4
  28. package/dist/fixtures/index.js +4 -4
  29. package/dist/heyreach/index.js +17 -6
  30. package/dist/identity/index.js +46 -11
  31. package/dist/identity/keys.d.ts +1 -1
  32. package/dist/index.js +8 -6
  33. package/dist/insights/capped.d.ts +14 -1
  34. package/dist/insights/define.d.ts +8 -6
  35. package/dist/insights/index.d.ts +1 -1
  36. package/dist/insights/index.js +12 -61
  37. package/dist/insights/inputs.generated.d.ts +91 -16
  38. package/dist/insights/ops/campaign-ranking.d.ts +8 -1
  39. package/dist/insights/ops/channel-mix.d.ts +8 -1
  40. package/dist/insights/ops/client-report.d.ts +28 -18
  41. package/dist/insights/ops/client-runway.d.ts +43 -0
  42. package/dist/insights/ops/index.d.ts +6 -1
  43. package/dist/insights/ops/period-comparison.d.ts +35 -2
  44. package/dist/insights/ops/pipeline-forecast.d.ts +14 -9
  45. package/dist/insights/ops/shared.d.ts +49 -2
  46. package/dist/insights/ops/tag-rollup.d.ts +8 -1
  47. package/dist/insights/people/coverage.d.ts +26 -0
  48. package/dist/insights/people/dropped-replies-check.d.ts +19 -3
  49. package/dist/insights/people/dropped-replies.d.ts +6 -2
  50. package/dist/insights/people/find.d.ts +5 -4
  51. package/dist/insights/people/hot-leads.d.ts +10 -1
  52. package/dist/insights/people/index.d.ts +26 -2
  53. package/dist/insights/people/lead-collisions.d.ts +18 -1
  54. package/dist/insights/people/person-summary.d.ts +15 -3
  55. package/dist/insights/people/suppression-check.d.ts +18 -1
  56. package/dist/insights/people/thread-context.d.ts +79 -0
  57. package/dist/insights/people/thread-contexts.d.ts +59 -0
  58. package/dist/insights/people/thread-read.d.ts +33 -0
  59. package/dist/insights/registry.d.ts +29 -3
  60. package/dist/insights/senders/domain-health.d.ts +1 -1
  61. package/dist/insights/senders/index.d.ts +1 -1
  62. package/dist/insights/senders/read.d.ts +9 -0
  63. package/dist/insights/tools.d.ts +35 -2
  64. package/dist/instantly/adapter.d.ts +3 -2
  65. package/dist/instantly/capabilities.d.ts +5 -0
  66. package/dist/instantly/index.js +255 -66
  67. package/dist/instantly/lead-ids.d.ts +11 -0
  68. package/dist/instantly/map-lead.d.ts +19 -2
  69. package/dist/instantly/senders.d.ts +3 -0
  70. package/dist/internal/adapter.d.ts +7 -0
  71. package/dist/internal/capabilities.d.ts +8 -0
  72. package/dist/internal/entities.d.ts +24 -1
  73. package/dist/internal/fields.d.ts +10 -0
  74. package/dist/internal/outbound/api.d.ts +12 -0
  75. package/dist/internal/outbound/operations-account.d.ts +4 -1
  76. package/dist/internal/outbound/outbound.d.ts +2 -1
  77. package/dist/internal/outbound/specs-account.d.ts +2 -1
  78. package/dist/internal/person.d.ts +32 -0
  79. package/dist/internal/records.d.ts +2 -2
  80. package/dist/internal/reply-people.d.ts +25 -7
  81. package/dist/internal/runway.d.ts +38 -5
  82. package/dist/internal/url.d.ts +2 -1
  83. package/dist/loader/index.js +1 -1
  84. package/dist/memory/data.d.ts +2 -1
  85. package/dist/memory/index.js +6 -4
  86. package/dist/redact/index.d.ts +1 -1
  87. package/dist/redact/index.js +62 -31
  88. package/dist/redact/plugin.d.ts +13 -11
  89. package/dist/redact/tokens.d.ts +18 -1
  90. package/dist/smartlead/index.js +21 -7
  91. package/dist/tools/account-tools.d.ts +0 -5
  92. package/dist/tools/ai-sdk.js +5 -3
  93. package/dist/tools/campaign-tools.d.ts +0 -4
  94. package/dist/tools/claude-agent.js +5 -3
  95. package/dist/tools/deliverability-check.d.ts +9 -0
  96. package/dist/tools/index.js +6 -4
  97. package/dist/tools/people-tools.d.ts +4 -1
  98. package/dist/tools/person-input.d.ts +17 -0
  99. package/dist/tools/registry.d.ts +8 -1
  100. package/dist/tools/sender-health.d.ts +8 -0
  101. package/dist/tools/sender-impact.d.ts +38 -0
  102. package/dist/tools/shared.d.ts +5 -0
  103. package/dist/webhooks/index.js +6 -6
  104. package/package.json +1 -1
  105. /package/dist/chunks/{chunk-5XLR6XVV.js → chunk-HNYJO6B4.js} +0 -0
@@ -11,7 +11,7 @@ import {
11
11
  senderSchema,
12
12
  sequenceSchema,
13
13
  workspaceSchema
14
- } from "./chunk-POBAY3TI.js";
14
+ } from "./chunk-NLYGMVXS.js";
15
15
  import {
16
16
  OutboundError
17
17
  } from "./chunk-XYHM4KHC.js";
@@ -55,12 +55,14 @@ var NO_CAPABILITIES = {
55
55
  "senders.byCampaign": false,
56
56
  "senders.get": false,
57
57
  "senders.health": false,
58
+ "senders.healthList": false,
58
59
  "senders.list": false,
59
60
  "senders.warmup": false,
60
61
  sequence: false,
61
62
  "sequence.subsequences": false,
62
63
  "stats.byDay": false,
63
64
  "stats.bySender": false,
65
+ "stats.bySenders": false,
64
66
  "stats.byStep": false,
65
67
  "stats.allCampaigns": false,
66
68
  "stats.campaign": false,
@@ -0,0 +1,80 @@
1
+ import {
2
+ profileSlug
3
+ } from "./chunk-OPLXELPS.js";
4
+ import {
5
+ parseRef
6
+ } from "./chunk-HXB2IOJJ.js";
7
+ import {
8
+ OutboundError
9
+ } from "./chunk-XYHM4KHC.js";
10
+
11
+ // src/internal/person.ts
12
+ var EMAIL = /^[^\s@:]+@[^\s@.:]+(?:\.[^\s@.:]+)+$/u;
13
+ var DOMAIN = /^@?[^\s@/:]+(?:\.[^\s@/:.]+)+$/u;
14
+ var PROVIDER = /^[a-z][a-z0-9-]*$/u;
15
+ var SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
16
+ var PERSON_FORMS = "an email address, a LinkedIn profile URL or a lead ref as another tool returned it (provider:workspace:id)";
17
+ var bare = (identifier) => identifier.trim().replace(/^mailto:/iu, "");
18
+ var leadRefParts = (identifier) => {
19
+ const parts = parseRef(identifier.trim());
20
+ return parts !== null && PROVIDER.test(parts.provider) && !SCHEMES.has(parts.provider) ? parts : null;
21
+ };
22
+ var personKey = (identifier) => {
23
+ const value = bare(identifier);
24
+ if (leadRefParts(value) !== null) {
25
+ return null;
26
+ }
27
+ const slug = profileSlug(value);
28
+ if (slug !== null) {
29
+ return `linkedin:${slug}`;
30
+ }
31
+ return EMAIL.test(value) ? `email:${value.toLowerCase()}` : null;
32
+ };
33
+ var notAPerson = (identifier) => {
34
+ const value = bare(identifier);
35
+ if (DOMAIN.test(value)) {
36
+ return `"${value}" is a company domain, not a person. Use account_summary for a company domain`;
37
+ }
38
+ return value.includes("@") && !value.includes(":") ? `"${value}" is not a valid email address` : `"${value}" is not ${PERSON_FORMS}`;
39
+ };
40
+ var parsePerson = (identifier, provider) => {
41
+ const parts = leadRefParts(identifier);
42
+ if (parts !== null) {
43
+ return {
44
+ key: personKey(parts.sourceId),
45
+ ref: { ...parts, text: identifier.trim() }
46
+ };
47
+ }
48
+ const key = personKey(identifier);
49
+ if (key === null) {
50
+ throw new OutboundError("Invalid", notAPerson(identifier), { provider });
51
+ }
52
+ return { key, ref: null };
53
+ };
54
+ var reads = (outbound) => outbound.provider === "combined" ? "no tool on this combined instance is that one" : `this instance reads ${outbound.provider} workspace ${outbound.workspaceId}`;
55
+ var assertRefReadable = (outbound, ref) => {
56
+ if (ref.provider === outbound.provider && ref.workspaceId === outbound.workspaceId) {
57
+ return;
58
+ }
59
+ try {
60
+ outbound.workspace(`${ref.provider}:${ref.workspaceId}`);
61
+ } catch (error) {
62
+ if (OutboundError.is(error) && error.code === "NotFound") {
63
+ throw new OutboundError(
64
+ "Invalid",
65
+ `"${ref.text}" is a lead ref from ${ref.provider} workspace ${ref.workspaceId}, but ${reads(outbound)}. Ask an instance that reads ${ref.provider}, for example with --provider ${ref.provider} or --provider all, or give the person's email address or LinkedIn profile URL`,
66
+ { provider: outbound.provider }
67
+ );
68
+ }
69
+ throw error;
70
+ }
71
+ };
72
+
73
+ export {
74
+ PERSON_FORMS,
75
+ leadRefParts,
76
+ personKey,
77
+ notAPerson,
78
+ parsePerson,
79
+ assertRefReadable
80
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  buildUrl
3
- } from "./chunk-YFJ3OQZS.js";
3
+ } from "./chunk-OPLXELPS.js";
4
4
  import {
5
5
  stableId
6
6
  } from "./chunk-KVAG5GM2.js";