@signaliz/sdk 1.0.62 → 1.0.64
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 +7 -3
- package/dist/{chunk-6G2FALRZ.mjs → chunk-PDOG4IUP.mjs} +27 -10
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +27 -10
- package/dist/index.mjs +1 -1
- package/dist/mcp-config.js +27 -10
- package/dist/mcp-config.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,6 +166,8 @@ can instead set `waitForResult: false` to receive `jobId` plus the actual
|
|
|
166
166
|
`idempotencyKey`, then resume with `resumeCompanySignalBatch` or
|
|
167
167
|
`resumeSignalCopyBatch`. Company/Copy polling has no fixed SDK deadline unless
|
|
168
168
|
`maxWaitMs` is explicitly supplied; timeout errors retain both recovery fields.
|
|
169
|
+
Find Email and Verify Email polling defaults to 20 minutes; large email batches
|
|
170
|
+
honor `maxWaitMs` and `pollIntervalMs` and retain the same recovery fields.
|
|
169
171
|
Find Email, Verify Email, and Company Signals use bounded 25-row result pages;
|
|
170
172
|
Signal to Copy uses 100-row durable pages.
|
|
171
173
|
Retrieve completed Company/Copy pages within seven days. After cleanup, recovery
|
|
@@ -214,9 +216,11 @@ only when fresh or deeper research is required.
|
|
|
214
216
|
Every core request uses the authenticated workspace. Find Email and Verify Email
|
|
215
217
|
honor that workspace's configured cache window; eligible hits cost 0 credits,
|
|
216
218
|
while fresh discovery or verification is charged on every plan. Builder, Team,
|
|
217
|
-
Agency, and Pay-As-You-Go include fresh Company Signals and
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
Agency, and Pay-As-You-Go include fresh Company Signals. Team and Agency also
|
|
220
|
+
include Unlimited Signal to Copy AI; Signal to Copy remains callable on other
|
|
221
|
+
plans under the standard product contract. These plans still check eligible
|
|
222
|
+
workspace signal data first even when Company Signals is set to No cache.
|
|
223
|
+
`lookbackDays` remains a hard evidence-age bound for both
|
|
220
224
|
cached and fresh Company Signals and Signal to Copy results.
|
|
221
225
|
Unclassified evidence is returned by signal enrichment but is not used to
|
|
222
226
|
generate outreach copy.
|
|
@@ -703,7 +703,7 @@ var Signaliz = class {
|
|
|
703
703
|
);
|
|
704
704
|
}
|
|
705
705
|
async enrichCompanySignals(params) {
|
|
706
|
-
|
|
706
|
+
validateCompanySignalParams(params);
|
|
707
707
|
const request = companySignalRequestBody(params);
|
|
708
708
|
const data = await this.client.post("api/v1/company-signals", request);
|
|
709
709
|
if (isCoreProductDryRun(data)) return normalizeCoreProductDryRunResult(data);
|
|
@@ -723,7 +723,7 @@ var Signaliz = class {
|
|
|
723
723
|
}
|
|
724
724
|
async enrichCompanies(companies, options) {
|
|
725
725
|
validateBatchSize(companies);
|
|
726
|
-
companies.forEach(
|
|
726
|
+
companies.forEach(validateCompanySignalParams);
|
|
727
727
|
const requests = companies.map(companySignalRequestBody);
|
|
728
728
|
if (companies.length > 25 && requests.some((request) => request.include_candidate_evidence === true)) {
|
|
729
729
|
throw new RangeError(
|
|
@@ -1010,7 +1010,8 @@ var Signaliz = class {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
return uniqueResults;
|
|
1012
1012
|
}
|
|
1013
|
-
async runRecoverableCoreBatchJob(path, requests, label, pageSize = 500, maxWaitMs = 20 * 6e4, idempotencyKey, idempotencyItemIndices, submissionFields = {}) {
|
|
1013
|
+
async runRecoverableCoreBatchJob(path, requests, label, pageSize = 500, maxWaitMs = 20 * 6e4, pollIntervalMs, idempotencyKey, idempotencyItemIndices, submissionFields = {}) {
|
|
1014
|
+
validateCoreBatchPollingOptions({ maxWaitMs, pollIntervalMs });
|
|
1014
1015
|
const job = await this.submitRecoverableCoreBatchJob(
|
|
1015
1016
|
path,
|
|
1016
1017
|
requests,
|
|
@@ -1022,6 +1023,7 @@ var Signaliz = class {
|
|
|
1022
1023
|
const recovered = await this.readRecoverableCoreBatchJob(path, job.jobId, label, {
|
|
1023
1024
|
pageSize,
|
|
1024
1025
|
maxWaitMs,
|
|
1026
|
+
pollIntervalMs,
|
|
1025
1027
|
idempotencyKey: job.idempotencyKey
|
|
1026
1028
|
});
|
|
1027
1029
|
if (recovered.total !== requests.length) {
|
|
@@ -1090,12 +1092,7 @@ var Signaliz = class {
|
|
|
1090
1092
|
if (options.pageSize !== void 0 && (!Number.isFinite(options.pageSize) || options.pageSize <= 0)) {
|
|
1091
1093
|
throw new RangeError("pageSize must be a positive finite number");
|
|
1092
1094
|
}
|
|
1093
|
-
|
|
1094
|
-
throw new RangeError("maxWaitMs must be a positive finite number");
|
|
1095
|
-
}
|
|
1096
|
-
if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
|
|
1097
|
-
throw new RangeError("pollIntervalMs must be a positive finite number");
|
|
1098
|
-
}
|
|
1095
|
+
validateCoreBatchPollingOptions(options);
|
|
1099
1096
|
const maximumPageSize = path === "api/v1/signal-to-copy" ? 100 : 25;
|
|
1100
1097
|
const pageSize = Math.min(maximumPageSize, Math.max(1, Math.trunc(options.pageSize ?? maximumPageSize)));
|
|
1101
1098
|
const emailJob = path === "api/v1/find-email" || path === "api/v1/verify-email";
|
|
@@ -1287,7 +1284,8 @@ var Signaliz = class {
|
|
|
1287
1284
|
uniqueTasks.map((task) => task.request),
|
|
1288
1285
|
recoverableBatch.label,
|
|
1289
1286
|
recoverableBatch.pageSize,
|
|
1290
|
-
recoverableBatch.maxWaitMs,
|
|
1287
|
+
options?.maxWaitMs ?? recoverableBatch.maxWaitMs,
|
|
1288
|
+
options?.pollIntervalMs,
|
|
1291
1289
|
options?.idempotencyKey,
|
|
1292
1290
|
uniqueTasks.map((task) => task.index)
|
|
1293
1291
|
);
|
|
@@ -1674,6 +1672,15 @@ function companySignalRequestBody(params) {
|
|
|
1674
1672
|
idempotency_key: params.idempotencyKey
|
|
1675
1673
|
});
|
|
1676
1674
|
}
|
|
1675
|
+
function validateCompanySignalParams(params) {
|
|
1676
|
+
validateCoreProductMaxWaitMs(params.maxWaitMs);
|
|
1677
|
+
if (params.targetSignalCount !== void 0 && (!Number.isInteger(params.targetSignalCount) || params.targetSignalCount < 1 || params.targetSignalCount > 15)) {
|
|
1678
|
+
throw new RangeError("targetSignalCount must be an integer between 1 and 15");
|
|
1679
|
+
}
|
|
1680
|
+
if (params.lookbackDays !== void 0 && (!Number.isInteger(params.lookbackDays) || params.lookbackDays < 1 || params.lookbackDays > 365)) {
|
|
1681
|
+
throw new RangeError("lookbackDays must be an integer between 1 and 365");
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1677
1684
|
function companySignalParamsFromRecoveredRow(row) {
|
|
1678
1685
|
return {
|
|
1679
1686
|
companyDomain: row.company?.domain ?? row.company_domain,
|
|
@@ -2229,6 +2236,8 @@ function normalizeSignalToCopyResult(data) {
|
|
|
2229
2236
|
liveProviderCalled: data.live_provider_called,
|
|
2230
2237
|
aiProviderCalled: data.ai_provider_called,
|
|
2231
2238
|
byoAiUsed: data.byo_ai_used,
|
|
2239
|
+
unlimitedSignalToCopy: data.unlimited_signal_to_copy,
|
|
2240
|
+
signalToCopyEntitlement: data.signal_to_copy_entitlement,
|
|
2232
2241
|
variations: (failed ? [] : data.variations ?? []).map((variation) => ({
|
|
2233
2242
|
style: variation.style,
|
|
2234
2243
|
subjectLine: variation.subject_line ?? "",
|
|
@@ -2312,6 +2321,14 @@ async function waitForNextSignalPoll(data, override, startedAt, maxWaitMs) {
|
|
|
2312
2321
|
function sleep2(ms) {
|
|
2313
2322
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2314
2323
|
}
|
|
2324
|
+
function validateCoreBatchPollingOptions(options) {
|
|
2325
|
+
if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
|
|
2326
|
+
throw new RangeError("maxWaitMs must be a positive finite number");
|
|
2327
|
+
}
|
|
2328
|
+
if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
|
|
2329
|
+
throw new RangeError("pollIntervalMs must be a positive finite number");
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2315
2332
|
function assertRecoverableBatchResultsRetained(status, label, jobId, idempotencyKey) {
|
|
2316
2333
|
if (status.results_expired !== true && status.results_cleaned !== true) return;
|
|
2317
2334
|
throw new SignalizError({
|
package/dist/index.d.mts
CHANGED
|
@@ -17,7 +17,7 @@ interface BatchOptions {
|
|
|
17
17
|
dryRun?: boolean;
|
|
18
18
|
/** Return a durable Company Signals or Signal to Copy job handle immediately. */
|
|
19
19
|
waitForResult?: boolean;
|
|
20
|
-
/** Maximum time to poll a durable job. Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
20
|
+
/** Maximum time to poll a durable job. Email jobs default to 20 minutes; Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
21
21
|
maxWaitMs?: number;
|
|
22
22
|
/** Override the server-provided polling delay for a durable job. */
|
|
23
23
|
pollIntervalMs?: number;
|
|
@@ -494,6 +494,8 @@ interface SignalToCopyResult {
|
|
|
494
494
|
liveProviderCalled?: boolean;
|
|
495
495
|
aiProviderCalled?: boolean;
|
|
496
496
|
byoAiUsed?: boolean;
|
|
497
|
+
unlimitedSignalToCopy?: boolean;
|
|
498
|
+
signalToCopyEntitlement?: 'unlimited' | 'standard';
|
|
497
499
|
variations: SignalToCopyVariation[];
|
|
498
500
|
raw: Record<string, unknown>;
|
|
499
501
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ interface BatchOptions {
|
|
|
17
17
|
dryRun?: boolean;
|
|
18
18
|
/** Return a durable Company Signals or Signal to Copy job handle immediately. */
|
|
19
19
|
waitForResult?: boolean;
|
|
20
|
-
/** Maximum time to poll a durable job. Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
20
|
+
/** Maximum time to poll a durable job. Email jobs default to 20 minutes; Company/Copy jobs wait without a fixed deadline when omitted. */
|
|
21
21
|
maxWaitMs?: number;
|
|
22
22
|
/** Override the server-provided polling delay for a durable job. */
|
|
23
23
|
pollIntervalMs?: number;
|
|
@@ -494,6 +494,8 @@ interface SignalToCopyResult {
|
|
|
494
494
|
liveProviderCalled?: boolean;
|
|
495
495
|
aiProviderCalled?: boolean;
|
|
496
496
|
byoAiUsed?: boolean;
|
|
497
|
+
unlimitedSignalToCopy?: boolean;
|
|
498
|
+
signalToCopyEntitlement?: 'unlimited' | 'standard';
|
|
497
499
|
variations: SignalToCopyVariation[];
|
|
498
500
|
raw: Record<string, unknown>;
|
|
499
501
|
}
|
package/dist/index.js
CHANGED
|
@@ -730,7 +730,7 @@ var Signaliz = class {
|
|
|
730
730
|
);
|
|
731
731
|
}
|
|
732
732
|
async enrichCompanySignals(params) {
|
|
733
|
-
|
|
733
|
+
validateCompanySignalParams(params);
|
|
734
734
|
const request = companySignalRequestBody(params);
|
|
735
735
|
const data = await this.client.post("api/v1/company-signals", request);
|
|
736
736
|
if (isCoreProductDryRun(data)) return normalizeCoreProductDryRunResult(data);
|
|
@@ -750,7 +750,7 @@ var Signaliz = class {
|
|
|
750
750
|
}
|
|
751
751
|
async enrichCompanies(companies, options) {
|
|
752
752
|
validateBatchSize(companies);
|
|
753
|
-
companies.forEach(
|
|
753
|
+
companies.forEach(validateCompanySignalParams);
|
|
754
754
|
const requests = companies.map(companySignalRequestBody);
|
|
755
755
|
if (companies.length > 25 && requests.some((request) => request.include_candidate_evidence === true)) {
|
|
756
756
|
throw new RangeError(
|
|
@@ -1037,7 +1037,8 @@ var Signaliz = class {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
return uniqueResults;
|
|
1039
1039
|
}
|
|
1040
|
-
async runRecoverableCoreBatchJob(path, requests, label, pageSize = 500, maxWaitMs = 20 * 6e4, idempotencyKey, idempotencyItemIndices, submissionFields = {}) {
|
|
1040
|
+
async runRecoverableCoreBatchJob(path, requests, label, pageSize = 500, maxWaitMs = 20 * 6e4, pollIntervalMs, idempotencyKey, idempotencyItemIndices, submissionFields = {}) {
|
|
1041
|
+
validateCoreBatchPollingOptions({ maxWaitMs, pollIntervalMs });
|
|
1041
1042
|
const job = await this.submitRecoverableCoreBatchJob(
|
|
1042
1043
|
path,
|
|
1043
1044
|
requests,
|
|
@@ -1049,6 +1050,7 @@ var Signaliz = class {
|
|
|
1049
1050
|
const recovered = await this.readRecoverableCoreBatchJob(path, job.jobId, label, {
|
|
1050
1051
|
pageSize,
|
|
1051
1052
|
maxWaitMs,
|
|
1053
|
+
pollIntervalMs,
|
|
1052
1054
|
idempotencyKey: job.idempotencyKey
|
|
1053
1055
|
});
|
|
1054
1056
|
if (recovered.total !== requests.length) {
|
|
@@ -1117,12 +1119,7 @@ var Signaliz = class {
|
|
|
1117
1119
|
if (options.pageSize !== void 0 && (!Number.isFinite(options.pageSize) || options.pageSize <= 0)) {
|
|
1118
1120
|
throw new RangeError("pageSize must be a positive finite number");
|
|
1119
1121
|
}
|
|
1120
|
-
|
|
1121
|
-
throw new RangeError("maxWaitMs must be a positive finite number");
|
|
1122
|
-
}
|
|
1123
|
-
if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
|
|
1124
|
-
throw new RangeError("pollIntervalMs must be a positive finite number");
|
|
1125
|
-
}
|
|
1122
|
+
validateCoreBatchPollingOptions(options);
|
|
1126
1123
|
const maximumPageSize = path === "api/v1/signal-to-copy" ? 100 : 25;
|
|
1127
1124
|
const pageSize = Math.min(maximumPageSize, Math.max(1, Math.trunc(options.pageSize ?? maximumPageSize)));
|
|
1128
1125
|
const emailJob = path === "api/v1/find-email" || path === "api/v1/verify-email";
|
|
@@ -1314,7 +1311,8 @@ var Signaliz = class {
|
|
|
1314
1311
|
uniqueTasks.map((task) => task.request),
|
|
1315
1312
|
recoverableBatch.label,
|
|
1316
1313
|
recoverableBatch.pageSize,
|
|
1317
|
-
recoverableBatch.maxWaitMs,
|
|
1314
|
+
options?.maxWaitMs ?? recoverableBatch.maxWaitMs,
|
|
1315
|
+
options?.pollIntervalMs,
|
|
1318
1316
|
options?.idempotencyKey,
|
|
1319
1317
|
uniqueTasks.map((task) => task.index)
|
|
1320
1318
|
);
|
|
@@ -1701,6 +1699,15 @@ function companySignalRequestBody(params) {
|
|
|
1701
1699
|
idempotency_key: params.idempotencyKey
|
|
1702
1700
|
});
|
|
1703
1701
|
}
|
|
1702
|
+
function validateCompanySignalParams(params) {
|
|
1703
|
+
validateCoreProductMaxWaitMs(params.maxWaitMs);
|
|
1704
|
+
if (params.targetSignalCount !== void 0 && (!Number.isInteger(params.targetSignalCount) || params.targetSignalCount < 1 || params.targetSignalCount > 15)) {
|
|
1705
|
+
throw new RangeError("targetSignalCount must be an integer between 1 and 15");
|
|
1706
|
+
}
|
|
1707
|
+
if (params.lookbackDays !== void 0 && (!Number.isInteger(params.lookbackDays) || params.lookbackDays < 1 || params.lookbackDays > 365)) {
|
|
1708
|
+
throw new RangeError("lookbackDays must be an integer between 1 and 365");
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1704
1711
|
function companySignalParamsFromRecoveredRow(row) {
|
|
1705
1712
|
return {
|
|
1706
1713
|
companyDomain: row.company?.domain ?? row.company_domain,
|
|
@@ -2256,6 +2263,8 @@ function normalizeSignalToCopyResult(data) {
|
|
|
2256
2263
|
liveProviderCalled: data.live_provider_called,
|
|
2257
2264
|
aiProviderCalled: data.ai_provider_called,
|
|
2258
2265
|
byoAiUsed: data.byo_ai_used,
|
|
2266
|
+
unlimitedSignalToCopy: data.unlimited_signal_to_copy,
|
|
2267
|
+
signalToCopyEntitlement: data.signal_to_copy_entitlement,
|
|
2259
2268
|
variations: (failed ? [] : data.variations ?? []).map((variation) => ({
|
|
2260
2269
|
style: variation.style,
|
|
2261
2270
|
subjectLine: variation.subject_line ?? "",
|
|
@@ -2339,6 +2348,14 @@ async function waitForNextSignalPoll(data, override, startedAt, maxWaitMs) {
|
|
|
2339
2348
|
function sleep2(ms) {
|
|
2340
2349
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2341
2350
|
}
|
|
2351
|
+
function validateCoreBatchPollingOptions(options) {
|
|
2352
|
+
if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
|
|
2353
|
+
throw new RangeError("maxWaitMs must be a positive finite number");
|
|
2354
|
+
}
|
|
2355
|
+
if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
|
|
2356
|
+
throw new RangeError("pollIntervalMs must be a positive finite number");
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2342
2359
|
function assertRecoverableBatchResultsRetained(status, label, jobId, idempotencyKey) {
|
|
2343
2360
|
if (status.results_expired !== true && status.results_cleaned !== true) return;
|
|
2344
2361
|
throw new SignalizError({
|
package/dist/index.mjs
CHANGED
package/dist/mcp-config.js
CHANGED
|
@@ -734,7 +734,7 @@ var Signaliz = class {
|
|
|
734
734
|
);
|
|
735
735
|
}
|
|
736
736
|
async enrichCompanySignals(params) {
|
|
737
|
-
|
|
737
|
+
validateCompanySignalParams(params);
|
|
738
738
|
const request = companySignalRequestBody(params);
|
|
739
739
|
const data = await this.client.post("api/v1/company-signals", request);
|
|
740
740
|
if (isCoreProductDryRun(data)) return normalizeCoreProductDryRunResult(data);
|
|
@@ -754,7 +754,7 @@ var Signaliz = class {
|
|
|
754
754
|
}
|
|
755
755
|
async enrichCompanies(companies, options) {
|
|
756
756
|
validateBatchSize(companies);
|
|
757
|
-
companies.forEach(
|
|
757
|
+
companies.forEach(validateCompanySignalParams);
|
|
758
758
|
const requests = companies.map(companySignalRequestBody);
|
|
759
759
|
if (companies.length > 25 && requests.some((request) => request.include_candidate_evidence === true)) {
|
|
760
760
|
throw new RangeError(
|
|
@@ -1041,7 +1041,8 @@ var Signaliz = class {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
return uniqueResults;
|
|
1043
1043
|
}
|
|
1044
|
-
async runRecoverableCoreBatchJob(path2, requests, label, pageSize = 500, maxWaitMs = 20 * 6e4, idempotencyKey, idempotencyItemIndices, submissionFields = {}) {
|
|
1044
|
+
async runRecoverableCoreBatchJob(path2, requests, label, pageSize = 500, maxWaitMs = 20 * 6e4, pollIntervalMs, idempotencyKey, idempotencyItemIndices, submissionFields = {}) {
|
|
1045
|
+
validateCoreBatchPollingOptions({ maxWaitMs, pollIntervalMs });
|
|
1045
1046
|
const job = await this.submitRecoverableCoreBatchJob(
|
|
1046
1047
|
path2,
|
|
1047
1048
|
requests,
|
|
@@ -1053,6 +1054,7 @@ var Signaliz = class {
|
|
|
1053
1054
|
const recovered = await this.readRecoverableCoreBatchJob(path2, job.jobId, label, {
|
|
1054
1055
|
pageSize,
|
|
1055
1056
|
maxWaitMs,
|
|
1057
|
+
pollIntervalMs,
|
|
1056
1058
|
idempotencyKey: job.idempotencyKey
|
|
1057
1059
|
});
|
|
1058
1060
|
if (recovered.total !== requests.length) {
|
|
@@ -1121,12 +1123,7 @@ var Signaliz = class {
|
|
|
1121
1123
|
if (options.pageSize !== void 0 && (!Number.isFinite(options.pageSize) || options.pageSize <= 0)) {
|
|
1122
1124
|
throw new RangeError("pageSize must be a positive finite number");
|
|
1123
1125
|
}
|
|
1124
|
-
|
|
1125
|
-
throw new RangeError("maxWaitMs must be a positive finite number");
|
|
1126
|
-
}
|
|
1127
|
-
if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
|
|
1128
|
-
throw new RangeError("pollIntervalMs must be a positive finite number");
|
|
1129
|
-
}
|
|
1126
|
+
validateCoreBatchPollingOptions(options);
|
|
1130
1127
|
const maximumPageSize = path2 === "api/v1/signal-to-copy" ? 100 : 25;
|
|
1131
1128
|
const pageSize = Math.min(maximumPageSize, Math.max(1, Math.trunc(options.pageSize ?? maximumPageSize)));
|
|
1132
1129
|
const emailJob = path2 === "api/v1/find-email" || path2 === "api/v1/verify-email";
|
|
@@ -1318,7 +1315,8 @@ var Signaliz = class {
|
|
|
1318
1315
|
uniqueTasks.map((task) => task.request),
|
|
1319
1316
|
recoverableBatch.label,
|
|
1320
1317
|
recoverableBatch.pageSize,
|
|
1321
|
-
recoverableBatch.maxWaitMs,
|
|
1318
|
+
options?.maxWaitMs ?? recoverableBatch.maxWaitMs,
|
|
1319
|
+
options?.pollIntervalMs,
|
|
1322
1320
|
options?.idempotencyKey,
|
|
1323
1321
|
uniqueTasks.map((task) => task.index)
|
|
1324
1322
|
);
|
|
@@ -1705,6 +1703,15 @@ function companySignalRequestBody(params) {
|
|
|
1705
1703
|
idempotency_key: params.idempotencyKey
|
|
1706
1704
|
});
|
|
1707
1705
|
}
|
|
1706
|
+
function validateCompanySignalParams(params) {
|
|
1707
|
+
validateCoreProductMaxWaitMs(params.maxWaitMs);
|
|
1708
|
+
if (params.targetSignalCount !== void 0 && (!Number.isInteger(params.targetSignalCount) || params.targetSignalCount < 1 || params.targetSignalCount > 15)) {
|
|
1709
|
+
throw new RangeError("targetSignalCount must be an integer between 1 and 15");
|
|
1710
|
+
}
|
|
1711
|
+
if (params.lookbackDays !== void 0 && (!Number.isInteger(params.lookbackDays) || params.lookbackDays < 1 || params.lookbackDays > 365)) {
|
|
1712
|
+
throw new RangeError("lookbackDays must be an integer between 1 and 365");
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1708
1715
|
function companySignalParamsFromRecoveredRow(row) {
|
|
1709
1716
|
return {
|
|
1710
1717
|
companyDomain: row.company?.domain ?? row.company_domain,
|
|
@@ -2260,6 +2267,8 @@ function normalizeSignalToCopyResult(data) {
|
|
|
2260
2267
|
liveProviderCalled: data.live_provider_called,
|
|
2261
2268
|
aiProviderCalled: data.ai_provider_called,
|
|
2262
2269
|
byoAiUsed: data.byo_ai_used,
|
|
2270
|
+
unlimitedSignalToCopy: data.unlimited_signal_to_copy,
|
|
2271
|
+
signalToCopyEntitlement: data.signal_to_copy_entitlement,
|
|
2263
2272
|
variations: (failed ? [] : data.variations ?? []).map((variation) => ({
|
|
2264
2273
|
style: variation.style,
|
|
2265
2274
|
subjectLine: variation.subject_line ?? "",
|
|
@@ -2343,6 +2352,14 @@ async function waitForNextSignalPoll(data, override, startedAt, maxWaitMs) {
|
|
|
2343
2352
|
function sleep2(ms) {
|
|
2344
2353
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
2345
2354
|
}
|
|
2355
|
+
function validateCoreBatchPollingOptions(options) {
|
|
2356
|
+
if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
|
|
2357
|
+
throw new RangeError("maxWaitMs must be a positive finite number");
|
|
2358
|
+
}
|
|
2359
|
+
if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
|
|
2360
|
+
throw new RangeError("pollIntervalMs must be a positive finite number");
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2346
2363
|
function assertRecoverableBatchResultsRetained(status, label, jobId, idempotencyKey) {
|
|
2347
2364
|
if (status.results_expired !== true && status.results_cleaned !== true) return;
|
|
2348
2365
|
throw new SignalizError({
|
package/dist/mcp-config.mjs
CHANGED
package/package.json
CHANGED