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.
- 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/index.js +54 -44
- 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-3JOC5DGD.js → chunk-6NSCPTOY.js} +488 -127
- package/dist/chunks/{chunk-W22SDX6S.js → chunk-7I3EPR23.js} +3 -3
- package/dist/chunks/{chunk-MGR6HREO.js → chunk-BNDHEDHD.js} +2 -2
- package/dist/chunks/chunk-DNPNTD5W.js +81 -0
- package/dist/chunks/{chunk-53DCVFUB.js → chunk-FALWG5U3.js} +1 -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-SXGCKCAR.js → chunk-I7DXXGNZ.js} +40 -9
- package/dist/chunks/{chunk-BK5SLY32.js → chunk-JRL3QRBS.js} +264 -76
- package/dist/chunks/{chunk-PHNQ3WC2.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-UWUPUMM2.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-TFICTGM2.js → chunk-T5MJMW3R.js} +1 -1
- package/dist/chunks/{chunk-GFDNRWR3.js → chunk-UFQ4WMLU.js} +1 -1
- package/dist/chunks/{chunk-QAKJ76HB.js → chunk-YW6FFVSZ.js} +1 -1
- 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 +5 -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 +13 -1
- package/dist/cli/suggest.d.ts +10 -0
- package/dist/cli/update.d.ts +25 -2
- 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 -14
- 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 +34 -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 +16 -3
- package/dist/insights/copy/index.d.ts +6 -0
- package/dist/insights/copy/reply-timing.d.ts +4 -0
- package/dist/insights/copy/shared.d.ts +4 -1
- package/dist/insights/copy/step-funnel.d.ts +20 -6
- package/dist/insights/copy/variant-test.d.ts +2 -3
- package/dist/insights/index.js +1138 -589
- package/dist/insights/inputs.generated.d.ts +47 -11
- package/dist/insights/ops/campaign-diagnosis.d.ts +2 -0
- package/dist/insights/ops/diagnosis-checks.d.ts +20 -1
- package/dist/insights/ops/index.d.ts +2 -0
- package/dist/insights/ops/pipeline-forecast.d.ts +17 -6
- 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 +12 -0
- package/dist/insights/step.d.ts +15 -0
- package/dist/insights/variables.d.ts +2 -0
- package/dist/instantly/capabilities.d.ts +4 -0
- package/dist/instantly/index.js +263 -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 +152 -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 -11
- package/package.json +1 -1
- package/dist/chunks/chunk-HWHI4LFY.js +0 -102
|
@@ -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
|
+
};
|
package/dist/cli/output.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Json } from "../internal/json.ts";
|
|
2
|
+
import type { Failure, Printed, RunFacts } from "./envelope.ts";
|
|
2
3
|
/** The CLI's own `--compact` and `--raw`. */
|
|
3
4
|
export interface PrintOptions {
|
|
4
5
|
readonly compact?: boolean | undefined;
|
|
@@ -6,4 +7,15 @@ export interface PrintOptions {
|
|
|
6
7
|
}
|
|
7
8
|
/** The answer with `raw` taken off every record in it, at any depth. */
|
|
8
9
|
export declare const withoutRaw: (value: Json) => Json;
|
|
9
|
-
|
|
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/cli/update.d.ts
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
/** Runs npm with these arguments and resolves to what it printed. */
|
|
2
2
|
export type NpmRunner = (args: readonly string[]) => Promise<string>;
|
|
3
3
|
export declare const STANDALONE: ReadonlyMap<string, readonly string[]>;
|
|
4
|
+
/** npm failed. `code` is npm's error code, such as `E404`, when it printed one. */
|
|
5
|
+
export declare class NpmFailedError extends Error {
|
|
6
|
+
readonly code: string | undefined;
|
|
7
|
+
constructor(message: string, code: string | undefined, cause: unknown);
|
|
8
|
+
}
|
|
9
|
+
/** What npm said when it failed. */
|
|
10
|
+
interface NpmReason {
|
|
11
|
+
/** npm's error code, such as `E404`. */
|
|
12
|
+
readonly code: string | undefined;
|
|
13
|
+
/** The first line that says what went wrong. */
|
|
14
|
+
readonly said: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* npm's code and the first line that says what went wrong. npm ends every
|
|
18
|
+
* failure with "A complete log of this run can be found in: ...", so the last
|
|
19
|
+
* line says nothing. npm starts its explanation lines with a tag, such as
|
|
20
|
+
* `404`, `notarget` or the code in lower case, which is dropped.
|
|
21
|
+
*/
|
|
22
|
+
export declare const npmReason: (stderr: string) => NpmReason;
|
|
4
23
|
export declare const runNpm: NpmRunner;
|
|
24
|
+
/** Waits this many milliseconds. */
|
|
25
|
+
export type Sleep = (ms: number) => Promise<void>;
|
|
26
|
+
export declare const sleep: Sleep;
|
|
5
27
|
/** Checks npm for a newer version and updates a global install. */
|
|
6
|
-
export declare const update: (npm: NpmRunner, say: (text: string) => void) => Promise<void>;
|
|
28
|
+
export declare const update: (npm: NpmRunner, say: (text: string) => void, wait?: Sleep) => Promise<void>;
|
|
7
29
|
/**
|
|
8
30
|
* Runs `version` (also a bare `--version`) or `update`, and says whether it
|
|
9
31
|
* did. Version comes before help, which is what no command at all prints;
|
|
@@ -12,4 +34,5 @@ export declare const update: (npm: NpmRunner, say: (text: string) => void) => Pr
|
|
|
12
34
|
export declare const runSelf: (name: string | undefined, flags: {
|
|
13
35
|
readonly help?: boolean;
|
|
14
36
|
readonly version?: boolean;
|
|
15
|
-
}, npm: NpmRunner, say: (text: string) => void) => Promise<boolean>;
|
|
37
|
+
}, npm: NpmRunner, say: (text: string) => void, wait?: Sleep) => Promise<boolean>;
|
|
38
|
+
export {};
|
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,8 +38,8 @@ import {
|
|
|
32
38
|
import {
|
|
33
39
|
toVariant,
|
|
34
40
|
variantKey
|
|
35
|
-
} from "../chunks/chunk-
|
|
36
|
-
import "../chunks/chunk-
|
|
41
|
+
} from "../chunks/chunk-BNDHEDHD.js";
|
|
42
|
+
import "../chunks/chunk-FALWG5U3.js";
|
|
37
43
|
import {
|
|
38
44
|
defineNative,
|
|
39
45
|
inPath,
|
|
@@ -43,34 +49,35 @@ import {
|
|
|
43
49
|
import {
|
|
44
50
|
recordBase,
|
|
45
51
|
refTo
|
|
46
|
-
} from "../chunks/chunk-
|
|
47
|
-
import "../chunks/chunk-
|
|
52
|
+
} from "../chunks/chunk-LVZGIKNF.js";
|
|
53
|
+
import "../chunks/chunk-POBAY3TI.js";
|
|
48
54
|
import {
|
|
49
55
|
emptyCounts,
|
|
50
56
|
metricRow,
|
|
51
57
|
sumCounts
|
|
52
|
-
} from "../chunks/chunk-
|
|
58
|
+
} from "../chunks/chunk-M2VXGLLZ.js";
|
|
53
59
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
54
60
|
import {
|
|
55
61
|
assertWorkspaceId
|
|
56
|
-
} from "../chunks/chunk-
|
|
62
|
+
} from "../chunks/chunk-YW6FFVSZ.js";
|
|
57
63
|
import "../chunks/chunk-NAWZ73QS.js";
|
|
58
64
|
import "../chunks/chunk-FHKSLCVW.js";
|
|
59
65
|
import {
|
|
60
66
|
readEnv,
|
|
61
67
|
requireCredential
|
|
62
|
-
} from "../chunks/chunk-
|
|
68
|
+
} from "../chunks/chunk-UFQ4WMLU.js";
|
|
63
69
|
import {
|
|
64
70
|
OutboundError,
|
|
65
71
|
makeErrorMapper
|
|
66
|
-
} from "../chunks/chunk-
|
|
72
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
67
73
|
import {
|
|
68
74
|
count,
|
|
69
75
|
field,
|
|
76
|
+
flag,
|
|
70
77
|
isJsonArray,
|
|
71
78
|
objects,
|
|
72
79
|
text
|
|
73
|
-
} from "../chunks/chunk-
|
|
80
|
+
} from "../chunks/chunk-45TXPJW7.js";
|
|
74
81
|
|
|
75
82
|
// src/emailbison/account.ts
|
|
76
83
|
var DAY_MS = 864e5;
|
|
@@ -465,6 +472,17 @@ var readSteps = async (client, ctx, scope, range2) => {
|
|
|
465
472
|
);
|
|
466
473
|
return stepRows2(scope, summary, stepPlaces(steps));
|
|
467
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
|
+
};
|
|
468
486
|
var readStats = async (client, ctx, query, now = Date.now()) => {
|
|
469
487
|
const { provider } = client.identity;
|
|
470
488
|
if (query.scope === "campaign" && query.scopeId === void 0) {
|
|
@@ -487,22 +505,28 @@ var readStats = async (client, ctx, query, now = Date.now()) => {
|
|
|
487
505
|
{ provider }
|
|
488
506
|
);
|
|
489
507
|
}
|
|
490
|
-
|
|
508
|
+
const days = await readDaily(client, ctx, scope, rangeOf(query, true, now));
|
|
509
|
+
return query.scope === "campaign" ? await judged(client, ctx, scope, days) : days;
|
|
491
510
|
}
|
|
492
511
|
const range2 = rangeOf(query, false, now);
|
|
493
512
|
if (query.scope === "sender") {
|
|
494
513
|
return await readSender(client, ctx, scope, query, now);
|
|
495
514
|
}
|
|
496
515
|
if (query.scope === "step") {
|
|
497
|
-
return await
|
|
516
|
+
return await judged(
|
|
517
|
+
client,
|
|
518
|
+
ctx,
|
|
519
|
+
scope,
|
|
520
|
+
await readSteps(client, ctx, scope, range2)
|
|
521
|
+
);
|
|
498
522
|
}
|
|
499
523
|
if (query.scope === "campaign") {
|
|
500
|
-
return [
|
|
524
|
+
return await judged(client, ctx, scope, [
|
|
501
525
|
metricRow(
|
|
502
526
|
scope,
|
|
503
527
|
summaryCounts(await campaignSummary(client, ctx, scope, range2))
|
|
504
528
|
)
|
|
505
|
-
];
|
|
529
|
+
]);
|
|
506
530
|
}
|
|
507
531
|
const path = "/api/workspaces/v1.1/stats";
|
|
508
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";
|
package/dist/heyreach/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EVENT_TYPES,
|
|
3
3
|
heyreachEvents
|
|
4
|
-
} from "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-LD6F46UT.js";
|
|
5
5
|
import {
|
|
6
6
|
mapPage,
|
|
7
7
|
withLeadFields,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
listIn,
|
|
14
14
|
toVariant,
|
|
15
15
|
variantKey
|
|
16
|
-
} from "../chunks/chunk-
|
|
16
|
+
} from "../chunks/chunk-BNDHEDHD.js";
|
|
17
17
|
import {
|
|
18
18
|
normalizeBody
|
|
19
|
-
} from "../chunks/chunk-
|
|
19
|
+
} from "../chunks/chunk-FALWG5U3.js";
|
|
20
20
|
import {
|
|
21
21
|
defineNative
|
|
22
22
|
} from "../chunks/chunk-NAKXLBA6.js";
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
recordBase,
|
|
26
26
|
refTo,
|
|
27
27
|
refsTo
|
|
28
|
-
} from "../chunks/chunk-
|
|
29
|
-
import "../chunks/chunk-
|
|
28
|
+
} from "../chunks/chunk-LVZGIKNF.js";
|
|
29
|
+
import "../chunks/chunk-POBAY3TI.js";
|
|
30
30
|
import {
|
|
31
31
|
emptyCounts,
|
|
32
32
|
metricRow
|
|
33
|
-
} from "../chunks/chunk-
|
|
33
|
+
} from "../chunks/chunk-M2VXGLLZ.js";
|
|
34
34
|
import "../chunks/chunk-QGRZDTX4.js";
|
|
35
35
|
import {
|
|
36
36
|
assertWorkspaceId
|
|
37
|
-
} from "../chunks/chunk-
|
|
37
|
+
} from "../chunks/chunk-YW6FFVSZ.js";
|
|
38
38
|
import {
|
|
39
39
|
profileSlug
|
|
40
40
|
} from "../chunks/chunk-NAWZ73QS.js";
|
|
@@ -44,13 +44,13 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
readEnv,
|
|
46
46
|
requireCredential
|
|
47
|
-
} from "../chunks/chunk-
|
|
47
|
+
} from "../chunks/chunk-UFQ4WMLU.js";
|
|
48
48
|
import {
|
|
49
49
|
OutboundError,
|
|
50
50
|
isHttpFailure,
|
|
51
51
|
makeErrorMapper,
|
|
52
52
|
requireObject
|
|
53
|
-
} from "../chunks/chunk-
|
|
53
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
54
54
|
import {
|
|
55
55
|
count,
|
|
56
56
|
emailAddress,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
objects,
|
|
65
65
|
text,
|
|
66
66
|
timestamp
|
|
67
|
-
} from "../chunks/chunk-
|
|
67
|
+
} from "../chunks/chunk-45TXPJW7.js";
|
|
68
68
|
|
|
69
69
|
// src/heyreach/map-account.ts
|
|
70
70
|
var toCampaignProgress = (identity, campaignId, raw) => {
|
|
@@ -79,6 +79,7 @@ var toCampaignProgress = (identity, campaignId, raw) => {
|
|
|
79
79
|
inProgress: count(field(stats, "totalUsersInProgress")),
|
|
80
80
|
leads: count(field(stats, "totalUsers")),
|
|
81
81
|
notStarted: count(field(stats, "totalUsersPending")),
|
|
82
|
+
skipped: count(field(stats, "totalUsersExcluded")),
|
|
82
83
|
stopped: count(field(stats, "totalUsersManuallyStopped"))
|
|
83
84
|
};
|
|
84
85
|
};
|
|
@@ -211,6 +212,7 @@ var toSender = (identity, raw) => ({
|
|
|
211
212
|
warmup: null
|
|
212
213
|
});
|
|
213
214
|
var LEAD_PROGRESS = /* @__PURE__ */ new Map([
|
|
215
|
+
["Excluded", "skipped"],
|
|
214
216
|
["Finished", "completed"],
|
|
215
217
|
["InSequence", "active"],
|
|
216
218
|
["Paused", "paused"],
|
|
@@ -272,6 +274,7 @@ var profileFields = (identity, profile, raw) => ({
|
|
|
272
274
|
location: text(field(profile, "location")),
|
|
273
275
|
// HeyReach profiles carry no phone number and no company website.
|
|
274
276
|
phone: null,
|
|
277
|
+
recipientMailProvider: null,
|
|
275
278
|
title: text(field(profile, "position")),
|
|
276
279
|
website: null
|
|
277
280
|
});
|
|
@@ -422,20 +425,35 @@ var fields = {
|
|
|
422
425
|
bounced: false,
|
|
423
426
|
engagement: false,
|
|
424
427
|
phone: false,
|
|
428
|
+
recipientMailProvider: false,
|
|
425
429
|
unsubscribed: false,
|
|
426
430
|
website: false
|
|
427
431
|
},
|
|
428
|
-
message: {
|
|
432
|
+
message: {
|
|
433
|
+
bodyHtml: false,
|
|
434
|
+
isAuto: false,
|
|
435
|
+
isAutoSource: false,
|
|
436
|
+
stepIndex: false,
|
|
437
|
+
variantKey: false
|
|
438
|
+
},
|
|
429
439
|
metricRow: {
|
|
430
440
|
bounced: false,
|
|
431
441
|
clicked: false,
|
|
432
442
|
clickedTotal: false,
|
|
443
|
+
completed: false,
|
|
433
444
|
contentHash: false,
|
|
434
445
|
delivered: false,
|
|
446
|
+
leads: false,
|
|
435
447
|
opened: false,
|
|
436
448
|
openedTotal: false,
|
|
449
|
+
opportunities: false,
|
|
450
|
+
opportunityValue: false,
|
|
451
|
+
repliedAutoTotal: false,
|
|
452
|
+
repliedTotal: false,
|
|
437
453
|
repliedAuto: false,
|
|
438
454
|
stepIndex: false,
|
|
455
|
+
// LinkedIn has no open or click tracking.
|
|
456
|
+
tracking: false,
|
|
439
457
|
unsubscribed: false,
|
|
440
458
|
variantKey: false
|
|
441
459
|
},
|
|
@@ -447,6 +465,8 @@ var fields = {
|
|
|
447
465
|
category: "derived",
|
|
448
466
|
categorySource: "derived",
|
|
449
467
|
isAuto: false,
|
|
468
|
+
isAutoSource: false,
|
|
469
|
+
leftCompany: false,
|
|
450
470
|
stepIndex: false,
|
|
451
471
|
variantKey: false
|
|
452
472
|
},
|
|
@@ -486,6 +506,8 @@ var costs = {
|
|
|
486
506
|
"blocklist.list": { pageSize: PAGE_SIZE, perPage: 1 },
|
|
487
507
|
"campaigns.get": { perPage: 1 },
|
|
488
508
|
"campaigns.list": { pageSize: PAGE_SIZE, perPage: 1 },
|
|
509
|
+
// The campaign object, which carries its lead counts.
|
|
510
|
+
"campaigns.progress": { perPage: 1 },
|
|
489
511
|
// The profile and its tags are two requests.
|
|
490
512
|
"leads.get": { perPage: 2 },
|
|
491
513
|
// A campaign's leads. A saved list's leads come up to 1000 a page. Without
|
|
@@ -522,7 +544,7 @@ var caveats = [
|
|
|
522
544
|
"A sender's dailyLimit is null: accountLimits holds several limit pairs and the docs do not say which are daily or what Limit and Max mean. They stay in raw.",
|
|
523
545
|
"A lead's id is its LinkedIn profile URL, the only key GetLead accepts and the only one present in every lead shape. The docs do not say the URL has one canonical form.",
|
|
524
546
|
"A lead is looked up by profile URL with two requests (GetCampaignsForLead and GetLead) and returned once per campaign it is in. A lead's id is its profile URL in every campaign, so a person's records share one ref and differ by campaignRef. The timeline is the lead's whole conversation history, the same on each of its records.",
|
|
525
|
-
"A looked-up lead's status follows leadStatus and never says replied, because GetCampaignsForLead reports no message status; Excluded and PendingOrExcludedToBeCalculated
|
|
547
|
+
"A looked-up lead's status follows leadStatus and never says replied, because GetCampaignsForLead reports no message status; Excluded (kept out by an exclusion filter or exclusion list) is skipped, and PendingOrExcludedToBeCalculated, not decided yet, is unknown. createdAt is null (the creationTime beside a campaign is the campaign's), tags are empty and interest is null. A lookup cannot be combined with a saved list or a date range.",
|
|
526
548
|
"HeyReach matches a profile URL whatever its scheme, www prefix, trailing slash or query, but by exact case: seen live, a slug sent in upper case is not found. The lookup sends the slug lowercased, so a profile HeyReach stores with upper-case letters would not be found. A slug with non-ASCII letters is sent percent-encoded; how HeyReach stores one is not known.",
|
|
527
549
|
"No HeyReach read returns a profile for an email address. An email lookup asks for the campaigns (which names the person), then one saved list the address is in, searches that list for the name (5 rows at most) and reads each match's profile until one carries the address: four requests in the usual case. An address that is in no saved list, or whose profile is not among those rows, gives an empty page although HeyReach knows it. The record's email is the address asked for, which the profile may hold as its enriched or custom address.",
|
|
528
550
|
"Lookup was checked against one live lead in one campaign. A person in several campaigns (and so a second page of campaigns) and a known person in no campaign were not seen; an empty campaign answer and a 404 from GetCampaignsForLead are both read as no campaigns.",
|
|
@@ -3,8 +3,8 @@ import type { JsonObject } from "../internal/json.ts";
|
|
|
3
3
|
import type { Identity } from "../internal/record.ts";
|
|
4
4
|
/**
|
|
5
5
|
* `GET /campaign/GetById`: `progressStats` counts the campaign's leads by how
|
|
6
|
-
* far they got. `totalUsersExcluded`
|
|
7
|
-
*
|
|
6
|
+
* far they got. `totalUsersExcluded` counts the leads an exclusion filter or
|
|
7
|
+
* exclusion list kept out, which are skipped.
|
|
8
8
|
*/
|
|
9
9
|
export declare const toCampaignProgress: (identity: Identity, campaignId: string, raw: JsonObject) => CampaignProgress;
|
|
10
10
|
/** `POST /list/GetAll`: `listType` is `USER_LIST` or `COMPANY_LIST`. */
|
package/dist/identity/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "../chunks/chunk-NAWZ73QS.js";
|
|
7
7
|
import {
|
|
8
8
|
OutboundError
|
|
9
|
-
} from "../chunks/chunk-
|
|
10
|
-
import "../chunks/chunk-
|
|
9
|
+
} from "../chunks/chunk-QFC4ZHD3.js";
|
|
10
|
+
import "../chunks/chunk-45TXPJW7.js";
|
|
11
11
|
|
|
12
12
|
// src/identity/keys.ts
|
|
13
13
|
var emailKey = (email) => {
|