outbound-sdk 0.5.0 → 0.7.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.
- package/dist/alerts/check-schema.d.ts +1 -1
- package/dist/alerts/index.js +6 -6
- package/dist/audit/index.js +2 -2
- package/dist/benchmarks/index.js +4 -4
- package/dist/budget/index.js +2 -2
- package/dist/cards/format.d.ts +1 -1
- package/dist/cards/index.js +101 -62
- package/dist/cards/parts.d.ts +1 -6
- package/dist/chunks/{chunk-BLCJHP5H.js → chunk-45TXPJW7.js} +1 -0
- package/dist/chunks/chunk-4AVYRVN5.js +239 -0
- package/dist/chunks/{chunk-YYCT3NGV.js → chunk-65YAGEWZ.js} +24 -7
- package/dist/chunks/{chunk-BN6WCAWX.js → chunk-7I3EPR23.js} +3 -3
- package/dist/chunks/{chunk-3S32R2MH.js → chunk-BNDHEDHD.js} +2 -53
- package/dist/chunks/chunk-DNPNTD5W.js +81 -0
- package/dist/chunks/chunk-FALWG5U3.js +56 -0
- package/dist/chunks/{chunk-OLPMBRXM.js → chunk-GL7BABF2.js} +2 -2
- package/dist/chunks/{chunk-ZOAG2C6V.js → chunk-HIAK2GCI.js} +9 -2
- package/dist/chunks/{chunk-6TKFISG4.js → chunk-I7DXXGNZ.js} +42 -9
- package/dist/chunks/{chunk-BK5SLY32.js → chunk-JRL3QRBS.js} +264 -76
- package/dist/chunks/{chunk-EHSJGQ5K.js → chunk-KTYTE2BU.js} +4 -3
- package/dist/chunks/{chunk-JWGSB7PT.js → chunk-LD6F46UT.js} +2 -2
- package/dist/chunks/{chunk-2D42TQFU.js → chunk-LVZGIKNF.js} +2 -2
- package/dist/chunks/{chunk-PQSTQKRD.js → chunk-M2VXGLLZ.js} +35 -2
- package/dist/chunks/{chunk-5J7GGV62.js → chunk-MW4C6LTN.js} +2 -2
- package/dist/chunks/chunk-OK3GAZMT.js +51 -0
- package/dist/chunks/{chunk-BOWXGMN3.js → chunk-POBAY3TI.js} +80 -4
- package/dist/chunks/{chunk-J7DDZ4C2.js → chunk-QFC4ZHD3.js} +1 -1
- package/dist/chunks/{chunk-GFDNRWR3.js → chunk-UFQ4WMLU.js} +1 -1
- package/dist/chunks/{chunk-WGW3ROLY.js → chunk-Y7KECJAV.js} +1 -1
- package/dist/chunks/{chunk-QAKJ76HB.js → chunk-YW6FFVSZ.js} +1 -1
- package/dist/chunks/{chunk-X4RDBD4J.js → chunk-ZJCVLBAE.js} +445 -119
- package/dist/cli/bin.js +14 -14
- package/dist/cli/by-name.d.ts +28 -0
- package/dist/cli/commands.d.ts +2 -1
- package/dist/cli/config.d.ts +3 -2
- package/dist/cli/envelope.d.ts +50 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +13 -13
- package/dist/cli/listing.d.ts +13 -0
- package/dist/cli/native.d.ts +4 -0
- package/dist/cli/options.d.ts +88 -0
- package/dist/cli/output.d.ts +21 -0
- package/dist/cli/suggest.d.ts +10 -0
- package/dist/clients/index.js +6 -6
- package/dist/combine/index.js +7 -7
- package/dist/emailbison/capabilities.d.ts +1 -0
- package/dist/emailbison/index.js +38 -13
- package/dist/emailbison/map-stats.d.ts +10 -0
- package/dist/exporter/index.js +2 -2
- package/dist/failover/index.js +2 -2
- package/dist/fixtures/index.js +4 -4
- package/dist/heyreach/capabilities.d.ts +3 -0
- package/dist/heyreach/index.js +36 -12
- package/dist/heyreach/map-account.d.ts +2 -2
- package/dist/identity/index.js +2 -2
- package/dist/index.js +9 -7
- package/dist/insights/copy/audit-samples.d.ts +24 -0
- package/dist/insights/copy/audit-variant.d.ts +34 -0
- package/dist/insights/copy/copy-audit.d.ts +26 -12
- package/dist/insights/copy/copy-preview.d.ts +71 -0
- package/dist/insights/copy/copy-reuse.d.ts +0 -13
- package/dist/insights/copy/index.d.ts +15 -0
- package/dist/insights/copy/reply-timing.d.ts +4 -0
- package/dist/insights/copy/reuse-base.d.ts +0 -2
- package/dist/insights/copy/shared.d.ts +7 -9
- package/dist/insights/copy/step-funnel.d.ts +21 -18
- package/dist/insights/copy/variant-test.d.ts +2 -8
- package/dist/insights/index.js +1357 -717
- package/dist/insights/inputs.generated.d.ts +67 -34
- package/dist/insights/ops/campaign-diagnosis.d.ts +2 -2
- package/dist/insights/ops/client-report.d.ts +0 -2
- package/dist/insights/ops/diagnosis-checks.d.ts +20 -1
- package/dist/insights/ops/index.d.ts +2 -4
- package/dist/insights/ops/pipeline-forecast.d.ts +17 -6
- package/dist/insights/ops/shared.d.ts +0 -2
- package/dist/insights/people/account-summary.d.ts +14 -1
- package/dist/insights/people/auto-replies.d.ts +14 -0
- package/dist/insights/people/dropped-replies.d.ts +1 -1
- package/dist/insights/people/hot-leads.d.ts +5 -1
- package/dist/insights/people/index.d.ts +4 -0
- package/dist/insights/people/lead-collisions.d.ts +11 -2
- package/dist/insights/people/person-summary.d.ts +19 -3
- package/dist/insights/people/personalization-gaps.d.ts +14 -8
- package/dist/insights/people/suppression-check.d.ts +9 -0
- package/dist/insights/registry.d.ts +20 -8
- package/dist/insights/senders/bounce-watch.d.ts +0 -11
- package/dist/insights/senders/domain-health.d.ts +0 -7
- package/dist/insights/senders/index.d.ts +0 -4
- package/dist/insights/senders/sender-load.d.ts +0 -2
- package/dist/insights/step.d.ts +15 -0
- package/dist/insights/types.d.ts +1 -1
- package/dist/insights/variables.d.ts +35 -0
- package/dist/instantly/capabilities.d.ts +4 -0
- package/dist/instantly/index.js +265 -53
- package/dist/instantly/map-stats.d.ts +4 -0
- package/dist/instantly/stats-tracking.d.ts +19 -0
- package/dist/instantly/thread.d.ts +9 -0
- package/dist/internal/adapter.d.ts +5 -0
- package/dist/internal/auto-reply.d.ts +20 -0
- package/dist/internal/capabilities.d.ts +2 -0
- package/dist/internal/entities-account.d.ts +1 -0
- package/dist/internal/entities.d.ts +79 -2
- package/dist/internal/fields.d.ts +37 -1
- package/dist/internal/metrics.d.ts +23 -1
- package/dist/internal/outbound/api.d.ts +2 -0
- package/dist/internal/records.d.ts +2 -2
- package/dist/internal/reply-people.d.ts +37 -0
- package/dist/internal/runway.d.ts +42 -0
- package/dist/internal/sender-screen.d.ts +9 -0
- package/dist/internal/tracking.d.ts +33 -0
- package/dist/loader/index.js +4 -4
- package/dist/memory/data.d.ts +2 -1
- package/dist/memory/index.js +23 -12
- package/dist/redact/index.js +3 -3
- package/dist/smartlead/capabilities.d.ts +4 -0
- package/dist/smartlead/index.js +154 -38
- package/dist/smartlead/map-account.d.ts +3 -0
- package/dist/smartlead/stats-tracking.d.ts +22 -0
- package/dist/sync/index.js +2 -2
- package/dist/tools/ai-sdk.js +8 -7
- package/dist/tools/by-name.d.ts +18 -0
- package/dist/tools/campaign-tools.d.ts +6 -2
- package/dist/tools/claude-agent.js +8 -7
- package/dist/tools/index.js +9 -8
- package/dist/tools/shared.d.ts +7 -0
- package/dist/tracing/index.js +2 -2
- package/dist/webhooks/index.js +12 -10
- package/package.json +1 -1
- package/dist/chunks/chunk-HWHI4LFY.js +0 -102
- package/dist/internal/renamed.d.ts +0 -28
package/dist/cli/bin.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "../chunks/chunk-
|
|
3
|
-
import "../chunks/chunk-
|
|
4
|
-
import "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
6
|
-
import "../chunks/chunk-
|
|
2
|
+
import "../chunks/chunk-Y7KECJAV.js";
|
|
3
|
+
import "../chunks/chunk-ZJCVLBAE.js";
|
|
4
|
+
import "../chunks/chunk-GL7BABF2.js";
|
|
5
|
+
import "../chunks/chunk-JRL3QRBS.js";
|
|
6
|
+
import "../chunks/chunk-4AVYRVN5.js";
|
|
7
7
|
import "../chunks/chunk-4PA526S7.js";
|
|
8
8
|
import "../chunks/chunk-HZCTYL22.js";
|
|
9
|
-
import "../chunks/chunk-
|
|
9
|
+
import "../chunks/chunk-65YAGEWZ.js";
|
|
10
10
|
import "../chunks/chunk-4O2HRTTI.js";
|
|
11
11
|
import "../chunks/chunk-HPNGSG5E.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-HIAK2GCI.js";
|
|
13
13
|
import "../chunks/chunk-PTZO4QXR.js";
|
|
14
|
-
import "../chunks/chunk-
|
|
15
|
-
import "../chunks/chunk-
|
|
14
|
+
import "../chunks/chunk-POBAY3TI.js";
|
|
15
|
+
import "../chunks/chunk-M2VXGLLZ.js";
|
|
16
16
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
17
|
-
import "../chunks/chunk-
|
|
17
|
+
import "../chunks/chunk-YW6FFVSZ.js";
|
|
18
18
|
import "../chunks/chunk-NAWZ73QS.js";
|
|
19
19
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
20
|
-
import "../chunks/chunk-
|
|
21
|
-
import "../chunks/chunk-
|
|
22
|
-
import "../chunks/chunk-
|
|
23
|
-
import "../chunks/chunk-
|
|
20
|
+
import "../chunks/chunk-MW4C6LTN.js";
|
|
21
|
+
import "../chunks/chunk-UFQ4WMLU.js";
|
|
22
|
+
import "../chunks/chunk-QFC4ZHD3.js";
|
|
23
|
+
import "../chunks/chunk-45TXPJW7.js";
|
|
24
24
|
import "../chunks/chunk-WH6V3YNN.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Campaign, CampaignStatus } from "../internal/entities.ts";
|
|
2
|
+
import type { OutboundApi } from "../internal/outbound/api.ts";
|
|
3
|
+
/** `--campaign` as the ref or id to read by, or `undefined` when not given. */
|
|
4
|
+
export declare const campaignOption: (outbound: OutboundApi, value: string | undefined) => Promise<string | undefined>;
|
|
5
|
+
/** `--list` as the ref or id to read by, or `undefined` when not given. */
|
|
6
|
+
export declare const listOption: (outbound: OutboundApi, value: string | undefined) => Promise<string | undefined>;
|
|
7
|
+
/**
|
|
8
|
+
* When `leads --campaign` or `--list` found no lead, reads the campaign or
|
|
9
|
+
* list itself, so one that does not exist fails with `NotFound` as
|
|
10
|
+
* `outbound campaign <id>` does, instead of printing an empty list. It costs
|
|
11
|
+
* a request only when the list came back empty.
|
|
12
|
+
*/
|
|
13
|
+
export declare const confirmScope: (outbound: OutboundApi, scope: {
|
|
14
|
+
readonly campaignId?: string | undefined;
|
|
15
|
+
readonly listId?: string | undefined;
|
|
16
|
+
}, found: number) => Promise<void>;
|
|
17
|
+
export interface CampaignSearch {
|
|
18
|
+
readonly search: string;
|
|
19
|
+
readonly status: CampaignStatus | undefined;
|
|
20
|
+
readonly max: number;
|
|
21
|
+
/** Writes a line for the person to stderr. */
|
|
22
|
+
readonly note: (text: string) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The campaigns whose name contains `search`, ignoring case. No vendor
|
|
26
|
+
* searches campaigns by name, so every campaign is read and matched here.
|
|
27
|
+
*/
|
|
28
|
+
export declare const searchCampaigns: (outbound: OutboundApi, { max, note, search, status }: CampaignSearch) => Promise<Campaign[]>;
|
package/dist/cli/commands.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Json } from "../internal/json.ts";
|
|
2
2
|
import type { OutboundApi } from "../internal/outbound/api.ts";
|
|
3
3
|
import type { OutboundTool } from "../tools/index.ts";
|
|
4
|
+
import type { Printed } from "./envelope.ts";
|
|
4
5
|
export interface CommandInput {
|
|
5
6
|
readonly positionals: readonly string[];
|
|
6
7
|
readonly flags: Readonly<Record<string, string | boolean | undefined>>;
|
|
7
8
|
/** Writes a line for the person to stderr, apart from the JSON on stdout. */
|
|
8
9
|
readonly note: (text: string) => void;
|
|
9
10
|
}
|
|
10
|
-
type Command = (outbound: OutboundApi, input: CommandInput) => Promise<
|
|
11
|
+
type Command = (outbound: OutboundApi, input: CommandInput) => Promise<Printed>;
|
|
11
12
|
/** The tools `outbound mcp` offers: the built-in ones, then the insights. */
|
|
12
13
|
export declare const offeredTools: (outbound: OutboundApi) => Promise<OutboundTool[]>;
|
|
13
14
|
export interface CommandSpec {
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface PluginFlags {
|
|
|
17
17
|
* The plugins for one command, outermost first: redact, then the config
|
|
18
18
|
* file's plugins, then cache, then budget, then identity, next to the
|
|
19
19
|
* request engine.
|
|
20
|
-
* `mcp` turns redact on unless `--no-redact` is set.
|
|
20
|
+
* `mcp` turns redact on unless `--no-redact` is set. `note` gets a line for
|
|
21
|
+
* stderr when a flag will not do what its name suggests.
|
|
21
22
|
*/
|
|
22
|
-
export declare const pluginsFor: (flags: PluginFlags, mcp: boolean) => Promise<OutboundPlugin[]>;
|
|
23
|
+
export declare const pluginsFor: (flags: PluginFlags, mcp: boolean, note: (text: string) => void) => Promise<OutboundPlugin[]>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Json, JsonObject } from "../internal/json.ts";
|
|
2
|
+
import type { OutboundPlugin } from "../internal/outbound/plugins.ts";
|
|
3
|
+
/** How much of what was asked an answer covers. */
|
|
4
|
+
export interface Coverage {
|
|
5
|
+
/** `true` all of it, `false` part of it (`notes` says why). */
|
|
6
|
+
readonly complete: boolean;
|
|
7
|
+
readonly notes: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
/** An answer with what the JSON itself cannot carry: whether `--limit` cut a list. */
|
|
10
|
+
export declare class Answer {
|
|
11
|
+
readonly value: Json;
|
|
12
|
+
readonly coverage: Coverage;
|
|
13
|
+
/** `true` for a list, which the envelope puts in `data.items`. */
|
|
14
|
+
readonly list: boolean;
|
|
15
|
+
constructor(value: Json, coverage: Coverage, list?: boolean);
|
|
16
|
+
/** How many records a list holds; 0 for an answer that is not a list. */
|
|
17
|
+
get size(): number;
|
|
18
|
+
}
|
|
19
|
+
/** What a command printed, as the printer receives it. */
|
|
20
|
+
export type Printed = Json | Answer;
|
|
21
|
+
export declare const valueOf: (printed: Printed) => Json;
|
|
22
|
+
/**
|
|
23
|
+
* What the answer says about its own coverage: a tool result, record, stats,
|
|
24
|
+
* thread or insight says it in its `meta`. A failed tool result is not
|
|
25
|
+
* complete. An answer with no `meta`, such as `capabilities` or `tools`, is
|
|
26
|
+
* read in full, so it is complete.
|
|
27
|
+
*/
|
|
28
|
+
export declare const coverageOf: (printed: Printed) => Coverage;
|
|
29
|
+
/** Several sections printed together, keyed by name: complete only when each is. */
|
|
30
|
+
export declare const sections: (entries: readonly (readonly [string, Printed])[]) => Answer;
|
|
31
|
+
/** What the run knows besides the answer. */
|
|
32
|
+
export interface RunFacts {
|
|
33
|
+
/** The adapter's id, or `null` before one was chosen. */
|
|
34
|
+
readonly provider: string | null;
|
|
35
|
+
/** Vendor requests the command sent. */
|
|
36
|
+
readonly requests: number;
|
|
37
|
+
}
|
|
38
|
+
/** Counts every vendor request the command sends, for `meta.requests`. */
|
|
39
|
+
export declare const requestCounter: () => OutboundPlugin & {
|
|
40
|
+
readonly sent: () => number;
|
|
41
|
+
};
|
|
42
|
+
/** The answer in the envelope. */
|
|
43
|
+
export declare const envelope: (printed: Printed, facts: RunFacts) => JsonObject;
|
|
44
|
+
/** Why a command failed: the code and message stderr prints. */
|
|
45
|
+
export interface Failure {
|
|
46
|
+
readonly code: string;
|
|
47
|
+
readonly message: string;
|
|
48
|
+
}
|
|
49
|
+
/** A command that threw, in the envelope. stderr still gets the one-line reason. */
|
|
50
|
+
export declare const failedEnvelope: (failure: Failure, facts: RunFacts) => JsonObject;
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Adapter } from "../internal/adapter.ts";
|
|
2
|
+
import type { OutboundOptions } from "../internal/outbound/outbound.ts";
|
|
2
3
|
export { defineConfig } from "./config.ts";
|
|
3
4
|
export type { CliConfig } from "./config.ts";
|
|
4
5
|
export { createMcpServer, PROTOCOL_VERSIONS } from "./mcp.ts";
|
|
@@ -13,6 +14,8 @@ export interface CliIo {
|
|
|
13
14
|
readonly stdin?: (() => AsyncIterable<string> | Iterable<string>) | undefined;
|
|
14
15
|
/** Replaces the adapter the environment would choose. Meant for tests. */
|
|
15
16
|
readonly adapter?: Adapter | undefined;
|
|
17
|
+
/** Replaces the `fetch` vendor requests are sent with. Meant for tests. */
|
|
18
|
+
readonly fetch?: OutboundOptions["fetch"];
|
|
16
19
|
/** Runs npm for `outbound update` and resolves to its output. Meant for tests. */
|
|
17
20
|
readonly npm?: ((args: readonly string[]) => Promise<string>) | undefined;
|
|
18
21
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
defineConfig,
|
|
5
5
|
run,
|
|
6
6
|
serveStdio
|
|
7
|
-
} from "../chunks/chunk-
|
|
8
|
-
import "../chunks/chunk-
|
|
9
|
-
import "../chunks/chunk-
|
|
10
|
-
import "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-ZJCVLBAE.js";
|
|
8
|
+
import "../chunks/chunk-GL7BABF2.js";
|
|
9
|
+
import "../chunks/chunk-JRL3QRBS.js";
|
|
10
|
+
import "../chunks/chunk-4AVYRVN5.js";
|
|
11
11
|
import "../chunks/chunk-4PA526S7.js";
|
|
12
12
|
import "../chunks/chunk-HZCTYL22.js";
|
|
13
|
-
import "../chunks/chunk-
|
|
13
|
+
import "../chunks/chunk-65YAGEWZ.js";
|
|
14
14
|
import "../chunks/chunk-4O2HRTTI.js";
|
|
15
15
|
import "../chunks/chunk-HPNGSG5E.js";
|
|
16
|
-
import "../chunks/chunk-
|
|
16
|
+
import "../chunks/chunk-HIAK2GCI.js";
|
|
17
17
|
import "../chunks/chunk-PTZO4QXR.js";
|
|
18
|
-
import "../chunks/chunk-
|
|
19
|
-
import "../chunks/chunk-
|
|
18
|
+
import "../chunks/chunk-POBAY3TI.js";
|
|
19
|
+
import "../chunks/chunk-M2VXGLLZ.js";
|
|
20
20
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
21
|
-
import "../chunks/chunk-
|
|
21
|
+
import "../chunks/chunk-YW6FFVSZ.js";
|
|
22
22
|
import "../chunks/chunk-NAWZ73QS.js";
|
|
23
23
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
24
|
-
import "../chunks/chunk-
|
|
25
|
-
import "../chunks/chunk-
|
|
26
|
-
import "../chunks/chunk-
|
|
27
|
-
import "../chunks/chunk-
|
|
24
|
+
import "../chunks/chunk-MW4C6LTN.js";
|
|
25
|
+
import "../chunks/chunk-UFQ4WMLU.js";
|
|
26
|
+
import "../chunks/chunk-QFC4ZHD3.js";
|
|
27
|
+
import "../chunks/chunk-45TXPJW7.js";
|
|
28
28
|
import "../chunks/chunk-WH6V3YNN.js";
|
|
29
29
|
export {
|
|
30
30
|
PROTOCOL_VERSIONS,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Reply } from "../internal/entities.ts";
|
|
2
|
+
import type { ListAll } from "../internal/outbound/api.ts";
|
|
3
|
+
import { Answer } from "./envelope.ts";
|
|
4
|
+
export declare const listing: <Item>(walk: ListAll<Item>, input: {
|
|
5
|
+
readonly note: (text: string) => void;
|
|
6
|
+
}, one: string, many?: string) => Promise<Answer>;
|
|
7
|
+
/**
|
|
8
|
+
* Replies, one record per message or, `byPerson`, one row per person. A note
|
|
9
|
+
* says how many people sent them, since each record is a message.
|
|
10
|
+
*/
|
|
11
|
+
export declare const listedReplies: (walk: ListAll<Reply>, input: {
|
|
12
|
+
readonly note: (text: string) => void;
|
|
13
|
+
}, byPerson: boolean) => Promise<Answer>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Json } from "../internal/json.ts";
|
|
2
|
+
import type { OutboundApi } from "../internal/outbound/api.ts";
|
|
3
|
+
/** Runs the native read `name` with the parameters `params` gives, once the name is known. */
|
|
4
|
+
export declare const readNative: (outbound: OutboundApi, name: string, params: () => Json) => Promise<Json>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const OPTIONS: {
|
|
2
|
+
readonly bodies: {
|
|
3
|
+
readonly type: "boolean";
|
|
4
|
+
};
|
|
5
|
+
readonly by: {
|
|
6
|
+
readonly type: "string";
|
|
7
|
+
};
|
|
8
|
+
readonly cache: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
};
|
|
11
|
+
readonly campaign: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
};
|
|
14
|
+
readonly card: {
|
|
15
|
+
readonly type: "boolean";
|
|
16
|
+
};
|
|
17
|
+
readonly category: {
|
|
18
|
+
readonly type: "string";
|
|
19
|
+
};
|
|
20
|
+
readonly compact: {
|
|
21
|
+
readonly type: "boolean";
|
|
22
|
+
};
|
|
23
|
+
readonly config: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
};
|
|
26
|
+
readonly from: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
};
|
|
29
|
+
readonly help: {
|
|
30
|
+
readonly short: "h";
|
|
31
|
+
readonly type: "boolean";
|
|
32
|
+
};
|
|
33
|
+
readonly input: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
};
|
|
36
|
+
readonly limit: {
|
|
37
|
+
readonly type: "string";
|
|
38
|
+
};
|
|
39
|
+
readonly list: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
};
|
|
42
|
+
readonly "max-requests": {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
};
|
|
45
|
+
readonly "no-redact": {
|
|
46
|
+
readonly type: "boolean";
|
|
47
|
+
};
|
|
48
|
+
readonly provider: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
};
|
|
51
|
+
readonly raw: {
|
|
52
|
+
readonly type: "boolean";
|
|
53
|
+
};
|
|
54
|
+
readonly redact: {
|
|
55
|
+
readonly type: "boolean";
|
|
56
|
+
};
|
|
57
|
+
readonly search: {
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
};
|
|
60
|
+
readonly sequence: {
|
|
61
|
+
readonly type: "boolean";
|
|
62
|
+
};
|
|
63
|
+
readonly settings: {
|
|
64
|
+
readonly type: "boolean";
|
|
65
|
+
};
|
|
66
|
+
readonly since: {
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
};
|
|
69
|
+
readonly slack: {
|
|
70
|
+
readonly type: "boolean";
|
|
71
|
+
};
|
|
72
|
+
readonly stats: {
|
|
73
|
+
readonly type: "boolean";
|
|
74
|
+
};
|
|
75
|
+
readonly status: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
};
|
|
78
|
+
readonly subsequences: {
|
|
79
|
+
readonly type: "boolean";
|
|
80
|
+
};
|
|
81
|
+
readonly to: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
};
|
|
84
|
+
readonly version: {
|
|
85
|
+
readonly short: "v";
|
|
86
|
+
readonly type: "boolean";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Json } from "../internal/json.ts";
|
|
2
|
+
import type { Failure, Printed, RunFacts } from "./envelope.ts";
|
|
3
|
+
/** The CLI's own `--compact` and `--raw`. */
|
|
4
|
+
export interface PrintOptions {
|
|
5
|
+
readonly compact?: boolean | undefined;
|
|
6
|
+
readonly raw?: boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
/** The answer with `raw` taken off every record in it, at any depth. */
|
|
9
|
+
export declare const withoutRaw: (value: Json) => Json;
|
|
10
|
+
/** Prints JSON as it is: indented, or on one line with `--compact`. */
|
|
11
|
+
export declare const printJson: (write: (text: string) => void, value: Json, options: PrintOptions) => void;
|
|
12
|
+
/** Prints a command's answer in the envelope (see `envelope.ts`). */
|
|
13
|
+
export declare const printAnswer: (write: (text: string) => void, printed: Printed, options: PrintOptions, facts: RunFacts) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Prints a command that failed in the envelope, so stdout keeps its shape.
|
|
16
|
+
* Parsing may have failed first, so `--compact` is read from the arguments.
|
|
17
|
+
*/
|
|
18
|
+
export declare const printFailure: (write: (text: string) => void, run: {
|
|
19
|
+
readonly argv: readonly string[];
|
|
20
|
+
readonly name: string | undefined;
|
|
21
|
+
}, failure: Failure, facts: RunFacts) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edits between two words: an insertion, a deletion, a substitution or a
|
|
3
|
+
* swap of two neighbouring letters each count one, so `campaing` is one edit
|
|
4
|
+
* from `campaign`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const distance: (from: string, to: string) => number;
|
|
7
|
+
/** The known words at most two edits away, closest first. */
|
|
8
|
+
export declare const closest: (typed: string, known: Iterable<string>) => string[];
|
|
9
|
+
/** ` Did you mean "a" or "b"?`, or nothing when no known word is close. */
|
|
10
|
+
export declare const didYouMean: (typed: string, known: Iterable<string>, prefix?: string) => string;
|
package/dist/clients/index.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "../chunks/chunk-HZCTYL22.js";
|
|
4
4
|
import {
|
|
5
5
|
emptyCounts,
|
|
6
|
-
|
|
7
|
-
} from "../chunks/chunk-
|
|
6
|
+
sumMeasured
|
|
7
|
+
} from "../chunks/chunk-M2VXGLLZ.js";
|
|
8
8
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
9
9
|
import {
|
|
10
10
|
parseRef
|
|
11
|
-
} from "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
13
|
-
import "../chunks/chunk-
|
|
11
|
+
} from "../chunks/chunk-YW6FFVSZ.js";
|
|
12
|
+
import "../chunks/chunk-QFC4ZHD3.js";
|
|
13
|
+
import "../chunks/chunk-45TXPJW7.js";
|
|
14
14
|
|
|
15
15
|
// src/clients/plugin.ts
|
|
16
16
|
var UNASSIGNED = "unassigned";
|
|
@@ -100,7 +100,7 @@ var clientStats = async (outbound, options) => {
|
|
|
100
100
|
const clientsRead = [...byClient.entries()].map(([client, rows]) => ({
|
|
101
101
|
campaigns: rows.length,
|
|
102
102
|
client,
|
|
103
|
-
counts: rows.length === 0 ? emptyCounts() :
|
|
103
|
+
counts: rows.length === 0 ? emptyCounts() : sumMeasured(rows)
|
|
104
104
|
})).toSorted((left, right) => left.client.localeCompare(right.client));
|
|
105
105
|
return { clients: clientsRead, requests };
|
|
106
106
|
};
|
package/dist/combine/index.js
CHANGED
|
@@ -3,23 +3,23 @@ import {
|
|
|
3
3
|
mergeFields,
|
|
4
4
|
resolveCapabilities,
|
|
5
5
|
resolveFields
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-HIAK2GCI.js";
|
|
7
7
|
import {
|
|
8
8
|
recordBase
|
|
9
|
-
} from "../chunks/chunk-
|
|
10
|
-
import "../chunks/chunk-
|
|
9
|
+
} from "../chunks/chunk-LVZGIKNF.js";
|
|
10
|
+
import "../chunks/chunk-POBAY3TI.js";
|
|
11
11
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
12
12
|
import {
|
|
13
13
|
parseRef
|
|
14
|
-
} from "../chunks/chunk-
|
|
14
|
+
} from "../chunks/chunk-YW6FFVSZ.js";
|
|
15
15
|
import {
|
|
16
16
|
OutboundError,
|
|
17
17
|
makeErrorMapper
|
|
18
|
-
} from "../chunks/chunk-
|
|
18
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
19
19
|
import {
|
|
20
20
|
count,
|
|
21
21
|
field
|
|
22
|
-
} from "../chunks/chunk-
|
|
22
|
+
} from "../chunks/chunk-45TXPJW7.js";
|
|
23
23
|
|
|
24
24
|
// src/combine/route.ts
|
|
25
25
|
var COMBINED = "combined";
|
|
@@ -252,7 +252,7 @@ var lists = (members) => ({
|
|
|
252
252
|
}
|
|
253
253
|
return member.listLeads(scoped, memberCtx);
|
|
254
254
|
};
|
|
255
|
-
const lookup = query.email !== void 0 || query.linkedinUrl !== void 0;
|
|
255
|
+
const lookup = query.email !== void 0 || query.linkedinUrl !== void 0 || query.domain !== void 0;
|
|
256
256
|
if (lookup && query.campaignId === void 0) {
|
|
257
257
|
return pageTogether(
|
|
258
258
|
members,
|
package/dist/emailbison/index.js
CHANGED
|
@@ -22,7 +22,13 @@ import {
|
|
|
22
22
|
toTag,
|
|
23
23
|
toWebhook,
|
|
24
24
|
toWorkspace
|
|
25
|
-
} from "../chunks/chunk-
|
|
25
|
+
} from "../chunks/chunk-I7DXXGNZ.js";
|
|
26
|
+
import {
|
|
27
|
+
applyTracking,
|
|
28
|
+
ownTracking,
|
|
29
|
+
unlessFailed
|
|
30
|
+
} from "../chunks/chunk-DNPNTD5W.js";
|
|
31
|
+
import "../chunks/chunk-OK3GAZMT.js";
|
|
26
32
|
import {
|
|
27
33
|
flatMapPage,
|
|
28
34
|
mapPage,
|
|
@@ -32,7 +38,8 @@ import {
|
|
|
32
38
|
import {
|
|
33
39
|
toVariant,
|
|
34
40
|
variantKey
|
|
35
|
-
} from "../chunks/chunk-
|
|
41
|
+
} from "../chunks/chunk-BNDHEDHD.js";
|
|
42
|
+
import "../chunks/chunk-FALWG5U3.js";
|
|
36
43
|
import {
|
|
37
44
|
defineNative,
|
|
38
45
|
inPath,
|
|
@@ -42,34 +49,35 @@ import {
|
|
|
42
49
|
import {
|
|
43
50
|
recordBase,
|
|
44
51
|
refTo
|
|
45
|
-
} from "../chunks/chunk-
|
|
46
|
-
import "../chunks/chunk-
|
|
52
|
+
} from "../chunks/chunk-LVZGIKNF.js";
|
|
53
|
+
import "../chunks/chunk-POBAY3TI.js";
|
|
47
54
|
import {
|
|
48
55
|
emptyCounts,
|
|
49
56
|
metricRow,
|
|
50
57
|
sumCounts
|
|
51
|
-
} from "../chunks/chunk-
|
|
58
|
+
} from "../chunks/chunk-M2VXGLLZ.js";
|
|
52
59
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
53
60
|
import {
|
|
54
61
|
assertWorkspaceId
|
|
55
|
-
} from "../chunks/chunk-
|
|
62
|
+
} from "../chunks/chunk-YW6FFVSZ.js";
|
|
56
63
|
import "../chunks/chunk-NAWZ73QS.js";
|
|
57
64
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
58
65
|
import {
|
|
59
66
|
readEnv,
|
|
60
67
|
requireCredential
|
|
61
|
-
} from "../chunks/chunk-
|
|
68
|
+
} from "../chunks/chunk-UFQ4WMLU.js";
|
|
62
69
|
import {
|
|
63
70
|
OutboundError,
|
|
64
71
|
makeErrorMapper
|
|
65
|
-
} from "../chunks/chunk-
|
|
72
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
66
73
|
import {
|
|
67
74
|
count,
|
|
68
75
|
field,
|
|
76
|
+
flag,
|
|
69
77
|
isJsonArray,
|
|
70
78
|
objects,
|
|
71
79
|
text
|
|
72
|
-
} from "../chunks/chunk-
|
|
80
|
+
} from "../chunks/chunk-45TXPJW7.js";
|
|
73
81
|
|
|
74
82
|
// src/emailbison/account.ts
|
|
75
83
|
var DAY_MS = 864e5;
|
|
@@ -464,6 +472,17 @@ var readSteps = async (client, ctx, scope, range2) => {
|
|
|
464
472
|
);
|
|
465
473
|
return stepRows2(scope, summary, stepPlaces(steps));
|
|
466
474
|
};
|
|
475
|
+
var judged = async (client, ctx, scope, rows) => {
|
|
476
|
+
const path = `/api/campaigns/${id(scope)}`;
|
|
477
|
+
const flags = await unlessFailed(async () => ({
|
|
478
|
+
clicks: null,
|
|
479
|
+
opens: flag(client.one(await client.get(ctx, path), path).open_tracking)
|
|
480
|
+
}));
|
|
481
|
+
return applyTracking(
|
|
482
|
+
rows,
|
|
483
|
+
flags === null ? null : [ownTracking(flags, rows)]
|
|
484
|
+
);
|
|
485
|
+
};
|
|
467
486
|
var readStats = async (client, ctx, query, now = Date.now()) => {
|
|
468
487
|
const { provider } = client.identity;
|
|
469
488
|
if (query.scope === "campaign" && query.scopeId === void 0) {
|
|
@@ -486,22 +505,28 @@ var readStats = async (client, ctx, query, now = Date.now()) => {
|
|
|
486
505
|
{ provider }
|
|
487
506
|
);
|
|
488
507
|
}
|
|
489
|
-
|
|
508
|
+
const days = await readDaily(client, ctx, scope, rangeOf(query, true, now));
|
|
509
|
+
return query.scope === "campaign" ? await judged(client, ctx, scope, days) : days;
|
|
490
510
|
}
|
|
491
511
|
const range2 = rangeOf(query, false, now);
|
|
492
512
|
if (query.scope === "sender") {
|
|
493
513
|
return await readSender(client, ctx, scope, query, now);
|
|
494
514
|
}
|
|
495
515
|
if (query.scope === "step") {
|
|
496
|
-
return await
|
|
516
|
+
return await judged(
|
|
517
|
+
client,
|
|
518
|
+
ctx,
|
|
519
|
+
scope,
|
|
520
|
+
await readSteps(client, ctx, scope, range2)
|
|
521
|
+
);
|
|
497
522
|
}
|
|
498
523
|
if (query.scope === "campaign") {
|
|
499
|
-
return [
|
|
524
|
+
return await judged(client, ctx, scope, [
|
|
500
525
|
metricRow(
|
|
501
526
|
scope,
|
|
502
527
|
summaryCounts(await campaignSummary(client, ctx, scope, range2))
|
|
503
528
|
)
|
|
504
|
-
];
|
|
529
|
+
]);
|
|
505
530
|
}
|
|
506
531
|
const path = "/api/workspaces/v1.1/stats";
|
|
507
532
|
return [
|
|
@@ -39,6 +39,16 @@ export declare const summedRow: (scope: RowScope, rows: readonly MetricRow[]) =>
|
|
|
39
39
|
unsubscribed: number | null;
|
|
40
40
|
variantKey: string | null;
|
|
41
41
|
workspaceId: string;
|
|
42
|
+
completed?: number | null | undefined;
|
|
43
|
+
leads?: number | null | undefined;
|
|
44
|
+
opportunities?: number | null | undefined;
|
|
45
|
+
opportunityValue?: number | null | undefined;
|
|
46
|
+
repliedAutoTotal?: number | null | undefined;
|
|
47
|
+
repliedTotal?: number | null | undefined;
|
|
48
|
+
tracking?: {
|
|
49
|
+
clicks: "mixed" | "off" | "on" | null;
|
|
50
|
+
opens: "mixed" | "off" | "on" | null;
|
|
51
|
+
} | undefined;
|
|
42
52
|
};
|
|
43
53
|
/**
|
|
44
54
|
* A row per step of `sequence_step_stats`. `places` says where each step id
|
package/dist/exporter/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OutboundError
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
4
4
|
import {
|
|
5
5
|
isJsonObject,
|
|
6
6
|
toJson
|
|
7
|
-
} from "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-45TXPJW7.js";
|
|
8
8
|
|
|
9
9
|
// src/exporter/index.ts
|
|
10
10
|
import { open } from "node:fs/promises";
|
package/dist/failover/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
5
5
|
import {
|
|
6
6
|
OutboundError
|
|
7
|
-
} from "../chunks/chunk-
|
|
8
|
-
import "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
8
|
+
import "../chunks/chunk-45TXPJW7.js";
|
|
9
9
|
|
|
10
10
|
// src/failover/index.ts
|
|
11
11
|
var WEEK_SECONDS = 7 * 24 * 60 * 60;
|
package/dist/fixtures/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
evidenceSchema
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-POBAY3TI.js";
|
|
4
4
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
5
5
|
import {
|
|
6
6
|
makeRef,
|
|
7
7
|
parseRef
|
|
8
|
-
} from "../chunks/chunk-
|
|
8
|
+
} from "../chunks/chunk-YW6FFVSZ.js";
|
|
9
9
|
import {
|
|
10
10
|
profileSlug
|
|
11
11
|
} from "../chunks/chunk-NAWZ73QS.js";
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
} from "../chunks/chunk-FHKSLCVW.js";
|
|
15
15
|
import {
|
|
16
16
|
OutboundError
|
|
17
|
-
} from "../chunks/chunk-
|
|
17
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
18
18
|
import {
|
|
19
19
|
field,
|
|
20
20
|
objects,
|
|
21
21
|
parseJson,
|
|
22
22
|
toJson
|
|
23
|
-
} from "../chunks/chunk-
|
|
23
|
+
} from "../chunks/chunk-45TXPJW7.js";
|
|
24
24
|
|
|
25
25
|
// src/fixtures/index.ts
|
|
26
26
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|