outbound-sdk 0.4.0 → 0.5.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 (90) hide show
  1. package/README.md +2 -2
  2. package/dist/alerts/check-evaluate.d.ts +53 -0
  3. package/dist/alerts/check-measure.d.ts +100 -0
  4. package/dist/alerts/check-schema.d.ts +184 -0
  5. package/dist/alerts/check-validate.d.ts +18 -0
  6. package/dist/alerts/index.d.ts +7 -0
  7. package/dist/alerts/index.js +635 -2
  8. package/dist/budget/index.d.ts +2 -0
  9. package/dist/budget/index.js +1 -0
  10. package/dist/cards/index.js +2 -1
  11. package/dist/chunks/{chunk-5CFO3CXG.js → chunk-3S32R2MH.js} +33 -67
  12. package/dist/chunks/{chunk-ZFVHM5JI.js → chunk-5J7GGV62.js} +11 -4
  13. package/dist/chunks/chunk-6TKFISG4.js +676 -0
  14. package/dist/chunks/{chunk-E6DSDCPI.js → chunk-BK5SLY32.js} +92 -101
  15. package/dist/chunks/{chunk-A6WVOCA4.js → chunk-BN6WCAWX.js} +4 -4
  16. package/dist/chunks/{chunk-IZFTTMJP.js → chunk-EHSJGQ5K.js} +5 -5
  17. package/dist/chunks/chunk-HPNGSG5E.js +51 -0
  18. package/dist/chunks/chunk-HWHI4LFY.js +102 -0
  19. package/dist/chunks/{chunk-Y5RAJ6PZ.js → chunk-OLPMBRXM.js} +3 -2
  20. package/dist/chunks/chunk-WGW3ROLY.js +18 -0
  21. package/dist/chunks/{chunk-7ZDS6SZD.js → chunk-WH6V3YNN.js} +25 -0
  22. package/dist/chunks/{chunk-7LNJJ2RO.js → chunk-X4RDBD4J.js} +102 -11
  23. package/dist/chunks/chunk-XL6LJVHJ.js +71 -0
  24. package/dist/chunks/{chunk-5FVKRIEJ.js → chunk-YYCT3NGV.js} +35 -11
  25. package/dist/cli/bin.js +13 -28
  26. package/dist/cli/index.d.ts +3 -0
  27. package/dist/cli/index.js +12 -11
  28. package/dist/cli/update.d.ts +15 -0
  29. package/dist/emailbison/account.d.ts +7 -0
  30. package/dist/emailbison/adapter.d.ts +5 -0
  31. package/dist/emailbison/capabilities.d.ts +78 -0
  32. package/dist/emailbison/client.d.ts +29 -0
  33. package/dist/emailbison/index.d.ts +30 -0
  34. package/dist/emailbison/index.js +1017 -0
  35. package/dist/emailbison/mail.d.ts +5 -0
  36. package/dist/emailbison/map-mail.d.ts +13 -0
  37. package/dist/emailbison/map-sequence.d.ts +12 -0
  38. package/dist/emailbison/map-stats.d.ts +47 -0
  39. package/dist/emailbison/map.d.ts +24 -0
  40. package/dist/emailbison/native-params.d.ts +5 -0
  41. package/dist/emailbison/native-workspace.d.ts +167 -0
  42. package/dist/emailbison/native.d.ts +327 -0
  43. package/dist/emailbison/stats.d.ts +4 -0
  44. package/dist/emailbison/webhooks.d.ts +2 -0
  45. package/dist/fixtures/index.js +6 -6
  46. package/dist/heyreach/capabilities.d.ts +3 -0
  47. package/dist/heyreach/index.js +20 -20
  48. package/dist/index.js +19 -18
  49. package/dist/insights/copy/copy-reuse.d.ts +6 -6
  50. package/dist/insights/copy/shared.d.ts +2 -2
  51. package/dist/insights/copy/step-funnel.d.ts +5 -5
  52. package/dist/insights/copy/variant-test.d.ts +2 -2
  53. package/dist/insights/cost.d.ts +91 -0
  54. package/dist/insights/define.d.ts +22 -1
  55. package/dist/insights/index.d.ts +4 -3
  56. package/dist/insights/index.js +331 -27
  57. package/dist/insights/inputs.generated.d.ts +4 -4
  58. package/dist/insights/ops/campaign-ranking.d.ts +3 -3
  59. package/dist/insights/ops/index.d.ts +2 -2
  60. package/dist/insights/ops/shared.d.ts +11 -1
  61. package/dist/insights/plugin.d.ts +19 -0
  62. package/dist/insights/registry.d.ts +2 -2
  63. package/dist/insights/run-cap.d.ts +35 -0
  64. package/dist/insights/senders/bounce-watch.d.ts +4 -4
  65. package/dist/insights/senders/domain-health.d.ts +2 -2
  66. package/dist/insights/senders/sender-load.d.ts +1 -1
  67. package/dist/insights/tools.d.ts +10 -0
  68. package/dist/instantly/capabilities.d.ts +13 -0
  69. package/dist/instantly/index.js +41 -28
  70. package/dist/internal/adapter.d.ts +12 -0
  71. package/dist/internal/outbound/outbound.d.ts +5 -1
  72. package/dist/internal/request-cap.d.ts +35 -0
  73. package/dist/loader/index.js +2 -2
  74. package/dist/memory/index.js +10 -10
  75. package/dist/providers/index.d.ts +21 -1
  76. package/dist/providers/index.js +1 -1
  77. package/dist/redact/index.js +4 -4
  78. package/dist/smartlead/capabilities.d.ts +5 -0
  79. package/dist/smartlead/index.js +24 -24
  80. package/dist/tools/ai-sdk.js +5 -3
  81. package/dist/tools/claude-agent.js +5 -3
  82. package/dist/tools/index.d.ts +2 -2
  83. package/dist/tools/index.js +11 -6
  84. package/dist/tools/registry.d.ts +20 -1
  85. package/dist/tools/shared.d.ts +20 -1
  86. package/dist/webhooks/index.js +16 -7
  87. package/package.json +8 -2
  88. package/dist/chunks/chunk-K4USHN4C.js +0 -40
  89. package/dist/chunks/chunk-LVQUSKEX.js +0 -17
  90. package/dist/chunks/{chunk-C4LS2HNV.js → chunk-JWGSB7PT.js} +3 -3
