outbound-sdk 0.4.0 → 0.6.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/README.md +2 -2
- package/dist/alerts/check-evaluate.d.ts +53 -0
- package/dist/alerts/check-measure.d.ts +100 -0
- package/dist/alerts/check-schema.d.ts +184 -0
- package/dist/alerts/check-validate.d.ts +18 -0
- package/dist/alerts/index.d.ts +7 -0
- package/dist/alerts/index.js +635 -2
- package/dist/budget/index.d.ts +2 -0
- package/dist/budget/index.js +1 -0
- package/dist/cards/format.d.ts +1 -1
- package/dist/cards/index.js +49 -19
- package/dist/cards/parts.d.ts +1 -6
- package/dist/chunks/{chunk-7LNJJ2RO.js → chunk-3JOC5DGD.js} +127 -17
- package/dist/chunks/chunk-53DCVFUB.js +55 -0
- package/dist/chunks/{chunk-E6DSDCPI.js → chunk-BK5SLY32.js} +92 -101
- package/dist/chunks/chunk-HPNGSG5E.js +51 -0
- package/dist/chunks/chunk-HWHI4LFY.js +102 -0
- package/dist/chunks/chunk-MGR6HREO.js +91 -0
- package/dist/chunks/{chunk-Y5RAJ6PZ.js → chunk-OLPMBRXM.js} +3 -2
- package/dist/chunks/{chunk-IZFTTMJP.js → chunk-PHNQ3WC2.js} +5 -5
- package/dist/chunks/chunk-SXGCKCAR.js +678 -0
- package/dist/chunks/chunk-TFICTGM2.js +18 -0
- package/dist/chunks/{chunk-ZFVHM5JI.js → chunk-UWUPUMM2.js} +11 -4
- package/dist/chunks/{chunk-A6WVOCA4.js → chunk-W22SDX6S.js} +4 -4
- package/dist/chunks/{chunk-7ZDS6SZD.js → chunk-WH6V3YNN.js} +25 -0
- package/dist/chunks/chunk-XL6LJVHJ.js +71 -0
- package/dist/chunks/{chunk-5FVKRIEJ.js → chunk-YYCT3NGV.js} +35 -11
- package/dist/cli/bin.js +13 -28
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +12 -11
- package/dist/cli/output.d.ts +9 -0
- package/dist/cli/update.d.ts +15 -0
- package/dist/emailbison/account.d.ts +7 -0
- package/dist/emailbison/adapter.d.ts +5 -0
- package/dist/emailbison/capabilities.d.ts +78 -0
- package/dist/emailbison/client.d.ts +29 -0
- package/dist/emailbison/index.d.ts +30 -0
- package/dist/emailbison/index.js +1018 -0
- package/dist/emailbison/mail.d.ts +5 -0
- package/dist/emailbison/map-mail.d.ts +13 -0
- package/dist/emailbison/map-sequence.d.ts +12 -0
- package/dist/emailbison/map-stats.d.ts +47 -0
- package/dist/emailbison/map.d.ts +24 -0
- package/dist/emailbison/native-params.d.ts +5 -0
- package/dist/emailbison/native-workspace.d.ts +167 -0
- package/dist/emailbison/native.d.ts +327 -0
- package/dist/emailbison/stats.d.ts +4 -0
- package/dist/emailbison/webhooks.d.ts +2 -0
- package/dist/fixtures/index.js +6 -6
- package/dist/heyreach/capabilities.d.ts +3 -0
- package/dist/heyreach/index.js +22 -20
- package/dist/index.js +19 -18
- package/dist/insights/copy/copy-preview.d.ts +58 -0
- package/dist/insights/copy/copy-reuse.d.ts +0 -13
- package/dist/insights/copy/index.d.ts +9 -0
- package/dist/insights/copy/reuse-base.d.ts +0 -2
- package/dist/insights/copy/shared.d.ts +3 -8
- package/dist/insights/copy/step-funnel.d.ts +1 -12
- package/dist/insights/copy/variant-test.d.ts +0 -5
- package/dist/insights/cost.d.ts +91 -0
- package/dist/insights/define.d.ts +22 -1
- package/dist/insights/index.d.ts +4 -3
- package/dist/insights/index.js +810 -415
- package/dist/insights/inputs.generated.d.ts +21 -24
- package/dist/insights/ops/campaign-diagnosis.d.ts +0 -2
- package/dist/insights/ops/campaign-ranking.d.ts +3 -3
- package/dist/insights/ops/client-report.d.ts +0 -2
- package/dist/insights/ops/index.d.ts +2 -6
- package/dist/insights/ops/shared.d.ts +10 -2
- package/dist/insights/plugin.d.ts +19 -0
- package/dist/insights/registry.d.ts +10 -10
- package/dist/insights/run-cap.d.ts +35 -0
- 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/tools.d.ts +10 -0
- package/dist/insights/types.d.ts +1 -1
- package/dist/insights/variables.d.ts +33 -0
- package/dist/instantly/capabilities.d.ts +13 -0
- package/dist/instantly/index.js +43 -28
- package/dist/internal/adapter.d.ts +12 -0
- package/dist/internal/outbound/outbound.d.ts +5 -1
- package/dist/internal/request-cap.d.ts +35 -0
- package/dist/loader/index.js +2 -2
- package/dist/memory/index.js +10 -10
- package/dist/providers/index.d.ts +21 -1
- package/dist/providers/index.js +1 -1
- package/dist/redact/index.js +4 -4
- package/dist/smartlead/capabilities.d.ts +5 -0
- package/dist/smartlead/index.js +26 -24
- package/dist/tools/ai-sdk.js +5 -3
- package/dist/tools/claude-agent.js +5 -3
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +11 -6
- package/dist/tools/registry.d.ts +20 -1
- package/dist/tools/shared.d.ts +20 -1
- package/dist/webhooks/index.js +17 -7
- package/package.json +8 -2
- package/dist/chunks/chunk-5CFO3CXG.js +0 -176
- package/dist/chunks/chunk-K4USHN4C.js +0 -40
- package/dist/chunks/chunk-LVQUSKEX.js +0 -17
- package/dist/internal/renamed.d.ts +0 -28
- package/dist/chunks/{chunk-C4LS2HNV.js → chunk-JWGSB7PT.js} +3 -3
package/dist/webhooks/index.js
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
instantlyEvents
|
|
3
|
-
} from "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-W22SDX6S.js";
|
|
4
4
|
import {
|
|
5
5
|
smartleadEvents
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-PHNQ3WC2.js";
|
|
7
7
|
import {
|
|
8
8
|
heyreachEvents
|
|
9
|
-
} from "../chunks/chunk-
|
|
10
|
-
import "../chunks/chunk-K4USHN4C.js";
|
|
9
|
+
} from "../chunks/chunk-JWGSB7PT.js";
|
|
11
10
|
import {
|
|
12
|
-
|
|
13
|
-
} from "../chunks/chunk-
|
|
11
|
+
emailbisonEvents
|
|
12
|
+
} from "../chunks/chunk-SXGCKCAR.js";
|
|
13
|
+
import "../chunks/chunk-MGR6HREO.js";
|
|
14
|
+
import "../chunks/chunk-53DCVFUB.js";
|
|
14
15
|
import "../chunks/chunk-2D42TQFU.js";
|
|
15
16
|
import "../chunks/chunk-BOWXGMN3.js";
|
|
16
17
|
import {
|
|
17
18
|
SCHEMA_VERSION
|
|
18
19
|
} from "../chunks/chunk-QGRZDTX4.js";
|
|
19
20
|
import "../chunks/chunk-QAKJ76HB.js";
|
|
21
|
+
import "../chunks/chunk-NAWZ73QS.js";
|
|
22
|
+
import {
|
|
23
|
+
stableId
|
|
24
|
+
} from "../chunks/chunk-FHKSLCVW.js";
|
|
20
25
|
import {
|
|
21
26
|
OutboundError
|
|
22
27
|
} from "../chunks/chunk-J7DDZ4C2.js";
|
|
@@ -67,7 +72,8 @@ var carriesSecret = (url, headers, secret) => {
|
|
|
67
72
|
var FORMATS = /* @__PURE__ */ new Map([
|
|
68
73
|
["instantly", instantlyEvents("instantly")],
|
|
69
74
|
["smartlead", smartleadEvents("smartlead")],
|
|
70
|
-
["heyreach", heyreachEvents("heyreach")]
|
|
75
|
+
["heyreach", heyreachEvents("heyreach")],
|
|
76
|
+
["emailbison", emailbisonEvents("emailbison")]
|
|
71
77
|
]);
|
|
72
78
|
var webhookProviders = () => [...FORMATS.keys()].toSorted();
|
|
73
79
|
var memoryDedupeStore = (maxIds = 1e4) => {
|
|
@@ -203,6 +209,10 @@ var setupInstructions = (provider) => {
|
|
|
203
209
|
"heyreach",
|
|
204
210
|
"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
211
|
],
|
|
212
|
+
[
|
|
213
|
+
"emailbison",
|
|
214
|
+
"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`."
|
|
215
|
+
],
|
|
206
216
|
[
|
|
207
217
|
"instantly",
|
|
208
218
|
"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.
|
|
3
|
+
"version": "0.6.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,176 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildUrl
|
|
3
|
-
} from "./chunk-NAWZ73QS.js";
|
|
4
|
-
import {
|
|
5
|
-
OutboundError
|
|
6
|
-
} from "./chunk-J7DDZ4C2.js";
|
|
7
|
-
import {
|
|
8
|
-
isJsonArray,
|
|
9
|
-
isJsonObject
|
|
10
|
-
} from "./chunk-BLCJHP5H.js";
|
|
11
|
-
|
|
12
|
-
// src/internal/lead-fields.ts
|
|
13
|
-
var MAPPABLE = [
|
|
14
|
-
"company",
|
|
15
|
-
"companyLinkedinUrl",
|
|
16
|
-
"linkedinUrl",
|
|
17
|
-
"location",
|
|
18
|
-
"phone",
|
|
19
|
-
"title",
|
|
20
|
-
"website"
|
|
21
|
-
];
|
|
22
|
-
var fillFromCustom = (lead, map) => {
|
|
23
|
-
const filled = {};
|
|
24
|
-
for (const field of MAPPABLE) {
|
|
25
|
-
const name = map[field];
|
|
26
|
-
const value = name === void 0 ? void 0 : lead.custom[name]?.trim();
|
|
27
|
-
if (lead[field] === null && value !== void 0 && value !== "") {
|
|
28
|
-
filled[field] = value;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return { ...lead, ...filled };
|
|
32
|
-
};
|
|
33
|
-
var withLeadFields = (readers, map) => {
|
|
34
|
-
if (map === void 0 || Object.keys(map).length === 0) {
|
|
35
|
-
return readers;
|
|
36
|
-
}
|
|
37
|
-
const { getLead, listLeads } = readers;
|
|
38
|
-
const wrapped = {
|
|
39
|
-
...getLead && {
|
|
40
|
-
getLead: async (id, ctx) => fillFromCustom(await getLead(id, ctx), map)
|
|
41
|
-
},
|
|
42
|
-
...listLeads && {
|
|
43
|
-
listLeads: async (query, ctx) => {
|
|
44
|
-
const page = await listLeads(query, ctx);
|
|
45
|
-
return {
|
|
46
|
-
items: page.items.map((lead) => fillFromCustom(lead, map)),
|
|
47
|
-
next: page.next
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return { ...readers, ...wrapped };
|
|
53
|
-
};
|
|
54
|
-
var withMappedFields = (declared, map) => {
|
|
55
|
-
const lead = declared.lead === false ? void 0 : declared.lead;
|
|
56
|
-
if (map === void 0 || lead === void 0) {
|
|
57
|
-
return declared;
|
|
58
|
-
}
|
|
59
|
-
const derived = Object.fromEntries(
|
|
60
|
-
MAPPABLE.flatMap(
|
|
61
|
-
(field) => map[field] !== void 0 && lead[field] === false ? [[field, "derived"]] : []
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
return { ...declared, lead: { ...lead, ...derived } };
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
// src/internal/page.ts
|
|
68
|
-
var mapPage = (page, toItem) => ({
|
|
69
|
-
items: page.items.map((raw) => toItem(raw)),
|
|
70
|
-
next: page.next
|
|
71
|
-
});
|
|
72
|
-
var flatMapPage = (page, toItems) => ({
|
|
73
|
-
items: page.items.flatMap((raw) => toItems(raw)),
|
|
74
|
-
next: page.next
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// src/internal/lists.ts
|
|
78
|
-
var requireList = (value, provider, message) => {
|
|
79
|
-
if (!isJsonArray(value)) {
|
|
80
|
-
throw new OutboundError("Provider", message, { provider, status: 200 });
|
|
81
|
-
}
|
|
82
|
-
return value;
|
|
83
|
-
};
|
|
84
|
-
var noListMessage = (place) => `${place.vendor} returned no list for ${place.path}: expected ${place.key === void 0 ? "a JSON array" : `a JSON object with an array in \`${place.key}\``}`;
|
|
85
|
-
var listIn = (body, place) => {
|
|
86
|
-
let rows = body;
|
|
87
|
-
if (place.key !== void 0) {
|
|
88
|
-
rows = isJsonObject(body) ? body[place.key] : void 0;
|
|
89
|
-
}
|
|
90
|
-
return requireList(rows, place.provider, noListMessage(place));
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
// src/internal/client.ts
|
|
94
|
-
var createVendorClient = (baseUrl, authorize) => ({
|
|
95
|
-
get: async (ctx, path, options = {}) => {
|
|
96
|
-
const response = await ctx.request(
|
|
97
|
-
authorize({
|
|
98
|
-
lane: options.lane,
|
|
99
|
-
method: "GET",
|
|
100
|
-
url: buildUrl(baseUrl, path, options.query)
|
|
101
|
-
})
|
|
102
|
-
);
|
|
103
|
-
return response.body;
|
|
104
|
-
},
|
|
105
|
-
post: async (ctx, path, body, options = {}) => {
|
|
106
|
-
const response = await ctx.request(
|
|
107
|
-
authorize({
|
|
108
|
-
body,
|
|
109
|
-
lane: options.lane,
|
|
110
|
-
method: "POST",
|
|
111
|
-
url: buildUrl(baseUrl, path, options.query)
|
|
112
|
-
})
|
|
113
|
-
);
|
|
114
|
-
return response.body;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
// src/internal/text.ts
|
|
119
|
-
var ENTITIES = /* @__PURE__ */ new Map([
|
|
120
|
-
["amp", "&"],
|
|
121
|
-
["apos", "'"],
|
|
122
|
-
["gt", ">"],
|
|
123
|
-
["lt", "<"],
|
|
124
|
-
["nbsp", " "],
|
|
125
|
-
["quot", '"']
|
|
126
|
-
]);
|
|
127
|
-
var decodeEntity = (match, body) => {
|
|
128
|
-
if (body.startsWith("#")) {
|
|
129
|
-
const code = body[1]?.toLowerCase() === "x" ? Number.parseInt(body.slice(2), 16) : Number(body.slice(1));
|
|
130
|
-
return Number.isInteger(code) && code > 0 && code <= 1114111 ? String.fromCodePoint(code) : match;
|
|
131
|
-
}
|
|
132
|
-
return ENTITIES.get(body.toLowerCase()) ?? match;
|
|
133
|
-
};
|
|
134
|
-
var looksLikeHtml = (value) => /<[a-z!/][^>]*>/iu.test(value);
|
|
135
|
-
var htmlToText = (html) => html.replaceAll(/<(?:script|style)\b[^>]*>[\s\S]*?<\/(?:script|style)>/giu, "").replaceAll(/<br\s*\/?>/giu, "\n").replaceAll(/<\/(?:p|div|li|tr|h[1-6])>/giu, "\n").replaceAll(/<[^>]+>/gu, "").replaceAll(
|
|
136
|
-
/&(?<body>#x?[\da-f]+|[a-z]+);/giu,
|
|
137
|
-
(match, body) => decodeEntity(match, body)
|
|
138
|
-
).replaceAll(/[ \t]+\n/gu, "\n").replaceAll(/\n{3,}/gu, "\n\n").trim();
|
|
139
|
-
var QUOTE_MARKERS = [
|
|
140
|
-
/^On .{0,200}wrote:\s*$/u,
|
|
141
|
-
/^-{2,}\s*Original Message\s*-{2,}\s*$/iu,
|
|
142
|
-
/^From:\s.+$/u,
|
|
143
|
-
/^Sent from my \w+/u,
|
|
144
|
-
/^_{10,}\s*$/u
|
|
145
|
-
];
|
|
146
|
-
var stripQuotedHistory = (text) => {
|
|
147
|
-
const lines = text.split(/\r?\n/u);
|
|
148
|
-
const cut = lines.findIndex(
|
|
149
|
-
(line, index) => QUOTE_MARKERS.some((marker) => marker.test(line.trim())) || // A run of ">" lines to the end of the message is the quoted thread.
|
|
150
|
-
line.trimStart().startsWith(">") && lines.slice(index).every(
|
|
151
|
-
(rest) => rest.trim() === "" || rest.trimStart().startsWith(">")
|
|
152
|
-
)
|
|
153
|
-
);
|
|
154
|
-
return (cut === -1 ? lines : lines.slice(0, cut)).join("\n").trim();
|
|
155
|
-
};
|
|
156
|
-
var normalizeBody = (body, includeBody) => {
|
|
157
|
-
if (!includeBody || body === null || body.trim() === "") {
|
|
158
|
-
return { bodyHtml: null, bodyText: null };
|
|
159
|
-
}
|
|
160
|
-
const isHtml = looksLikeHtml(body);
|
|
161
|
-
const plain = stripQuotedHistory(isHtml ? htmlToText(body) : body);
|
|
162
|
-
return {
|
|
163
|
-
bodyHtml: isHtml ? body : null,
|
|
164
|
-
bodyText: plain === "" ? null : plain
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
export {
|
|
169
|
-
withLeadFields,
|
|
170
|
-
withMappedFields,
|
|
171
|
-
mapPage,
|
|
172
|
-
flatMapPage,
|
|
173
|
-
listIn,
|
|
174
|
-
normalizeBody,
|
|
175
|
-
createVendorClient
|
|
176
|
-
};
|
|
@@ -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,28 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { ZodType } from "zod";
|
|
3
|
-
import type { Json } from "./json.ts";
|
|
4
|
-
/** The fields of an object schema, by name. */
|
|
5
|
-
type Fields = Readonly<Record<string, ZodType>>;
|
|
6
|
-
/**
|
|
7
|
-
* The old name of the field `to`. Pass the new field's schema without its
|
|
8
|
-
* default, so leaving the old name out does not set it.
|
|
9
|
-
*/
|
|
10
|
-
export declare const renamed: <Schema extends ZodType>(to: string, base: Schema) => z.ZodOptional<Schema>;
|
|
11
|
-
/** The field names without the deprecated old names. */
|
|
12
|
-
export declare const liveKeys: (fields: Fields) => string[];
|
|
13
|
-
export type Renamed = {
|
|
14
|
-
readonly input: Json | undefined;
|
|
15
|
-
readonly notes: readonly string[];
|
|
16
|
-
} | {
|
|
17
|
-
readonly conflict: {
|
|
18
|
-
readonly from: string;
|
|
19
|
-
readonly to: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* The input with each old name's value moved to its new name, and a note
|
|
24
|
-
* for each old name used. Both names at once is a conflict, since either
|
|
25
|
-
* value could be the one meant.
|
|
26
|
-
*/
|
|
27
|
-
export declare const applyRenames: (fields: Fields, input: Json | undefined) => Renamed;
|
|
28
|
-
export {};
|
|
@@ -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,
|