@canonry/canonry 7.51.5 → 7.52.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/assets/agent-workspace/skills/canonry/references/canonry-cli.md +8 -0
- package/assets/assets/{AccessControls-B5TqDgeq.js → AccessControls-CteIuEGI.js} +1 -1
- package/assets/assets/{AuditHistoryPanel-DgxiizOW.js → AuditHistoryPanel-DqJGiLsf.js} +1 -1
- package/assets/assets/{BacklinksPage-Ay6pdphx.js → BacklinksPage-DotWEPQt.js} +1 -1
- package/assets/assets/{HistoryPage-B11eFH21.js → HistoryPage-aOd198dT.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-CuaKVK8x.js +4 -0
- package/assets/assets/{ProjectPage-DoY0hftd.js → ProjectPage-O9oufMgi.js} +4 -4
- package/assets/assets/{RunsPage-BPBmuQAS.js → RunsPage-DIXMrc-N.js} +1 -1
- package/assets/assets/{SettingsPage-ClKnP8xy.js → SettingsPage-BuGb6AGa.js} +1 -1
- package/assets/assets/SiteHealthSection-CweaKjCo.js +2 -0
- package/assets/assets/TrafficPage-B7MaQalp.js +40 -0
- package/assets/assets/{TrafficSourceDetailPage-DQu0YNt2.js → TrafficSourceDetailPage-BPtjnF9s.js} +1 -1
- package/assets/assets/{card-DYMyvhB9.js → card-DoV-8Txo.js} +1 -1
- package/assets/assets/{extract-error-message-BRM1I_3L.js → extract-error-message-DKQJJlZ-.js} +1 -1
- package/assets/assets/{format-helpers-DrkFERj3.js → format-helpers-BWnMmkiO.js} +1 -1
- package/assets/assets/index-Z63c4PeO.js +39 -0
- package/assets/assets/{query-client-gRFnU4VF.js → query-client-vB35tVTz.js} +1 -1
- package/assets/assets/{react-query-lH82FULK.js → react-query-BI0567qs.js} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-D09H4byP.js → react-sigma_core.esm.min-hGyOC4V_.js} +1 -1
- package/assets/assets/{service-Cx0HSnE9.js → service-c4YvpVKX.js} +1 -1
- package/assets/index.html +6 -6
- package/dist/ads-MREK2AGL.js +544 -0
- package/dist/agent-4RUZ3MC4.js +70 -0
- package/dist/agent-ask-YLTYBEYH.js +139 -0
- package/dist/agent-conversations-QA6IKDGR.js +52 -0
- package/dist/agent-memory-MEQAJOB3.js +92 -0
- package/dist/agent-providers-AXYPDJHL.js +55 -0
- package/dist/agent-transcript-SMNQNYCD.js +77 -0
- package/dist/analytics-4OR64IGV.js +240 -0
- package/dist/apply-CQXCFXAH.js +175 -0
- package/dist/backfill-TMXCNVOB.js +41 -0
- package/dist/backlinks-6KFAQGYV.js +303 -0
- package/dist/bing-HFCACTAC.js +418 -0
- package/dist/bootstrap-SQVQXOJC.js +326 -0
- package/dist/cdp-IACL7EXU.js +162 -0
- package/dist/chunk-4MJYGB56.js +124 -0
- package/dist/chunk-5N6245R7.js +1160 -0
- package/dist/chunk-6BPZHNDC.js +617 -0
- package/dist/chunk-6GO5VVAC.js +15 -0
- package/dist/chunk-7244X3K6.js +609 -0
- package/dist/chunk-7XE2IRBG.js +204 -0
- package/dist/chunk-AOJU5LKX.js +8 -0
- package/dist/chunk-AWCWIQAU.js +2686 -0
- package/dist/{chunk-JBZZEIM2.js → chunk-BBOHY2DQ.js} +2 -13
- package/dist/{chunk-AZFPA7JV.js → chunk-BU3VAG5J.js} +6 -4
- package/dist/{chunk-4YCGZGA3.js → chunk-BYOK6Z4F.js} +2 -2
- package/dist/chunk-DSNSD5J3.js +971 -0
- package/dist/chunk-EGIZNSDA.js +94 -0
- package/dist/chunk-ELCLGWUT.js +83 -0
- package/dist/chunk-FC4XND45.js +38 -0
- package/dist/chunk-GNKOBKPW.js +58 -0
- package/dist/chunk-HEGXGCGL.js +524 -0
- package/dist/chunk-I6KNMZ77.js +232 -0
- package/dist/{chunk-HLVEB5TB.js → chunk-IIOEAJTV.js} +7 -5
- package/dist/chunk-ILDT4LPB.js +1273 -0
- package/dist/chunk-JY3RLZGB.js +30 -0
- package/dist/{chunk-PLYJX67A.js → chunk-K5I45PZI.js} +8084 -13939
- package/dist/chunk-KXAOMTXN.js +1034 -0
- package/dist/chunk-LK2BG6EX.js +145 -0
- package/dist/chunk-MJNUSPO4.js +15 -0
- package/dist/chunk-MKAC7HKH.js +9178 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/{chunk-SFMWHPMX.js → chunk-O4RMPA6H.js} +13765 -13737
- package/dist/chunk-O77IBNVO.js +8264 -0
- package/dist/chunk-OFL4PTYU.js +644 -0
- package/dist/chunk-QLPLENDT.js +133 -0
- package/dist/chunk-R2J4SNKF.js +78 -0
- package/dist/{chunk-KEATAHXH.js → chunk-RVUCY4ZV.js} +358 -581
- package/dist/chunk-SNFBJKAW.js +530 -0
- package/dist/chunk-TALC5DX5.js +420 -0
- package/dist/chunk-TSENU4GG.js +18 -0
- package/dist/{chunk-HAHXPJQ5.js → chunk-V5D4XNWV.js} +16 -1684
- package/dist/chunk-VJWDBFSL.js +69 -0
- package/dist/chunk-XEBKF4N5.js +8 -0
- package/dist/chunk-Y4GK7GCV.js +15376 -0
- package/dist/{chunk-A3WSAAQS.js → chunk-YSEC6TIB.js} +7917 -33199
- package/dist/chunk-Z7IUAJOF.js +13 -0
- package/dist/citations-NSBBWRZ4.js +106 -0
- package/dist/{cli-catalog-MO6Z2CIZ.js → cli-catalog-OFWJMNMD.js} +5 -3
- package/dist/cli-commands-WVBL337U.js +19 -0
- package/dist/cli.js +35 -29
- package/dist/competitor-V4OHORBC.js +561 -0
- package/dist/content-RUXRI5IC.js +257 -0
- package/dist/dashboard-JXB2YAQJ.js +71 -0
- package/dist/demo-55ZNUOXU.js +75 -0
- package/dist/{demo-server-GIWDJGJX.js → demo-server-XO7PHM4I.js} +22 -9
- package/dist/discover-JJQ564HS.js +372 -0
- package/dist/discover-eval-KLEKZ6U4.js +282 -0
- package/dist/doctor-JAMQZCMZ.js +152 -0
- package/dist/evidence-YRSB7GFE.js +57 -0
- package/dist/export-cmd-MHML4OYU.js +49 -0
- package/dist/ga-LSXPE2MN.js +911 -0
- package/dist/gbp-RMKMLOC7.js +370 -0
- package/dist/google-JQ4T6JTQ.js +946 -0
- package/dist/google-marketing-J6SEODYC.js +403 -0
- package/dist/health-cmd-MV2JM2C3.js +64 -0
- package/dist/history-SRRH7A2E.js +90 -0
- package/dist/index.d.ts +43 -4
- package/dist/index.js +29 -6
- package/dist/init-ZJZFUERV.js +432 -0
- package/dist/insights-PMMGNWZH.js +63 -0
- package/dist/intelligence-service-KCSU6ZUJ.js +15 -0
- package/dist/keys-TS7NZANS.js +116 -0
- package/dist/keyword-VNCKDUGC.js +164 -0
- package/dist/logs-VH3WOTZJ.js +30 -0
- package/dist/mcp-DG2RROB3.js +14 -0
- package/dist/mcp.js +14 -5
- package/dist/measurement-plan-4T35TUGG.js +42 -0
- package/dist/notify-BWHUSKL7.js +125 -0
- package/dist/organic-evidence-QX4SXXJP.js +53 -0
- package/dist/overview-7IHUTKUV.js +213 -0
- package/dist/project-JXLSWDE2.js +460 -0
- package/dist/query-S75EL25H.js +211 -0
- package/dist/research-KFTV3IP4.js +200 -0
- package/dist/results-export-GTKVBU34.js +27 -0
- package/dist/run-26HDIRHF.js +31 -0
- package/dist/schedule-N6G4SVHQ.js +177 -0
- package/dist/search-MI32EPYM.js +42 -0
- package/dist/serve-XLGE42AG.js +598 -0
- package/dist/session-W5DXWIYM.js +47 -0
- package/dist/settings-T7WI2UVE.js +107 -0
- package/dist/skills-F3WPKPTK.js +33 -0
- package/dist/snapshot-PD3EAVEX.js +538 -0
- package/dist/src-XDUXMJC3.js +316 -0
- package/dist/status-PUH7JFZ4.js +126 -0
- package/dist/support-ARF4HER7.js +24 -0
- package/dist/technical-aeo-AUFWWJIP.js +625 -0
- package/dist/telemetry-XBYT7G2K.js +118 -0
- package/dist/tools-GVHIRWSN.js +41 -0
- package/dist/traffic-B3HW2ZWG.js +1295 -0
- package/dist/users-M5HNQZYI.js +170 -0
- package/dist/visibility-stats-Y7GJKMHN.js +241 -0
- package/dist/wordpress-GCIURYPN.js +600 -0
- package/package.json +1 -1
- package/assets/assets/MeasurementPropertyPage-1UYI7mzP.js +0 -4
- package/assets/assets/SiteHealthSection-PWjKMmEn.js +0 -2
- package/assets/assets/TrafficPage-DkfGiJXR.js +0 -40
- package/assets/assets/index-CG1Jox52.js +0 -39
- package/dist/chunk-4QQYYRHV.js +0 -23082
- package/dist/cli-commands-FOJR3HHU.js +0 -15
- package/dist/intelligence-service-XQCNWAPL.js +0 -9
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import {
|
|
2
|
+
emitJsonl
|
|
3
|
+
} from "./chunk-Z7IUAJOF.js";
|
|
4
|
+
import {
|
|
5
|
+
CliError,
|
|
6
|
+
isMachineFormat
|
|
7
|
+
} from "./chunk-HGMYEDAQ.js";
|
|
8
|
+
import {
|
|
9
|
+
canonicalizeGtmAccountId,
|
|
10
|
+
canonicalizeGtmResourceSelection,
|
|
11
|
+
conversionTrackingContractWriteRequestSchema,
|
|
12
|
+
describeError,
|
|
13
|
+
formatMicros,
|
|
14
|
+
formatPercent
|
|
15
|
+
} from "./chunk-O4RMPA6H.js";
|
|
16
|
+
import "./chunk-MLKGABMK.js";
|
|
17
|
+
|
|
18
|
+
// src/commands/google-marketing.ts
|
|
19
|
+
import fs from "fs";
|
|
20
|
+
function printMachine(value, format) {
|
|
21
|
+
if (!isMachineFormat(format)) return false;
|
|
22
|
+
console.log(JSON.stringify(value, null, 2));
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
function connectionSummary(status) {
|
|
26
|
+
if (!status.connected) return "not connected";
|
|
27
|
+
if (status.status === "selection-required") return "connected; selection required";
|
|
28
|
+
return status.status === "stale" ? "connected; stored evidence is stale" : "connected";
|
|
29
|
+
}
|
|
30
|
+
function snapshotSummary(snapshot) {
|
|
31
|
+
return `${snapshot.capturedAt} ${snapshot.kind.padEnd(22)} ${snapshot.id} ${snapshot.payloadChecksum.slice(0, 12)}`;
|
|
32
|
+
}
|
|
33
|
+
function canonicalGtmReadAccountId(accountId) {
|
|
34
|
+
const canonical = canonicalizeGtmAccountId(accountId);
|
|
35
|
+
if (canonical) return canonical;
|
|
36
|
+
throw new CliError({
|
|
37
|
+
code: "GTM_RESOURCE_INPUT_INVALID",
|
|
38
|
+
message: "GTM account must be a safe bare ID or an accounts/{id} resource path.",
|
|
39
|
+
displayMessage: "Error: GTM account must be a safe bare ID or an accounts/{id} resource path."
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function canonicalGtmReadSelection(accountId, containerId) {
|
|
43
|
+
const canonical = canonicalizeGtmResourceSelection({ accountId, containerId });
|
|
44
|
+
if (canonical) return canonical;
|
|
45
|
+
throw new CliError({
|
|
46
|
+
code: "GTM_RESOURCE_INPUT_INVALID",
|
|
47
|
+
message: "GTM account and container must be matching safe IDs or resource paths.",
|
|
48
|
+
displayMessage: "Error: GTM account and container must be matching safe IDs or resource paths."
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function readConversionTrackingContractInput(inputPath) {
|
|
52
|
+
if (!inputPath) {
|
|
53
|
+
throw new CliError({
|
|
54
|
+
code: "CONVERSION_TRACKING_INPUT_REQUIRED",
|
|
55
|
+
message: "A conversion-tracking contract JSON input file is required",
|
|
56
|
+
displayMessage: "Error: --input <json-file> is required (use --input - for stdin)"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
try {
|
|
60
|
+
const raw = fs.readFileSync(inputPath === "-" ? 0 : inputPath, "utf8");
|
|
61
|
+
return conversionTrackingContractWriteRequestSchema.parse(JSON.parse(raw));
|
|
62
|
+
} catch (err) {
|
|
63
|
+
const message = describeError(err);
|
|
64
|
+
throw new CliError({
|
|
65
|
+
code: "CONVERSION_TRACKING_INPUT_INVALID",
|
|
66
|
+
message,
|
|
67
|
+
displayMessage: `Error: invalid conversion-tracking contract input (${message})`,
|
|
68
|
+
details: { inputPath }
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async function googleAdsDisconnect(client, project, opts) {
|
|
73
|
+
const result = await client.disconnectGoogleAds(project);
|
|
74
|
+
if (printMachine(result, opts.format)) return;
|
|
75
|
+
console.log(result.disconnected ? `Disconnected Google Ads from project "${project}". Stored redacted evidence was retained.` : `Google Ads was not connected to project "${project}".`);
|
|
76
|
+
}
|
|
77
|
+
async function gtmDisconnect(client, project, opts) {
|
|
78
|
+
const result = await client.disconnectGtm(project);
|
|
79
|
+
if (printMachine(result, opts.format)) return;
|
|
80
|
+
console.log(result.disconnected ? `Disconnected Google Tag Manager from project "${project}". Stored redacted evidence was retained.` : `Google Tag Manager was not connected to project "${project}".`);
|
|
81
|
+
}
|
|
82
|
+
async function googleAdsStatus(client, project, opts) {
|
|
83
|
+
const result = await client.getGoogleAdsStatus(project);
|
|
84
|
+
if (printMachine(result, opts.format)) return;
|
|
85
|
+
console.log(`Google Ads: ${connectionSummary(result)}`);
|
|
86
|
+
if (!result.connected) {
|
|
87
|
+
console.log(`Open project "${project}" in the Canonry dashboard to authorize Google Ads.`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const selection = result.connection.selection;
|
|
91
|
+
console.log(`Customer: ${selection.customerId ?? "not selected"}`);
|
|
92
|
+
if (selection.loginCustomerId) console.log(`Login customer: ${selection.loginCustomerId}`);
|
|
93
|
+
if (result.selectedCustomer) {
|
|
94
|
+
console.log(`Selected: ${result.selectedCustomer.descriptiveName ?? result.selectedCustomer.customerId} (${result.selectedCustomer.status})`);
|
|
95
|
+
}
|
|
96
|
+
console.log(`Last inventory snapshot: ${result.connection.lastInventorySnapshotAt ?? "none"}`);
|
|
97
|
+
console.log(`Last metrics snapshot: ${result.connection.lastMetricsSnapshotAt ?? "none"}`);
|
|
98
|
+
}
|
|
99
|
+
async function gtmStatus(client, project, opts) {
|
|
100
|
+
const result = await client.getGtmStatus(project);
|
|
101
|
+
if (printMachine(result, opts.format)) return;
|
|
102
|
+
console.log(`Google Tag Manager: ${connectionSummary(result)}`);
|
|
103
|
+
if (!result.connected) {
|
|
104
|
+
console.log(`Open project "${project}" in the Canonry dashboard to authorize Google Tag Manager.`);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
console.log(`Account: ${result.selection.accountId ?? "not selected"}`);
|
|
108
|
+
console.log(`Container: ${result.selection.containerId ?? "not selected"}`);
|
|
109
|
+
console.log(`Workspace: ${result.selection.workspaceId ?? "none (live only)"}`);
|
|
110
|
+
console.log(`Last snapshot: ${result.connection.lastSnapshotAt ?? "none"}`);
|
|
111
|
+
}
|
|
112
|
+
async function googleAdsCustomers(client, project, opts) {
|
|
113
|
+
const result = await client.listGoogleAdsCustomers(project);
|
|
114
|
+
if (opts.format === "jsonl") {
|
|
115
|
+
emitJsonl(result.customers.map((customer) => ({ project, fetchedAt: result.fetchedAt, ...customer })));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (printMachine(result, opts.format)) return;
|
|
119
|
+
if (result.customers.length === 0) {
|
|
120
|
+
console.log("No Google Ads customers are visible to this OAuth connection.");
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
console.log(`${result.totalAccessible} accessible customer(s)${result.truncated ? " (bounded list; truncated)" : ""}:
|
|
124
|
+
`);
|
|
125
|
+
for (const customer of result.customers) {
|
|
126
|
+
const role = customer.manager ? "manager" : "client";
|
|
127
|
+
const name = customer.descriptiveName ?? "(unnamed)";
|
|
128
|
+
console.log(` ${customer.customerId.padEnd(16)} ${name} ${role}, ${customer.status}`);
|
|
129
|
+
}
|
|
130
|
+
console.log(`
|
|
131
|
+
Select one with: canonry google-ads select ${project} --customer <customer-id>`);
|
|
132
|
+
}
|
|
133
|
+
async function googleAdsSelect(client, project, request, opts) {
|
|
134
|
+
const result = await client.setGoogleAdsSelection(project, request);
|
|
135
|
+
if (printMachine(result, opts.format)) return;
|
|
136
|
+
console.log(`Selected Google Ads customer ${request.customerId}${request.loginCustomerId ? ` through login customer ${request.loginCustomerId}` : ""}.`);
|
|
137
|
+
console.log(`Run \`canonry google-ads sync ${project}\` to capture read-only conversion and goal evidence.`);
|
|
138
|
+
}
|
|
139
|
+
async function googleAdsSync(client, project, opts) {
|
|
140
|
+
const run = await client.triggerGoogleAdsSync(project);
|
|
141
|
+
if (printMachine(run, opts.format)) return;
|
|
142
|
+
console.log(`Google Ads read-only sync queued (run ${run.id}). Use \`canonry run show ${run.id}\` to check it.`);
|
|
143
|
+
}
|
|
144
|
+
function performanceMicros(micros, currencyCode) {
|
|
145
|
+
if (micros === null) return "\u2014";
|
|
146
|
+
if (currencyCode === null) return (micros / 1e6).toFixed(2);
|
|
147
|
+
return formatMicros(micros, currencyCode);
|
|
148
|
+
}
|
|
149
|
+
function performanceChange(ratio) {
|
|
150
|
+
if (ratio === null) return "";
|
|
151
|
+
const sign = ratio > 0 ? "+" : "";
|
|
152
|
+
return ` (${sign}${formatPercent(ratio)} vs prior period)`;
|
|
153
|
+
}
|
|
154
|
+
async function googleAdsPerformance(client, project, opts) {
|
|
155
|
+
const result = await client.getGoogleAdsPerformance(project, opts.window ? { window: opts.window } : {});
|
|
156
|
+
if (printMachine(result, opts.format)) return;
|
|
157
|
+
if (!result.source) {
|
|
158
|
+
console.log(`No stored Google Ads metrics for project "${project}".`);
|
|
159
|
+
console.log(`Run \`canonry google-ads sync ${project}\` after selecting a customer.`);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const currency = result.source.currencyCode;
|
|
163
|
+
const { totals, comparison } = result;
|
|
164
|
+
console.log(`Window: ${result.startDate} \u2192 ${result.endDate} (${result.days} closed day(s), ${result.window})`);
|
|
165
|
+
console.log(`As of: ${result.source.asOfDate}${result.source.openDate ? ` (${result.source.openDate} still open, excluded)` : ""}`);
|
|
166
|
+
console.log(`Account: ${result.source.customerId} (${currency ?? "?"}, ${result.source.timeZone ?? "unknown zone"})`);
|
|
167
|
+
console.log(`Impressions: ${totals.impressions}${performanceChange(comparison?.change.impressions ?? null)}`);
|
|
168
|
+
console.log(`Clicks: ${totals.clicks} (CTR ${formatPercent(totals.ctr)})${performanceChange(comparison?.change.clicks ?? null)}`);
|
|
169
|
+
console.log(`Cost: ${performanceMicros(totals.costMicros, currency)} (CPC ${performanceMicros(totals.cpcMicros, currency)})${performanceChange(comparison?.change.costMicros ?? null)}`);
|
|
170
|
+
console.log(`Conversions: ${totals.conversions} (rate ${formatPercent(totals.conversionRate)}, cost/conv ${performanceMicros(totals.costPerConversionMicros, currency)})`);
|
|
171
|
+
if (!comparison) {
|
|
172
|
+
console.log(`Comparison: unavailable (${result.comparisonUnavailableReason ?? "unknown"})`);
|
|
173
|
+
}
|
|
174
|
+
if (result.source.campaignsInInventory > 0 && result.source.campaignsQueried < result.source.campaignsInInventory) {
|
|
175
|
+
console.log(`Coverage: ${result.source.campaignsQueried} of ${result.source.campaignsInInventory} campaigns; totals are a subset of the account.`);
|
|
176
|
+
}
|
|
177
|
+
if (result.source.truncated) {
|
|
178
|
+
console.log(`Note: the provider returned a bounded result, so these totals are a subset sum.`);
|
|
179
|
+
}
|
|
180
|
+
if (result.campaigns.length > 0) {
|
|
181
|
+
console.log(`
|
|
182
|
+
${result.campaigns.length} campaign(s):
|
|
183
|
+
`);
|
|
184
|
+
for (const campaign of result.campaigns) {
|
|
185
|
+
const label = campaign.name ?? `(not in stored inventory: ${campaign.campaignId})`;
|
|
186
|
+
console.log(` ${label.padEnd(32).slice(0, 32)} ${campaign.status.padEnd(8)} ${String(campaign.totals.impressions).padStart(8)} impr ${String(campaign.totals.clicks).padStart(6)} clicks ${performanceMicros(campaign.totals.costMicros, currency).padStart(12)}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const filled = result.daily.filter((point) => point.origin === "filled").length;
|
|
190
|
+
if (filled > 0) {
|
|
191
|
+
console.log(`
|
|
192
|
+
${filled} of ${result.daily.length} day(s) had no delivery and are reported as zero.`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
async function googleAdsSnapshots(client, project, opts) {
|
|
196
|
+
const result = await client.listGoogleAdsSnapshots(project, { limit: opts.limit, cursor: opts.cursor });
|
|
197
|
+
if (opts.format === "jsonl") {
|
|
198
|
+
emitJsonl(result.snapshots.map((snapshot) => ({ project, ...snapshot })));
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (printMachine(result, opts.format)) return;
|
|
202
|
+
if (result.snapshots.length === 0) {
|
|
203
|
+
console.log(`No stored Google Ads snapshots. Run \`canonry google-ads sync ${project}\` after selecting a customer.`);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
console.log(`${result.total} stored Google Ads snapshot(s):
|
|
207
|
+
`);
|
|
208
|
+
for (const snapshot of result.snapshots) console.log(` ${snapshotSummary(snapshot)}`);
|
|
209
|
+
if (result.nextCursor) console.log(`
|
|
210
|
+
Next cursor: ${result.nextCursor}`);
|
|
211
|
+
}
|
|
212
|
+
async function googleAdsSnapshot(client, project, snapshotId, opts) {
|
|
213
|
+
const result = await client.getGoogleAdsSnapshot(project, snapshotId);
|
|
214
|
+
if (printMachine(result, opts.format)) return;
|
|
215
|
+
const { metadata, payload } = result.snapshot;
|
|
216
|
+
console.log(`Google Ads ${metadata.kind} snapshot ${metadata.id}`);
|
|
217
|
+
console.log(`Captured: ${metadata.capturedAt}`);
|
|
218
|
+
console.log(`Checksum: ${metadata.payloadChecksum}`);
|
|
219
|
+
console.log(`Payload kind: ${payload.kind}`);
|
|
220
|
+
}
|
|
221
|
+
async function gtmAccounts(client, project, opts) {
|
|
222
|
+
const result = await client.listGtmAccounts(project);
|
|
223
|
+
if (opts.format === "jsonl") {
|
|
224
|
+
emitJsonl(result.accounts.map((account) => ({ project, fetchedAt: result.fetchedAt, ...account })));
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (printMachine(result, opts.format)) return;
|
|
228
|
+
if (result.accounts.length === 0) {
|
|
229
|
+
console.log("No GTM accounts are visible to this OAuth connection.");
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
console.log(`${result.totalAccessible} accessible GTM account(s)${result.truncated ? " (bounded list; truncated)" : ""}:
|
|
233
|
+
`);
|
|
234
|
+
for (const account of result.accounts) console.log(` ${account.id.padEnd(16)} ${account.name}`);
|
|
235
|
+
console.log(`
|
|
236
|
+
Discover containers with: canonry gtm containers ${project} --account <account-id>`);
|
|
237
|
+
}
|
|
238
|
+
async function gtmContainers(client, project, accountId, opts) {
|
|
239
|
+
const canonicalAccountId = canonicalGtmReadAccountId(accountId);
|
|
240
|
+
const result = await client.listGtmContainers(project, canonicalAccountId);
|
|
241
|
+
if (opts.format === "jsonl") {
|
|
242
|
+
emitJsonl(result.containers.map((container) => ({ project, fetchedAt: result.fetchedAt, ...container })));
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (printMachine(result, opts.format)) return;
|
|
246
|
+
if (result.containers.length === 0) {
|
|
247
|
+
console.log(`No GTM containers are visible under account ${accountId}.`);
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
console.log(`${result.totalAccessible} GTM container(s)${result.truncated ? " (bounded list; truncated)" : ""}:
|
|
251
|
+
`);
|
|
252
|
+
for (const container of result.containers) {
|
|
253
|
+
const publicId = container.publicId ? ` (${container.publicId})` : "";
|
|
254
|
+
console.log(` ${container.id.padEnd(16)} ${container.name}${publicId}`);
|
|
255
|
+
}
|
|
256
|
+
console.log(`
|
|
257
|
+
Discover workspaces with: canonry gtm workspaces ${project} --account ${accountId} --container <container-id>`);
|
|
258
|
+
}
|
|
259
|
+
async function gtmWorkspaces(client, project, accountId, containerId, opts) {
|
|
260
|
+
const selection = canonicalGtmReadSelection(accountId, containerId);
|
|
261
|
+
const result = await client.listGtmWorkspaces(project, selection.accountId, selection.containerId);
|
|
262
|
+
if (opts.format === "jsonl") {
|
|
263
|
+
emitJsonl(result.workspaces.map((workspace) => ({ project, fetchedAt: result.fetchedAt, ...workspace })));
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (printMachine(result, opts.format)) return;
|
|
267
|
+
if (result.workspaces.length === 0) {
|
|
268
|
+
console.log(`No GTM workspaces are visible for container ${containerId}. A sync can still capture the live container graph.`);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
console.log(`${result.totalAccessible} GTM workspace(s)${result.truncated ? " (bounded list; truncated)" : ""}:
|
|
272
|
+
`);
|
|
273
|
+
for (const workspace of result.workspaces) console.log(` ${workspace.id.padEnd(16)} ${workspace.name}`);
|
|
274
|
+
}
|
|
275
|
+
async function gtmSelect(client, project, request, opts) {
|
|
276
|
+
const result = await client.setGtmSelection(project, request);
|
|
277
|
+
if (printMachine(result, opts.format)) return;
|
|
278
|
+
console.log(`Selected GTM account ${request.accountId}, container ${request.containerId}${request.workspaceId ? `, and workspace ${request.workspaceId}` : ""}.`);
|
|
279
|
+
console.log(`Run \`canonry gtm sync ${project}\` to capture redacted live${request.workspaceId ? " and draft" : ""} evidence.`);
|
|
280
|
+
}
|
|
281
|
+
async function gtmSync(client, project, opts) {
|
|
282
|
+
const run = await client.triggerGtmSync(project);
|
|
283
|
+
if (printMachine(run, opts.format)) return;
|
|
284
|
+
console.log(`GTM read-only sync queued (run ${run.id}). Use \`canonry run show ${run.id}\` to check it.`);
|
|
285
|
+
}
|
|
286
|
+
async function gtmSnapshots(client, project, opts) {
|
|
287
|
+
const result = await client.listGtmSnapshots(project, { limit: opts.limit, cursor: opts.cursor });
|
|
288
|
+
if (opts.format === "jsonl") {
|
|
289
|
+
emitJsonl(result.snapshots.map((snapshot) => ({ project, ...snapshot })));
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
if (printMachine(result, opts.format)) return;
|
|
293
|
+
if (result.snapshots.length === 0) {
|
|
294
|
+
console.log(`No stored GTM snapshots. Run \`canonry gtm sync ${project}\` after selecting a container.`);
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
console.log(`${result.total} stored GTM snapshot(s):
|
|
298
|
+
`);
|
|
299
|
+
for (const snapshot of result.snapshots) console.log(` ${snapshotSummary(snapshot)}`);
|
|
300
|
+
if (result.nextCursor) console.log(`
|
|
301
|
+
Next cursor: ${result.nextCursor}`);
|
|
302
|
+
}
|
|
303
|
+
async function gtmSnapshot(client, project, snapshotId, opts) {
|
|
304
|
+
const result = await client.getGtmSnapshot(project, snapshotId);
|
|
305
|
+
if (printMachine(result, opts.format)) return;
|
|
306
|
+
const { metadata, payload } = result.snapshot;
|
|
307
|
+
console.log(`GTM ${metadata.kind} snapshot ${metadata.id}`);
|
|
308
|
+
console.log(`Captured: ${metadata.capturedAt}`);
|
|
309
|
+
console.log(`Checksum: ${metadata.payloadChecksum}`);
|
|
310
|
+
console.log(`Payload kind: ${payload.kind}`);
|
|
311
|
+
}
|
|
312
|
+
async function conversionTrackingContracts(client, project, opts) {
|
|
313
|
+
const contracts = await client.listConversionTrackingContracts(project);
|
|
314
|
+
if (opts.format === "jsonl") {
|
|
315
|
+
emitJsonl(contracts.map((contract) => ({ project, ...contract })));
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
if (printMachine(contracts, opts.format)) return;
|
|
319
|
+
if (contracts.length === 0) {
|
|
320
|
+
console.log("No conversion-tracking contracts are declared for this project.");
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
console.log(`${contracts.length} conversion-tracking contract(s):
|
|
324
|
+
`);
|
|
325
|
+
for (const contract of contracts) {
|
|
326
|
+
console.log(` ${contract.id.padEnd(16)} ${contract.name} event=${contract.eventName}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
async function conversionTrackingContract(client, project, contractId, opts) {
|
|
330
|
+
const contract = await client.getConversionTrackingContract(project, contractId);
|
|
331
|
+
if (printMachine(contract, opts.format)) return;
|
|
332
|
+
printConversionTrackingContract(contract);
|
|
333
|
+
}
|
|
334
|
+
function printConversionTrackingContract(contract) {
|
|
335
|
+
console.log(`Conversion contract: ${contract.name} (${contract.id})`);
|
|
336
|
+
console.log(`Event: ${contract.eventName}`);
|
|
337
|
+
console.log(`Google Ads: customer ${contract.googleAds.customerId}, conversion action ${contract.googleAds.conversionActionId}`);
|
|
338
|
+
console.log(`GTM: account ${contract.gtm.accountId}, container ${contract.gtm.containerId}, tag ${contract.gtm.tagId}`);
|
|
339
|
+
console.log(`Runtime verification: ${contract.runtime.verificationRequired ? "required" : "not required"}`);
|
|
340
|
+
}
|
|
341
|
+
async function conversionTrackingCreate(client, project, request, opts) {
|
|
342
|
+
const contract = await client.createConversionTrackingContract(project, request);
|
|
343
|
+
if (printMachine(contract, opts.format)) return;
|
|
344
|
+
console.log(`Created conversion-tracking contract "${contract.name}" (${contract.id}).`);
|
|
345
|
+
}
|
|
346
|
+
async function conversionTrackingUpdate(client, project, contractId, request, opts) {
|
|
347
|
+
const contract = await client.updateConversionTrackingContract(project, contractId, request);
|
|
348
|
+
if (printMachine(contract, opts.format)) return;
|
|
349
|
+
console.log(`Updated conversion-tracking contract "${contract.name}" (${contract.id}).`);
|
|
350
|
+
}
|
|
351
|
+
async function conversionTrackingDelete(client, project, contractId, opts) {
|
|
352
|
+
await client.deleteConversionTrackingContract(project, contractId);
|
|
353
|
+
if (printMachine({ project, contractId, deleted: true }, opts.format)) return;
|
|
354
|
+
console.log(`Deleted conversion-tracking contract ${contractId}.`);
|
|
355
|
+
}
|
|
356
|
+
async function conversionTrackingIntegrity(client, project, contractId, opts) {
|
|
357
|
+
const result = await client.getConversionTrackingIntegrity(project, contractId);
|
|
358
|
+
if (opts.format === "jsonl") {
|
|
359
|
+
emitJsonl(result.assessment.findings.map((finding) => ({
|
|
360
|
+
project,
|
|
361
|
+
contractId: result.assessment.contract.id,
|
|
362
|
+
integrityStatus: result.assessment.status,
|
|
363
|
+
evaluatedAt: result.assessment.evaluatedAt,
|
|
364
|
+
...finding
|
|
365
|
+
})));
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
if (printMachine(result, opts.format)) return;
|
|
369
|
+
console.log(`Conversion integrity: ${result.assessment.contract.name} \u2014 ${result.assessment.status}`);
|
|
370
|
+
console.log(`Evaluated: ${result.assessment.evaluatedAt}`);
|
|
371
|
+
for (const finding of result.assessment.findings) {
|
|
372
|
+
console.log(` ${finding.outcome.toUpperCase().padEnd(7)} ${finding.code} \u2014 ${finding.subject}`);
|
|
373
|
+
}
|
|
374
|
+
if (result.assessment.status === "runtime-unverified") {
|
|
375
|
+
console.log("\nStatic configuration is consistent, but a GTM API snapshot cannot prove that the website event fired or Google Ads observed a conversion.");
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
export {
|
|
379
|
+
conversionTrackingContract,
|
|
380
|
+
conversionTrackingContracts,
|
|
381
|
+
conversionTrackingCreate,
|
|
382
|
+
conversionTrackingDelete,
|
|
383
|
+
conversionTrackingIntegrity,
|
|
384
|
+
conversionTrackingUpdate,
|
|
385
|
+
googleAdsCustomers,
|
|
386
|
+
googleAdsDisconnect,
|
|
387
|
+
googleAdsPerformance,
|
|
388
|
+
googleAdsSelect,
|
|
389
|
+
googleAdsSnapshot,
|
|
390
|
+
googleAdsSnapshots,
|
|
391
|
+
googleAdsStatus,
|
|
392
|
+
googleAdsSync,
|
|
393
|
+
gtmAccounts,
|
|
394
|
+
gtmContainers,
|
|
395
|
+
gtmDisconnect,
|
|
396
|
+
gtmSelect,
|
|
397
|
+
gtmSnapshot,
|
|
398
|
+
gtmSnapshots,
|
|
399
|
+
gtmStatus,
|
|
400
|
+
gtmSync,
|
|
401
|
+
gtmWorkspaces,
|
|
402
|
+
readConversionTrackingContractInput
|
|
403
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-V5D4XNWV.js";
|
|
4
|
+
import "./chunk-OFL4PTYU.js";
|
|
5
|
+
import {
|
|
6
|
+
emitJsonl
|
|
7
|
+
} from "./chunk-Z7IUAJOF.js";
|
|
8
|
+
import "./chunk-AOJU5LKX.js";
|
|
9
|
+
import "./chunk-HGMYEDAQ.js";
|
|
10
|
+
import {
|
|
11
|
+
formatPercent
|
|
12
|
+
} from "./chunk-O4RMPA6H.js";
|
|
13
|
+
import "./chunk-MLKGABMK.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/health-cmd.ts
|
|
16
|
+
async function showHealth(project, opts) {
|
|
17
|
+
const client = createApiClient();
|
|
18
|
+
if (opts.history) {
|
|
19
|
+
const snapshots = await client.getHealthHistory(project, opts.limit);
|
|
20
|
+
if (opts.format === "json") {
|
|
21
|
+
console.log(JSON.stringify(snapshots, null, 2));
|
|
22
|
+
return;
|
|
23
|
+
} else if (opts.format === "jsonl") {
|
|
24
|
+
emitJsonl(snapshots.map((snap) => ({ project, ...snap })));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (snapshots.length === 0) {
|
|
28
|
+
console.log("No health history available.");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
console.log("Date Mention Rate Mentioned/Total Cited Rate Cited/Total");
|
|
32
|
+
console.log("\u2500".repeat(86));
|
|
33
|
+
for (const snap of snapshots) {
|
|
34
|
+
const mRate = formatPercent(snap.overallMentionRate).padStart(6);
|
|
35
|
+
const mRatio = `${snap.mentionedPairs}/${snap.totalPairs}`.padEnd(15);
|
|
36
|
+
const cRate = formatPercent(snap.overallCitedRate).padStart(6);
|
|
37
|
+
const cRatio = `${snap.citedPairs}/${snap.totalPairs}`;
|
|
38
|
+
const date = snap.createdAt.slice(0, 19).padEnd(25);
|
|
39
|
+
console.log(`${date} ${mRate} ${mRatio} ${cRate} ${cRatio}`);
|
|
40
|
+
}
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const health = await client.getHealth(project);
|
|
44
|
+
if (opts.format === "json" || opts.format === "jsonl") {
|
|
45
|
+
console.log(JSON.stringify(health, null, 2));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (health.status === "no-data") {
|
|
49
|
+
console.log("No health data yet \u2014 run a sweep first (canonry run <project>).");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.log(`Health: ${formatPercent(health.overallMentionRate)} mentioned (${health.mentionedPairs}/${health.totalPairs} pairs)`);
|
|
53
|
+
console.log(` ${formatPercent(health.overallCitedRate)} cited (${health.citedPairs}/${health.totalPairs} pairs)`);
|
|
54
|
+
console.log("");
|
|
55
|
+
if (health.providerBreakdown && Object.keys(health.providerBreakdown).length > 0) {
|
|
56
|
+
console.log("Provider Breakdown:");
|
|
57
|
+
for (const [provider, stats] of Object.entries(health.providerBreakdown)) {
|
|
58
|
+
console.log(` ${provider.padEnd(15)} ${formatPercent(stats.mentionRate)} mentioned (${stats.mentioned}/${stats.total}) ${formatPercent(stats.citedRate)} cited (${stats.cited}/${stats.total})`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
showHealth
|
|
64
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApiClient
|
|
3
|
+
} from "./chunk-V5D4XNWV.js";
|
|
4
|
+
import "./chunk-OFL4PTYU.js";
|
|
5
|
+
import {
|
|
6
|
+
emitJsonl
|
|
7
|
+
} from "./chunk-Z7IUAJOF.js";
|
|
8
|
+
import "./chunk-AOJU5LKX.js";
|
|
9
|
+
import {
|
|
10
|
+
CliError,
|
|
11
|
+
usageError
|
|
12
|
+
} from "./chunk-HGMYEDAQ.js";
|
|
13
|
+
import {
|
|
14
|
+
auditHistoryQuerySchema,
|
|
15
|
+
describeError,
|
|
16
|
+
formatValidationIssues,
|
|
17
|
+
resultsClearRequestSchema
|
|
18
|
+
} from "./chunk-O4RMPA6H.js";
|
|
19
|
+
import "./chunk-MLKGABMK.js";
|
|
20
|
+
|
|
21
|
+
// src/commands/history.ts
|
|
22
|
+
function getClient() {
|
|
23
|
+
return createApiClient();
|
|
24
|
+
}
|
|
25
|
+
function originLabel(entry) {
|
|
26
|
+
const userAgent = entry.userAgent?.toLowerCase() ?? "";
|
|
27
|
+
if (userAgent.includes("canonry-mcp")) return "mcp";
|
|
28
|
+
if (userAgent.includes("canonry-cli")) return "cli";
|
|
29
|
+
if (userAgent.includes("mozilla/")) return "dashboard";
|
|
30
|
+
return entry.actor;
|
|
31
|
+
}
|
|
32
|
+
async function showHistory(project, format, opts = {}) {
|
|
33
|
+
const parsed = auditHistoryQuerySchema.safeParse(opts);
|
|
34
|
+
if (!parsed.success) throw usageError(formatValidationIssues(parsed.error.issues));
|
|
35
|
+
const client = getClient();
|
|
36
|
+
try {
|
|
37
|
+
const entries = project ? await client.getHistory(project, opts) : await client.getGlobalHistory(opts);
|
|
38
|
+
if (format === "json") {
|
|
39
|
+
console.log(JSON.stringify(entries, null, 2));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (format === "jsonl") {
|
|
43
|
+
emitJsonl(entries.map((entry) => ({ project: project ?? null, ...entry })));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (entries.length === 0) {
|
|
47
|
+
console.log(project ? `No audit history for "${project}".` : "No instance audit history.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
console.log(`${project ? `Audit history for "${project}"` : "Instance audit history"} (${entries.length}):
|
|
51
|
+
`);
|
|
52
|
+
console.log(` ${project ? "" : "PROJECT "}TIMESTAMP ACTION ENTITY TYPE ACTOR ORIGIN`);
|
|
53
|
+
console.log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
54
|
+
for (const entry of entries) {
|
|
55
|
+
console.log(
|
|
56
|
+
` ${project ? "" : `${(entry.project ?? entry.projectId ?? "(instance)").padEnd(20)} `}${entry.createdAt.padEnd(23)} ${entry.action.padEnd(18)} ${entry.entityType.padEnd(11)} ${entry.actor.padEnd(18)} ${originLabel(entry)}`
|
|
57
|
+
);
|
|
58
|
+
if (entry.actorSession) console.log(` session: ${entry.actorSession}`);
|
|
59
|
+
if (entry.diff != null) console.log(` diff: ${JSON.stringify(entry.diff)}`);
|
|
60
|
+
}
|
|
61
|
+
} catch (err) {
|
|
62
|
+
if (err instanceof CliError) throw err;
|
|
63
|
+
const message = describeError(err);
|
|
64
|
+
throw new CliError({
|
|
65
|
+
code: "HISTORY_FETCH_FAILED",
|
|
66
|
+
message: project ? `Failed to fetch history for project "${project}"` : "Failed to fetch instance history",
|
|
67
|
+
displayMessage: `Failed to fetch history: ${message}`,
|
|
68
|
+
details: {
|
|
69
|
+
project: project ?? null,
|
|
70
|
+
cause: message
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async function clearResults(project, opts) {
|
|
76
|
+
const request = resultsClearRequestSchema.safeParse({ runIds: opts.runIds, researchRunIds: opts.researchRunIds, confirm: opts.confirm });
|
|
77
|
+
if (!request.success) throw new CliError({ code: "INVALID_ARGUMENT", message: request.error.issues.map((issue) => issue.message).join(" "), exitCode: 1 });
|
|
78
|
+
const result = await getClient().clearResults(project, request.data);
|
|
79
|
+
if (opts.format === "jsonl") emitJsonl([result]);
|
|
80
|
+
else if (opts.format === "json") console.log(JSON.stringify(result, null, 2));
|
|
81
|
+
else {
|
|
82
|
+
console.log(`${result.dryRun ? "Would clear" : "Cleared"} ${result.runIds.length} visibility runs and ${result.researchRunIds.length} research batches.`);
|
|
83
|
+
console.log(`${result.querySnapshots} saved visibility answers; ${result.researchQueries} research queries.`);
|
|
84
|
+
if (result.dryRun) console.log("Back up the evidence, then repeat with --confirm to delete these exact runs.");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
clearResults,
|
|
89
|
+
showHistory
|
|
90
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4451,6 +4451,45 @@ declare const querySnapshots: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4451
4451
|
identity: undefined;
|
|
4452
4452
|
generated: undefined;
|
|
4453
4453
|
}, {}, {}>;
|
|
4454
|
+
mentionIdentity: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4455
|
+
name: "mention_identity";
|
|
4456
|
+
tableName: "query_snapshots";
|
|
4457
|
+
dataType: "string";
|
|
4458
|
+
columnType: "SQLiteText";
|
|
4459
|
+
data: "wrong-subject";
|
|
4460
|
+
driverParam: string;
|
|
4461
|
+
notNull: false;
|
|
4462
|
+
hasDefault: false;
|
|
4463
|
+
isPrimaryKey: false;
|
|
4464
|
+
isAutoincrement: false;
|
|
4465
|
+
hasRuntimeDefault: false;
|
|
4466
|
+
enumValues: [string, ...string[]];
|
|
4467
|
+
baseColumn: never;
|
|
4468
|
+
identity: undefined;
|
|
4469
|
+
generated: undefined;
|
|
4470
|
+
}, {}, {
|
|
4471
|
+
length: number | undefined;
|
|
4472
|
+
$type: "wrong-subject";
|
|
4473
|
+
}>;
|
|
4474
|
+
wrongSubjectTargetKeys: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4475
|
+
name: "wrong_subject_target_keys";
|
|
4476
|
+
tableName: "query_snapshots";
|
|
4477
|
+
dataType: "json";
|
|
4478
|
+
columnType: "SQLiteTextJson";
|
|
4479
|
+
data: string[];
|
|
4480
|
+
driverParam: string;
|
|
4481
|
+
notNull: false;
|
|
4482
|
+
hasDefault: false;
|
|
4483
|
+
isPrimaryKey: false;
|
|
4484
|
+
isAutoincrement: false;
|
|
4485
|
+
hasRuntimeDefault: false;
|
|
4486
|
+
enumValues: undefined;
|
|
4487
|
+
baseColumn: never;
|
|
4488
|
+
identity: undefined;
|
|
4489
|
+
generated: undefined;
|
|
4490
|
+
}, {}, {
|
|
4491
|
+
$type: string[];
|
|
4492
|
+
}>;
|
|
4454
4493
|
answerText: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
4455
4494
|
name: "answer_text";
|
|
4456
4495
|
tableName: "query_snapshots";
|
|
@@ -25942,7 +25981,7 @@ declare const gbpReviews: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
25942
25981
|
tableName: "gbp_reviews";
|
|
25943
25982
|
dataType: "string";
|
|
25944
25983
|
columnType: "SQLiteText";
|
|
25945
|
-
data: "none" | "baseline" | "stale" | "
|
|
25984
|
+
data: "none" | "baseline" | "stale" | "skipped" | "pending" | "sent" | "suppressed";
|
|
25946
25985
|
driverParam: string;
|
|
25947
25986
|
notNull: true;
|
|
25948
25987
|
hasDefault: true;
|
|
@@ -25955,7 +25994,7 @@ declare const gbpReviews: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
25955
25994
|
generated: undefined;
|
|
25956
25995
|
}, {}, {
|
|
25957
25996
|
length: number | undefined;
|
|
25958
|
-
$type: "none" | "baseline" | "stale" | "
|
|
25997
|
+
$type: "none" | "baseline" | "stale" | "skipped" | "pending" | "sent" | "suppressed";
|
|
25959
25998
|
}>;
|
|
25960
25999
|
alertStateAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
25961
26000
|
name: "alert_state_at";
|
|
@@ -26252,7 +26291,7 @@ declare const gbpReviewRatings: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
26252
26291
|
tableName: "gbp_review_ratings";
|
|
26253
26292
|
dataType: "string";
|
|
26254
26293
|
columnType: "SQLiteText";
|
|
26255
|
-
data: "none" | "baseline" | "stale" | "
|
|
26294
|
+
data: "none" | "baseline" | "stale" | "skipped" | "pending" | "sent" | "suppressed";
|
|
26256
26295
|
driverParam: string;
|
|
26257
26296
|
notNull: true;
|
|
26258
26297
|
hasDefault: true;
|
|
@@ -26265,7 +26304,7 @@ declare const gbpReviewRatings: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
26265
26304
|
generated: undefined;
|
|
26266
26305
|
}, {}, {
|
|
26267
26306
|
length: number | undefined;
|
|
26268
|
-
$type: "none" | "baseline" | "stale" | "
|
|
26307
|
+
$type: "none" | "baseline" | "stale" | "skipped" | "pending" | "sent" | "suppressed";
|
|
26269
26308
|
}>;
|
|
26270
26309
|
alertStateAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
26271
26310
|
name: "alert_state_at";
|