@signaliz/sdk 1.0.71 → 1.0.72
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 +8 -3
- package/dist/{chunk-L3Z56ZVO.mjs → chunk-MFXKZU6K.mjs} +91 -6
- package/dist/index.d.mts +47 -5
- package/dist/index.d.ts +47 -5
- package/dist/index.js +91 -6
- package/dist/index.mjs +1 -1
- package/dist/mcp-config.js +91 -6
- package/dist/mcp-config.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -113,10 +113,13 @@ const copyFromSignalRun = await signaliz.signalToCopy({
|
|
|
113
113
|
});
|
|
114
114
|
// The copy result reuses the completed snapshot without rediscovery.
|
|
115
115
|
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
const monitor = await signaliz.createSignalMonitor({
|
|
117
|
+
companyName: 'Acme',
|
|
118
|
+
domain: 'acme.com',
|
|
119
|
+
schedule: 'daily',
|
|
119
120
|
});
|
|
121
|
+
await signaliz.updateSignalMonitor(monitor.monitor?.id!, { schedule: 'weekly' });
|
|
122
|
+
const awareness = await signaliz.listSignalAwarenessSignals(monitor.monitor?.id);
|
|
120
123
|
console.log(
|
|
121
124
|
awareness.signals?.[0].signal_type,
|
|
122
125
|
awareness.signals?.[0].source,
|
|
@@ -124,6 +127,8 @@ console.log(
|
|
|
124
127
|
awareness.signals?.[0].company_name,
|
|
125
128
|
awareness.signals?.[0].domain,
|
|
126
129
|
);
|
|
130
|
+
// Awareness runs the same fixed, type-agnostic evidence engine as Company
|
|
131
|
+
// Signal Enrichment. Use scheduleCron for an exact UTC schedule.
|
|
127
132
|
|
|
128
133
|
// Flow uses the same versioned REST gateway as every other SDK capability.
|
|
129
134
|
const flow = await signaliz.startFlow({
|
|
@@ -822,6 +822,43 @@ var Signaliz = class {
|
|
|
822
822
|
async runSignalMonitor(monitorId, idempotencyKey) {
|
|
823
823
|
return this.signalAwareness({ action: "manual_run", monitorId, idempotencyKey });
|
|
824
824
|
}
|
|
825
|
+
async updateSignalMonitor(monitorId, updates) {
|
|
826
|
+
return this.signalAwareness({ action: "update", monitorId, updates });
|
|
827
|
+
}
|
|
828
|
+
async pauseSignalMonitor(monitorId) {
|
|
829
|
+
return this.updateSignalMonitor(monitorId, { status: "paused" });
|
|
830
|
+
}
|
|
831
|
+
async resumeSignalMonitor(monitorId) {
|
|
832
|
+
return this.updateSignalMonitor(monitorId, { status: "active" });
|
|
833
|
+
}
|
|
834
|
+
async deleteSignalMonitor(monitorId) {
|
|
835
|
+
return this.signalAwareness({ action: "delete", monitorId });
|
|
836
|
+
}
|
|
837
|
+
async listSignalAwarenessSignals(monitorId, limit, offset) {
|
|
838
|
+
return this.signalAwareness({ action: "list_signals", monitorId, limit, offset });
|
|
839
|
+
}
|
|
840
|
+
async bulkCreateSignalMonitors(monitors, defaults) {
|
|
841
|
+
return this.signalAwareness({ action: "bulk_import", monitors, defaults });
|
|
842
|
+
}
|
|
843
|
+
async getSignalAwarenessSettings() {
|
|
844
|
+
return this.signalAwareness({ action: "get_settings" });
|
|
845
|
+
}
|
|
846
|
+
async setSignalAwarenessOutput(outputMode, webhookUrl) {
|
|
847
|
+
return this.signalAwareness({
|
|
848
|
+
action: "set_global_webhook",
|
|
849
|
+
enabled: outputMode === "webhook",
|
|
850
|
+
webhookUrl: outputMode === "webhook" ? webhookUrl : null
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
async testSignalAwarenessWebhook(webhookUrl) {
|
|
854
|
+
return this.signalAwareness({ action: "test_webhook", webhookUrl });
|
|
855
|
+
}
|
|
856
|
+
async exportSignalAwareness(monitorId) {
|
|
857
|
+
return this.signalAwareness({ action: "export", monitorId });
|
|
858
|
+
}
|
|
859
|
+
async sendSignalAwarenessExport(signals) {
|
|
860
|
+
return this.signalAwareness({ action: "send_signal_export", signals });
|
|
861
|
+
}
|
|
825
862
|
async findEmail(params) {
|
|
826
863
|
const request = findEmailRequestBody(params);
|
|
827
864
|
assertFindEmailRequestIdentity(request);
|
|
@@ -2611,24 +2648,50 @@ function normalizeSignalToCopyResult(data) {
|
|
|
2611
2648
|
raw: data
|
|
2612
2649
|
};
|
|
2613
2650
|
}
|
|
2651
|
+
var SIGNAL_AWARENESS_SCHEDULES = {
|
|
2652
|
+
every_6_hours: "0 */6 * * *",
|
|
2653
|
+
daily: "0 8 * * *",
|
|
2654
|
+
every_2_days: "0 8 */2 * *",
|
|
2655
|
+
weekly: "0 8 * * 1",
|
|
2656
|
+
monthly: "0 8 1 * *"
|
|
2657
|
+
};
|
|
2658
|
+
function signalAwarenessScheduleCron(value) {
|
|
2659
|
+
return value.scheduleCron || (value.schedule ? SIGNAL_AWARENESS_SCHEDULES[value.schedule] : void 0);
|
|
2660
|
+
}
|
|
2614
2661
|
function signalAwarenessMonitorRequest(monitor) {
|
|
2615
2662
|
return compact({
|
|
2616
2663
|
company_name: monitor.companyName,
|
|
2617
2664
|
domain: monitor.domain,
|
|
2618
|
-
|
|
2619
|
-
signal_config: monitor.signalConfig,
|
|
2620
|
-
schedule_cron: monitor.scheduleCron,
|
|
2665
|
+
schedule_cron: signalAwarenessScheduleCron(monitor),
|
|
2621
2666
|
webhook_url: monitor.webhookUrl
|
|
2622
2667
|
});
|
|
2623
2668
|
}
|
|
2669
|
+
function signalAwarenessMonitorDefaultsRequest(defaults) {
|
|
2670
|
+
return compact({
|
|
2671
|
+
schedule_cron: signalAwarenessScheduleCron(defaults),
|
|
2672
|
+
webhook_url: defaults.webhookUrl
|
|
2673
|
+
});
|
|
2674
|
+
}
|
|
2675
|
+
function signalAwarenessMonitorUpdateRequest(updates) {
|
|
2676
|
+
return compact({
|
|
2677
|
+
company_name: updates.companyName,
|
|
2678
|
+
schedule_cron: signalAwarenessScheduleCron(updates),
|
|
2679
|
+
status: updates.status,
|
|
2680
|
+
webhook_url: updates.webhookUrl
|
|
2681
|
+
});
|
|
2682
|
+
}
|
|
2624
2683
|
function signalAwarenessRequestBody(request) {
|
|
2625
2684
|
return compact({
|
|
2626
2685
|
action: request.action,
|
|
2627
2686
|
monitor_id: request.monitorId,
|
|
2628
2687
|
monitor: request.monitor ? signalAwarenessMonitorRequest(request.monitor) : void 0,
|
|
2629
2688
|
monitors: request.monitors?.map(signalAwarenessMonitorRequest),
|
|
2630
|
-
defaults: request.defaults,
|
|
2631
|
-
updates: request.updates,
|
|
2689
|
+
defaults: request.defaults ? signalAwarenessMonitorDefaultsRequest(request.defaults) : void 0,
|
|
2690
|
+
updates: request.updates ? signalAwarenessMonitorUpdateRequest(request.updates) : void 0,
|
|
2691
|
+
enabled: request.enabled,
|
|
2692
|
+
webhook_url: request.webhookUrl,
|
|
2693
|
+
signal_ids: request.signalIds,
|
|
2694
|
+
signals: request.signals,
|
|
2632
2695
|
limit: request.limit,
|
|
2633
2696
|
offset: request.offset,
|
|
2634
2697
|
idempotency_key: request.idempotencyKey,
|
|
@@ -2637,7 +2700,7 @@ function signalAwarenessRequestBody(request) {
|
|
|
2637
2700
|
}
|
|
2638
2701
|
function normalizeSignalAwarenessResponse(data) {
|
|
2639
2702
|
const payload = data.data && typeof data.data === "object" ? data.data : data;
|
|
2640
|
-
const signals = Array.isArray(payload.signals) ?
|
|
2703
|
+
const signals = Array.isArray(payload.signals) ? payload.signals.flatMap(normalizeSignalAwarenessSignal) : void 0;
|
|
2641
2704
|
const monitors = Array.isArray(payload.monitors) ? payload.monitors.map(normalizeSignalAwarenessMonitor).filter((value) => value !== void 0) : void 0;
|
|
2642
2705
|
const monitor = normalizeSignalAwarenessMonitor(payload.monitor);
|
|
2643
2706
|
const run = normalizeSignalAwarenessRun(payload.run);
|
|
@@ -2655,6 +2718,18 @@ function normalizeSignalAwarenessResponse(data) {
|
|
|
2655
2718
|
...Number.isInteger(creditsUsed) && creditsUsed >= 0 ? { creditsUsed } : {},
|
|
2656
2719
|
...Number.isFinite(Number(payload.created)) ? { created: Number(payload.created) } : {},
|
|
2657
2720
|
...Number.isFinite(Number(payload.skipped)) ? { skipped: Number(payload.skipped) } : {},
|
|
2721
|
+
...Number.isFinite(Number(payload.delivered)) ? { delivered: Number(payload.delivered) } : {},
|
|
2722
|
+
...Array.isArray(payload.errors) ? {
|
|
2723
|
+
errors: payload.errors.flatMap((item) => {
|
|
2724
|
+
const error = signalAwarenessRecord(item);
|
|
2725
|
+
const row = signalAwarenessCount(error.row);
|
|
2726
|
+
const message = signalAwarenessText(error.error, 500);
|
|
2727
|
+
return row !== void 0 && message ? [{ row, error: message }] : [];
|
|
2728
|
+
})
|
|
2729
|
+
} : {},
|
|
2730
|
+
...payload.output_mode === "csv" || payload.output_mode === "webhook" ? { outputMode: payload.output_mode } : {},
|
|
2731
|
+
...payload.webhook_url === null || typeof payload.webhook_url === "string" ? { webhookUrl: payload.webhook_url } : {},
|
|
2732
|
+
...Number.isInteger(Number(payload.webhook_status)) ? { webhookStatus: Number(payload.webhook_status) } : {},
|
|
2658
2733
|
...Number.isFinite(Number(payload.total)) ? { total: Number(payload.total) } : {},
|
|
2659
2734
|
...Number.isFinite(Number(payload.limit)) ? { limit: Number(payload.limit) } : {},
|
|
2660
2735
|
...Number.isFinite(Number(payload.offset)) ? { offset: Number(payload.offset) } : {},
|
|
@@ -2680,11 +2755,21 @@ function normalizeSignalAwarenessMonitor(value) {
|
|
|
2680
2755
|
const domain = signalAwarenessText(monitor.domain, 253);
|
|
2681
2756
|
const status = signalAwarenessText(monitor.status, 80);
|
|
2682
2757
|
const schedule = signalAwarenessText(monitor.schedule, 120);
|
|
2758
|
+
const scheduleCron = signalAwarenessText(monitor.schedule_cron, 120);
|
|
2683
2759
|
if (id) result.id = id;
|
|
2684
2760
|
if (companyName) result.company_name = companyName;
|
|
2685
2761
|
if (domain) result.domain = domain;
|
|
2686
2762
|
if (status) result.status = status;
|
|
2687
2763
|
if (schedule) result.schedule = schedule;
|
|
2764
|
+
if (scheduleCron) result.schedule_cron = scheduleCron;
|
|
2765
|
+
if (monitor.webhook_url === null || typeof monitor.webhook_url === "string") result.webhook_url = monitor.webhook_url;
|
|
2766
|
+
for (const key of ["total_runs", "total_signals_found", "consecutive_failures"]) {
|
|
2767
|
+
const value2 = signalAwarenessCount(monitor[key]);
|
|
2768
|
+
if (value2 !== void 0) result[key] = value2;
|
|
2769
|
+
}
|
|
2770
|
+
if (typeof monitor.auto_paused === "boolean") result.auto_paused = monitor.auto_paused;
|
|
2771
|
+
const autoPauseReason = signalAwarenessText(monitor.auto_pause_reason, 500);
|
|
2772
|
+
if (autoPauseReason) result.auto_pause_reason = autoPauseReason;
|
|
2688
2773
|
for (const key of ["last_run_at", "next_run_at", "created_at", "updated_at"]) {
|
|
2689
2774
|
const timestamp = signalAwarenessText(monitor[key], 64);
|
|
2690
2775
|
if (timestamp && Number.isFinite(Date.parse(timestamp))) result[key] = timestamp;
|
package/dist/index.d.mts
CHANGED
|
@@ -7,11 +7,23 @@ interface SignalizConfig {
|
|
|
7
7
|
maxRetries?: number;
|
|
8
8
|
}
|
|
9
9
|
type SignalAwarenessAction = 'create' | 'list' | 'update' | 'delete' | 'manual_run' | 'list_signals' | 'bulk_import' | 'get_settings' | 'set_global_webhook' | 'test_webhook' | 'export' | 'send_signal_export';
|
|
10
|
+
type SignalAwarenessSchedulePreset = 'every_6_hours' | 'daily' | 'every_2_days' | 'weekly' | 'monthly';
|
|
10
11
|
interface SignalMonitorInput {
|
|
11
12
|
companyName: string;
|
|
12
13
|
domain: string;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
schedule?: SignalAwarenessSchedulePreset;
|
|
15
|
+
scheduleCron?: string;
|
|
16
|
+
webhookUrl?: string | null;
|
|
17
|
+
}
|
|
18
|
+
interface SignalMonitorUpdateInput {
|
|
19
|
+
companyName?: string;
|
|
20
|
+
schedule?: SignalAwarenessSchedulePreset;
|
|
21
|
+
scheduleCron?: string;
|
|
22
|
+
status?: 'active' | 'paused';
|
|
23
|
+
webhookUrl?: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface SignalMonitorDefaults {
|
|
26
|
+
schedule?: SignalAwarenessSchedulePreset;
|
|
15
27
|
scheduleCron?: string;
|
|
16
28
|
webhookUrl?: string | null;
|
|
17
29
|
}
|
|
@@ -20,8 +32,12 @@ interface SignalAwarenessRequest {
|
|
|
20
32
|
monitorId?: string;
|
|
21
33
|
monitor?: SignalMonitorInput;
|
|
22
34
|
monitors?: SignalMonitorInput[];
|
|
23
|
-
defaults?:
|
|
24
|
-
updates?:
|
|
35
|
+
defaults?: SignalMonitorDefaults;
|
|
36
|
+
updates?: SignalMonitorUpdateInput;
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
webhookUrl?: string | null;
|
|
39
|
+
signalIds?: string[];
|
|
40
|
+
signals?: SignalAwarenessSignal[];
|
|
25
41
|
limit?: number;
|
|
26
42
|
offset?: number;
|
|
27
43
|
idempotencyKey?: string;
|
|
@@ -33,6 +49,13 @@ interface SignalAwarenessMonitor {
|
|
|
33
49
|
domain?: string;
|
|
34
50
|
status?: string;
|
|
35
51
|
schedule?: string;
|
|
52
|
+
schedule_cron?: string;
|
|
53
|
+
webhook_url?: string | null;
|
|
54
|
+
total_runs?: number;
|
|
55
|
+
total_signals_found?: number;
|
|
56
|
+
consecutive_failures?: number;
|
|
57
|
+
auto_paused?: boolean;
|
|
58
|
+
auto_pause_reason?: string;
|
|
36
59
|
last_run_at?: string;
|
|
37
60
|
next_run_at?: string;
|
|
38
61
|
created_at?: string;
|
|
@@ -70,6 +93,14 @@ interface SignalAwarenessResponse {
|
|
|
70
93
|
creditsUsed?: number;
|
|
71
94
|
created?: number;
|
|
72
95
|
skipped?: number;
|
|
96
|
+
delivered?: number;
|
|
97
|
+
errors?: Array<{
|
|
98
|
+
row: number;
|
|
99
|
+
error: string;
|
|
100
|
+
}>;
|
|
101
|
+
outputMode?: 'csv' | 'webhook';
|
|
102
|
+
webhookUrl?: string | null;
|
|
103
|
+
webhookStatus?: number;
|
|
73
104
|
total?: number;
|
|
74
105
|
limit?: number;
|
|
75
106
|
offset?: number;
|
|
@@ -577,6 +608,17 @@ declare class Signaliz {
|
|
|
577
608
|
createSignalMonitor(monitor: SignalMonitorInput): Promise<SignalAwarenessResponse>;
|
|
578
609
|
listSignalMonitors(limit?: number, offset?: number): Promise<SignalAwarenessResponse>;
|
|
579
610
|
runSignalMonitor(monitorId: string, idempotencyKey?: string): Promise<SignalAwarenessResponse>;
|
|
611
|
+
updateSignalMonitor(monitorId: string, updates: SignalMonitorUpdateInput): Promise<SignalAwarenessResponse>;
|
|
612
|
+
pauseSignalMonitor(monitorId: string): Promise<SignalAwarenessResponse>;
|
|
613
|
+
resumeSignalMonitor(monitorId: string): Promise<SignalAwarenessResponse>;
|
|
614
|
+
deleteSignalMonitor(monitorId: string): Promise<SignalAwarenessResponse>;
|
|
615
|
+
listSignalAwarenessSignals(monitorId?: string, limit?: number, offset?: number): Promise<SignalAwarenessResponse>;
|
|
616
|
+
bulkCreateSignalMonitors(monitors: SignalMonitorInput[], defaults?: SignalMonitorDefaults): Promise<SignalAwarenessResponse>;
|
|
617
|
+
getSignalAwarenessSettings(): Promise<SignalAwarenessResponse>;
|
|
618
|
+
setSignalAwarenessOutput(outputMode: 'csv' | 'webhook', webhookUrl?: string | null): Promise<SignalAwarenessResponse>;
|
|
619
|
+
testSignalAwarenessWebhook(webhookUrl: string): Promise<SignalAwarenessResponse>;
|
|
620
|
+
exportSignalAwareness(monitorId?: string): Promise<SignalAwarenessResponse>;
|
|
621
|
+
sendSignalAwarenessExport(signals: SignalAwarenessSignal[]): Promise<SignalAwarenessResponse>;
|
|
580
622
|
findEmail(params: FindEmailParams & {
|
|
581
623
|
dryRun: true;
|
|
582
624
|
}): Promise<CoreProductDryRunResult>;
|
|
@@ -638,4 +680,4 @@ declare class Signaliz {
|
|
|
638
680
|
health(): Promise<PlatformHealth>;
|
|
639
681
|
}
|
|
640
682
|
|
|
641
|
-
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type CoreBatchResumeOptions, type CoreEmailBatchResumeOptions, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type PublicSignalRow, type RecoverableBatchJob, type SignalAwarenessAction, type SignalAwarenessMonitor, type SignalAwarenessRequest, type SignalAwarenessResponse, type SignalAwarenessRun, type SignalAwarenessSignal, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalMonitorInput, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type SignalizFlowBillingReceipt, type SignalizFlowParams, type SignalizFlowPlan, type SignalizFlowPlanResult, type SignalizFlowReceiptLine, type SignalizFlowStartResult, type SignalizFlowStatus, type VerifyEmailBatchInput, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailRecommendation, type VerifyEmailResult, type VerifyEmailStatus };
|
|
683
|
+
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type CoreBatchResumeOptions, type CoreEmailBatchResumeOptions, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type PublicSignalRow, type RecoverableBatchJob, type SignalAwarenessAction, type SignalAwarenessMonitor, type SignalAwarenessRequest, type SignalAwarenessResponse, type SignalAwarenessRun, type SignalAwarenessSchedulePreset, type SignalAwarenessSignal, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalMonitorDefaults, type SignalMonitorInput, type SignalMonitorUpdateInput, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type SignalizFlowBillingReceipt, type SignalizFlowParams, type SignalizFlowPlan, type SignalizFlowPlanResult, type SignalizFlowReceiptLine, type SignalizFlowStartResult, type SignalizFlowStatus, type VerifyEmailBatchInput, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailRecommendation, type VerifyEmailResult, type VerifyEmailStatus };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,11 +7,23 @@ interface SignalizConfig {
|
|
|
7
7
|
maxRetries?: number;
|
|
8
8
|
}
|
|
9
9
|
type SignalAwarenessAction = 'create' | 'list' | 'update' | 'delete' | 'manual_run' | 'list_signals' | 'bulk_import' | 'get_settings' | 'set_global_webhook' | 'test_webhook' | 'export' | 'send_signal_export';
|
|
10
|
+
type SignalAwarenessSchedulePreset = 'every_6_hours' | 'daily' | 'every_2_days' | 'weekly' | 'monthly';
|
|
10
11
|
interface SignalMonitorInput {
|
|
11
12
|
companyName: string;
|
|
12
13
|
domain: string;
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
schedule?: SignalAwarenessSchedulePreset;
|
|
15
|
+
scheduleCron?: string;
|
|
16
|
+
webhookUrl?: string | null;
|
|
17
|
+
}
|
|
18
|
+
interface SignalMonitorUpdateInput {
|
|
19
|
+
companyName?: string;
|
|
20
|
+
schedule?: SignalAwarenessSchedulePreset;
|
|
21
|
+
scheduleCron?: string;
|
|
22
|
+
status?: 'active' | 'paused';
|
|
23
|
+
webhookUrl?: string | null;
|
|
24
|
+
}
|
|
25
|
+
interface SignalMonitorDefaults {
|
|
26
|
+
schedule?: SignalAwarenessSchedulePreset;
|
|
15
27
|
scheduleCron?: string;
|
|
16
28
|
webhookUrl?: string | null;
|
|
17
29
|
}
|
|
@@ -20,8 +32,12 @@ interface SignalAwarenessRequest {
|
|
|
20
32
|
monitorId?: string;
|
|
21
33
|
monitor?: SignalMonitorInput;
|
|
22
34
|
monitors?: SignalMonitorInput[];
|
|
23
|
-
defaults?:
|
|
24
|
-
updates?:
|
|
35
|
+
defaults?: SignalMonitorDefaults;
|
|
36
|
+
updates?: SignalMonitorUpdateInput;
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
webhookUrl?: string | null;
|
|
39
|
+
signalIds?: string[];
|
|
40
|
+
signals?: SignalAwarenessSignal[];
|
|
25
41
|
limit?: number;
|
|
26
42
|
offset?: number;
|
|
27
43
|
idempotencyKey?: string;
|
|
@@ -33,6 +49,13 @@ interface SignalAwarenessMonitor {
|
|
|
33
49
|
domain?: string;
|
|
34
50
|
status?: string;
|
|
35
51
|
schedule?: string;
|
|
52
|
+
schedule_cron?: string;
|
|
53
|
+
webhook_url?: string | null;
|
|
54
|
+
total_runs?: number;
|
|
55
|
+
total_signals_found?: number;
|
|
56
|
+
consecutive_failures?: number;
|
|
57
|
+
auto_paused?: boolean;
|
|
58
|
+
auto_pause_reason?: string;
|
|
36
59
|
last_run_at?: string;
|
|
37
60
|
next_run_at?: string;
|
|
38
61
|
created_at?: string;
|
|
@@ -70,6 +93,14 @@ interface SignalAwarenessResponse {
|
|
|
70
93
|
creditsUsed?: number;
|
|
71
94
|
created?: number;
|
|
72
95
|
skipped?: number;
|
|
96
|
+
delivered?: number;
|
|
97
|
+
errors?: Array<{
|
|
98
|
+
row: number;
|
|
99
|
+
error: string;
|
|
100
|
+
}>;
|
|
101
|
+
outputMode?: 'csv' | 'webhook';
|
|
102
|
+
webhookUrl?: string | null;
|
|
103
|
+
webhookStatus?: number;
|
|
73
104
|
total?: number;
|
|
74
105
|
limit?: number;
|
|
75
106
|
offset?: number;
|
|
@@ -577,6 +608,17 @@ declare class Signaliz {
|
|
|
577
608
|
createSignalMonitor(monitor: SignalMonitorInput): Promise<SignalAwarenessResponse>;
|
|
578
609
|
listSignalMonitors(limit?: number, offset?: number): Promise<SignalAwarenessResponse>;
|
|
579
610
|
runSignalMonitor(monitorId: string, idempotencyKey?: string): Promise<SignalAwarenessResponse>;
|
|
611
|
+
updateSignalMonitor(monitorId: string, updates: SignalMonitorUpdateInput): Promise<SignalAwarenessResponse>;
|
|
612
|
+
pauseSignalMonitor(monitorId: string): Promise<SignalAwarenessResponse>;
|
|
613
|
+
resumeSignalMonitor(monitorId: string): Promise<SignalAwarenessResponse>;
|
|
614
|
+
deleteSignalMonitor(monitorId: string): Promise<SignalAwarenessResponse>;
|
|
615
|
+
listSignalAwarenessSignals(monitorId?: string, limit?: number, offset?: number): Promise<SignalAwarenessResponse>;
|
|
616
|
+
bulkCreateSignalMonitors(monitors: SignalMonitorInput[], defaults?: SignalMonitorDefaults): Promise<SignalAwarenessResponse>;
|
|
617
|
+
getSignalAwarenessSettings(): Promise<SignalAwarenessResponse>;
|
|
618
|
+
setSignalAwarenessOutput(outputMode: 'csv' | 'webhook', webhookUrl?: string | null): Promise<SignalAwarenessResponse>;
|
|
619
|
+
testSignalAwarenessWebhook(webhookUrl: string): Promise<SignalAwarenessResponse>;
|
|
620
|
+
exportSignalAwareness(monitorId?: string): Promise<SignalAwarenessResponse>;
|
|
621
|
+
sendSignalAwarenessExport(signals: SignalAwarenessSignal[]): Promise<SignalAwarenessResponse>;
|
|
580
622
|
findEmail(params: FindEmailParams & {
|
|
581
623
|
dryRun: true;
|
|
582
624
|
}): Promise<CoreProductDryRunResult>;
|
|
@@ -638,4 +680,4 @@ declare class Signaliz {
|
|
|
638
680
|
health(): Promise<PlatformHealth>;
|
|
639
681
|
}
|
|
640
682
|
|
|
641
|
-
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type CoreBatchResumeOptions, type CoreEmailBatchResumeOptions, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type PublicSignalRow, type RecoverableBatchJob, type SignalAwarenessAction, type SignalAwarenessMonitor, type SignalAwarenessRequest, type SignalAwarenessResponse, type SignalAwarenessRun, type SignalAwarenessSignal, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalMonitorInput, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type SignalizFlowBillingReceipt, type SignalizFlowParams, type SignalizFlowPlan, type SignalizFlowPlanResult, type SignalizFlowReceiptLine, type SignalizFlowStartResult, type SignalizFlowStatus, type VerifyEmailBatchInput, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailRecommendation, type VerifyEmailResult, type VerifyEmailStatus };
|
|
683
|
+
export { type BatchItemResult, type BatchOptions, type BatchResult, type CompanySignal, type CompanySignalEnrichmentParams, type CompanySignalEnrichmentResult, type CoreBatchResumeOptions, type CoreEmailBatchResumeOptions, type ErrorType, type FindEmailParams, type FindEmailResult, type MCPToolInfo, type PlatformHealth, type PublicSignalRow, type RecoverableBatchJob, type SignalAwarenessAction, type SignalAwarenessMonitor, type SignalAwarenessRequest, type SignalAwarenessResponse, type SignalAwarenessRun, type SignalAwarenessSchedulePreset, type SignalAwarenessSignal, type SignalDiscoveryParams, type SignalDiscoveryResult, type SignalDiscoverySignal, type SignalDiscoverySource, type SignalDiscoveryStatus, type SignalMonitorDefaults, type SignalMonitorInput, type SignalMonitorUpdateInput, type SignalToCopyParams, type SignalToCopyResult, type SignalToCopyVariation, Signaliz, type SignalizConfig, SignalizError, type SignalizErrorData, type SignalizFlowBillingReceipt, type SignalizFlowParams, type SignalizFlowPlan, type SignalizFlowPlanResult, type SignalizFlowReceiptLine, type SignalizFlowStartResult, type SignalizFlowStatus, type VerifyEmailBatchInput, type VerifyEmailBatchOptions, type VerifyEmailOptions, type VerifyEmailRecommendation, type VerifyEmailResult, type VerifyEmailStatus };
|
package/dist/index.js
CHANGED
|
@@ -849,6 +849,43 @@ var Signaliz = class {
|
|
|
849
849
|
async runSignalMonitor(monitorId, idempotencyKey) {
|
|
850
850
|
return this.signalAwareness({ action: "manual_run", monitorId, idempotencyKey });
|
|
851
851
|
}
|
|
852
|
+
async updateSignalMonitor(monitorId, updates) {
|
|
853
|
+
return this.signalAwareness({ action: "update", monitorId, updates });
|
|
854
|
+
}
|
|
855
|
+
async pauseSignalMonitor(monitorId) {
|
|
856
|
+
return this.updateSignalMonitor(monitorId, { status: "paused" });
|
|
857
|
+
}
|
|
858
|
+
async resumeSignalMonitor(monitorId) {
|
|
859
|
+
return this.updateSignalMonitor(monitorId, { status: "active" });
|
|
860
|
+
}
|
|
861
|
+
async deleteSignalMonitor(monitorId) {
|
|
862
|
+
return this.signalAwareness({ action: "delete", monitorId });
|
|
863
|
+
}
|
|
864
|
+
async listSignalAwarenessSignals(monitorId, limit, offset) {
|
|
865
|
+
return this.signalAwareness({ action: "list_signals", monitorId, limit, offset });
|
|
866
|
+
}
|
|
867
|
+
async bulkCreateSignalMonitors(monitors, defaults) {
|
|
868
|
+
return this.signalAwareness({ action: "bulk_import", monitors, defaults });
|
|
869
|
+
}
|
|
870
|
+
async getSignalAwarenessSettings() {
|
|
871
|
+
return this.signalAwareness({ action: "get_settings" });
|
|
872
|
+
}
|
|
873
|
+
async setSignalAwarenessOutput(outputMode, webhookUrl) {
|
|
874
|
+
return this.signalAwareness({
|
|
875
|
+
action: "set_global_webhook",
|
|
876
|
+
enabled: outputMode === "webhook",
|
|
877
|
+
webhookUrl: outputMode === "webhook" ? webhookUrl : null
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
async testSignalAwarenessWebhook(webhookUrl) {
|
|
881
|
+
return this.signalAwareness({ action: "test_webhook", webhookUrl });
|
|
882
|
+
}
|
|
883
|
+
async exportSignalAwareness(monitorId) {
|
|
884
|
+
return this.signalAwareness({ action: "export", monitorId });
|
|
885
|
+
}
|
|
886
|
+
async sendSignalAwarenessExport(signals) {
|
|
887
|
+
return this.signalAwareness({ action: "send_signal_export", signals });
|
|
888
|
+
}
|
|
852
889
|
async findEmail(params) {
|
|
853
890
|
const request = findEmailRequestBody(params);
|
|
854
891
|
assertFindEmailRequestIdentity(request);
|
|
@@ -2638,24 +2675,50 @@ function normalizeSignalToCopyResult(data) {
|
|
|
2638
2675
|
raw: data
|
|
2639
2676
|
};
|
|
2640
2677
|
}
|
|
2678
|
+
var SIGNAL_AWARENESS_SCHEDULES = {
|
|
2679
|
+
every_6_hours: "0 */6 * * *",
|
|
2680
|
+
daily: "0 8 * * *",
|
|
2681
|
+
every_2_days: "0 8 */2 * *",
|
|
2682
|
+
weekly: "0 8 * * 1",
|
|
2683
|
+
monthly: "0 8 1 * *"
|
|
2684
|
+
};
|
|
2685
|
+
function signalAwarenessScheduleCron(value) {
|
|
2686
|
+
return value.scheduleCron || (value.schedule ? SIGNAL_AWARENESS_SCHEDULES[value.schedule] : void 0);
|
|
2687
|
+
}
|
|
2641
2688
|
function signalAwarenessMonitorRequest(monitor) {
|
|
2642
2689
|
return compact({
|
|
2643
2690
|
company_name: monitor.companyName,
|
|
2644
2691
|
domain: monitor.domain,
|
|
2645
|
-
|
|
2646
|
-
signal_config: monitor.signalConfig,
|
|
2647
|
-
schedule_cron: monitor.scheduleCron,
|
|
2692
|
+
schedule_cron: signalAwarenessScheduleCron(monitor),
|
|
2648
2693
|
webhook_url: monitor.webhookUrl
|
|
2649
2694
|
});
|
|
2650
2695
|
}
|
|
2696
|
+
function signalAwarenessMonitorDefaultsRequest(defaults) {
|
|
2697
|
+
return compact({
|
|
2698
|
+
schedule_cron: signalAwarenessScheduleCron(defaults),
|
|
2699
|
+
webhook_url: defaults.webhookUrl
|
|
2700
|
+
});
|
|
2701
|
+
}
|
|
2702
|
+
function signalAwarenessMonitorUpdateRequest(updates) {
|
|
2703
|
+
return compact({
|
|
2704
|
+
company_name: updates.companyName,
|
|
2705
|
+
schedule_cron: signalAwarenessScheduleCron(updates),
|
|
2706
|
+
status: updates.status,
|
|
2707
|
+
webhook_url: updates.webhookUrl
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2651
2710
|
function signalAwarenessRequestBody(request) {
|
|
2652
2711
|
return compact({
|
|
2653
2712
|
action: request.action,
|
|
2654
2713
|
monitor_id: request.monitorId,
|
|
2655
2714
|
monitor: request.monitor ? signalAwarenessMonitorRequest(request.monitor) : void 0,
|
|
2656
2715
|
monitors: request.monitors?.map(signalAwarenessMonitorRequest),
|
|
2657
|
-
defaults: request.defaults,
|
|
2658
|
-
updates: request.updates,
|
|
2716
|
+
defaults: request.defaults ? signalAwarenessMonitorDefaultsRequest(request.defaults) : void 0,
|
|
2717
|
+
updates: request.updates ? signalAwarenessMonitorUpdateRequest(request.updates) : void 0,
|
|
2718
|
+
enabled: request.enabled,
|
|
2719
|
+
webhook_url: request.webhookUrl,
|
|
2720
|
+
signal_ids: request.signalIds,
|
|
2721
|
+
signals: request.signals,
|
|
2659
2722
|
limit: request.limit,
|
|
2660
2723
|
offset: request.offset,
|
|
2661
2724
|
idempotency_key: request.idempotencyKey,
|
|
@@ -2664,7 +2727,7 @@ function signalAwarenessRequestBody(request) {
|
|
|
2664
2727
|
}
|
|
2665
2728
|
function normalizeSignalAwarenessResponse(data) {
|
|
2666
2729
|
const payload = data.data && typeof data.data === "object" ? data.data : data;
|
|
2667
|
-
const signals = Array.isArray(payload.signals) ?
|
|
2730
|
+
const signals = Array.isArray(payload.signals) ? payload.signals.flatMap(normalizeSignalAwarenessSignal) : void 0;
|
|
2668
2731
|
const monitors = Array.isArray(payload.monitors) ? payload.monitors.map(normalizeSignalAwarenessMonitor).filter((value) => value !== void 0) : void 0;
|
|
2669
2732
|
const monitor = normalizeSignalAwarenessMonitor(payload.monitor);
|
|
2670
2733
|
const run = normalizeSignalAwarenessRun(payload.run);
|
|
@@ -2682,6 +2745,18 @@ function normalizeSignalAwarenessResponse(data) {
|
|
|
2682
2745
|
...Number.isInteger(creditsUsed) && creditsUsed >= 0 ? { creditsUsed } : {},
|
|
2683
2746
|
...Number.isFinite(Number(payload.created)) ? { created: Number(payload.created) } : {},
|
|
2684
2747
|
...Number.isFinite(Number(payload.skipped)) ? { skipped: Number(payload.skipped) } : {},
|
|
2748
|
+
...Number.isFinite(Number(payload.delivered)) ? { delivered: Number(payload.delivered) } : {},
|
|
2749
|
+
...Array.isArray(payload.errors) ? {
|
|
2750
|
+
errors: payload.errors.flatMap((item) => {
|
|
2751
|
+
const error = signalAwarenessRecord(item);
|
|
2752
|
+
const row = signalAwarenessCount(error.row);
|
|
2753
|
+
const message = signalAwarenessText(error.error, 500);
|
|
2754
|
+
return row !== void 0 && message ? [{ row, error: message }] : [];
|
|
2755
|
+
})
|
|
2756
|
+
} : {},
|
|
2757
|
+
...payload.output_mode === "csv" || payload.output_mode === "webhook" ? { outputMode: payload.output_mode } : {},
|
|
2758
|
+
...payload.webhook_url === null || typeof payload.webhook_url === "string" ? { webhookUrl: payload.webhook_url } : {},
|
|
2759
|
+
...Number.isInteger(Number(payload.webhook_status)) ? { webhookStatus: Number(payload.webhook_status) } : {},
|
|
2685
2760
|
...Number.isFinite(Number(payload.total)) ? { total: Number(payload.total) } : {},
|
|
2686
2761
|
...Number.isFinite(Number(payload.limit)) ? { limit: Number(payload.limit) } : {},
|
|
2687
2762
|
...Number.isFinite(Number(payload.offset)) ? { offset: Number(payload.offset) } : {},
|
|
@@ -2707,11 +2782,21 @@ function normalizeSignalAwarenessMonitor(value) {
|
|
|
2707
2782
|
const domain = signalAwarenessText(monitor.domain, 253);
|
|
2708
2783
|
const status = signalAwarenessText(monitor.status, 80);
|
|
2709
2784
|
const schedule = signalAwarenessText(monitor.schedule, 120);
|
|
2785
|
+
const scheduleCron = signalAwarenessText(monitor.schedule_cron, 120);
|
|
2710
2786
|
if (id) result.id = id;
|
|
2711
2787
|
if (companyName) result.company_name = companyName;
|
|
2712
2788
|
if (domain) result.domain = domain;
|
|
2713
2789
|
if (status) result.status = status;
|
|
2714
2790
|
if (schedule) result.schedule = schedule;
|
|
2791
|
+
if (scheduleCron) result.schedule_cron = scheduleCron;
|
|
2792
|
+
if (monitor.webhook_url === null || typeof monitor.webhook_url === "string") result.webhook_url = monitor.webhook_url;
|
|
2793
|
+
for (const key of ["total_runs", "total_signals_found", "consecutive_failures"]) {
|
|
2794
|
+
const value2 = signalAwarenessCount(monitor[key]);
|
|
2795
|
+
if (value2 !== void 0) result[key] = value2;
|
|
2796
|
+
}
|
|
2797
|
+
if (typeof monitor.auto_paused === "boolean") result.auto_paused = monitor.auto_paused;
|
|
2798
|
+
const autoPauseReason = signalAwarenessText(monitor.auto_pause_reason, 500);
|
|
2799
|
+
if (autoPauseReason) result.auto_pause_reason = autoPauseReason;
|
|
2715
2800
|
for (const key of ["last_run_at", "next_run_at", "created_at", "updated_at"]) {
|
|
2716
2801
|
const timestamp = signalAwarenessText(monitor[key], 64);
|
|
2717
2802
|
if (timestamp && Number.isFinite(Date.parse(timestamp))) result[key] = timestamp;
|
package/dist/index.mjs
CHANGED
package/dist/mcp-config.js
CHANGED
|
@@ -853,6 +853,43 @@ var Signaliz = class {
|
|
|
853
853
|
async runSignalMonitor(monitorId, idempotencyKey) {
|
|
854
854
|
return this.signalAwareness({ action: "manual_run", monitorId, idempotencyKey });
|
|
855
855
|
}
|
|
856
|
+
async updateSignalMonitor(monitorId, updates) {
|
|
857
|
+
return this.signalAwareness({ action: "update", monitorId, updates });
|
|
858
|
+
}
|
|
859
|
+
async pauseSignalMonitor(monitorId) {
|
|
860
|
+
return this.updateSignalMonitor(monitorId, { status: "paused" });
|
|
861
|
+
}
|
|
862
|
+
async resumeSignalMonitor(monitorId) {
|
|
863
|
+
return this.updateSignalMonitor(monitorId, { status: "active" });
|
|
864
|
+
}
|
|
865
|
+
async deleteSignalMonitor(monitorId) {
|
|
866
|
+
return this.signalAwareness({ action: "delete", monitorId });
|
|
867
|
+
}
|
|
868
|
+
async listSignalAwarenessSignals(monitorId, limit, offset) {
|
|
869
|
+
return this.signalAwareness({ action: "list_signals", monitorId, limit, offset });
|
|
870
|
+
}
|
|
871
|
+
async bulkCreateSignalMonitors(monitors, defaults) {
|
|
872
|
+
return this.signalAwareness({ action: "bulk_import", monitors, defaults });
|
|
873
|
+
}
|
|
874
|
+
async getSignalAwarenessSettings() {
|
|
875
|
+
return this.signalAwareness({ action: "get_settings" });
|
|
876
|
+
}
|
|
877
|
+
async setSignalAwarenessOutput(outputMode, webhookUrl) {
|
|
878
|
+
return this.signalAwareness({
|
|
879
|
+
action: "set_global_webhook",
|
|
880
|
+
enabled: outputMode === "webhook",
|
|
881
|
+
webhookUrl: outputMode === "webhook" ? webhookUrl : null
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
async testSignalAwarenessWebhook(webhookUrl) {
|
|
885
|
+
return this.signalAwareness({ action: "test_webhook", webhookUrl });
|
|
886
|
+
}
|
|
887
|
+
async exportSignalAwareness(monitorId) {
|
|
888
|
+
return this.signalAwareness({ action: "export", monitorId });
|
|
889
|
+
}
|
|
890
|
+
async sendSignalAwarenessExport(signals) {
|
|
891
|
+
return this.signalAwareness({ action: "send_signal_export", signals });
|
|
892
|
+
}
|
|
856
893
|
async findEmail(params) {
|
|
857
894
|
const request = findEmailRequestBody(params);
|
|
858
895
|
assertFindEmailRequestIdentity(request);
|
|
@@ -2642,24 +2679,50 @@ function normalizeSignalToCopyResult(data) {
|
|
|
2642
2679
|
raw: data
|
|
2643
2680
|
};
|
|
2644
2681
|
}
|
|
2682
|
+
var SIGNAL_AWARENESS_SCHEDULES = {
|
|
2683
|
+
every_6_hours: "0 */6 * * *",
|
|
2684
|
+
daily: "0 8 * * *",
|
|
2685
|
+
every_2_days: "0 8 */2 * *",
|
|
2686
|
+
weekly: "0 8 * * 1",
|
|
2687
|
+
monthly: "0 8 1 * *"
|
|
2688
|
+
};
|
|
2689
|
+
function signalAwarenessScheduleCron(value) {
|
|
2690
|
+
return value.scheduleCron || (value.schedule ? SIGNAL_AWARENESS_SCHEDULES[value.schedule] : void 0);
|
|
2691
|
+
}
|
|
2645
2692
|
function signalAwarenessMonitorRequest(monitor) {
|
|
2646
2693
|
return compact({
|
|
2647
2694
|
company_name: monitor.companyName,
|
|
2648
2695
|
domain: monitor.domain,
|
|
2649
|
-
|
|
2650
|
-
signal_config: monitor.signalConfig,
|
|
2651
|
-
schedule_cron: monitor.scheduleCron,
|
|
2696
|
+
schedule_cron: signalAwarenessScheduleCron(monitor),
|
|
2652
2697
|
webhook_url: monitor.webhookUrl
|
|
2653
2698
|
});
|
|
2654
2699
|
}
|
|
2700
|
+
function signalAwarenessMonitorDefaultsRequest(defaults) {
|
|
2701
|
+
return compact({
|
|
2702
|
+
schedule_cron: signalAwarenessScheduleCron(defaults),
|
|
2703
|
+
webhook_url: defaults.webhookUrl
|
|
2704
|
+
});
|
|
2705
|
+
}
|
|
2706
|
+
function signalAwarenessMonitorUpdateRequest(updates) {
|
|
2707
|
+
return compact({
|
|
2708
|
+
company_name: updates.companyName,
|
|
2709
|
+
schedule_cron: signalAwarenessScheduleCron(updates),
|
|
2710
|
+
status: updates.status,
|
|
2711
|
+
webhook_url: updates.webhookUrl
|
|
2712
|
+
});
|
|
2713
|
+
}
|
|
2655
2714
|
function signalAwarenessRequestBody(request) {
|
|
2656
2715
|
return compact({
|
|
2657
2716
|
action: request.action,
|
|
2658
2717
|
monitor_id: request.monitorId,
|
|
2659
2718
|
monitor: request.monitor ? signalAwarenessMonitorRequest(request.monitor) : void 0,
|
|
2660
2719
|
monitors: request.monitors?.map(signalAwarenessMonitorRequest),
|
|
2661
|
-
defaults: request.defaults,
|
|
2662
|
-
updates: request.updates,
|
|
2720
|
+
defaults: request.defaults ? signalAwarenessMonitorDefaultsRequest(request.defaults) : void 0,
|
|
2721
|
+
updates: request.updates ? signalAwarenessMonitorUpdateRequest(request.updates) : void 0,
|
|
2722
|
+
enabled: request.enabled,
|
|
2723
|
+
webhook_url: request.webhookUrl,
|
|
2724
|
+
signal_ids: request.signalIds,
|
|
2725
|
+
signals: request.signals,
|
|
2663
2726
|
limit: request.limit,
|
|
2664
2727
|
offset: request.offset,
|
|
2665
2728
|
idempotency_key: request.idempotencyKey,
|
|
@@ -2668,7 +2731,7 @@ function signalAwarenessRequestBody(request) {
|
|
|
2668
2731
|
}
|
|
2669
2732
|
function normalizeSignalAwarenessResponse(data) {
|
|
2670
2733
|
const payload = data.data && typeof data.data === "object" ? data.data : data;
|
|
2671
|
-
const signals = Array.isArray(payload.signals) ?
|
|
2734
|
+
const signals = Array.isArray(payload.signals) ? payload.signals.flatMap(normalizeSignalAwarenessSignal) : void 0;
|
|
2672
2735
|
const monitors = Array.isArray(payload.monitors) ? payload.monitors.map(normalizeSignalAwarenessMonitor).filter((value) => value !== void 0) : void 0;
|
|
2673
2736
|
const monitor = normalizeSignalAwarenessMonitor(payload.monitor);
|
|
2674
2737
|
const run = normalizeSignalAwarenessRun(payload.run);
|
|
@@ -2686,6 +2749,18 @@ function normalizeSignalAwarenessResponse(data) {
|
|
|
2686
2749
|
...Number.isInteger(creditsUsed) && creditsUsed >= 0 ? { creditsUsed } : {},
|
|
2687
2750
|
...Number.isFinite(Number(payload.created)) ? { created: Number(payload.created) } : {},
|
|
2688
2751
|
...Number.isFinite(Number(payload.skipped)) ? { skipped: Number(payload.skipped) } : {},
|
|
2752
|
+
...Number.isFinite(Number(payload.delivered)) ? { delivered: Number(payload.delivered) } : {},
|
|
2753
|
+
...Array.isArray(payload.errors) ? {
|
|
2754
|
+
errors: payload.errors.flatMap((item) => {
|
|
2755
|
+
const error = signalAwarenessRecord(item);
|
|
2756
|
+
const row = signalAwarenessCount(error.row);
|
|
2757
|
+
const message = signalAwarenessText(error.error, 500);
|
|
2758
|
+
return row !== void 0 && message ? [{ row, error: message }] : [];
|
|
2759
|
+
})
|
|
2760
|
+
} : {},
|
|
2761
|
+
...payload.output_mode === "csv" || payload.output_mode === "webhook" ? { outputMode: payload.output_mode } : {},
|
|
2762
|
+
...payload.webhook_url === null || typeof payload.webhook_url === "string" ? { webhookUrl: payload.webhook_url } : {},
|
|
2763
|
+
...Number.isInteger(Number(payload.webhook_status)) ? { webhookStatus: Number(payload.webhook_status) } : {},
|
|
2689
2764
|
...Number.isFinite(Number(payload.total)) ? { total: Number(payload.total) } : {},
|
|
2690
2765
|
...Number.isFinite(Number(payload.limit)) ? { limit: Number(payload.limit) } : {},
|
|
2691
2766
|
...Number.isFinite(Number(payload.offset)) ? { offset: Number(payload.offset) } : {},
|
|
@@ -2711,11 +2786,21 @@ function normalizeSignalAwarenessMonitor(value) {
|
|
|
2711
2786
|
const domain = signalAwarenessText(monitor.domain, 253);
|
|
2712
2787
|
const status = signalAwarenessText(monitor.status, 80);
|
|
2713
2788
|
const schedule = signalAwarenessText(monitor.schedule, 120);
|
|
2789
|
+
const scheduleCron = signalAwarenessText(monitor.schedule_cron, 120);
|
|
2714
2790
|
if (id) result.id = id;
|
|
2715
2791
|
if (companyName) result.company_name = companyName;
|
|
2716
2792
|
if (domain) result.domain = domain;
|
|
2717
2793
|
if (status) result.status = status;
|
|
2718
2794
|
if (schedule) result.schedule = schedule;
|
|
2795
|
+
if (scheduleCron) result.schedule_cron = scheduleCron;
|
|
2796
|
+
if (monitor.webhook_url === null || typeof monitor.webhook_url === "string") result.webhook_url = monitor.webhook_url;
|
|
2797
|
+
for (const key of ["total_runs", "total_signals_found", "consecutive_failures"]) {
|
|
2798
|
+
const value2 = signalAwarenessCount(monitor[key]);
|
|
2799
|
+
if (value2 !== void 0) result[key] = value2;
|
|
2800
|
+
}
|
|
2801
|
+
if (typeof monitor.auto_paused === "boolean") result.auto_paused = monitor.auto_paused;
|
|
2802
|
+
const autoPauseReason = signalAwarenessText(monitor.auto_pause_reason, 500);
|
|
2803
|
+
if (autoPauseReason) result.auto_pause_reason = autoPauseReason;
|
|
2719
2804
|
for (const key of ["last_run_at", "next_run_at", "created_at", "updated_at"]) {
|
|
2720
2805
|
const timestamp = signalAwarenessText(monitor[key], 64);
|
|
2721
2806
|
if (timestamp && Number.isFinite(Date.parse(timestamp))) result[key] = timestamp;
|
package/dist/mcp-config.mjs
CHANGED
package/package.json
CHANGED