@canonry/canonry 7.56.1 → 7.57.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/google-business-profile.md +1 -1
- package/assets/assets/{AgentSetupPage-BkKw_in_.js → AgentSetupPage-C-kQupMX.js} +1 -1
- package/assets/assets/{AuditHistoryPanel-UtRnS-sh.js → AuditHistoryPanel-DvZk-ikR.js} +1 -1
- package/assets/assets/{BacklinksPage-DCSmuAOQ.js → BacklinksPage-TLB85t4y.js} +1 -1
- package/assets/assets/{HistoryPage-DzpqCNJM.js → HistoryPage-C4nHeKDs.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-Dh0BJw_f.js → MeasurementPropertyPage-8E17rN5d.js} +1 -1
- package/assets/assets/{ProjectPage-D-9IeFap.js → ProjectPage-B4SbAE_N.js} +1 -1
- package/assets/assets/{RunsPage-DtllYN3I.js → RunsPage-Enho1Wqz.js} +1 -1
- package/assets/assets/{SettingsPage-_p15s-OC.js → SettingsPage-BjLpSN4f.js} +1 -1
- package/assets/assets/{SiteHealthSection-BEpXTW3G.js → SiteHealthSection-BUOBO4VH.js} +2 -2
- package/assets/assets/ToneBadge-BLQKJIMR.js +60 -0
- package/assets/assets/{TrafficPage-wru6cQPP.js → TrafficPage-BtjRPsdl.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-_XKbd-aS.js → TrafficSourceDetailPage-Bw-9JMOF.js} +1 -1
- package/assets/assets/{account-context-BekDho6K.js → account-context-bLel7cL8.js} +1 -1
- package/assets/assets/{card-By9JlCCv.js → card-DFlbarlV.js} +1 -1
- package/assets/assets/{extract-error-message-SMPhaAkr.js → extract-error-message-BYvs9oIt.js} +1 -1
- package/assets/assets/{format-helpers-CVjOUs0j.js → format-helpers-DPVlVrlp.js} +1 -1
- package/assets/assets/{index-el2M4tYf.js → index-DWP0Oz6d.js} +4 -4
- package/assets/assets/{query-client-8RITTP1A.js → query-client-DLuEpFRm.js} +1 -1
- package/assets/assets/{react-query-BXwc1UHc.js → react-query-BVY1CIRz.js} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-CM12VcoB.js → react-sigma_core.esm.min-BaR2koVY.js} +1 -1
- package/assets/assets/{service-B0wkGxvy.js → service-DiBkOka7.js} +1 -1
- package/assets/index.html +7 -7
- package/dist/{ads-SPXNKDEW.js → ads-6PCFYPZ6.js} +3 -3
- package/dist/{agent-THPYOGXD.js → agent-UA3J23KG.js} +7 -7
- package/dist/{agent-ask-VHRA5RVU.js → agent-ask-D4RWVHZX.js} +3 -3
- package/dist/{agent-conversations-5HXXVMZV.js → agent-conversations-BSKUJF7H.js} +3 -3
- package/dist/{agent-memory-SKBUFHGV.js → agent-memory-ENPPLOV7.js} +3 -3
- package/dist/{agent-providers-TOIA75C6.js → agent-providers-5NV7YEVG.js} +3 -3
- package/dist/{agent-transcript-DFE2PDTS.js → agent-transcript-TXDTQ7Q2.js} +3 -3
- package/dist/{analytics-JJHPK2TK.js → analytics-6ITOJIGW.js} +3 -3
- package/dist/{apply-AC36NXPF.js → apply-EPQXYQRO.js} +3 -3
- package/dist/{backfill-73XI3CEL.js → backfill-4LAL4IIT.js} +9 -9
- package/dist/{backlinks-EKSQJXMS.js → backlinks-ECIDQQ4I.js} +3 -3
- package/dist/{bing-XZQ6CQM4.js → bing-LHTVVJK7.js} +3 -3
- package/dist/{bootstrap-GJUT3AVH.js → bootstrap-KHYUCFLP.js} +10 -10
- package/dist/{cdp-QROXKBXS.js → cdp-YZWEKVRO.js} +7 -7
- package/dist/{chunk-AOBMI5UM.js → chunk-2R32P77U.js} +1 -1
- package/dist/{chunk-NZ6KZLTM.js → chunk-3HRHHFQM.js} +6 -1
- package/dist/{chunk-A3NZOK4X.js → chunk-3OTH3ABK.js} +4 -4
- package/dist/{chunk-ADCVXKSD.js → chunk-522MYBLV.js} +1 -1
- package/dist/{chunk-37YB52NM.js → chunk-5AJWITKP.js} +45 -1
- package/dist/{chunk-SJLCALSV.js → chunk-5L2ZTXBH.js} +3 -3
- package/dist/{chunk-RELKG6XH.js → chunk-6MK426LA.js} +2 -2
- package/dist/{chunk-TJJLANDV.js → chunk-BJN7FNIB.js} +4 -4
- package/dist/{chunk-2Z7FALTN.js → chunk-BURMKOEF.js} +2 -2
- package/dist/{chunk-TPCXTUL5.js → chunk-E3YBETL6.js} +1 -1
- package/dist/{chunk-ZNAAZHNT.js → chunk-F7WRZW3A.js} +47 -3
- package/dist/{chunk-VRFTXW6H.js → chunk-FHYOQI26.js} +3343 -2299
- package/dist/{chunk-DDM6PVXJ.js → chunk-GT7HWKBO.js} +3 -3
- package/dist/{chunk-VZURJP3T.js → chunk-HPC3CBPI.js} +1 -1
- package/dist/{chunk-UJRPQOKE.js → chunk-J4YFSAAY.js} +8 -8
- package/dist/{chunk-JZEK26CT.js → chunk-JQS2H65K.js} +375 -325
- package/dist/{chunk-C5LD76KR.js → chunk-JWBFDZIP.js} +3 -3
- package/dist/{chunk-WRYVESRH.js → chunk-KRIZF753.js} +1 -1
- package/dist/{chunk-NSE55FZE.js → chunk-LCC5ZJPV.js} +2 -2
- package/dist/{chunk-F5DLOQ3B.js → chunk-MVUYDJ7G.js} +2 -2
- package/dist/{chunk-H4IJXVG5.js → chunk-NUHCDBKR.js} +5 -5
- package/dist/{chunk-UDF3A2O7.js → chunk-OAA7RHMG.js} +5 -5
- package/dist/{chunk-CFGQOIXW.js → chunk-OJ5IDPYY.js} +3 -3
- package/dist/{chunk-Q5ZRUA57.js → chunk-S2UDQAT7.js} +1 -1
- package/dist/{chunk-4J7PL5R2.js → chunk-SHUTA74W.js} +618 -282
- package/dist/{chunk-V4V7WOHY.js → chunk-SOKD3TRA.js} +46 -2
- package/dist/{chunk-QAGZQ2DY.js → chunk-TIKT62IV.js} +1749 -1634
- package/dist/{chunk-SVLNIJS2.js → chunk-TIYL4KVS.js} +1 -1
- package/dist/{chunk-P2OVWQKT.js → chunk-TXBL3N46.js} +1 -1
- package/dist/{chunk-W5FAL4LJ.js → chunk-ULFDCKIC.js} +4 -4
- package/dist/{chunk-ZOVL5NAP.js → chunk-VF36TGF4.js} +1 -1
- package/dist/{chunk-4QRF7TNW.js → chunk-XXYBDAS2.js} +2 -2
- package/dist/{chunk-PUTJ6LPE.js → chunk-YFUQHJRZ.js} +1 -1
- package/dist/{chunk-RCCZ6VGK.js → chunk-ZUAXF73A.js} +1 -1
- package/dist/{citations-5ARZ6M42.js → citations-HXVWVRDO.js} +3 -3
- package/dist/{cli-catalog-XD7VY3ES.js → cli-catalog-EDAH3242.js} +3 -3
- package/dist/{cli-commands-FWCI6VIN.js → cli-commands-NUXQWIKA.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-XWTEIVZL.js → competitor-XYPBUM4Q.js} +3 -3
- package/dist/{content-4EVGV32G.js → content-SDTRO2XT.js} +3 -3
- package/dist/{dashboard-QZXKGD6T.js → dashboard-55IRUB73.js} +6 -6
- package/dist/{demo-3DMRH7BC.js → demo-KEFXTKRQ.js} +1 -1
- package/dist/{demo-server-TU3BW763.js → demo-server-BDQDPUWN.js} +11 -11
- package/dist/{discover-VQYJ4UOL.js → discover-I6AQJPUK.js} +3 -3
- package/dist/{discover-eval-FMEMPSM3.js → discover-eval-GLGBZC7B.js} +3 -3
- package/dist/{doctor-VYES5HCM.js → doctor-Q47J7GZI.js} +3 -3
- package/dist/{evidence-BG45EBS3.js → evidence-AMLTPRHA.js} +3 -3
- package/dist/{export-cmd-PQZCMR7C.js → export-cmd-NTCX43DE.js} +3 -3
- package/dist/{ga-ZQL2LHQA.js → ga-END6LQJW.js} +3 -3
- package/dist/{gbp-KNWDBHFM.js → gbp-CVJXSTTB.js} +33 -4
- package/dist/{google-GOKE6J5E.js → google-4OCFGWGV.js} +4 -4
- package/dist/{google-marketing-7DYEKRHS.js → google-marketing-NW27PADK.js} +1 -1
- package/dist/{health-cmd-4OZ7EYWI.js → health-cmd-2KMNASB3.js} +3 -3
- package/dist/{history-U2W77DIY.js → history-6LBFXVKF.js} +3 -3
- package/dist/index.d.ts +311 -5
- package/dist/index.js +24 -24
- package/dist/{init-LEGXLKPA.js → init-542CZBNS.js} +11 -11
- package/dist/{insights-LWMDBEYC.js → insights-YH7NP5LX.js} +3 -3
- package/dist/intelligence-service-6IVSAF2X.js +15 -0
- package/dist/{keys-RSKVNMJI.js → keys-CJ5DTL4Y.js} +3 -3
- package/dist/{keyword-IM4GUM5U.js → keyword-7FMLF3B7.js} +3 -3
- package/dist/{logs-B35V2RPE.js → logs-362Y2Z55.js} +3 -3
- package/dist/{mcp-UFMKQFGP.js → mcp-RTJ3HZLY.js} +2 -2
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-BOHLLJD5.js → measurement-plan-ICT6U62D.js} +5 -5
- package/dist/{notify-RQIQP5ZF.js → notify-HT7QBF3B.js} +3 -3
- package/dist/{organic-evidence-C3OZR7UY.js → organic-evidence-CAGEQ5OR.js} +3 -3
- package/dist/{overview-OVIPKMAY.js → overview-Y6RVRPC7.js} +4 -4
- package/dist/{project-QBUTYR6J.js → project-7OBPDHLH.js} +3 -3
- package/dist/{query-KCGET5FS.js → query-23GN3BC6.js} +3 -3
- package/dist/{research-HTURJWRL.js → research-N7EVBN47.js} +3 -3
- package/dist/{results-export-GJNXEXV4.js → results-export-BHEYAZXQ.js} +3 -3
- package/dist/{run-ZNTT7W5M.js → run-KVPMLHGQ.js} +4 -4
- package/dist/{schedule-S2ODDXFB.js → schedule-EZ2TLM22.js} +3 -3
- package/dist/{search-UW56VG5B.js → search-UHUPUGT3.js} +3 -3
- package/dist/{serve-UMF32HVA.js → serve-R2OR4ZF2.js} +25 -25
- package/dist/{session-GEJOH3FN.js → session-CSYHALIE.js} +12 -12
- package/dist/{settings-TGSORPVW.js → settings-QCFPNHSC.js} +3 -3
- package/dist/{skills-SBZZLY4T.js → skills-FXPAKCVV.js} +2 -2
- package/dist/{snapshot-OMS33CN4.js → snapshot-NY5PNDWR.js} +3 -3
- package/dist/{src-LKNW35M6.js → src-V6W5XBAI.js} +4 -2
- package/dist/{status-7D7NUW7M.js → status-MYXAVPIB.js} +4 -4
- package/dist/{technical-aeo-UFDHAV7G.js → technical-aeo-4C2EQ6C5.js} +3 -3
- package/dist/{telemetry-ZPVJITHJ.js → telemetry-SMY4NDD2.js} +4 -4
- package/dist/{tools-EJ5AHYFS.js → tools-HIRCGFM2.js} +11 -11
- package/dist/{traffic-T6YAKUY5.js → traffic-QTHEOB5M.js} +5 -5
- package/dist/{users-6N2YMWAP.js → users-FDZPHCWI.js} +3 -3
- package/dist/{visibility-stats-GODBRQVG.js → visibility-stats-6B3S3AIY.js} +3 -3
- package/dist/{wordpress-ISFI67TH.js → wordpress-5IIA4H3G.js} +3 -3
- package/package.json +1 -1
- package/assets/assets/ToneBadge-nxe12_3b.js +0 -60
- package/dist/intelligence-service-3JS4X4Y4.js +0 -15
|
@@ -304,6 +304,24 @@ var notificationCreateRequestSchema = z4.object({
|
|
|
304
304
|
events: z4.array(notificationEventSchema).min(1),
|
|
305
305
|
source: z4.string().optional()
|
|
306
306
|
});
|
|
307
|
+
var ReviewDeliveryStates = Object.freeze({
|
|
308
|
+
Pending: "pending",
|
|
309
|
+
Attempting: "attempting",
|
|
310
|
+
Sent: "sent",
|
|
311
|
+
Uncertain: "uncertain",
|
|
312
|
+
Failed: "failed",
|
|
313
|
+
Canceled: "canceled"
|
|
314
|
+
});
|
|
315
|
+
function googleBusinessReviewUrl(value) {
|
|
316
|
+
try {
|
|
317
|
+
if (!value) return null;
|
|
318
|
+
const url = new URL(value);
|
|
319
|
+
const providerPath = ["www.google.com", "google.com"].includes(url.hostname) && url.pathname.startsWith("/maps") || url.hostname === "maps.google.com" || url.hostname === "local.google.com" && url.pathname === "/place";
|
|
320
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.port && providerPath ? url.href : null;
|
|
321
|
+
} catch {
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
307
325
|
|
|
308
326
|
// ../contracts/src/errors.ts
|
|
309
327
|
var AppError = class extends Error {
|
|
@@ -13090,6 +13108,9 @@ var LIVE_READ_OPERATIONS = /* @__PURE__ */ new Set([
|
|
|
13090
13108
|
"GET /api/v1/projects/{name}/google/properties",
|
|
13091
13109
|
"GET /api/v1/projects/{name}/google/gsc/sitemaps",
|
|
13092
13110
|
"GET /api/v1/projects/{name}/gbp/accounts",
|
|
13111
|
+
"GET /api/v1/projects/{name}/gbp/local-posts",
|
|
13112
|
+
"GET /api/v1/projects/{name}/gbp/local-post",
|
|
13113
|
+
"GET /api/v1/projects/{name}/gbp/reviews/live",
|
|
13093
13114
|
"GET /api/v1/projects/{name}/ga/properties",
|
|
13094
13115
|
"GET /api/v1/projects/{name}/bing/sites",
|
|
13095
13116
|
// Performance reads query Bing directly rather than the local snapshot.
|
|
@@ -13139,6 +13160,7 @@ var WRITE_OPERATIONS = /* @__PURE__ */ new Set([
|
|
|
13139
13160
|
"GET /api/v1/projects/{name}/bing/coverage"
|
|
13140
13161
|
]);
|
|
13141
13162
|
var STORED_READ_OPERATIONS = /* @__PURE__ */ new Set([
|
|
13163
|
+
"GET /api/v1/projects/{name}/gbp/local-post-attempt",
|
|
13142
13164
|
"GET /api/v1/openapi.json",
|
|
13143
13165
|
"GET /api/v1/screenshots/{snapshotId}",
|
|
13144
13166
|
"GET /api/v1/projects/{name}/technical-aeo/runs/{runId}/page-health-preview",
|
|
@@ -18187,14 +18209,14 @@ function median(values) {
|
|
|
18187
18209
|
const middle = Math.floor(sorted.length / 2);
|
|
18188
18210
|
return sorted.length % 2 === 1 ? sorted[middle] : (sorted[middle - 1] + sorted[middle]) / 2;
|
|
18189
18211
|
}
|
|
18190
|
-
function wilsonInterval(successes, n,
|
|
18212
|
+
function wilsonInterval(successes, n, z90 = 1.96) {
|
|
18191
18213
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
18192
18214
|
const s = Math.max(0, Math.min(successes, n));
|
|
18193
18215
|
const p = s / n;
|
|
18194
|
-
const z210 =
|
|
18216
|
+
const z210 = z90 * z90;
|
|
18195
18217
|
const denom = 1 + z210 / n;
|
|
18196
18218
|
const center = (p + z210 / (2 * n)) / denom;
|
|
18197
|
-
const margin =
|
|
18219
|
+
const margin = z90 / denom * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
|
|
18198
18220
|
return {
|
|
18199
18221
|
low: round(Math.max(0, center - margin)),
|
|
18200
18222
|
high: round(Math.min(1, center + margin))
|
|
@@ -20089,6 +20111,85 @@ function formatMicros(micros, currencyCode = "USD", options = {}) {
|
|
|
20089
20111
|
return formatted;
|
|
20090
20112
|
}
|
|
20091
20113
|
|
|
20114
|
+
// ../contracts/src/gbp-local-posts.ts
|
|
20115
|
+
import { z as z59 } from "zod";
|
|
20116
|
+
var GBP_POSTS_WRITE_SCOPE = "gbp.posts.write";
|
|
20117
|
+
var GBP_LIVE_READ_SCOPE = "gbp.read";
|
|
20118
|
+
var gbpAccountNameSchema = z59.string().regex(/^accounts\/[1-9]\d{0,29}$/u);
|
|
20119
|
+
var gbpLocationNameSchema = z59.string().regex(/^locations\/[1-9]\d{0,29}$/u);
|
|
20120
|
+
var gbpLocalPostNameSchema = z59.string().regex(
|
|
20121
|
+
/^accounts\/[1-9]\d{0,29}\/locations\/[1-9]\d{0,29}\/localPosts\/[\w-]{1,200}$/u
|
|
20122
|
+
);
|
|
20123
|
+
var publicUrl = z59.url().refine((value) => {
|
|
20124
|
+
const url = new URL(value);
|
|
20125
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.hash;
|
|
20126
|
+
}, "An HTTPS URL without credentials or fragment is required");
|
|
20127
|
+
var gbpLocalPostStateSchema = z59.enum([
|
|
20128
|
+
"LIVE",
|
|
20129
|
+
"PROCESSING",
|
|
20130
|
+
"REJECTED",
|
|
20131
|
+
"SCHEDULED",
|
|
20132
|
+
"RECURRING",
|
|
20133
|
+
"LOCAL_POST_STATE_UNSPECIFIED"
|
|
20134
|
+
]);
|
|
20135
|
+
var GbpLocalPostStates = Object.freeze(gbpLocalPostStateSchema.enum);
|
|
20136
|
+
var gbpLocalPostContentSchema = z59.object({
|
|
20137
|
+
languageCode: z59.string().regex(/^[a-z]{2}(?:-[A-Z]{2})?$/u),
|
|
20138
|
+
summary: z59.string().trim().min(1).max(1500).refine((value) => !/[\p{Cc}\p{Cf}]/u.test(value.replace(/\n/gu, ""))),
|
|
20139
|
+
topicType: z59.literal("STANDARD"),
|
|
20140
|
+
callToAction: z59.object({ actionType: z59.literal("LEARN_MORE"), url: publicUrl }).strict(),
|
|
20141
|
+
media: z59.tuple([
|
|
20142
|
+
z59.object({ mediaFormat: z59.literal("PHOTO"), sourceUrl: publicUrl }).strict()
|
|
20143
|
+
])
|
|
20144
|
+
}).strict();
|
|
20145
|
+
var gbpLocalPostDtoSchema = z59.object({
|
|
20146
|
+
name: gbpLocalPostNameSchema,
|
|
20147
|
+
languageCode: z59.string(),
|
|
20148
|
+
summary: z59.string(),
|
|
20149
|
+
topicType: z59.string(),
|
|
20150
|
+
state: gbpLocalPostStateSchema,
|
|
20151
|
+
actionType: z59.string().nullable(),
|
|
20152
|
+
articleUrl: z59.string().nullable(),
|
|
20153
|
+
imageUrls: z59.array(z59.string()),
|
|
20154
|
+
createTime: z59.string().datetime({ offset: true }),
|
|
20155
|
+
updateTime: z59.string().datetime({ offset: true }),
|
|
20156
|
+
searchUrl: z59.string().nullable()
|
|
20157
|
+
});
|
|
20158
|
+
var gbpLocalPostListSchema = z59.object({
|
|
20159
|
+
posts: z59.array(gbpLocalPostDtoSchema),
|
|
20160
|
+
nextPageToken: z59.string().nullable()
|
|
20161
|
+
});
|
|
20162
|
+
var gbpLocalPostCreateSchema = z59.object({
|
|
20163
|
+
accountName: gbpAccountNameSchema,
|
|
20164
|
+
locationName: gbpLocationNameSchema,
|
|
20165
|
+
attemptId: z59.string().uuid(),
|
|
20166
|
+
packageId: z59.string().regex(/^[a-f0-9]{64}$/u),
|
|
20167
|
+
content: gbpLocalPostContentSchema
|
|
20168
|
+
}).strict();
|
|
20169
|
+
var gbpLocalPostAttemptSchema = z59.object({
|
|
20170
|
+
attemptId: z59.string().uuid(),
|
|
20171
|
+
packageId: z59.string().regex(/^[a-f0-9]{64}$/u),
|
|
20172
|
+
status: z59.enum(["accepted", "uncertain", "rejected"]),
|
|
20173
|
+
post: gbpLocalPostDtoSchema.nullable()
|
|
20174
|
+
});
|
|
20175
|
+
var gbpLiveReviewsSchema = z59.object({
|
|
20176
|
+
accountName: gbpAccountNameSchema,
|
|
20177
|
+
locationName: gbpLocationNameSchema,
|
|
20178
|
+
profileUrl: publicUrl.nullable(),
|
|
20179
|
+
checkedAt: z59.string().datetime(),
|
|
20180
|
+
complete: z59.literal(true),
|
|
20181
|
+
reviews: z59.array(
|
|
20182
|
+
z59.object({
|
|
20183
|
+
reviewName: z59.string(),
|
|
20184
|
+
starRating: z59.number().int().min(1).max(5).nullable(),
|
|
20185
|
+
comment: z59.string().nullable(),
|
|
20186
|
+
reviewerName: z59.string().nullable(),
|
|
20187
|
+
createTime: z59.string().nullable(),
|
|
20188
|
+
updateTime: z59.string()
|
|
20189
|
+
})
|
|
20190
|
+
)
|
|
20191
|
+
});
|
|
20192
|
+
|
|
20092
20193
|
// ../contracts/src/scopes.ts
|
|
20093
20194
|
var READ_ONLY_SCOPE = "read";
|
|
20094
20195
|
var WILDCARD_SCOPE = "*";
|
|
@@ -20104,7 +20205,7 @@ function grantsWrite(scope) {
|
|
|
20104
20205
|
}
|
|
20105
20206
|
function restrictedWriteScopes(scopes) {
|
|
20106
20207
|
const writes = scopes.filter(grantsWrite);
|
|
20107
|
-
const restricted = /* @__PURE__ */ new Set([ADS_WRITE_SCOPE, ADS_APPROVE_SCOPE, ADS_ACTIVATE_SCOPE, RESEARCH_RUN_SCOPE]);
|
|
20208
|
+
const restricted = /* @__PURE__ */ new Set([ADS_WRITE_SCOPE, ADS_APPROVE_SCOPE, ADS_ACTIVATE_SCOPE, RESEARCH_RUN_SCOPE, GBP_POSTS_WRITE_SCOPE]);
|
|
20108
20209
|
return writes.length > 0 && writes.every((scope) => restricted.has(scope)) ? writes : null;
|
|
20109
20210
|
}
|
|
20110
20211
|
function intersectScopes(authority, requested) {
|
|
@@ -20116,8 +20217,8 @@ function isReadOnlyKey(scopes) {
|
|
|
20116
20217
|
}
|
|
20117
20218
|
|
|
20118
20219
|
// ../contracts/src/telemetry.ts
|
|
20119
|
-
import { z as
|
|
20120
|
-
var telemetryEffectiveReasonSchema =
|
|
20220
|
+
import { z as z60 } from "zod";
|
|
20221
|
+
var telemetryEffectiveReasonSchema = z60.enum([
|
|
20121
20222
|
"enabled",
|
|
20122
20223
|
"configured_disabled",
|
|
20123
20224
|
"CANONRY_TELEMETRY_DISABLED",
|
|
@@ -20126,12 +20227,12 @@ var telemetryEffectiveReasonSchema = z59.enum([
|
|
|
20126
20227
|
"NO_CONFIG",
|
|
20127
20228
|
"CONFIG_UNAVAILABLE"
|
|
20128
20229
|
]);
|
|
20129
|
-
var telemetryTargetSchema =
|
|
20130
|
-
var telemetryStatusDtoSchema =
|
|
20131
|
-
enabled:
|
|
20132
|
-
configuredEnabled:
|
|
20230
|
+
var telemetryTargetSchema = z60.enum(["server", "local"]);
|
|
20231
|
+
var telemetryStatusDtoSchema = z60.object({
|
|
20232
|
+
enabled: z60.boolean(),
|
|
20233
|
+
configuredEnabled: z60.boolean(),
|
|
20133
20234
|
reason: telemetryEffectiveReasonSchema,
|
|
20134
|
-
anonymousId:
|
|
20235
|
+
anonymousId: z60.string().regex(/^[0-9a-f]{8}\.\.\.$/i).optional(),
|
|
20135
20236
|
target: telemetryTargetSchema.optional()
|
|
20136
20237
|
}).strict();
|
|
20137
20238
|
function normalizeTelemetryStatus(status, target = "server") {
|
|
@@ -20151,7 +20252,7 @@ function maskTelemetryAnonymousId(value) {
|
|
|
20151
20252
|
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value) ? `${value.slice(0, 8)}...` : void 0;
|
|
20152
20253
|
}
|
|
20153
20254
|
var ONBOARDING_FLOW_VERSION = 1;
|
|
20154
|
-
var onboardingStepSchema =
|
|
20255
|
+
var onboardingStepSchema = z60.enum([
|
|
20155
20256
|
"system",
|
|
20156
20257
|
"project",
|
|
20157
20258
|
"queries",
|
|
@@ -20162,7 +20263,7 @@ var onboardingStepSchema = z59.enum([
|
|
|
20162
20263
|
// silently drops unknown ones, while step is an open property there.
|
|
20163
20264
|
"finish"
|
|
20164
20265
|
]);
|
|
20165
|
-
var onboardingNextActionSchema =
|
|
20266
|
+
var onboardingNextActionSchema = z60.enum([
|
|
20166
20267
|
"copy_agent_command",
|
|
20167
20268
|
"connect_server_traffic",
|
|
20168
20269
|
"connect_search_console",
|
|
@@ -20173,7 +20274,7 @@ var onboardingNextActionSchema = z59.enum([
|
|
|
20173
20274
|
"open_project",
|
|
20174
20275
|
"review_page_health"
|
|
20175
20276
|
]);
|
|
20176
|
-
var onboardingCountBucketSchema =
|
|
20277
|
+
var onboardingCountBucketSchema = z60.enum([
|
|
20177
20278
|
"0",
|
|
20178
20279
|
"1",
|
|
20179
20280
|
"2-3",
|
|
@@ -20189,7 +20290,7 @@ function bucketOnboardingCount(value) {
|
|
|
20189
20290
|
if (value < 11) return "6-10";
|
|
20190
20291
|
return "11+";
|
|
20191
20292
|
}
|
|
20192
|
-
var onboardingBlockReasonSchema =
|
|
20293
|
+
var onboardingBlockReasonSchema = z60.enum([
|
|
20193
20294
|
"api_unavailable",
|
|
20194
20295
|
"database_unavailable",
|
|
20195
20296
|
"worker_unavailable",
|
|
@@ -20209,41 +20310,41 @@ var onboardingBlockReasonSchema = z59.enum([
|
|
|
20209
20310
|
"network",
|
|
20210
20311
|
"unknown"
|
|
20211
20312
|
]);
|
|
20212
|
-
var onboardingSurfaceSchema =
|
|
20313
|
+
var onboardingSurfaceSchema = z60.enum([
|
|
20213
20314
|
"wizard",
|
|
20214
20315
|
"platform",
|
|
20215
20316
|
"site_health"
|
|
20216
20317
|
]);
|
|
20217
|
-
var onboardingEventBaseSchema =
|
|
20218
|
-
eventId:
|
|
20219
|
-
flowVersion:
|
|
20220
|
-
onboardingSessionId:
|
|
20318
|
+
var onboardingEventBaseSchema = z60.object({
|
|
20319
|
+
eventId: z60.string().uuid(),
|
|
20320
|
+
flowVersion: z60.literal(ONBOARDING_FLOW_VERSION),
|
|
20321
|
+
onboardingSessionId: z60.string().uuid(),
|
|
20221
20322
|
surface: onboardingSurfaceSchema.optional()
|
|
20222
20323
|
});
|
|
20223
|
-
var onboardingTelemetryEventSchema =
|
|
20324
|
+
var onboardingTelemetryEventSchema = z60.discriminatedUnion("event", [
|
|
20224
20325
|
onboardingEventBaseSchema.extend({
|
|
20225
|
-
event:
|
|
20326
|
+
event: z60.literal("onboarding.started"),
|
|
20226
20327
|
step: onboardingStepSchema,
|
|
20227
|
-
resumed:
|
|
20328
|
+
resumed: z60.boolean()
|
|
20228
20329
|
}).strict(),
|
|
20229
20330
|
onboardingEventBaseSchema.extend({
|
|
20230
|
-
event:
|
|
20331
|
+
event: z60.literal("onboarding.step_completed"),
|
|
20231
20332
|
step: onboardingStepSchema,
|
|
20232
|
-
method:
|
|
20333
|
+
method: z60.enum(["existing", "inline", "manual", "generated", "skipped", "automatic"]),
|
|
20233
20334
|
countBucket: onboardingCountBucketSchema.optional(),
|
|
20234
20335
|
/** Set only with `step: 'finish'`: the next action the operator chose. */
|
|
20235
20336
|
nextAction: onboardingNextActionSchema.optional()
|
|
20236
20337
|
}).strict(),
|
|
20237
20338
|
onboardingEventBaseSchema.extend({
|
|
20238
|
-
event:
|
|
20339
|
+
event: z60.literal("onboarding.blocked"),
|
|
20239
20340
|
step: onboardingStepSchema,
|
|
20240
|
-
action:
|
|
20341
|
+
action: z60.enum(["continue", "configure_provider", "generate_queries", "save", "launch_run", "retry_run"]),
|
|
20241
20342
|
reasonCode: onboardingBlockReasonSchema
|
|
20242
20343
|
}).strict(),
|
|
20243
20344
|
onboardingEventBaseSchema.extend({
|
|
20244
|
-
event:
|
|
20245
|
-
origin:
|
|
20246
|
-
result:
|
|
20345
|
+
event: z60.literal("run.requested"),
|
|
20346
|
+
origin: z60.literal("dashboard_setup"),
|
|
20347
|
+
result: z60.enum(["queued", "rejected"]),
|
|
20247
20348
|
/**
|
|
20248
20349
|
* What kind of run was asked for. A site-health crawl has no providers and
|
|
20249
20350
|
* no tracked queries, so its buckets are legitimately `0`; without this
|
|
@@ -20252,7 +20353,7 @@ var onboardingTelemetryEventSchema = z59.discriminatedUnion("event", [
|
|
|
20252
20353
|
* `surface`: a documented fallback that nothing applies becomes a null
|
|
20253
20354
|
* bucket downstream.
|
|
20254
20355
|
*/
|
|
20255
|
-
kind:
|
|
20356
|
+
kind: z60.enum(["answer_visibility", "site_health"]).optional(),
|
|
20256
20357
|
providerCountBucket: onboardingCountBucketSchema,
|
|
20257
20358
|
queryCountBucket: onboardingCountBucketSchema,
|
|
20258
20359
|
reasonCode: onboardingBlockReasonSchema.optional()
|
|
@@ -20262,8 +20363,8 @@ function normalizeOnboardingEventForCollection(event) {
|
|
|
20262
20363
|
const surfaced = { ...event, surface: event.surface ?? "wizard" };
|
|
20263
20364
|
return surfaced.event === "run.requested" ? { ...surfaced, kind: surfaced.kind ?? "answer_visibility" } : surfaced;
|
|
20264
20365
|
}
|
|
20265
|
-
var telemetryEventAcceptedDtoSchema =
|
|
20266
|
-
accepted:
|
|
20366
|
+
var telemetryEventAcceptedDtoSchema = z60.object({
|
|
20367
|
+
accepted: z60.boolean()
|
|
20267
20368
|
});
|
|
20268
20369
|
var GHOST_TELEMETRY_TEST_LOCATIONS = /* @__PURE__ */ new Set(["nyc", "lax", "chi"]);
|
|
20269
20370
|
function isGhostTelemetryEvent(eventName, properties) {
|
|
@@ -20273,7 +20374,7 @@ function isGhostTelemetryEvent(eventName, properties) {
|
|
|
20273
20374
|
const location = typeof properties.location === "string" ? properties.location.trim().toLowerCase() : "";
|
|
20274
20375
|
return GHOST_TELEMETRY_TEST_LOCATIONS.has(location);
|
|
20275
20376
|
}
|
|
20276
|
-
var usageSurfaceSchema =
|
|
20377
|
+
var usageSurfaceSchema = z60.enum(["cli", "mcp-stdio", "mcp-http", "aero", "api", "dashboard"]);
|
|
20277
20378
|
var USAGE_TELEMETRY_HEADERS = {
|
|
20278
20379
|
surface: "x-canonry-surface",
|
|
20279
20380
|
agent: "x-canonry-agent",
|
|
@@ -20318,125 +20419,125 @@ function detectAgentRuntime(env) {
|
|
|
20318
20419
|
}
|
|
20319
20420
|
|
|
20320
20421
|
// ../contracts/src/operational-logs.ts
|
|
20321
|
-
import { z as
|
|
20322
|
-
var operationalLogLevelSchema =
|
|
20323
|
-
var diagnosticContextSchema =
|
|
20324
|
-
runId:
|
|
20325
|
-
projectId:
|
|
20326
|
-
requestId:
|
|
20327
|
-
actor:
|
|
20328
|
-
credentialId:
|
|
20329
|
-
userAgent:
|
|
20330
|
-
actorSession:
|
|
20331
|
-
method:
|
|
20332
|
-
route:
|
|
20333
|
-
operationId:
|
|
20334
|
-
jobId:
|
|
20335
|
-
taskId:
|
|
20336
|
-
traceId:
|
|
20337
|
-
provider:
|
|
20338
|
-
errorCode:
|
|
20339
|
-
attempt:
|
|
20340
|
-
count:
|
|
20341
|
-
total:
|
|
20342
|
-
progress:
|
|
20343
|
-
httpStatus:
|
|
20344
|
-
statusCode:
|
|
20345
|
-
durationMs:
|
|
20346
|
-
bytes:
|
|
20347
|
-
retryAfterMs:
|
|
20348
|
-
retriable:
|
|
20349
|
-
retrying:
|
|
20350
|
-
cancelled:
|
|
20351
|
-
success:
|
|
20352
|
-
}).strict();
|
|
20353
|
-
var operationalLogEntryDtoSchema =
|
|
20354
|
-
cursor:
|
|
20355
|
-
ts:
|
|
20422
|
+
import { z as z61 } from "zod";
|
|
20423
|
+
var operationalLogLevelSchema = z61.enum(["trace", "debug", "info", "warn", "error", "fatal"]);
|
|
20424
|
+
var diagnosticContextSchema = z61.object({
|
|
20425
|
+
runId: z61.string().min(1).max(256).optional(),
|
|
20426
|
+
projectId: z61.string().min(1).max(256).optional(),
|
|
20427
|
+
requestId: z61.string().min(1).max(256).optional(),
|
|
20428
|
+
actor: z61.string().min(1).max(512).optional(),
|
|
20429
|
+
credentialId: z61.string().min(1).max(512).optional(),
|
|
20430
|
+
userAgent: z61.string().min(1).max(512).optional(),
|
|
20431
|
+
actorSession: z61.string().min(1).max(512).optional(),
|
|
20432
|
+
method: z61.string().min(1).max(16).optional(),
|
|
20433
|
+
route: z61.string().min(1).max(256).optional(),
|
|
20434
|
+
operationId: z61.string().min(1).max(256).optional(),
|
|
20435
|
+
jobId: z61.string().min(1).max(256).optional(),
|
|
20436
|
+
taskId: z61.string().min(1).max(256).optional(),
|
|
20437
|
+
traceId: z61.string().min(1).max(256).optional(),
|
|
20438
|
+
provider: z61.string().min(1).max(256).optional(),
|
|
20439
|
+
errorCode: z61.string().min(1).max(128).optional(),
|
|
20440
|
+
attempt: z61.number().finite().optional(),
|
|
20441
|
+
count: z61.number().finite().optional(),
|
|
20442
|
+
total: z61.number().finite().optional(),
|
|
20443
|
+
progress: z61.number().finite().optional(),
|
|
20444
|
+
httpStatus: z61.number().finite().optional(),
|
|
20445
|
+
statusCode: z61.number().finite().optional(),
|
|
20446
|
+
durationMs: z61.number().finite().optional(),
|
|
20447
|
+
bytes: z61.number().finite().optional(),
|
|
20448
|
+
retryAfterMs: z61.number().finite().optional(),
|
|
20449
|
+
retriable: z61.boolean().optional(),
|
|
20450
|
+
retrying: z61.boolean().optional(),
|
|
20451
|
+
cancelled: z61.boolean().optional(),
|
|
20452
|
+
success: z61.boolean().optional()
|
|
20453
|
+
}).strict();
|
|
20454
|
+
var operationalLogEntryDtoSchema = z61.object({
|
|
20455
|
+
cursor: z61.string().min(1).max(512),
|
|
20456
|
+
ts: z61.string().datetime(),
|
|
20356
20457
|
level: operationalLogLevelSchema,
|
|
20357
|
-
module:
|
|
20358
|
-
action:
|
|
20359
|
-
message:
|
|
20360
|
-
runId:
|
|
20361
|
-
projectId:
|
|
20458
|
+
module: z61.string().min(1).max(256),
|
|
20459
|
+
action: z61.string().min(1).max(256),
|
|
20460
|
+
message: z61.string().max(4096).optional(),
|
|
20461
|
+
runId: z61.string().min(1).max(256).optional(),
|
|
20462
|
+
projectId: z61.string().min(1).max(256).optional(),
|
|
20362
20463
|
context: diagnosticContextSchema
|
|
20363
20464
|
}).strict();
|
|
20364
|
-
var logQuerySchema =
|
|
20465
|
+
var logQuerySchema = z61.object({
|
|
20365
20466
|
level: operationalLogLevelSchema.optional(),
|
|
20366
|
-
module:
|
|
20367
|
-
runId:
|
|
20368
|
-
projectId:
|
|
20369
|
-
actor:
|
|
20370
|
-
requestId:
|
|
20371
|
-
since:
|
|
20372
|
-
until:
|
|
20373
|
-
limit:
|
|
20374
|
-
cursor:
|
|
20467
|
+
module: z61.string().trim().min(1).max(256).optional(),
|
|
20468
|
+
runId: z61.string().trim().min(1).max(256).optional(),
|
|
20469
|
+
projectId: z61.string().trim().min(1).max(256).optional(),
|
|
20470
|
+
actor: z61.string().trim().min(1).max(512).optional(),
|
|
20471
|
+
requestId: z61.string().trim().min(1).max(256).optional(),
|
|
20472
|
+
since: z61.string().datetime().optional(),
|
|
20473
|
+
until: z61.string().datetime().optional(),
|
|
20474
|
+
limit: z61.coerce.number().int().min(1).max(200).default(100),
|
|
20475
|
+
cursor: z61.string().trim().min(1).max(512).optional()
|
|
20375
20476
|
}).strict().superRefine((query, ctx) => {
|
|
20376
20477
|
if (query.since && query.until && Date.parse(query.since) > Date.parse(query.until)) {
|
|
20377
|
-
ctx.addIssue({ code:
|
|
20478
|
+
ctx.addIssue({ code: z61.ZodIssueCode.custom, path: ["until"], message: '"until" must be on or after "since".' });
|
|
20378
20479
|
}
|
|
20379
20480
|
});
|
|
20380
|
-
var retentionPolicySchema =
|
|
20381
|
-
maxEntries:
|
|
20382
|
-
maxAgeSeconds:
|
|
20481
|
+
var retentionPolicySchema = z61.object({
|
|
20482
|
+
maxEntries: z61.number().int().positive(),
|
|
20483
|
+
maxAgeSeconds: z61.number().int().positive()
|
|
20383
20484
|
}).strict();
|
|
20384
|
-
var operationalLogListDtoSchema =
|
|
20385
|
-
entries:
|
|
20386
|
-
nextCursor:
|
|
20485
|
+
var operationalLogListDtoSchema = z61.object({
|
|
20486
|
+
entries: z61.array(operationalLogEntryDtoSchema),
|
|
20487
|
+
nextCursor: z61.string().min(1).max(512).nullable(),
|
|
20387
20488
|
/** Matching entries left after this page. */
|
|
20388
|
-
truncated:
|
|
20489
|
+
truncated: z61.number().int().nonnegative(),
|
|
20389
20490
|
/** Entries evicted by the active retention policy. */
|
|
20390
|
-
dropped:
|
|
20391
|
-
retention:
|
|
20491
|
+
dropped: z61.number().int().nonnegative(),
|
|
20492
|
+
retention: z61.enum(["process", "durable"]),
|
|
20392
20493
|
retentionPolicy: retentionPolicySchema.optional(),
|
|
20393
20494
|
/** Best-effort persistence failures observed by this store. */
|
|
20394
|
-
captureErrors:
|
|
20395
|
-
observedAt:
|
|
20495
|
+
captureErrors: z61.number().int().nonnegative().optional(),
|
|
20496
|
+
observedAt: z61.string().datetime()
|
|
20396
20497
|
}).strict();
|
|
20397
20498
|
var OPERATIONAL_LOG_FIELDS_HEADER = "x-canonry-log-fields";
|
|
20398
20499
|
var OPERATIONAL_LOG_OPT_IN_CONTEXT_FIELDS = ["provider"];
|
|
20399
|
-
var diagnosticContextReadSchema =
|
|
20400
|
-
var operationalLogEntryReadSchema =
|
|
20401
|
-
var operationalLogListReadSchema =
|
|
20500
|
+
var diagnosticContextReadSchema = z61.object(diagnosticContextSchema.shape);
|
|
20501
|
+
var operationalLogEntryReadSchema = z61.object({ ...operationalLogEntryDtoSchema.shape, context: diagnosticContextReadSchema });
|
|
20502
|
+
var operationalLogListReadSchema = z61.object({
|
|
20402
20503
|
...operationalLogListDtoSchema.shape,
|
|
20403
|
-
entries:
|
|
20404
|
-
retentionPolicy:
|
|
20504
|
+
entries: z61.array(operationalLogEntryReadSchema),
|
|
20505
|
+
retentionPolicy: z61.object(retentionPolicySchema.shape).optional()
|
|
20405
20506
|
});
|
|
20406
20507
|
|
|
20407
20508
|
// ../contracts/src/referral-assessment.ts
|
|
20408
|
-
import { z as
|
|
20409
|
-
var referralAssessmentQuerySchema =
|
|
20509
|
+
import { z as z62 } from "zod";
|
|
20510
|
+
var referralAssessmentQuerySchema = z62.object({
|
|
20410
20511
|
startDate: calendarDateSchema,
|
|
20411
20512
|
endDate: calendarDateSchema,
|
|
20412
|
-
sourceId:
|
|
20413
|
-
burstThreshold:
|
|
20414
|
-
ratioThreshold:
|
|
20415
|
-
limit:
|
|
20416
|
-
}).strict();
|
|
20417
|
-
var countsSchema =
|
|
20418
|
-
total:
|
|
20419
|
-
paid:
|
|
20420
|
-
organic:
|
|
20421
|
-
unknown:
|
|
20422
|
-
});
|
|
20423
|
-
var referralAssessmentSchema =
|
|
20424
|
-
scope:
|
|
20425
|
-
project:
|
|
20426
|
-
sourceId:
|
|
20427
|
-
attribution:
|
|
20428
|
-
unavailableDimensions:
|
|
20513
|
+
sourceId: z62.string().trim().min(1).optional(),
|
|
20514
|
+
burstThreshold: z62.number().int().min(1).max(1e6).optional(),
|
|
20515
|
+
ratioThreshold: z62.number().min(1).max(1e3).optional(),
|
|
20516
|
+
limit: z62.number().int().min(1).max(500).optional()
|
|
20517
|
+
}).strict();
|
|
20518
|
+
var countsSchema = z62.object({
|
|
20519
|
+
total: z62.number().int().nonnegative(),
|
|
20520
|
+
paid: z62.number().int().nonnegative(),
|
|
20521
|
+
organic: z62.number().int().nonnegative(),
|
|
20522
|
+
unknown: z62.number().int().nonnegative()
|
|
20523
|
+
});
|
|
20524
|
+
var referralAssessmentSchema = z62.object({
|
|
20525
|
+
scope: z62.object({
|
|
20526
|
+
project: z62.string(),
|
|
20527
|
+
sourceId: z62.string().nullable(),
|
|
20528
|
+
attribution: z62.literal("project-source-only"),
|
|
20529
|
+
unavailableDimensions: z62.array(z62.enum(["property", "target", "market"]))
|
|
20429
20530
|
}),
|
|
20430
|
-
window:
|
|
20431
|
-
rule:
|
|
20432
|
-
version:
|
|
20433
|
-
burstThreshold:
|
|
20434
|
-
ratioThreshold:
|
|
20435
|
-
calibration:
|
|
20436
|
-
grouping:
|
|
20437
|
-
confirmsAutomation:
|
|
20531
|
+
window: z62.object({ startDate: calendarDateSchema, endDate: calendarDateSchema, timeZone: z62.literal("UTC") }),
|
|
20532
|
+
rule: z62.object({
|
|
20533
|
+
version: z62.literal("hourly-normalized-path-v1"),
|
|
20534
|
+
burstThreshold: z62.number().int().positive(),
|
|
20535
|
+
ratioThreshold: z62.number().positive(),
|
|
20536
|
+
calibration: z62.enum(["uncalibrated-default", "request-override"]),
|
|
20537
|
+
grouping: z62.array(z62.string()),
|
|
20538
|
+
confirmsAutomation: z62.literal(false)
|
|
20438
20539
|
}),
|
|
20439
|
-
totals:
|
|
20540
|
+
totals: z62.object({
|
|
20440
20541
|
raw: countsSchema,
|
|
20441
20542
|
redirects: countsSchema,
|
|
20442
20543
|
subresources: countsSchema,
|
|
@@ -20444,58 +20545,58 @@ var referralAssessmentSchema = z61.object({
|
|
|
20444
20545
|
suspected: countsSchema,
|
|
20445
20546
|
adjustedEstimate: countsSchema
|
|
20446
20547
|
}),
|
|
20447
|
-
bursts:
|
|
20448
|
-
sourceId:
|
|
20449
|
-
product:
|
|
20450
|
-
landingPathNormalized:
|
|
20451
|
-
tsHour:
|
|
20548
|
+
bursts: z62.array(z62.object({
|
|
20549
|
+
sourceId: z62.string(),
|
|
20550
|
+
product: z62.string(),
|
|
20551
|
+
landingPathNormalized: z62.string(),
|
|
20552
|
+
tsHour: z62.string(),
|
|
20452
20553
|
counts: countsSchema
|
|
20453
20554
|
})),
|
|
20454
|
-
evidence:
|
|
20455
|
-
comparison:
|
|
20456
|
-
status:
|
|
20457
|
-
serverCountable:
|
|
20458
|
-
serverObservation:
|
|
20555
|
+
evidence: z62.object({ total: z62.number().int().nonnegative(), returned: z62.number().int().nonnegative(), truncated: z62.boolean() }),
|
|
20556
|
+
comparison: z62.object({
|
|
20557
|
+
status: z62.literal("unavailable"),
|
|
20558
|
+
serverCountable: z62.number().int().nonnegative(),
|
|
20559
|
+
serverObservation: z62.enum(["missing", "observed-zero", "observed-positive"]),
|
|
20459
20560
|
/**
|
|
20460
20561
|
* Dimension-deduplicated GA AI sessions. With no stored AI row in the
|
|
20461
20562
|
* window: `0` (`observed-zero`) when the latest GA sync queried the whole
|
|
20462
20563
|
* window (GA4 omits zero rows), else `null` (`missing`).
|
|
20463
20564
|
*/
|
|
20464
|
-
gaSessions:
|
|
20465
|
-
gaObservation:
|
|
20565
|
+
gaSessions: z62.number().int().nonnegative().nullable(),
|
|
20566
|
+
gaObservation: z62.enum(["missing", "observed-zero", "observed-positive"]),
|
|
20466
20567
|
/**
|
|
20467
20568
|
* Descriptive quotient only (`serverCountable / gaSessions`, a multiplier
|
|
20468
20569
|
* where 3 is three times as many, never a percent), rounded to 2
|
|
20469
20570
|
* decimals. Not a matched, coverage-complete comparison.
|
|
20470
20571
|
*/
|
|
20471
|
-
observedRatio:
|
|
20572
|
+
observedRatio: z62.number().nonnegative().nullable(),
|
|
20472
20573
|
/** Compares the rounded `observedRatio` with `rule.ratioThreshold`. */
|
|
20473
|
-
observedRatioAboveThreshold:
|
|
20474
|
-
ratio:
|
|
20475
|
-
reasons:
|
|
20476
|
-
gaScope:
|
|
20574
|
+
observedRatioAboveThreshold: z62.boolean().nullable(),
|
|
20575
|
+
ratio: z62.null(),
|
|
20576
|
+
reasons: z62.array(z62.string()),
|
|
20577
|
+
gaScope: z62.literal("project")
|
|
20477
20578
|
}),
|
|
20478
|
-
caveats:
|
|
20579
|
+
caveats: z62.array(z62.string())
|
|
20479
20580
|
});
|
|
20480
20581
|
|
|
20481
20582
|
// ../contracts/src/traffic-analytics.ts
|
|
20482
|
-
import { z as
|
|
20583
|
+
import { z as z63 } from "zod";
|
|
20483
20584
|
var TRAFFIC_ANALYTICS_PERIOD_OPTIONS = windowDayValues(WINDOW_SETS.trafficAnalytics);
|
|
20484
|
-
var trafficAnalyticsPeriodSchema =
|
|
20585
|
+
var trafficAnalyticsPeriodSchema = z63.union(TRAFFIC_ANALYTICS_PERIOD_OPTIONS.map((value) => z63.literal(value))).describe("Traffic activity window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");
|
|
20485
20586
|
function parseTrafficAnalyticsPeriod(value) {
|
|
20486
20587
|
return windowDays(parseWindowIn(value, WINDOW_SETS.trafficAnalytics, { field: "period", fallback: "30d" }));
|
|
20487
20588
|
}
|
|
20488
|
-
var trafficActivityCountSchema =
|
|
20489
|
-
var trafficActivitySummarySchema =
|
|
20589
|
+
var trafficActivityCountSchema = z63.object({ current: z63.number(), prior: z63.number(), deltaPct: percent().nullable() });
|
|
20590
|
+
var trafficActivitySummarySchema = z63.object({
|
|
20490
20591
|
/** ISO8601 inclusive lower bound of the selected window (default: 30 days). */
|
|
20491
|
-
windowStart:
|
|
20592
|
+
windowStart: z63.string(),
|
|
20492
20593
|
/** ISO8601 inclusive upper bound. */
|
|
20493
|
-
windowEnd:
|
|
20594
|
+
windowEnd: z63.string(),
|
|
20494
20595
|
/** Earliest stored project observation across crawler, user-fetch and referral hourly rows; not window-bound. */
|
|
20495
|
-
coverageStart:
|
|
20596
|
+
coverageStart: z63.string().nullable(),
|
|
20496
20597
|
/** Recording began on or before the prior window start. This does not establish uninterrupted ingestion. */
|
|
20497
|
-
priorWindowComplete:
|
|
20498
|
-
hasData:
|
|
20598
|
+
priorWindowComplete: z63.boolean(),
|
|
20599
|
+
hasData: z63.boolean().describe("True when the selected or prior window has stored crawler, user-fetch, countable referral or operator evidence, or the selected window has referral redirects. False means no qualifying stored evidence; it can occur with no, paused, errored or never-synced ingestion and out-of-window observations. It does not establish measured zero traffic or source health."),
|
|
20499
20600
|
/** Verified crawler hits during the selected period and the equal preceding period. */
|
|
20500
20601
|
verifiedCrawlerHits: trafficActivityCountSchema,
|
|
20501
20602
|
/** Unverified crawler hits during the selected period, separate from verified hits. */
|
|
@@ -20524,7 +20625,7 @@ var trafficActivitySummarySchema = z62.object({
|
|
|
20524
20625
|
* is exactly the thing to fix, so the summary must show it rather
|
|
20525
20626
|
* than render an empty section.
|
|
20526
20627
|
*/
|
|
20527
|
-
referralRedirects:
|
|
20628
|
+
referralRedirects: z63.number().int().nonnegative(),
|
|
20528
20629
|
/**
|
|
20529
20630
|
* `referralArrivals` split by traffic class. The three buckets sum to it.
|
|
20530
20631
|
*
|
|
@@ -20533,31 +20634,31 @@ var trafficActivitySummarySchema = z62.object({
|
|
|
20533
20634
|
* never be resolved. Reporting them as organic would overstate earned AI
|
|
20534
20635
|
* traffic by exactly a client's ad volume.
|
|
20535
20636
|
*/
|
|
20536
|
-
referralArrivalsByClass:
|
|
20637
|
+
referralArrivalsByClass: z63.object({
|
|
20537
20638
|
paid: trafficActivityCountSchema,
|
|
20538
20639
|
organic: trafficActivityCountSchema,
|
|
20539
20640
|
unclassified: trafficActivityCountSchema
|
|
20540
20641
|
}),
|
|
20541
20642
|
/** Pre-rendered one-line breakdown, e.g. "Paid 1,200 · Organic 24". Empty when there is nothing to split. */
|
|
20542
|
-
referralArrivalsClassSummary:
|
|
20643
|
+
referralArrivalsClassSummary: z63.string(),
|
|
20543
20644
|
/** Per-AI-operator breakdown (OpenAI, Anthropic, Google AI, Perplexity, …). */
|
|
20544
|
-
byOperator:
|
|
20545
|
-
operator:
|
|
20546
|
-
verifiedHits:
|
|
20645
|
+
byOperator: z63.array(z63.object({
|
|
20646
|
+
operator: z63.string(),
|
|
20647
|
+
verifiedHits: z63.number(),
|
|
20547
20648
|
/** claimed-bot UA, source IP not in a published range. */
|
|
20548
|
-
unverifiedHits:
|
|
20649
|
+
unverifiedHits: z63.number(),
|
|
20549
20650
|
/** Per-user fetches from this operator's AI surface (ChatGPT-User, …). */
|
|
20550
|
-
userFetchHits:
|
|
20551
|
-
referralArrivals:
|
|
20651
|
+
userFetchHits: z63.number(),
|
|
20652
|
+
referralArrivals: z63.number(),
|
|
20552
20653
|
deltaPct: percent().nullable()
|
|
20553
20654
|
})),
|
|
20554
20655
|
/**
|
|
20555
20656
|
* Top crawled paths during the selected period, with both verified and
|
|
20556
20657
|
* unverified crawler hits. These are request counts, not citation evidence.
|
|
20557
20658
|
*/
|
|
20558
|
-
topCrawledPaths:
|
|
20559
|
-
path:
|
|
20560
|
-
verifiedHits:
|
|
20659
|
+
topCrawledPaths: z63.array(z63.object({
|
|
20660
|
+
path: z63.string(),
|
|
20661
|
+
verifiedHits: z63.number(),
|
|
20561
20662
|
/**
|
|
20562
20663
|
* Hits from a crawler that identified itself but whose source IP could not
|
|
20563
20664
|
* be matched against the operator's published ranges. Additive, not an
|
|
@@ -20565,36 +20666,36 @@ var trafficActivitySummarySchema = z62.object({
|
|
|
20565
20666
|
* logs, for one), so for those projects every hit lands here and a
|
|
20566
20667
|
* verified-only view reports zero against real crawl activity.
|
|
20567
20668
|
*/
|
|
20568
|
-
unverifiedHits:
|
|
20669
|
+
unverifiedHits: z63.number().default(0),
|
|
20569
20670
|
/** How many distinct AI operators crawled this path in the window. */
|
|
20570
|
-
distinctOperators:
|
|
20671
|
+
distinctOperators: z63.number()
|
|
20571
20672
|
})),
|
|
20572
20673
|
/** AI products that sent ≥1 session in the window (referral by destination). */
|
|
20573
|
-
referralProducts:
|
|
20574
|
-
product:
|
|
20575
|
-
arrivals:
|
|
20576
|
-
distinctLandingPaths:
|
|
20674
|
+
referralProducts: z63.array(z63.object({
|
|
20675
|
+
product: z63.string(),
|
|
20676
|
+
arrivals: z63.number(),
|
|
20677
|
+
distinctLandingPaths: z63.number()
|
|
20577
20678
|
})),
|
|
20578
20679
|
/** Daily request counts during the selected period. */
|
|
20579
|
-
dailyTrend:
|
|
20580
|
-
date:
|
|
20581
|
-
verifiedCrawlerHits:
|
|
20680
|
+
dailyTrend: z63.array(z63.object({
|
|
20681
|
+
date: z63.string(),
|
|
20682
|
+
verifiedCrawlerHits: z63.number(),
|
|
20582
20683
|
/** See topCrawledPaths.unverifiedHits. Plotted alongside, never instead. */
|
|
20583
|
-
unverifiedCrawlerHits:
|
|
20584
|
-
userFetchHits:
|
|
20585
|
-
referralArrivals:
|
|
20684
|
+
unverifiedCrawlerHits: z63.number().default(0),
|
|
20685
|
+
userFetchHits: z63.number(),
|
|
20686
|
+
referralArrivals: z63.number()
|
|
20586
20687
|
})),
|
|
20587
20688
|
/**
|
|
20588
20689
|
* Top landing paths for AI-referral sessions during the selected period.
|
|
20589
20690
|
* Complements crawler paths with server-observed referral arrivals.
|
|
20590
20691
|
*/
|
|
20591
|
-
topReferralLandingPaths:
|
|
20592
|
-
path:
|
|
20593
|
-
arrivals:
|
|
20594
|
-
distinctProducts:
|
|
20692
|
+
topReferralLandingPaths: z63.array(z63.object({
|
|
20693
|
+
path: z63.string(),
|
|
20694
|
+
arrivals: z63.number(),
|
|
20695
|
+
distinctProducts: z63.number()
|
|
20595
20696
|
}))
|
|
20596
20697
|
});
|
|
20597
|
-
var trafficAnalyticsResponseSchema =
|
|
20698
|
+
var trafficAnalyticsResponseSchema = z63.object({
|
|
20598
20699
|
/** Null when no non-archived traffic source is connected. Connected sources without events return zero counts. */
|
|
20599
20700
|
activity: trafficActivitySummarySchema.nullable()
|
|
20600
20701
|
});
|
|
@@ -20614,18 +20715,18 @@ function uncheckedSourcesLabel(value) {
|
|
|
20614
20715
|
}
|
|
20615
20716
|
|
|
20616
20717
|
// ../contracts/src/api-keys.ts
|
|
20617
|
-
import { z as
|
|
20618
|
-
var apiKeyDtoSchema =
|
|
20619
|
-
id:
|
|
20620
|
-
name:
|
|
20718
|
+
import { z as z64 } from "zod";
|
|
20719
|
+
var apiKeyDtoSchema = z64.object({
|
|
20720
|
+
id: z64.string(),
|
|
20721
|
+
name: z64.string(),
|
|
20621
20722
|
/** First 9 chars of the raw token (`cnry_` + 4 hex). Safe to display. */
|
|
20622
|
-
keyPrefix:
|
|
20623
|
-
scopes:
|
|
20723
|
+
keyPrefix: z64.string(),
|
|
20724
|
+
scopes: z64.array(z64.string()),
|
|
20624
20725
|
/**
|
|
20625
20726
|
* The project this key is scoped to, or `null` for a full-instance key. A
|
|
20626
20727
|
* scoped key may only read/write its own project (enforced server-side).
|
|
20627
20728
|
*/
|
|
20628
|
-
projectId:
|
|
20729
|
+
projectId: z64.string().nullable(),
|
|
20629
20730
|
/**
|
|
20630
20731
|
* The scoped project's name, or `null` for a full-instance key. Resolved
|
|
20631
20732
|
* server-side so a surface listing keys does not have to fetch every project
|
|
@@ -20633,89 +20734,89 @@ var apiKeyDtoSchema = z63.object({
|
|
|
20633
20734
|
* "is this key safe to hand to someone", which is the question the list is
|
|
20634
20735
|
* usually open to answer. Additive field.
|
|
20635
20736
|
*/
|
|
20636
|
-
projectName:
|
|
20737
|
+
projectName: z64.string().nullable(),
|
|
20637
20738
|
/**
|
|
20638
20739
|
* Server-derived convenience flag: `true` when this key is read-only (carries
|
|
20639
20740
|
* the `read` scope and no write-granting scope), in which case the API rejects
|
|
20640
20741
|
* every write HTTP method for it. Derived from `scopes` via `isReadOnlyKey`
|
|
20641
20742
|
* — surfaces don't recompute it (see the UI/CLI parity rule). Additive field.
|
|
20642
20743
|
*/
|
|
20643
|
-
readOnly:
|
|
20744
|
+
readOnly: z64.boolean(),
|
|
20644
20745
|
/** Present on /keys/self: host-derived direct-bearer authority, never a mintable scope. */
|
|
20645
|
-
operator:
|
|
20646
|
-
createdAt:
|
|
20647
|
-
lastUsedAt:
|
|
20648
|
-
revokedAt:
|
|
20746
|
+
operator: z64.boolean().optional(),
|
|
20747
|
+
createdAt: z64.string(),
|
|
20748
|
+
lastUsedAt: z64.string().nullable(),
|
|
20749
|
+
revokedAt: z64.string().nullable()
|
|
20649
20750
|
});
|
|
20650
|
-
var apiKeyListDtoSchema =
|
|
20651
|
-
keys:
|
|
20751
|
+
var apiKeyListDtoSchema = z64.object({
|
|
20752
|
+
keys: z64.array(apiKeyDtoSchema)
|
|
20652
20753
|
});
|
|
20653
|
-
var createApiKeyRequestSchema =
|
|
20654
|
-
name:
|
|
20754
|
+
var createApiKeyRequestSchema = z64.object({
|
|
20755
|
+
name: z64.string().min(1).max(100),
|
|
20655
20756
|
/**
|
|
20656
20757
|
* Scopes granted to the new key. Omit to default to `['*']` (full access,
|
|
20657
20758
|
* what `canonry init` writes for the root key). When provided it must be a
|
|
20658
20759
|
* non-empty list — an empty array would mint a key that can do nothing.
|
|
20659
20760
|
*/
|
|
20660
|
-
scopes:
|
|
20761
|
+
scopes: z64.array(z64.string()).min(1).optional(),
|
|
20661
20762
|
/**
|
|
20662
20763
|
* Bind the new key to a SINGLE project (by project id). Omit for a
|
|
20663
20764
|
* full-instance key (the default). A scoped key may only read/write that
|
|
20664
20765
|
* project; the server validates the id exists at creation time.
|
|
20665
20766
|
*/
|
|
20666
|
-
projectId:
|
|
20767
|
+
projectId: z64.string().optional()
|
|
20667
20768
|
});
|
|
20668
20769
|
var createdApiKeyDtoSchema = apiKeyDtoSchema.extend({
|
|
20669
|
-
key:
|
|
20770
|
+
key: z64.string()
|
|
20670
20771
|
});
|
|
20671
20772
|
|
|
20672
20773
|
// ../contracts/src/config-schema.ts
|
|
20673
|
-
import { z as
|
|
20774
|
+
import { z as z66 } from "zod";
|
|
20674
20775
|
|
|
20675
20776
|
// ../contracts/src/schedule.ts
|
|
20676
|
-
import { z as
|
|
20677
|
-
var schedulableRunKindSchema =
|
|
20777
|
+
import { z as z65 } from "zod";
|
|
20778
|
+
var schedulableRunKindSchema = z65.enum(["answer-visibility", "traffic-sync", "gbp-sync", "data-refresh", "backlinks-sync", "site-audit", "ads-sync", "doctor"]);
|
|
20678
20779
|
var SchedulableRunKinds = schedulableRunKindSchema.enum;
|
|
20679
|
-
var calendarRecurrenceSchema =
|
|
20680
|
-
everyDays:
|
|
20681
|
-
startDate:
|
|
20682
|
-
time:
|
|
20683
|
-
}).strict();
|
|
20684
|
-
var scheduleDtoSchema =
|
|
20685
|
-
id:
|
|
20686
|
-
projectId:
|
|
20780
|
+
var calendarRecurrenceSchema = z65.object({
|
|
20781
|
+
everyDays: z65.number().int().min(1).max(3650),
|
|
20782
|
+
startDate: z65.string().date(),
|
|
20783
|
+
time: z65.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "Time must be HH:mm")
|
|
20784
|
+
}).strict();
|
|
20785
|
+
var scheduleDtoSchema = z65.object({
|
|
20786
|
+
id: z65.string(),
|
|
20787
|
+
projectId: z65.string(),
|
|
20687
20788
|
/** Run kind dispatched when this schedule fires. Defaults to 'answer-visibility' for legacy rows. */
|
|
20688
20789
|
kind: schedulableRunKindSchema,
|
|
20689
20790
|
/** Empty for calendar recurrence schedules. */
|
|
20690
|
-
cronExpr:
|
|
20791
|
+
cronExpr: z65.string(),
|
|
20691
20792
|
recurrence: calendarRecurrenceSchema.nullable().optional(),
|
|
20692
|
-
preset:
|
|
20693
|
-
timezone:
|
|
20694
|
-
enabled:
|
|
20695
|
-
providers:
|
|
20793
|
+
preset: z65.string().nullable().optional(),
|
|
20794
|
+
timezone: z65.string().default("UTC"),
|
|
20795
|
+
enabled: z65.boolean().default(true),
|
|
20796
|
+
providers: z65.array(providerNameSchema).default([]),
|
|
20696
20797
|
/** Traffic-source UUID for `kind === 'traffic-sync'` schedules. Null otherwise. */
|
|
20697
|
-
sourceId:
|
|
20698
|
-
lastRunAt:
|
|
20699
|
-
nextRunAt:
|
|
20700
|
-
createdAt:
|
|
20701
|
-
updatedAt:
|
|
20798
|
+
sourceId: z65.string().nullable().optional(),
|
|
20799
|
+
lastRunAt: z65.string().nullable().optional(),
|
|
20800
|
+
nextRunAt: z65.string().nullable().optional(),
|
|
20801
|
+
createdAt: z65.string(),
|
|
20802
|
+
updatedAt: z65.string()
|
|
20702
20803
|
});
|
|
20703
|
-
var scheduleExpectedUpdatedAtSchema =
|
|
20804
|
+
var scheduleExpectedUpdatedAtSchema = z65.string().datetime();
|
|
20704
20805
|
function nextScheduleUpdatedAt(previous, nowMs = Date.now()) {
|
|
20705
20806
|
const previousMs = previous === void 0 ? Number.NaN : Date.parse(previous);
|
|
20706
20807
|
return new Date(Number.isFinite(previousMs) ? Math.max(nowMs, previousMs + 1) : nowMs).toISOString();
|
|
20707
20808
|
}
|
|
20708
|
-
var scheduleUpsertRequestSchema =
|
|
20809
|
+
var scheduleUpsertRequestSchema = z65.object({
|
|
20709
20810
|
/** Run kind. Defaults to 'answer-visibility' so existing callers don't have to change. */
|
|
20710
20811
|
kind: schedulableRunKindSchema.optional(),
|
|
20711
|
-
preset:
|
|
20712
|
-
cron:
|
|
20812
|
+
preset: z65.string().min(1).optional(),
|
|
20813
|
+
cron: z65.string().min(1).optional(),
|
|
20713
20814
|
recurrence: calendarRecurrenceSchema.optional(),
|
|
20714
|
-
timezone:
|
|
20715
|
-
enabled:
|
|
20716
|
-
providers:
|
|
20815
|
+
timezone: z65.string().optional().default("UTC"),
|
|
20816
|
+
enabled: z65.boolean().optional().default(true),
|
|
20817
|
+
providers: z65.array(providerNameSchema).optional().default([]),
|
|
20717
20818
|
/** Required when kind === 'traffic-sync'. Forbidden for other kinds. Validated server-side. */
|
|
20718
|
-
sourceId:
|
|
20819
|
+
sourceId: z65.string().optional(),
|
|
20719
20820
|
/**
|
|
20720
20821
|
* Optimistic concurrency guard. A timestamp updates only that exact version;
|
|
20721
20822
|
* null creates only while the schedule is absent. Omit for legacy behavior.
|
|
@@ -20727,18 +20828,18 @@ var scheduleUpsertRequestSchema = z64.object({
|
|
|
20727
20828
|
);
|
|
20728
20829
|
|
|
20729
20830
|
// ../contracts/src/config-schema.ts
|
|
20730
|
-
var configMetadataSchema =
|
|
20731
|
-
name:
|
|
20831
|
+
var configMetadataSchema = z66.object({
|
|
20832
|
+
name: z66.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/, {
|
|
20732
20833
|
message: "Name must be a lowercase slug (letters, numbers, hyphens)"
|
|
20733
20834
|
}),
|
|
20734
|
-
labels:
|
|
20835
|
+
labels: z66.record(z66.string(), z66.string()).optional().default({})
|
|
20735
20836
|
});
|
|
20736
|
-
var configScheduleObjectSchema =
|
|
20737
|
-
preset:
|
|
20738
|
-
cron:
|
|
20837
|
+
var configScheduleObjectSchema = z66.object({
|
|
20838
|
+
preset: z66.string().min(1).optional(),
|
|
20839
|
+
cron: z66.string().min(1).optional(),
|
|
20739
20840
|
recurrence: calendarRecurrenceSchema.optional(),
|
|
20740
|
-
timezone:
|
|
20741
|
-
providers:
|
|
20841
|
+
timezone: z66.string().optional().default("UTC"),
|
|
20842
|
+
providers: z66.array(providerNameSchema).optional().default([]),
|
|
20742
20843
|
/**
|
|
20743
20844
|
* Whether the schedule fires. Omit to leave an existing schedule's state
|
|
20744
20845
|
* alone — a schedule paused from the dashboard or the API stays paused
|
|
@@ -20746,59 +20847,59 @@ var configScheduleObjectSchema = z65.object({
|
|
|
20746
20847
|
* someone deliberately stopped. A schedule created by this apply defaults
|
|
20747
20848
|
* to enabled.
|
|
20748
20849
|
*/
|
|
20749
|
-
enabled:
|
|
20850
|
+
enabled: z66.boolean().optional()
|
|
20750
20851
|
});
|
|
20751
20852
|
function hasOneScheduleTiming(schedule) {
|
|
20752
20853
|
return [schedule.preset, schedule.cron, schedule.recurrence].filter((value) => value !== void 0).length === 1;
|
|
20753
20854
|
}
|
|
20754
20855
|
var oneScheduleTimingMessage = { message: 'Exactly one of "preset", "cron", or "recurrence" must be provided' };
|
|
20755
20856
|
var configScheduleSchema = configScheduleObjectSchema.refine(hasOneScheduleTiming, oneScheduleTimingMessage).optional();
|
|
20756
|
-
var configNotificationSchema =
|
|
20757
|
-
id:
|
|
20758
|
-
channel:
|
|
20759
|
-
url:
|
|
20760
|
-
events:
|
|
20761
|
-
});
|
|
20762
|
-
var configGoogleSchema =
|
|
20763
|
-
gsc:
|
|
20764
|
-
propertyUrl:
|
|
20857
|
+
var configNotificationSchema = z66.object({
|
|
20858
|
+
id: z66.string().min(1).optional(),
|
|
20859
|
+
channel: z66.literal("webhook"),
|
|
20860
|
+
url: z66.string().url(),
|
|
20861
|
+
events: z66.array(notificationEventSchema).min(1)
|
|
20862
|
+
});
|
|
20863
|
+
var configGoogleSchema = z66.object({
|
|
20864
|
+
gsc: z66.object({
|
|
20865
|
+
propertyUrl: z66.string()
|
|
20765
20866
|
}).optional(),
|
|
20766
|
-
syncSchedule:
|
|
20767
|
-
preset:
|
|
20768
|
-
cron:
|
|
20867
|
+
syncSchedule: z66.object({
|
|
20868
|
+
preset: z66.string().optional(),
|
|
20869
|
+
cron: z66.string().optional()
|
|
20769
20870
|
}).optional()
|
|
20770
20871
|
}).optional();
|
|
20771
|
-
var configQueryListSchema =
|
|
20872
|
+
var configQueryListSchema = z66.array(z66.string().min(1));
|
|
20772
20873
|
var configSpecShape = {
|
|
20773
|
-
displayName:
|
|
20774
|
-
canonicalDomain:
|
|
20775
|
-
ownedDomains:
|
|
20776
|
-
aliases:
|
|
20874
|
+
displayName: z66.string().min(1),
|
|
20875
|
+
canonicalDomain: z66.string().min(1),
|
|
20876
|
+
ownedDomains: z66.array(z66.string().min(1)).optional().default([]),
|
|
20877
|
+
aliases: z66.array(z66.string().min(1)).optional().default([]),
|
|
20777
20878
|
// No default on purpose: an apply that omits it keeps the project's stored
|
|
20778
20879
|
// list, minus names that no longer qualify against this spec's `aliases`,
|
|
20779
20880
|
// display name and competitors. Each entry must be an alias.
|
|
20780
|
-
qualifiedAliases:
|
|
20781
|
-
country:
|
|
20782
|
-
language:
|
|
20881
|
+
qualifiedAliases: z66.array(z66.string().min(1).max(PROJECT_QUALIFIED_ALIAS_MAX_LENGTH)).max(PROJECT_QUALIFIED_ALIAS_LIMIT).optional(),
|
|
20882
|
+
country: z66.string().length(2),
|
|
20883
|
+
language: z66.string().min(2),
|
|
20783
20884
|
queries: configQueryListSchema.optional(),
|
|
20784
20885
|
keywords: configQueryListSchema.optional(),
|
|
20785
20886
|
// Each entry is a bare domain or `{ domain, aliases }`. A bare domain (or an
|
|
20786
20887
|
// object without `aliases`) keeps that competitor's stored aliases on apply;
|
|
20787
20888
|
// `aliases` sets them exactly (`[]` clears). The domain set itself is still
|
|
20788
20889
|
// replaced by this list.
|
|
20789
|
-
competitors:
|
|
20790
|
-
providers:
|
|
20890
|
+
competitors: z66.array(competitorEntrySchema).optional().default([]),
|
|
20891
|
+
providers: z66.array(providerNameSchema).optional().default([]),
|
|
20791
20892
|
providerModels: providerModelsSchema.optional().default({}),
|
|
20792
20893
|
// No default on purpose: an apply that omits it leaves the project's stored
|
|
20793
20894
|
// preference alone, the same rule as `queries`.
|
|
20794
20895
|
providerDispatchModes: providerDispatchModesSchema.optional(),
|
|
20795
|
-
locations:
|
|
20796
|
-
defaultLocation:
|
|
20896
|
+
locations: z66.array(locationContextSchema).optional().default([]),
|
|
20897
|
+
defaultLocation: z66.string().optional(),
|
|
20797
20898
|
measurement: measurementConfigSchema.optional().default(defaultMeasurementConfig),
|
|
20798
20899
|
schedule: configScheduleSchema,
|
|
20799
|
-
notifications:
|
|
20900
|
+
notifications: z66.array(configNotificationSchema).optional().default([]),
|
|
20800
20901
|
google: configGoogleSchema,
|
|
20801
|
-
autoExtractBacklinks:
|
|
20902
|
+
autoExtractBacklinks: z66.boolean().optional().default(false),
|
|
20802
20903
|
/** Highest star rating that counts as a negative Google review (1-4). Omitted means the default of 3. */
|
|
20803
20904
|
negativeReviewMaxStars: gbpNegativeReviewMaxStarsSchema.optional(),
|
|
20804
20905
|
/**
|
|
@@ -20838,20 +20939,20 @@ function checkConfigSpec(spec, ctx) {
|
|
|
20838
20939
|
});
|
|
20839
20940
|
}
|
|
20840
20941
|
}
|
|
20841
|
-
var configSpecSchema =
|
|
20842
|
-
var projectConfigSchema =
|
|
20843
|
-
apiVersion:
|
|
20844
|
-
kind:
|
|
20942
|
+
var configSpecSchema = z66.object(configSpecShape).superRefine(checkConfigSpec);
|
|
20943
|
+
var projectConfigSchema = z66.object({
|
|
20944
|
+
apiVersion: z66.literal("canonry/v1"),
|
|
20945
|
+
kind: z66.literal("Project"),
|
|
20845
20946
|
metadata: configMetadataSchema,
|
|
20846
20947
|
spec: configSpecSchema
|
|
20847
20948
|
});
|
|
20848
20949
|
var projectConfigExportSchema = projectConfigSchema.extend({
|
|
20849
|
-
spec:
|
|
20950
|
+
spec: z66.object({
|
|
20850
20951
|
...configSpecShape,
|
|
20851
20952
|
queries: configQueryListSchema,
|
|
20852
20953
|
providerModels: providerModelsSchema.optional(),
|
|
20853
|
-
schedule: configScheduleObjectSchema.extend({ enabled:
|
|
20854
|
-
autoExtractBacklinks:
|
|
20954
|
+
schedule: configScheduleObjectSchema.extend({ enabled: z66.boolean() }).refine(hasOneScheduleTiming, oneScheduleTimingMessage).optional(),
|
|
20955
|
+
autoExtractBacklinks: z66.boolean().optional()
|
|
20855
20956
|
}).superRefine(checkConfigSpec)
|
|
20856
20957
|
});
|
|
20857
20958
|
function resolveConfigSpecQueries(spec) {
|
|
@@ -20859,134 +20960,134 @@ function resolveConfigSpecQueries(spec) {
|
|
|
20859
20960
|
}
|
|
20860
20961
|
|
|
20861
20962
|
// ../contracts/src/config-diff.ts
|
|
20862
|
-
import { z as
|
|
20963
|
+
import { z as z67 } from "zod";
|
|
20863
20964
|
function fieldChangeSchema(schema) {
|
|
20864
|
-
return
|
|
20865
|
-
}
|
|
20866
|
-
var projectFieldsStateSchema =
|
|
20867
|
-
displayName:
|
|
20868
|
-
canonicalDomain:
|
|
20869
|
-
ownedDomains:
|
|
20870
|
-
aliases:
|
|
20871
|
-
qualifiedAliases:
|
|
20872
|
-
country:
|
|
20873
|
-
language:
|
|
20874
|
-
labels:
|
|
20875
|
-
providers:
|
|
20965
|
+
return z67.object({ before: schema.nullable(), after: schema.nullable() });
|
|
20966
|
+
}
|
|
20967
|
+
var projectFieldsStateSchema = z67.object({
|
|
20968
|
+
displayName: z67.string().optional(),
|
|
20969
|
+
canonicalDomain: z67.string().optional(),
|
|
20970
|
+
ownedDomains: z67.array(z67.string()).optional(),
|
|
20971
|
+
aliases: z67.array(z67.string()).optional(),
|
|
20972
|
+
qualifiedAliases: z67.array(z67.string()).optional(),
|
|
20973
|
+
country: z67.string().optional(),
|
|
20974
|
+
language: z67.string().optional(),
|
|
20975
|
+
labels: z67.record(z67.string(), z67.string()).optional(),
|
|
20976
|
+
providers: z67.array(z67.string()).optional(),
|
|
20876
20977
|
providerModels: providerModelsSchema.optional(),
|
|
20877
20978
|
providerDispatchModes: providerDispatchModesSchema.optional(),
|
|
20878
20979
|
"measurement.marketingHosts": measurementConfigSchema.shape.marketingHosts.optional(),
|
|
20879
20980
|
"measurement.brandTerms": measurementConfigSchema.shape.brandTerms.optional(),
|
|
20880
20981
|
"measurement.leadEventNames": measurementConfigSchema.shape.leadEventNames.optional(),
|
|
20881
|
-
locations:
|
|
20882
|
-
defaultLocation:
|
|
20883
|
-
autoExtractBacklinks:
|
|
20884
|
-
negativeReviewMaxStars:
|
|
20885
|
-
siteAuditMaxPages:
|
|
20886
|
-
competitorAutoAliases:
|
|
20982
|
+
locations: z67.array(locationContextSchema).optional(),
|
|
20983
|
+
defaultLocation: z67.string().nullable().optional(),
|
|
20984
|
+
autoExtractBacklinks: z67.boolean().optional(),
|
|
20985
|
+
negativeReviewMaxStars: z67.number().int().nullable().optional(),
|
|
20986
|
+
siteAuditMaxPages: z67.number().int().nullable().optional(),
|
|
20987
|
+
competitorAutoAliases: z67.enum(["off", "preview", "apply"]).optional(),
|
|
20887
20988
|
configSource: configSourceSchema.optional()
|
|
20888
20989
|
}).strict();
|
|
20889
|
-
var projectFieldsChangeSchema =
|
|
20890
|
-
displayName: fieldChangeSchema(
|
|
20891
|
-
canonicalDomain: fieldChangeSchema(
|
|
20892
|
-
ownedDomains: fieldChangeSchema(
|
|
20893
|
-
aliases: fieldChangeSchema(
|
|
20894
|
-
qualifiedAliases: fieldChangeSchema(
|
|
20895
|
-
country: fieldChangeSchema(
|
|
20896
|
-
language: fieldChangeSchema(
|
|
20897
|
-
labels: fieldChangeSchema(
|
|
20898
|
-
providers: fieldChangeSchema(
|
|
20990
|
+
var projectFieldsChangeSchema = z67.object({
|
|
20991
|
+
displayName: fieldChangeSchema(z67.string()).optional(),
|
|
20992
|
+
canonicalDomain: fieldChangeSchema(z67.string()).optional(),
|
|
20993
|
+
ownedDomains: fieldChangeSchema(z67.array(z67.string())).optional(),
|
|
20994
|
+
aliases: fieldChangeSchema(z67.array(z67.string())).optional(),
|
|
20995
|
+
qualifiedAliases: fieldChangeSchema(z67.array(z67.string())).optional(),
|
|
20996
|
+
country: fieldChangeSchema(z67.string()).optional(),
|
|
20997
|
+
language: fieldChangeSchema(z67.string()).optional(),
|
|
20998
|
+
labels: fieldChangeSchema(z67.record(z67.string(), z67.string())).optional(),
|
|
20999
|
+
providers: fieldChangeSchema(z67.array(z67.string())).optional(),
|
|
20899
21000
|
providerModels: fieldChangeSchema(providerModelsSchema).optional(),
|
|
20900
21001
|
providerDispatchModes: fieldChangeSchema(providerDispatchModesSchema).optional(),
|
|
20901
21002
|
"measurement.marketingHosts": fieldChangeSchema(measurementConfigSchema.shape.marketingHosts).optional(),
|
|
20902
21003
|
"measurement.brandTerms": fieldChangeSchema(measurementConfigSchema.shape.brandTerms).optional(),
|
|
20903
21004
|
"measurement.leadEventNames": fieldChangeSchema(measurementConfigSchema.shape.leadEventNames).optional(),
|
|
20904
|
-
locations: fieldChangeSchema(
|
|
20905
|
-
defaultLocation: fieldChangeSchema(
|
|
20906
|
-
autoExtractBacklinks: fieldChangeSchema(
|
|
20907
|
-
negativeReviewMaxStars: fieldChangeSchema(
|
|
20908
|
-
siteAuditMaxPages: fieldChangeSchema(
|
|
20909
|
-
competitorAutoAliases: fieldChangeSchema(
|
|
21005
|
+
locations: fieldChangeSchema(z67.array(locationContextSchema)).optional(),
|
|
21006
|
+
defaultLocation: fieldChangeSchema(z67.string()).optional(),
|
|
21007
|
+
autoExtractBacklinks: fieldChangeSchema(z67.boolean()).optional(),
|
|
21008
|
+
negativeReviewMaxStars: fieldChangeSchema(z67.number().int()).optional(),
|
|
21009
|
+
siteAuditMaxPages: fieldChangeSchema(z67.number().int().nullable()).optional(),
|
|
21010
|
+
competitorAutoAliases: fieldChangeSchema(z67.enum(["off", "preview", "apply"])).optional(),
|
|
20910
21011
|
configSource: fieldChangeSchema(configSourceSchema).optional()
|
|
20911
21012
|
}).strict();
|
|
20912
|
-
var scheduleStateSchema =
|
|
20913
|
-
cron:
|
|
20914
|
-
preset:
|
|
21013
|
+
var scheduleStateSchema = z67.object({
|
|
21014
|
+
cron: z67.string().optional(),
|
|
21015
|
+
preset: z67.string().optional(),
|
|
20915
21016
|
recurrence: calendarRecurrenceSchema.optional(),
|
|
20916
|
-
timezone:
|
|
20917
|
-
providers:
|
|
20918
|
-
enabled:
|
|
20919
|
-
}).strict();
|
|
20920
|
-
var droppedAliasSchema =
|
|
20921
|
-
domain:
|
|
20922
|
-
alias:
|
|
20923
|
-
reason:
|
|
20924
|
-
conflictsWith:
|
|
20925
|
-
conflictingName:
|
|
20926
|
-
markets:
|
|
20927
|
-
}).strict();
|
|
20928
|
-
var configStateNotificationSchema =
|
|
20929
|
-
id:
|
|
20930
|
-
url:
|
|
20931
|
-
urlHost:
|
|
20932
|
-
events:
|
|
20933
|
-
enabled:
|
|
20934
|
-
source:
|
|
20935
|
-
});
|
|
20936
|
-
var projectConfigStateSchema =
|
|
20937
|
-
project:
|
|
20938
|
-
configRevision:
|
|
21017
|
+
timezone: z67.string(),
|
|
21018
|
+
providers: z67.array(z67.string()),
|
|
21019
|
+
enabled: z67.boolean()
|
|
21020
|
+
}).strict();
|
|
21021
|
+
var droppedAliasSchema = z67.object({
|
|
21022
|
+
domain: z67.string(),
|
|
21023
|
+
alias: z67.string(),
|
|
21024
|
+
reason: z67.enum(["too-long", "too-short", "project-brand", "other-competitor", "market-competitor", "claimed-by-alias"]),
|
|
21025
|
+
conflictsWith: z67.string().optional(),
|
|
21026
|
+
conflictingName: z67.string().optional(),
|
|
21027
|
+
markets: z67.array(z67.string()).optional()
|
|
21028
|
+
}).strict();
|
|
21029
|
+
var configStateNotificationSchema = z67.object({
|
|
21030
|
+
id: z67.string(),
|
|
21031
|
+
url: z67.string().optional(),
|
|
21032
|
+
urlHost: z67.string(),
|
|
21033
|
+
events: z67.array(z67.string()),
|
|
21034
|
+
enabled: z67.boolean(),
|
|
21035
|
+
source: z67.string().optional()
|
|
21036
|
+
});
|
|
21037
|
+
var projectConfigStateSchema = z67.object({
|
|
21038
|
+
project: z67.object({ id: z67.string(), name: z67.string() }),
|
|
21039
|
+
configRevision: z67.number().int(),
|
|
20939
21040
|
fields: projectFieldsStateSchema,
|
|
20940
|
-
queries:
|
|
20941
|
-
competitors:
|
|
21041
|
+
queries: z67.array(z67.object({ id: z67.string(), text: z67.string() })),
|
|
21042
|
+
competitors: z67.array(z67.object({ id: z67.string(), domain: z67.string(), aliases: z67.array(z67.string()) })),
|
|
20942
21043
|
schedule: scheduleStateSchema.nullable(),
|
|
20943
|
-
notifications:
|
|
20944
|
-
managed:
|
|
20945
|
-
detachedSnapshotCount:
|
|
20946
|
-
});
|
|
20947
|
-
var notificationAddedSchema =
|
|
20948
|
-
var notificationRemovedSchema = notificationAddedSchema.extend({ id:
|
|
20949
|
-
var notificationKeptSchema =
|
|
20950
|
-
id:
|
|
20951
|
-
urlHost:
|
|
20952
|
-
urlChanged:
|
|
20953
|
-
eventsBefore:
|
|
20954
|
-
eventsAfter:
|
|
20955
|
-
});
|
|
20956
|
-
var applyPreviewDtoSchema =
|
|
20957
|
-
project:
|
|
20958
|
-
action:
|
|
20959
|
-
changed:
|
|
20960
|
-
configRevision:
|
|
21044
|
+
notifications: z67.array(configStateNotificationSchema),
|
|
21045
|
+
managed: z67.object({ queries: z67.boolean(), competitors: z67.boolean(), schedule: z67.boolean(), notifications: z67.boolean() }),
|
|
21046
|
+
detachedSnapshotCount: z67.number().int().nonnegative()
|
|
21047
|
+
});
|
|
21048
|
+
var notificationAddedSchema = z67.object({ urlHost: z67.string(), events: z67.array(z67.string()) });
|
|
21049
|
+
var notificationRemovedSchema = notificationAddedSchema.extend({ id: z67.string() });
|
|
21050
|
+
var notificationKeptSchema = z67.object({
|
|
21051
|
+
id: z67.string(),
|
|
21052
|
+
urlHost: z67.string(),
|
|
21053
|
+
urlChanged: z67.boolean(),
|
|
21054
|
+
eventsBefore: z67.array(z67.string()),
|
|
21055
|
+
eventsAfter: z67.array(z67.string())
|
|
21056
|
+
});
|
|
21057
|
+
var applyPreviewDtoSchema = z67.object({
|
|
21058
|
+
project: z67.object({ id: z67.string().nullable(), name: z67.string() }),
|
|
21059
|
+
action: z67.enum(["create", "update", "none"]),
|
|
21060
|
+
changed: z67.boolean(),
|
|
21061
|
+
configRevision: z67.object({ before: z67.number().int().nullable(), after: z67.number().int() }),
|
|
20961
21062
|
fields: projectFieldsChangeSchema,
|
|
20962
|
-
queries:
|
|
20963
|
-
managed:
|
|
20964
|
-
added:
|
|
20965
|
-
removed:
|
|
20966
|
-
unchangedCount:
|
|
20967
|
-
snapshotsDetached:
|
|
21063
|
+
queries: z67.object({
|
|
21064
|
+
managed: z67.boolean(),
|
|
21065
|
+
added: z67.array(z67.string()),
|
|
21066
|
+
removed: z67.array(z67.string()),
|
|
21067
|
+
unchangedCount: z67.number().int().nonnegative(),
|
|
21068
|
+
snapshotsDetached: z67.number().int().nonnegative()
|
|
20968
21069
|
}),
|
|
20969
|
-
competitors:
|
|
20970
|
-
managed:
|
|
20971
|
-
added:
|
|
20972
|
-
removed:
|
|
20973
|
-
aliasChanges:
|
|
20974
|
-
droppedAliases:
|
|
21070
|
+
competitors: z67.object({
|
|
21071
|
+
managed: z67.boolean(),
|
|
21072
|
+
added: z67.array(z67.string()),
|
|
21073
|
+
removed: z67.array(z67.string()),
|
|
21074
|
+
aliasChanges: z67.array(z67.object({ domain: z67.string(), before: z67.array(z67.string()), after: z67.array(z67.string()) })),
|
|
21075
|
+
droppedAliases: z67.array(droppedAliasSchema)
|
|
20975
21076
|
}),
|
|
20976
|
-
schedule:
|
|
20977
|
-
managed:
|
|
20978
|
-
action:
|
|
21077
|
+
schedule: z67.object({
|
|
21078
|
+
managed: z67.boolean(),
|
|
21079
|
+
action: z67.enum(["create", "update", "delete", "none"]),
|
|
20979
21080
|
before: scheduleStateSchema.nullable(),
|
|
20980
21081
|
after: scheduleStateSchema.nullable()
|
|
20981
21082
|
}),
|
|
20982
|
-
notifications:
|
|
20983
|
-
managed:
|
|
20984
|
-
added:
|
|
20985
|
-
removed:
|
|
20986
|
-
kept:
|
|
20987
|
-
secretsRotated:
|
|
21083
|
+
notifications: z67.object({
|
|
21084
|
+
managed: z67.boolean(),
|
|
21085
|
+
added: z67.array(notificationAddedSchema),
|
|
21086
|
+
removed: z67.array(notificationRemovedSchema),
|
|
21087
|
+
kept: z67.array(notificationKeptSchema),
|
|
21088
|
+
secretsRotated: z67.number().int().nonnegative()
|
|
20988
21089
|
}),
|
|
20989
|
-
effects:
|
|
21090
|
+
effects: z67.array(z67.enum([
|
|
20990
21091
|
"mention-backfill",
|
|
20991
21092
|
"competitor-rescore",
|
|
20992
21093
|
"competitor-auto-alias-rescan",
|
|
@@ -21098,46 +21199,46 @@ function diffProjectConfigState(before, after, options = {}) {
|
|
|
21098
21199
|
}
|
|
21099
21200
|
|
|
21100
21201
|
// ../contracts/src/simple-measurement-definition.ts
|
|
21101
|
-
import { z as
|
|
21202
|
+
import { z as z68 } from "zod";
|
|
21102
21203
|
var SIMPLE_MEASUREMENT_DEFINITION_SCHEMA_VERSION = 1;
|
|
21103
|
-
var nonBlankStringSchema =
|
|
21204
|
+
var nonBlankStringSchema = z68.string().refine((value) => value.trim().length > 0, {
|
|
21104
21205
|
message: "Must not be blank"
|
|
21105
21206
|
});
|
|
21106
|
-
var simpleMeasurementIdentitySchema =
|
|
21207
|
+
var simpleMeasurementIdentitySchema = z68.object({
|
|
21107
21208
|
// These fields intentionally preserve their stored presentation. The shared
|
|
21108
21209
|
// matcher derives its normalized form separately when classifying queries.
|
|
21109
|
-
displayName:
|
|
21110
|
-
aliases:
|
|
21111
|
-
canonicalDomain:
|
|
21112
|
-
ownedDomains:
|
|
21210
|
+
displayName: z68.string(),
|
|
21211
|
+
aliases: z68.array(z68.string()),
|
|
21212
|
+
canonicalDomain: z68.string(),
|
|
21213
|
+
ownedDomains: z68.array(z68.string()),
|
|
21113
21214
|
// Sentiment-only: the aliases the evaluator is told are this brand's own
|
|
21114
21215
|
// names. Omitted when empty, so a sidecar that never opted in keeps its
|
|
21115
21216
|
// checksum. No bounds or matcher rules here: a later change to the write
|
|
21116
21217
|
// rules must never make a stored sidecar unreadable.
|
|
21117
|
-
qualifiedAliases:
|
|
21218
|
+
qualifiedAliases: z68.array(z68.string()).optional()
|
|
21118
21219
|
}).strict();
|
|
21119
|
-
var simpleMeasurementEngineSchema =
|
|
21220
|
+
var simpleMeasurementEngineSchema = z68.object({
|
|
21120
21221
|
provider: providerNameSchema.refine((value) => value.trim().length > 0, {
|
|
21121
21222
|
message: "Provider must not be blank"
|
|
21122
21223
|
}),
|
|
21123
21224
|
// Preserve the requested model exactly; null does not claim a served model.
|
|
21124
21225
|
// A legacy empty value can resolve to an adapter default.
|
|
21125
|
-
requestedModel:
|
|
21226
|
+
requestedModel: z68.string().nullable()
|
|
21126
21227
|
}).strict();
|
|
21127
|
-
var simpleMeasurementCompetitorSchema =
|
|
21228
|
+
var simpleMeasurementCompetitorSchema = z68.object({
|
|
21128
21229
|
// This is a snapshot of legacy dispatch inputs, not a competitor write API.
|
|
21129
21230
|
// Stored identifiers may be labels, URLs, or blank. Preserve them exactly;
|
|
21130
21231
|
// readers derive hostname attribution separately when the value supports it.
|
|
21131
|
-
domain:
|
|
21132
|
-
label:
|
|
21133
|
-
aliases:
|
|
21232
|
+
domain: z68.string(),
|
|
21233
|
+
label: z68.string(),
|
|
21234
|
+
aliases: z68.array(z68.string())
|
|
21134
21235
|
}).strict();
|
|
21135
|
-
var simpleMeasurementQueryInputSchema =
|
|
21236
|
+
var simpleMeasurementQueryInputSchema = z68.object({
|
|
21136
21237
|
queryId: nonBlankStringSchema,
|
|
21137
21238
|
// The legacy runner can dispatch a stored empty query. Preserve that exact
|
|
21138
21239
|
// selected input rather than making first capture change its behavior.
|
|
21139
|
-
queryText:
|
|
21140
|
-
provenance:
|
|
21240
|
+
queryText: z68.string(),
|
|
21241
|
+
provenance: z68.string().nullable()
|
|
21141
21242
|
}).strict();
|
|
21142
21243
|
var simpleMeasurementQuerySchema = simpleMeasurementQueryInputSchema.extend({
|
|
21143
21244
|
queryClass: queryClassSchema.nullable()
|
|
@@ -21148,7 +21249,7 @@ function addCollectionIssues(value, ctx) {
|
|
|
21148
21249
|
const key = engine.provider.trim().toLocaleLowerCase("en");
|
|
21149
21250
|
if (engineProviders.has(key)) {
|
|
21150
21251
|
ctx.addIssue({
|
|
21151
|
-
code:
|
|
21252
|
+
code: z68.ZodIssueCode.custom,
|
|
21152
21253
|
path: ["engines", index, "provider"],
|
|
21153
21254
|
message: `Duplicate engine provider "${engine.provider}"`
|
|
21154
21255
|
});
|
|
@@ -21159,7 +21260,7 @@ function addCollectionIssues(value, ctx) {
|
|
|
21159
21260
|
value.queries.forEach((query, index) => {
|
|
21160
21261
|
if (queryIds.has(query.queryId)) {
|
|
21161
21262
|
ctx.addIssue({
|
|
21162
|
-
code:
|
|
21263
|
+
code: z68.ZodIssueCode.custom,
|
|
21163
21264
|
path: ["queries", index, "queryId"],
|
|
21164
21265
|
message: `Duplicate query id "${query.queryId}"`
|
|
21165
21266
|
});
|
|
@@ -21171,7 +21272,7 @@ function addCollectionIssues(value, ctx) {
|
|
|
21171
21272
|
const key = competitor.domain;
|
|
21172
21273
|
if (competitorDomains.has(key)) {
|
|
21173
21274
|
ctx.addIssue({
|
|
21174
|
-
code:
|
|
21275
|
+
code: z68.ZodIssueCode.custom,
|
|
21175
21276
|
path: ["competitors", index, "domain"],
|
|
21176
21277
|
message: `Duplicate competitor domain "${competitor.domain}"`
|
|
21177
21278
|
});
|
|
@@ -21179,28 +21280,28 @@ function addCollectionIssues(value, ctx) {
|
|
|
21179
21280
|
competitorDomains.add(key);
|
|
21180
21281
|
});
|
|
21181
21282
|
}
|
|
21182
|
-
var simpleMeasurementDefinitionInputSchema =
|
|
21183
|
-
capturedAt:
|
|
21283
|
+
var simpleMeasurementDefinitionInputSchema = z68.object({
|
|
21284
|
+
capturedAt: z68.string().datetime(),
|
|
21184
21285
|
identity: simpleMeasurementIdentitySchema,
|
|
21185
|
-
country:
|
|
21186
|
-
language:
|
|
21286
|
+
country: z68.string(),
|
|
21287
|
+
language: z68.string(),
|
|
21187
21288
|
location: locationContextSchema.nullable(),
|
|
21188
|
-
engines:
|
|
21289
|
+
engines: z68.array(simpleMeasurementEngineSchema).min(1),
|
|
21189
21290
|
/** Missing on historical sidecars; an empty array means the captured set was intentionally empty. */
|
|
21190
|
-
competitors:
|
|
21191
|
-
queries:
|
|
21291
|
+
competitors: z68.array(simpleMeasurementCompetitorSchema).optional(),
|
|
21292
|
+
queries: z68.array(simpleMeasurementQueryInputSchema)
|
|
21192
21293
|
}).strict().superRefine(addCollectionIssues);
|
|
21193
|
-
var simpleMeasurementDefinitionSchema =
|
|
21194
|
-
schemaVersion:
|
|
21195
|
-
capturedAt:
|
|
21294
|
+
var simpleMeasurementDefinitionSchema = z68.object({
|
|
21295
|
+
schemaVersion: z68.literal(SIMPLE_MEASUREMENT_DEFINITION_SCHEMA_VERSION),
|
|
21296
|
+
capturedAt: z68.string().datetime(),
|
|
21196
21297
|
identity: simpleMeasurementIdentitySchema,
|
|
21197
|
-
country:
|
|
21198
|
-
language:
|
|
21298
|
+
country: z68.string(),
|
|
21299
|
+
language: z68.string(),
|
|
21199
21300
|
// Requested adapter input, not proof that the provider applied this context.
|
|
21200
21301
|
location: locationContextSchema.nullable(),
|
|
21201
|
-
engines:
|
|
21202
|
-
competitors:
|
|
21203
|
-
queries:
|
|
21302
|
+
engines: z68.array(simpleMeasurementEngineSchema).min(1),
|
|
21303
|
+
competitors: z68.array(simpleMeasurementCompetitorSchema).optional(),
|
|
21304
|
+
queries: z68.array(simpleMeasurementQuerySchema)
|
|
21204
21305
|
}).strict().superRefine(addCollectionIssues);
|
|
21205
21306
|
function simpleMeasurementCompetitorNames(competitors) {
|
|
21206
21307
|
return competitors?.flatMap((competitor) => [competitor.label, ...competitor.aliases]) ?? [];
|
|
@@ -21293,21 +21394,21 @@ function canonicalSimpleMeasurementDefinitionJson(definition) {
|
|
|
21293
21394
|
}
|
|
21294
21395
|
|
|
21295
21396
|
// ../contracts/src/measurement-group-import.ts
|
|
21296
|
-
import { z as
|
|
21397
|
+
import { z as z69 } from "zod";
|
|
21297
21398
|
var MEASUREMENT_GROUP_MEMBERSHIP_CSV_PARSER_VERSION = "canonry.measurement-group-membership-csv/v1";
|
|
21298
21399
|
var MEASUREMENT_GROUP_MEMBERSHIP_CSV_MAX_BYTES = 1048576;
|
|
21299
21400
|
var MEASUREMENT_GROUP_MEMBERSHIP_CSV_MAX_DATA_ROWS = 5e3;
|
|
21300
|
-
var sha256HexSchema4 =
|
|
21301
|
-
var dataRowNumberSchema =
|
|
21302
|
-
var measurementDraftSegmentDescriptorSchema =
|
|
21401
|
+
var sha256HexSchema4 = z69.string().regex(/^[a-f0-9]{64}$/);
|
|
21402
|
+
var dataRowNumberSchema = z69.number().int().positive();
|
|
21403
|
+
var measurementDraftSegmentDescriptorSchema = z69.object({
|
|
21303
21404
|
stableKey: measurementV2StableKeySchema,
|
|
21304
|
-
kind:
|
|
21305
|
-
retiredAt:
|
|
21405
|
+
kind: z69.enum(["target", "group"]),
|
|
21406
|
+
retiredAt: z69.string().datetime().nullable()
|
|
21306
21407
|
}).strict();
|
|
21307
|
-
var measurementDraftPreviewGroupMembershipRequestSchema =
|
|
21308
|
-
csv:
|
|
21408
|
+
var measurementDraftPreviewGroupMembershipRequestSchema = z69.object({
|
|
21409
|
+
csv: z69.string()
|
|
21309
21410
|
}).strict();
|
|
21310
|
-
var measurementDraftGroupMembershipRowStatusSchema =
|
|
21411
|
+
var measurementDraftGroupMembershipRowStatusSchema = z69.enum([
|
|
21311
21412
|
"matched",
|
|
21312
21413
|
"ambiguous",
|
|
21313
21414
|
"unmatched",
|
|
@@ -21316,7 +21417,7 @@ var measurementDraftGroupMembershipRowStatusSchema = z68.enum([
|
|
|
21316
21417
|
"proposed",
|
|
21317
21418
|
"excluded"
|
|
21318
21419
|
]);
|
|
21319
|
-
var measurementDraftGroupMembershipRowReasonSchema =
|
|
21420
|
+
var measurementDraftGroupMembershipRowReasonSchema = z69.enum([
|
|
21320
21421
|
"column-count",
|
|
21321
21422
|
"missing-property",
|
|
21322
21423
|
"missing-group",
|
|
@@ -21329,103 +21430,103 @@ var measurementDraftGroupMembershipRowReasonSchema = z68.enum([
|
|
|
21329
21430
|
"group-label-ambiguous",
|
|
21330
21431
|
"group-key-conflict"
|
|
21331
21432
|
]);
|
|
21332
|
-
var rowSourceSchema =
|
|
21433
|
+
var rowSourceSchema = z69.object({
|
|
21333
21434
|
/** One-based logical record number after the CSV header, not a physical line number. */
|
|
21334
21435
|
dataRow: dataRowNumberSchema,
|
|
21335
|
-
property:
|
|
21336
|
-
group:
|
|
21337
|
-
url:
|
|
21338
|
-
normalizedProperty:
|
|
21339
|
-
normalizedGroupLabel:
|
|
21436
|
+
property: z69.string(),
|
|
21437
|
+
group: z69.string(),
|
|
21438
|
+
url: z69.string().nullable(),
|
|
21439
|
+
normalizedProperty: z69.string(),
|
|
21440
|
+
normalizedGroupLabel: z69.string()
|
|
21340
21441
|
}).strict();
|
|
21341
21442
|
var rowFailureSchema = rowSourceSchema.extend({
|
|
21342
21443
|
reason: measurementDraftGroupMembershipRowReasonSchema
|
|
21343
21444
|
});
|
|
21344
|
-
var measurementDraftGroupKeyConflictEvidenceSchema =
|
|
21345
|
-
source:
|
|
21445
|
+
var measurementDraftGroupKeyConflictEvidenceSchema = z69.object({
|
|
21446
|
+
source: z69.enum(["draft-target", "draft-group", "persisted-segment", "retired-segment", "proposed-group"]),
|
|
21346
21447
|
stableKey: measurementV2StableKeySchema,
|
|
21347
|
-
kind:
|
|
21348
|
-
retiredAt:
|
|
21349
|
-
normalizedGroupLabel:
|
|
21448
|
+
kind: z69.enum(["target", "group"]).optional(),
|
|
21449
|
+
retiredAt: z69.string().datetime().nullable().optional(),
|
|
21450
|
+
normalizedGroupLabel: z69.string().optional()
|
|
21350
21451
|
}).strict();
|
|
21351
|
-
var measurementDraftGroupKeyConflictSchema =
|
|
21452
|
+
var measurementDraftGroupKeyConflictSchema = z69.object({
|
|
21352
21453
|
proposedGroupKey: measurementV2StableKeySchema,
|
|
21353
|
-
evidence:
|
|
21454
|
+
evidence: z69.array(measurementDraftGroupKeyConflictEvidenceSchema).min(1)
|
|
21354
21455
|
}).strict();
|
|
21355
|
-
var measurementDraftGroupMembershipRowSchema =
|
|
21456
|
+
var measurementDraftGroupMembershipRowSchema = z69.discriminatedUnion("status", [
|
|
21356
21457
|
rowSourceSchema.extend({
|
|
21357
|
-
status:
|
|
21458
|
+
status: z69.literal("matched"),
|
|
21358
21459
|
targetKey: measurementV2StableKeySchema,
|
|
21359
21460
|
groupKey: measurementV2StableKeySchema
|
|
21360
21461
|
}).strict(),
|
|
21361
21462
|
rowFailureSchema.extend({
|
|
21362
|
-
status:
|
|
21363
|
-
candidateTargetKeys:
|
|
21364
|
-
candidateGroupKeys:
|
|
21463
|
+
status: z69.literal("ambiguous"),
|
|
21464
|
+
candidateTargetKeys: z69.array(measurementV2StableKeySchema).min(1).optional(),
|
|
21465
|
+
candidateGroupKeys: z69.array(measurementV2StableKeySchema).min(1).optional()
|
|
21365
21466
|
}).strict(),
|
|
21366
21467
|
rowFailureSchema.extend({
|
|
21367
|
-
status:
|
|
21468
|
+
status: z69.literal("unmatched")
|
|
21368
21469
|
}).strict(),
|
|
21369
21470
|
rowFailureSchema.extend({
|
|
21370
|
-
status:
|
|
21471
|
+
status: z69.literal("invalid"),
|
|
21371
21472
|
groupKeyConflict: measurementDraftGroupKeyConflictSchema.optional()
|
|
21372
21473
|
}).strict(),
|
|
21373
21474
|
rowSourceSchema.extend({
|
|
21374
|
-
status:
|
|
21475
|
+
status: z69.literal("duplicate"),
|
|
21375
21476
|
duplicateOfRow: dataRowNumberSchema,
|
|
21376
21477
|
targetKey: measurementV2StableKeySchema,
|
|
21377
21478
|
groupKey: measurementV2StableKeySchema
|
|
21378
21479
|
}).strict(),
|
|
21379
21480
|
rowFailureSchema.extend({
|
|
21380
|
-
status:
|
|
21481
|
+
status: z69.literal("proposed"),
|
|
21381
21482
|
targetKey: measurementV2StableKeySchema
|
|
21382
21483
|
}).strict(),
|
|
21383
21484
|
rowFailureSchema.extend({
|
|
21384
|
-
status:
|
|
21485
|
+
status: z69.literal("excluded"),
|
|
21385
21486
|
targetKey: measurementV2StableKeySchema
|
|
21386
21487
|
}).strict()
|
|
21387
21488
|
]);
|
|
21388
|
-
var measurementDraftGroupMembershipChangeSchema =
|
|
21389
|
-
normalizedGroupLabel:
|
|
21489
|
+
var measurementDraftGroupMembershipChangeSchema = z69.object({
|
|
21490
|
+
normalizedGroupLabel: z69.string(),
|
|
21390
21491
|
groupKey: measurementV2StableKeySchema,
|
|
21391
|
-
label:
|
|
21392
|
-
action:
|
|
21393
|
-
matchedRows:
|
|
21394
|
-
targetKeys:
|
|
21395
|
-
addedTargetKeys:
|
|
21396
|
-
unchangedTargetKeys:
|
|
21397
|
-
}).strict();
|
|
21398
|
-
var measurementDraftGroupMembershipImportCountsSchema =
|
|
21399
|
-
dataRows:
|
|
21400
|
-
matchedRows:
|
|
21401
|
-
ambiguousRows:
|
|
21402
|
-
unmatchedRows:
|
|
21403
|
-
invalidRows:
|
|
21404
|
-
duplicateRows:
|
|
21405
|
-
proposedRows:
|
|
21406
|
-
excludedRows:
|
|
21492
|
+
label: z69.string().trim().min(1),
|
|
21493
|
+
action: z69.enum(["create", "extend"]),
|
|
21494
|
+
matchedRows: z69.array(dataRowNumberSchema),
|
|
21495
|
+
targetKeys: z69.array(measurementV2StableKeySchema),
|
|
21496
|
+
addedTargetKeys: z69.array(measurementV2StableKeySchema),
|
|
21497
|
+
unchangedTargetKeys: z69.array(measurementV2StableKeySchema)
|
|
21498
|
+
}).strict();
|
|
21499
|
+
var measurementDraftGroupMembershipImportCountsSchema = z69.object({
|
|
21500
|
+
dataRows: z69.number().int().nonnegative(),
|
|
21501
|
+
matchedRows: z69.number().int().nonnegative(),
|
|
21502
|
+
ambiguousRows: z69.number().int().nonnegative(),
|
|
21503
|
+
unmatchedRows: z69.number().int().nonnegative(),
|
|
21504
|
+
invalidRows: z69.number().int().nonnegative(),
|
|
21505
|
+
duplicateRows: z69.number().int().nonnegative(),
|
|
21506
|
+
proposedRows: z69.number().int().nonnegative(),
|
|
21507
|
+
excludedRows: z69.number().int().nonnegative(),
|
|
21407
21508
|
/** Rows that cannot be committed without correcting the draft or source. */
|
|
21408
|
-
needsAttention:
|
|
21409
|
-
groupsReady:
|
|
21410
|
-
groupsToCreate:
|
|
21411
|
-
groupsToExtend:
|
|
21412
|
-
membershipsReady:
|
|
21413
|
-
addedMemberships:
|
|
21414
|
-
unchangedMemberships:
|
|
21415
|
-
}).strict();
|
|
21416
|
-
var measurementDraftPreviewGroupMembershipResponseSchema =
|
|
21417
|
-
draftEtag:
|
|
21509
|
+
needsAttention: z69.number().int().nonnegative(),
|
|
21510
|
+
groupsReady: z69.number().int().nonnegative(),
|
|
21511
|
+
groupsToCreate: z69.number().int().nonnegative(),
|
|
21512
|
+
groupsToExtend: z69.number().int().nonnegative(),
|
|
21513
|
+
membershipsReady: z69.number().int().nonnegative(),
|
|
21514
|
+
addedMemberships: z69.number().int().nonnegative(),
|
|
21515
|
+
unchangedMemberships: z69.number().int().nonnegative()
|
|
21516
|
+
}).strict();
|
|
21517
|
+
var measurementDraftPreviewGroupMembershipResponseSchema = z69.object({
|
|
21518
|
+
draftEtag: z69.string().trim().min(1),
|
|
21418
21519
|
sourceChecksum: sha256HexSchema4,
|
|
21419
21520
|
previewChecksum: sha256HexSchema4,
|
|
21420
|
-
rows:
|
|
21421
|
-
groupChanges:
|
|
21521
|
+
rows: z69.array(measurementDraftGroupMembershipRowSchema),
|
|
21522
|
+
groupChanges: z69.array(measurementDraftGroupMembershipChangeSchema),
|
|
21422
21523
|
counts: measurementDraftGroupMembershipImportCountsSchema
|
|
21423
21524
|
}).strict();
|
|
21424
|
-
var measurementDraftApplyGroupMembershipRequestSchema =
|
|
21425
|
-
csv:
|
|
21525
|
+
var measurementDraftApplyGroupMembershipRequestSchema = z69.object({
|
|
21526
|
+
csv: z69.string(),
|
|
21426
21527
|
sourceChecksum: sha256HexSchema4,
|
|
21427
21528
|
previewChecksum: sha256HexSchema4,
|
|
21428
|
-
acceptedRows:
|
|
21529
|
+
acceptedRows: z69.array(dataRowNumberSchema).min(1)
|
|
21429
21530
|
}).strict().superRefine((value, context) => {
|
|
21430
21531
|
if (new Set(value.acceptedRows).size === value.acceptedRows.length) return;
|
|
21431
21532
|
context.addIssue({
|
|
@@ -21436,9 +21537,9 @@ var measurementDraftApplyGroupMembershipRequestSchema = z68.object({
|
|
|
21436
21537
|
});
|
|
21437
21538
|
var measurementDraftApplyGroupMembershipResponseSchema = measurementDraftMutationResponseSchema.extend({
|
|
21438
21539
|
/** Accepted matched CSV records, including records whose membership was already present. */
|
|
21439
|
-
appliedRows:
|
|
21440
|
-
addedMemberships:
|
|
21441
|
-
unchangedMemberships:
|
|
21540
|
+
appliedRows: z69.number().int().nonnegative(),
|
|
21541
|
+
addedMemberships: z69.number().int().nonnegative(),
|
|
21542
|
+
unchangedMemberships: z69.number().int().nonnegative()
|
|
21442
21543
|
}).strict();
|
|
21443
21544
|
|
|
21444
21545
|
// ../contracts/src/measurement-target-names.ts
|
|
@@ -21493,44 +21594,44 @@ function measurementTargetNameIssueMessage(issue) {
|
|
|
21493
21594
|
}
|
|
21494
21595
|
|
|
21495
21596
|
// ../contracts/src/google.ts
|
|
21496
|
-
import { z as
|
|
21497
|
-
var googleConnectionTypeSchema =
|
|
21498
|
-
var googleConnectionDtoSchema =
|
|
21499
|
-
id:
|
|
21500
|
-
domain:
|
|
21597
|
+
import { z as z70 } from "zod";
|
|
21598
|
+
var googleConnectionTypeSchema = z70.enum(["gsc", "ga4", "gbp"]);
|
|
21599
|
+
var googleConnectionDtoSchema = z70.object({
|
|
21600
|
+
id: z70.string(),
|
|
21601
|
+
domain: z70.string(),
|
|
21501
21602
|
connectionType: googleConnectionTypeSchema,
|
|
21502
|
-
propertyId:
|
|
21503
|
-
sitemapUrl:
|
|
21504
|
-
scopes:
|
|
21505
|
-
createdAt:
|
|
21506
|
-
updatedAt:
|
|
21507
|
-
});
|
|
21508
|
-
var googleOAuthStartResponseSchema =
|
|
21509
|
-
authUrl:
|
|
21510
|
-
redirectUri:
|
|
21511
|
-
}).strict();
|
|
21512
|
-
var gscSearchDataDtoSchema =
|
|
21513
|
-
date:
|
|
21514
|
-
query:
|
|
21515
|
-
page:
|
|
21516
|
-
country:
|
|
21517
|
-
device:
|
|
21518
|
-
clicks:
|
|
21519
|
-
impressions:
|
|
21603
|
+
propertyId: z70.string().nullable().optional(),
|
|
21604
|
+
sitemapUrl: z70.string().nullable().optional(),
|
|
21605
|
+
scopes: z70.array(z70.string()).default([]),
|
|
21606
|
+
createdAt: z70.string(),
|
|
21607
|
+
updatedAt: z70.string()
|
|
21608
|
+
});
|
|
21609
|
+
var googleOAuthStartResponseSchema = z70.object({
|
|
21610
|
+
authUrl: z70.string().url(),
|
|
21611
|
+
redirectUri: z70.string().url()
|
|
21612
|
+
}).strict();
|
|
21613
|
+
var gscSearchDataDtoSchema = z70.object({
|
|
21614
|
+
date: z70.string(),
|
|
21615
|
+
query: z70.string(),
|
|
21616
|
+
page: z70.string(),
|
|
21617
|
+
country: z70.string().nullable().optional(),
|
|
21618
|
+
device: z70.string().nullable().optional(),
|
|
21619
|
+
clicks: z70.number(),
|
|
21620
|
+
impressions: z70.number(),
|
|
21520
21621
|
ctr: fraction(),
|
|
21521
|
-
position:
|
|
21522
|
-
});
|
|
21523
|
-
var gscPerformanceOrderBySchema =
|
|
21524
|
-
var gscPerformanceResponseDtoSchema =
|
|
21525
|
-
rows:
|
|
21526
|
-
totalMatching:
|
|
21527
|
-
truncated:
|
|
21528
|
-
latestAvailableDate:
|
|
21529
|
-
});
|
|
21530
|
-
var gscPerformanceDailyPointSchema =
|
|
21531
|
-
date:
|
|
21532
|
-
clicks:
|
|
21533
|
-
impressions:
|
|
21622
|
+
position: z70.number()
|
|
21623
|
+
});
|
|
21624
|
+
var gscPerformanceOrderBySchema = z70.enum(["clicks", "impressions", "date"]);
|
|
21625
|
+
var gscPerformanceResponseDtoSchema = z70.object({
|
|
21626
|
+
rows: z70.array(gscSearchDataDtoSchema),
|
|
21627
|
+
totalMatching: z70.number(),
|
|
21628
|
+
truncated: z70.boolean(),
|
|
21629
|
+
latestAvailableDate: z70.string().nullable()
|
|
21630
|
+
});
|
|
21631
|
+
var gscPerformanceDailyPointSchema = z70.object({
|
|
21632
|
+
date: z70.string(),
|
|
21633
|
+
clicks: z70.number(),
|
|
21634
|
+
impressions: z70.number(),
|
|
21534
21635
|
ctr: fraction(),
|
|
21535
21636
|
/**
|
|
21536
21637
|
* Average ranking position for the day, or `null` on a date served by the
|
|
@@ -21539,15 +21640,15 @@ var gscPerformanceDailyPointSchema = z69.object({
|
|
|
21539
21640
|
* absence is reported rather than a fabricated `0` — which would also read as
|
|
21540
21641
|
* an impossibly good rank on a chart with an inverted axis.
|
|
21541
21642
|
*/
|
|
21542
|
-
position:
|
|
21643
|
+
position: z70.number().nullable()
|
|
21543
21644
|
});
|
|
21544
|
-
var gscWindowRangeSchema =
|
|
21645
|
+
var gscWindowRangeSchema = z70.object({
|
|
21545
21646
|
/** Inclusive lower bound, or `null` for the `all` window. */
|
|
21546
|
-
startDate:
|
|
21647
|
+
startDate: z70.string().nullable(),
|
|
21547
21648
|
/** Inclusive upper bound: the last date the property published. */
|
|
21548
|
-
endDate:
|
|
21649
|
+
endDate: z70.string().nullable(),
|
|
21549
21650
|
/** `MAX(date)` across the project's GSC data, ignoring the window. */
|
|
21550
|
-
latestDataDate:
|
|
21651
|
+
latestDataDate: z70.string().nullable(),
|
|
21551
21652
|
/**
|
|
21552
21653
|
* Calendar days since the last day with recorded traffic, on GSC's Pacific
|
|
21553
21654
|
* calendar. `null` with no data.
|
|
@@ -21557,37 +21658,37 @@ var gscWindowRangeSchema = z69.object({
|
|
|
21557
21658
|
* number. Render it as "data through <endDate>", never as "Search Console is
|
|
21558
21659
|
* N days behind".
|
|
21559
21660
|
*/
|
|
21560
|
-
daysSinceLatestData:
|
|
21661
|
+
daysSinceLatestData: z70.number().nullable()
|
|
21561
21662
|
});
|
|
21562
|
-
var gscPerformanceTrendsSchema =
|
|
21663
|
+
var gscPerformanceTrendsSchema = z70.object({
|
|
21563
21664
|
clicks: linearTrendSchema.nullable(),
|
|
21564
21665
|
impressions: linearTrendSchema.nullable(),
|
|
21565
21666
|
ctr: linearTrendSchema.nullable(),
|
|
21566
21667
|
position: linearTrendSchema.nullable()
|
|
21567
21668
|
});
|
|
21568
|
-
var gscPeriodTotalsSchema =
|
|
21569
|
-
startDate:
|
|
21570
|
-
endDate:
|
|
21571
|
-
clicks:
|
|
21572
|
-
impressions:
|
|
21669
|
+
var gscPeriodTotalsSchema = z70.object({
|
|
21670
|
+
startDate: z70.string(),
|
|
21671
|
+
endDate: z70.string(),
|
|
21672
|
+
clicks: z70.number(),
|
|
21673
|
+
impressions: z70.number(),
|
|
21573
21674
|
/** The period's own `clicks / impressions`, never a mean of daily ratios. */
|
|
21574
21675
|
ctr: fraction().nullable(),
|
|
21575
21676
|
/** Impression-weighted mean position, or null when no day carried one. */
|
|
21576
|
-
position:
|
|
21677
|
+
position: z70.number().nullable(),
|
|
21577
21678
|
/**
|
|
21578
21679
|
* Which table the figures came from. `gsc_daily_totals` (property-daily) and
|
|
21579
21680
|
* `SUM(gsc_search_data)` (dimensioned) are not interchangeable: on one real
|
|
21580
21681
|
* property-month the same period reads 1,142 clicks / 34,916 impressions from
|
|
21581
21682
|
* the first and 792 / 45,266 from the second.
|
|
21582
21683
|
*/
|
|
21583
|
-
source:
|
|
21684
|
+
source: z70.enum(["property-daily", "dimensioned", "mixed", "empty"])
|
|
21584
21685
|
});
|
|
21585
|
-
var gscPeriodComparisonSchema =
|
|
21686
|
+
var gscPeriodComparisonSchema = z70.object({
|
|
21586
21687
|
/**
|
|
21587
21688
|
* Length of EACH period in calendar days. Equals the selected window under
|
|
21588
21689
|
* `basis: 'prior-window'`, and half of it under `basis: 'split-window'`.
|
|
21589
21690
|
*/
|
|
21590
|
-
days:
|
|
21691
|
+
days: z70.number(),
|
|
21591
21692
|
/**
|
|
21592
21693
|
* Which two periods these are, so a surface can say what it is showing.
|
|
21593
21694
|
*
|
|
@@ -21609,7 +21710,7 @@ var gscPeriodComparisonSchema = z69.object({
|
|
|
21609
21710
|
* split the window, but a surface should render the absence with its
|
|
21610
21711
|
* period-length copy rather than assert a basis nobody sent.
|
|
21611
21712
|
*/
|
|
21612
|
-
basis:
|
|
21713
|
+
basis: z70.enum(["prior-window", "split-window"]).optional(),
|
|
21613
21714
|
prior: gscPeriodTotalsSchema,
|
|
21614
21715
|
trailing: gscPeriodTotalsSchema,
|
|
21615
21716
|
/**
|
|
@@ -21617,24 +21718,24 @@ var gscPeriodComparisonSchema = z69.object({
|
|
|
21617
21718
|
* case every `change` is null. Empty/property-daily halves are comparable;
|
|
21618
21719
|
* `SUM(gsc_search_data)` is never valid for property totals.
|
|
21619
21720
|
*/
|
|
21620
|
-
comparable:
|
|
21721
|
+
comparable: z70.boolean(),
|
|
21621
21722
|
/**
|
|
21622
21723
|
* Relative change as a ratio (0.5 = +50%), null where the prior period gives
|
|
21623
21724
|
* nothing to divide by or the trailing metric is unavailable. The sign is
|
|
21624
21725
|
* mathematical: a POSITIVE `position` means the rank number rose, which is
|
|
21625
21726
|
* worse. Desirability is the renderer's call.
|
|
21626
21727
|
*/
|
|
21627
|
-
change:
|
|
21728
|
+
change: z70.object({
|
|
21628
21729
|
clicks: fraction().nullable(),
|
|
21629
21730
|
impressions: fraction().nullable(),
|
|
21630
21731
|
ctr: fraction().nullable(),
|
|
21631
21732
|
position: fraction().nullable()
|
|
21632
21733
|
})
|
|
21633
21734
|
});
|
|
21634
|
-
var gscPerformanceDailyDtoSchema =
|
|
21635
|
-
totals:
|
|
21636
|
-
clicks:
|
|
21637
|
-
impressions:
|
|
21735
|
+
var gscPerformanceDailyDtoSchema = z70.object({
|
|
21736
|
+
totals: z70.object({
|
|
21737
|
+
clicks: z70.number(),
|
|
21738
|
+
impressions: z70.number(),
|
|
21638
21739
|
ctr: fraction(),
|
|
21639
21740
|
/**
|
|
21640
21741
|
* Impression-weighted mean position over the window, or `null` when no day
|
|
@@ -21642,15 +21743,15 @@ var gscPerformanceDailyDtoSchema = z69.object({
|
|
|
21642
21743
|
* daily values: position is non-additive, and an unweighted mean lets a
|
|
21643
21744
|
* one-impression day count as much as a thousand-impression day.
|
|
21644
21745
|
*/
|
|
21645
|
-
position:
|
|
21746
|
+
position: z70.number().nullable(),
|
|
21646
21747
|
/**
|
|
21647
21748
|
* Days that carried a property-level position. Below `days`, `position`
|
|
21648
21749
|
* describes a subset of the window and must be labelled as partial.
|
|
21649
21750
|
*/
|
|
21650
|
-
positionDays:
|
|
21651
|
-
days:
|
|
21751
|
+
positionDays: z70.number(),
|
|
21752
|
+
days: z70.number()
|
|
21652
21753
|
}),
|
|
21653
|
-
daily:
|
|
21754
|
+
daily: z70.array(gscPerformanceDailyPointSchema),
|
|
21654
21755
|
/**
|
|
21655
21756
|
* Optional because a server older than this field omits it. Both the web and
|
|
21656
21757
|
* the CLI guard for that skew; declaring it required here would tell a
|
|
@@ -21671,23 +21772,23 @@ var gscPerformanceDailyDtoSchema = z69.object({
|
|
|
21671
21772
|
*/
|
|
21672
21773
|
periodComparison: gscPeriodComparisonSchema.nullable().optional()
|
|
21673
21774
|
});
|
|
21674
|
-
var gscTopPageRowSchema =
|
|
21675
|
-
page:
|
|
21676
|
-
clicks:
|
|
21677
|
-
impressions:
|
|
21775
|
+
var gscTopPageRowSchema = z70.object({
|
|
21776
|
+
page: z70.string(),
|
|
21777
|
+
clicks: z70.number(),
|
|
21778
|
+
impressions: z70.number(),
|
|
21678
21779
|
ctr: fraction()
|
|
21679
21780
|
});
|
|
21680
|
-
var gscTopPagesDtoSchema =
|
|
21681
|
-
rows:
|
|
21682
|
-
totals:
|
|
21683
|
-
clicks:
|
|
21684
|
-
impressions:
|
|
21781
|
+
var gscTopPagesDtoSchema = z70.object({
|
|
21782
|
+
rows: z70.array(gscTopPageRowSchema),
|
|
21783
|
+
totals: z70.object({
|
|
21784
|
+
clicks: z70.number(),
|
|
21785
|
+
impressions: z70.number(),
|
|
21685
21786
|
ctr: fraction(),
|
|
21686
|
-
days:
|
|
21787
|
+
days: z70.number(),
|
|
21687
21788
|
/** First date the property-level totals actually cover. */
|
|
21688
|
-
coveredFrom:
|
|
21789
|
+
coveredFrom: z70.string().nullable(),
|
|
21689
21790
|
/** Last date the property-level totals actually cover. */
|
|
21690
|
-
coveredThrough:
|
|
21791
|
+
coveredThrough: z70.string().nullable(),
|
|
21691
21792
|
/**
|
|
21692
21793
|
* False when the totals span less than the ranked rows above.
|
|
21693
21794
|
*
|
|
@@ -21695,19 +21796,19 @@ var gscTopPagesDtoSchema = z69.object({
|
|
|
21695
21796
|
* 30-day totals sync can sit next to months of dimensioned rows. Printing
|
|
21696
21797
|
* both as one period would misstate the window the totals belong to.
|
|
21697
21798
|
*/
|
|
21698
|
-
complete:
|
|
21799
|
+
complete: z70.boolean()
|
|
21699
21800
|
}).nullable(),
|
|
21700
|
-
totalsSource:
|
|
21801
|
+
totalsSource: z70.literal("property-daily"),
|
|
21701
21802
|
/** First date the ranked rows cover, so a caller can compare spans. */
|
|
21702
|
-
rankedFrom:
|
|
21803
|
+
rankedFrom: z70.string().nullable(),
|
|
21703
21804
|
/** Last date the ranked rows cover. */
|
|
21704
|
-
rankedThrough:
|
|
21805
|
+
rankedThrough: z70.string().nullable()
|
|
21705
21806
|
});
|
|
21706
|
-
var gscQueryTotalsSourceSchema =
|
|
21707
|
-
var gscQueryTotalRowSchema =
|
|
21708
|
-
query:
|
|
21709
|
-
clicks:
|
|
21710
|
-
impressions:
|
|
21807
|
+
var gscQueryTotalsSourceSchema = z70.enum(["google", "page-summed", "mixed"]);
|
|
21808
|
+
var gscQueryTotalRowSchema = z70.object({
|
|
21809
|
+
query: z70.string(),
|
|
21810
|
+
clicks: z70.number(),
|
|
21811
|
+
impressions: z70.number(),
|
|
21711
21812
|
/** clicks / impressions as a 0..1 fraction, 0 when impressions are 0. */
|
|
21712
21813
|
ctr: fraction(),
|
|
21713
21814
|
/**
|
|
@@ -21715,15 +21816,15 @@ var gscQueryTotalRowSchema = z69.object({
|
|
|
21715
21816
|
* sum(position * impressions) / sum(impressions). When the query has no
|
|
21716
21817
|
* impressions in the window, the plain mean of its daily positions.
|
|
21717
21818
|
*/
|
|
21718
|
-
position:
|
|
21819
|
+
position: z70.number(),
|
|
21719
21820
|
/** Distinct dates the query appeared on in the window. */
|
|
21720
|
-
days:
|
|
21821
|
+
days: z70.number(),
|
|
21721
21822
|
source: gscQueryTotalsSourceSchema
|
|
21722
21823
|
});
|
|
21723
|
-
var gscQueryTotalsDtoSchema =
|
|
21724
|
-
rows:
|
|
21725
|
-
totalMatching:
|
|
21726
|
-
truncated:
|
|
21824
|
+
var gscQueryTotalsDtoSchema = z70.object({
|
|
21825
|
+
rows: z70.array(gscQueryTotalRowSchema),
|
|
21826
|
+
totalMatching: z70.number(),
|
|
21827
|
+
truncated: z70.boolean(),
|
|
21727
21828
|
/**
|
|
21728
21829
|
* The range the rows were read from, exactly. Explicit dates win; a labelled
|
|
21729
21830
|
* window paired with only `endDate` spans that many days ending on it. A
|
|
@@ -21741,49 +21842,49 @@ var gscQueryTotalsDtoSchema = z69.object({
|
|
|
21741
21842
|
* omits it, which means coverage is unknown, not that no rows are stored.
|
|
21742
21843
|
* This route always sends it.
|
|
21743
21844
|
*/
|
|
21744
|
-
earliestDataDate:
|
|
21845
|
+
earliestDataDate: z70.string().nullable().optional()
|
|
21745
21846
|
})
|
|
21746
21847
|
});
|
|
21747
|
-
var gscUrlInspectionDtoSchema =
|
|
21748
|
-
id:
|
|
21749
|
-
url:
|
|
21750
|
-
indexingState:
|
|
21751
|
-
verdict:
|
|
21752
|
-
coverageState:
|
|
21753
|
-
pageFetchState:
|
|
21754
|
-
robotsTxtState:
|
|
21755
|
-
crawlTime:
|
|
21756
|
-
lastCrawlResult:
|
|
21757
|
-
isMobileFriendly:
|
|
21758
|
-
richResults:
|
|
21848
|
+
var gscUrlInspectionDtoSchema = z70.object({
|
|
21849
|
+
id: z70.string(),
|
|
21850
|
+
url: z70.string(),
|
|
21851
|
+
indexingState: z70.string().nullable().optional(),
|
|
21852
|
+
verdict: z70.string().nullable().optional(),
|
|
21853
|
+
coverageState: z70.string().nullable().optional(),
|
|
21854
|
+
pageFetchState: z70.string().nullable().optional(),
|
|
21855
|
+
robotsTxtState: z70.string().nullable().optional(),
|
|
21856
|
+
crawlTime: z70.string().nullable().optional(),
|
|
21857
|
+
lastCrawlResult: z70.string().nullable().optional(),
|
|
21858
|
+
isMobileFriendly: z70.boolean().nullable().optional(),
|
|
21859
|
+
richResults: z70.array(z70.string()).default([]),
|
|
21759
21860
|
// Spec gap: server has returned `referringUrls` since the GSC inspect
|
|
21760
21861
|
// route shipped (see google.ts handler at /gsc/inspect + /gsc/inspections),
|
|
21761
21862
|
// but the schema dropped the field so the generated TS client (and
|
|
21762
21863
|
// anything else reading from this DTO) lost the data silently. Adding
|
|
21763
21864
|
// here restores end-to-end visibility.
|
|
21764
|
-
referringUrls:
|
|
21765
|
-
inspectedAt:
|
|
21766
|
-
});
|
|
21767
|
-
var indexTransitionSchema =
|
|
21768
|
-
var gscDeindexedRowSchema =
|
|
21769
|
-
url:
|
|
21770
|
-
previousState:
|
|
21771
|
-
currentState:
|
|
21772
|
-
transitionDate:
|
|
21773
|
-
});
|
|
21774
|
-
var gscReasonGroupSchema =
|
|
21775
|
-
reason:
|
|
21776
|
-
count:
|
|
21777
|
-
urls:
|
|
21778
|
-
});
|
|
21779
|
-
var gscCoverageSummaryDtoSchema =
|
|
21780
|
-
summary:
|
|
21865
|
+
referringUrls: z70.array(z70.string()).default([]),
|
|
21866
|
+
inspectedAt: z70.string()
|
|
21867
|
+
});
|
|
21868
|
+
var indexTransitionSchema = z70.enum(["stable", "reindexed", "deindexed", "still-missing", "new"]);
|
|
21869
|
+
var gscDeindexedRowSchema = z70.object({
|
|
21870
|
+
url: z70.string(),
|
|
21871
|
+
previousState: z70.string().nullable(),
|
|
21872
|
+
currentState: z70.string().nullable(),
|
|
21873
|
+
transitionDate: z70.string()
|
|
21874
|
+
});
|
|
21875
|
+
var gscReasonGroupSchema = z70.object({
|
|
21876
|
+
reason: z70.string(),
|
|
21877
|
+
count: z70.number(),
|
|
21878
|
+
urls: z70.array(gscUrlInspectionDtoSchema).default([])
|
|
21879
|
+
});
|
|
21880
|
+
var gscCoverageSummaryDtoSchema = z70.object({
|
|
21881
|
+
summary: z70.object({
|
|
21781
21882
|
/** Inspected pages, each in exactly one of `indexed` / `notIndexed`. */
|
|
21782
|
-
total:
|
|
21783
|
-
indexed:
|
|
21784
|
-
notIndexed:
|
|
21883
|
+
total: z70.number(),
|
|
21884
|
+
indexed: z70.number(),
|
|
21885
|
+
notIndexed: z70.number(),
|
|
21785
21886
|
/** Pages whose latest inspection lost the indexed state of the one before it. */
|
|
21786
|
-
deindexed:
|
|
21887
|
+
deindexed: z70.number(),
|
|
21787
21888
|
/** `indexed / total` as a 0..100 percent rounded to one decimal; 0 when nothing was inspected. */
|
|
21788
21889
|
percentage: percent(),
|
|
21789
21890
|
/**
|
|
@@ -21791,92 +21892,92 @@ var gscCoverageSummaryDtoSchema = z69.object({
|
|
|
21791
21892
|
* full coverage still reads short of 100%. Null when nothing was
|
|
21792
21893
|
* inspected: an empty site has no coverage share, not a 0% one.
|
|
21793
21894
|
*/
|
|
21794
|
-
indexedShare: fraction(
|
|
21895
|
+
indexedShare: fraction(z70.number().min(0).max(1)).nullable(),
|
|
21795
21896
|
/** `notIndexed / total`, 0..1. With `indexedShare` it sums to 1. Null when nothing was inspected. */
|
|
21796
|
-
notIndexedShare: fraction(
|
|
21897
|
+
notIndexedShare: fraction(z70.number().min(0).max(1)).nullable()
|
|
21797
21898
|
}),
|
|
21798
|
-
lastInspectedAt:
|
|
21799
|
-
lastSyncedAt:
|
|
21800
|
-
indexed:
|
|
21801
|
-
notIndexed:
|
|
21802
|
-
deindexed:
|
|
21803
|
-
reasonGroups:
|
|
21804
|
-
});
|
|
21805
|
-
var indexingNotificationDtoSchema =
|
|
21806
|
-
url:
|
|
21807
|
-
type:
|
|
21808
|
-
notifiedAt:
|
|
21809
|
-
});
|
|
21810
|
-
var indexingRequestResultDtoSchema =
|
|
21811
|
-
url:
|
|
21812
|
-
type:
|
|
21813
|
-
notifiedAt:
|
|
21814
|
-
status:
|
|
21815
|
-
error:
|
|
21816
|
-
});
|
|
21817
|
-
var indexingRequestResponseDtoSchema =
|
|
21818
|
-
summary:
|
|
21819
|
-
total:
|
|
21820
|
-
succeeded:
|
|
21821
|
-
failed:
|
|
21899
|
+
lastInspectedAt: z70.string().nullable(),
|
|
21900
|
+
lastSyncedAt: z70.string().nullable(),
|
|
21901
|
+
indexed: z70.array(gscUrlInspectionDtoSchema).default([]),
|
|
21902
|
+
notIndexed: z70.array(gscUrlInspectionDtoSchema).default([]),
|
|
21903
|
+
deindexed: z70.array(gscDeindexedRowSchema).default([]),
|
|
21904
|
+
reasonGroups: z70.array(gscReasonGroupSchema).default([])
|
|
21905
|
+
});
|
|
21906
|
+
var indexingNotificationDtoSchema = z70.object({
|
|
21907
|
+
url: z70.string(),
|
|
21908
|
+
type: z70.enum(["URL_UPDATED", "URL_DELETED"]),
|
|
21909
|
+
notifiedAt: z70.string()
|
|
21910
|
+
});
|
|
21911
|
+
var indexingRequestResultDtoSchema = z70.object({
|
|
21912
|
+
url: z70.string(),
|
|
21913
|
+
type: z70.enum(["URL_UPDATED", "URL_DELETED"]),
|
|
21914
|
+
notifiedAt: z70.string(),
|
|
21915
|
+
status: z70.enum(["success", "error"]),
|
|
21916
|
+
error: z70.string().optional()
|
|
21917
|
+
});
|
|
21918
|
+
var indexingRequestResponseDtoSchema = z70.object({
|
|
21919
|
+
summary: z70.object({
|
|
21920
|
+
total: z70.number().int().nonnegative(),
|
|
21921
|
+
succeeded: z70.number().int().nonnegative(),
|
|
21922
|
+
failed: z70.number().int().nonnegative()
|
|
21822
21923
|
}),
|
|
21823
|
-
results:
|
|
21924
|
+
results: z70.array(indexingRequestResultDtoSchema).default([])
|
|
21824
21925
|
});
|
|
21825
|
-
var gscCoverageSnapshotDtoSchema =
|
|
21826
|
-
date:
|
|
21827
|
-
indexed:
|
|
21828
|
-
notIndexed:
|
|
21926
|
+
var gscCoverageSnapshotDtoSchema = z70.object({
|
|
21927
|
+
date: z70.string(),
|
|
21928
|
+
indexed: z70.number(),
|
|
21929
|
+
notIndexed: z70.number(),
|
|
21829
21930
|
/**
|
|
21830
21931
|
* Pages with no evidence either way — no impressions in the window and never
|
|
21831
21932
|
* inspected. Deliberately NOT folded into `notIndexed`: absence of
|
|
21832
21933
|
* impressions is not evidence of exclusion, and merging the two would report
|
|
21833
21934
|
* every unmeasured page as a problem.
|
|
21834
21935
|
*/
|
|
21835
|
-
unknownPages:
|
|
21936
|
+
unknownPages: z70.number().default(0),
|
|
21836
21937
|
/** Of the total, how many carry a real URL Inspection verdict. */
|
|
21837
|
-
verifiedByInspection:
|
|
21938
|
+
verifiedByInspection: z70.number().default(0),
|
|
21838
21939
|
/** Pages proven indexed by impressions alone, costing no inspection quota. */
|
|
21839
|
-
derivedFromImpressions:
|
|
21840
|
-
reasonBreakdown:
|
|
21940
|
+
derivedFromImpressions: z70.number().default(0),
|
|
21941
|
+
reasonBreakdown: z70.record(z70.string(), z70.number()).default({})
|
|
21841
21942
|
});
|
|
21842
|
-
var gscSiteDtoSchema =
|
|
21843
|
-
siteUrl:
|
|
21844
|
-
permissionLevel:
|
|
21943
|
+
var gscSiteDtoSchema = z70.object({
|
|
21944
|
+
siteUrl: z70.string(),
|
|
21945
|
+
permissionLevel: z70.string()
|
|
21845
21946
|
});
|
|
21846
|
-
var gscSiteListResponseDtoSchema =
|
|
21847
|
-
sites:
|
|
21947
|
+
var gscSiteListResponseDtoSchema = z70.object({
|
|
21948
|
+
sites: z70.array(gscSiteDtoSchema).default([])
|
|
21848
21949
|
});
|
|
21849
|
-
var gscSitemapContentDtoSchema =
|
|
21850
|
-
type:
|
|
21851
|
-
submitted:
|
|
21950
|
+
var gscSitemapContentDtoSchema = z70.object({
|
|
21951
|
+
type: z70.string(),
|
|
21952
|
+
submitted: z70.string(),
|
|
21852
21953
|
// Google still returns this for existing sitemap reads, but it is not a
|
|
21853
21954
|
// reliable submission outcome. Retained only for response compatibility.
|
|
21854
|
-
indexed:
|
|
21855
|
-
});
|
|
21856
|
-
var gscSitemapDtoSchema =
|
|
21857
|
-
path:
|
|
21858
|
-
parentSitemapUrl:
|
|
21859
|
-
lastSubmitted:
|
|
21860
|
-
isPending:
|
|
21861
|
-
isSitemapsIndex:
|
|
21862
|
-
type:
|
|
21863
|
-
lastDownloaded:
|
|
21864
|
-
warnings:
|
|
21865
|
-
errors:
|
|
21866
|
-
contents:
|
|
21867
|
-
});
|
|
21868
|
-
var gscSitemapListResponseDtoSchema =
|
|
21869
|
-
sitemaps:
|
|
21870
|
-
summary:
|
|
21871
|
-
total:
|
|
21872
|
-
indexes:
|
|
21873
|
-
files:
|
|
21955
|
+
indexed: z70.string().optional().describe("Deprecated compatibility field.")
|
|
21956
|
+
});
|
|
21957
|
+
var gscSitemapDtoSchema = z70.object({
|
|
21958
|
+
path: z70.string(),
|
|
21959
|
+
parentSitemapUrl: z70.string().optional(),
|
|
21960
|
+
lastSubmitted: z70.string().optional(),
|
|
21961
|
+
isPending: z70.boolean().optional(),
|
|
21962
|
+
isSitemapsIndex: z70.boolean().optional(),
|
|
21963
|
+
type: z70.string().optional(),
|
|
21964
|
+
lastDownloaded: z70.string().optional(),
|
|
21965
|
+
warnings: z70.string().optional(),
|
|
21966
|
+
errors: z70.string().optional(),
|
|
21967
|
+
contents: z70.array(gscSitemapContentDtoSchema).optional()
|
|
21968
|
+
});
|
|
21969
|
+
var gscSitemapListResponseDtoSchema = z70.object({
|
|
21970
|
+
sitemaps: z70.array(gscSitemapDtoSchema).default([]),
|
|
21971
|
+
summary: z70.object({
|
|
21972
|
+
total: z70.number().int().nonnegative(),
|
|
21973
|
+
indexes: z70.number().int().nonnegative(),
|
|
21974
|
+
files: z70.number().int().nonnegative()
|
|
21874
21975
|
}),
|
|
21875
|
-
preferredSubmissionUrls:
|
|
21976
|
+
preferredSubmissionUrls: z70.array(z70.string()).default([])
|
|
21876
21977
|
});
|
|
21877
|
-
var gscSubmitSitemapsRequestDtoSchema =
|
|
21878
|
-
sitemapUrls:
|
|
21879
|
-
|
|
21978
|
+
var gscSubmitSitemapsRequestDtoSchema = z70.object({
|
|
21979
|
+
sitemapUrls: z70.array(
|
|
21980
|
+
z70.string().url().refine(
|
|
21880
21981
|
(value) => {
|
|
21881
21982
|
const protocol = new URL(value).protocol;
|
|
21882
21983
|
return protocol === "http:" || protocol === "https:";
|
|
@@ -21885,30 +21986,30 @@ var gscSubmitSitemapsRequestDtoSchema = z69.object({
|
|
|
21885
21986
|
)
|
|
21886
21987
|
).min(1).max(50)
|
|
21887
21988
|
});
|
|
21888
|
-
var gscSubmitSitemapResultDtoSchema =
|
|
21889
|
-
sitemapUrl:
|
|
21890
|
-
status:
|
|
21891
|
-
submittedAt:
|
|
21892
|
-
error:
|
|
21893
|
-
});
|
|
21894
|
-
var gscSubmitSitemapsResponseDtoSchema =
|
|
21895
|
-
summary:
|
|
21896
|
-
total:
|
|
21897
|
-
accepted:
|
|
21898
|
-
failed:
|
|
21989
|
+
var gscSubmitSitemapResultDtoSchema = z70.object({
|
|
21990
|
+
sitemapUrl: z70.string(),
|
|
21991
|
+
status: z70.enum(["accepted", "error"]),
|
|
21992
|
+
submittedAt: z70.string().optional(),
|
|
21993
|
+
error: z70.string().optional()
|
|
21994
|
+
});
|
|
21995
|
+
var gscSubmitSitemapsResponseDtoSchema = z70.object({
|
|
21996
|
+
summary: z70.object({
|
|
21997
|
+
total: z70.number().int().nonnegative(),
|
|
21998
|
+
accepted: z70.number().int().nonnegative(),
|
|
21999
|
+
failed: z70.number().int().nonnegative()
|
|
21899
22000
|
}),
|
|
21900
|
-
results:
|
|
21901
|
-
});
|
|
21902
|
-
var gscDiscoverSitemapsResponseDtoSchema =
|
|
21903
|
-
sitemaps:
|
|
21904
|
-
primarySitemapUrl:
|
|
21905
|
-
run:
|
|
21906
|
-
id:
|
|
21907
|
-
projectId:
|
|
21908
|
-
kind:
|
|
21909
|
-
status:
|
|
21910
|
-
trigger:
|
|
21911
|
-
createdAt:
|
|
22001
|
+
results: z70.array(gscSubmitSitemapResultDtoSchema)
|
|
22002
|
+
});
|
|
22003
|
+
var gscDiscoverSitemapsResponseDtoSchema = z70.object({
|
|
22004
|
+
sitemaps: z70.array(gscSitemapDtoSchema),
|
|
22005
|
+
primarySitemapUrl: z70.string(),
|
|
22006
|
+
run: z70.object({
|
|
22007
|
+
id: z70.string(),
|
|
22008
|
+
projectId: z70.string(),
|
|
22009
|
+
kind: z70.string(),
|
|
22010
|
+
status: z70.string(),
|
|
22011
|
+
trigger: z70.string(),
|
|
22012
|
+
createdAt: z70.string()
|
|
21912
22013
|
}).nullable()
|
|
21913
22014
|
});
|
|
21914
22015
|
|
|
@@ -22027,255 +22128,255 @@ async function mapWithConcurrency(items, concurrency, fn) {
|
|
|
22027
22128
|
}
|
|
22028
22129
|
|
|
22029
22130
|
// ../contracts/src/bing.ts
|
|
22030
|
-
import { z as
|
|
22031
|
-
var bingConnectionDtoSchema =
|
|
22032
|
-
id:
|
|
22033
|
-
domain:
|
|
22034
|
-
siteUrl:
|
|
22035
|
-
createdAt:
|
|
22036
|
-
updatedAt:
|
|
22037
|
-
});
|
|
22038
|
-
var bingUrlInspectionDtoSchema =
|
|
22039
|
-
id:
|
|
22040
|
-
url:
|
|
22041
|
-
httpCode:
|
|
22042
|
-
inIndex:
|
|
22043
|
-
lastCrawledDate:
|
|
22044
|
-
inIndexDate:
|
|
22045
|
-
inspectedAt:
|
|
22131
|
+
import { z as z71 } from "zod";
|
|
22132
|
+
var bingConnectionDtoSchema = z71.object({
|
|
22133
|
+
id: z71.string(),
|
|
22134
|
+
domain: z71.string(),
|
|
22135
|
+
siteUrl: z71.string().nullable().optional(),
|
|
22136
|
+
createdAt: z71.string(),
|
|
22137
|
+
updatedAt: z71.string()
|
|
22138
|
+
});
|
|
22139
|
+
var bingUrlInspectionDtoSchema = z71.object({
|
|
22140
|
+
id: z71.string(),
|
|
22141
|
+
url: z71.string(),
|
|
22142
|
+
httpCode: z71.number().nullable().optional(),
|
|
22143
|
+
inIndex: z71.boolean().nullable().optional(),
|
|
22144
|
+
lastCrawledDate: z71.string().nullable().optional(),
|
|
22145
|
+
inIndexDate: z71.string().nullable().optional(),
|
|
22146
|
+
inspectedAt: z71.string(),
|
|
22046
22147
|
// Fields derived from GetUrlInfo response (more reliable than InIndex)
|
|
22047
|
-
documentSize:
|
|
22048
|
-
anchorCount:
|
|
22049
|
-
discoveryDate:
|
|
22050
|
-
});
|
|
22051
|
-
var bingCoverageSummaryDtoSchema =
|
|
22052
|
-
summary:
|
|
22053
|
-
total:
|
|
22054
|
-
indexed:
|
|
22055
|
-
notIndexed:
|
|
22056
|
-
unknown:
|
|
22148
|
+
documentSize: z71.number().nullable().optional(),
|
|
22149
|
+
anchorCount: z71.number().nullable().optional(),
|
|
22150
|
+
discoveryDate: z71.string().nullable().optional()
|
|
22151
|
+
});
|
|
22152
|
+
var bingCoverageSummaryDtoSchema = z71.object({
|
|
22153
|
+
summary: z71.object({
|
|
22154
|
+
total: z71.number(),
|
|
22155
|
+
indexed: z71.number(),
|
|
22156
|
+
notIndexed: z71.number(),
|
|
22157
|
+
unknown: z71.number().optional(),
|
|
22057
22158
|
percentage: percent()
|
|
22058
22159
|
}),
|
|
22059
|
-
lastInspectedAt:
|
|
22060
|
-
indexed:
|
|
22061
|
-
notIndexed:
|
|
22062
|
-
unknown:
|
|
22063
|
-
});
|
|
22064
|
-
var bingKeywordStatsDtoSchema =
|
|
22065
|
-
query:
|
|
22066
|
-
impressions:
|
|
22067
|
-
clicks:
|
|
22160
|
+
lastInspectedAt: z71.string().nullable(),
|
|
22161
|
+
indexed: z71.array(bingUrlInspectionDtoSchema).default([]),
|
|
22162
|
+
notIndexed: z71.array(bingUrlInspectionDtoSchema).default([]),
|
|
22163
|
+
unknown: z71.array(bingUrlInspectionDtoSchema).default([]).optional()
|
|
22164
|
+
});
|
|
22165
|
+
var bingKeywordStatsDtoSchema = z71.object({
|
|
22166
|
+
query: z71.string(),
|
|
22167
|
+
impressions: z71.number(),
|
|
22168
|
+
clicks: z71.number(),
|
|
22068
22169
|
ctr: fraction(),
|
|
22069
|
-
averagePosition:
|
|
22070
|
-
});
|
|
22071
|
-
var bingCoverageSnapshotDtoSchema =
|
|
22072
|
-
date:
|
|
22073
|
-
indexed:
|
|
22074
|
-
notIndexed:
|
|
22075
|
-
unknown:
|
|
22076
|
-
});
|
|
22077
|
-
var bingSubmitResultDtoSchema =
|
|
22078
|
-
url:
|
|
22079
|
-
status:
|
|
22080
|
-
submittedAt:
|
|
22081
|
-
error:
|
|
22082
|
-
});
|
|
22083
|
-
var bingIndexingRequestResponseDtoSchema =
|
|
22084
|
-
summary:
|
|
22085
|
-
total:
|
|
22086
|
-
succeeded:
|
|
22087
|
-
failed:
|
|
22170
|
+
averagePosition: z71.number()
|
|
22171
|
+
});
|
|
22172
|
+
var bingCoverageSnapshotDtoSchema = z71.object({
|
|
22173
|
+
date: z71.string(),
|
|
22174
|
+
indexed: z71.number(),
|
|
22175
|
+
notIndexed: z71.number(),
|
|
22176
|
+
unknown: z71.number()
|
|
22177
|
+
});
|
|
22178
|
+
var bingSubmitResultDtoSchema = z71.object({
|
|
22179
|
+
url: z71.string(),
|
|
22180
|
+
status: z71.enum(["success", "error"]),
|
|
22181
|
+
submittedAt: z71.string(),
|
|
22182
|
+
error: z71.string().optional()
|
|
22183
|
+
});
|
|
22184
|
+
var bingIndexingRequestResponseDtoSchema = z71.object({
|
|
22185
|
+
summary: z71.object({
|
|
22186
|
+
total: z71.number().int().nonnegative(),
|
|
22187
|
+
succeeded: z71.number().int().nonnegative(),
|
|
22188
|
+
failed: z71.number().int().nonnegative()
|
|
22088
22189
|
}),
|
|
22089
|
-
results:
|
|
22190
|
+
results: z71.array(bingSubmitResultDtoSchema).default([])
|
|
22090
22191
|
});
|
|
22091
|
-
var bingSiteDtoSchema =
|
|
22092
|
-
url:
|
|
22093
|
-
verified:
|
|
22192
|
+
var bingSiteDtoSchema = z71.object({
|
|
22193
|
+
url: z71.string(),
|
|
22194
|
+
verified: z71.boolean()
|
|
22094
22195
|
});
|
|
22095
|
-
var bingSitesResponseDtoSchema =
|
|
22096
|
-
sites:
|
|
22196
|
+
var bingSitesResponseDtoSchema = z71.object({
|
|
22197
|
+
sites: z71.array(bingSiteDtoSchema).default([])
|
|
22097
22198
|
});
|
|
22098
|
-
var bingStatusDtoSchema =
|
|
22099
|
-
connected:
|
|
22100
|
-
domain:
|
|
22101
|
-
siteUrl:
|
|
22102
|
-
createdAt:
|
|
22103
|
-
updatedAt:
|
|
22199
|
+
var bingStatusDtoSchema = z71.object({
|
|
22200
|
+
connected: z71.boolean(),
|
|
22201
|
+
domain: z71.string(),
|
|
22202
|
+
siteUrl: z71.string().nullable(),
|
|
22203
|
+
createdAt: z71.string().nullable(),
|
|
22204
|
+
updatedAt: z71.string().nullable()
|
|
22104
22205
|
});
|
|
22105
|
-
var bingConnectResponseDtoSchema =
|
|
22106
|
-
connected:
|
|
22107
|
-
domain:
|
|
22108
|
-
siteUrl:
|
|
22109
|
-
availableSites:
|
|
22206
|
+
var bingConnectResponseDtoSchema = z71.object({
|
|
22207
|
+
connected: z71.boolean(),
|
|
22208
|
+
domain: z71.string(),
|
|
22209
|
+
siteUrl: z71.string().nullable(),
|
|
22210
|
+
availableSites: z71.array(bingSiteDtoSchema).default([])
|
|
22110
22211
|
});
|
|
22111
|
-
var bingSetSiteResponseDtoSchema =
|
|
22112
|
-
siteUrl:
|
|
22212
|
+
var bingSetSiteResponseDtoSchema = z71.object({
|
|
22213
|
+
siteUrl: z71.string()
|
|
22113
22214
|
});
|
|
22114
22215
|
|
|
22115
22216
|
// ../contracts/src/cdp.ts
|
|
22116
|
-
import { z as
|
|
22117
|
-
var cdpTargetStatusDtoSchema =
|
|
22118
|
-
name:
|
|
22119
|
-
alive:
|
|
22120
|
-
lastUsed:
|
|
22217
|
+
import { z as z72 } from "zod";
|
|
22218
|
+
var cdpTargetStatusDtoSchema = z72.object({
|
|
22219
|
+
name: z72.string(),
|
|
22220
|
+
alive: z72.boolean(),
|
|
22221
|
+
lastUsed: z72.string().nullable()
|
|
22121
22222
|
});
|
|
22122
|
-
var cdpStatusDtoSchema =
|
|
22123
|
-
connected:
|
|
22124
|
-
endpoint:
|
|
22125
|
-
version:
|
|
22126
|
-
browserVersion:
|
|
22127
|
-
targets:
|
|
22223
|
+
var cdpStatusDtoSchema = z72.object({
|
|
22224
|
+
connected: z72.boolean(),
|
|
22225
|
+
endpoint: z72.string(),
|
|
22226
|
+
version: z72.string().optional(),
|
|
22227
|
+
browserVersion: z72.string().optional(),
|
|
22228
|
+
targets: z72.array(cdpTargetStatusDtoSchema).default([])
|
|
22128
22229
|
});
|
|
22129
22230
|
|
|
22130
22231
|
// ../contracts/src/wordpress.ts
|
|
22131
|
-
import { z as
|
|
22132
|
-
var wordpressEnvSchema =
|
|
22133
|
-
var wordpressConnectionDtoSchema =
|
|
22134
|
-
projectName:
|
|
22135
|
-
url:
|
|
22136
|
-
stagingUrl:
|
|
22137
|
-
username:
|
|
22232
|
+
import { z as z73 } from "zod";
|
|
22233
|
+
var wordpressEnvSchema = z73.enum(["live", "staging"]);
|
|
22234
|
+
var wordpressConnectionDtoSchema = z73.object({
|
|
22235
|
+
projectName: z73.string(),
|
|
22236
|
+
url: z73.string(),
|
|
22237
|
+
stagingUrl: z73.string().optional(),
|
|
22238
|
+
username: z73.string(),
|
|
22138
22239
|
defaultEnv: wordpressEnvSchema,
|
|
22139
|
-
createdAt:
|
|
22140
|
-
updatedAt:
|
|
22141
|
-
});
|
|
22142
|
-
var wordpressSiteStatusDtoSchema =
|
|
22143
|
-
url:
|
|
22144
|
-
reachable:
|
|
22145
|
-
pageCount:
|
|
22146
|
-
version:
|
|
22147
|
-
error:
|
|
22148
|
-
plugins:
|
|
22149
|
-
authenticatedUser:
|
|
22150
|
-
id:
|
|
22151
|
-
slug:
|
|
22240
|
+
createdAt: z73.string(),
|
|
22241
|
+
updatedAt: z73.string()
|
|
22242
|
+
});
|
|
22243
|
+
var wordpressSiteStatusDtoSchema = z73.object({
|
|
22244
|
+
url: z73.string(),
|
|
22245
|
+
reachable: z73.boolean(),
|
|
22246
|
+
pageCount: z73.number().nullable().optional(),
|
|
22247
|
+
version: z73.string().nullable().optional(),
|
|
22248
|
+
error: z73.string().nullable().optional(),
|
|
22249
|
+
plugins: z73.array(z73.string()).optional(),
|
|
22250
|
+
authenticatedUser: z73.object({
|
|
22251
|
+
id: z73.number(),
|
|
22252
|
+
slug: z73.string()
|
|
22152
22253
|
}).nullable().optional()
|
|
22153
22254
|
});
|
|
22154
|
-
var wordpressStatusDtoSchema =
|
|
22155
|
-
connected:
|
|
22156
|
-
projectName:
|
|
22255
|
+
var wordpressStatusDtoSchema = z73.object({
|
|
22256
|
+
connected: z73.boolean(),
|
|
22257
|
+
projectName: z73.string(),
|
|
22157
22258
|
defaultEnv: wordpressEnvSchema,
|
|
22158
22259
|
live: wordpressSiteStatusDtoSchema.nullable(),
|
|
22159
22260
|
staging: wordpressSiteStatusDtoSchema.nullable(),
|
|
22160
|
-
adminUrl:
|
|
22261
|
+
adminUrl: z73.string().nullable().optional()
|
|
22161
22262
|
});
|
|
22162
|
-
var wordpressPageSummaryDtoSchema =
|
|
22163
|
-
id:
|
|
22164
|
-
slug:
|
|
22165
|
-
title:
|
|
22166
|
-
status:
|
|
22167
|
-
modifiedAt:
|
|
22168
|
-
link:
|
|
22263
|
+
var wordpressPageSummaryDtoSchema = z73.object({
|
|
22264
|
+
id: z73.number(),
|
|
22265
|
+
slug: z73.string(),
|
|
22266
|
+
title: z73.string(),
|
|
22267
|
+
status: z73.string(),
|
|
22268
|
+
modifiedAt: z73.string().nullable().optional(),
|
|
22269
|
+
link: z73.string().nullable().optional()
|
|
22169
22270
|
});
|
|
22170
|
-
var wordpressPageListDtoSchema =
|
|
22271
|
+
var wordpressPageListDtoSchema = z73.object({
|
|
22171
22272
|
env: wordpressEnvSchema,
|
|
22172
|
-
pages:
|
|
22273
|
+
pages: z73.array(wordpressPageSummaryDtoSchema)
|
|
22173
22274
|
});
|
|
22174
|
-
var wordpressSeoStateDtoSchema =
|
|
22175
|
-
title:
|
|
22176
|
-
description:
|
|
22177
|
-
noindex:
|
|
22178
|
-
writable:
|
|
22179
|
-
writeTargets:
|
|
22275
|
+
var wordpressSeoStateDtoSchema = z73.object({
|
|
22276
|
+
title: z73.string().nullable(),
|
|
22277
|
+
description: z73.string().nullable(),
|
|
22278
|
+
noindex: z73.boolean().nullable(),
|
|
22279
|
+
writable: z73.boolean().default(false),
|
|
22280
|
+
writeTargets: z73.array(z73.string()).default([])
|
|
22180
22281
|
});
|
|
22181
|
-
var wordpressSchemaBlockDtoSchema =
|
|
22182
|
-
type:
|
|
22183
|
-
json:
|
|
22282
|
+
var wordpressSchemaBlockDtoSchema = z73.object({
|
|
22283
|
+
type: z73.string(),
|
|
22284
|
+
json: z73.record(z73.string(), z73.unknown())
|
|
22184
22285
|
});
|
|
22185
22286
|
var wordpressPageDetailDtoSchema = wordpressPageSummaryDtoSchema.extend({
|
|
22186
22287
|
env: wordpressEnvSchema,
|
|
22187
|
-
content:
|
|
22288
|
+
content: z73.string(),
|
|
22188
22289
|
seo: wordpressSeoStateDtoSchema,
|
|
22189
|
-
schemaBlocks:
|
|
22290
|
+
schemaBlocks: z73.array(wordpressSchemaBlockDtoSchema).default([])
|
|
22190
22291
|
});
|
|
22191
22292
|
var wordpressDiffPageDtoSchema = wordpressPageDetailDtoSchema.extend({
|
|
22192
|
-
contentHash:
|
|
22193
|
-
contentSnippet:
|
|
22194
|
-
});
|
|
22195
|
-
var wordpressManualAssistDtoSchema =
|
|
22196
|
-
manualRequired:
|
|
22197
|
-
targetUrl:
|
|
22198
|
-
adminUrl:
|
|
22199
|
-
content:
|
|
22200
|
-
nextSteps:
|
|
22201
|
-
});
|
|
22202
|
-
var wordpressAuditIssueDtoSchema =
|
|
22203
|
-
slug:
|
|
22204
|
-
severity:
|
|
22205
|
-
code:
|
|
22293
|
+
contentHash: z73.string(),
|
|
22294
|
+
contentSnippet: z73.string()
|
|
22295
|
+
});
|
|
22296
|
+
var wordpressManualAssistDtoSchema = z73.object({
|
|
22297
|
+
manualRequired: z73.literal(true),
|
|
22298
|
+
targetUrl: z73.string(),
|
|
22299
|
+
adminUrl: z73.string().nullable().optional(),
|
|
22300
|
+
content: z73.string(),
|
|
22301
|
+
nextSteps: z73.array(z73.string()).default([])
|
|
22302
|
+
});
|
|
22303
|
+
var wordpressAuditIssueDtoSchema = z73.object({
|
|
22304
|
+
slug: z73.string(),
|
|
22305
|
+
severity: z73.enum(["high", "medium", "low"]),
|
|
22306
|
+
code: z73.enum([
|
|
22206
22307
|
"noindex",
|
|
22207
22308
|
"missing-seo-title",
|
|
22208
22309
|
"missing-meta-description",
|
|
22209
22310
|
"missing-schema",
|
|
22210
22311
|
"thin-content"
|
|
22211
22312
|
]),
|
|
22212
|
-
message:
|
|
22313
|
+
message: z73.string()
|
|
22213
22314
|
});
|
|
22214
|
-
var wordpressAuditPageDtoSchema =
|
|
22215
|
-
slug:
|
|
22216
|
-
title:
|
|
22217
|
-
status:
|
|
22218
|
-
wordCount:
|
|
22315
|
+
var wordpressAuditPageDtoSchema = z73.object({
|
|
22316
|
+
slug: z73.string(),
|
|
22317
|
+
title: z73.string(),
|
|
22318
|
+
status: z73.string(),
|
|
22319
|
+
wordCount: z73.number(),
|
|
22219
22320
|
seo: wordpressSeoStateDtoSchema,
|
|
22220
|
-
schemaPresent:
|
|
22221
|
-
issues:
|
|
22321
|
+
schemaPresent: z73.boolean(),
|
|
22322
|
+
issues: z73.array(wordpressAuditIssueDtoSchema).default([])
|
|
22222
22323
|
});
|
|
22223
|
-
var wordpressBulkMetaEntryResultDtoSchema =
|
|
22224
|
-
slug:
|
|
22225
|
-
status:
|
|
22226
|
-
error:
|
|
22324
|
+
var wordpressBulkMetaEntryResultDtoSchema = z73.object({
|
|
22325
|
+
slug: z73.string(),
|
|
22326
|
+
status: z73.enum(["applied", "skipped", "manual"]),
|
|
22327
|
+
error: z73.string().optional(),
|
|
22227
22328
|
manualAssist: wordpressManualAssistDtoSchema.optional()
|
|
22228
22329
|
});
|
|
22229
|
-
var wordpressBulkMetaResultDtoSchema =
|
|
22330
|
+
var wordpressBulkMetaResultDtoSchema = z73.object({
|
|
22230
22331
|
env: wordpressEnvSchema,
|
|
22231
|
-
strategy:
|
|
22232
|
-
results:
|
|
22332
|
+
strategy: z73.enum(["plugin", "manual"]),
|
|
22333
|
+
results: z73.array(wordpressBulkMetaEntryResultDtoSchema)
|
|
22233
22334
|
});
|
|
22234
|
-
var wordpressSchemaDeployEntryResultDtoSchema =
|
|
22235
|
-
slug:
|
|
22236
|
-
status:
|
|
22237
|
-
schemasInjected:
|
|
22335
|
+
var wordpressSchemaDeployEntryResultDtoSchema = z73.object({
|
|
22336
|
+
slug: z73.string(),
|
|
22337
|
+
status: z73.enum(["deployed", "stripped", "skipped", "failed"]),
|
|
22338
|
+
schemasInjected: z73.array(z73.string()).optional(),
|
|
22238
22339
|
manualAssist: wordpressManualAssistDtoSchema.optional(),
|
|
22239
|
-
error:
|
|
22340
|
+
error: z73.string().optional()
|
|
22240
22341
|
});
|
|
22241
|
-
var wordpressSchemaDeployResultDtoSchema =
|
|
22342
|
+
var wordpressSchemaDeployResultDtoSchema = z73.object({
|
|
22242
22343
|
env: wordpressEnvSchema,
|
|
22243
|
-
results:
|
|
22344
|
+
results: z73.array(wordpressSchemaDeployEntryResultDtoSchema)
|
|
22244
22345
|
});
|
|
22245
|
-
var wordpressSchemaStatusPageDtoSchema =
|
|
22246
|
-
slug:
|
|
22247
|
-
title:
|
|
22248
|
-
canonrySchemas:
|
|
22249
|
-
thirdPartySchemas:
|
|
22250
|
-
hasCanonrySchema:
|
|
22346
|
+
var wordpressSchemaStatusPageDtoSchema = z73.object({
|
|
22347
|
+
slug: z73.string(),
|
|
22348
|
+
title: z73.string(),
|
|
22349
|
+
canonrySchemas: z73.array(z73.string()),
|
|
22350
|
+
thirdPartySchemas: z73.array(z73.string()),
|
|
22351
|
+
hasCanonrySchema: z73.boolean()
|
|
22251
22352
|
});
|
|
22252
|
-
var wordpressSchemaStatusResultDtoSchema =
|
|
22353
|
+
var wordpressSchemaStatusResultDtoSchema = z73.object({
|
|
22253
22354
|
env: wordpressEnvSchema,
|
|
22254
|
-
pages:
|
|
22355
|
+
pages: z73.array(wordpressSchemaStatusPageDtoSchema)
|
|
22255
22356
|
});
|
|
22256
|
-
var wordpressOnboardStepDtoSchema =
|
|
22257
|
-
name:
|
|
22258
|
-
status:
|
|
22259
|
-
summary:
|
|
22260
|
-
error:
|
|
22357
|
+
var wordpressOnboardStepDtoSchema = z73.object({
|
|
22358
|
+
name: z73.string(),
|
|
22359
|
+
status: z73.enum(["completed", "skipped", "failed"]),
|
|
22360
|
+
summary: z73.string().optional(),
|
|
22361
|
+
error: z73.string().optional()
|
|
22261
22362
|
});
|
|
22262
|
-
var wordpressOnboardResultDtoSchema =
|
|
22263
|
-
projectName:
|
|
22264
|
-
steps:
|
|
22363
|
+
var wordpressOnboardResultDtoSchema = z73.object({
|
|
22364
|
+
projectName: z73.string(),
|
|
22365
|
+
steps: z73.array(wordpressOnboardStepDtoSchema)
|
|
22265
22366
|
});
|
|
22266
|
-
var wordpressDiffDtoSchema =
|
|
22267
|
-
slug:
|
|
22367
|
+
var wordpressDiffDtoSchema = z73.object({
|
|
22368
|
+
slug: z73.string(),
|
|
22268
22369
|
live: wordpressDiffPageDtoSchema,
|
|
22269
22370
|
staging: wordpressDiffPageDtoSchema,
|
|
22270
|
-
hasDifferences:
|
|
22271
|
-
differences:
|
|
22272
|
-
title:
|
|
22273
|
-
slug:
|
|
22274
|
-
content:
|
|
22275
|
-
seoTitle:
|
|
22276
|
-
seoDescription:
|
|
22277
|
-
noindex:
|
|
22278
|
-
schema:
|
|
22371
|
+
hasDifferences: z73.boolean(),
|
|
22372
|
+
differences: z73.object({
|
|
22373
|
+
title: z73.boolean(),
|
|
22374
|
+
slug: z73.boolean(),
|
|
22375
|
+
content: z73.boolean(),
|
|
22376
|
+
seoTitle: z73.boolean(),
|
|
22377
|
+
seoDescription: z73.boolean(),
|
|
22378
|
+
noindex: z73.boolean(),
|
|
22379
|
+
schema: z73.boolean()
|
|
22279
22380
|
})
|
|
22280
22381
|
});
|
|
22281
22382
|
|
|
@@ -22458,61 +22559,61 @@ var LlmCapabilities = {
|
|
|
22458
22559
|
var LLM_CAPABILITIES = Object.values(LlmCapabilities);
|
|
22459
22560
|
|
|
22460
22561
|
// ../contracts/src/status.ts
|
|
22461
|
-
import { z as
|
|
22462
|
-
var statusIntegrationSchema =
|
|
22562
|
+
import { z as z74 } from "zod";
|
|
22563
|
+
var statusIntegrationSchema = z74.enum(["gsc", "ga", "gbp", "bing", "ads", "google-ads", "gtm", "traffic"]);
|
|
22463
22564
|
var StatusIntegrations = statusIntegrationSchema.enum;
|
|
22464
|
-
var integrationStateSchema =
|
|
22565
|
+
var integrationStateSchema = z74.enum(["ok", "failing", "stale", "never-synced"]);
|
|
22465
22566
|
var IntegrationStates = integrationStateSchema.enum;
|
|
22466
|
-
var dateTimeSchema2 =
|
|
22467
|
-
var dateSchema =
|
|
22468
|
-
var integrationStatusRowSchema =
|
|
22567
|
+
var dateTimeSchema2 = z74.string().datetime({ offset: true });
|
|
22568
|
+
var dateSchema = z74.string().regex(/^\d{4}-\d{2}-\d{2}$/);
|
|
22569
|
+
var integrationStatusRowSchema = z74.object({
|
|
22469
22570
|
integration: statusIntegrationSchema,
|
|
22470
|
-
label:
|
|
22571
|
+
label: z74.string(),
|
|
22471
22572
|
runKind: runKindSchema,
|
|
22472
|
-
sourceId:
|
|
22573
|
+
sourceId: z74.string().nullable(),
|
|
22473
22574
|
state: integrationStateSchema,
|
|
22474
22575
|
lastSuccessAt: dateTimeSchema2.nullable(),
|
|
22475
22576
|
latestRunAt: dateTimeSchema2.nullable(),
|
|
22476
|
-
latestRunId:
|
|
22577
|
+
latestRunId: z74.string().nullable(),
|
|
22477
22578
|
latestStatus: runStatusSchema.nullable(),
|
|
22478
22579
|
latestTrigger: runTriggerSchema.nullable(),
|
|
22479
|
-
consecutiveFailures:
|
|
22480
|
-
latestError:
|
|
22580
|
+
consecutiveFailures: z74.number().int().nonnegative(),
|
|
22581
|
+
latestError: z74.string().max(300).nullable(),
|
|
22481
22582
|
dataThrough: dateSchema.nullable(),
|
|
22482
|
-
dataAgeDays:
|
|
22483
|
-
doctorChecks:
|
|
22583
|
+
dataAgeDays: z74.number().int().nonnegative().nullable(),
|
|
22584
|
+
doctorChecks: z74.array(z74.string())
|
|
22484
22585
|
});
|
|
22485
|
-
var statusHealthSchema =
|
|
22486
|
-
status:
|
|
22487
|
-
code:
|
|
22488
|
-
summary:
|
|
22586
|
+
var statusHealthSchema = z74.object({
|
|
22587
|
+
status: z74.enum(["ok", "warn", "fail"]),
|
|
22588
|
+
code: z74.string(),
|
|
22589
|
+
summary: z74.string(),
|
|
22489
22590
|
checkedAt: dateTimeSchema2,
|
|
22490
22591
|
notifiedAt: dateTimeSchema2.nullable()
|
|
22491
22592
|
});
|
|
22492
|
-
var projectStatusSchema =
|
|
22493
|
-
project:
|
|
22494
|
-
displayName:
|
|
22495
|
-
state:
|
|
22593
|
+
var projectStatusSchema = z74.object({
|
|
22594
|
+
project: z74.string(),
|
|
22595
|
+
displayName: z74.string(),
|
|
22596
|
+
state: z74.enum([...integrationStateSchema.options, "warning"]),
|
|
22496
22597
|
health: statusHealthSchema.nullable(),
|
|
22497
|
-
integrations:
|
|
22598
|
+
integrations: z74.array(integrationStatusRowSchema)
|
|
22498
22599
|
});
|
|
22499
|
-
var instanceStatusDtoSchema =
|
|
22600
|
+
var instanceStatusDtoSchema = z74.object({
|
|
22500
22601
|
generatedAt: dateTimeSchema2,
|
|
22501
22602
|
mcp: mcpHealthSchema.optional(),
|
|
22502
|
-
summary:
|
|
22503
|
-
projects:
|
|
22504
|
-
ok:
|
|
22505
|
-
failing:
|
|
22506
|
-
warning:
|
|
22507
|
-
stale:
|
|
22508
|
-
neverSynced:
|
|
22603
|
+
summary: z74.object({
|
|
22604
|
+
projects: z74.number().int().nonnegative(),
|
|
22605
|
+
ok: z74.number().int().nonnegative(),
|
|
22606
|
+
failing: z74.number().int().nonnegative(),
|
|
22607
|
+
warning: z74.number().int().nonnegative().optional(),
|
|
22608
|
+
stale: z74.number().int().nonnegative(),
|
|
22609
|
+
neverSynced: z74.number().int().nonnegative()
|
|
22509
22610
|
}),
|
|
22510
|
-
projects:
|
|
22611
|
+
projects: z74.array(projectStatusSchema)
|
|
22511
22612
|
});
|
|
22512
22613
|
|
|
22513
22614
|
// ../contracts/src/run-dispatch.ts
|
|
22514
|
-
import { z as
|
|
22515
|
-
var providerBatchRequestOutcomeSchema =
|
|
22615
|
+
import { z as z75 } from "zod";
|
|
22616
|
+
var providerBatchRequestOutcomeSchema = z75.enum([
|
|
22516
22617
|
"recorded",
|
|
22517
22618
|
"errored",
|
|
22518
22619
|
"expired",
|
|
@@ -22521,7 +22622,7 @@ var providerBatchRequestOutcomeSchema = z74.enum([
|
|
|
22521
22622
|
"duplicate"
|
|
22522
22623
|
]);
|
|
22523
22624
|
var ProviderBatchRequestOutcomes = providerBatchRequestOutcomeSchema.enum;
|
|
22524
|
-
var providerBatchIneligibilityReasonSchema =
|
|
22625
|
+
var providerBatchIneligibilityReasonSchema = z75.enum([
|
|
22525
22626
|
"not_plan_run",
|
|
22526
22627
|
"scoped_run",
|
|
22527
22628
|
"probe_run",
|
|
@@ -22624,18 +22725,18 @@ function summarizeRunUsage(rows) {
|
|
|
22624
22725
|
}
|
|
22625
22726
|
|
|
22626
22727
|
// ../contracts/src/snapshot.ts
|
|
22627
|
-
import { z as
|
|
22628
|
-
var snapshotProviderModeSchema =
|
|
22728
|
+
import { z as z76 } from "zod";
|
|
22729
|
+
var snapshotProviderModeSchema = z76.enum(["all", "api", "browser"]);
|
|
22629
22730
|
var SnapshotProviderModes = snapshotProviderModeSchema.enum;
|
|
22630
|
-
var snapshotAccuracySchema =
|
|
22631
|
-
var snapshotQueryListSchema =
|
|
22632
|
-
var snapshotRequestInputSchema =
|
|
22633
|
-
companyName:
|
|
22634
|
-
domain:
|
|
22731
|
+
var snapshotAccuracySchema = z76.enum(["yes", "no", "unknown", "not-mentioned"]);
|
|
22732
|
+
var snapshotQueryListSchema = z76.array(z76.string().min(1));
|
|
22733
|
+
var snapshotRequestInputSchema = z76.object({
|
|
22734
|
+
companyName: z76.string().min(1),
|
|
22735
|
+
domain: z76.string().min(1),
|
|
22635
22736
|
queries: snapshotQueryListSchema.optional(),
|
|
22636
22737
|
phrases: snapshotQueryListSchema.optional(),
|
|
22637
|
-
competitors:
|
|
22638
|
-
providers:
|
|
22738
|
+
competitors: z76.array(z76.string().min(1)).optional(),
|
|
22739
|
+
providers: z76.array(z76.string().trim().min(1)).min(1).optional().describe("Configured provider names to use for both answers and analysis. Omit to use all providers matching providerMode."),
|
|
22639
22740
|
providerMode: snapshotProviderModeSchema.optional().describe("Filter providers by transport; defaults to all. Browser-only selection requires manual queries and uses no API provider for analysis.")
|
|
22640
22741
|
}).superRefine((input, ctx) => {
|
|
22641
22742
|
if (input.queries !== void 0 && input.phrases !== void 0) {
|
|
@@ -22652,106 +22753,106 @@ var snapshotRequestSchema = snapshotRequestInputSchema.safeExtend({
|
|
|
22652
22753
|
function resolveSnapshotRequestQueries(input) {
|
|
22653
22754
|
return input.queries ?? input.phrases ?? [];
|
|
22654
22755
|
}
|
|
22655
|
-
var snapshotCompetitorEntrySchema =
|
|
22656
|
-
name:
|
|
22657
|
-
count:
|
|
22658
|
-
});
|
|
22659
|
-
var snapshotAuditFactorSchema =
|
|
22660
|
-
id:
|
|
22661
|
-
name:
|
|
22662
|
-
weight:
|
|
22663
|
-
score:
|
|
22664
|
-
findings:
|
|
22665
|
-
type:
|
|
22666
|
-
message:
|
|
22756
|
+
var snapshotCompetitorEntrySchema = z76.object({
|
|
22757
|
+
name: z76.string(),
|
|
22758
|
+
count: z76.number().int().nonnegative()
|
|
22759
|
+
});
|
|
22760
|
+
var snapshotAuditFactorSchema = z76.object({
|
|
22761
|
+
id: z76.string(),
|
|
22762
|
+
name: z76.string(),
|
|
22763
|
+
weight: z76.number(),
|
|
22764
|
+
score: z76.number(),
|
|
22765
|
+
findings: z76.array(z76.object({
|
|
22766
|
+
type: z76.string(),
|
|
22767
|
+
message: z76.string()
|
|
22667
22768
|
})).default([]),
|
|
22668
|
-
recommendations:
|
|
22669
|
-
});
|
|
22670
|
-
var snapshotAuditSchema =
|
|
22671
|
-
url:
|
|
22672
|
-
finalUrl:
|
|
22673
|
-
auditedAt:
|
|
22674
|
-
overallScore:
|
|
22675
|
-
summary:
|
|
22676
|
-
factors:
|
|
22677
|
-
});
|
|
22678
|
-
var snapshotProfileSchema =
|
|
22679
|
-
industry:
|
|
22680
|
-
summary:
|
|
22681
|
-
services:
|
|
22682
|
-
categoryTerms:
|
|
22683
|
-
});
|
|
22684
|
-
var snapshotProviderResultSchema =
|
|
22685
|
-
provider:
|
|
22686
|
-
displayName:
|
|
22687
|
-
model:
|
|
22688
|
-
mentioned:
|
|
22689
|
-
cited:
|
|
22769
|
+
recommendations: z76.array(z76.string()).default([])
|
|
22770
|
+
});
|
|
22771
|
+
var snapshotAuditSchema = z76.object({
|
|
22772
|
+
url: z76.string(),
|
|
22773
|
+
finalUrl: z76.string(),
|
|
22774
|
+
auditedAt: z76.string(),
|
|
22775
|
+
overallScore: z76.number(),
|
|
22776
|
+
summary: z76.string(),
|
|
22777
|
+
factors: z76.array(snapshotAuditFactorSchema).default([])
|
|
22778
|
+
});
|
|
22779
|
+
var snapshotProfileSchema = z76.object({
|
|
22780
|
+
industry: z76.string(),
|
|
22781
|
+
summary: z76.string(),
|
|
22782
|
+
services: z76.array(z76.string()).default([]),
|
|
22783
|
+
categoryTerms: z76.array(z76.string()).default([])
|
|
22784
|
+
});
|
|
22785
|
+
var snapshotProviderResultSchema = z76.object({
|
|
22786
|
+
provider: z76.string(),
|
|
22787
|
+
displayName: z76.string(),
|
|
22788
|
+
model: z76.string().nullable().optional(),
|
|
22789
|
+
mentioned: z76.boolean(),
|
|
22790
|
+
cited: z76.boolean(),
|
|
22690
22791
|
describedAccurately: snapshotAccuracySchema,
|
|
22691
|
-
accuracyNotes:
|
|
22692
|
-
incorrectClaims:
|
|
22693
|
-
recommendedCompetitors:
|
|
22694
|
-
citedDomains:
|
|
22695
|
-
groundingSources:
|
|
22696
|
-
searchQueries:
|
|
22697
|
-
answerText:
|
|
22698
|
-
error:
|
|
22792
|
+
accuracyNotes: z76.string().nullable().optional(),
|
|
22793
|
+
incorrectClaims: z76.array(z76.string()).default([]),
|
|
22794
|
+
recommendedCompetitors: z76.array(z76.string()).default([]),
|
|
22795
|
+
citedDomains: z76.array(z76.string()).default([]),
|
|
22796
|
+
groundingSources: z76.array(groundingSourceSchema).default([]),
|
|
22797
|
+
searchQueries: z76.array(z76.string()).default([]),
|
|
22798
|
+
answerText: z76.string(),
|
|
22799
|
+
error: z76.string().nullable().optional(),
|
|
22699
22800
|
/** Vendor-neutral answer evidence (answer services); absent for answer engines. */
|
|
22700
22801
|
evidence: answerEvidenceSchema.nullable().optional(),
|
|
22701
22802
|
/** False when the provider's sources are not tied to its answer, so `cited` was not measured. */
|
|
22702
|
-
citationMeasured:
|
|
22803
|
+
citationMeasured: z76.boolean().optional()
|
|
22703
22804
|
});
|
|
22704
|
-
var snapshotQueryResultSchema =
|
|
22705
|
-
query:
|
|
22706
|
-
providerResults:
|
|
22805
|
+
var snapshotQueryResultSchema = z76.object({
|
|
22806
|
+
query: z76.string(),
|
|
22807
|
+
providerResults: z76.array(snapshotProviderResultSchema).default([])
|
|
22707
22808
|
});
|
|
22708
|
-
var snapshotSummarySchema =
|
|
22709
|
-
totalQueries:
|
|
22710
|
-
totalProviders:
|
|
22711
|
-
totalComparisons:
|
|
22712
|
-
mentionCount:
|
|
22809
|
+
var snapshotSummarySchema = z76.object({
|
|
22810
|
+
totalQueries: z76.number().int().nonnegative(),
|
|
22811
|
+
totalProviders: z76.number().int().nonnegative(),
|
|
22812
|
+
totalComparisons: z76.number().int().nonnegative(),
|
|
22813
|
+
mentionCount: z76.number().int().nonnegative(),
|
|
22713
22814
|
/** Successful responses whose citation was measured and found the domain cited; read against `citationComparisons`. */
|
|
22714
|
-
citationCount:
|
|
22815
|
+
citationCount: z76.number().int().nonnegative(),
|
|
22715
22816
|
/**
|
|
22716
22817
|
* Successful responses whose citation could be measured: the denominator of
|
|
22717
22818
|
* `citationCount`. Lower than `totalComparisons` when a provider's sources
|
|
22718
22819
|
* are not tied to its answer, so those answers are neither cited nor not
|
|
22719
22820
|
* cited. Absent on reports made before it existed (read `totalComparisons`).
|
|
22720
22821
|
*/
|
|
22721
|
-
citationComparisons:
|
|
22722
|
-
topCompetitors:
|
|
22723
|
-
visibilityGap:
|
|
22724
|
-
whatThisMeans:
|
|
22725
|
-
recommendedActions:
|
|
22726
|
-
});
|
|
22727
|
-
var snapshotReportSchema =
|
|
22728
|
-
companyName:
|
|
22729
|
-
domain:
|
|
22730
|
-
homepageUrl:
|
|
22731
|
-
generatedAt:
|
|
22732
|
-
queries:
|
|
22733
|
-
competitors:
|
|
22822
|
+
citationComparisons: z76.number().int().nonnegative().optional(),
|
|
22823
|
+
topCompetitors: z76.array(snapshotCompetitorEntrySchema).default([]),
|
|
22824
|
+
visibilityGap: z76.string(),
|
|
22825
|
+
whatThisMeans: z76.array(z76.string()).default([]),
|
|
22826
|
+
recommendedActions: z76.array(z76.string()).default([])
|
|
22827
|
+
});
|
|
22828
|
+
var snapshotReportSchema = z76.object({
|
|
22829
|
+
companyName: z76.string(),
|
|
22830
|
+
domain: z76.string(),
|
|
22831
|
+
homepageUrl: z76.string(),
|
|
22832
|
+
generatedAt: z76.string(),
|
|
22833
|
+
queries: z76.array(z76.string()).default([]),
|
|
22834
|
+
competitors: z76.array(z76.string()).default([]),
|
|
22734
22835
|
profile: snapshotProfileSchema,
|
|
22735
22836
|
audit: snapshotAuditSchema,
|
|
22736
|
-
queryResults:
|
|
22837
|
+
queryResults: z76.array(snapshotQueryResultSchema).default([]),
|
|
22737
22838
|
summary: snapshotSummarySchema
|
|
22738
22839
|
});
|
|
22739
22840
|
|
|
22740
22841
|
// ../contracts/src/competitor-suggestions.ts
|
|
22741
|
-
import { z as
|
|
22742
|
-
var competitorSuggestionsQuerySchema =
|
|
22842
|
+
import { z as z77 } from "zod";
|
|
22843
|
+
var competitorSuggestionsQuerySchema = z77.object({
|
|
22743
22844
|
window: metricsWindowSchema.optional(),
|
|
22744
|
-
minAnswers:
|
|
22745
|
-
queryClass:
|
|
22746
|
-
groupKey:
|
|
22747
|
-
limit:
|
|
22845
|
+
minAnswers: z77.coerce.number().int().min(1).max(1e3).optional(),
|
|
22846
|
+
queryClass: z77.enum(["non-brand", "branded", "all"]).optional(),
|
|
22847
|
+
groupKey: z77.string().trim().min(1).optional(),
|
|
22848
|
+
limit: z77.coerce.number().int().min(1).max(100).optional()
|
|
22748
22849
|
}).strict();
|
|
22749
|
-
var competitorSuggestionNameSchema =
|
|
22750
|
-
name:
|
|
22751
|
-
answerCount:
|
|
22752
|
-
pairedAnswers:
|
|
22850
|
+
var competitorSuggestionNameSchema = z77.object({
|
|
22851
|
+
name: z77.string().trim().min(1),
|
|
22852
|
+
answerCount: z77.number().int().nonnegative(),
|
|
22853
|
+
pairedAnswers: z77.number().int().nonnegative()
|
|
22753
22854
|
}).strict();
|
|
22754
|
-
var competitorSuggestionReasonSchema =
|
|
22855
|
+
var competitorSuggestionReasonSchema = z77.enum([
|
|
22755
22856
|
"below-min-answers",
|
|
22756
22857
|
"not-named",
|
|
22757
22858
|
"unpaired-name",
|
|
@@ -22762,56 +22863,56 @@ var competitorSuggestionReasonSchema = z76.enum([
|
|
|
22762
22863
|
"shared-host"
|
|
22763
22864
|
]);
|
|
22764
22865
|
var CompetitorSuggestionReasons = competitorSuggestionReasonSchema.enum;
|
|
22765
|
-
var competitorSuggestionStatusSchema =
|
|
22866
|
+
var competitorSuggestionStatusSchema = z77.enum(["suggested", "tracked", "excluded"]);
|
|
22766
22867
|
var CompetitorSuggestionStatuses = competitorSuggestionStatusSchema.enum;
|
|
22767
|
-
var competitorSuggestionSchema =
|
|
22768
|
-
domain:
|
|
22769
|
-
label:
|
|
22770
|
-
names:
|
|
22771
|
-
namingAnswers:
|
|
22772
|
-
citingAnswers:
|
|
22773
|
-
bothAnswers:
|
|
22774
|
-
pairedAnswers:
|
|
22775
|
-
namedByOtherNameAnswers:
|
|
22776
|
-
sweeps:
|
|
22777
|
-
firstSeenAt:
|
|
22778
|
-
lastSeenAt:
|
|
22868
|
+
var competitorSuggestionSchema = z77.object({
|
|
22869
|
+
domain: z77.string().trim().min(1),
|
|
22870
|
+
label: z77.string().trim().min(1),
|
|
22871
|
+
names: z77.array(competitorSuggestionNameSchema).max(5),
|
|
22872
|
+
namingAnswers: z77.number().int().nonnegative(),
|
|
22873
|
+
citingAnswers: z77.number().int().nonnegative(),
|
|
22874
|
+
bothAnswers: z77.number().int().nonnegative(),
|
|
22875
|
+
pairedAnswers: z77.number().int().nonnegative(),
|
|
22876
|
+
namedByOtherNameAnswers: z77.number().int().nonnegative(),
|
|
22877
|
+
sweeps: z77.number().int().nonnegative(),
|
|
22878
|
+
firstSeenAt: z77.string().datetime().nullable(),
|
|
22879
|
+
lastSeenAt: z77.string().datetime().nullable(),
|
|
22779
22880
|
surfaceClass: competitorLandscapeSurfaceClassSchema,
|
|
22780
|
-
tracked:
|
|
22781
|
-
marketKeys:
|
|
22881
|
+
tracked: z77.boolean(),
|
|
22882
|
+
marketKeys: z77.array(z77.string().trim().min(1)).optional(),
|
|
22782
22883
|
status: competitorSuggestionStatusSchema,
|
|
22783
22884
|
reason: competitorSuggestionReasonSchema.nullable(),
|
|
22784
|
-
sampleUrls:
|
|
22885
|
+
sampleUrls: z77.array(z77.string().url()).max(3)
|
|
22785
22886
|
}).strict();
|
|
22786
|
-
var competitorSuggestionsResponseSchema =
|
|
22787
|
-
project:
|
|
22887
|
+
var competitorSuggestionsResponseSchema = z77.object({
|
|
22888
|
+
project: z77.string().trim().min(1),
|
|
22788
22889
|
window: metricsWindowSchema,
|
|
22789
22890
|
scope: competitorLandscapeScopeSchema,
|
|
22790
|
-
filters:
|
|
22791
|
-
queryClass:
|
|
22792
|
-
groupKey:
|
|
22793
|
-
limit:
|
|
22794
|
-
minAnswers:
|
|
22891
|
+
filters: z77.object({
|
|
22892
|
+
queryClass: z77.enum(["non-brand", "branded", "all"]),
|
|
22893
|
+
groupKey: z77.string().nullable(),
|
|
22894
|
+
limit: z77.number().int().positive(),
|
|
22895
|
+
minAnswers: z77.number().int().positive()
|
|
22795
22896
|
}).strict(),
|
|
22796
|
-
thresholds:
|
|
22797
|
-
candidates:
|
|
22798
|
-
candidatesTotal:
|
|
22799
|
-
excludedCounts:
|
|
22800
|
-
unresolvedNames:
|
|
22801
|
-
evidence:
|
|
22802
|
-
answeredResults:
|
|
22803
|
-
sourceResults:
|
|
22804
|
-
excludedProbeResults:
|
|
22805
|
-
excludedNonCompletedResults:
|
|
22897
|
+
thresholds: z77.object({ minAnswers: z77.number().int().positive() }).strict(),
|
|
22898
|
+
candidates: z77.array(competitorSuggestionSchema),
|
|
22899
|
+
candidatesTotal: z77.number().int().nonnegative(),
|
|
22900
|
+
excludedCounts: z77.record(z77.string(), z77.number().int().nonnegative()),
|
|
22901
|
+
unresolvedNames: z77.array(z77.object({ name: z77.string().trim().min(1), answerCount: z77.number().int().nonnegative() }).strict()),
|
|
22902
|
+
evidence: z77.object({
|
|
22903
|
+
answeredResults: z77.number().int().nonnegative(),
|
|
22904
|
+
sourceResults: z77.number().int().nonnegative(),
|
|
22905
|
+
excludedProbeResults: z77.number().int().nonnegative(),
|
|
22906
|
+
excludedNonCompletedResults: z77.number().int().nonnegative()
|
|
22806
22907
|
}).strict(),
|
|
22807
|
-
runCount:
|
|
22808
|
-
runIds:
|
|
22809
|
-
countUnits:
|
|
22810
|
-
answers:
|
|
22811
|
-
distinctNames:
|
|
22812
|
-
runs:
|
|
22908
|
+
runCount: z77.number().int().nonnegative(),
|
|
22909
|
+
runIds: z77.array(z77.string()),
|
|
22910
|
+
countUnits: z77.object({
|
|
22911
|
+
answers: z77.array(z77.string()),
|
|
22912
|
+
distinctNames: z77.array(z77.string()),
|
|
22913
|
+
runs: z77.array(z77.string())
|
|
22813
22914
|
}).strict(),
|
|
22814
|
-
truncated:
|
|
22915
|
+
truncated: z77.boolean()
|
|
22815
22916
|
}).strict();
|
|
22816
22917
|
var COMPETITOR_SUGGESTION_COUNT_UNITS = {
|
|
22817
22918
|
...COMPETITOR_LANDSCAPE_COUNT_UNITS,
|
|
@@ -22829,9 +22930,9 @@ var COMPETITOR_SUGGESTION_COUNT_UNITS = {
|
|
|
22829
22930
|
};
|
|
22830
22931
|
|
|
22831
22932
|
// ../contracts/src/intelligence.ts
|
|
22832
|
-
import { z as
|
|
22833
|
-
var insightSeveritySchema =
|
|
22834
|
-
var insightActionGroupSchema =
|
|
22933
|
+
import { z as z78 } from "zod";
|
|
22934
|
+
var insightSeveritySchema = z78.enum(["critical", "high", "medium", "low"]);
|
|
22935
|
+
var insightActionGroupSchema = z78.enum(["write", "investigate", "monitor"]);
|
|
22835
22936
|
var InsightActionGroups = insightActionGroupSchema.enum;
|
|
22836
22937
|
var insightActionGroupByType = {
|
|
22837
22938
|
// Content-required: a missing or competitive answer needs new or updated material.
|
|
@@ -22853,10 +22954,10 @@ var insightActionGroupByType = {
|
|
|
22853
22954
|
"gbp-metric-drop": InsightActionGroups.investigate,
|
|
22854
22955
|
"gbp-keyword-drop": InsightActionGroups.investigate
|
|
22855
22956
|
};
|
|
22856
|
-
var healthSnapshotDtoSchema =
|
|
22857
|
-
id:
|
|
22858
|
-
projectId:
|
|
22859
|
-
runId:
|
|
22957
|
+
var healthSnapshotDtoSchema = z78.object({
|
|
22958
|
+
id: z78.string(),
|
|
22959
|
+
projectId: z78.string(),
|
|
22960
|
+
runId: z78.string().nullable(),
|
|
22860
22961
|
overallCitedRate: fraction(),
|
|
22861
22962
|
/**
|
|
22862
22963
|
* Share of (query × provider) pairs where the project was MENTIONED in the
|
|
@@ -22865,46 +22966,46 @@ var healthSnapshotDtoSchema = z77.object({
|
|
|
22865
22966
|
* as 0 (the API coalesces NULL→0).
|
|
22866
22967
|
*/
|
|
22867
22968
|
overallMentionRate: fraction(),
|
|
22868
|
-
totalPairs:
|
|
22869
|
-
citedPairs:
|
|
22969
|
+
totalPairs: z78.number().int().nonnegative(),
|
|
22970
|
+
citedPairs: z78.number().int().nonnegative(),
|
|
22870
22971
|
/** Count of pairs mentioned in the answer text. Legacy rows read back as 0. */
|
|
22871
|
-
mentionedPairs:
|
|
22872
|
-
providerBreakdown:
|
|
22972
|
+
mentionedPairs: z78.number().int().nonnegative(),
|
|
22973
|
+
providerBreakdown: z78.record(z78.string(), z78.object({
|
|
22873
22974
|
citedRate: fraction(),
|
|
22874
22975
|
mentionRate: fraction(),
|
|
22875
|
-
cited:
|
|
22876
|
-
mentioned:
|
|
22877
|
-
total:
|
|
22976
|
+
cited: z78.number().int().nonnegative(),
|
|
22977
|
+
mentioned: z78.number().int().nonnegative(),
|
|
22978
|
+
total: z78.number().int().nonnegative()
|
|
22878
22979
|
})),
|
|
22879
|
-
createdAt:
|
|
22980
|
+
createdAt: z78.string(),
|
|
22880
22981
|
/**
|
|
22881
22982
|
* `'ready'` when the snapshot reflects real data; `'no-data'` for the
|
|
22882
22983
|
* sentinel returned by `/health/latest` when a project has no health
|
|
22883
22984
|
* snapshots yet (newly created, or only failed runs). Numeric fields are
|
|
22884
22985
|
* zero and `providerBreakdown` is `{}` in the no-data case.
|
|
22885
22986
|
*/
|
|
22886
|
-
status:
|
|
22987
|
+
status: z78.enum(["ready", "no-data"]),
|
|
22887
22988
|
/** Reason for `status === 'no-data'`. Absent when `status === 'ready'`. */
|
|
22888
|
-
reason:
|
|
22989
|
+
reason: z78.literal("no-runs-yet").optional()
|
|
22889
22990
|
});
|
|
22890
22991
|
|
|
22891
22992
|
// ../contracts/src/agent.ts
|
|
22892
|
-
import { z as
|
|
22893
|
-
var agentViewContextSchema =
|
|
22894
|
-
view:
|
|
22895
|
-
unavailableReason:
|
|
22993
|
+
import { z as z79 } from "zod";
|
|
22994
|
+
var agentViewContextSchema = z79.object({
|
|
22995
|
+
view: z79.enum(["project", "visibility", "property", "queries", "site-health"]),
|
|
22996
|
+
unavailableReason: z79.string().trim().min(1).max(512).optional(),
|
|
22896
22997
|
selection: visibilityReportRequestSchema.optional(),
|
|
22897
|
-
page:
|
|
22898
|
-
runId:
|
|
22899
|
-
nodeKey:
|
|
22998
|
+
page: z79.object({
|
|
22999
|
+
runId: z79.string().trim().min(1).max(256).optional(),
|
|
23000
|
+
nodeKey: z79.string().trim().min(1).max(2048).optional()
|
|
22900
23001
|
}).strict().optional()
|
|
22901
23002
|
}).strict().superRefine((value, ctx) => {
|
|
22902
23003
|
if (value.page && value.view !== "site-health") ctx.addIssue({ code: "custom", message: "Page context requires Site Health." });
|
|
22903
23004
|
if (value.selection && !["visibility", "property", "queries"].includes(value.view)) ctx.addIssue({ code: "custom", message: "Measurement selection requires a measurement view." });
|
|
22904
23005
|
});
|
|
22905
|
-
var agentTurnLimitsSchema =
|
|
22906
|
-
maxToolCalls:
|
|
22907
|
-
timeoutMs:
|
|
23006
|
+
var agentTurnLimitsSchema = z79.object({
|
|
23007
|
+
maxToolCalls: z79.number().int().min(1).max(100).default(30),
|
|
23008
|
+
timeoutMs: z79.number().int().min(1e3).max(6e5).default(18e4)
|
|
22908
23009
|
}).strict();
|
|
22909
23010
|
function agentVisibilityEvidence(report, project, retrievedAt) {
|
|
22910
23011
|
const selection = report.selection;
|
|
@@ -22947,34 +23048,34 @@ function agentVisibilityEvidence(report, project, retrievedAt) {
|
|
|
22947
23048
|
))
|
|
22948
23049
|
};
|
|
22949
23050
|
}
|
|
22950
|
-
var agentProviderIdSchema =
|
|
22951
|
-
var agentProviderOptionDtoSchema =
|
|
23051
|
+
var agentProviderIdSchema = z79.enum(["claude", "openai", "gemini", "zai", "openrouter"]);
|
|
23052
|
+
var agentProviderOptionDtoSchema = z79.object({
|
|
22952
23053
|
/** Stable identifier — what clients pass back as `provider` on the prompt endpoint. */
|
|
22953
23054
|
id: agentProviderIdSchema,
|
|
22954
23055
|
/** Human-readable label for UI pickers, e.g. "Anthropic (Claude)". */
|
|
22955
|
-
label:
|
|
23056
|
+
label: z79.string(),
|
|
22956
23057
|
/** Default model if the caller doesn't pick one. */
|
|
22957
|
-
defaultModel:
|
|
23058
|
+
defaultModel: z79.string(),
|
|
22958
23059
|
/** Whether a usable API key was found (config.yaml or provider env var). */
|
|
22959
|
-
configured:
|
|
23060
|
+
configured: z79.boolean(),
|
|
22960
23061
|
/**
|
|
22961
23062
|
* Where the key resolved from, if any. `null` when `configured === false`.
|
|
22962
23063
|
* Surfaced so the UI can nudge users toward their preferred source of truth.
|
|
22963
23064
|
*/
|
|
22964
|
-
keySource:
|
|
23065
|
+
keySource: z79.enum(["config", "env"]).nullable(),
|
|
22965
23066
|
/**
|
|
22966
23067
|
* A short list of models to offer for this provider: the default first,
|
|
22967
23068
|
* then a few stronger current models. A pinned model outside the list is
|
|
22968
23069
|
* listed first. Any other model ID can still be requested.
|
|
22969
23070
|
*/
|
|
22970
|
-
models:
|
|
23071
|
+
models: z79.array(z79.object({ id: z79.string(), displayName: z79.string() })).optional()
|
|
22971
23072
|
});
|
|
22972
|
-
var agentProvidersResponseDtoSchema =
|
|
23073
|
+
var agentProvidersResponseDtoSchema = z79.object({
|
|
22973
23074
|
/**
|
|
22974
23075
|
* Every provider Aero knows about. `configured === false` entries are
|
|
22975
23076
|
* included so the UI can render them disabled with an onboarding hint.
|
|
22976
23077
|
*/
|
|
22977
|
-
providers:
|
|
23078
|
+
providers: z79.array(agentProviderOptionDtoSchema).default([]),
|
|
22978
23079
|
/**
|
|
22979
23080
|
* Provider a new session uses when the caller names none: the
|
|
22980
23081
|
* `agent.provider` pin when set (reported even without a key, as its
|
|
@@ -22984,50 +23085,50 @@ var agentProvidersResponseDtoSchema = z78.object({
|
|
|
22984
23085
|
*/
|
|
22985
23086
|
defaultProvider: agentProviderIdSchema.nullable()
|
|
22986
23087
|
});
|
|
22987
|
-
var memorySourceSchema =
|
|
23088
|
+
var memorySourceSchema = z79.enum(["aero", "user", "compaction"]);
|
|
22988
23089
|
var MemorySources = memorySourceSchema.enum;
|
|
22989
23090
|
var AGENT_MEMORY_VALUE_MAX_BYTES = 2 * 1024;
|
|
22990
23091
|
var AGENT_MEMORY_KEY_MAX_LENGTH = 128;
|
|
22991
|
-
var agentMemoryUpsertRequestSchema =
|
|
22992
|
-
key:
|
|
22993
|
-
value:
|
|
23092
|
+
var agentMemoryUpsertRequestSchema = z79.object({
|
|
23093
|
+
key: z79.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH),
|
|
23094
|
+
value: z79.string().min(1)
|
|
22994
23095
|
});
|
|
22995
|
-
var agentMemoryDeleteRequestSchema =
|
|
22996
|
-
key:
|
|
23096
|
+
var agentMemoryDeleteRequestSchema = z79.object({
|
|
23097
|
+
key: z79.string().min(1).max(AGENT_MEMORY_KEY_MAX_LENGTH)
|
|
22997
23098
|
});
|
|
22998
|
-
var agentPromptRequestSchema =
|
|
22999
|
-
prompt:
|
|
23000
|
-
conversationId:
|
|
23099
|
+
var agentPromptRequestSchema = z79.object({
|
|
23100
|
+
prompt: z79.string().trim().min(1),
|
|
23101
|
+
conversationId: z79.string().min(1).nullable().optional(),
|
|
23001
23102
|
provider: agentProviderIdSchema.optional(),
|
|
23002
|
-
modelId:
|
|
23003
|
-
scope:
|
|
23004
|
-
profile:
|
|
23103
|
+
modelId: z79.string().trim().min(1).optional(),
|
|
23104
|
+
scope: z79.enum(["all", "read-only"]).optional(),
|
|
23105
|
+
profile: z79.enum(["default", "ads-operator"]).optional(),
|
|
23005
23106
|
context: agentViewContextSchema.optional(),
|
|
23006
23107
|
limits: agentTurnLimitsSchema.optional()
|
|
23007
23108
|
});
|
|
23008
|
-
var agentConversationMessageSchema =
|
|
23009
|
-
var agentConversationSummarySchema =
|
|
23010
|
-
id:
|
|
23011
|
-
title:
|
|
23012
|
-
active:
|
|
23013
|
-
modelProvider:
|
|
23014
|
-
modelId:
|
|
23015
|
-
createdAt:
|
|
23016
|
-
updatedAt:
|
|
23109
|
+
var agentConversationMessageSchema = z79.looseObject({ role: z79.string(), content: z79.unknown().optional() });
|
|
23110
|
+
var agentConversationSummarySchema = z79.object({
|
|
23111
|
+
id: z79.string(),
|
|
23112
|
+
title: z79.string(),
|
|
23113
|
+
active: z79.boolean(),
|
|
23114
|
+
modelProvider: z79.string(),
|
|
23115
|
+
modelId: z79.string(),
|
|
23116
|
+
createdAt: z79.string(),
|
|
23117
|
+
updatedAt: z79.string()
|
|
23017
23118
|
});
|
|
23018
23119
|
var agentConversationSchema = agentConversationSummarySchema.extend({
|
|
23019
|
-
messages:
|
|
23020
|
-
isStreaming:
|
|
23120
|
+
messages: z79.array(agentConversationMessageSchema),
|
|
23121
|
+
isStreaming: z79.boolean()
|
|
23021
23122
|
});
|
|
23022
|
-
var agentConversationListSchema =
|
|
23023
|
-
conversations:
|
|
23024
|
-
currentConversationId:
|
|
23025
|
-
nextOffset:
|
|
23123
|
+
var agentConversationListSchema = z79.object({
|
|
23124
|
+
conversations: z79.array(agentConversationSummarySchema),
|
|
23125
|
+
currentConversationId: z79.string().nullable(),
|
|
23126
|
+
nextOffset: z79.number().int().nullable()
|
|
23026
23127
|
});
|
|
23027
|
-
var agentConversationCreateSchema =
|
|
23028
|
-
id:
|
|
23128
|
+
var agentConversationCreateSchema = z79.object({
|
|
23129
|
+
id: z79.uuid()
|
|
23029
23130
|
}).strict();
|
|
23030
|
-
var agentConversationDeleteSchema =
|
|
23131
|
+
var agentConversationDeleteSchema = z79.object({ id: z79.string(), status: z79.literal("deleted") });
|
|
23031
23132
|
function agentConversationTitle(messages) {
|
|
23032
23133
|
for (const message of messages) {
|
|
23033
23134
|
if (message.role !== "user") continue;
|
|
@@ -23039,49 +23140,49 @@ function agentConversationTitle(messages) {
|
|
|
23039
23140
|
return "New conversation";
|
|
23040
23141
|
}
|
|
23041
23142
|
var aeroPreviewStarterIds = ["status", "changes", "gaps", "insights"];
|
|
23042
|
-
var aeroPreviewStarterIdSchema =
|
|
23043
|
-
var aeroPreviewStepSchema =
|
|
23143
|
+
var aeroPreviewStarterIdSchema = z79.enum(aeroPreviewStarterIds);
|
|
23144
|
+
var aeroPreviewStepSchema = z79.object({
|
|
23044
23145
|
/** Assistant text shown before the tool call, when the turn narrates it. */
|
|
23045
|
-
text:
|
|
23046
|
-
tool:
|
|
23146
|
+
text: z79.string().optional(),
|
|
23147
|
+
tool: z79.object({
|
|
23047
23148
|
/** Real Canonry MCP tool name, such as canonry_visibility_report. */
|
|
23048
|
-
name:
|
|
23149
|
+
name: z79.string(),
|
|
23049
23150
|
/** The tool's registered title, which the live bar shows as the card label. */
|
|
23050
|
-
label:
|
|
23051
|
-
arguments:
|
|
23151
|
+
label: z79.string(),
|
|
23152
|
+
arguments: z79.record(z79.string(), z79.unknown()),
|
|
23052
23153
|
/** A compact excerpt of the stored result, not the full payload. */
|
|
23053
|
-
result:
|
|
23054
|
-
durationMs:
|
|
23154
|
+
result: z79.unknown(),
|
|
23155
|
+
durationMs: z79.number().int().nonnegative()
|
|
23055
23156
|
})
|
|
23056
23157
|
});
|
|
23057
|
-
var aeroPreviewStarterSchema =
|
|
23158
|
+
var aeroPreviewStarterSchema = z79.object({
|
|
23058
23159
|
id: aeroPreviewStarterIdSchema,
|
|
23059
|
-
steps:
|
|
23160
|
+
steps: z79.array(aeroPreviewStepSchema),
|
|
23060
23161
|
/** Final assistant markdown. */
|
|
23061
|
-
answer:
|
|
23162
|
+
answer: z79.string()
|
|
23062
23163
|
});
|
|
23063
|
-
var aeroPreviewResponseSchema =
|
|
23064
|
-
project:
|
|
23065
|
-
seededAt:
|
|
23066
|
-
starters:
|
|
23164
|
+
var aeroPreviewResponseSchema = z79.object({
|
|
23165
|
+
project: z79.string(),
|
|
23166
|
+
seededAt: z79.string(),
|
|
23167
|
+
starters: z79.array(aeroPreviewStarterSchema)
|
|
23067
23168
|
});
|
|
23068
|
-
var agentConversationListQuerySchema =
|
|
23069
|
-
offset:
|
|
23070
|
-
limit:
|
|
23169
|
+
var agentConversationListQuerySchema = z79.object({
|
|
23170
|
+
offset: z79.coerce.number().int().min(0).default(0),
|
|
23171
|
+
limit: z79.coerce.number().int().min(1).max(100).default(50)
|
|
23071
23172
|
}).strict();
|
|
23072
23173
|
|
|
23073
23174
|
// ../contracts/src/sentiment.ts
|
|
23074
|
-
import { z as
|
|
23175
|
+
import { z as z80 } from "zod";
|
|
23075
23176
|
var SENTIMENT_MODEL = "jev-1.13.0";
|
|
23076
23177
|
var SENTIMENT_OPENROUTER_MODEL = "typesafe/jev-1.13";
|
|
23077
23178
|
var SENTIMENT_OPENROUTER_SERVED_MODEL = "typesafe/jev-1.13-20260917";
|
|
23078
|
-
var sentimentEvaluatorProviderSchema =
|
|
23179
|
+
var sentimentEvaluatorProviderSchema = z80.enum(["typesafe", "openrouter"]);
|
|
23079
23180
|
var SENTIMENT_INTERVAL_LIMITATION = "Wilson 95% intervals assume independent observations. They exclude classifier error and dependence among related queries, Properties, and sweeps.";
|
|
23080
|
-
var id =
|
|
23081
|
-
var count =
|
|
23082
|
-
var runIds =
|
|
23083
|
-
var rate = fraction(
|
|
23084
|
-
var sentimentOutcomeSchema =
|
|
23181
|
+
var id = z80.string().trim().min(1).max(256);
|
|
23182
|
+
var count = z80.number().int().nonnegative();
|
|
23183
|
+
var runIds = z80.preprocess((value) => typeof value === "string" ? [value] : value, z80.array(id).min(1).max(100));
|
|
23184
|
+
var rate = fraction(z80.number().min(0).max(1)).nullable();
|
|
23185
|
+
var sentimentOutcomeSchema = z80.enum([
|
|
23085
23186
|
"favorable",
|
|
23086
23187
|
"mixed",
|
|
23087
23188
|
"unfavorable",
|
|
@@ -23102,22 +23203,22 @@ var sentimentOutcomeSchema = z79.enum([
|
|
|
23102
23203
|
"canceled"
|
|
23103
23204
|
]);
|
|
23104
23205
|
var SentimentOutcomes = sentimentOutcomeSchema.enum;
|
|
23105
|
-
var sentimentStateSchema =
|
|
23106
|
-
var sentimentEvaluationDefinitionSchema =
|
|
23107
|
-
schemaVersion:
|
|
23108
|
-
requestedModel:
|
|
23206
|
+
var sentimentStateSchema = z80.enum(["disabled", "not-measured", "processing", "partial", "complete", "failed", "canceled", "unsupported"]);
|
|
23207
|
+
var sentimentEvaluationDefinitionSchema = z80.object({
|
|
23208
|
+
schemaVersion: z80.union([z80.literal(1), z80.literal(2)]),
|
|
23209
|
+
requestedModel: z80.enum([SENTIMENT_MODEL, SENTIMENT_OPENROUTER_MODEL]),
|
|
23109
23210
|
/** Omitted on historical direct TypeSafe definitions to preserve their immutable identity. */
|
|
23110
23211
|
provider: sentimentEvaluatorProviderSchema.optional(),
|
|
23111
|
-
expectedReturnedModel:
|
|
23212
|
+
expectedReturnedModel: z80.literal(SENTIMENT_OPENROUTER_SERVED_MODEL).optional(),
|
|
23112
23213
|
verdictVersion: id,
|
|
23113
23214
|
identityVersion: id,
|
|
23114
23215
|
evidenceVersion: id,
|
|
23115
23216
|
segmentationVersion: id,
|
|
23116
23217
|
preprocessingVersion: id,
|
|
23117
|
-
languagePolicy:
|
|
23118
|
-
comparisonMethodVersion:
|
|
23119
|
-
confidenceThreshold:
|
|
23120
|
-
questions:
|
|
23218
|
+
languagePolicy: z80.literal("en-only"),
|
|
23219
|
+
comparisonMethodVersion: z80.literal("wilson-independent-v1"),
|
|
23220
|
+
confidenceThreshold: z80.number().min(0).max(1).nullable(),
|
|
23221
|
+
questions: z80.object({ identity: z80.string(), judgment: z80.string(), stance: z80.string(), conclusion: z80.string(), complaint: z80.string() }).strict()
|
|
23121
23222
|
}).strict().superRefine((definition, ctx) => {
|
|
23122
23223
|
const routed = definition.provider === "openrouter";
|
|
23123
23224
|
if (definition.requestedModel !== (routed ? SENTIMENT_OPENROUTER_MODEL : SENTIMENT_MODEL) || (routed ? definition.expectedReturnedModel !== SENTIMENT_OPENROUTER_SERVED_MODEL : definition.expectedReturnedModel !== void 0)) {
|
|
@@ -23160,7 +23261,7 @@ function storedDefinitionProjection(value) {
|
|
|
23160
23261
|
if (typeof projected.questions === "object" && projected.questions !== null) projected.questions = Object.fromEntries(Object.entries(projected.questions).filter(([key]) => key !== "theme"));
|
|
23161
23262
|
return projected;
|
|
23162
23263
|
}
|
|
23163
|
-
var storedSentimentEvaluationDefinitionSchema =
|
|
23264
|
+
var storedSentimentEvaluationDefinitionSchema = z80.preprocess(storedDefinitionProjection, sentimentEvaluationDefinitionSchema);
|
|
23164
23265
|
function canonicalSentimentJson(value) {
|
|
23165
23266
|
function canonical(item) {
|
|
23166
23267
|
if (Array.isArray(item)) return item.map(canonical);
|
|
@@ -23169,69 +23270,69 @@ function canonicalSentimentJson(value) {
|
|
|
23169
23270
|
}
|
|
23170
23271
|
return JSON.stringify(canonical(value));
|
|
23171
23272
|
}
|
|
23172
|
-
var sentimentSubjectSchema =
|
|
23173
|
-
var sentimentUsageEdgeSchema =
|
|
23174
|
-
var sentimentExecutionContextSchema =
|
|
23273
|
+
var sentimentSubjectSchema = z80.object({ id, displayName: z80.string(), aliases: z80.array(z80.string()), qualifiedAliases: z80.array(z80.string()).default([]), urls: z80.array(z80.string()), mentionNotApplicable: z80.boolean() }).strict();
|
|
23274
|
+
var sentimentUsageEdgeSchema = z80.object({ queryId: id, executionNodeKey: id.nullable(), targetId: id, propertyId: id.nullable(), groupId: id.nullable(), marketId: id.nullable(), queryClass: z80.enum(["branded", "non-brand"]), queryText: z80.string().optional(), location: z80.string().nullable() }).strict();
|
|
23275
|
+
var sentimentExecutionContextSchema = z80.object({
|
|
23175
23276
|
queryId: id,
|
|
23176
|
-
queryText:
|
|
23177
|
-
queryClass:
|
|
23277
|
+
queryText: z80.string(),
|
|
23278
|
+
queryClass: z80.enum(["branded", "non-brand"]),
|
|
23178
23279
|
provider: id,
|
|
23179
|
-
requestedModel:
|
|
23180
|
-
servedModel:
|
|
23181
|
-
location:
|
|
23182
|
-
revision:
|
|
23183
|
-
usageEdges:
|
|
23280
|
+
requestedModel: z80.string().nullable(),
|
|
23281
|
+
servedModel: z80.string().nullable(),
|
|
23282
|
+
location: z80.string().nullable(),
|
|
23283
|
+
revision: z80.number().int().nullable(),
|
|
23284
|
+
usageEdges: z80.array(sentimentUsageEdgeSchema),
|
|
23184
23285
|
locationContext: locationContextSchema.nullable().default(null)
|
|
23185
23286
|
}).strict();
|
|
23186
|
-
var sentimentEvidenceSchema =
|
|
23187
|
-
var sentimentUsageSchema =
|
|
23188
|
-
var sentimentClassifierInputSchema =
|
|
23287
|
+
var sentimentEvidenceSchema = z80.object({ id, text: z80.string().min(1), start: count, end: count }).strict();
|
|
23288
|
+
var sentimentUsageSchema = z80.object({ kind: z80.enum(["reported", "estimated", "unknown"]), inputTokens: count.nullable(), outputTokens: count.nullable() }).strict();
|
|
23289
|
+
var sentimentClassifierInputSchema = z80.object({
|
|
23189
23290
|
sourceSnapshotId: id,
|
|
23190
|
-
sourceText:
|
|
23291
|
+
sourceText: z80.string(),
|
|
23191
23292
|
sourceTextHash: id,
|
|
23192
23293
|
subject: sentimentSubjectSchema,
|
|
23193
23294
|
subjectHash: id,
|
|
23194
23295
|
context: sentimentExecutionContextSchema,
|
|
23195
|
-
language:
|
|
23296
|
+
language: z80.string(),
|
|
23196
23297
|
definition: sentimentEvaluationDefinitionSchema,
|
|
23197
|
-
sentences:
|
|
23298
|
+
sentences: z80.array(sentimentEvidenceSchema)
|
|
23198
23299
|
}).strict();
|
|
23199
|
-
var storedSentimentClassifierInputSchema =
|
|
23300
|
+
var storedSentimentClassifierInputSchema = z80.preprocess((value) => {
|
|
23200
23301
|
if (typeof value !== "object" || value === null || !("definition" in value)) return value;
|
|
23201
23302
|
return { ...value, definition: storedDefinitionProjection(value.definition) };
|
|
23202
23303
|
}, sentimentClassifierInputSchema);
|
|
23203
|
-
var classifierCommon = { returnedModel:
|
|
23204
|
-
var sentimentClassifierOutputSchema =
|
|
23205
|
-
|
|
23206
|
-
kind:
|
|
23304
|
+
var classifierCommon = { returnedModel: z80.string().nullable(), usage: sentimentUsageSchema };
|
|
23305
|
+
var sentimentClassifierOutputSchema = z80.discriminatedUnion("kind", [
|
|
23306
|
+
z80.object({
|
|
23307
|
+
kind: z80.literal("classified"),
|
|
23207
23308
|
...classifierCommon,
|
|
23208
|
-
returnedModel:
|
|
23309
|
+
returnedModel: z80.string(),
|
|
23209
23310
|
outcome: sentimentOutcomeSchema,
|
|
23210
|
-
conclusion:
|
|
23211
|
-
complaint:
|
|
23212
|
-
confidence:
|
|
23311
|
+
conclusion: z80.array(sentimentEvidenceSchema),
|
|
23312
|
+
complaint: z80.array(sentimentEvidenceSchema).nullable(),
|
|
23313
|
+
confidence: z80.number().min(0).max(1).nullable()
|
|
23213
23314
|
}).strict(),
|
|
23214
|
-
|
|
23215
|
-
|
|
23315
|
+
z80.object({ kind: z80.literal("abstained"), ...classifierCommon, outcome: sentimentOutcomeSchema, reason: z80.string() }).strict(),
|
|
23316
|
+
z80.object({ kind: z80.literal("failed"), ...classifierCommon, outcome: z80.literal("failed"), error: z80.object({ code: id, message: z80.string(), retryable: z80.boolean(), retryAfterMs: z80.number().nonnegative().nullable() }).strict() }).strict()
|
|
23216
23317
|
]).superRefine((result, ctx) => {
|
|
23217
23318
|
if (result.kind === "classified" && ["favorable", "mixed", "unfavorable"].includes(result.outcome) && result.conclusion.length === 0) {
|
|
23218
23319
|
ctx.addIssue({ code: "custom", path: ["conclusion"], message: "Judgments require conclusion evidence" });
|
|
23219
23320
|
}
|
|
23220
23321
|
});
|
|
23221
|
-
var storedSentimentClassifierOutputSchema =
|
|
23222
|
-
var sentimentSelectionBaseSchema =
|
|
23322
|
+
var storedSentimentClassifierOutputSchema = z80.preprocess((value) => typeof value === "object" && value !== null ? Object.fromEntries(Object.entries(value).filter(([key]) => key !== "themes")) : value, sentimentClassifierOutputSchema);
|
|
23323
|
+
var sentimentSelectionBaseSchema = z80.object({
|
|
23223
23324
|
runId: id.optional(),
|
|
23224
23325
|
runIds: runIds.optional(),
|
|
23225
|
-
revision:
|
|
23226
|
-
mode:
|
|
23227
|
-
queryClass:
|
|
23228
|
-
scope:
|
|
23326
|
+
revision: z80.coerce.number().int().positive().optional(),
|
|
23327
|
+
mode: z80.enum(["auto", "simple", "advanced"]).default("auto"),
|
|
23328
|
+
queryClass: z80.enum(["branded", "non-brand"]).default("branded"),
|
|
23329
|
+
scope: z80.enum(["project", "property", "group", "market"]).default("project"),
|
|
23229
23330
|
queryId: id.optional(),
|
|
23230
23331
|
scopeKey: id.optional(),
|
|
23231
23332
|
marketKey: id.optional(),
|
|
23232
23333
|
provider: id.optional(),
|
|
23233
23334
|
model: id.optional(),
|
|
23234
|
-
location:
|
|
23335
|
+
location: z80.string().min(1).optional(),
|
|
23235
23336
|
evaluationDefinitionId: id.optional(),
|
|
23236
23337
|
/** Exact frozen Advanced execution node of the selected query. Identity: it narrows the assessed population. */
|
|
23237
23338
|
executionNodeKey: id.optional()
|
|
@@ -23241,26 +23342,26 @@ function exclusiveSentimentRuns(value, ctx) {
|
|
|
23241
23342
|
if (value.runIds && new Set(value.runIds).size !== value.runIds.length) ctx.addIssue({ code: "custom", path: ["runIds"], message: "Run IDs must be unique." });
|
|
23242
23343
|
}
|
|
23243
23344
|
var sentimentSelectionSchema = sentimentSelectionBaseSchema.superRefine(exclusiveSentimentRuns);
|
|
23244
|
-
var sentimentSummaryIncludeSchema =
|
|
23345
|
+
var sentimentSummaryIncludeSchema = z80.enum(["assessments", "locations"]);
|
|
23245
23346
|
var SENTIMENT_QUERY_PAGE_DEFAULT = 25;
|
|
23246
23347
|
var SENTIMENT_QUERY_PAGE_MAX = 500;
|
|
23247
23348
|
var sentimentSummaryRequestSchema = sentimentSelectionBaseSchema.extend({
|
|
23248
|
-
include:
|
|
23249
|
-
queryLimit:
|
|
23250
|
-
queryCursor:
|
|
23349
|
+
include: z80.preprocess((value) => typeof value === "string" ? value.split(",").map((item) => item.trim()).filter(Boolean) : value, z80.array(sentimentSummaryIncludeSchema).max(2)).optional(),
|
|
23350
|
+
queryLimit: z80.coerce.number().int().min(1).max(SENTIMENT_QUERY_PAGE_MAX).default(SENTIMENT_QUERY_PAGE_DEFAULT),
|
|
23351
|
+
queryCursor: z80.string().min(1).max(16384).optional()
|
|
23251
23352
|
}).superRefine(exclusiveSentimentRuns);
|
|
23252
|
-
var sentimentEvidenceOutcomeFilterSchema =
|
|
23353
|
+
var sentimentEvidenceOutcomeFilterSchema = z80.preprocess((value) => {
|
|
23253
23354
|
const items = typeof value === "string" ? [value] : Array.isArray(value) ? value : null;
|
|
23254
23355
|
return items ? [...new Set(items.flatMap((item) => typeof item === "string" ? item.split(",").map((part) => part.trim()).filter(Boolean) : [item]))] : value;
|
|
23255
|
-
},
|
|
23256
|
-
var sentimentEvidenceRequestSchema = sentimentSelectionBaseSchema.extend({ assessmentId: id.optional(), outcome: sentimentEvidenceOutcomeFilterSchema.optional(), cursor:
|
|
23356
|
+
}, z80.array(sentimentOutcomeSchema).min(1).max(sentimentOutcomeSchema.options.length));
|
|
23357
|
+
var sentimentEvidenceRequestSchema = sentimentSelectionBaseSchema.extend({ assessmentId: id.optional(), outcome: sentimentEvidenceOutcomeFilterSchema.optional(), cursor: z80.string().min(1).max(16384).optional(), limit: z80.coerce.number().int().min(1).max(100).default(50) }).superRefine(exclusiveSentimentRuns);
|
|
23257
23358
|
var sentimentCompareRequestSchema = sentimentSelectionBaseSchema.extend({ fromRunId: id.describe("Run ID or previous-rated to select the preceding run with stored ratings in this scope."), toRunId: id }).superRefine((value, ctx) => {
|
|
23258
23359
|
exclusiveSentimentRuns(value, ctx);
|
|
23259
23360
|
if (value.runIds) ctx.addIssue({ code: "custom", path: ["runIds"], message: "Comparison requires one explicit run per period." });
|
|
23260
23361
|
});
|
|
23261
|
-
var sentimentResolvedSelectionSchema = sentimentSelectionBaseSchema.extend({ runId: id.nullable(), revision:
|
|
23262
|
-
var sentimentCountsSchema =
|
|
23263
|
-
var sentimentCoverageSchema =
|
|
23362
|
+
var sentimentResolvedSelectionSchema = sentimentSelectionBaseSchema.extend({ runId: id.nullable(), revision: z80.number().int().nullable(), evaluationDefinitionId: id.nullable(), mode: z80.enum(["simple", "advanced"]) });
|
|
23363
|
+
var sentimentCountsSchema = z80.object(Object.fromEntries(sentimentOutcomeSchema.options.map((outcome) => [outcome, count]))).strict();
|
|
23364
|
+
var sentimentCoverageSchema = z80.object({
|
|
23264
23365
|
selected: count,
|
|
23265
23366
|
eligibleAssessments: count,
|
|
23266
23367
|
unadmittedAssessments: count,
|
|
@@ -23274,45 +23375,45 @@ var sentimentCoverageSchema = z79.object({
|
|
|
23274
23375
|
expectedProviderSlots: count,
|
|
23275
23376
|
completedProviderSlots: count
|
|
23276
23377
|
}).strict();
|
|
23277
|
-
var sentimentScoreSchema =
|
|
23278
|
-
var headlineFields = { state: sentimentStateSchema, reason:
|
|
23279
|
-
var sentimentHeadlineSchema =
|
|
23280
|
-
var sentimentOverallHeadlineSchema =
|
|
23281
|
-
var sentimentOverviewSchema =
|
|
23282
|
-
var sentimentAssessmentSummarySchema =
|
|
23378
|
+
var sentimentScoreSchema = z80.object({ favorableRate: rate, mixedRate: rate, unfavorableRate: rate, favorableDisplay: z80.string(), mixedDisplay: z80.string(), unfavorableDisplay: z80.string(), interval: z80.object({ low: z80.number(), high: z80.number() }).strict().nullable(), method: z80.literal("wilson-independent-v1"), limitation: z80.string() }).strict();
|
|
23379
|
+
var headlineFields = { state: sentimentStateSchema, reason: z80.string().nullable(), provisional: z80.boolean(), coverage: sentimentCoverageSchema, score: sentimentScoreSchema };
|
|
23380
|
+
var sentimentHeadlineSchema = z80.object({ ...headlineFields, selection: sentimentResolvedSelectionSchema, runIds: z80.array(id) }).strict();
|
|
23381
|
+
var sentimentOverallHeadlineSchema = z80.object({ ...headlineFields, queryClass: z80.literal("all"), pooled: z80.literal(true).optional(), runIds: z80.array(id) }).strict();
|
|
23382
|
+
var sentimentOverviewSchema = z80.object({ configured: z80.boolean(), branded: sentimentHeadlineSchema, nonBrand: sentimentHeadlineSchema, headlineQueryClass: z80.literal("branded").optional(), pooledOverall: sentimentOverallHeadlineSchema.optional(), overall: sentimentOverallHeadlineSchema.optional().describe("Deprecated compatibility field. Pooled branded and non-brand assessments; never use as the sentiment headline.") }).strict();
|
|
23383
|
+
var sentimentAssessmentSummarySchema = z80.object({
|
|
23283
23384
|
assessmentId: id.nullable(),
|
|
23284
23385
|
sourceSnapshotId: id,
|
|
23285
23386
|
runId: id,
|
|
23286
23387
|
subjectId: id,
|
|
23287
|
-
subjectLabel:
|
|
23388
|
+
subjectLabel: z80.string(),
|
|
23288
23389
|
executionNodeKey: id.nullable(),
|
|
23289
23390
|
provider: id,
|
|
23290
|
-
requestedModel:
|
|
23291
|
-
servedModel:
|
|
23292
|
-
location:
|
|
23391
|
+
requestedModel: z80.string().nullable(),
|
|
23392
|
+
servedModel: z80.string().nullable(),
|
|
23393
|
+
location: z80.string().nullable(),
|
|
23293
23394
|
evaluationDefinitionId: id.nullable(),
|
|
23294
23395
|
state: sentimentStateSchema,
|
|
23295
|
-
outcome:
|
|
23296
|
-
reason:
|
|
23396
|
+
outcome: z80.union([sentimentOutcomeSchema, z80.null()]),
|
|
23397
|
+
reason: z80.string().nullable()
|
|
23297
23398
|
}).strict();
|
|
23298
|
-
var sentimentQuerySummarySchema =
|
|
23299
|
-
var sentimentBreakdownSchema =
|
|
23300
|
-
var sentimentSummarySchema =
|
|
23399
|
+
var sentimentQuerySummarySchema = z80.object({ ...headlineFields, queryId: id, executionNodeKey: id.nullable().optional(), queryText: z80.string(), queryClass: z80.enum(["branded", "non-brand"]), sourceSnapshotIds: z80.array(id), assessments: z80.array(sentimentAssessmentSummarySchema).default([]), locations: z80.array(z80.object({ ...headlineFields, location: z80.string().nullable(), sourceSnapshotIds: z80.array(id) }).strict()) }).strict();
|
|
23400
|
+
var sentimentBreakdownSchema = z80.object({ ...headlineFields, dimension: z80.enum(["provider", "property", "market", "query"]), key: z80.string(), label: z80.string(), queryClass: z80.enum(["branded", "non-brand"]) }).strict();
|
|
23401
|
+
var sentimentSummarySchema = z80.object({
|
|
23301
23402
|
...headlineFields,
|
|
23302
|
-
configured:
|
|
23403
|
+
configured: z80.boolean(),
|
|
23303
23404
|
selection: sentimentResolvedSelectionSchema,
|
|
23304
23405
|
evaluationDefinition: sentimentEvaluationDefinitionSchema.nullable(),
|
|
23305
|
-
breakdowns:
|
|
23306
|
-
queries:
|
|
23406
|
+
breakdowns: z80.array(sentimentBreakdownSchema),
|
|
23407
|
+
queries: z80.array(sentimentQuerySummarySchema),
|
|
23307
23408
|
/**
|
|
23308
23409
|
* Branded reads: the Properties with a mixed or unfavorable rating, most criticized first
|
|
23309
23410
|
* ({@link rankCriticizedProperties}). `keys` are the first {@link SENTIMENT_CRITICIZED_PROPERTY_LIMIT}
|
|
23310
23411
|
* property breakdown keys; `total` counts them all; `{ total: 0, keys: [] }` with fewer than two
|
|
23311
23412
|
* Properties in view. Absent from older servers, comparison periods, and non-brand, disabled or unavailable reads.
|
|
23312
23413
|
*/
|
|
23313
|
-
criticizedProperties:
|
|
23414
|
+
criticizedProperties: z80.object({ total: count, keys: z80.array(z80.string()) }).strict().optional(),
|
|
23314
23415
|
/** Present on the paged summary read; follow `nextCursor` as `queryCursor` for the next query rows. */
|
|
23315
|
-
queryPage:
|
|
23416
|
+
queryPage: z80.object({ total: count, limit: count, nextCursor: z80.string().nullable() }).strict().optional()
|
|
23316
23417
|
}).strict();
|
|
23317
23418
|
var SENTIMENT_CRITICIZED_PROPERTY_LIMIT = 5;
|
|
23318
23419
|
function rankCriticizedProperties(rows) {
|
|
@@ -23323,91 +23424,91 @@ function rankCriticizedProperties(rows) {
|
|
|
23323
23424
|
criticized.sort((a, b) => criticism(b) - criticism(a) || b.coverage.counts.unfavorable - a.coverage.counts.unfavorable || a.coverage.counts.favorable - b.coverage.counts.favorable || a.label.localeCompare(b.label) || a.key.localeCompare(b.key));
|
|
23324
23425
|
return { total: criticized.length, keys: criticized.slice(0, SENTIMENT_CRITICIZED_PROPERTY_LIMIT).map((row) => row.key) };
|
|
23325
23426
|
}
|
|
23326
|
-
var sentimentSettingsUpdateSchema =
|
|
23327
|
-
var sentimentSettingsSchema =
|
|
23427
|
+
var sentimentSettingsUpdateSchema = z80.object({ enabled: z80.boolean().optional() }).strict();
|
|
23428
|
+
var sentimentSettingsSchema = z80.object({
|
|
23328
23429
|
provider: sentimentEvaluatorProviderSchema.optional(),
|
|
23329
|
-
installEnabled:
|
|
23330
|
-
enabled:
|
|
23331
|
-
ready:
|
|
23332
|
-
readinessReasons:
|
|
23333
|
-
model:
|
|
23430
|
+
installEnabled: z80.boolean(),
|
|
23431
|
+
enabled: z80.boolean(),
|
|
23432
|
+
ready: z80.boolean(),
|
|
23433
|
+
readinessReasons: z80.array(z80.string()),
|
|
23434
|
+
model: z80.string(),
|
|
23334
23435
|
enablementEpoch: count,
|
|
23335
23436
|
completionBoundary: count,
|
|
23336
23437
|
evaluationDefinitionId: id.nullable(),
|
|
23337
|
-
actions:
|
|
23338
|
-
experimental:
|
|
23339
|
-
disclosure:
|
|
23340
|
-
}).strict();
|
|
23341
|
-
var sentimentBackfillSelectionSchema = sentimentSelectionBaseSchema.extend({ runIds: runIds.optional(), from:
|
|
23342
|
-
var sentimentBackfillRequestSchema =
|
|
23343
|
-
var sentimentBackfillPreviewSchema =
|
|
23344
|
-
previewToken:
|
|
23345
|
-
expiresAt:
|
|
23438
|
+
actions: z80.object({ configure: z80.boolean(), backfill: z80.boolean() }).strict(),
|
|
23439
|
+
experimental: z80.literal(true),
|
|
23440
|
+
disclosure: z80.string()
|
|
23441
|
+
}).strict();
|
|
23442
|
+
var sentimentBackfillSelectionSchema = sentimentSelectionBaseSchema.extend({ runIds: runIds.optional(), from: z80.string().datetime().optional(), to: z80.string().datetime().optional() }).superRefine(exclusiveSentimentRuns);
|
|
23443
|
+
var sentimentBackfillRequestSchema = z80.object({ previewToken: z80.string().min(1).max(65536), idempotencyKey: z80.string().trim().min(1).max(128) }).strict();
|
|
23444
|
+
var sentimentBackfillPreviewSchema = z80.object({
|
|
23445
|
+
previewToken: z80.string().nullable(),
|
|
23446
|
+
expiresAt: z80.string().nullable(),
|
|
23346
23447
|
selection: sentimentBackfillSelectionSchema,
|
|
23347
23448
|
evaluationDefinitionId: id.nullable(),
|
|
23348
23449
|
eligibleAssessments: count,
|
|
23349
23450
|
alreadyClassified: count,
|
|
23350
|
-
skipped:
|
|
23451
|
+
skipped: z80.array(z80.object({ runId: id, reason: z80.string(), count }).strict()),
|
|
23351
23452
|
estimatedInputTokens: count,
|
|
23352
|
-
estimatedCostUsd:
|
|
23353
|
-
estimateMethod:
|
|
23453
|
+
estimatedCostUsd: z80.number().nonnegative().nullable(),
|
|
23454
|
+
estimateMethod: z80.string()
|
|
23354
23455
|
}).strict();
|
|
23355
|
-
var sentimentJobStateSchema =
|
|
23356
|
-
var sentimentAttemptReceiptSchema =
|
|
23357
|
-
var sentimentJobSchema =
|
|
23456
|
+
var sentimentJobStateSchema = z80.enum(["pending", "running", "waiting-to-retry", "complete", "partial", "failed", "canceled"]);
|
|
23457
|
+
var sentimentAttemptReceiptSchema = z80.object({ id, workItemId: id, dispatchedAt: z80.string(), completedAt: z80.string().nullable(), returnedModel: z80.string().nullable(), usage: sentimentUsageSchema, errorCode: z80.string().nullable() }).strict();
|
|
23458
|
+
var sentimentJobSchema = z80.object({
|
|
23358
23459
|
id,
|
|
23359
23460
|
projectId: id,
|
|
23360
|
-
origin:
|
|
23461
|
+
origin: z80.enum(["automatic", "backfill"]),
|
|
23361
23462
|
state: sentimentJobStateSchema,
|
|
23362
23463
|
enablementEpoch: count,
|
|
23363
23464
|
evaluationDefinitionId: id,
|
|
23364
23465
|
selection: sentimentBackfillSelectionSchema,
|
|
23365
|
-
createdAt:
|
|
23366
|
-
updatedAt:
|
|
23466
|
+
createdAt: z80.string(),
|
|
23467
|
+
updatedAt: z80.string(),
|
|
23367
23468
|
counts: sentimentCountsSchema,
|
|
23368
23469
|
selected: count,
|
|
23369
|
-
cancellationReason:
|
|
23370
|
-
attempts:
|
|
23470
|
+
cancellationReason: z80.string().nullable(),
|
|
23471
|
+
attempts: z80.array(sentimentAttemptReceiptSchema),
|
|
23371
23472
|
/** Paged job read: every attempt of the job, and the cursor for the next (older) attempts. */
|
|
23372
23473
|
attemptCount: count.optional(),
|
|
23373
|
-
nextAttemptCursor:
|
|
23474
|
+
nextAttemptCursor: z80.string().nullable().optional()
|
|
23374
23475
|
}).strict();
|
|
23375
23476
|
var sentimentJobSummarySchema = sentimentJobSchema.omit({ attempts: true, attemptCount: true, nextAttemptCursor: true }).extend({ attemptCount: count }).strict();
|
|
23376
|
-
var sentimentJobsSchema =
|
|
23477
|
+
var sentimentJobsSchema = z80.object({ jobs: z80.array(sentimentJobSummarySchema) }).strict();
|
|
23377
23478
|
var SENTIMENT_ATTEMPT_PAGE_DEFAULT = 50;
|
|
23378
|
-
var sentimentJobRequestSchema =
|
|
23379
|
-
attemptLimit:
|
|
23380
|
-
attemptCursor:
|
|
23479
|
+
var sentimentJobRequestSchema = z80.object({
|
|
23480
|
+
attemptLimit: z80.coerce.number().int().min(1).max(200).default(SENTIMENT_ATTEMPT_PAGE_DEFAULT),
|
|
23481
|
+
attemptCursor: z80.string().min(1).max(4096).optional()
|
|
23381
23482
|
}).strict();
|
|
23382
|
-
var sentimentEvidenceItemSchema =
|
|
23483
|
+
var sentimentEvidenceItemSchema = z80.object({
|
|
23383
23484
|
assessmentId: id,
|
|
23384
23485
|
runId: id,
|
|
23385
23486
|
sourceSnapshotId: id,
|
|
23386
|
-
sourceText:
|
|
23487
|
+
sourceText: z80.string(),
|
|
23387
23488
|
sourceTextHash: id,
|
|
23388
23489
|
subject: sentimentSubjectSchema,
|
|
23389
23490
|
subjectHash: id,
|
|
23390
23491
|
context: sentimentExecutionContextSchema,
|
|
23391
23492
|
evaluationDefinitionId: id,
|
|
23392
23493
|
outcome: sentimentOutcomeSchema,
|
|
23393
|
-
conclusion:
|
|
23394
|
-
complaint:
|
|
23395
|
-
returnedModel:
|
|
23396
|
-
reason:
|
|
23494
|
+
conclusion: z80.array(sentimentEvidenceSchema),
|
|
23495
|
+
complaint: z80.array(sentimentEvidenceSchema).nullable(),
|
|
23496
|
+
returnedModel: z80.string().nullable(),
|
|
23497
|
+
reason: z80.string().nullable()
|
|
23397
23498
|
}).strict();
|
|
23398
|
-
var sentimentEvidencePageSchema =
|
|
23399
|
-
var sentimentComparisonSchema =
|
|
23499
|
+
var sentimentEvidencePageSchema = z80.object({ state: sentimentStateSchema, selection: sentimentResolvedSelectionSchema.extend({ assessmentId: id.optional(), outcome: z80.array(sentimentOutcomeSchema).optional() }), items: z80.array(sentimentEvidenceItemSchema), nextCursor: z80.string().nullable() }).strict();
|
|
23500
|
+
var sentimentComparisonSchema = z80.object({
|
|
23400
23501
|
from: sentimentSummarySchema,
|
|
23401
23502
|
to: sentimentSummarySchema,
|
|
23402
|
-
verdict:
|
|
23403
|
-
favorableRateDelta:
|
|
23404
|
-
refusalReasons:
|
|
23503
|
+
verdict: z80.enum(["improved", "declined", "no-clear-change"]).nullable(),
|
|
23504
|
+
favorableRateDelta: z80.number().nullable(),
|
|
23505
|
+
refusalReasons: z80.array(z80.string()),
|
|
23405
23506
|
commonUnits: count,
|
|
23406
23507
|
excludedFrom: count,
|
|
23407
23508
|
excludedTo: count,
|
|
23408
|
-
changedScope:
|
|
23409
|
-
method:
|
|
23410
|
-
limitation:
|
|
23509
|
+
changedScope: z80.boolean(),
|
|
23510
|
+
method: z80.literal("wilson-independent-v1"),
|
|
23511
|
+
limitation: z80.string()
|
|
23411
23512
|
}).strict();
|
|
23412
23513
|
function emptySentimentCounts() {
|
|
23413
23514
|
return Object.fromEntries(sentimentOutcomeSchema.options.map((outcome) => [outcome, 0]));
|
|
@@ -23444,7 +23545,7 @@ function aggregateSentiment(items, options = {}) {
|
|
|
23444
23545
|
}
|
|
23445
23546
|
|
|
23446
23547
|
// ../contracts/src/composites.ts
|
|
23447
|
-
import { z as
|
|
23548
|
+
import { z as z81 } from "zod";
|
|
23448
23549
|
var PROJECT_OVERVIEW_QUERY_CLASS_SCOPE = {
|
|
23449
23550
|
queryClass: "all",
|
|
23450
23551
|
figures: [
|
|
@@ -23466,26 +23567,26 @@ var PROJECT_OVERVIEW_QUERY_CLASS_SCOPE = {
|
|
|
23466
23567
|
],
|
|
23467
23568
|
note: "These figures pool branded and non-brand queries in one denominator. Only scores.mentionShare splits the classes. For one class, use a read filtered by queryClass."
|
|
23468
23569
|
};
|
|
23469
|
-
var metricToneSchema =
|
|
23470
|
-
var scoreSummarySchema =
|
|
23471
|
-
label:
|
|
23472
|
-
value:
|
|
23473
|
-
delta:
|
|
23570
|
+
var metricToneSchema = z81.enum(["positive", "caution", "negative", "neutral"]);
|
|
23571
|
+
var scoreSummarySchema = z81.object({
|
|
23572
|
+
label: z81.string(),
|
|
23573
|
+
value: z81.string(),
|
|
23574
|
+
delta: z81.string(),
|
|
23474
23575
|
tone: metricToneSchema,
|
|
23475
|
-
description:
|
|
23476
|
-
tooltip:
|
|
23477
|
-
trend:
|
|
23576
|
+
description: z81.string(),
|
|
23577
|
+
tooltip: z81.string().optional(),
|
|
23578
|
+
trend: z81.array(percent()),
|
|
23478
23579
|
progress: percent().optional(),
|
|
23479
|
-
providerCoverage:
|
|
23580
|
+
providerCoverage: z81.string().optional()
|
|
23480
23581
|
});
|
|
23481
|
-
var mentionShareBreakdownSchema =
|
|
23482
|
-
projectMentionSnapshots:
|
|
23483
|
-
competitorMentionSnapshots:
|
|
23582
|
+
var mentionShareBreakdownSchema = z81.object({
|
|
23583
|
+
projectMentionSnapshots: z81.number().int().nonnegative(),
|
|
23584
|
+
competitorMentionSnapshots: z81.number().int().nonnegative(),
|
|
23484
23585
|
/** `projectMentionSnapshots + competitorMentionSnapshots`, the denominator of `score` and every `ranking` share. */
|
|
23485
|
-
combinedMentionSnapshots:
|
|
23486
|
-
perCompetitor:
|
|
23487
|
-
domain:
|
|
23488
|
-
mentionSnapshots:
|
|
23586
|
+
combinedMentionSnapshots: z81.number().int().nonnegative(),
|
|
23587
|
+
perCompetitor: z81.array(z81.object({
|
|
23588
|
+
domain: z81.string(),
|
|
23589
|
+
mentionSnapshots: z81.number().int().nonnegative(),
|
|
23489
23590
|
shareOfCompetitiveTotal: percent()
|
|
23490
23591
|
})),
|
|
23491
23592
|
/**
|
|
@@ -23495,50 +23596,50 @@ var mentionShareBreakdownSchema = z80.object({
|
|
|
23495
23596
|
* Empty when there is no head-to-head: no tracked competitors, or no brand
|
|
23496
23597
|
* named in this class.
|
|
23497
23598
|
*/
|
|
23498
|
-
ranking:
|
|
23499
|
-
kind:
|
|
23599
|
+
ranking: z81.array(z81.object({
|
|
23600
|
+
kind: z81.enum(["project", "competitor"]),
|
|
23500
23601
|
/** The tracked competitor's domain. Null on the project's row. */
|
|
23501
|
-
domain:
|
|
23502
|
-
mentionSnapshots:
|
|
23503
|
-
share: fraction(
|
|
23602
|
+
domain: z81.string().nullable(),
|
|
23603
|
+
mentionSnapshots: z81.number().int().nonnegative(),
|
|
23604
|
+
share: fraction(z81.number().min(0).max(1))
|
|
23504
23605
|
})),
|
|
23505
|
-
snapshotsWithAnswerText:
|
|
23506
|
-
snapshotsTotal:
|
|
23507
|
-
score: percent(
|
|
23606
|
+
snapshotsWithAnswerText: z81.number().int().nonnegative(),
|
|
23607
|
+
snapshotsTotal: z81.number().int().nonnegative(),
|
|
23608
|
+
score: percent(z81.number().min(0).max(100)).nullable()
|
|
23508
23609
|
});
|
|
23509
23610
|
var mentionShareSchema = scoreSummarySchema.extend({
|
|
23510
23611
|
/** Non-brand queries — the competitive figure. See `MentionShareDto`. */
|
|
23511
23612
|
breakdown: mentionShareBreakdownSchema,
|
|
23512
|
-
scope:
|
|
23613
|
+
scope: z81.enum(["non-brand", "pooled"]),
|
|
23513
23614
|
/** Branded queries, beside the competitive figure and never inside it. */
|
|
23514
23615
|
branded: mentionShareBreakdownSchema
|
|
23515
23616
|
});
|
|
23516
|
-
var movementSummarySchema =
|
|
23517
|
-
gained:
|
|
23518
|
-
lost:
|
|
23617
|
+
var movementSummarySchema = z81.object({
|
|
23618
|
+
gained: z81.number().int().nonnegative(),
|
|
23619
|
+
lost: z81.number().int().nonnegative(),
|
|
23519
23620
|
tone: metricToneSchema,
|
|
23520
|
-
hasPreviousRun:
|
|
23521
|
-
gainedQueries:
|
|
23522
|
-
lostQueries:
|
|
23523
|
-
});
|
|
23524
|
-
var movementComparisonSchema =
|
|
23525
|
-
hasPreviousRun:
|
|
23526
|
-
comparable:
|
|
23527
|
-
querySetChanged:
|
|
23528
|
-
previousRunAt:
|
|
23529
|
-
currentQueryCount:
|
|
23530
|
-
previousQueryCount:
|
|
23531
|
-
comparableQueryCount:
|
|
23532
|
-
addedQueryCount:
|
|
23533
|
-
removedQueryCount:
|
|
23534
|
-
addedQueries:
|
|
23535
|
-
removedQueries:
|
|
23536
|
-
});
|
|
23537
|
-
var projectOverviewInsightSchema =
|
|
23538
|
-
id:
|
|
23539
|
-
projectId:
|
|
23540
|
-
runId:
|
|
23541
|
-
type:
|
|
23621
|
+
hasPreviousRun: z81.boolean(),
|
|
23622
|
+
gainedQueries: z81.array(z81.string()).optional(),
|
|
23623
|
+
lostQueries: z81.array(z81.string()).optional()
|
|
23624
|
+
});
|
|
23625
|
+
var movementComparisonSchema = z81.object({
|
|
23626
|
+
hasPreviousRun: z81.boolean(),
|
|
23627
|
+
comparable: z81.boolean(),
|
|
23628
|
+
querySetChanged: z81.boolean(),
|
|
23629
|
+
previousRunAt: z81.string().nullable(),
|
|
23630
|
+
currentQueryCount: z81.number().int().nonnegative(),
|
|
23631
|
+
previousQueryCount: z81.number().int().nonnegative(),
|
|
23632
|
+
comparableQueryCount: z81.number().int().nonnegative(),
|
|
23633
|
+
addedQueryCount: z81.number().int().nonnegative(),
|
|
23634
|
+
removedQueryCount: z81.number().int().nonnegative(),
|
|
23635
|
+
addedQueries: z81.array(z81.string()),
|
|
23636
|
+
removedQueries: z81.array(z81.string())
|
|
23637
|
+
});
|
|
23638
|
+
var projectOverviewInsightSchema = z81.object({
|
|
23639
|
+
id: z81.string(),
|
|
23640
|
+
projectId: z81.string(),
|
|
23641
|
+
runId: z81.string().nullable(),
|
|
23642
|
+
type: z81.enum([
|
|
23542
23643
|
"regression",
|
|
23543
23644
|
"gain",
|
|
23544
23645
|
"opportunity",
|
|
@@ -23555,75 +23656,75 @@ var projectOverviewInsightSchema = z80.object({
|
|
|
23555
23656
|
"gbp-keyword-drop"
|
|
23556
23657
|
]),
|
|
23557
23658
|
severity: insightSeveritySchema,
|
|
23558
|
-
title:
|
|
23559
|
-
query:
|
|
23560
|
-
provider:
|
|
23561
|
-
recommendation:
|
|
23562
|
-
action:
|
|
23563
|
-
target:
|
|
23564
|
-
reason:
|
|
23659
|
+
title: z81.string(),
|
|
23660
|
+
query: z81.string(),
|
|
23661
|
+
provider: z81.string(),
|
|
23662
|
+
recommendation: z81.object({
|
|
23663
|
+
action: z81.string(),
|
|
23664
|
+
target: z81.string().optional(),
|
|
23665
|
+
reason: z81.string()
|
|
23565
23666
|
}).optional(),
|
|
23566
|
-
cause:
|
|
23567
|
-
cause:
|
|
23568
|
-
competitorDomain:
|
|
23569
|
-
details:
|
|
23667
|
+
cause: z81.object({
|
|
23668
|
+
cause: z81.string(),
|
|
23669
|
+
competitorDomain: z81.string().optional(),
|
|
23670
|
+
details: z81.string().optional()
|
|
23570
23671
|
}).optional(),
|
|
23571
|
-
dismissed:
|
|
23572
|
-
createdAt:
|
|
23672
|
+
dismissed: z81.boolean(),
|
|
23673
|
+
createdAt: z81.string()
|
|
23573
23674
|
});
|
|
23574
|
-
var projectOverviewHealthSchema =
|
|
23575
|
-
id:
|
|
23576
|
-
projectId:
|
|
23577
|
-
runId:
|
|
23675
|
+
var projectOverviewHealthSchema = z81.object({
|
|
23676
|
+
id: z81.string(),
|
|
23677
|
+
projectId: z81.string(),
|
|
23678
|
+
runId: z81.string().nullable(),
|
|
23578
23679
|
overallCitedRate: fraction(),
|
|
23579
23680
|
overallMentionRate: fraction(),
|
|
23580
|
-
totalPairs:
|
|
23581
|
-
citedPairs:
|
|
23582
|
-
mentionedPairs:
|
|
23583
|
-
providerBreakdown:
|
|
23681
|
+
totalPairs: z81.number().int().nonnegative(),
|
|
23682
|
+
citedPairs: z81.number().int().nonnegative(),
|
|
23683
|
+
mentionedPairs: z81.number().int().nonnegative(),
|
|
23684
|
+
providerBreakdown: z81.record(z81.string(), z81.object({
|
|
23584
23685
|
citedRate: fraction(),
|
|
23585
23686
|
mentionRate: fraction(),
|
|
23586
|
-
cited:
|
|
23587
|
-
mentioned:
|
|
23588
|
-
total:
|
|
23687
|
+
cited: z81.number().int().nonnegative(),
|
|
23688
|
+
mentioned: z81.number().int().nonnegative(),
|
|
23689
|
+
total: z81.number().int().nonnegative()
|
|
23589
23690
|
})),
|
|
23590
|
-
createdAt:
|
|
23591
|
-
status:
|
|
23592
|
-
reason:
|
|
23691
|
+
createdAt: z81.string(),
|
|
23692
|
+
status: z81.enum(["ready", "no-data"]),
|
|
23693
|
+
reason: z81.literal("no-runs-yet").optional()
|
|
23593
23694
|
});
|
|
23594
|
-
var projectOverviewDtoSchema =
|
|
23695
|
+
var projectOverviewDtoSchema = z81.object({
|
|
23595
23696
|
sentiment: sentimentOverviewSchema.optional(),
|
|
23596
23697
|
project: projectDtoSchema,
|
|
23597
23698
|
latestRun: latestProjectRunDtoSchema,
|
|
23598
23699
|
health: projectOverviewHealthSchema.nullable(),
|
|
23599
|
-
topInsights:
|
|
23600
|
-
queryClassScope:
|
|
23601
|
-
queryClass:
|
|
23602
|
-
figures:
|
|
23603
|
-
note:
|
|
23700
|
+
topInsights: z81.array(projectOverviewInsightSchema),
|
|
23701
|
+
queryClassScope: z81.object({
|
|
23702
|
+
queryClass: z81.literal("all"),
|
|
23703
|
+
figures: z81.array(z81.string()),
|
|
23704
|
+
note: z81.string()
|
|
23604
23705
|
}).optional(),
|
|
23605
|
-
queryCounts:
|
|
23606
|
-
totalQueries:
|
|
23607
|
-
citedQueries:
|
|
23608
|
-
notCitedQueries:
|
|
23706
|
+
queryCounts: z81.object({
|
|
23707
|
+
totalQueries: z81.number().int().nonnegative(),
|
|
23708
|
+
citedQueries: z81.number().int().nonnegative(),
|
|
23709
|
+
notCitedQueries: z81.number().int().nonnegative(),
|
|
23609
23710
|
citedRate: fraction(),
|
|
23610
|
-
mentionedQueries:
|
|
23611
|
-
notMentionedQueries:
|
|
23711
|
+
mentionedQueries: z81.number().int().nonnegative(),
|
|
23712
|
+
notMentionedQueries: z81.number().int().nonnegative(),
|
|
23612
23713
|
mentionRate: fraction()
|
|
23613
23714
|
}),
|
|
23614
|
-
providers:
|
|
23615
|
-
provider:
|
|
23715
|
+
providers: z81.array(z81.object({
|
|
23716
|
+
provider: z81.string(),
|
|
23616
23717
|
citedRate: fraction(),
|
|
23617
|
-
cited:
|
|
23618
|
-
total:
|
|
23718
|
+
cited: z81.number().int().nonnegative(),
|
|
23719
|
+
total: z81.number().int().nonnegative()
|
|
23619
23720
|
})),
|
|
23620
|
-
transitions:
|
|
23621
|
-
since:
|
|
23622
|
-
gained:
|
|
23623
|
-
lost:
|
|
23624
|
-
emerging:
|
|
23721
|
+
transitions: z81.object({
|
|
23722
|
+
since: z81.string().nullable(),
|
|
23723
|
+
gained: z81.number().int().nonnegative(),
|
|
23724
|
+
lost: z81.number().int().nonnegative(),
|
|
23725
|
+
emerging: z81.number().int().nonnegative()
|
|
23625
23726
|
}),
|
|
23626
|
-
scores:
|
|
23727
|
+
scores: z81.object({
|
|
23627
23728
|
mention: scoreSummarySchema,
|
|
23628
23729
|
visibility: scoreSummarySchema,
|
|
23629
23730
|
mentionShare: mentionShareSchema,
|
|
@@ -23637,74 +23738,74 @@ var projectOverviewDtoSchema = z80.object({
|
|
|
23637
23738
|
citationMovement: movementSummarySchema,
|
|
23638
23739
|
mentionMovement: movementSummarySchema,
|
|
23639
23740
|
movementComparison: movementComparisonSchema,
|
|
23640
|
-
competitors:
|
|
23641
|
-
id:
|
|
23642
|
-
domain:
|
|
23643
|
-
aliases:
|
|
23644
|
-
autoAliasNames:
|
|
23645
|
-
citationCount:
|
|
23646
|
-
totalQueries:
|
|
23647
|
-
pressureLabel:
|
|
23648
|
-
citedQueries:
|
|
23741
|
+
competitors: z81.array(z81.object({
|
|
23742
|
+
id: z81.string(),
|
|
23743
|
+
domain: z81.string(),
|
|
23744
|
+
aliases: z81.array(z81.string()).optional(),
|
|
23745
|
+
autoAliasNames: z81.array(z81.string()).optional(),
|
|
23746
|
+
citationCount: z81.number().int().nonnegative(),
|
|
23747
|
+
totalQueries: z81.number().int().nonnegative(),
|
|
23748
|
+
pressureLabel: z81.enum(["None", "Low", "Moderate", "High"]),
|
|
23749
|
+
citedQueries: z81.array(z81.string())
|
|
23649
23750
|
})),
|
|
23650
|
-
providerScores:
|
|
23651
|
-
provider:
|
|
23652
|
-
model:
|
|
23751
|
+
providerScores: z81.array(z81.object({
|
|
23752
|
+
provider: z81.string(),
|
|
23753
|
+
model: z81.string().nullable(),
|
|
23653
23754
|
score: percent(),
|
|
23654
|
-
cited:
|
|
23655
|
-
total:
|
|
23656
|
-
trend:
|
|
23755
|
+
cited: z81.number().int().nonnegative(),
|
|
23756
|
+
total: z81.number().int().nonnegative(),
|
|
23757
|
+
trend: z81.array(percent()).optional()
|
|
23657
23758
|
})),
|
|
23658
|
-
attentionItems:
|
|
23659
|
-
id:
|
|
23759
|
+
attentionItems: z81.array(z81.object({
|
|
23760
|
+
id: z81.string(),
|
|
23660
23761
|
tone: metricToneSchema,
|
|
23661
|
-
title:
|
|
23662
|
-
detail:
|
|
23663
|
-
actionLabel:
|
|
23664
|
-
href:
|
|
23762
|
+
title: z81.string(),
|
|
23763
|
+
detail: z81.string(),
|
|
23764
|
+
actionLabel: z81.string(),
|
|
23765
|
+
href: z81.string()
|
|
23665
23766
|
})),
|
|
23666
|
-
runHistory:
|
|
23667
|
-
runId:
|
|
23668
|
-
createdAt:
|
|
23669
|
-
citedCount:
|
|
23670
|
-
totalCount:
|
|
23767
|
+
runHistory: z81.array(z81.object({
|
|
23768
|
+
runId: z81.string(),
|
|
23769
|
+
createdAt: z81.string(),
|
|
23770
|
+
citedCount: z81.number().int().nonnegative(),
|
|
23771
|
+
totalCount: z81.number().int().nonnegative(),
|
|
23671
23772
|
citationRate: percent(),
|
|
23672
|
-
mentionedCount:
|
|
23773
|
+
mentionedCount: z81.number().int().nonnegative(),
|
|
23673
23774
|
mentionRate: percent(),
|
|
23674
|
-
status:
|
|
23775
|
+
status: z81.string()
|
|
23675
23776
|
})),
|
|
23676
|
-
suggestedQueries:
|
|
23677
|
-
rows:
|
|
23678
|
-
query:
|
|
23679
|
-
impressions:
|
|
23680
|
-
clicks:
|
|
23681
|
-
avgPosition:
|
|
23682
|
-
reason:
|
|
23777
|
+
suggestedQueries: z81.object({
|
|
23778
|
+
rows: z81.array(z81.object({
|
|
23779
|
+
query: z81.string(),
|
|
23780
|
+
impressions: z81.number(),
|
|
23781
|
+
clicks: z81.number(),
|
|
23782
|
+
avgPosition: z81.number(),
|
|
23783
|
+
reason: z81.string()
|
|
23683
23784
|
})),
|
|
23684
|
-
totalCandidates:
|
|
23685
|
-
skippedAlreadyTracked:
|
|
23785
|
+
totalCandidates: z81.number().int().nonnegative(),
|
|
23786
|
+
skippedAlreadyTracked: z81.number().int().nonnegative()
|
|
23686
23787
|
}),
|
|
23687
|
-
dateRangeLabel:
|
|
23688
|
-
contextLabel:
|
|
23689
|
-
});
|
|
23690
|
-
var searchHitKindSchema =
|
|
23691
|
-
var projectSearchSnapshotHitSchema =
|
|
23692
|
-
kind:
|
|
23693
|
-
id:
|
|
23694
|
-
runId:
|
|
23695
|
-
query:
|
|
23696
|
-
provider:
|
|
23697
|
-
model:
|
|
23788
|
+
dateRangeLabel: z81.string(),
|
|
23789
|
+
contextLabel: z81.string()
|
|
23790
|
+
});
|
|
23791
|
+
var searchHitKindSchema = z81.enum(["snapshot", "insight"]);
|
|
23792
|
+
var projectSearchSnapshotHitSchema = z81.object({
|
|
23793
|
+
kind: z81.literal("snapshot"),
|
|
23794
|
+
id: z81.string(),
|
|
23795
|
+
runId: z81.string(),
|
|
23796
|
+
query: z81.string(),
|
|
23797
|
+
provider: z81.string(),
|
|
23798
|
+
model: z81.string().nullable(),
|
|
23698
23799
|
citationState: citationStateSchema,
|
|
23699
|
-
matchedField:
|
|
23700
|
-
snippet:
|
|
23701
|
-
createdAt:
|
|
23702
|
-
});
|
|
23703
|
-
var projectSearchInsightHitSchema =
|
|
23704
|
-
kind:
|
|
23705
|
-
id:
|
|
23706
|
-
runId:
|
|
23707
|
-
type:
|
|
23800
|
+
matchedField: z81.enum(["answerText", "citedDomains", "citedUrls", "searchQueries", "query"]),
|
|
23801
|
+
snippet: z81.string(),
|
|
23802
|
+
createdAt: z81.string()
|
|
23803
|
+
});
|
|
23804
|
+
var projectSearchInsightHitSchema = z81.object({
|
|
23805
|
+
kind: z81.literal("insight"),
|
|
23806
|
+
id: z81.string(),
|
|
23807
|
+
runId: z81.string().nullable(),
|
|
23808
|
+
type: z81.enum([
|
|
23708
23809
|
"regression",
|
|
23709
23810
|
"gain",
|
|
23710
23811
|
"opportunity",
|
|
@@ -23722,23 +23823,23 @@ var projectSearchInsightHitSchema = z80.object({
|
|
|
23722
23823
|
"gbp-keyword-drop"
|
|
23723
23824
|
]),
|
|
23724
23825
|
severity: insightSeveritySchema,
|
|
23725
|
-
title:
|
|
23726
|
-
query:
|
|
23727
|
-
provider:
|
|
23728
|
-
matchedField:
|
|
23729
|
-
snippet:
|
|
23730
|
-
dismissed:
|
|
23731
|
-
createdAt:
|
|
23732
|
-
});
|
|
23733
|
-
var projectSearchHitSchema =
|
|
23826
|
+
title: z81.string(),
|
|
23827
|
+
query: z81.string(),
|
|
23828
|
+
provider: z81.string(),
|
|
23829
|
+
matchedField: z81.enum(["title", "query", "recommendation", "cause"]),
|
|
23830
|
+
snippet: z81.string(),
|
|
23831
|
+
dismissed: z81.boolean(),
|
|
23832
|
+
createdAt: z81.string()
|
|
23833
|
+
});
|
|
23834
|
+
var projectSearchHitSchema = z81.discriminatedUnion("kind", [
|
|
23734
23835
|
projectSearchSnapshotHitSchema,
|
|
23735
23836
|
projectSearchInsightHitSchema
|
|
23736
23837
|
]);
|
|
23737
|
-
var projectSearchResponseSchema =
|
|
23738
|
-
query:
|
|
23739
|
-
totalHits:
|
|
23740
|
-
truncated:
|
|
23741
|
-
hits:
|
|
23838
|
+
var projectSearchResponseSchema = z81.object({
|
|
23839
|
+
query: z81.string(),
|
|
23840
|
+
totalHits: z81.number().int().nonnegative(),
|
|
23841
|
+
truncated: z81.boolean(),
|
|
23842
|
+
hits: z81.array(projectSearchHitSchema)
|
|
23742
23843
|
});
|
|
23743
23844
|
|
|
23744
23845
|
// ../contracts/src/index-coverage.ts
|
|
@@ -23802,52 +23903,52 @@ function summarizeObservedQueryCounts(snapshots) {
|
|
|
23802
23903
|
}
|
|
23803
23904
|
|
|
23804
23905
|
// ../contracts/src/citations.ts
|
|
23805
|
-
import { z as
|
|
23806
|
-
var citationCoverageProviderSchema =
|
|
23807
|
-
provider:
|
|
23906
|
+
import { z as z82 } from "zod";
|
|
23907
|
+
var citationCoverageProviderSchema = z82.object({
|
|
23908
|
+
provider: z82.string(),
|
|
23808
23909
|
citationState: citationStateSchema,
|
|
23809
|
-
cited:
|
|
23810
|
-
mentioned:
|
|
23811
|
-
runId:
|
|
23812
|
-
runCreatedAt:
|
|
23813
|
-
});
|
|
23814
|
-
var citationCoverageRowSchema =
|
|
23815
|
-
queryId:
|
|
23816
|
-
query:
|
|
23817
|
-
providers:
|
|
23818
|
-
citedCount:
|
|
23819
|
-
mentionedCount:
|
|
23820
|
-
totalProviders:
|
|
23821
|
-
});
|
|
23822
|
-
var competitorGapRowSchema =
|
|
23823
|
-
queryId:
|
|
23824
|
-
query:
|
|
23825
|
-
provider:
|
|
23826
|
-
citingCompetitors:
|
|
23827
|
-
runId:
|
|
23828
|
-
runCreatedAt:
|
|
23829
|
-
});
|
|
23830
|
-
var citationVisibilitySummarySchema =
|
|
23831
|
-
providersConfigured:
|
|
23832
|
-
providersCiting:
|
|
23833
|
-
providersMentioning:
|
|
23834
|
-
totalQueries:
|
|
23910
|
+
cited: z82.boolean(),
|
|
23911
|
+
mentioned: z82.boolean(),
|
|
23912
|
+
runId: z82.string(),
|
|
23913
|
+
runCreatedAt: z82.string()
|
|
23914
|
+
});
|
|
23915
|
+
var citationCoverageRowSchema = z82.object({
|
|
23916
|
+
queryId: z82.string(),
|
|
23917
|
+
query: z82.string(),
|
|
23918
|
+
providers: z82.array(citationCoverageProviderSchema),
|
|
23919
|
+
citedCount: z82.number().int().nonnegative(),
|
|
23920
|
+
mentionedCount: z82.number().int().nonnegative(),
|
|
23921
|
+
totalProviders: z82.number().int().nonnegative()
|
|
23922
|
+
});
|
|
23923
|
+
var competitorGapRowSchema = z82.object({
|
|
23924
|
+
queryId: z82.string(),
|
|
23925
|
+
query: z82.string(),
|
|
23926
|
+
provider: z82.string(),
|
|
23927
|
+
citingCompetitors: z82.array(z82.string()),
|
|
23928
|
+
runId: z82.string(),
|
|
23929
|
+
runCreatedAt: z82.string()
|
|
23930
|
+
});
|
|
23931
|
+
var citationVisibilitySummarySchema = z82.object({
|
|
23932
|
+
providersConfigured: z82.number().int().nonnegative(),
|
|
23933
|
+
providersCiting: z82.number().int().nonnegative(),
|
|
23934
|
+
providersMentioning: z82.number().int().nonnegative(),
|
|
23935
|
+
totalQueries: z82.number().int().nonnegative(),
|
|
23835
23936
|
// Cross-tab buckets — each tracked query with at least one snapshot lands
|
|
23836
23937
|
// in exactly one of these. Queries with zero snapshots are not counted in
|
|
23837
23938
|
// any bucket; (sum of buckets) ≤ totalQueries.
|
|
23838
|
-
queriesCitedAndMentioned:
|
|
23839
|
-
queriesCitedOnly:
|
|
23840
|
-
queriesMentionedOnly:
|
|
23841
|
-
queriesInvisible:
|
|
23842
|
-
latestRunId:
|
|
23843
|
-
latestRunAt:
|
|
23844
|
-
});
|
|
23845
|
-
var citationVisibilityResponseSchema =
|
|
23939
|
+
queriesCitedAndMentioned: z82.number().int().nonnegative(),
|
|
23940
|
+
queriesCitedOnly: z82.number().int().nonnegative(),
|
|
23941
|
+
queriesMentionedOnly: z82.number().int().nonnegative(),
|
|
23942
|
+
queriesInvisible: z82.number().int().nonnegative(),
|
|
23943
|
+
latestRunId: z82.string().nullable(),
|
|
23944
|
+
latestRunAt: z82.string().nullable()
|
|
23945
|
+
});
|
|
23946
|
+
var citationVisibilityResponseSchema = z82.object({
|
|
23846
23947
|
summary: citationVisibilitySummarySchema,
|
|
23847
|
-
byQuery:
|
|
23848
|
-
competitorGaps:
|
|
23849
|
-
status:
|
|
23850
|
-
reason:
|
|
23948
|
+
byQuery: z82.array(citationCoverageRowSchema),
|
|
23949
|
+
competitorGaps: z82.array(competitorGapRowSchema),
|
|
23950
|
+
status: z82.enum(["ready", "no-data"]),
|
|
23951
|
+
reason: z82.enum(["no-runs-yet", "no-queries"]).optional()
|
|
23851
23952
|
});
|
|
23852
23953
|
function emptyCitationVisibility(reason) {
|
|
23853
23954
|
return {
|
|
@@ -23874,103 +23975,103 @@ function citationStateToCited(state) {
|
|
|
23874
23975
|
}
|
|
23875
23976
|
|
|
23876
23977
|
// ../contracts/src/organic-evidence.ts
|
|
23877
|
-
import { z as
|
|
23878
|
-
var organicEvidencePeriodSchema =
|
|
23978
|
+
import { z as z83 } from "zod";
|
|
23979
|
+
var organicEvidencePeriodSchema = z83.union(windowDayValues(WINDOW_SETS.organicEvidence).map((value) => z83.literal(value)));
|
|
23879
23980
|
function parseOrganicEvidencePeriod(value) {
|
|
23880
23981
|
return windowDays(parseWindowIn(value, WINDOW_SETS.organicEvidence, { field: "period", fallback: "90d" }));
|
|
23881
23982
|
}
|
|
23882
|
-
var cohortNameSchema =
|
|
23883
|
-
var countSchema =
|
|
23884
|
-
clicks:
|
|
23885
|
-
impressions:
|
|
23983
|
+
var cohortNameSchema = z83.enum(["earliest", "middle", "prior", "latest"]);
|
|
23984
|
+
var countSchema = z83.object({
|
|
23985
|
+
clicks: z83.number().int().nonnegative(),
|
|
23986
|
+
impressions: z83.number().int().nonnegative()
|
|
23886
23987
|
});
|
|
23887
|
-
var cohortSchema =
|
|
23988
|
+
var cohortSchema = z83.object({
|
|
23888
23989
|
name: cohortNameSchema,
|
|
23889
|
-
startDate:
|
|
23890
|
-
endDate:
|
|
23990
|
+
startDate: z83.string(),
|
|
23991
|
+
endDate: z83.string()
|
|
23891
23992
|
});
|
|
23892
23993
|
var searchCohortSchema = cohortSchema.extend({ totals: countSchema });
|
|
23893
23994
|
var sessionCohortSchema = cohortSchema.extend({
|
|
23894
|
-
organicSessions:
|
|
23895
|
-
});
|
|
23896
|
-
var sourceCoverageSchema =
|
|
23897
|
-
startDate:
|
|
23898
|
-
endDate:
|
|
23899
|
-
observedDays:
|
|
23900
|
-
});
|
|
23901
|
-
var crawlerCountsSchema =
|
|
23902
|
-
verified:
|
|
23903
|
-
claimedUnverified:
|
|
23904
|
-
unknownAiLike:
|
|
23905
|
-
});
|
|
23906
|
-
var referralCountsSchema =
|
|
23907
|
-
total:
|
|
23908
|
-
paid:
|
|
23909
|
-
organic:
|
|
23910
|
-
unknown:
|
|
23911
|
-
});
|
|
23912
|
-
var organicEvidenceDtoSchema =
|
|
23913
|
-
contractVersion:
|
|
23995
|
+
organicSessions: z83.number().int().nonnegative()
|
|
23996
|
+
});
|
|
23997
|
+
var sourceCoverageSchema = z83.object({
|
|
23998
|
+
startDate: z83.string(),
|
|
23999
|
+
endDate: z83.string(),
|
|
24000
|
+
observedDays: z83.number().int().nonnegative()
|
|
24001
|
+
});
|
|
24002
|
+
var crawlerCountsSchema = z83.object({
|
|
24003
|
+
verified: z83.number().int().nonnegative(),
|
|
24004
|
+
claimedUnverified: z83.number().int().nonnegative(),
|
|
24005
|
+
unknownAiLike: z83.number().int().nonnegative()
|
|
24006
|
+
});
|
|
24007
|
+
var referralCountsSchema = z83.object({
|
|
24008
|
+
total: z83.number().int().nonnegative(),
|
|
24009
|
+
paid: z83.number().int().nonnegative(),
|
|
24010
|
+
organic: z83.number().int().nonnegative(),
|
|
24011
|
+
unknown: z83.number().int().nonnegative()
|
|
24012
|
+
});
|
|
24013
|
+
var organicEvidenceDtoSchema = z83.object({
|
|
24014
|
+
contractVersion: z83.literal("organic-evidence/v1"),
|
|
23914
24015
|
periodDays: organicEvidencePeriodSchema,
|
|
23915
24016
|
/** Latest headline evidence date, preferring the GSC property date when available. */
|
|
23916
|
-
asOfDate:
|
|
23917
|
-
coverage:
|
|
23918
|
-
gsc:
|
|
23919
|
-
ga4:
|
|
23920
|
-
server:
|
|
23921
|
-
visibility:
|
|
24017
|
+
asOfDate: z83.string().nullable(),
|
|
24018
|
+
coverage: z83.object({
|
|
24019
|
+
gsc: z83.boolean(),
|
|
24020
|
+
ga4: z83.boolean(),
|
|
24021
|
+
server: z83.boolean(),
|
|
24022
|
+
visibility: z83.boolean()
|
|
23922
24023
|
}),
|
|
23923
|
-
sourceCoverage:
|
|
24024
|
+
sourceCoverage: z83.object({
|
|
23924
24025
|
gsc: sourceCoverageSchema.nullable(),
|
|
23925
24026
|
ga4: sourceCoverageSchema.nullable(),
|
|
23926
24027
|
server: sourceCoverageSchema.nullable(),
|
|
23927
|
-
visibility:
|
|
24028
|
+
visibility: z83.object({ completedAt: z83.string(), ageDays: z83.number().nonnegative() }).nullable()
|
|
23928
24029
|
}),
|
|
23929
|
-
gsc:
|
|
24030
|
+
gsc: z83.object({
|
|
23930
24031
|
propertyTotals: countSchema,
|
|
23931
24032
|
namedBrand: countSchema,
|
|
23932
24033
|
namedNonBrand: countSchema,
|
|
23933
24034
|
suppressedOrUnreportedResidual: countSchema,
|
|
23934
|
-
cohorts:
|
|
24035
|
+
cohorts: z83.array(searchCohortSchema)
|
|
23935
24036
|
}).nullable(),
|
|
23936
|
-
ga4:
|
|
23937
|
-
organicSessions:
|
|
23938
|
-
cohorts:
|
|
24037
|
+
ga4: z83.object({
|
|
24038
|
+
organicSessions: z83.number().int().nonnegative(),
|
|
24039
|
+
cohorts: z83.array(sessionCohortSchema)
|
|
23939
24040
|
}).nullable(),
|
|
23940
|
-
gaAiReferrals:
|
|
23941
|
-
paidSessions:
|
|
23942
|
-
organicSessions:
|
|
24041
|
+
gaAiReferrals: z83.object({
|
|
24042
|
+
paidSessions: z83.number().int().nonnegative(),
|
|
24043
|
+
organicSessions: z83.number().int().nonnegative()
|
|
23943
24044
|
}).nullable(),
|
|
23944
|
-
server:
|
|
24045
|
+
server: z83.object({
|
|
23945
24046
|
crawlerHits: crawlerCountsSchema,
|
|
23946
24047
|
userFetchHits: crawlerCountsSchema,
|
|
23947
24048
|
referralSessions: referralCountsSchema
|
|
23948
24049
|
}).nullable(),
|
|
23949
|
-
visibility:
|
|
23950
|
-
runId:
|
|
23951
|
-
completedAt:
|
|
23952
|
-
ageDays:
|
|
23953
|
-
answerPairs:
|
|
23954
|
-
mentionedPairs:
|
|
23955
|
-
citedPairs:
|
|
24050
|
+
visibility: z83.object({
|
|
24051
|
+
runId: z83.string(),
|
|
24052
|
+
completedAt: z83.string(),
|
|
24053
|
+
ageDays: z83.number().nonnegative(),
|
|
24054
|
+
answerPairs: z83.number().int().nonnegative(),
|
|
24055
|
+
mentionedPairs: z83.number().int().nonnegative(),
|
|
24056
|
+
citedPairs: z83.number().int().nonnegative()
|
|
23956
24057
|
}).nullable(),
|
|
23957
24058
|
measurement: gaMeasurementAnalysisDtoSchema,
|
|
23958
|
-
pages:
|
|
23959
|
-
path:
|
|
24059
|
+
pages: z83.array(z83.object({
|
|
24060
|
+
path: z83.string(),
|
|
23960
24061
|
gsc: countSchema,
|
|
23961
|
-
ga4OrganicSessions:
|
|
23962
|
-
server:
|
|
24062
|
+
ga4OrganicSessions: z83.number().int().nonnegative(),
|
|
24063
|
+
server: z83.object({
|
|
23963
24064
|
crawlerHits: crawlerCountsSchema,
|
|
23964
24065
|
userFetchHits: crawlerCountsSchema,
|
|
23965
24066
|
referralSessions: referralCountsSchema
|
|
23966
24067
|
})
|
|
23967
24068
|
})),
|
|
23968
|
-
findings:
|
|
23969
|
-
tone:
|
|
23970
|
-
title:
|
|
23971
|
-
detail:
|
|
24069
|
+
findings: z83.array(z83.object({
|
|
24070
|
+
tone: z83.enum(["positive", "caution", "neutral"]),
|
|
24071
|
+
title: z83.string(),
|
|
24072
|
+
detail: z83.string()
|
|
23972
24073
|
})),
|
|
23973
|
-
limitations:
|
|
24074
|
+
limitations: z83.array(z83.object({ code: z83.string(), detail: z83.string() }))
|
|
23974
24075
|
});
|
|
23975
24076
|
|
|
23976
24077
|
// ../contracts/src/traffic-path.ts
|
|
@@ -24268,9 +24369,9 @@ function serializeForInlineScript(value) {
|
|
|
24268
24369
|
}
|
|
24269
24370
|
|
|
24270
24371
|
// ../contracts/src/outcome-telemetry.ts
|
|
24271
|
-
import { z as
|
|
24372
|
+
import { z as z84 } from "zod";
|
|
24272
24373
|
var OUTCOME_SURFACES = ["cli", "mcp-stdio", "mcp-http", "aero", "api", "dashboard", "system"];
|
|
24273
|
-
var outcomeSurfaceSchema =
|
|
24374
|
+
var outcomeSurfaceSchema = z84.enum(OUTCOME_SURFACES);
|
|
24274
24375
|
var OutcomeSurfaces = outcomeSurfaceSchema.enum;
|
|
24275
24376
|
var INTEGRATION_NAMES = [
|
|
24276
24377
|
"provider",
|
|
@@ -24292,19 +24393,19 @@ var INTEGRATION_NAMES = [
|
|
|
24292
24393
|
/** The WordPress traffic-logger plugin source, apart from the WordPress publishing connection. */
|
|
24293
24394
|
"traffic_wordpress"
|
|
24294
24395
|
];
|
|
24295
|
-
var integrationNameSchema =
|
|
24396
|
+
var integrationNameSchema = z84.enum(INTEGRATION_NAMES);
|
|
24296
24397
|
var IntegrationNames = integrationNameSchema.enum;
|
|
24297
24398
|
var CONNECTION_ACTIONS = ["connect", "disconnect", "test", "reauth", "select"];
|
|
24298
|
-
var connectionActionSchema =
|
|
24399
|
+
var connectionActionSchema = z84.enum(CONNECTION_ACTIONS);
|
|
24299
24400
|
var ConnectionActions = connectionActionSchema.enum;
|
|
24300
24401
|
var CONNECTION_STATUSES = ["started", "succeeded", "failed", "cancelled"];
|
|
24301
|
-
var connectionStatusSchema =
|
|
24402
|
+
var connectionStatusSchema = z84.enum(CONNECTION_STATUSES);
|
|
24302
24403
|
var ConnectionStatuses = connectionStatusSchema.enum;
|
|
24303
24404
|
var OUTCOME_STATUSES = ["succeeded", "partial", "failed", "skipped", "cancelled"];
|
|
24304
|
-
var outcomeStatusSchema =
|
|
24405
|
+
var outcomeStatusSchema = z84.enum(OUTCOME_STATUSES);
|
|
24305
24406
|
var OutcomeStatuses = outcomeStatusSchema.enum;
|
|
24306
24407
|
var OUTCOME_TRIGGERS = ["manual", "scheduled", "agent", "startup", "retry", "push"];
|
|
24307
|
-
var outcomeTriggerSchema =
|
|
24408
|
+
var outcomeTriggerSchema = z84.enum(OUTCOME_TRIGGERS);
|
|
24308
24409
|
var OutcomeTriggers = outcomeTriggerSchema.enum;
|
|
24309
24410
|
var OUTCOME_REASON_CODES = [
|
|
24310
24411
|
"AUTH_DENIED",
|
|
@@ -24341,7 +24442,7 @@ var OUTCOME_REASON_CODES = [
|
|
|
24341
24442
|
"UNCAUGHT_EXCEPTION",
|
|
24342
24443
|
"UNHANDLED_REJECTION"
|
|
24343
24444
|
];
|
|
24344
|
-
var outcomeReasonCodeSchema =
|
|
24445
|
+
var outcomeReasonCodeSchema = z84.enum(OUTCOME_REASON_CODES);
|
|
24345
24446
|
var OutcomeReasonCodes = outcomeReasonCodeSchema.enum;
|
|
24346
24447
|
var FEATURE_OPERATIONS = {
|
|
24347
24448
|
search_console: ["sync", "inspect", "sitemap_submit"],
|
|
@@ -24371,7 +24472,7 @@ var FEATURE_OPERATIONS = {
|
|
|
24371
24472
|
server: ["start", "crash"]
|
|
24372
24473
|
};
|
|
24373
24474
|
var FEATURE_NAMES = Object.keys(FEATURE_OPERATIONS);
|
|
24374
|
-
var featureNameSchema =
|
|
24475
|
+
var featureNameSchema = z84.enum(FEATURE_NAMES);
|
|
24375
24476
|
var FeatureNames = featureNameSchema.enum;
|
|
24376
24477
|
var OUTCOME_COUNT_KEYS = [
|
|
24377
24478
|
"rows",
|
|
@@ -24409,16 +24510,16 @@ var OUTCOME_COUNT_KEYS = [
|
|
|
24409
24510
|
];
|
|
24410
24511
|
var COUNT_KEY_SET = new Set(OUTCOME_COUNT_KEYS);
|
|
24411
24512
|
var MAX_COUNT = 1e12;
|
|
24412
|
-
var countValueSchema =
|
|
24413
|
-
var countsSchema2 =
|
|
24513
|
+
var countValueSchema = z84.number().int().min(0).max(MAX_COUNT);
|
|
24514
|
+
var countsSchema2 = z84.record(z84.string(), countValueSchema).refine((obj) => Object.keys(obj).length > 0 && Object.keys(obj).length <= 12, "counts must have 1 to 12 keys").refine((obj) => Object.keys(obj).every((k) => COUNT_KEY_SET.has(k)), "unknown count key");
|
|
24414
24515
|
var WEBHOOK_TARGETS = ["first_party", "slack", "discord"];
|
|
24415
|
-
var webhookTargetSchema =
|
|
24516
|
+
var webhookTargetSchema = z84.enum(WEBHOOK_TARGETS);
|
|
24416
24517
|
var WebhookTargets = webhookTargetSchema.enum;
|
|
24417
24518
|
var STATUS_CLASSES = ["2xx", "3xx", "4xx", "5xx", "timeout", "network", "blocked"];
|
|
24418
|
-
var statusClassSchema =
|
|
24519
|
+
var statusClassSchema = z84.enum(STATUS_CLASSES);
|
|
24419
24520
|
var StatusClasses = statusClassSchema.enum;
|
|
24420
24521
|
var DURATION_BUCKETS = ["under_1s", "1s_to_10s", "10s_to_1m", "1m_to_5m", "5m_to_30m", "30m_or_more"];
|
|
24421
|
-
var durationBucketSchema =
|
|
24522
|
+
var durationBucketSchema = z84.enum(DURATION_BUCKETS);
|
|
24422
24523
|
var DurationBuckets = durationBucketSchema.enum;
|
|
24423
24524
|
function bucketDuration(durationMs) {
|
|
24424
24525
|
const duration = Number.isFinite(durationMs) ? Math.max(0, durationMs) : 0;
|
|
@@ -24429,12 +24530,12 @@ function bucketDuration(durationMs) {
|
|
|
24429
24530
|
if (duration < 18e5) return "5m_to_30m";
|
|
24430
24531
|
return "30m_or_more";
|
|
24431
24532
|
}
|
|
24432
|
-
var errorNameSchema =
|
|
24433
|
-
var agentSlugSchema =
|
|
24434
|
-
var providerNameSchema2 =
|
|
24435
|
-
var modelIdSchema2 =
|
|
24436
|
-
var slugSchema =
|
|
24437
|
-
var integrationConnectionPropertiesSchema =
|
|
24533
|
+
var errorNameSchema = z84.string().regex(/^[A-Z_$][\w$]{0,39}$/i);
|
|
24534
|
+
var agentSlugSchema = z84.string().regex(/^[a-z0-9][a-z0-9._-]{0,39}$/);
|
|
24535
|
+
var providerNameSchema2 = z84.enum(PROVIDER_NAMES);
|
|
24536
|
+
var modelIdSchema2 = z84.string().regex(/^[A-Z0-9][\w.:/@-]{0,99}$/i).refine((v) => !v.includes("://"), "a model id is never a URL");
|
|
24537
|
+
var slugSchema = z84.string().regex(/^[a-z0-9][a-z0-9._-]{0,31}$/);
|
|
24538
|
+
var integrationConnectionPropertiesSchema = z84.object({
|
|
24438
24539
|
integration: integrationNameSchema,
|
|
24439
24540
|
provider: providerNameSchema2.optional(),
|
|
24440
24541
|
action: connectionActionSchema,
|
|
@@ -24445,9 +24546,9 @@ var integrationConnectionPropertiesSchema = z83.object({
|
|
|
24445
24546
|
surface: outcomeSurfaceSchema.optional(),
|
|
24446
24547
|
agent: agentSlugSchema.optional(),
|
|
24447
24548
|
durationBucket: durationBucketSchema.optional(),
|
|
24448
|
-
attempt:
|
|
24549
|
+
attempt: z84.number().int().min(1).max(1e6).optional(),
|
|
24449
24550
|
/** The install's first success of this kind; set by the helpers, never by callers. */
|
|
24450
|
-
first:
|
|
24551
|
+
first: z84.literal(true).optional()
|
|
24451
24552
|
}).strict().refine(
|
|
24452
24553
|
(p) => p.integration === IntegrationNames.provider === (p.provider !== void 0),
|
|
24453
24554
|
"provider is required for, and only for, integration provider"
|
|
@@ -24455,9 +24556,9 @@ var integrationConnectionPropertiesSchema = z83.object({
|
|
|
24455
24556
|
(p) => p.status === ConnectionStatuses.succeeded || p.status === ConnectionStatuses.started || p.reasonCode !== void 0,
|
|
24456
24557
|
"a failed or cancelled attempt needs a reasonCode"
|
|
24457
24558
|
);
|
|
24458
|
-
var featureCompletedPropertiesSchema =
|
|
24559
|
+
var featureCompletedPropertiesSchema = z84.object({
|
|
24459
24560
|
feature: featureNameSchema,
|
|
24460
|
-
operation:
|
|
24561
|
+
operation: z84.string().regex(/^[a-z][a-z_]{0,31}$/),
|
|
24461
24562
|
status: outcomeStatusSchema,
|
|
24462
24563
|
trigger: outcomeTriggerSchema.optional(),
|
|
24463
24564
|
surface: outcomeSurfaceSchema.optional(),
|
|
@@ -24472,17 +24573,17 @@ var featureCompletedPropertiesSchema = z83.object({
|
|
|
24472
24573
|
provider: providerNameSchema2.optional(),
|
|
24473
24574
|
model: modelIdSchema2.optional(),
|
|
24474
24575
|
modelProvider: slugSchema.optional(),
|
|
24475
|
-
sampleRate:
|
|
24476
|
-
droppedBefore:
|
|
24477
|
-
domainHash:
|
|
24478
|
-
first:
|
|
24576
|
+
sampleRate: z84.number().int().min(1).max(1e6).optional(),
|
|
24577
|
+
droppedBefore: z84.number().int().min(0).max(MAX_COUNT).optional(),
|
|
24578
|
+
domainHash: z84.string().regex(/^[0-9a-f]{64}$/).optional(),
|
|
24579
|
+
first: z84.literal(true).optional()
|
|
24479
24580
|
}).strict().refine(
|
|
24480
24581
|
(p) => FEATURE_OPERATIONS[p.feature].includes(p.operation),
|
|
24481
24582
|
"operation is not one this feature reports"
|
|
24482
24583
|
).refine((p) => p.status === OutcomeStatuses.succeeded || p.reasonCode !== void 0, "a non-succeeded outcome needs a reasonCode");
|
|
24483
24584
|
var INSTALL_SOURCES = ["npm", "homebrew", "docker", "source"];
|
|
24484
|
-
var installSourceSchema =
|
|
24485
|
-
var installRefSchema =
|
|
24585
|
+
var installSourceSchema = z84.enum(INSTALL_SOURCES);
|
|
24586
|
+
var installRefSchema = z84.string().regex(/^[a-z0-9][a-z0-9-]{0,31}$/);
|
|
24486
24587
|
function normalizeInstallRef(value) {
|
|
24487
24588
|
const ref = value?.trim().toLowerCase();
|
|
24488
24589
|
return ref && installRefSchema.safeParse(ref).success ? ref : void 0;
|
|
@@ -24517,11 +24618,11 @@ var INSTALL_STATE_USAGE_KEYS = [
|
|
|
24517
24618
|
];
|
|
24518
24619
|
var fixedKeyCounts = (keys) => {
|
|
24519
24620
|
const allowed = new Set(keys);
|
|
24520
|
-
return
|
|
24621
|
+
return z84.record(z84.string(), countValueSchema).refine((obj) => Object.keys(obj).every((k) => allowed.has(k)), "unknown key");
|
|
24521
24622
|
};
|
|
24522
|
-
var installStatePropertiesSchema =
|
|
24523
|
-
providers:
|
|
24524
|
-
integrations:
|
|
24623
|
+
var installStatePropertiesSchema = z84.object({
|
|
24624
|
+
providers: z84.array(providerNameSchema2).max(PROVIDER_NAMES.length),
|
|
24625
|
+
integrations: z84.array(integrationNameSchema.exclude([IntegrationNames.provider])).max(INTEGRATION_NAMES.length),
|
|
24525
24626
|
counts: fixedKeyCounts(INSTALL_STATE_COUNT_KEYS),
|
|
24526
24627
|
usage24h: fixedKeyCounts(INSTALL_STATE_USAGE_KEYS),
|
|
24527
24628
|
providerCalls24h: fixedKeyCounts(PROVIDER_NAMES).optional(),
|
|
@@ -24602,7 +24703,7 @@ function classifyProviderOutcomeError(err) {
|
|
|
24602
24703
|
}
|
|
24603
24704
|
|
|
24604
24705
|
// ../contracts/src/ui-telemetry.ts
|
|
24605
|
-
import { z as
|
|
24706
|
+
import { z as z85 } from "zod";
|
|
24606
24707
|
var UI_PAGES = [
|
|
24607
24708
|
"/",
|
|
24608
24709
|
"/projects",
|
|
@@ -24631,7 +24732,7 @@ var UI_PAGES = [
|
|
|
24631
24732
|
"not-found",
|
|
24632
24733
|
"other"
|
|
24633
24734
|
];
|
|
24634
|
-
var uiPageSchema =
|
|
24735
|
+
var uiPageSchema = z85.enum(UI_PAGES);
|
|
24635
24736
|
var UI_PROJECT_TABS = [
|
|
24636
24737
|
"overview",
|
|
24637
24738
|
"portfolio",
|
|
@@ -24649,7 +24750,7 @@ var UI_PROJECT_TABS = [
|
|
|
24649
24750
|
"settings",
|
|
24650
24751
|
"other"
|
|
24651
24752
|
];
|
|
24652
|
-
var uiProjectTabSchema =
|
|
24753
|
+
var uiProjectTabSchema = z85.enum(UI_PROJECT_TABS);
|
|
24653
24754
|
var UI_ACTIONS = [
|
|
24654
24755
|
"sweep.launch",
|
|
24655
24756
|
"sweep.cancel",
|
|
@@ -24691,7 +24792,7 @@ var UI_ACTIONS = [
|
|
|
24691
24792
|
/** A table search settled on a non-empty query (debounced or Enter; the text is never sent). */
|
|
24692
24793
|
"search.submit"
|
|
24693
24794
|
];
|
|
24694
|
-
var uiActionSchema =
|
|
24795
|
+
var uiActionSchema = z85.enum(UI_ACTIONS);
|
|
24695
24796
|
var UI_INTEGRATIONS = [
|
|
24696
24797
|
"google",
|
|
24697
24798
|
"gsc",
|
|
@@ -24707,9 +24808,9 @@ var UI_INTEGRATIONS = [
|
|
|
24707
24808
|
"traffic_cloud_run",
|
|
24708
24809
|
"traffic_wordpress"
|
|
24709
24810
|
];
|
|
24710
|
-
var uiIntegrationSchema =
|
|
24811
|
+
var uiIntegrationSchema = z85.enum(UI_INTEGRATIONS);
|
|
24711
24812
|
var UI_FILTERS = ["provider", "model", "location", "window", "query_class", "other"];
|
|
24712
|
-
var uiFilterSchema =
|
|
24813
|
+
var uiFilterSchema = z85.enum(UI_FILTERS);
|
|
24713
24814
|
var UI_EXPORT_FORMATS = ["csv", "json", "html"];
|
|
24714
24815
|
var UI_ERROR_KINDS = ["render", "unhandled", "api"];
|
|
24715
24816
|
var UI_STATUS_CLASSES = ["4xx", "5xx", "network"];
|
|
@@ -24794,45 +24895,45 @@ function isUiApiRouteTemplate(route) {
|
|
|
24794
24895
|
return PARAM_SEGMENT.test(segment) || UI_ROUTE_FIXED_CHILDREN.has(`${previous}/${segment}`);
|
|
24795
24896
|
});
|
|
24796
24897
|
}
|
|
24797
|
-
var uiEventBaseSchema =
|
|
24798
|
-
eventId:
|
|
24799
|
-
uiSessionId:
|
|
24898
|
+
var uiEventBaseSchema = z85.object({
|
|
24899
|
+
eventId: z85.string().uuid(),
|
|
24900
|
+
uiSessionId: z85.string().uuid(),
|
|
24800
24901
|
page: uiPageSchema
|
|
24801
24902
|
});
|
|
24802
|
-
var uiTelemetryEventSchema =
|
|
24903
|
+
var uiTelemetryEventSchema = z85.discriminatedUnion("event", [
|
|
24803
24904
|
uiEventBaseSchema.extend({
|
|
24804
|
-
event:
|
|
24905
|
+
event: z85.literal("ui.page_viewed"),
|
|
24805
24906
|
tab: uiProjectTabSchema.optional()
|
|
24806
24907
|
}).strict(),
|
|
24807
24908
|
uiEventBaseSchema.extend({
|
|
24808
|
-
event:
|
|
24909
|
+
event: z85.literal("ui.action"),
|
|
24809
24910
|
action: uiActionSchema,
|
|
24810
24911
|
tab: uiProjectTabSchema.optional(),
|
|
24811
24912
|
integration: uiIntegrationSchema.optional(),
|
|
24812
|
-
format:
|
|
24913
|
+
format: z85.enum(UI_EXPORT_FORMATS).optional(),
|
|
24813
24914
|
filter: uiFilterSchema.optional()
|
|
24814
24915
|
}).strict(),
|
|
24815
24916
|
uiEventBaseSchema.extend({
|
|
24816
|
-
event:
|
|
24817
|
-
kind:
|
|
24917
|
+
event: z85.literal("ui.error"),
|
|
24918
|
+
kind: z85.enum(UI_ERROR_KINDS),
|
|
24818
24919
|
tab: uiProjectTabSchema.optional(),
|
|
24819
|
-
component:
|
|
24820
|
-
errorName:
|
|
24821
|
-
route:
|
|
24822
|
-
method:
|
|
24823
|
-
statusClass:
|
|
24824
|
-
status:
|
|
24920
|
+
component: z85.string().regex(UI_COMPONENT_PATTERN).optional(),
|
|
24921
|
+
errorName: z85.string().regex(UI_ERROR_NAME_PATTERN).optional(),
|
|
24922
|
+
route: z85.string().max(UI_API_ROUTE_MAX_LENGTH).refine(isUiApiRouteTemplate, "route must be a route template").optional(),
|
|
24923
|
+
method: z85.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).optional(),
|
|
24924
|
+
statusClass: z85.enum(UI_STATUS_CLASSES).optional(),
|
|
24925
|
+
status: z85.number().int().min(400).max(599).optional()
|
|
24825
24926
|
}).strict(),
|
|
24826
24927
|
uiEventBaseSchema.extend({
|
|
24827
|
-
event:
|
|
24828
|
-
metric:
|
|
24829
|
-
rating:
|
|
24928
|
+
event: z85.literal("ui.vitals"),
|
|
24929
|
+
metric: z85.enum(UI_VITAL_METRICS),
|
|
24930
|
+
rating: z85.enum(UI_VITAL_RATINGS),
|
|
24830
24931
|
tab: uiProjectTabSchema.optional()
|
|
24831
24932
|
}).strict()
|
|
24832
24933
|
]);
|
|
24833
24934
|
|
|
24834
24935
|
// ../contracts/src/feedback.ts
|
|
24835
|
-
import { z as
|
|
24936
|
+
import { z as z86 } from "zod";
|
|
24836
24937
|
|
|
24837
24938
|
// ../contracts/src/log-redaction.ts
|
|
24838
24939
|
var REDACTED = "[REDACTED]";
|
|
@@ -24984,7 +25085,7 @@ function redactEmbeddedUrls(value) {
|
|
|
24984
25085
|
|
|
24985
25086
|
// ../contracts/src/feedback.ts
|
|
24986
25087
|
var FEEDBACK_KINDS = ["struggle", "bug", "improvement", "other"];
|
|
24987
|
-
var feedbackKindSchema =
|
|
25088
|
+
var feedbackKindSchema = z86.enum(FEEDBACK_KINDS);
|
|
24988
25089
|
var FEEDBACK_LIMITS = {
|
|
24989
25090
|
summary: 500,
|
|
24990
25091
|
details: 4e3,
|
|
@@ -24992,17 +25093,17 @@ var FEEDBACK_LIMITS = {
|
|
|
24992
25093
|
command: 120,
|
|
24993
25094
|
errorCode: 40
|
|
24994
25095
|
};
|
|
24995
|
-
var feedbackSubmissionSchema =
|
|
25096
|
+
var feedbackSubmissionSchema = z86.object({
|
|
24996
25097
|
kind: feedbackKindSchema,
|
|
24997
|
-
summary:
|
|
24998
|
-
details:
|
|
24999
|
-
area:
|
|
25000
|
-
command:
|
|
25001
|
-
errorCode:
|
|
25098
|
+
summary: z86.string().trim().min(1).max(FEEDBACK_LIMITS.summary),
|
|
25099
|
+
details: z86.string().trim().min(1).max(FEEDBACK_LIMITS.details).optional(),
|
|
25100
|
+
area: z86.string().trim().min(1).max(FEEDBACK_LIMITS.area).optional(),
|
|
25101
|
+
command: z86.string().trim().min(1).max(FEEDBACK_LIMITS.command).optional(),
|
|
25102
|
+
errorCode: z86.string().trim().min(1).max(FEEDBACK_LIMITS.errorCode).optional()
|
|
25002
25103
|
}).strict();
|
|
25003
|
-
var feedbackAcceptedDtoSchema =
|
|
25004
|
-
accepted:
|
|
25005
|
-
id:
|
|
25104
|
+
var feedbackAcceptedDtoSchema = z86.object({
|
|
25105
|
+
accepted: z86.boolean(),
|
|
25106
|
+
id: z86.string()
|
|
25006
25107
|
});
|
|
25007
25108
|
function redactFeedbackText(value, limit) {
|
|
25008
25109
|
return truncateUtf16(
|
|
@@ -25081,7 +25182,7 @@ function asRecord(value) {
|
|
|
25081
25182
|
}
|
|
25082
25183
|
|
|
25083
25184
|
// ../contracts/src/tolerant-read.ts
|
|
25084
|
-
import { z as
|
|
25185
|
+
import { z as z87 } from "zod";
|
|
25085
25186
|
var WRAPPER_TYPES = /* @__PURE__ */ new Set(["optional", "nullable", "default", "prefault", "readonly", "catch", "nonoptional"]);
|
|
25086
25187
|
var DEPTH_LIMIT = 64;
|
|
25087
25188
|
function defOf(schema) {
|
|
@@ -25092,9 +25193,9 @@ function cloneWith(schema, changes) {
|
|
|
25092
25193
|
}
|
|
25093
25194
|
function openPrimitive(values) {
|
|
25094
25195
|
if (values.length === 0) return void 0;
|
|
25095
|
-
if (values.every((value) => typeof value === "string")) return
|
|
25096
|
-
if (values.every((value) => typeof value === "number")) return
|
|
25097
|
-
if (values.every((value) => typeof value === "boolean")) return
|
|
25196
|
+
if (values.every((value) => typeof value === "string")) return z87.string();
|
|
25197
|
+
if (values.every((value) => typeof value === "number")) return z87.number();
|
|
25198
|
+
if (values.every((value) => typeof value === "boolean")) return z87.boolean();
|
|
25098
25199
|
return void 0;
|
|
25099
25200
|
}
|
|
25100
25201
|
function walk2(schema, open, memo, depth) {
|
|
@@ -25108,7 +25209,7 @@ function walk2(schema, open, memo, depth) {
|
|
|
25108
25209
|
const shape = Object.fromEntries(Object.entries(schema.shape).map(([key, child]) => [key, next(child)]));
|
|
25109
25210
|
const declared = def.catchall;
|
|
25110
25211
|
const catchall = open.get(schema) ?? (declared && defOf(declared).type !== "never" ? next(declared) : void 0);
|
|
25111
|
-
result = catchall ?
|
|
25212
|
+
result = catchall ? z87.object(shape).catchall(catchall) : z87.object(shape);
|
|
25112
25213
|
} else if (WRAPPER_TYPES.has(def.type)) {
|
|
25113
25214
|
const inner = def.innerType;
|
|
25114
25215
|
const mapped = next(inner);
|
|
@@ -25125,10 +25226,10 @@ function walk2(schema, open, memo, depth) {
|
|
|
25125
25226
|
const options = def.options;
|
|
25126
25227
|
const mapped = options.map(next);
|
|
25127
25228
|
const changed = mapped.some((option, index) => option !== options[index]);
|
|
25128
|
-
result = !changed ? schema : def.discriminator ?
|
|
25229
|
+
result = !changed ? schema : def.discriminator ? z87.union(mapped) : cloneWith(schema, { options: mapped });
|
|
25129
25230
|
} else if (def.type === "record") {
|
|
25130
25231
|
const keyType = def.keyType, valueType = def.valueType;
|
|
25131
|
-
const mappedKey = defOf(keyType).type === "enum" ?
|
|
25232
|
+
const mappedKey = defOf(keyType).type === "enum" ? z87.string() : keyType;
|
|
25132
25233
|
const mappedValue = next(valueType);
|
|
25133
25234
|
result = mappedKey === keyType && mappedValue === valueType ? schema : cloneWith(schema, { keyType: mappedKey, valueType: mappedValue });
|
|
25134
25235
|
} else if (def.type === "intersection") {
|
|
@@ -25144,7 +25245,7 @@ function walk2(schema, open, memo, depth) {
|
|
|
25144
25245
|
result = changed ? cloneWith(schema, { items: mappedItems, rest: mappedRest }) : schema;
|
|
25145
25246
|
} else if (def.type === "lazy") {
|
|
25146
25247
|
const getter = def.getter;
|
|
25147
|
-
result =
|
|
25248
|
+
result = z87.lazy(() => next(getter()));
|
|
25148
25249
|
} else if (def.type === "enum") {
|
|
25149
25250
|
result = openPrimitive(Object.values(def.entries)) ?? schema;
|
|
25150
25251
|
} else if (def.type === "literal") {
|
|
@@ -25159,8 +25260,8 @@ function tolerantReadSchema(schema, options = {}) {
|
|
|
25159
25260
|
}
|
|
25160
25261
|
|
|
25161
25262
|
// ../contracts/src/sentiment-read.ts
|
|
25162
|
-
import { z as
|
|
25163
|
-
var OPEN_COUNTS = { openKeys: [[sentimentCountsSchema,
|
|
25263
|
+
import { z as z88 } from "zod";
|
|
25264
|
+
var OPEN_COUNTS = { openKeys: [[sentimentCountsSchema, z88.number().int().nonnegative()]] };
|
|
25164
25265
|
var sentimentSettingsReadSchema = tolerantReadSchema(sentimentSettingsSchema, OPEN_COUNTS);
|
|
25165
25266
|
var sentimentSummaryReadSchema = tolerantReadSchema(sentimentSummarySchema, OPEN_COUNTS);
|
|
25166
25267
|
var sentimentEvidencePageReadSchema = tolerantReadSchema(sentimentEvidencePageSchema, OPEN_COUNTS);
|
|
@@ -25190,29 +25291,29 @@ function rateOverChecked(numerator, answers, excluded, field) {
|
|
|
25190
25291
|
}
|
|
25191
25292
|
|
|
25192
25293
|
// ../contracts/src/cli-catalog.ts
|
|
25193
|
-
import { z as
|
|
25194
|
-
var cliCatalogOptionSchema =
|
|
25195
|
-
name:
|
|
25196
|
-
type:
|
|
25197
|
-
multiple:
|
|
25198
|
-
});
|
|
25199
|
-
var cliCatalogCommandSchema =
|
|
25200
|
-
id:
|
|
25201
|
-
path:
|
|
25202
|
-
usage:
|
|
25203
|
-
supportsDryRun:
|
|
25204
|
-
windows:
|
|
25205
|
-
options:
|
|
25294
|
+
import { z as z89 } from "zod";
|
|
25295
|
+
var cliCatalogOptionSchema = z89.object({
|
|
25296
|
+
name: z89.string(),
|
|
25297
|
+
type: z89.enum(["string", "boolean"]),
|
|
25298
|
+
multiple: z89.boolean()
|
|
25299
|
+
});
|
|
25300
|
+
var cliCatalogCommandSchema = z89.object({
|
|
25301
|
+
id: z89.string(),
|
|
25302
|
+
path: z89.array(z89.string()).min(1),
|
|
25303
|
+
usage: z89.string(),
|
|
25304
|
+
supportsDryRun: z89.boolean(),
|
|
25305
|
+
windows: z89.array(z89.string()).optional(),
|
|
25306
|
+
options: z89.array(cliCatalogOptionSchema),
|
|
25206
25307
|
access: operationAccessSchema
|
|
25207
25308
|
});
|
|
25208
|
-
var cliCatalogSchema =
|
|
25209
|
-
version:
|
|
25210
|
-
globalOptions:
|
|
25211
|
-
groups:
|
|
25212
|
-
root:
|
|
25213
|
-
section:
|
|
25214
|
-
summary:
|
|
25215
|
-
commands:
|
|
25309
|
+
var cliCatalogSchema = z89.object({
|
|
25310
|
+
version: z89.string(),
|
|
25311
|
+
globalOptions: z89.array(cliCatalogOptionSchema),
|
|
25312
|
+
groups: z89.array(z89.object({
|
|
25313
|
+
root: z89.string(),
|
|
25314
|
+
section: z89.string(),
|
|
25315
|
+
summary: z89.string(),
|
|
25316
|
+
commands: z89.array(cliCatalogCommandSchema)
|
|
25216
25317
|
}))
|
|
25217
25318
|
});
|
|
25218
25319
|
|
|
@@ -25260,6 +25361,8 @@ export {
|
|
|
25260
25361
|
notificationEventSchema,
|
|
25261
25362
|
notificationDtoSchema,
|
|
25262
25363
|
notificationCreateRequestSchema,
|
|
25364
|
+
ReviewDeliveryStates,
|
|
25365
|
+
googleBusinessReviewUrl,
|
|
25263
25366
|
AppError,
|
|
25264
25367
|
notFound,
|
|
25265
25368
|
alreadyExists,
|
|
@@ -26293,6 +26396,18 @@ export {
|
|
|
26293
26396
|
LOCATION_REDIRECT_STATUSES,
|
|
26294
26397
|
isLocationRedirectStatus,
|
|
26295
26398
|
escapeLikePattern,
|
|
26399
|
+
GBP_POSTS_WRITE_SCOPE,
|
|
26400
|
+
GBP_LIVE_READ_SCOPE,
|
|
26401
|
+
gbpAccountNameSchema,
|
|
26402
|
+
gbpLocationNameSchema,
|
|
26403
|
+
gbpLocalPostNameSchema,
|
|
26404
|
+
GbpLocalPostStates,
|
|
26405
|
+
gbpLocalPostContentSchema,
|
|
26406
|
+
gbpLocalPostDtoSchema,
|
|
26407
|
+
gbpLocalPostListSchema,
|
|
26408
|
+
gbpLocalPostCreateSchema,
|
|
26409
|
+
gbpLocalPostAttemptSchema,
|
|
26410
|
+
gbpLiveReviewsSchema,
|
|
26296
26411
|
READ_ONLY_SCOPE,
|
|
26297
26412
|
WILDCARD_SCOPE,
|
|
26298
26413
|
RESEARCH_RUN_SCOPE,
|