outbound-sdk 0.1.0 → 0.2.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/README.md +0 -2
- package/dist/alerts/index.js +5 -1
- package/dist/audit/index.js +2 -2
- package/dist/benchmarks/index.js +5 -3
- package/dist/budget/index.js +31 -10
- package/dist/cache/index.js +2 -2
- package/dist/cards/index.js +1 -1
- package/dist/chunks/{chunk-WAM6N4OF.js → chunk-4PSO6JEK.js} +107 -19
- package/dist/chunks/chunk-6CVZOUHB.js +152 -0
- package/dist/chunks/{chunk-OCV66TS2.js → chunk-AFU5E5QB.js} +17 -8
- package/dist/chunks/{chunk-R6AM4GJR.js → chunk-DJ2IUQEU.js} +24 -18
- package/dist/chunks/{chunk-LOXBLQ3I.js → chunk-E7JHLNLG.js} +9 -2
- package/dist/chunks/{chunk-LNCOGBMI.js → chunk-FHKSLCVW.js} +13 -3
- package/dist/chunks/chunk-FKH5N47I.js +40 -0
- package/dist/chunks/chunk-HZCTYL22.js +29 -0
- package/dist/chunks/{chunk-CMQ5ZHLZ.js → chunk-IPUYZD4O.js} +1 -1
- package/dist/chunks/{chunk-VURTOVGI.js → chunk-IVH3NMQZ.js} +1 -1
- package/dist/chunks/{chunk-ZGHQYZEH.js → chunk-LVYG7XZJ.js} +1 -1
- package/dist/chunks/chunk-NAKXLBA6.js +30 -0
- package/dist/chunks/{chunk-7BCYLIDG.js → chunk-P3IJBJUI.js} +203 -34
- package/dist/chunks/{chunk-Q465X22Y.js → chunk-PURHK3JU.js} +93 -209
- package/dist/chunks/{chunk-F7MKFVIG.js → chunk-R3Y56YVF.js} +2 -2
- package/dist/chunks/chunk-RCZ7ZZFU.js +92 -0
- package/dist/chunks/chunk-SBIZDCRY.js +106 -0
- package/dist/chunks/{chunk-IBC52BX3.js → chunk-U2D34ARZ.js} +20 -3
- package/dist/chunks/chunk-UAT3JSJZ.js +331 -0
- package/dist/chunks/{chunk-QZNNCXXD.js → chunk-VQSCHOBV.js} +20 -1
- package/dist/chunks/{chunk-B7V6EOAC.js → chunk-XNFESPZH.js} +160 -126
- package/dist/chunks/{chunk-WW746NJF.js → chunk-YOTW5ESM.js} +25 -1
- package/dist/cli/bin.js +14 -13
- package/dist/cli/commands.d.ts +3 -0
- package/dist/cli/config.d.ts +22 -0
- package/dist/cli/index.d.ts +5 -1
- package/dist/cli/index.js +20 -15
- package/dist/cli/stdio.d.ts +9 -0
- package/dist/cli/version.d.ts +2 -0
- package/dist/clients/index.js +13 -3
- package/dist/combine/account.d.ts +1 -1
- package/dist/combine/index.js +90 -15
- package/dist/combine/route.d.ts +7 -0
- package/dist/exporter/index.js +2 -2
- package/dist/failover/index.js +4 -4
- package/dist/fixtures/index.js +40 -21
- package/dist/heyreach/account.d.ts +1 -1
- package/dist/heyreach/adapter.d.ts +1 -1
- package/dist/heyreach/capabilities.d.ts +2 -0
- package/dist/heyreach/client.d.ts +3 -5
- package/dist/heyreach/index.d.ts +7 -0
- package/dist/heyreach/index.js +428 -205
- package/dist/heyreach/leads.d.ts +4 -0
- package/dist/heyreach/map-account.d.ts +7 -1
- package/dist/heyreach/map-stats.d.ts +8 -5
- package/dist/heyreach/map.d.ts +3 -1
- package/dist/heyreach/webhooks.d.ts +1 -0
- package/dist/identity/index.js +22 -11
- package/dist/index.d.ts +1 -4
- package/dist/index.js +29 -17
- package/dist/insights/copy/index.d.ts +2 -2
- package/dist/insights/copy/variant-test.d.ts +2 -2
- package/dist/insights/index.js +248 -184
- package/dist/insights/ops/anomalies.d.ts +3 -3
- package/dist/insights/ops/index.d.ts +2 -2
- package/dist/insights/ops/shared.d.ts +7 -1
- package/dist/insights/registry.d.ts +4 -4
- package/dist/instantly/adapter-account.d.ts +1 -1
- package/dist/instantly/capabilities.d.ts +2 -0
- package/dist/instantly/client.d.ts +4 -9
- package/dist/instantly/index.d.ts +7 -0
- package/dist/instantly/index.js +410 -155
- package/dist/instantly/map-account.d.ts +20 -5
- package/dist/instantly/map-stats.d.ts +9 -6
- package/dist/instantly/map.d.ts +0 -2
- package/dist/instantly/native-agents-sales.d.ts +41 -41
- package/dist/instantly/native-agents.d.ts +44 -44
- package/dist/instantly/native-campaigns.d.ts +21 -21
- package/dist/instantly/native-leads.d.ts +12 -12
- package/dist/instantly/native-params.d.ts +2 -19
- package/dist/instantly/native-search.d.ts +10 -10
- package/dist/instantly/native-senders.d.ts +56 -56
- package/dist/instantly/native-supersearch.d.ts +33 -33
- package/dist/instantly/native-workspace.d.ts +45 -45
- package/dist/instantly/native.d.ts +262 -262
- package/dist/instantly/webhooks.d.ts +1 -0
- package/dist/internal/adapter.d.ts +24 -2
- package/dist/internal/capabilities.d.ts +18 -0
- package/dist/internal/client.d.ts +15 -0
- package/dist/internal/concurrency.d.ts +8 -0
- package/dist/internal/engine/request.d.ts +7 -0
- package/dist/internal/entities-account.d.ts +73 -3
- package/dist/internal/entities.d.ts +116 -12
- package/dist/internal/errors.d.ts +6 -1
- package/dist/internal/fields.d.ts +462 -0
- package/dist/internal/json.d.ts +9 -0
- package/dist/internal/lead-fields.d.ts +21 -0
- package/dist/internal/lead-status.d.ts +13 -0
- package/dist/internal/metrics.d.ts +14 -2
- package/dist/internal/native.d.ts +15 -0
- package/dist/internal/outbound/api.d.ts +29 -4
- package/dist/internal/outbound/operations-account.d.ts +12 -0
- package/dist/internal/outbound/outbound.d.ts +6 -3
- package/dist/internal/outbound/specs-account.d.ts +5 -1
- package/dist/internal/page.d.ts +14 -0
- package/dist/internal/record.d.ts +17 -0
- package/dist/internal/records.d.ts +7 -0
- package/dist/internal/sequence.d.ts +14 -0
- package/dist/internal/sha256.d.ts +2 -0
- package/dist/loader/index.d.ts +14 -2
- package/dist/loader/index.js +8 -4
- package/dist/memory/account-reads.d.ts +1 -1
- package/dist/memory/account.d.ts +15 -1
- package/dist/memory/data.d.ts +17 -2
- package/dist/memory/index.js +110 -35
- package/dist/redact/index.js +11 -6
- package/dist/redact/plugin.d.ts +1 -1
- package/dist/smartlead/account.d.ts +1 -1
- package/dist/smartlead/adapter.d.ts +1 -1
- package/dist/smartlead/capabilities.d.ts +2 -0
- package/dist/smartlead/client.d.ts +6 -11
- package/dist/smartlead/hmac.d.ts +0 -2
- package/dist/smartlead/index.d.ts +7 -0
- package/dist/smartlead/index.js +731 -572
- package/dist/smartlead/leads.d.ts +4 -1
- package/dist/smartlead/map-account.d.ts +17 -5
- package/dist/smartlead/map-stats.d.ts +9 -10
- package/dist/smartlead/map.d.ts +15 -5
- package/dist/smartlead/native-analytics.d.ts +87 -87
- package/dist/smartlead/native-campaigns.d.ts +64 -64
- package/dist/smartlead/native-inbox.d.ts +51 -51
- package/dist/smartlead/native-params.d.ts +2 -23
- package/dist/smartlead/native-services.d.ts +34 -34
- package/dist/smartlead/native.d.ts +236 -236
- package/dist/smartlead/shared.d.ts +6 -5
- package/dist/smartlead/webhooks.d.ts +1 -0
- package/dist/sync/index.js +3 -3
- package/dist/tools/ai-sdk.js +7 -5
- package/dist/tools/campaign-tools.d.ts +1 -1
- package/dist/tools/claude-agent.js +7 -5
- package/dist/tools/index.js +8 -6
- package/dist/tracing/index.js +2 -2
- package/dist/webhooks/index.js +10 -9
- package/package.json +1 -1
- package/dist/chunks/chunk-FZF6CLPX.js +0 -232
- package/dist/chunks/chunk-GPEJG34O.js +0 -53
- package/dist/chunks/chunk-HEC7XFFH.js +0 -65
- package/dist/chunks/chunk-QTB747K4.js +0 -100
- package/dist/chunks/chunk-TIJKJJDW.js +0 -6
package/dist/redact/index.js
CHANGED
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "../chunks/chunk-NAWZ73QS.js";
|
|
4
4
|
import {
|
|
5
5
|
stableId
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-FHKSLCVW.js";
|
|
7
7
|
import {
|
|
8
8
|
makeRef,
|
|
9
9
|
parseRef
|
|
10
|
-
} from "../chunks/chunk-
|
|
10
|
+
} from "../chunks/chunk-LVYG7XZJ.js";
|
|
11
11
|
import {
|
|
12
12
|
OutboundError
|
|
13
|
-
} from "../chunks/chunk-
|
|
13
|
+
} from "../chunks/chunk-E7JHLNLG.js";
|
|
14
14
|
import {
|
|
15
15
|
isJsonArray,
|
|
16
16
|
isJsonObject,
|
|
17
17
|
isString
|
|
18
|
-
} from "../chunks/chunk-
|
|
18
|
+
} from "../chunks/chunk-VQSCHOBV.js";
|
|
19
19
|
|
|
20
20
|
// src/redact/plugin.ts
|
|
21
21
|
var ALL_FIELDS = [
|
|
@@ -25,6 +25,7 @@ var ALL_FIELDS = [
|
|
|
25
25
|
"email",
|
|
26
26
|
"linkedin",
|
|
27
27
|
"name",
|
|
28
|
+
"phone",
|
|
28
29
|
"subject"
|
|
29
30
|
];
|
|
30
31
|
var MASK = "[redacted]";
|
|
@@ -101,12 +102,16 @@ var redactFields = (masks, record) => {
|
|
|
101
102
|
return {
|
|
102
103
|
...record,
|
|
103
104
|
company: maskIf(masks, "company", record.company),
|
|
105
|
+
// The company's LinkedIn page and its website name the company too.
|
|
106
|
+
companyLinkedinUrl: maskIf(masks, "company", record.companyLinkedinUrl),
|
|
104
107
|
custom: maskCustom(masks, record.custom),
|
|
105
108
|
email: maskIf(masks, "email", record.email),
|
|
106
109
|
firstName: maskIf(masks, "name", record.firstName),
|
|
107
110
|
lastName: maskIf(masks, "name", record.lastName),
|
|
108
111
|
linkedinUrl: maskIf(masks, "linkedin", record.linkedinUrl),
|
|
109
|
-
|
|
112
|
+
phone: maskIf(masks, "phone", record.phone),
|
|
113
|
+
raw: null,
|
|
114
|
+
website: maskIf(masks, "company", record.website)
|
|
110
115
|
};
|
|
111
116
|
}
|
|
112
117
|
if ("value" in record) {
|
|
@@ -117,7 +122,7 @@ var redactFields = (masks, record) => {
|
|
|
117
122
|
value: blocked === void 0 ? record.value : maskIf(masks, blocked, record.value) ?? MASK
|
|
118
123
|
};
|
|
119
124
|
}
|
|
120
|
-
if ("steps" in record || "schedule" in record || "dns" in record || "size" in record || "url" in record || "description" in record) {
|
|
125
|
+
if ("steps" in record || "inProgress" in record || "nextRunAt" in record || "schedule" in record || "dns" in record || "size" in record || "url" in record || "description" in record) {
|
|
121
126
|
return { ...record, raw: null };
|
|
122
127
|
}
|
|
123
128
|
if ("kind" in record) {
|
package/dist/redact/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OutboundPlugin } from "../internal/outbound/plugins.ts";
|
|
2
|
-
export type RedactField = "body" | "company" | "custom" | "email" | "linkedin" | "name" | "subject";
|
|
2
|
+
export type RedactField = "body" | "company" | "custom" | "email" | "linkedin" | "name" | "phone" | "subject";
|
|
3
3
|
export interface RedactOptions {
|
|
4
4
|
/** What to mask. Defaults to everything. */
|
|
5
5
|
readonly fields?: readonly RedactField[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Adapter } from "../internal/adapter.ts";
|
|
2
2
|
import type { SmartleadClient } from "./client.ts";
|
|
3
|
-
type AccountReaders = Pick<Adapter, "getCampaignSettings" | "getSenderHealth" | "listBlocklist" | "listLists" | "listSubsequences" | "listTags" | "listWebhooks">;
|
|
3
|
+
type AccountReaders = Pick<Adapter, "getCampaignProgress" | "getCampaignSettings" | "getList" | "getSenderHealth" | "getWebhook" | "listBlocklist" | "listLists" | "listPlacementTests" | "listSubsequences" | "listTags" | "listWebhooks">;
|
|
4
4
|
export declare const accountReaders: (client: SmartleadClient) => AccountReaders;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Adapter } from "../internal/adapter.ts";
|
|
2
2
|
import type { SmartleadClient } from "./client.ts";
|
|
3
|
-
type Readers = Pick<Adapter, "getCampaign" | "getCampaignSettings" | "getLead" | "getSender" | "getSenderHealth" | "getSequence" | "listBlocklist" | "listCampaigns" | "listLeads" | "listLists" | "listMessages" | "listReplies" | "listSenders" | "listSubsequences" | "listTags" | "listWebhooks" | "listWorkspaces" | "stats">;
|
|
3
|
+
type Readers = Pick<Adapter, "getCampaign" | "getCampaignProgress" | "getCampaignSettings" | "getLead" | "getList" | "getSender" | "getSenderHealth" | "getSequence" | "getWebhook" | "listBlocklist" | "listCampaigns" | "listLeads" | "listLists" | "listMessages" | "listPlacementTests" | "listReplies" | "listSenders" | "listSubsequences" | "listTags" | "listWebhooks" | "listWorkspaces" | "stats">;
|
|
4
4
|
export declare const readers: (client: SmartleadClient) => Readers;
|
|
5
5
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CapabilityDeclaration } from "../internal/capabilities.ts";
|
|
2
|
+
import type { FieldDeclaration } from "../internal/fields.ts";
|
|
2
3
|
import type { LimitDeclaration } from "../internal/limits.ts";
|
|
3
4
|
export declare const BASE_URL = "https://server.smartlead.ai/api/v1";
|
|
4
5
|
export declare const API_KEY_ENV = "SMARTLEAD_API_KEY";
|
|
@@ -18,6 +19,7 @@ export declare const BLOCKLIST_PAGE_SIZE = 1000;
|
|
|
18
19
|
/** The master inbox returns at most 20 threads per page. */
|
|
19
20
|
export declare const INBOX_PAGE_SIZE = 20;
|
|
20
21
|
export declare const capabilities: CapabilityDeclaration;
|
|
22
|
+
export declare const fields: FieldDeclaration;
|
|
21
23
|
export declare const limits: LimitDeclaration;
|
|
22
24
|
export declare const costs: {
|
|
23
25
|
"blocklist.list": {
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { HttpMethod, RawDescriptor } from "../internal/adapter.ts";
|
|
2
|
+
import type { VendorClient } from "../internal/client.ts";
|
|
3
3
|
import type { Identity } from "../internal/record.ts";
|
|
4
|
-
import type { QueryValue } from "../internal/url.ts";
|
|
5
4
|
export interface ClientOptions {
|
|
6
5
|
readonly apiKey: string;
|
|
7
6
|
readonly baseUrl: string | undefined;
|
|
8
7
|
readonly identity: Identity;
|
|
9
8
|
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
readonly lane?: string | undefined;
|
|
13
|
-
}
|
|
14
|
-
export interface SmartleadClient {
|
|
9
|
+
export type { RequestOptions } from "../internal/client.ts";
|
|
10
|
+
export interface SmartleadClient extends VendorClient {
|
|
15
11
|
readonly identity: Identity;
|
|
16
12
|
readonly raw: RawDescriptor;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly post: (ctx: AdapterContext, path: string, body: JsonObject, options?: RequestOptions) => Promise<Json>;
|
|
13
|
+
/** SmartDelivery, the placement-test service: its own host, the same key. */
|
|
14
|
+
readonly delivery: VendorClient;
|
|
20
15
|
}
|
|
21
16
|
export declare const isSecret: (path: string, query: URLSearchParams) => boolean;
|
|
22
17
|
export declare const isRead: (method: HttpMethod, path: string) => boolean;
|
package/dist/smartlead/hmac.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** The SHA-256 digest of `bytes`, as 32 bytes. */
|
|
2
|
-
export declare const sha256: (bytes: Uint8Array) => Uint8Array;
|
|
3
1
|
/** HMAC-SHA256 of `message` under `key` (RFC 2104), as 32 bytes. */
|
|
4
2
|
export declare const hmacSha256: (key: Uint8Array, message: Uint8Array) => Uint8Array;
|
|
5
3
|
/** Decodes standard base64, or `null` when the text is not valid base64. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Adapter } from "../internal/adapter.ts";
|
|
2
2
|
import type { CapabilityDeclaration } from "../internal/capabilities.ts";
|
|
3
|
+
import type { LeadFieldMap } from "../internal/lead-fields.ts";
|
|
3
4
|
import type { SmartleadNative } from "./native.ts";
|
|
4
5
|
export declare const PROVIDER = "smartlead";
|
|
5
6
|
/** The environment variables this adapter reads. */
|
|
@@ -12,6 +13,12 @@ export interface SmartleadOptions {
|
|
|
12
13
|
readonly baseUrl?: string | undefined;
|
|
13
14
|
/** Overrides what the adapter declares, for example on a key some endpoints refuse. */
|
|
14
15
|
readonly capabilities?: CapabilityDeclaration | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Which of a lead's custom fields holds a value this vendor has no field
|
|
18
|
+
* for, for example `{ title: "job_title" }`. Read only where the vendor's
|
|
19
|
+
* own field is empty.
|
|
20
|
+
*/
|
|
21
|
+
readonly leadFields?: LeadFieldMap | undefined;
|
|
15
22
|
}
|
|
16
23
|
export type { SmartleadNative } from "./native.ts";
|
|
17
24
|
export declare const smartlead: (options?: SmartleadOptions) => Adapter<SmartleadNative>;
|