@@ -1,13 +1,13 @@
1
+ import {
2
+ makeRef,
3
+ parseRef
4
+ } from "../chunks/chunk-QAKJ76HB.js";
1
5
  import {
2
6
  profileSlug
3
7
  } from "../chunks/chunk-NAWZ73QS.js";
4
8
  import {
5
9
  stableId
6
10
  } from "../chunks/chunk-FHKSLCVW.js";
7
- import {
8
- makeRef,
9
- parseRef
10
- } from "../chunks/chunk-QAKJ76HB.js";
11
11
  import {
12
12
  OutboundError
13
13
  } from "../chunks/chunk-J7DDZ4C2.js";
@@ -37,10 +37,12 @@ export declare const costs: {
37
37
  };
38
38
  "leads.get": {
39
39
  perPage: number;
40
+ perWalk: number;
40
41
  };
41
42
  "leads.list": {
42
43
  pageSize: number;
43
44
  perPage: number;
45
+ perWalk: number;
44
46
  };
45
47
  "lists.list": {
46
48
  pageSize: number;
@@ -53,6 +55,7 @@ export declare const costs: {
53
55
  "replies.list": {
54
56
  pageSize: number;
55
57
  perPage: number;
58
+ perWalk: number;
56
59
  };
57
60
  "senders.get": {
58
61
  perPage: number;
@@ -70,6 +73,7 @@ export declare const costs: {
70
73
  "sequence.subsequences": {
71
74
  pageSize: number;
72
75
  perPage: number;
76
+ perWalk: number;
73
77
  };
74
78
  stats: {
75
79
  perPage: number;
@@ -79,6 +83,7 @@ export declare const costs: {
79
83
  };
80
84
  "webhooks.list": {
81
85
  perPage: number;
86
+ perWalk: number;
82
87
  };
83
88
  "workspaces.list": {
84
89
  perPage: number;
@@ -13,19 +13,19 @@ import {
13
13
  toWorkspace,
14
14
  unwrap,
15
15
  withoutSecrets
16
- } from "../chunks/chunk-IZFTTMJP.js";
16
+ } from "../chunks/chunk-EHSJGQ5K.js";
17
17
  import {
18
- createVendorClient,
19
18
  flatMapPage,
20
- listIn,
21
19
  mapPage,
22
- normalizeBody,
23
20
  withLeadFields,
24
21
  withMappedFields
25
- } from "../chunks/chunk-5CFO3CXG.js";
22
+ } from "../chunks/chunk-XL6LJVHJ.js";
26
23
  import {
27
- fromOne
28
- } from "../chunks/chunk-K4USHN4C.js";
24
+ createVendorClient,
25
+ fromOne,
26
+ listIn,
27
+ normalizeBody
28
+ } from "../chunks/chunk-3S32R2MH.js";
29
29
  import {
30
30
  defineNative,
31
31
  inBody,
@@ -34,18 +34,6 @@ import {
34
34
  inQuery,
35
35
  inQueryRequired
36
36
  } from "../chunks/chunk-NAKXLBA6.js";
37
- import {
38
- emptyCounts,
39
- metricRow
40
- } from "../chunks/chunk-PQSTQKRD.js";
41
- import "../chunks/chunk-NAWZ73QS.js";
42
- import {
43
- stableId
44
- } from "../chunks/chunk-FHKSLCVW.js";
45
- import {
46
- readEnv,
47
- requireCredential
48
- } from "../chunks/chunk-GFDNRWR3.js";
49
37
  import {
50
38
  eventTypesOf,
51
39
  recordBase,
@@ -53,12 +41,24 @@ import {
53
41
  refsTo
54
42
  } from "../chunks/chunk-2D42TQFU.js";
55
43
  import "../chunks/chunk-BOWXGMN3.js";
44
+ import {
45
+ emptyCounts,
46
+ metricRow
47
+ } from "../chunks/chunk-PQSTQKRD.js";
56
48
  import {
57
49
  replyCategorySchema
58
50
  } from "../chunks/chunk-QGRZDTX4.js";
59
51
  import {
60
52
  assertWorkspaceId
61
53
  } from "../chunks/chunk-QAKJ76HB.js";
54
+ import "../chunks/chunk-NAWZ73QS.js";
55
+ import {
56
+ stableId
57
+ } from "../chunks/chunk-FHKSLCVW.js";
58
+ import {
59
+ readEnv,
60
+ requireCredential
61
+ } from "../chunks/chunk-GFDNRWR3.js";
62
62
  import {
63
63
  OutboundError,
64
64
  makeErrorMapper,
@@ -218,31 +218,31 @@ var costs = {
218
218
  "campaigns.settings": { perPage: 1 },
219
219
  // The lead, then its tags, then the category list when the lead has a
220
220
  // category.
221
- "leads.get": { perPage: 2 },
221
+ "leads.get": { perPage: 2, perWalk: 1 },
222
222
  // The first page also reads the lead category list and, without a
223
223
  // campaign, the campaign list. A lookup by address is one request, two
224
224
  // when a campaign gives a lead category, and never walks leads.
225
- "leads.list": { pageSize: PAGE_SIZE, perPage: 1 },
225
+ "leads.list": { pageSize: PAGE_SIZE, perPage: 1, perWalk: 2 },
226
226
  "lists.list": { pageSize: PAGE_SIZE, perPage: 1 },
227
227
  // A lead's timeline costs one request per campaign the lead is in, plus one
228
228
  // to find those campaigns. A thread is one request.
229
229
  "messages.list": { pageSize: ACTIVITIES_PAGE_SIZE, perPage: 1 },
230
230
  // The first page of a walk also reads the lead category list.
231
- "replies.list": { pageSize: INBOX_PAGE_SIZE, perPage: 1 },
231
+ "replies.list": { pageSize: INBOX_PAGE_SIZE, perPage: 1, perWalk: 1 },
232
232
  "senders.get": { perPage: 1 },
233
233
  // The mailbox, then its warmup statistics.
234
234
  "senders.health": { perPage: 2 },
235
235
  "senders.list": { pageSize: PAGE_SIZE, perPage: 1 },
236
236
  "sequence.get": { perPage: 1 },
237
237
  // One subsequence per page; the first page also reads the campaign list.
238
- "sequence.subsequences": { pageSize: 1, perPage: 1 },
238
+ "sequence.subsequences": { pageSize: 1, perPage: 1, perWalk: 1 },
239
239
  // A mailbox's totals cost two: the mailbox for its address, then the list.
240
240
  // Daily rows cost two: the day-wise counts, then the positive replies.
241
241
  stats: { perPage: 1 },
242
242
  "tags.list": { perPage: 1 },
243
243
  // One campaign per page; without a campaign, the first page also reads the
244
244
  // campaign list.
245
- "webhooks.list": { perPage: 1 },
245
+ "webhooks.list": { perPage: 1, perWalk: 1 },
246
246
  "workspaces.list": { perPage: 1 }
247
247
  };
248
248
  var caveats = [
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  createTools
3
- } from "../chunks/chunk-E6DSDCPI.js";
4
- import "../chunks/chunk-LVQUSKEX.js";
3
+ } from "../chunks/chunk-BK5SLY32.js";
4
+ import "../chunks/chunk-HWHI4LFY.js";
5
5
  import "../chunks/chunk-HZCTYL22.js";
6
- import "../chunks/chunk-PQSTQKRD.js";
6
+ import "../chunks/chunk-HPNGSG5E.js";
7
+ import "../chunks/chunk-PTZO4QXR.js";
7
8
  import "../chunks/chunk-BOWXGMN3.js";
9
+ import "../chunks/chunk-PQSTQKRD.js";
8
10
  import "../chunks/chunk-QGRZDTX4.js";
9
11
  import "../chunks/chunk-QAKJ76HB.js";
10
12
  import "../chunks/chunk-J7DDZ4C2.js";
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  createTools
3
- } from "../chunks/chunk-E6DSDCPI.js";
4
- import "../chunks/chunk-LVQUSKEX.js";
3
+ } from "../chunks/chunk-BK5SLY32.js";
4
+ import "../chunks/chunk-HWHI4LFY.js";
5
5
  import "../chunks/chunk-HZCTYL22.js";
6
- import "../chunks/chunk-PQSTQKRD.js";
6
+ import "../chunks/chunk-HPNGSG5E.js";
7
+ import "../chunks/chunk-PTZO4QXR.js";
7
8
  import "../chunks/chunk-BOWXGMN3.js";
9
+ import "../chunks/chunk-PQSTQKRD.js";
8
10
  import "../chunks/chunk-QGRZDTX4.js";
9
11
  import "../chunks/chunk-QAKJ76HB.js";
10
12
  import "../chunks/chunk-J7DDZ4C2.js";
@@ -2,8 +2,8 @@ import type { Json } from "../internal/json.ts";
2
2
  import type { OutboundApi } from "../internal/outbound/api.ts";
3
3
  import type { ToolsOptions } from "./registry.ts";
4
4
  export { createTools, TOOL_NAMES } from "./registry.ts";
5
- export type { OutboundTool, ToolName, ToolsOptions } from "./registry.ts";
6
- export { DEFAULT_BODY_CHARS, UNTRUSTED_NOTE } from "./shared.ts";
5
+ export type { OutboundTool, ToolCallOptions, ToolName, ToolsOptions, } from "./registry.ts";
6
+ export { DEFAULT_BODY_CHARS, DEFAULT_TOOL_REQUESTS, UNTRUSTED_NOTE, } from "./shared.ts";
7
7
  export type { MetricSummary, ToolFailure, ToolResult, ToolSuccess, } from "./shared.ts";
8
8
  /** One function tool in the OpenAI SDK's shape. */
9
9
  export interface OpenAiFunctionTool {
@@ -1,22 +1,27 @@
1
1
  import {
2
2
  openaiTools
3
- } from "../chunks/chunk-Y5RAJ6PZ.js";
3
+ } from "../chunks/chunk-OLPMBRXM.js";
4
4
  import {
5
- DEFAULT_BODY_CHARS,
6
5
  TOOL_NAMES,
7
- UNTRUSTED_NOTE,
8
6
  createTools
9
- } from "../chunks/chunk-E6DSDCPI.js";
10
- import "../chunks/chunk-LVQUSKEX.js";
7
+ } from "../chunks/chunk-BK5SLY32.js";
8
+ import {
9
+ DEFAULT_BODY_CHARS,
10
+ DEFAULT_TOOL_REQUESTS,
11
+ UNTRUSTED_NOTE
12
+ } from "../chunks/chunk-HWHI4LFY.js";
11
13
  import "../chunks/chunk-HZCTYL22.js";
12
- import "../chunks/chunk-PQSTQKRD.js";
14
+ import "../chunks/chunk-HPNGSG5E.js";
15
+ import "../chunks/chunk-PTZO4QXR.js";
13
16
  import "../chunks/chunk-BOWXGMN3.js";
17
+ import "../chunks/chunk-PQSTQKRD.js";
14
18
  import "../chunks/chunk-QGRZDTX4.js";
15
19
  import "../chunks/chunk-QAKJ76HB.js";
16
20
  import "../chunks/chunk-J7DDZ4C2.js";
17
21
  import "../chunks/chunk-BLCJHP5H.js";
18
22
  export {
19
23
  DEFAULT_BODY_CHARS,
24
+ DEFAULT_TOOL_REQUESTS,
20
25
  TOOL_NAMES,
21
26
  UNTRUSTED_NOTE,
22
27
  createTools,
@@ -4,6 +4,15 @@ import type { OutboundApi } from "../internal/outbound/api.ts";
4
4
  import type { ToolResult } from "./shared.ts";
5
5
  /** The fields of a tool's input object, each a Zod schema. */
6
6
  export type InputFields = z.ZodObject["shape"];
7
+ /** What a caller of `call` can set for that one call. */
8
+ export interface ToolCallOptions {
9
+ /**
10
+ * The most vendor requests this call may send, retries included. Replaces
11
+ * the tool's default; `Infinity` removes it. `createTools` passes its
12
+ * `maxRequestsPerToolCall` here.
13
+ */
14
+ readonly maxRequests?: number | undefined;
15
+ }
7
16
  /** A tool with its input type erased, so tools of different inputs sit in one list. */
8
17
  export interface OutboundTool {
9
18
  readonly name: string;
@@ -19,8 +28,10 @@ export interface OutboundTool {
19
28
  * a model's arguments, an object typed from the schema and a
20
29
  * `Record<string, unknown>` are all taken as they are.
21
30
  */
22
- readonly call: (input: unknown) => Promise<ToolResult>;
31
+ readonly call: (input: unknown, options?: ToolCallOptions) => Promise<ToolResult>;
23
32
  }
33
+ /** Throws `Invalid` unless `cap` is a positive integer or `Infinity`. */
34
+ export declare const checkCap: (cap: number | undefined, setting: string) => void;
24
35
  export declare const TOOL_NAMES: readonly ["campaign_overview", "campaign_trend", "winning_steps", "sender_health", "reply_samples", "lead_runway", "compare_clients", "cross_channel_lead", "campaign_setup", "deliverability_check", "audience_lists", "vendor_read"];
25
36
  export type ToolName = (typeof TOOL_NAMES)[number];
26
37
  export interface ToolsOptions {
@@ -28,6 +39,14 @@ export interface ToolsOptions {
28
39
  readonly only?: readonly ToolName[] | undefined;
29
40
  /** More tools to offer after the built-in ones, for example `insightTools(outbound)`. */
30
41
  readonly extra?: readonly OutboundTool[] | undefined;
42
+ /**
43
+ * The most vendor requests one tool call may send, retries included,
44
+ * counted across every read the call makes. Without it a built-in tool
45
+ * call may send 100 and an insight tool call what its input can cost, at
46
+ * most 500. `Infinity` removes the default. A `maxRequestsPerCall` on the
47
+ * instance and `budget()` still apply under it.
48
+ */
49
+ readonly maxRequestsPerToolCall?: number | undefined;
31
50
  }
32
51
  /** What `next` says when the hint a tool wrote names a tool that is not on offer. */
33
52
  export declare const NEXT_FALLBACK = "Pick another of the listed tools to go further.";
@@ -27,7 +27,17 @@ export interface ToolFailure {
27
27
  readonly error: {
28
28
  readonly code: string;
29
29
  readonly message: string;
30
+ /**
31
+ * `false` when the same call fails the same way again: a request cap was
32
+ * reached, or the input or the adapter cannot work. Always set on a
33
+ * result from this package; a tool of your own may leave it out.
34
+ */
35
+ readonly retryable?: boolean | undefined;
30
36
  };
37
+ /** Set when the tool sent vendor requests before it failed. */
38
+ readonly meta?: {
39
+ readonly requests: number;
40
+ } | undefined;
31
41
  readonly next: string;
32
42
  }
33
43
  export type ToolResult = ToolFailure | ToolSuccess;
@@ -79,4 +89,13 @@ export interface MetricSummary {
79
89
  export declare const summarize: (row: MetricRow) => MetricSummary;
80
90
  /** `derived` wins over `sampled`, which wins over `exact`. */
81
91
  export declare const weakest: (all: readonly Evidence[]) => Evidence;
82
- export declare const failure: (cause: unknown) => ToolFailure;
92
+ /** The default `maxRequestsPerToolCall` of a built-in tool. */
93
+ export declare const DEFAULT_TOOL_REQUESTS = 100;
94
+ /** What a model is told after a request cap stopped a tool call. */
95
+ export declare const capNext: (cap: number, isDefault: boolean, lower?: {
96
+ readonly input: string;
97
+ readonly to: number;
98
+ readonly sure: boolean;
99
+ }) => string;
100
+ /** A thrown error as a tool result. `requests` is what the call sent before it. */
101
+ export declare const failure: (cause: unknown, requests?: number, next?: string) => ToolFailure;
@@ -1,22 +1,26 @@
1
1
  import {
2
2
  instantlyEvents
3
- } from "../chunks/chunk-A6WVOCA4.js";
3
+ } from "../chunks/chunk-BN6WCAWX.js";
4
4
  import {
5
5
  smartleadEvents
6
- } from "../chunks/chunk-IZFTTMJP.js";
6
+ } from "../chunks/chunk-EHSJGQ5K.js";
7
7
  import {
8
8
  heyreachEvents
9
- } from "../chunks/chunk-C4LS2HNV.js";
10
- import "../chunks/chunk-K4USHN4C.js";
9
+ } from "../chunks/chunk-JWGSB7PT.js";
11
10
  import {
12
- stableId
13
- } from "../chunks/chunk-FHKSLCVW.js";
11
+ emailbisonEvents
12
+ } from "../chunks/chunk-6TKFISG4.js";
13
+ import "../chunks/chunk-3S32R2MH.js";
14
14
  import "../chunks/chunk-2D42TQFU.js";
15
15
  import "../chunks/chunk-BOWXGMN3.js";
16
16
  import {
17
17
  SCHEMA_VERSION
18
18
  } from "../chunks/chunk-QGRZDTX4.js";
19
19
  import "../chunks/chunk-QAKJ76HB.js";
20
+ import "../chunks/chunk-NAWZ73QS.js";
21
+ import {
22
+ stableId
23
+ } from "../chunks/chunk-FHKSLCVW.js";
20
24
  import {
21
25
  OutboundError
22
26
  } from "../chunks/chunk-J7DDZ4C2.js";
@@ -67,7 +71,8 @@ var carriesSecret = (url, headers, secret) => {
67
71
  var FORMATS = /* @__PURE__ */ new Map([
68
72
  ["instantly", instantlyEvents("instantly")],
69
73
  ["smartlead", smartleadEvents("smartlead")],
70
- ["heyreach", heyreachEvents("heyreach")]
74
+ ["heyreach", heyreachEvents("heyreach")],
75
+ ["emailbison", emailbisonEvents("emailbison")]
71
76
  ]);
72
77
  var webhookProviders = () => [...FORMATS.keys()].toSorted();
73
78
  var memoryDedupeStore = (maxIds = 1e4) => {
@@ -203,6 +208,10 @@ var setupInstructions = (provider) => {
203
208
  "heyreach",
204
209
  "HeyReach: Integrations > Webhooks > Create webhook, one per event type. HeyReach does not sign payloads, so put a secret in the URL (https://your.app/hooks/<secret>) or add it as a custom header named x-webhook-secret, and pass the same value as `secret`."
205
210
  ],
211
+ [
212
+ "emailbison",
213
+ "EmailBison: Settings > Webhooks > New Webhook URL, per workspace. The SDK cannot check EmailBison's signature, whose scheme is undocumented, so put a secret in the URL (https://your.app/hooks/<secret>) and pass the same value as `secret`."
214
+ ],
206
215
  [
207
216
  "instantly",
208
217
  "Instantly: Settings > Integrations > Webhooks > Add webhook (Hyper Growth plan or above). Instantly does not sign payloads, so put a secret in the URL (https://your.app/hooks/<secret>) or add it as a custom header named x-webhook-secret, and pass the same value as `secret`."
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "outbound-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "One small, typed, read-only API over outbound sending tools.",
5
5
  "keywords": [
6
6
  "cold-email",
7
+ "emailbison",
7
8
  "heyreach",
8
9
  "instantly",
9
10
  "linkedin",
@@ -22,7 +23,8 @@
22
23
  "directory": "packages/outbound-sdk"
23
24
  },
24
25
  "bin": {
25
- "outbound": "./dist/cli/bin.js"
26
+ "outbound": "./dist/cli/bin.js",
27
+ "outbound-sdk": "./dist/cli/bin.js"
26
28
  },
27
29
  "files": [
28
30
  "dist"
@@ -50,6 +52,10 @@
50
52
  "types": "./dist/heyreach/index.d.ts",
51
53
  "import": "./dist/heyreach/index.js"
52
54
  },
55
+ "./emailbison": {
56
+ "types": "./dist/emailbison/index.d.ts",
57
+ "import": "./dist/emailbison/index.js"
58
+ },
53
59
  "./providers": {
54
60
  "types": "./dist/providers/index.d.ts",
55
61
  "import": "./dist/providers/index.js"
@@ -1,40 +0,0 @@
1
- import {
2
- stableId
3
- } from "./chunk-FHKSLCVW.js";
4
- import {
5
- count
6
- } from "./chunk-BLCJHP5H.js";
7
-
8
- // src/internal/sequence.ts
9
- var variantKey = (index) => String.fromCodePoint(65 + index);
10
- var toVariant = (subject, body, key) => ({
11
- body,
12
- contentHash: stableId(subject, body),
13
- subject,
14
- variantKey: key
15
- });
16
- var fromOne = (value) => {
17
- const number = count(value);
18
- return number === null || number < 1 ? null : number - 1;
19
- };
20
-
21
- // src/internal/lead-status.ts
22
- var leadStanding = (progress, outcome) => {
23
- const headline = () => {
24
- if (outcome.unsubscribed === true) {
25
- return "unsubscribed";
26
- }
27
- if (outcome.bounced === true) {
28
- return "bounced";
29
- }
30
- return outcome.replied === true ? "replied" : progress;
31
- };
32
- return { ...outcome, progress, status: headline() };
33
- };
34
-
35
- export {
36
- variantKey,
37
- toVariant,
38
- fromOne,
39
- leadStanding
40
- };
@@ -1,17 +0,0 @@
1
- import {
2
- isJsonObject
3
- } from "./chunk-BLCJHP5H.js";
4
-
5
- // src/tools/input-problem.ts
6
- var isAbsent = (input, path) => {
7
- const [key] = path;
8
- return path.length === 1 && key !== void 0 && (!isJsonObject(input) || input[String(key)] === void 0);
9
- };
10
- var inputProblem = (input, issue) => {
11
- const path = issue?.path.join(".") || "input";
12
- return isAbsent(input, issue?.path ?? []) ? `\`${path}\` is required` : `${path} ${issue?.message ?? "is invalid"}`;
13
- };
14
-
15
- export {
16
- inputProblem
17
- };
@@ -1,6 +1,3 @@
1
- import {
2
- stableId
3
- } from "./chunk-FHKSLCVW.js";
4
1
  import {
5
2
  eventData,
6
3
  refTo
@@ -8,6 +5,9 @@ import {
8
5
  import {
9
6
  SCHEMA_VERSION
10
7
  } from "./chunk-QGRZDTX4.js";
8
+ import {
9
+ stableId
10
+ } from "./chunk-FHKSLCVW.js";
11
11
  import {
12
12
  compactObject,
13
13
  emailAddress,