@signaliz/sdk 1.0.64 → 1.0.65

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.
@@ -1911,6 +1911,16 @@ function normalizeSignalDiscoverySignal(value) {
1911
1911
  if (!companyName || !companyDomain) {
1912
1912
  throw new Error("Signals Everything response violated the company attribution contract.");
1913
1913
  }
1914
+ const eventDate = String(signal.event_date ?? signal.date ?? signal.signal_date ?? "").trim();
1915
+ const sourceUrl = String(signal.source_url ?? signal.url ?? "").trim();
1916
+ const evidence = Array.isArray(signal.evidence) ? signal.evidence.map((item) => ({
1917
+ url: String(item?.url ?? "").trim(),
1918
+ publishedAt: String(item?.published_at ?? item?.publishedAt ?? "").trim(),
1919
+ source: String(item?.source ?? "").trim()
1920
+ })).filter((item) => Boolean(item.url)) : [];
1921
+ if (!eventDate || !sourceUrl || !evidence.some((item) => item.url === sourceUrl && item.publishedAt === eventDate)) {
1922
+ throw new Error("Signals Everything response violated the dated-evidence and source-URL contract.");
1923
+ }
1914
1924
  return {
1915
1925
  id: signal.id,
1916
1926
  company: {
@@ -1921,16 +1931,12 @@ function normalizeSignalDiscoverySignal(value) {
1921
1931
  title: signal.title ?? "",
1922
1932
  type: signal.type ?? signal.signal_type ?? "unknown",
1923
1933
  summary: signal.summary ?? signal.content ?? signal.description ?? "",
1924
- eventDate: signal.event_date ?? signal.date ?? signal.signal_date ?? null,
1925
- evidence: Array.isArray(signal.evidence) ? signal.evidence.map((item) => ({
1926
- url: String(item?.url ?? ""),
1927
- publishedAt: String(item?.published_at ?? item?.publishedAt ?? ""),
1928
- source: String(item?.source ?? "")
1929
- })).filter((item) => Boolean(item.url)) : [],
1934
+ eventDate,
1935
+ evidence,
1930
1936
  content: signal.summary ?? signal.content ?? signal.description ?? "",
1931
1937
  date: signal.event_date ?? signal.date ?? signal.signal_date ?? null,
1932
1938
  detectedAt: signal.event_date ?? signal.detected_at ?? null,
1933
- sourceUrl: signal.source_url ?? signal.url ?? null,
1939
+ sourceUrl,
1934
1940
  sourceType: signal.source_type ?? null,
1935
1941
  confidence: signal.confidence ?? signal.confidence_score ?? null,
1936
1942
  classification: signal.signal_classification ?? signal.classification ?? null,
package/dist/index.d.mts CHANGED
@@ -373,7 +373,7 @@ interface SignalDiscoverySignal {
373
373
  title: string;
374
374
  type: string;
375
375
  summary: string;
376
- eventDate?: string | null;
376
+ eventDate: string;
377
377
  evidence: Array<{
378
378
  url: string;
379
379
  publishedAt: string;
@@ -384,7 +384,7 @@ interface SignalDiscoverySignal {
384
384
  /** Compatibility alias for eventDate. */
385
385
  date?: string | null;
386
386
  detectedAt?: string | null;
387
- sourceUrl?: string | null;
387
+ sourceUrl: string;
388
388
  sourceType?: string | null;
389
389
  confidence?: number | null;
390
390
  classification?: Record<string, unknown> | string | null;
package/dist/index.d.ts CHANGED
@@ -373,7 +373,7 @@ interface SignalDiscoverySignal {
373
373
  title: string;
374
374
  type: string;
375
375
  summary: string;
376
- eventDate?: string | null;
376
+ eventDate: string;
377
377
  evidence: Array<{
378
378
  url: string;
379
379
  publishedAt: string;
@@ -384,7 +384,7 @@ interface SignalDiscoverySignal {
384
384
  /** Compatibility alias for eventDate. */
385
385
  date?: string | null;
386
386
  detectedAt?: string | null;
387
- sourceUrl?: string | null;
387
+ sourceUrl: string;
388
388
  sourceType?: string | null;
389
389
  confidence?: number | null;
390
390
  classification?: Record<string, unknown> | string | null;
package/dist/index.js CHANGED
@@ -1938,6 +1938,16 @@ function normalizeSignalDiscoverySignal(value) {
1938
1938
  if (!companyName || !companyDomain) {
1939
1939
  throw new Error("Signals Everything response violated the company attribution contract.");
1940
1940
  }
1941
+ const eventDate = String(signal.event_date ?? signal.date ?? signal.signal_date ?? "").trim();
1942
+ const sourceUrl = String(signal.source_url ?? signal.url ?? "").trim();
1943
+ const evidence = Array.isArray(signal.evidence) ? signal.evidence.map((item) => ({
1944
+ url: String(item?.url ?? "").trim(),
1945
+ publishedAt: String(item?.published_at ?? item?.publishedAt ?? "").trim(),
1946
+ source: String(item?.source ?? "").trim()
1947
+ })).filter((item) => Boolean(item.url)) : [];
1948
+ if (!eventDate || !sourceUrl || !evidence.some((item) => item.url === sourceUrl && item.publishedAt === eventDate)) {
1949
+ throw new Error("Signals Everything response violated the dated-evidence and source-URL contract.");
1950
+ }
1941
1951
  return {
1942
1952
  id: signal.id,
1943
1953
  company: {
@@ -1948,16 +1958,12 @@ function normalizeSignalDiscoverySignal(value) {
1948
1958
  title: signal.title ?? "",
1949
1959
  type: signal.type ?? signal.signal_type ?? "unknown",
1950
1960
  summary: signal.summary ?? signal.content ?? signal.description ?? "",
1951
- eventDate: signal.event_date ?? signal.date ?? signal.signal_date ?? null,
1952
- evidence: Array.isArray(signal.evidence) ? signal.evidence.map((item) => ({
1953
- url: String(item?.url ?? ""),
1954
- publishedAt: String(item?.published_at ?? item?.publishedAt ?? ""),
1955
- source: String(item?.source ?? "")
1956
- })).filter((item) => Boolean(item.url)) : [],
1961
+ eventDate,
1962
+ evidence,
1957
1963
  content: signal.summary ?? signal.content ?? signal.description ?? "",
1958
1964
  date: signal.event_date ?? signal.date ?? signal.signal_date ?? null,
1959
1965
  detectedAt: signal.event_date ?? signal.detected_at ?? null,
1960
- sourceUrl: signal.source_url ?? signal.url ?? null,
1966
+ sourceUrl,
1961
1967
  sourceType: signal.source_type ?? null,
1962
1968
  confidence: signal.confidence ?? signal.confidence_score ?? null,
1963
1969
  classification: signal.signal_classification ?? signal.classification ?? null,
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Signaliz,
3
3
  SignalizError
4
- } from "./chunk-PDOG4IUP.mjs";
4
+ } from "./chunk-FOHZG634.mjs";
5
5
  export {
6
6
  Signaliz,
7
7
  SignalizError
@@ -1942,6 +1942,16 @@ function normalizeSignalDiscoverySignal(value) {
1942
1942
  if (!companyName || !companyDomain) {
1943
1943
  throw new Error("Signals Everything response violated the company attribution contract.");
1944
1944
  }
1945
+ const eventDate = String(signal.event_date ?? signal.date ?? signal.signal_date ?? "").trim();
1946
+ const sourceUrl = String(signal.source_url ?? signal.url ?? "").trim();
1947
+ const evidence = Array.isArray(signal.evidence) ? signal.evidence.map((item) => ({
1948
+ url: String(item?.url ?? "").trim(),
1949
+ publishedAt: String(item?.published_at ?? item?.publishedAt ?? "").trim(),
1950
+ source: String(item?.source ?? "").trim()
1951
+ })).filter((item) => Boolean(item.url)) : [];
1952
+ if (!eventDate || !sourceUrl || !evidence.some((item) => item.url === sourceUrl && item.publishedAt === eventDate)) {
1953
+ throw new Error("Signals Everything response violated the dated-evidence and source-URL contract.");
1954
+ }
1945
1955
  return {
1946
1956
  id: signal.id,
1947
1957
  company: {
@@ -1952,16 +1962,12 @@ function normalizeSignalDiscoverySignal(value) {
1952
1962
  title: signal.title ?? "",
1953
1963
  type: signal.type ?? signal.signal_type ?? "unknown",
1954
1964
  summary: signal.summary ?? signal.content ?? signal.description ?? "",
1955
- eventDate: signal.event_date ?? signal.date ?? signal.signal_date ?? null,
1956
- evidence: Array.isArray(signal.evidence) ? signal.evidence.map((item) => ({
1957
- url: String(item?.url ?? ""),
1958
- publishedAt: String(item?.published_at ?? item?.publishedAt ?? ""),
1959
- source: String(item?.source ?? "")
1960
- })).filter((item) => Boolean(item.url)) : [],
1965
+ eventDate,
1966
+ evidence,
1961
1967
  content: signal.summary ?? signal.content ?? signal.description ?? "",
1962
1968
  date: signal.event_date ?? signal.date ?? signal.signal_date ?? null,
1963
1969
  detectedAt: signal.event_date ?? signal.detected_at ?? null,
1964
- sourceUrl: signal.source_url ?? signal.url ?? null,
1970
+ sourceUrl,
1965
1971
  sourceType: signal.source_type ?? null,
1966
1972
  confidence: signal.confidence ?? signal.confidence_score ?? null,
1967
1973
  classification: signal.signal_classification ?? signal.classification ?? null,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Signaliz
4
- } from "./chunk-PDOG4IUP.mjs";
4
+ } from "./chunk-FOHZG634.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.64",
3
+ "version": "1.0.65",
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",