@signaliz/sdk 1.0.62 → 1.0.63

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 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 Signal to Copy. Those plans
218
- still check eligible workspace signal data first even when Company Signals is
219
- set to No cache. `lookbackDays` remains a hard evidence-age bound for both
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.
@@ -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
- if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
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
  );
@@ -2229,6 +2227,8 @@ function normalizeSignalToCopyResult(data) {
2229
2227
  liveProviderCalled: data.live_provider_called,
2230
2228
  aiProviderCalled: data.ai_provider_called,
2231
2229
  byoAiUsed: data.byo_ai_used,
2230
+ unlimitedSignalToCopy: data.unlimited_signal_to_copy,
2231
+ signalToCopyEntitlement: data.signal_to_copy_entitlement,
2232
2232
  variations: (failed ? [] : data.variations ?? []).map((variation) => ({
2233
2233
  style: variation.style,
2234
2234
  subjectLine: variation.subject_line ?? "",
@@ -2312,6 +2312,14 @@ async function waitForNextSignalPoll(data, override, startedAt, maxWaitMs) {
2312
2312
  function sleep2(ms) {
2313
2313
  return new Promise((resolve) => setTimeout(resolve, ms));
2314
2314
  }
2315
+ function validateCoreBatchPollingOptions(options) {
2316
+ if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
2317
+ throw new RangeError("maxWaitMs must be a positive finite number");
2318
+ }
2319
+ if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
2320
+ throw new RangeError("pollIntervalMs must be a positive finite number");
2321
+ }
2322
+ }
2315
2323
  function assertRecoverableBatchResultsRetained(status, label, jobId, idempotencyKey) {
2316
2324
  if (status.results_expired !== true && status.results_cleaned !== true) return;
2317
2325
  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
@@ -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
- if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
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
  );
@@ -2256,6 +2254,8 @@ function normalizeSignalToCopyResult(data) {
2256
2254
  liveProviderCalled: data.live_provider_called,
2257
2255
  aiProviderCalled: data.ai_provider_called,
2258
2256
  byoAiUsed: data.byo_ai_used,
2257
+ unlimitedSignalToCopy: data.unlimited_signal_to_copy,
2258
+ signalToCopyEntitlement: data.signal_to_copy_entitlement,
2259
2259
  variations: (failed ? [] : data.variations ?? []).map((variation) => ({
2260
2260
  style: variation.style,
2261
2261
  subjectLine: variation.subject_line ?? "",
@@ -2339,6 +2339,14 @@ async function waitForNextSignalPoll(data, override, startedAt, maxWaitMs) {
2339
2339
  function sleep2(ms) {
2340
2340
  return new Promise((resolve) => setTimeout(resolve, ms));
2341
2341
  }
2342
+ function validateCoreBatchPollingOptions(options) {
2343
+ if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
2344
+ throw new RangeError("maxWaitMs must be a positive finite number");
2345
+ }
2346
+ if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
2347
+ throw new RangeError("pollIntervalMs must be a positive finite number");
2348
+ }
2349
+ }
2342
2350
  function assertRecoverableBatchResultsRetained(status, label, jobId, idempotencyKey) {
2343
2351
  if (status.results_expired !== true && status.results_cleaned !== true) return;
2344
2352
  throw new SignalizError({
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Signaliz,
3
3
  SignalizError
4
- } from "./chunk-6G2FALRZ.mjs";
4
+ } from "./chunk-VWO2GEYQ.mjs";
5
5
  export {
6
6
  Signaliz,
7
7
  SignalizError
@@ -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
- if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
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
  );
@@ -2260,6 +2258,8 @@ function normalizeSignalToCopyResult(data) {
2260
2258
  liveProviderCalled: data.live_provider_called,
2261
2259
  aiProviderCalled: data.ai_provider_called,
2262
2260
  byoAiUsed: data.byo_ai_used,
2261
+ unlimitedSignalToCopy: data.unlimited_signal_to_copy,
2262
+ signalToCopyEntitlement: data.signal_to_copy_entitlement,
2263
2263
  variations: (failed ? [] : data.variations ?? []).map((variation) => ({
2264
2264
  style: variation.style,
2265
2265
  subjectLine: variation.subject_line ?? "",
@@ -2343,6 +2343,14 @@ async function waitForNextSignalPoll(data, override, startedAt, maxWaitMs) {
2343
2343
  function sleep2(ms) {
2344
2344
  return new Promise((resolve) => setTimeout(resolve, ms));
2345
2345
  }
2346
+ function validateCoreBatchPollingOptions(options) {
2347
+ if (options.maxWaitMs !== void 0 && (!Number.isFinite(options.maxWaitMs) || options.maxWaitMs <= 0)) {
2348
+ throw new RangeError("maxWaitMs must be a positive finite number");
2349
+ }
2350
+ if (options.pollIntervalMs !== void 0 && (!Number.isFinite(options.pollIntervalMs) || options.pollIntervalMs <= 0)) {
2351
+ throw new RangeError("pollIntervalMs must be a positive finite number");
2352
+ }
2353
+ }
2346
2354
  function assertRecoverableBatchResultsRetained(status, label, jobId, idempotencyKey) {
2347
2355
  if (status.results_expired !== true && status.results_cleaned !== true) return;
2348
2356
  throw new SignalizError({
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Signaliz
4
- } from "./chunk-6G2FALRZ.mjs";
4
+ } from "./chunk-VWO2GEYQ.mjs";
5
5
 
6
6
  // src/mcp-config.ts
7
7
  import * as fs from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaliz/sdk",
3
- "version": "1.0.62",
3
+ "version": "1.0.63",
4
4
  "description": "Signaliz SDK for Signals Everything, Find Email, Verify Email, Company Signal Enrichment, and Signal to Copy AI.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",