@canonry/canonry 4.132.0 → 4.133.1
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/assets/{AuditHistoryPanel-Carj_FCP.js → AuditHistoryPanel-BKJ_bJO3.js} +1 -1
- package/assets/assets/{BacklinksPage-CqOTDVIn.js → BacklinksPage-Dlp78T7O.js} +1 -1
- package/assets/assets/{ChartPrimitives-EuQ82l0S.js → ChartPrimitives-BnqLVaHC.js} +1 -1
- package/assets/assets/{HistoryPage-D6XQfiLX.js → HistoryPage-dEjboZIm.js} +1 -1
- package/assets/assets/ProjectPage-CV1zK5No.js +8 -0
- package/assets/assets/{RunRow-ThryEZFR.js → RunRow-C0PeLbDh.js} +1 -1
- package/assets/assets/{RunsPage-RFs2WkTC.js → RunsPage-8cmHsMEV.js} +1 -1
- package/assets/assets/{SettingsPage-DoUccn9s.js → SettingsPage-FzWCV54A.js} +1 -1
- package/assets/assets/{TrafficPage-CVvSDZPY.js → TrafficPage-BrEuU4K9.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-BTUQUBeS.js → TrafficSourceDetailPage-yqyQGzqQ.js} +1 -1
- package/assets/assets/{arrow-left-BoCNqusn.js → arrow-left-DJbzrqwz.js} +1 -1
- package/assets/assets/{extract-error-message-BsfOVrKi.js → extract-error-message-7lcxZroQ.js} +1 -1
- package/assets/assets/index-BKoAGOtU.css +1 -0
- package/assets/assets/index-DtOyJ_1v.js +210 -0
- package/assets/assets/{trash-2-BPb4368K.js → trash-2-DFJYR1Fq.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-RWTOEEG3.js → chunk-42P7POVS.js} +4 -4
- package/dist/{chunk-5FWAPJFX.js → chunk-P4MIG7V5.js} +37 -1
- package/dist/{chunk-QIJKS5KN.js → chunk-VPY3PZXV.js} +1745 -1233
- package/dist/{chunk-7BD2ZOPV.js → chunk-ZPQX5ZQ2.js} +654 -555
- package/dist/cli.js +76 -10
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-RU2ACYPY.js → intelligence-service-2K7GVEQM.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +9 -9
- package/assets/assets/ProjectPage-Dswa9Ah6.js +0 -8
- package/assets/assets/index-JhX-wfQO.css +0 -1
- package/assets/assets/index-jJurRky0.js +0 -210
|
@@ -5845,6 +5845,103 @@ var projectReportDtoSchema = z33.object({
|
|
|
5845
5845
|
groundingSources: z33.array(contentSourceRowDtoSchema)
|
|
5846
5846
|
});
|
|
5847
5847
|
|
|
5848
|
+
// ../contracts/src/organic-evidence.ts
|
|
5849
|
+
import { z as z34 } from "zod";
|
|
5850
|
+
var organicEvidencePeriodSchema = z34.union([z34.literal(60), z34.literal(90)]);
|
|
5851
|
+
var cohortNameSchema = z34.enum(["earliest", "middle", "prior", "latest"]);
|
|
5852
|
+
var countSchema = z34.object({
|
|
5853
|
+
clicks: z34.number().int().nonnegative(),
|
|
5854
|
+
impressions: z34.number().int().nonnegative()
|
|
5855
|
+
});
|
|
5856
|
+
var cohortSchema = z34.object({
|
|
5857
|
+
name: cohortNameSchema,
|
|
5858
|
+
startDate: z34.string(),
|
|
5859
|
+
endDate: z34.string()
|
|
5860
|
+
});
|
|
5861
|
+
var searchCohortSchema = cohortSchema.extend({ totals: countSchema });
|
|
5862
|
+
var sessionCohortSchema = cohortSchema.extend({
|
|
5863
|
+
organicSessions: z34.number().int().nonnegative()
|
|
5864
|
+
});
|
|
5865
|
+
var sourceCoverageSchema = z34.object({
|
|
5866
|
+
startDate: z34.string(),
|
|
5867
|
+
endDate: z34.string(),
|
|
5868
|
+
observedDays: z34.number().int().nonnegative()
|
|
5869
|
+
});
|
|
5870
|
+
var crawlerCountsSchema = z34.object({
|
|
5871
|
+
verified: z34.number().int().nonnegative(),
|
|
5872
|
+
claimedUnverified: z34.number().int().nonnegative(),
|
|
5873
|
+
unknownAiLike: z34.number().int().nonnegative()
|
|
5874
|
+
});
|
|
5875
|
+
var referralCountsSchema = z34.object({
|
|
5876
|
+
total: z34.number().int().nonnegative(),
|
|
5877
|
+
paid: z34.number().int().nonnegative(),
|
|
5878
|
+
organic: z34.number().int().nonnegative(),
|
|
5879
|
+
unknown: z34.number().int().nonnegative()
|
|
5880
|
+
});
|
|
5881
|
+
var organicEvidenceDtoSchema = z34.object({
|
|
5882
|
+
contractVersion: z34.literal("organic-evidence/v1"),
|
|
5883
|
+
periodDays: organicEvidencePeriodSchema,
|
|
5884
|
+
/** Latest headline evidence date, preferring the GSC property date when available. */
|
|
5885
|
+
asOfDate: z34.string().nullable(),
|
|
5886
|
+
coverage: z34.object({
|
|
5887
|
+
gsc: z34.boolean(),
|
|
5888
|
+
ga4: z34.boolean(),
|
|
5889
|
+
server: z34.boolean(),
|
|
5890
|
+
visibility: z34.boolean()
|
|
5891
|
+
}),
|
|
5892
|
+
sourceCoverage: z34.object({
|
|
5893
|
+
gsc: sourceCoverageSchema.nullable(),
|
|
5894
|
+
ga4: sourceCoverageSchema.nullable(),
|
|
5895
|
+
server: sourceCoverageSchema.nullable(),
|
|
5896
|
+
visibility: z34.object({ completedAt: z34.string(), ageDays: z34.number().nonnegative() }).nullable()
|
|
5897
|
+
}),
|
|
5898
|
+
gsc: z34.object({
|
|
5899
|
+
propertyTotals: countSchema,
|
|
5900
|
+
namedBrand: countSchema,
|
|
5901
|
+
namedNonBrand: countSchema,
|
|
5902
|
+
suppressedOrUnreportedResidual: countSchema,
|
|
5903
|
+
cohorts: z34.array(searchCohortSchema)
|
|
5904
|
+
}).nullable(),
|
|
5905
|
+
ga4: z34.object({
|
|
5906
|
+
organicSessions: z34.number().int().nonnegative(),
|
|
5907
|
+
cohorts: z34.array(sessionCohortSchema)
|
|
5908
|
+
}).nullable(),
|
|
5909
|
+
gaAiReferrals: z34.object({
|
|
5910
|
+
paidSessions: z34.number().int().nonnegative(),
|
|
5911
|
+
organicSessions: z34.number().int().nonnegative()
|
|
5912
|
+
}).nullable(),
|
|
5913
|
+
server: z34.object({
|
|
5914
|
+
crawlerHits: crawlerCountsSchema,
|
|
5915
|
+
userFetchHits: crawlerCountsSchema,
|
|
5916
|
+
referralSessions: referralCountsSchema
|
|
5917
|
+
}).nullable(),
|
|
5918
|
+
visibility: z34.object({
|
|
5919
|
+
runId: z34.string(),
|
|
5920
|
+
completedAt: z34.string(),
|
|
5921
|
+
ageDays: z34.number().nonnegative(),
|
|
5922
|
+
answerPairs: z34.number().int().nonnegative(),
|
|
5923
|
+
mentionedPairs: z34.number().int().nonnegative(),
|
|
5924
|
+
citedPairs: z34.number().int().nonnegative()
|
|
5925
|
+
}).nullable(),
|
|
5926
|
+
measurement: gaMeasurementAnalysisDtoSchema,
|
|
5927
|
+
pages: z34.array(z34.object({
|
|
5928
|
+
path: z34.string(),
|
|
5929
|
+
gsc: countSchema,
|
|
5930
|
+
ga4OrganicSessions: z34.number().int().nonnegative(),
|
|
5931
|
+
server: z34.object({
|
|
5932
|
+
crawlerHits: crawlerCountsSchema,
|
|
5933
|
+
userFetchHits: crawlerCountsSchema,
|
|
5934
|
+
referralSessions: referralCountsSchema
|
|
5935
|
+
})
|
|
5936
|
+
})),
|
|
5937
|
+
findings: z34.array(z34.object({
|
|
5938
|
+
tone: z34.enum(["positive", "caution", "neutral"]),
|
|
5939
|
+
title: z34.string(),
|
|
5940
|
+
detail: z34.string()
|
|
5941
|
+
})),
|
|
5942
|
+
limitations: z34.array(z34.object({ code: z34.string(), detail: z34.string() }))
|
|
5943
|
+
});
|
|
5944
|
+
|
|
5848
5945
|
// ../contracts/src/report-dedup.ts
|
|
5849
5946
|
var REPORT_INTENT_STOPWORDS = /* @__PURE__ */ new Set([
|
|
5850
5947
|
"a",
|
|
@@ -5913,10 +6010,10 @@ function dedupeReportOpportunities(report) {
|
|
|
5913
6010
|
}
|
|
5914
6011
|
|
|
5915
6012
|
// ../contracts/src/skills.ts
|
|
5916
|
-
import { z as
|
|
5917
|
-
var codingAgentSchema =
|
|
6013
|
+
import { z as z35 } from "zod";
|
|
6014
|
+
var codingAgentSchema = z35.enum(["claude", "codex"]);
|
|
5918
6015
|
var CodingAgents = codingAgentSchema.enum;
|
|
5919
|
-
var skillsClientSchema =
|
|
6016
|
+
var skillsClientSchema = z35.enum(["claude", "codex", "all"]);
|
|
5920
6017
|
var SkillsClients = skillsClientSchema.enum;
|
|
5921
6018
|
var SKILL_MANIFEST_FILENAME = ".canonry-skill-manifest.json";
|
|
5922
6019
|
function classifySkillFile(params) {
|
|
@@ -5934,22 +6031,22 @@ function coerceSkillManifest(parsed) {
|
|
|
5934
6031
|
}
|
|
5935
6032
|
|
|
5936
6033
|
// ../contracts/src/traffic.ts
|
|
5937
|
-
import { z as
|
|
5938
|
-
var trafficCrawlerSegmentsSchema =
|
|
5939
|
-
content:
|
|
5940
|
-
sitemap:
|
|
5941
|
-
robots:
|
|
5942
|
-
asset:
|
|
5943
|
-
other:
|
|
5944
|
-
});
|
|
5945
|
-
var trafficPathClassSchema =
|
|
6034
|
+
import { z as z36 } from "zod";
|
|
6035
|
+
var trafficCrawlerSegmentsSchema = z36.object({
|
|
6036
|
+
content: z36.number().int().nonnegative(),
|
|
6037
|
+
sitemap: z36.number().int().nonnegative(),
|
|
6038
|
+
robots: z36.number().int().nonnegative(),
|
|
6039
|
+
asset: z36.number().int().nonnegative(),
|
|
6040
|
+
other: z36.number().int().nonnegative()
|
|
6041
|
+
});
|
|
6042
|
+
var trafficPathClassSchema = z36.enum([
|
|
5946
6043
|
"content",
|
|
5947
6044
|
"sitemap",
|
|
5948
6045
|
"robots",
|
|
5949
6046
|
"asset",
|
|
5950
6047
|
"other"
|
|
5951
6048
|
]);
|
|
5952
|
-
var trafficSourceTypeSchema =
|
|
6049
|
+
var trafficSourceTypeSchema = z36.enum([
|
|
5953
6050
|
"cloud-run",
|
|
5954
6051
|
"wordpress",
|
|
5955
6052
|
"cloudflare",
|
|
@@ -5957,7 +6054,7 @@ var trafficSourceTypeSchema = z35.enum([
|
|
|
5957
6054
|
"generic-log"
|
|
5958
6055
|
]);
|
|
5959
6056
|
var TrafficSourceTypes = trafficSourceTypeSchema.enum;
|
|
5960
|
-
var trafficAdapterCapabilitySchema =
|
|
6057
|
+
var trafficAdapterCapabilitySchema = z36.enum([
|
|
5961
6058
|
"raw-request-events",
|
|
5962
6059
|
"aggregate-request-metrics",
|
|
5963
6060
|
"request-url",
|
|
@@ -5968,279 +6065,279 @@ var trafficAdapterCapabilitySchema = z35.enum([
|
|
|
5968
6065
|
"cursor-pull"
|
|
5969
6066
|
]);
|
|
5970
6067
|
var TrafficAdapterCapabilities = trafficAdapterCapabilitySchema.enum;
|
|
5971
|
-
var trafficEvidenceKindSchema =
|
|
6068
|
+
var trafficEvidenceKindSchema = z36.enum(["raw-request", "aggregate-bucket"]);
|
|
5972
6069
|
var TrafficEvidenceKinds = trafficEvidenceKindSchema.enum;
|
|
5973
|
-
var trafficEventConfidenceSchema =
|
|
6070
|
+
var trafficEventConfidenceSchema = z36.enum(["observed", "provider-aggregated", "inferred"]);
|
|
5974
6071
|
var TrafficEventConfidences = trafficEventConfidenceSchema.enum;
|
|
5975
|
-
var trafficProviderResourceSchema =
|
|
5976
|
-
type:
|
|
5977
|
-
labels:
|
|
6072
|
+
var trafficProviderResourceSchema = z36.object({
|
|
6073
|
+
type: z36.string().nullable(),
|
|
6074
|
+
labels: z36.record(z36.string(), z36.string())
|
|
5978
6075
|
});
|
|
5979
|
-
var normalizedTrafficRequestSchema =
|
|
6076
|
+
var normalizedTrafficRequestSchema = z36.object({
|
|
5980
6077
|
sourceType: trafficSourceTypeSchema,
|
|
5981
|
-
evidenceKind:
|
|
5982
|
-
confidence:
|
|
5983
|
-
eventId:
|
|
5984
|
-
observedAt:
|
|
5985
|
-
method:
|
|
5986
|
-
requestUrl:
|
|
5987
|
-
host:
|
|
5988
|
-
path:
|
|
5989
|
-
queryString:
|
|
5990
|
-
status:
|
|
5991
|
-
userAgent:
|
|
5992
|
-
remoteIp:
|
|
5993
|
-
referer:
|
|
5994
|
-
latencyMs:
|
|
5995
|
-
requestSizeBytes:
|
|
5996
|
-
responseSizeBytes:
|
|
6078
|
+
evidenceKind: z36.literal(TrafficEvidenceKinds["raw-request"]),
|
|
6079
|
+
confidence: z36.literal(TrafficEventConfidences.observed),
|
|
6080
|
+
eventId: z36.string().min(1),
|
|
6081
|
+
observedAt: z36.string().min(1),
|
|
6082
|
+
method: z36.string().nullable(),
|
|
6083
|
+
requestUrl: z36.string().nullable(),
|
|
6084
|
+
host: z36.string().nullable(),
|
|
6085
|
+
path: z36.string().min(1),
|
|
6086
|
+
queryString: z36.string().nullable(),
|
|
6087
|
+
status: z36.number().int().nullable(),
|
|
6088
|
+
userAgent: z36.string().nullable(),
|
|
6089
|
+
remoteIp: z36.string().nullable(),
|
|
6090
|
+
referer: z36.string().nullable(),
|
|
6091
|
+
latencyMs: z36.number().nullable(),
|
|
6092
|
+
requestSizeBytes: z36.number().int().nullable(),
|
|
6093
|
+
responseSizeBytes: z36.number().int().nullable(),
|
|
5997
6094
|
providerResource: trafficProviderResourceSchema,
|
|
5998
|
-
providerLabels:
|
|
6095
|
+
providerLabels: z36.record(z36.string(), z36.string())
|
|
5999
6096
|
});
|
|
6000
|
-
var normalizedTrafficPullPageSchema =
|
|
6001
|
-
events:
|
|
6002
|
-
rawEntryCount:
|
|
6003
|
-
skippedEntryCount:
|
|
6004
|
-
nextPageToken:
|
|
6005
|
-
filter:
|
|
6097
|
+
var normalizedTrafficPullPageSchema = z36.object({
|
|
6098
|
+
events: z36.array(normalizedTrafficRequestSchema),
|
|
6099
|
+
rawEntryCount: z36.number().int().nonnegative(),
|
|
6100
|
+
skippedEntryCount: z36.number().int().nonnegative(),
|
|
6101
|
+
nextPageToken: z36.string().optional(),
|
|
6102
|
+
filter: z36.string()
|
|
6006
6103
|
});
|
|
6007
|
-
var trafficSourceStatusSchema =
|
|
6104
|
+
var trafficSourceStatusSchema = z36.enum(["connected", "paused", "error", "archived"]);
|
|
6008
6105
|
var TrafficSourceStatuses = trafficSourceStatusSchema.enum;
|
|
6009
|
-
var trafficSourceAuthModeSchema =
|
|
6106
|
+
var trafficSourceAuthModeSchema = z36.enum(["oauth", "service-account"]);
|
|
6010
6107
|
var TrafficSourceAuthModes = trafficSourceAuthModeSchema.enum;
|
|
6011
|
-
var verificationStatusSchema =
|
|
6108
|
+
var verificationStatusSchema = z36.enum(["verified", "claimed_unverified", "unknown_ai_like"]);
|
|
6012
6109
|
var VerificationStatuses = verificationStatusSchema.enum;
|
|
6013
|
-
var cloudRunSourceConfigSchema =
|
|
6014
|
-
gcpProjectId:
|
|
6015
|
-
serviceName:
|
|
6016
|
-
location:
|
|
6110
|
+
var cloudRunSourceConfigSchema = z36.object({
|
|
6111
|
+
gcpProjectId: z36.string().min(1),
|
|
6112
|
+
serviceName: z36.string().nullable().optional(),
|
|
6113
|
+
location: z36.string().nullable().optional(),
|
|
6017
6114
|
authMode: trafficSourceAuthModeSchema
|
|
6018
6115
|
});
|
|
6019
|
-
var wordpressTrafficSourceConfigSchema =
|
|
6020
|
-
baseUrl:
|
|
6021
|
-
username:
|
|
6116
|
+
var wordpressTrafficSourceConfigSchema = z36.object({
|
|
6117
|
+
baseUrl: z36.string().url(),
|
|
6118
|
+
username: z36.string().min(1)
|
|
6022
6119
|
});
|
|
6023
|
-
var vercelTrafficEnvironmentSchema =
|
|
6120
|
+
var vercelTrafficEnvironmentSchema = z36.enum(["production", "preview"]);
|
|
6024
6121
|
var VercelTrafficEnvironments = vercelTrafficEnvironmentSchema.enum;
|
|
6025
|
-
var vercelTrafficSourceConfigSchema =
|
|
6122
|
+
var vercelTrafficSourceConfigSchema = z36.object({
|
|
6026
6123
|
/** Vercel project id (e.g. `prj_...`). */
|
|
6027
|
-
projectId:
|
|
6124
|
+
projectId: z36.string().min(1),
|
|
6028
6125
|
/** Vercel team or account id: the org that owns the project. */
|
|
6029
|
-
teamId:
|
|
6126
|
+
teamId: z36.string().min(1),
|
|
6030
6127
|
environment: vercelTrafficEnvironmentSchema
|
|
6031
6128
|
});
|
|
6032
|
-
var trafficSourceDtoSchema =
|
|
6033
|
-
id:
|
|
6034
|
-
projectId:
|
|
6129
|
+
var trafficSourceDtoSchema = z36.object({
|
|
6130
|
+
id: z36.string(),
|
|
6131
|
+
projectId: z36.string(),
|
|
6035
6132
|
sourceType: trafficSourceTypeSchema,
|
|
6036
|
-
displayName:
|
|
6133
|
+
displayName: z36.string(),
|
|
6037
6134
|
status: trafficSourceStatusSchema,
|
|
6038
|
-
lastSyncedAt:
|
|
6039
|
-
lastCursor:
|
|
6040
|
-
lastError:
|
|
6041
|
-
archivedAt:
|
|
6042
|
-
config:
|
|
6043
|
-
createdAt:
|
|
6044
|
-
updatedAt:
|
|
6045
|
-
});
|
|
6046
|
-
var trafficConnectCloudRunRequestSchema =
|
|
6047
|
-
gcpProjectId:
|
|
6048
|
-
serviceName:
|
|
6049
|
-
location:
|
|
6050
|
-
displayName:
|
|
6135
|
+
lastSyncedAt: z36.string().nullable(),
|
|
6136
|
+
lastCursor: z36.string().nullable(),
|
|
6137
|
+
lastError: z36.string().nullable(),
|
|
6138
|
+
archivedAt: z36.string().nullable(),
|
|
6139
|
+
config: z36.record(z36.string(), z36.unknown()),
|
|
6140
|
+
createdAt: z36.string(),
|
|
6141
|
+
updatedAt: z36.string()
|
|
6142
|
+
});
|
|
6143
|
+
var trafficConnectCloudRunRequestSchema = z36.object({
|
|
6144
|
+
gcpProjectId: z36.string().min(1),
|
|
6145
|
+
serviceName: z36.string().min(1).optional(),
|
|
6146
|
+
location: z36.string().min(1).optional(),
|
|
6147
|
+
displayName: z36.string().min(1).optional(),
|
|
6051
6148
|
/** Service-account JSON content (string). When omitted, defaults to OAuth via `canonry google connect <project> --type ga4` flow. */
|
|
6052
|
-
keyJson:
|
|
6149
|
+
keyJson: z36.string().optional()
|
|
6053
6150
|
});
|
|
6054
|
-
var trafficConnectWordpressRequestSchema =
|
|
6055
|
-
baseUrl:
|
|
6056
|
-
username:
|
|
6151
|
+
var trafficConnectWordpressRequestSchema = z36.object({
|
|
6152
|
+
baseUrl: z36.string().url(),
|
|
6153
|
+
username: z36.string().min(1),
|
|
6057
6154
|
/** WordPress Application Password (the same auth used by the content client). */
|
|
6058
|
-
applicationPassword:
|
|
6059
|
-
displayName:
|
|
6155
|
+
applicationPassword: z36.string().min(1),
|
|
6156
|
+
displayName: z36.string().min(1).optional()
|
|
6060
6157
|
});
|
|
6061
|
-
var trafficConnectVercelRequestSchema =
|
|
6158
|
+
var trafficConnectVercelRequestSchema = z36.object({
|
|
6062
6159
|
/** Vercel project id (e.g. `prj_...`) — from the Vercel dashboard or `.vercel/project.json`. */
|
|
6063
|
-
projectId:
|
|
6160
|
+
projectId: z36.string().min(1),
|
|
6064
6161
|
/** Vercel team or account id: the org that owns the project ("orgId" in .vercel/project.json). */
|
|
6065
|
-
teamId:
|
|
6162
|
+
teamId: z36.string().min(1),
|
|
6066
6163
|
/** Vercel personal access token. Stored in `~/.canonry/config.yaml`, never the DB. */
|
|
6067
|
-
token:
|
|
6164
|
+
token: z36.string().min(1),
|
|
6068
6165
|
/** Which deployment environment's request logs to pull. Default: `production`. */
|
|
6069
6166
|
environment: vercelTrafficEnvironmentSchema.optional(),
|
|
6070
|
-
displayName:
|
|
6167
|
+
displayName: z36.string().min(1).optional()
|
|
6071
6168
|
});
|
|
6072
|
-
var trafficSyncResponseSchema =
|
|
6073
|
-
sourceId:
|
|
6074
|
-
runId:
|
|
6075
|
-
syncedAt:
|
|
6076
|
-
pulledEvents:
|
|
6169
|
+
var trafficSyncResponseSchema = z36.object({
|
|
6170
|
+
sourceId: z36.string(),
|
|
6171
|
+
runId: z36.string(),
|
|
6172
|
+
syncedAt: z36.string(),
|
|
6173
|
+
pulledEvents: z36.number().int().nonnegative(),
|
|
6077
6174
|
/** Self-traffic events (Canonry's own tooling) dropped before rollup. */
|
|
6078
|
-
selfTrafficExcluded:
|
|
6079
|
-
crawlerHits:
|
|
6080
|
-
aiUserFetchHits:
|
|
6081
|
-
aiReferralHits:
|
|
6082
|
-
unknownHits:
|
|
6083
|
-
crawlerBucketRows:
|
|
6084
|
-
aiUserFetchBucketRows:
|
|
6085
|
-
aiReferralBucketRows:
|
|
6086
|
-
sampleRows:
|
|
6087
|
-
windowStart:
|
|
6088
|
-
windowEnd:
|
|
6089
|
-
});
|
|
6090
|
-
var trafficBackfillRequestSchema =
|
|
6175
|
+
selfTrafficExcluded: z36.number().int().nonnegative(),
|
|
6176
|
+
crawlerHits: z36.number().int().nonnegative(),
|
|
6177
|
+
aiUserFetchHits: z36.number().int().nonnegative(),
|
|
6178
|
+
aiReferralHits: z36.number().int().nonnegative(),
|
|
6179
|
+
unknownHits: z36.number().int().nonnegative(),
|
|
6180
|
+
crawlerBucketRows: z36.number().int().nonnegative(),
|
|
6181
|
+
aiUserFetchBucketRows: z36.number().int().nonnegative(),
|
|
6182
|
+
aiReferralBucketRows: z36.number().int().nonnegative(),
|
|
6183
|
+
sampleRows: z36.number().int().nonnegative(),
|
|
6184
|
+
windowStart: z36.string(),
|
|
6185
|
+
windowEnd: z36.string()
|
|
6186
|
+
});
|
|
6187
|
+
var trafficBackfillRequestSchema = z36.object({
|
|
6091
6188
|
/** Lookback window in days. Capped server-side at the upstream log retention ceiling (Cloud Logging _Default = 30d). Default: 30. */
|
|
6092
|
-
days:
|
|
6189
|
+
days: z36.number().int().positive().optional()
|
|
6093
6190
|
});
|
|
6094
|
-
var trafficResetRequestSchema =
|
|
6095
|
-
advanceToNow:
|
|
6191
|
+
var trafficResetRequestSchema = z36.object({
|
|
6192
|
+
advanceToNow: z36.literal(true)
|
|
6096
6193
|
});
|
|
6097
|
-
var trafficBackfillResponseSchema =
|
|
6098
|
-
sourceId:
|
|
6099
|
-
runId:
|
|
6194
|
+
var trafficBackfillResponseSchema = z36.object({
|
|
6195
|
+
sourceId: z36.string(),
|
|
6196
|
+
runId: z36.string(),
|
|
6100
6197
|
status: runStatusSchema,
|
|
6101
|
-
windowStart:
|
|
6102
|
-
windowEnd:
|
|
6198
|
+
windowStart: z36.string(),
|
|
6199
|
+
windowEnd: z36.string(),
|
|
6103
6200
|
/** Days actually used after server-side clamping (≤ requested). */
|
|
6104
|
-
daysRequested:
|
|
6105
|
-
daysApplied:
|
|
6201
|
+
daysRequested: z36.number().int().positive(),
|
|
6202
|
+
daysApplied: z36.number().int().positive()
|
|
6106
6203
|
});
|
|
6107
|
-
var trafficSourceTotalsSchema =
|
|
6204
|
+
var trafficSourceTotalsSchema = z36.object({
|
|
6108
6205
|
/**
|
|
6109
6206
|
* Total classified-crawler hits in the window. UNCHANGED contract — still the
|
|
6110
6207
|
* full count across every path class. Use `crawlerContentHits` for the
|
|
6111
6208
|
* "content was actually crawled" signal.
|
|
6112
6209
|
*/
|
|
6113
|
-
crawlerHits:
|
|
6210
|
+
crawlerHits: z36.number().int().nonnegative(),
|
|
6114
6211
|
/** Crawler hits against content/document paths only (= `crawlerSegments.content`). */
|
|
6115
|
-
crawlerContentHits:
|
|
6212
|
+
crawlerContentHits: z36.number().int().nonnegative(),
|
|
6116
6213
|
/** Infrastructure crawler hits — sitemap + robots + asset fetches (`crawlerSegments.{sitemap,robots,asset}`). */
|
|
6117
|
-
crawlerInfraHits:
|
|
6214
|
+
crawlerInfraHits: z36.number().int().nonnegative(),
|
|
6118
6215
|
/** Full per-class crawler-hit breakdown; the five buckets sum to `crawlerHits`. */
|
|
6119
6216
|
crawlerSegments: trafficCrawlerSegmentsSchema,
|
|
6120
|
-
aiUserFetchHits:
|
|
6121
|
-
aiReferralHits:
|
|
6122
|
-
sampleCount:
|
|
6217
|
+
aiUserFetchHits: z36.number().int().nonnegative(),
|
|
6218
|
+
aiReferralHits: z36.number().int().nonnegative(),
|
|
6219
|
+
sampleCount: z36.number().int().nonnegative()
|
|
6123
6220
|
});
|
|
6124
|
-
var trafficSourceListResponseSchema =
|
|
6125
|
-
sources:
|
|
6221
|
+
var trafficSourceListResponseSchema = z36.object({
|
|
6222
|
+
sources: z36.array(trafficSourceDtoSchema)
|
|
6126
6223
|
});
|
|
6127
6224
|
var trafficSourceDetailDtoSchema = trafficSourceDtoSchema.extend({
|
|
6128
6225
|
totals24h: trafficSourceTotalsSchema,
|
|
6129
|
-
latestRun:
|
|
6130
|
-
runId:
|
|
6226
|
+
latestRun: z36.object({
|
|
6227
|
+
runId: z36.string(),
|
|
6131
6228
|
status: runStatusSchema,
|
|
6132
|
-
startedAt:
|
|
6133
|
-
finishedAt:
|
|
6134
|
-
error:
|
|
6229
|
+
startedAt: z36.string().nullable(),
|
|
6230
|
+
finishedAt: z36.string().nullable(),
|
|
6231
|
+
error: z36.string().nullable()
|
|
6135
6232
|
}).nullable()
|
|
6136
6233
|
});
|
|
6137
|
-
var trafficStatusResponseSchema =
|
|
6138
|
-
sources:
|
|
6234
|
+
var trafficStatusResponseSchema = z36.object({
|
|
6235
|
+
sources: z36.array(trafficSourceDetailDtoSchema)
|
|
6139
6236
|
});
|
|
6140
|
-
var trafficEventKindSchema =
|
|
6237
|
+
var trafficEventKindSchema = z36.enum(["crawler", "ai-user-fetch", "ai-referral"]);
|
|
6141
6238
|
var TrafficEventKinds = trafficEventKindSchema.enum;
|
|
6142
|
-
var trafficSeriesGranularitySchema =
|
|
6239
|
+
var trafficSeriesGranularitySchema = z36.enum(["hour", "day"]);
|
|
6143
6240
|
var TrafficSeriesGranularities = trafficSeriesGranularitySchema.enum;
|
|
6144
|
-
var trafficSeriesPointSchema =
|
|
6241
|
+
var trafficSeriesPointSchema = z36.object({
|
|
6145
6242
|
/**
|
|
6146
6243
|
* UTC bucket key: an ISO hour for hourly series, or `YYYY-MM-DD` for daily
|
|
6147
6244
|
* series. The response includes zero-value buckets across the full window.
|
|
6148
6245
|
*/
|
|
6149
|
-
bucket:
|
|
6150
|
-
crawlerHits:
|
|
6151
|
-
aiUserFetchHits:
|
|
6152
|
-
aiReferralHits:
|
|
6153
|
-
});
|
|
6154
|
-
var trafficCrawlerEventEntrySchema =
|
|
6155
|
-
kind:
|
|
6156
|
-
sourceId:
|
|
6157
|
-
tsHour:
|
|
6158
|
-
botId:
|
|
6159
|
-
operator:
|
|
6160
|
-
verificationStatus:
|
|
6161
|
-
pathNormalized:
|
|
6246
|
+
bucket: z36.string(),
|
|
6247
|
+
crawlerHits: z36.number().int().nonnegative(),
|
|
6248
|
+
aiUserFetchHits: z36.number().int().nonnegative(),
|
|
6249
|
+
aiReferralHits: z36.number().int().nonnegative()
|
|
6250
|
+
});
|
|
6251
|
+
var trafficCrawlerEventEntrySchema = z36.object({
|
|
6252
|
+
kind: z36.literal(TrafficEventKinds.crawler),
|
|
6253
|
+
sourceId: z36.string(),
|
|
6254
|
+
tsHour: z36.string(),
|
|
6255
|
+
botId: z36.string(),
|
|
6256
|
+
operator: z36.string(),
|
|
6257
|
+
verificationStatus: z36.string(),
|
|
6258
|
+
pathNormalized: z36.string(),
|
|
6162
6259
|
/** Coarse class of the fetched path — lets the UI split content crawls from sitemap/robots/asset polling. */
|
|
6163
6260
|
pathClass: trafficPathClassSchema,
|
|
6164
|
-
status:
|
|
6165
|
-
hits:
|
|
6166
|
-
});
|
|
6167
|
-
var trafficAiUserFetchEventEntrySchema =
|
|
6168
|
-
kind:
|
|
6169
|
-
sourceId:
|
|
6170
|
-
tsHour:
|
|
6171
|
-
botId:
|
|
6172
|
-
operator:
|
|
6173
|
-
verificationStatus:
|
|
6174
|
-
pathNormalized:
|
|
6175
|
-
status:
|
|
6176
|
-
hits:
|
|
6177
|
-
});
|
|
6178
|
-
var trafficAiReferralEventEntrySchema =
|
|
6179
|
-
kind:
|
|
6180
|
-
sourceId:
|
|
6181
|
-
tsHour:
|
|
6182
|
-
product:
|
|
6183
|
-
operator:
|
|
6184
|
-
sourceDomain:
|
|
6185
|
-
evidenceType:
|
|
6186
|
-
landingPathNormalized:
|
|
6187
|
-
status:
|
|
6261
|
+
status: z36.number().int(),
|
|
6262
|
+
hits: z36.number().int().nonnegative()
|
|
6263
|
+
});
|
|
6264
|
+
var trafficAiUserFetchEventEntrySchema = z36.object({
|
|
6265
|
+
kind: z36.literal(TrafficEventKinds["ai-user-fetch"]),
|
|
6266
|
+
sourceId: z36.string(),
|
|
6267
|
+
tsHour: z36.string(),
|
|
6268
|
+
botId: z36.string(),
|
|
6269
|
+
operator: z36.string(),
|
|
6270
|
+
verificationStatus: z36.string(),
|
|
6271
|
+
pathNormalized: z36.string(),
|
|
6272
|
+
status: z36.number().int(),
|
|
6273
|
+
hits: z36.number().int().nonnegative()
|
|
6274
|
+
});
|
|
6275
|
+
var trafficAiReferralEventEntrySchema = z36.object({
|
|
6276
|
+
kind: z36.literal(TrafficEventKinds["ai-referral"]),
|
|
6277
|
+
sourceId: z36.string(),
|
|
6278
|
+
tsHour: z36.string(),
|
|
6279
|
+
product: z36.string(),
|
|
6280
|
+
operator: z36.string(),
|
|
6281
|
+
sourceDomain: z36.string(),
|
|
6282
|
+
evidenceType: z36.string(),
|
|
6283
|
+
landingPathNormalized: z36.string(),
|
|
6284
|
+
status: z36.number().int(),
|
|
6188
6285
|
/** Total AI-referral sessions in the bucket. `paidHits + organicHits + unknownHits === hits`. */
|
|
6189
|
-
hits:
|
|
6286
|
+
hits: z36.number().int().nonnegative(),
|
|
6190
6287
|
/** Sessions carrying paid-attribution UTM evidence (`utm_medium=cpc`, …). */
|
|
6191
|
-
paidHits:
|
|
6288
|
+
paidHits: z36.number().int().nonnegative(),
|
|
6192
6289
|
/** Sessions with no paid-attribution evidence. Not proof the click was unpaid — an untagged ad click is indistinguishable. */
|
|
6193
|
-
organicHits:
|
|
6290
|
+
organicHits: z36.number().int().nonnegative(),
|
|
6194
6291
|
/**
|
|
6195
6292
|
* Sessions ingested before the classifier shipped. Their UTM tags were never
|
|
6196
6293
|
* persisted, so they can never be resolved to paid or organic. Never fold
|
|
6197
6294
|
* these into `organicHits`.
|
|
6198
6295
|
*/
|
|
6199
|
-
unknownHits:
|
|
6296
|
+
unknownHits: z36.number().int().nonnegative()
|
|
6200
6297
|
});
|
|
6201
|
-
var trafficEventEntrySchema =
|
|
6298
|
+
var trafficEventEntrySchema = z36.discriminatedUnion("kind", [
|
|
6202
6299
|
trafficCrawlerEventEntrySchema,
|
|
6203
6300
|
trafficAiUserFetchEventEntrySchema,
|
|
6204
6301
|
trafficAiReferralEventEntrySchema
|
|
6205
6302
|
]);
|
|
6206
|
-
var trafficEventsResponseSchema =
|
|
6207
|
-
windowStart:
|
|
6208
|
-
windowEnd:
|
|
6303
|
+
var trafficEventsResponseSchema = z36.object({
|
|
6304
|
+
windowStart: z36.string(),
|
|
6305
|
+
windowEnd: z36.string(),
|
|
6209
6306
|
/**
|
|
6210
6307
|
* Full-window chart data, aggregated independently from the capped detail
|
|
6211
6308
|
* rows below. This prevents dense windows from silently losing old buckets.
|
|
6212
6309
|
*/
|
|
6213
|
-
series:
|
|
6310
|
+
series: z36.object({
|
|
6214
6311
|
granularity: trafficSeriesGranularitySchema,
|
|
6215
|
-
points:
|
|
6312
|
+
points: z36.array(trafficSeriesPointSchema)
|
|
6216
6313
|
}),
|
|
6217
|
-
totals:
|
|
6314
|
+
totals: z36.object({
|
|
6218
6315
|
/** Total classified-crawler hits across the window. UNCHANGED contract. */
|
|
6219
|
-
crawlerHits:
|
|
6316
|
+
crawlerHits: z36.number().int().nonnegative(),
|
|
6220
6317
|
/** Crawler hits against content/document paths only (= `crawlerSegments.content`). */
|
|
6221
|
-
crawlerContentHits:
|
|
6318
|
+
crawlerContentHits: z36.number().int().nonnegative(),
|
|
6222
6319
|
/** Infrastructure crawler hits — sitemap + robots + asset fetches. */
|
|
6223
|
-
crawlerInfraHits:
|
|
6320
|
+
crawlerInfraHits: z36.number().int().nonnegative(),
|
|
6224
6321
|
/** Full per-class crawler-hit breakdown; the five buckets sum to `crawlerHits`. */
|
|
6225
6322
|
crawlerSegments: trafficCrawlerSegmentsSchema,
|
|
6226
|
-
aiUserFetchHits:
|
|
6323
|
+
aiUserFetchHits: z36.number().int().nonnegative(),
|
|
6227
6324
|
/** Total AI-referral sessions. The three class buckets below sum to it. */
|
|
6228
|
-
aiReferralHits:
|
|
6325
|
+
aiReferralHits: z36.number().int().nonnegative(),
|
|
6229
6326
|
/** AI-referral sessions carrying paid-attribution UTM evidence. */
|
|
6230
|
-
aiReferralPaidHits:
|
|
6327
|
+
aiReferralPaidHits: z36.number().int().nonnegative(),
|
|
6231
6328
|
/** AI-referral sessions with no paid-attribution evidence. */
|
|
6232
|
-
aiReferralOrganicHits:
|
|
6329
|
+
aiReferralOrganicHits: z36.number().int().nonnegative(),
|
|
6233
6330
|
/** AI-referral sessions ingested before the classifier shipped; unresolvable, never organic. */
|
|
6234
|
-
aiReferralUnknownHits:
|
|
6331
|
+
aiReferralUnknownHits: z36.number().int().nonnegative()
|
|
6235
6332
|
}),
|
|
6236
|
-
eventRows:
|
|
6333
|
+
eventRows: z36.object({
|
|
6237
6334
|
/** Total detail rows matching the window/source/kind filters before `limit`. */
|
|
6238
|
-
total:
|
|
6335
|
+
total: z36.number().int().nonnegative(),
|
|
6239
6336
|
/** Number of newest detail rows included in `events`. */
|
|
6240
|
-
returned:
|
|
6241
|
-
truncated:
|
|
6337
|
+
returned: z36.number().int().nonnegative(),
|
|
6338
|
+
truncated: z36.boolean()
|
|
6242
6339
|
}),
|
|
6243
|
-
events:
|
|
6340
|
+
events: z36.array(trafficEventEntrySchema)
|
|
6244
6341
|
});
|
|
6245
6342
|
|
|
6246
6343
|
// ../contracts/src/traffic-path.ts
|
|
@@ -6379,71 +6476,71 @@ function sumInfraHits(segments) {
|
|
|
6379
6476
|
}
|
|
6380
6477
|
|
|
6381
6478
|
// ../contracts/src/research.ts
|
|
6382
|
-
import { z as
|
|
6383
|
-
var researchRunStatusSchema =
|
|
6479
|
+
import { z as z37 } from "zod";
|
|
6480
|
+
var researchRunStatusSchema = z37.enum(["queued", "running", "completed", "partial", "failed"]);
|
|
6384
6481
|
var ResearchRunStatuses = researchRunStatusSchema.enum;
|
|
6385
|
-
var researchQueryStatusSchema =
|
|
6482
|
+
var researchQueryStatusSchema = z37.enum(["queued", "running", "completed", "failed"]);
|
|
6386
6483
|
var ResearchQueryStatuses = researchQueryStatusSchema.enum;
|
|
6387
|
-
var researchRunCreateSchema =
|
|
6388
|
-
queries:
|
|
6389
|
-
provider:
|
|
6390
|
-
model:
|
|
6484
|
+
var researchRunCreateSchema = z37.object({
|
|
6485
|
+
queries: z37.array(z37.string().trim().min(1).max(4e3)).min(1).max(50),
|
|
6486
|
+
provider: z37.string().trim().min(1).optional(),
|
|
6487
|
+
model: z37.string().trim().min(1).max(200).optional(),
|
|
6391
6488
|
location: locationContextSchema.nullable().optional(),
|
|
6392
|
-
idempotencyKey:
|
|
6489
|
+
idempotencyKey: z37.string().trim().min(1).max(128).optional()
|
|
6393
6490
|
}).superRefine((value, ctx) => {
|
|
6394
|
-
if (value.model && !value.provider) ctx.addIssue({ code:
|
|
6491
|
+
if (value.model && !value.provider) ctx.addIssue({ code: z37.ZodIssueCode.custom, path: ["provider"], message: "provider is required when model is supplied" });
|
|
6395
6492
|
});
|
|
6396
|
-
var researchRunSummarySchema =
|
|
6397
|
-
id:
|
|
6398
|
-
projectId:
|
|
6493
|
+
var researchRunSummarySchema = z37.object({
|
|
6494
|
+
id: z37.string(),
|
|
6495
|
+
projectId: z37.string(),
|
|
6399
6496
|
status: researchRunStatusSchema,
|
|
6400
|
-
provider:
|
|
6401
|
-
requestedModel:
|
|
6402
|
-
resolvedModel:
|
|
6497
|
+
provider: z37.string(),
|
|
6498
|
+
requestedModel: z37.string().nullable(),
|
|
6499
|
+
resolvedModel: z37.string(),
|
|
6403
6500
|
location: locationContextSchema.nullable(),
|
|
6404
|
-
totalQueries:
|
|
6405
|
-
completedQueries:
|
|
6406
|
-
failedQueries:
|
|
6407
|
-
error:
|
|
6408
|
-
startedAt:
|
|
6409
|
-
finishedAt:
|
|
6410
|
-
createdAt:
|
|
6411
|
-
});
|
|
6412
|
-
var researchRunQuerySchema =
|
|
6413
|
-
id:
|
|
6414
|
-
position:
|
|
6415
|
-
query:
|
|
6501
|
+
totalQueries: z37.number().int(),
|
|
6502
|
+
completedQueries: z37.number().int(),
|
|
6503
|
+
failedQueries: z37.number().int(),
|
|
6504
|
+
error: z37.string().nullable(),
|
|
6505
|
+
startedAt: z37.string().nullable(),
|
|
6506
|
+
finishedAt: z37.string().nullable(),
|
|
6507
|
+
createdAt: z37.string()
|
|
6508
|
+
});
|
|
6509
|
+
var researchRunQuerySchema = z37.object({
|
|
6510
|
+
id: z37.string(),
|
|
6511
|
+
position: z37.number().int(),
|
|
6512
|
+
query: z37.string(),
|
|
6416
6513
|
status: researchQueryStatusSchema,
|
|
6417
|
-
requestedModel:
|
|
6418
|
-
resolvedModel:
|
|
6419
|
-
servedModel:
|
|
6420
|
-
answerText:
|
|
6421
|
-
groundingSources:
|
|
6422
|
-
citedDomains:
|
|
6423
|
-
searchQueries:
|
|
6424
|
-
answerMentioned:
|
|
6514
|
+
requestedModel: z37.string().nullable(),
|
|
6515
|
+
resolvedModel: z37.string(),
|
|
6516
|
+
servedModel: z37.string().nullable(),
|
|
6517
|
+
answerText: z37.string().nullable(),
|
|
6518
|
+
groundingSources: z37.array(groundingSourceSchema),
|
|
6519
|
+
citedDomains: z37.array(z37.string()),
|
|
6520
|
+
searchQueries: z37.array(z37.string()),
|
|
6521
|
+
answerMentioned: z37.boolean().nullable(),
|
|
6425
6522
|
citationState: citationStateSchema.nullable(),
|
|
6426
|
-
error:
|
|
6427
|
-
startedAt:
|
|
6428
|
-
finishedAt:
|
|
6429
|
-
createdAt:
|
|
6523
|
+
error: z37.string().nullable(),
|
|
6524
|
+
startedAt: z37.string().nullable(),
|
|
6525
|
+
finishedAt: z37.string().nullable(),
|
|
6526
|
+
createdAt: z37.string()
|
|
6430
6527
|
});
|
|
6431
|
-
var researchRunDetailSchema = researchRunSummarySchema.extend({ queries:
|
|
6432
|
-
var researchRunListSchema =
|
|
6528
|
+
var researchRunDetailSchema = researchRunSummarySchema.extend({ queries: z37.array(researchRunQuerySchema) });
|
|
6529
|
+
var researchRunListSchema = z37.object({ runs: z37.array(researchRunSummarySchema) });
|
|
6433
6530
|
|
|
6434
6531
|
// ../contracts/src/statistics.ts
|
|
6435
6532
|
function round(value, dp = 4) {
|
|
6436
6533
|
const f = 10 ** dp;
|
|
6437
6534
|
return (Math.round(value * f) + 0) / f;
|
|
6438
6535
|
}
|
|
6439
|
-
function wilsonInterval(successes, n,
|
|
6536
|
+
function wilsonInterval(successes, n, z39 = 1.96) {
|
|
6440
6537
|
if (!Number.isFinite(n) || n <= 0) return null;
|
|
6441
6538
|
const s = Math.max(0, Math.min(successes, n));
|
|
6442
6539
|
const p = s / n;
|
|
6443
|
-
const z210 =
|
|
6540
|
+
const z210 = z39 * z39;
|
|
6444
6541
|
const denom = 1 + z210 / n;
|
|
6445
6542
|
const center = (p + z210 / (2 * n)) / denom;
|
|
6446
|
-
const margin =
|
|
6543
|
+
const margin = z39 / denom * Math.sqrt(p * (1 - p) / n + z210 / (4 * n * n));
|
|
6447
6544
|
return {
|
|
6448
6545
|
low: round(Math.max(0, center - margin)),
|
|
6449
6546
|
high: round(Math.min(1, center + margin))
|
|
@@ -6451,211 +6548,211 @@ function wilsonInterval(successes, n, z38 = 1.96) {
|
|
|
6451
6548
|
}
|
|
6452
6549
|
|
|
6453
6550
|
// ../contracts/src/ads.ts
|
|
6454
|
-
import { z as
|
|
6551
|
+
import { z as z38 } from "zod";
|
|
6455
6552
|
var AdsReviewStatuses = {
|
|
6456
6553
|
approved: "approved"
|
|
6457
6554
|
};
|
|
6458
6555
|
var AdsIntegrityDecisions = {
|
|
6459
6556
|
allowed: "allowed"
|
|
6460
6557
|
};
|
|
6461
|
-
var adsConnectRequestSchema =
|
|
6558
|
+
var adsConnectRequestSchema = z38.object({
|
|
6462
6559
|
/** Ads Manager "SDK key" scoped to one ad account. Stored in config.yaml, never the DB. */
|
|
6463
|
-
apiKey:
|
|
6464
|
-
});
|
|
6465
|
-
var adsAccountDtoSchema =
|
|
6466
|
-
id:
|
|
6467
|
-
name:
|
|
6468
|
-
status:
|
|
6469
|
-
currencyCode:
|
|
6470
|
-
timezone:
|
|
6471
|
-
url:
|
|
6472
|
-
reviewStatus:
|
|
6473
|
-
integrityReviewStatus:
|
|
6474
|
-
integrityDecision:
|
|
6475
|
-
});
|
|
6476
|
-
var adsGeoSearchQuerySchema =
|
|
6477
|
-
q:
|
|
6478
|
-
limit:
|
|
6479
|
-
});
|
|
6480
|
-
var adsGeoLocationDtoSchema =
|
|
6481
|
-
id:
|
|
6482
|
-
type:
|
|
6483
|
-
canonicalName:
|
|
6484
|
-
countryCode:
|
|
6485
|
-
name:
|
|
6486
|
-
regionCode:
|
|
6487
|
-
});
|
|
6488
|
-
var adsGeoSearchResponseSchema =
|
|
6489
|
-
count:
|
|
6490
|
-
query:
|
|
6491
|
-
results:
|
|
6492
|
-
});
|
|
6493
|
-
var adsConversionPixelDtoSchema =
|
|
6494
|
-
id:
|
|
6495
|
-
clientType:
|
|
6496
|
-
name:
|
|
6497
|
-
pixelId:
|
|
6498
|
-
});
|
|
6499
|
-
var adsConversionPixelListResponseSchema =
|
|
6500
|
-
pixels:
|
|
6501
|
-
});
|
|
6502
|
-
var adsConversionEventSettingSourceDtoSchema =
|
|
6503
|
-
id:
|
|
6504
|
-
name:
|
|
6505
|
-
});
|
|
6506
|
-
var adsConversionEventSettingDtoSchema =
|
|
6507
|
-
id:
|
|
6508
|
-
name:
|
|
6509
|
-
eventType:
|
|
6510
|
-
customEventName:
|
|
6511
|
-
attributionWindowDays:
|
|
6512
|
-
adAccountId:
|
|
6513
|
-
sourceIds:
|
|
6514
|
-
sources:
|
|
6515
|
-
archived:
|
|
6516
|
-
version:
|
|
6517
|
-
});
|
|
6518
|
-
var adsConversionEventSettingListResponseSchema =
|
|
6519
|
-
eventSettings:
|
|
6520
|
-
});
|
|
6521
|
-
var adsConnectionStatusDtoSchema =
|
|
6522
|
-
connected:
|
|
6523
|
-
adAccountId:
|
|
6524
|
-
displayName:
|
|
6525
|
-
currencyCode:
|
|
6526
|
-
timezone:
|
|
6527
|
-
status:
|
|
6528
|
-
reviewStatus:
|
|
6529
|
-
integrityReviewStatus:
|
|
6530
|
-
integrityDecision:
|
|
6531
|
-
lastSyncedAt:
|
|
6560
|
+
apiKey: z38.string().min(1)
|
|
6561
|
+
});
|
|
6562
|
+
var adsAccountDtoSchema = z38.object({
|
|
6563
|
+
id: z38.string(),
|
|
6564
|
+
name: z38.string(),
|
|
6565
|
+
status: z38.string(),
|
|
6566
|
+
currencyCode: z38.string().nullable(),
|
|
6567
|
+
timezone: z38.string().nullable(),
|
|
6568
|
+
url: z38.string().nullable(),
|
|
6569
|
+
reviewStatus: z38.string().nullable(),
|
|
6570
|
+
integrityReviewStatus: z38.string().nullable(),
|
|
6571
|
+
integrityDecision: z38.string().nullable()
|
|
6572
|
+
});
|
|
6573
|
+
var adsGeoSearchQuerySchema = z38.object({
|
|
6574
|
+
q: z38.string().trim().min(1).max(200),
|
|
6575
|
+
limit: z38.number().int().min(1).max(100).default(20)
|
|
6576
|
+
});
|
|
6577
|
+
var adsGeoLocationDtoSchema = z38.object({
|
|
6578
|
+
id: z38.string(),
|
|
6579
|
+
type: z38.string(),
|
|
6580
|
+
canonicalName: z38.string(),
|
|
6581
|
+
countryCode: z38.string(),
|
|
6582
|
+
name: z38.string(),
|
|
6583
|
+
regionCode: z38.string().nullable()
|
|
6584
|
+
});
|
|
6585
|
+
var adsGeoSearchResponseSchema = z38.object({
|
|
6586
|
+
count: z38.number().int().nonnegative(),
|
|
6587
|
+
query: z38.string(),
|
|
6588
|
+
results: z38.array(adsGeoLocationDtoSchema)
|
|
6589
|
+
});
|
|
6590
|
+
var adsConversionPixelDtoSchema = z38.object({
|
|
6591
|
+
id: z38.string(),
|
|
6592
|
+
clientType: z38.string().optional(),
|
|
6593
|
+
name: z38.string().optional(),
|
|
6594
|
+
pixelId: z38.string().optional()
|
|
6595
|
+
});
|
|
6596
|
+
var adsConversionPixelListResponseSchema = z38.object({
|
|
6597
|
+
pixels: z38.array(adsConversionPixelDtoSchema)
|
|
6598
|
+
});
|
|
6599
|
+
var adsConversionEventSettingSourceDtoSchema = z38.object({
|
|
6600
|
+
id: z38.string(),
|
|
6601
|
+
name: z38.string().optional()
|
|
6602
|
+
});
|
|
6603
|
+
var adsConversionEventSettingDtoSchema = z38.object({
|
|
6604
|
+
id: z38.string(),
|
|
6605
|
+
name: z38.string().optional(),
|
|
6606
|
+
eventType: z38.string().optional(),
|
|
6607
|
+
customEventName: z38.string().nullable().optional(),
|
|
6608
|
+
attributionWindowDays: z38.number().int().positive().optional(),
|
|
6609
|
+
adAccountId: z38.string().optional(),
|
|
6610
|
+
sourceIds: z38.array(z38.string()).optional(),
|
|
6611
|
+
sources: z38.array(adsConversionEventSettingSourceDtoSchema).optional(),
|
|
6612
|
+
archived: z38.boolean().optional(),
|
|
6613
|
+
version: z38.number().int().nonnegative().optional()
|
|
6614
|
+
});
|
|
6615
|
+
var adsConversionEventSettingListResponseSchema = z38.object({
|
|
6616
|
+
eventSettings: z38.array(adsConversionEventSettingDtoSchema)
|
|
6617
|
+
});
|
|
6618
|
+
var adsConnectionStatusDtoSchema = z38.object({
|
|
6619
|
+
connected: z38.boolean(),
|
|
6620
|
+
adAccountId: z38.string().nullable().optional(),
|
|
6621
|
+
displayName: z38.string().nullable().optional(),
|
|
6622
|
+
currencyCode: z38.string().nullable().optional(),
|
|
6623
|
+
timezone: z38.string().nullable().optional(),
|
|
6624
|
+
status: z38.string().nullable().optional(),
|
|
6625
|
+
reviewStatus: z38.string().nullable().optional(),
|
|
6626
|
+
integrityReviewStatus: z38.string().nullable().optional(),
|
|
6627
|
+
integrityDecision: z38.string().nullable().optional(),
|
|
6628
|
+
lastSyncedAt: z38.string().nullable().optional(),
|
|
6532
6629
|
/** Whether the ad account has OpenAI conversion tracking (pixel or CAPI) configured,
|
|
6533
6630
|
* detected from synced campaigns carrying conversion_event_setting_ids. Optional:
|
|
6534
6631
|
* only present when connected. */
|
|
6535
|
-
conversionTrackingConfigured:
|
|
6632
|
+
conversionTrackingConfigured: z38.boolean().optional()
|
|
6536
6633
|
});
|
|
6537
|
-
var adsDisconnectResponseSchema =
|
|
6538
|
-
disconnected:
|
|
6634
|
+
var adsDisconnectResponseSchema = z38.object({
|
|
6635
|
+
disconnected: z38.boolean()
|
|
6539
6636
|
});
|
|
6540
|
-
var adsSyncResponseSchema =
|
|
6541
|
-
runId:
|
|
6542
|
-
status:
|
|
6637
|
+
var adsSyncResponseSchema = z38.object({
|
|
6638
|
+
runId: z38.string(),
|
|
6639
|
+
status: z38.string()
|
|
6543
6640
|
});
|
|
6544
|
-
var adsCreativeDtoSchema =
|
|
6545
|
-
type:
|
|
6546
|
-
title:
|
|
6547
|
-
body:
|
|
6548
|
-
targetUrl:
|
|
6549
|
-
fileId:
|
|
6641
|
+
var adsCreativeDtoSchema = z38.object({
|
|
6642
|
+
type: z38.string().nullable().optional(),
|
|
6643
|
+
title: z38.string().nullable().optional(),
|
|
6644
|
+
body: z38.string().nullable().optional(),
|
|
6645
|
+
targetUrl: z38.string().nullable().optional(),
|
|
6646
|
+
fileId: z38.string().nullable().optional()
|
|
6550
6647
|
});
|
|
6551
|
-
var adsCampaignBiddingTypeSchema =
|
|
6648
|
+
var adsCampaignBiddingTypeSchema = z38.enum(["impressions", "clicks"]);
|
|
6552
6649
|
var AdsCampaignBiddingTypes = adsCampaignBiddingTypeSchema.enum;
|
|
6553
|
-
var adsAdGroupBillingEventTypeSchema =
|
|
6650
|
+
var adsAdGroupBillingEventTypeSchema = z38.enum(["impression", "click"]);
|
|
6554
6651
|
var AdsAdGroupBillingEventTypes = adsAdGroupBillingEventTypeSchema.enum;
|
|
6555
|
-
var adsAdDtoSchema =
|
|
6556
|
-
id:
|
|
6557
|
-
adGroupId:
|
|
6558
|
-
name:
|
|
6559
|
-
status:
|
|
6560
|
-
reviewStatus:
|
|
6652
|
+
var adsAdDtoSchema = z38.object({
|
|
6653
|
+
id: z38.string(),
|
|
6654
|
+
adGroupId: z38.string(),
|
|
6655
|
+
name: z38.string(),
|
|
6656
|
+
status: z38.string(),
|
|
6657
|
+
reviewStatus: z38.string().nullable().optional(),
|
|
6561
6658
|
creative: adsCreativeDtoSchema.nullable().optional(),
|
|
6562
|
-
upstreamUpdatedAt:
|
|
6563
|
-
syncedAt:
|
|
6564
|
-
});
|
|
6565
|
-
var adsAdGroupDtoSchema =
|
|
6566
|
-
id:
|
|
6567
|
-
campaignId:
|
|
6568
|
-
name:
|
|
6569
|
-
description:
|
|
6570
|
-
status:
|
|
6571
|
-
billingEventType:
|
|
6572
|
-
maxBidMicros:
|
|
6659
|
+
upstreamUpdatedAt: z38.number().int().nullable().optional(),
|
|
6660
|
+
syncedAt: z38.string().optional()
|
|
6661
|
+
});
|
|
6662
|
+
var adsAdGroupDtoSchema = z38.object({
|
|
6663
|
+
id: z38.string(),
|
|
6664
|
+
campaignId: z38.string(),
|
|
6665
|
+
name: z38.string(),
|
|
6666
|
+
description: z38.string().nullable().optional(),
|
|
6667
|
+
status: z38.string(),
|
|
6668
|
+
billingEventType: z38.union([adsAdGroupBillingEventTypeSchema, z38.null()]).optional(),
|
|
6669
|
+
maxBidMicros: z38.number().int().nullable().optional(),
|
|
6573
6670
|
/**
|
|
6574
6671
|
* The targeting primitive: entries are multi-line strings of
|
|
6575
6672
|
* newline-separated example queries (the live Ads Manager format).
|
|
6576
6673
|
*/
|
|
6577
|
-
contextHints:
|
|
6578
|
-
ads:
|
|
6579
|
-
upstreamUpdatedAt:
|
|
6580
|
-
syncedAt:
|
|
6581
|
-
});
|
|
6582
|
-
var adsCampaignDtoSchema =
|
|
6583
|
-
id:
|
|
6584
|
-
name:
|
|
6585
|
-
description:
|
|
6586
|
-
status:
|
|
6587
|
-
startTime:
|
|
6588
|
-
endTime:
|
|
6589
|
-
biddingType:
|
|
6590
|
-
dailySpendLimitMicros:
|
|
6591
|
-
lifetimeSpendLimitMicros:
|
|
6592
|
-
conversionEventSettingIds:
|
|
6593
|
-
locationIds:
|
|
6594
|
-
adGroups:
|
|
6595
|
-
upstreamUpdatedAt:
|
|
6596
|
-
syncedAt:
|
|
6597
|
-
});
|
|
6598
|
-
var adsCampaignListResponseSchema =
|
|
6599
|
-
campaigns:
|
|
6600
|
-
});
|
|
6601
|
-
var adsInsightLevelSchema =
|
|
6674
|
+
contextHints: z38.array(z38.string()).default([]),
|
|
6675
|
+
ads: z38.array(adsAdDtoSchema).default([]),
|
|
6676
|
+
upstreamUpdatedAt: z38.number().int().nullable().optional(),
|
|
6677
|
+
syncedAt: z38.string().optional()
|
|
6678
|
+
});
|
|
6679
|
+
var adsCampaignDtoSchema = z38.object({
|
|
6680
|
+
id: z38.string(),
|
|
6681
|
+
name: z38.string(),
|
|
6682
|
+
description: z38.string().nullable().optional(),
|
|
6683
|
+
status: z38.string(),
|
|
6684
|
+
startTime: z38.number().int().nullable().optional(),
|
|
6685
|
+
endTime: z38.number().int().nullable().optional(),
|
|
6686
|
+
biddingType: z38.union([adsCampaignBiddingTypeSchema, z38.null()]).optional(),
|
|
6687
|
+
dailySpendLimitMicros: z38.number().int().nullable().optional(),
|
|
6688
|
+
lifetimeSpendLimitMicros: z38.number().int().nullable().optional(),
|
|
6689
|
+
conversionEventSettingIds: z38.array(z38.string()).default([]),
|
|
6690
|
+
locationIds: z38.array(z38.string()).optional(),
|
|
6691
|
+
adGroups: z38.array(adsAdGroupDtoSchema).default([]),
|
|
6692
|
+
upstreamUpdatedAt: z38.number().int().nullable().optional(),
|
|
6693
|
+
syncedAt: z38.string().optional()
|
|
6694
|
+
});
|
|
6695
|
+
var adsCampaignListResponseSchema = z38.object({
|
|
6696
|
+
campaigns: z38.array(adsCampaignDtoSchema)
|
|
6697
|
+
});
|
|
6698
|
+
var adsInsightLevelSchema = z38.enum(["campaign", "ad_group"]);
|
|
6602
6699
|
var AdsInsightLevels = adsInsightLevelSchema.enum;
|
|
6603
|
-
var adsInsightRowDtoSchema =
|
|
6700
|
+
var adsInsightRowDtoSchema = z38.object({
|
|
6604
6701
|
level: adsInsightLevelSchema,
|
|
6605
|
-
entityId:
|
|
6606
|
-
date:
|
|
6607
|
-
impressions:
|
|
6608
|
-
clicks:
|
|
6609
|
-
spendMicros:
|
|
6702
|
+
entityId: z38.string(),
|
|
6703
|
+
date: z38.string(),
|
|
6704
|
+
impressions: z38.number().int(),
|
|
6705
|
+
clicks: z38.number().int(),
|
|
6706
|
+
spendMicros: z38.number().int(),
|
|
6610
6707
|
/** Conversion count for the row. 0 when conversion tracking is not configured.
|
|
6611
6708
|
* Conversion VALUE (for ROAS) is a deliberate follow-up: the upstream value
|
|
6612
6709
|
* field is not yet captured against a live conversion-tracking account. */
|
|
6613
|
-
conversions:
|
|
6710
|
+
conversions: z38.number().int(),
|
|
6614
6711
|
/** clicks / impressions; null when impressions is 0. */
|
|
6615
|
-
ctr:
|
|
6712
|
+
ctr: z38.number().nullable(),
|
|
6616
6713
|
/** spendMicros / clicks, rounded to integer micros; null when clicks is 0. */
|
|
6617
|
-
cpcMicros:
|
|
6714
|
+
cpcMicros: z38.number().int().nullable()
|
|
6618
6715
|
});
|
|
6619
|
-
var adsInsightsResponseSchema =
|
|
6620
|
-
rows:
|
|
6716
|
+
var adsInsightsResponseSchema = z38.object({
|
|
6717
|
+
rows: z38.array(adsInsightRowDtoSchema),
|
|
6621
6718
|
/** Account currency for rendering spend/cpc; null before the first sync. */
|
|
6622
|
-
currencyCode:
|
|
6623
|
-
});
|
|
6624
|
-
var adsTotalsDtoSchema =
|
|
6625
|
-
impressions:
|
|
6626
|
-
clicks:
|
|
6627
|
-
spendMicros:
|
|
6628
|
-
conversions:
|
|
6629
|
-
ctr:
|
|
6630
|
-
cpcMicros:
|
|
6631
|
-
});
|
|
6632
|
-
var adsSummaryDtoSchema =
|
|
6633
|
-
connected:
|
|
6634
|
-
displayName:
|
|
6635
|
-
currencyCode:
|
|
6636
|
-
lastSyncedAt:
|
|
6637
|
-
campaignCount:
|
|
6638
|
-
adGroupCount:
|
|
6639
|
-
adCount:
|
|
6719
|
+
currencyCode: z38.string().nullable().optional()
|
|
6720
|
+
});
|
|
6721
|
+
var adsTotalsDtoSchema = z38.object({
|
|
6722
|
+
impressions: z38.number().int(),
|
|
6723
|
+
clicks: z38.number().int(),
|
|
6724
|
+
spendMicros: z38.number().int(),
|
|
6725
|
+
conversions: z38.number().int(),
|
|
6726
|
+
ctr: z38.number().nullable(),
|
|
6727
|
+
cpcMicros: z38.number().int().nullable()
|
|
6728
|
+
});
|
|
6729
|
+
var adsSummaryDtoSchema = z38.object({
|
|
6730
|
+
connected: z38.boolean(),
|
|
6731
|
+
displayName: z38.string().nullable().optional(),
|
|
6732
|
+
currencyCode: z38.string().nullable().optional(),
|
|
6733
|
+
lastSyncedAt: z38.string().nullable().optional(),
|
|
6734
|
+
campaignCount: z38.number().int(),
|
|
6735
|
+
adGroupCount: z38.number().int(),
|
|
6736
|
+
adCount: z38.number().int(),
|
|
6640
6737
|
/** Date range the totals cover (oldest/newest rollup date), null when empty. */
|
|
6641
|
-
window:
|
|
6642
|
-
from:
|
|
6643
|
-
to:
|
|
6738
|
+
window: z38.object({
|
|
6739
|
+
from: z38.string().nullable(),
|
|
6740
|
+
to: z38.string().nullable()
|
|
6644
6741
|
}),
|
|
6645
6742
|
/** Campaign-level rollup totals over the window (levels are not summed across). */
|
|
6646
6743
|
totals: adsTotalsDtoSchema
|
|
6647
6744
|
});
|
|
6648
|
-
var adsOperationKeySchema =
|
|
6649
|
-
var adsEntityIdSchema =
|
|
6650
|
-
var adsNameSchema =
|
|
6651
|
-
var adsTimestampSchema =
|
|
6652
|
-
var adsMicrosSchema =
|
|
6653
|
-
var adsSha256Schema =
|
|
6654
|
-
var adsConversionEventSettingIdsSchema =
|
|
6655
|
-
var adsHttpsUrlSchema =
|
|
6745
|
+
var adsOperationKeySchema = z38.string().min(8).max(128).regex(/^[\w.:-]+$/, "operationKey may contain letters, numbers, dot, underscore, colon, and hyphen");
|
|
6746
|
+
var adsEntityIdSchema = z38.string().min(1).max(200);
|
|
6747
|
+
var adsNameSchema = z38.string().min(3).max(1e3).refine((value) => value.trim().length > 0);
|
|
6748
|
+
var adsTimestampSchema = z38.number().int().min(946684800).max(4102444800);
|
|
6749
|
+
var adsMicrosSchema = z38.number().int().positive().max(Number.MAX_SAFE_INTEGER);
|
|
6750
|
+
var adsSha256Schema = z38.string().regex(/^[a-f0-9]{64}$/);
|
|
6751
|
+
var adsConversionEventSettingIdsSchema = z38.array(adsEntityIdSchema).max(100).refine((ids) => new Set(ids).size === ids.length, "conversionEventSettingIds must be unique");
|
|
6752
|
+
var adsHttpsUrlSchema = z38.string().url().refine((value) => new URL(value).protocol === "https:", {
|
|
6656
6753
|
message: "URL must use https"
|
|
6657
6754
|
});
|
|
6658
|
-
var adsOperationKindSchema =
|
|
6755
|
+
var adsOperationKindSchema = z38.enum([
|
|
6659
6756
|
"image_upload",
|
|
6660
6757
|
"campaign_create",
|
|
6661
6758
|
"campaign_update",
|
|
@@ -6669,33 +6766,33 @@ var adsOperationKindSchema = z37.enum([
|
|
|
6669
6766
|
"ad_pause"
|
|
6670
6767
|
]);
|
|
6671
6768
|
var AdsOperationKinds = adsOperationKindSchema.enum;
|
|
6672
|
-
var adsOperationStateSchema =
|
|
6769
|
+
var adsOperationStateSchema = z38.enum(["pending", "reconciling", "succeeded", "failed", "unknown"]);
|
|
6673
6770
|
var AdsOperationStates = adsOperationStateSchema.enum;
|
|
6674
|
-
var adsReconcileStrategySchema =
|
|
6771
|
+
var adsReconcileStrategySchema = z38.enum(["known_entity", "create_fingerprint", "manual_only"]);
|
|
6675
6772
|
var AdsReconcileStrategies = adsReconcileStrategySchema.enum;
|
|
6676
|
-
var adsUnresolvedOperationStateSchema =
|
|
6773
|
+
var adsUnresolvedOperationStateSchema = z38.enum([
|
|
6677
6774
|
AdsOperationStates.pending,
|
|
6678
6775
|
AdsOperationStates.unknown,
|
|
6679
6776
|
AdsOperationStates.reconciling
|
|
6680
6777
|
]);
|
|
6681
6778
|
var AdsUnresolvedOperationStates = adsUnresolvedOperationStateSchema.enum;
|
|
6682
|
-
var adsEntityStatusSchema =
|
|
6779
|
+
var adsEntityStatusSchema = z38.enum(["active", "paused", "archived"]);
|
|
6683
6780
|
var AdsEntityStatuses = adsEntityStatusSchema.enum;
|
|
6684
|
-
var adsEntityTypeSchema =
|
|
6781
|
+
var adsEntityTypeSchema = z38.enum(["file", "campaign", "ad_group", "ad"]);
|
|
6685
6782
|
var AdsEntityTypes = adsEntityTypeSchema.enum;
|
|
6686
|
-
var adsActivationEntityTypeSchema =
|
|
6783
|
+
var adsActivationEntityTypeSchema = z38.enum(["campaign", "ad_group", "ad"]);
|
|
6687
6784
|
var AdsActivationEntityTypes = adsActivationEntityTypeSchema.enum;
|
|
6688
|
-
var adsActivationEntityRefSchema =
|
|
6785
|
+
var adsActivationEntityRefSchema = z38.object({
|
|
6689
6786
|
id: adsEntityIdSchema,
|
|
6690
|
-
expectedUpdatedAt:
|
|
6787
|
+
expectedUpdatedAt: z38.number().int().nonnegative()
|
|
6691
6788
|
}).strict();
|
|
6692
6789
|
var adsActivationAdSchema = adsActivationEntityRefSchema;
|
|
6693
6790
|
var ADS_ACTIVATION_MAX_ENTITIES = 100;
|
|
6694
6791
|
var adsActivationAdGroupSchema = adsActivationEntityRefSchema.extend({
|
|
6695
|
-
ads:
|
|
6792
|
+
ads: z38.array(adsActivationAdSchema).min(1).max(ADS_ACTIVATION_MAX_ENTITIES - 1)
|
|
6696
6793
|
}).strict();
|
|
6697
6794
|
var adsActivationCampaignSchema = adsActivationEntityRefSchema.extend({
|
|
6698
|
-
adGroups:
|
|
6795
|
+
adGroups: z38.array(adsActivationAdGroupSchema).min(1).max(ADS_ACTIVATION_MAX_ENTITIES - 1)
|
|
6699
6796
|
}).strict();
|
|
6700
6797
|
function compareAdsActivationEntityIds(left, right) {
|
|
6701
6798
|
if (left < right) return -1;
|
|
@@ -6714,7 +6811,7 @@ function addCanonicalEntityOrderIssue(items, path, ctx) {
|
|
|
6714
6811
|
}
|
|
6715
6812
|
}
|
|
6716
6813
|
}
|
|
6717
|
-
var adsActivationManifestSchema =
|
|
6814
|
+
var adsActivationManifestSchema = z38.object({
|
|
6718
6815
|
campaign: adsActivationCampaignSchema
|
|
6719
6816
|
}).strict().superRefine((manifest, ctx) => {
|
|
6720
6817
|
const entityCount = 1 + manifest.campaign.adGroups.reduce(
|
|
@@ -6760,7 +6857,7 @@ function canonicalizeAdsActivationManifest(manifest) {
|
|
|
6760
6857
|
};
|
|
6761
6858
|
}
|
|
6762
6859
|
var adsActivationManifestHashSchema = adsSha256Schema;
|
|
6763
|
-
var adsActivationGrantStateSchema =
|
|
6860
|
+
var adsActivationGrantStateSchema = z38.enum([
|
|
6764
6861
|
"approved",
|
|
6765
6862
|
"executing",
|
|
6766
6863
|
"consumed",
|
|
@@ -6769,7 +6866,7 @@ var adsActivationGrantStateSchema = z37.enum([
|
|
|
6769
6866
|
"unknown"
|
|
6770
6867
|
]);
|
|
6771
6868
|
var AdsActivationGrantStates = adsActivationGrantStateSchema.enum;
|
|
6772
|
-
var adsOperationStepStateSchema =
|
|
6869
|
+
var adsOperationStepStateSchema = z38.enum([
|
|
6773
6870
|
"pending",
|
|
6774
6871
|
"executing",
|
|
6775
6872
|
"active",
|
|
@@ -6780,35 +6877,35 @@ var adsOperationStepStateSchema = z37.enum([
|
|
|
6780
6877
|
"unknown"
|
|
6781
6878
|
]);
|
|
6782
6879
|
var AdsOperationStepStates = adsOperationStepStateSchema.enum;
|
|
6783
|
-
var adsReconcileFieldsSchema =
|
|
6880
|
+
var adsReconcileFieldsSchema = z38.object({
|
|
6784
6881
|
name: adsNameSchema.optional(),
|
|
6785
|
-
description:
|
|
6882
|
+
description: z38.string().max(4e3).nullable().optional(),
|
|
6786
6883
|
status: adsEntityStatusSchema.optional(),
|
|
6787
6884
|
startTime: adsTimestampSchema.nullable().optional(),
|
|
6788
6885
|
endTime: adsTimestampSchema.nullable().optional(),
|
|
6789
6886
|
lifetimeSpendLimitMicros: adsMicrosSchema.min(1e6).optional(),
|
|
6790
|
-
locationIds:
|
|
6887
|
+
locationIds: z38.array(adsEntityIdSchema).max(100).optional(),
|
|
6791
6888
|
biddingType: adsCampaignBiddingTypeSchema.optional(),
|
|
6792
6889
|
conversionEventSettingIds: adsConversionEventSettingIdsSchema.optional(),
|
|
6793
6890
|
campaignId: adsEntityIdSchema.optional(),
|
|
6794
|
-
contextHints:
|
|
6891
|
+
contextHints: z38.array(z38.string().min(1).max(1e3)).max(100).optional(),
|
|
6795
6892
|
maxBidMicros: adsMicrosSchema.max(1e8).optional(),
|
|
6796
6893
|
billingEventType: adsAdGroupBillingEventTypeSchema.optional(),
|
|
6797
6894
|
adGroupId: adsEntityIdSchema.optional(),
|
|
6798
6895
|
creativeFingerprint: adsSha256Schema.optional()
|
|
6799
6896
|
}).strict();
|
|
6800
|
-
var adsImageUploadRequestSchema =
|
|
6897
|
+
var adsImageUploadRequestSchema = z38.object({
|
|
6801
6898
|
operationKey: adsOperationKeySchema,
|
|
6802
6899
|
imageUrl: adsHttpsUrlSchema
|
|
6803
6900
|
});
|
|
6804
|
-
var adsCampaignCreateRequestSchema =
|
|
6901
|
+
var adsCampaignCreateRequestSchema = z38.object({
|
|
6805
6902
|
operationKey: adsOperationKeySchema,
|
|
6806
6903
|
name: adsNameSchema,
|
|
6807
|
-
description:
|
|
6904
|
+
description: z38.string().max(4e3).optional(),
|
|
6808
6905
|
startTime: adsTimestampSchema.optional(),
|
|
6809
6906
|
endTime: adsTimestampSchema.optional(),
|
|
6810
6907
|
lifetimeSpendLimitMicros: adsMicrosSchema.min(1e6),
|
|
6811
|
-
locationIds:
|
|
6908
|
+
locationIds: z38.array(adsEntityIdSchema).min(1).max(100),
|
|
6812
6909
|
biddingType: adsCampaignBiddingTypeSchema.optional(),
|
|
6813
6910
|
conversionEventSettingIds: adsConversionEventSettingIdsSchema.optional()
|
|
6814
6911
|
}).superRefine((value, ctx) => {
|
|
@@ -6823,22 +6920,22 @@ var adsCampaignCreateRequestSchema = z37.object({
|
|
|
6823
6920
|
});
|
|
6824
6921
|
}
|
|
6825
6922
|
});
|
|
6826
|
-
var adsAdGroupCreateRequestSchema =
|
|
6923
|
+
var adsAdGroupCreateRequestSchema = z38.object({
|
|
6827
6924
|
operationKey: adsOperationKeySchema,
|
|
6828
6925
|
campaignId: adsEntityIdSchema,
|
|
6829
6926
|
name: adsNameSchema,
|
|
6830
|
-
description:
|
|
6831
|
-
contextHints:
|
|
6927
|
+
description: z38.string().max(4e3).optional(),
|
|
6928
|
+
contextHints: z38.array(z38.string().min(1).max(1e3)).min(1).max(100),
|
|
6832
6929
|
maxBidMicros: adsMicrosSchema.max(1e8),
|
|
6833
6930
|
billingEventType: adsAdGroupBillingEventTypeSchema.optional()
|
|
6834
6931
|
});
|
|
6835
|
-
var adsChatCardCreativeRequestSchema =
|
|
6836
|
-
title:
|
|
6837
|
-
body:
|
|
6932
|
+
var adsChatCardCreativeRequestSchema = z38.object({
|
|
6933
|
+
title: z38.string().min(3).max(50),
|
|
6934
|
+
body: z38.string().min(1).max(100),
|
|
6838
6935
|
targetUrl: adsHttpsUrlSchema,
|
|
6839
6936
|
fileId: adsEntityIdSchema
|
|
6840
6937
|
});
|
|
6841
|
-
var adsAdCreateRequestSchema =
|
|
6938
|
+
var adsAdCreateRequestSchema = z38.object({
|
|
6842
6939
|
operationKey: adsOperationKeySchema,
|
|
6843
6940
|
adGroupId: adsEntityIdSchema,
|
|
6844
6941
|
name: adsNameSchema,
|
|
@@ -6847,58 +6944,58 @@ var adsAdCreateRequestSchema = z37.object({
|
|
|
6847
6944
|
function hasMutationField(value) {
|
|
6848
6945
|
return Object.keys(value).some((key) => key !== "operationKey" && key !== "expectedUpdatedAt");
|
|
6849
6946
|
}
|
|
6850
|
-
var adsCampaignUpdateRequestSchema =
|
|
6947
|
+
var adsCampaignUpdateRequestSchema = z38.object({
|
|
6851
6948
|
operationKey: adsOperationKeySchema,
|
|
6852
|
-
expectedUpdatedAt:
|
|
6949
|
+
expectedUpdatedAt: z38.number().int().nonnegative(),
|
|
6853
6950
|
name: adsNameSchema.optional(),
|
|
6854
|
-
description:
|
|
6951
|
+
description: z38.string().max(4e3).nullable().optional(),
|
|
6855
6952
|
startTime: adsTimestampSchema.nullable().optional(),
|
|
6856
6953
|
endTime: adsTimestampSchema.nullable().optional(),
|
|
6857
6954
|
lifetimeSpendLimitMicros: adsMicrosSchema.min(1e6).optional(),
|
|
6858
|
-
locationIds:
|
|
6955
|
+
locationIds: z38.array(adsEntityIdSchema).min(1).max(100).optional()
|
|
6859
6956
|
}).refine(hasMutationField, { message: "At least one campaign field must be updated" });
|
|
6860
|
-
var adsAdGroupUpdateRequestSchema =
|
|
6957
|
+
var adsAdGroupUpdateRequestSchema = z38.object({
|
|
6861
6958
|
operationKey: adsOperationKeySchema,
|
|
6862
|
-
expectedUpdatedAt:
|
|
6959
|
+
expectedUpdatedAt: z38.number().int().nonnegative(),
|
|
6863
6960
|
name: adsNameSchema.optional(),
|
|
6864
|
-
description:
|
|
6865
|
-
contextHints:
|
|
6961
|
+
description: z38.string().max(4e3).nullable().optional(),
|
|
6962
|
+
contextHints: z38.array(z38.string().min(1).max(1e3)).min(1).max(100).optional(),
|
|
6866
6963
|
maxBidMicros: adsMicrosSchema.max(1e8).optional()
|
|
6867
6964
|
}).refine(hasMutationField, { message: "At least one ad group field must be updated" });
|
|
6868
|
-
var adsAdUpdateRequestSchema =
|
|
6965
|
+
var adsAdUpdateRequestSchema = z38.object({
|
|
6869
6966
|
operationKey: adsOperationKeySchema,
|
|
6870
|
-
expectedUpdatedAt:
|
|
6967
|
+
expectedUpdatedAt: z38.number().int().nonnegative(),
|
|
6871
6968
|
name: adsNameSchema.optional(),
|
|
6872
6969
|
creative: adsChatCardCreativeRequestSchema.optional()
|
|
6873
6970
|
}).refine(hasMutationField, { message: "At least one ad field must be updated" });
|
|
6874
|
-
var adsPauseRequestSchema =
|
|
6971
|
+
var adsPauseRequestSchema = z38.object({
|
|
6875
6972
|
operationKey: adsOperationKeySchema
|
|
6876
6973
|
});
|
|
6877
|
-
var adsOperationDtoSchema =
|
|
6878
|
-
id:
|
|
6879
|
-
adAccountId:
|
|
6880
|
-
operationKey:
|
|
6974
|
+
var adsOperationDtoSchema = z38.object({
|
|
6975
|
+
id: z38.string(),
|
|
6976
|
+
adAccountId: z38.string().nullable(),
|
|
6977
|
+
operationKey: z38.string(),
|
|
6881
6978
|
kind: adsOperationKindSchema,
|
|
6882
6979
|
state: adsOperationStateSchema,
|
|
6883
|
-
entityType:
|
|
6884
|
-
entityId:
|
|
6885
|
-
upstreamUpdatedAt:
|
|
6886
|
-
errorCode:
|
|
6887
|
-
errorMessage:
|
|
6888
|
-
reconcileStrategy:
|
|
6980
|
+
entityType: z38.union([adsEntityTypeSchema, z38.null()]),
|
|
6981
|
+
entityId: z38.string().nullable(),
|
|
6982
|
+
upstreamUpdatedAt: z38.number().int().nullable(),
|
|
6983
|
+
errorCode: z38.string().nullable(),
|
|
6984
|
+
errorMessage: z38.string().nullable(),
|
|
6985
|
+
reconcileStrategy: z38.union([adsReconcileStrategySchema, z38.null()]),
|
|
6889
6986
|
reconcileParentId: adsEntityIdSchema.nullable(),
|
|
6890
6987
|
reconcileFingerprint: adsSha256Schema.nullable(),
|
|
6891
6988
|
reconcileFields: adsReconcileFieldsSchema.nullable(),
|
|
6892
|
-
reconcileAttempts:
|
|
6893
|
-
lastReconciledAt:
|
|
6894
|
-
createdAt:
|
|
6895
|
-
updatedAt:
|
|
6989
|
+
reconcileAttempts: z38.number().int().nonnegative(),
|
|
6990
|
+
lastReconciledAt: z38.string().nullable(),
|
|
6991
|
+
createdAt: z38.string(),
|
|
6992
|
+
updatedAt: z38.string()
|
|
6896
6993
|
});
|
|
6897
|
-
var adsOperationResponseSchema =
|
|
6994
|
+
var adsOperationResponseSchema = z38.object({
|
|
6898
6995
|
operation: adsOperationDtoSchema,
|
|
6899
|
-
replayed:
|
|
6996
|
+
replayed: z38.boolean()
|
|
6900
6997
|
});
|
|
6901
|
-
var adsActivationIsoTimestampSchema =
|
|
6998
|
+
var adsActivationIsoTimestampSchema = z38.iso.datetime({ offset: true });
|
|
6902
6999
|
var adsActivationGrantBaseShape = {
|
|
6903
7000
|
id: adsEntityIdSchema,
|
|
6904
7001
|
projectId: adsEntityIdSchema,
|
|
@@ -6913,61 +7010,61 @@ var adsActivationGrantBaseShape = {
|
|
|
6913
7010
|
updatedAt: adsActivationIsoTimestampSchema,
|
|
6914
7011
|
revocationRequestedAt: adsActivationIsoTimestampSchema.nullable()
|
|
6915
7012
|
};
|
|
6916
|
-
var adsActivationGrantApprovedDtoSchema =
|
|
7013
|
+
var adsActivationGrantApprovedDtoSchema = z38.object({
|
|
6917
7014
|
...adsActivationGrantBaseShape,
|
|
6918
|
-
state:
|
|
6919
|
-
operationId:
|
|
6920
|
-
executionStartedAt:
|
|
6921
|
-
consumedAt:
|
|
6922
|
-
revokedAt:
|
|
6923
|
-
expiredAt:
|
|
7015
|
+
state: z38.literal(AdsActivationGrantStates.approved),
|
|
7016
|
+
operationId: z38.null(),
|
|
7017
|
+
executionStartedAt: z38.null(),
|
|
7018
|
+
consumedAt: z38.null(),
|
|
7019
|
+
revokedAt: z38.null(),
|
|
7020
|
+
expiredAt: z38.null()
|
|
6924
7021
|
}).strict();
|
|
6925
|
-
var adsActivationGrantExecutingDtoSchema =
|
|
7022
|
+
var adsActivationGrantExecutingDtoSchema = z38.object({
|
|
6926
7023
|
...adsActivationGrantBaseShape,
|
|
6927
|
-
state:
|
|
7024
|
+
state: z38.literal(AdsActivationGrantStates.executing),
|
|
6928
7025
|
operationId: adsEntityIdSchema,
|
|
6929
7026
|
executionStartedAt: adsActivationIsoTimestampSchema,
|
|
6930
|
-
consumedAt:
|
|
6931
|
-
revokedAt:
|
|
6932
|
-
expiredAt:
|
|
7027
|
+
consumedAt: z38.null(),
|
|
7028
|
+
revokedAt: z38.null(),
|
|
7029
|
+
expiredAt: z38.null()
|
|
6933
7030
|
}).strict();
|
|
6934
|
-
var adsActivationGrantConsumedDtoSchema =
|
|
7031
|
+
var adsActivationGrantConsumedDtoSchema = z38.object({
|
|
6935
7032
|
...adsActivationGrantBaseShape,
|
|
6936
|
-
state:
|
|
7033
|
+
state: z38.literal(AdsActivationGrantStates.consumed),
|
|
6937
7034
|
operationId: adsEntityIdSchema,
|
|
6938
7035
|
executionStartedAt: adsActivationIsoTimestampSchema,
|
|
6939
7036
|
consumedAt: adsActivationIsoTimestampSchema,
|
|
6940
|
-
revokedAt:
|
|
6941
|
-
expiredAt:
|
|
7037
|
+
revokedAt: z38.null(),
|
|
7038
|
+
expiredAt: z38.null()
|
|
6942
7039
|
}).strict();
|
|
6943
|
-
var adsActivationGrantRevokedDtoSchema =
|
|
7040
|
+
var adsActivationGrantRevokedDtoSchema = z38.object({
|
|
6944
7041
|
...adsActivationGrantBaseShape,
|
|
6945
|
-
state:
|
|
6946
|
-
operationId:
|
|
6947
|
-
executionStartedAt:
|
|
6948
|
-
consumedAt:
|
|
7042
|
+
state: z38.literal(AdsActivationGrantStates.revoked),
|
|
7043
|
+
operationId: z38.null(),
|
|
7044
|
+
executionStartedAt: z38.null(),
|
|
7045
|
+
consumedAt: z38.null(),
|
|
6949
7046
|
revokedAt: adsActivationIsoTimestampSchema,
|
|
6950
|
-
expiredAt:
|
|
7047
|
+
expiredAt: z38.null()
|
|
6951
7048
|
}).strict();
|
|
6952
|
-
var adsActivationGrantExpiredDtoSchema =
|
|
7049
|
+
var adsActivationGrantExpiredDtoSchema = z38.object({
|
|
6953
7050
|
...adsActivationGrantBaseShape,
|
|
6954
|
-
state:
|
|
6955
|
-
operationId:
|
|
6956
|
-
executionStartedAt:
|
|
6957
|
-
consumedAt:
|
|
6958
|
-
revokedAt:
|
|
7051
|
+
state: z38.literal(AdsActivationGrantStates.expired),
|
|
7052
|
+
operationId: z38.null(),
|
|
7053
|
+
executionStartedAt: z38.null(),
|
|
7054
|
+
consumedAt: z38.null(),
|
|
7055
|
+
revokedAt: z38.null(),
|
|
6959
7056
|
expiredAt: adsActivationIsoTimestampSchema
|
|
6960
7057
|
}).strict();
|
|
6961
|
-
var adsActivationGrantUnknownDtoSchema =
|
|
7058
|
+
var adsActivationGrantUnknownDtoSchema = z38.object({
|
|
6962
7059
|
...adsActivationGrantBaseShape,
|
|
6963
|
-
state:
|
|
7060
|
+
state: z38.literal(AdsActivationGrantStates.unknown),
|
|
6964
7061
|
operationId: adsEntityIdSchema,
|
|
6965
7062
|
executionStartedAt: adsActivationIsoTimestampSchema,
|
|
6966
|
-
consumedAt:
|
|
6967
|
-
revokedAt:
|
|
6968
|
-
expiredAt:
|
|
7063
|
+
consumedAt: z38.null(),
|
|
7064
|
+
revokedAt: z38.null(),
|
|
7065
|
+
expiredAt: z38.null()
|
|
6969
7066
|
}).strict();
|
|
6970
|
-
var adsActivationGrantDtoSchema =
|
|
7067
|
+
var adsActivationGrantDtoSchema = z38.discriminatedUnion("state", [
|
|
6971
7068
|
adsActivationGrantApprovedDtoSchema,
|
|
6972
7069
|
adsActivationGrantExecutingDtoSchema,
|
|
6973
7070
|
adsActivationGrantConsumedDtoSchema,
|
|
@@ -6993,92 +7090,92 @@ var adsActivationGrantDtoSchema = z37.discriminatedUnion("state", [
|
|
|
6993
7090
|
var adsOperationStepBaseShape = {
|
|
6994
7091
|
id: adsEntityIdSchema,
|
|
6995
7092
|
operationId: adsEntityIdSchema,
|
|
6996
|
-
ordinal:
|
|
7093
|
+
ordinal: z38.number().int().nonnegative(),
|
|
6997
7094
|
entityType: adsActivationEntityTypeSchema,
|
|
6998
7095
|
entityId: adsEntityIdSchema,
|
|
6999
|
-
expectedUpdatedAt:
|
|
7096
|
+
expectedUpdatedAt: z38.number().int().nonnegative(),
|
|
7000
7097
|
createdAt: adsActivationIsoTimestampSchema,
|
|
7001
7098
|
updatedAt: adsActivationIsoTimestampSchema
|
|
7002
7099
|
};
|
|
7003
7100
|
var adsOperationStepNoErrorShape = {
|
|
7004
|
-
errorCode:
|
|
7005
|
-
errorMessage:
|
|
7101
|
+
errorCode: z38.null(),
|
|
7102
|
+
errorMessage: z38.null()
|
|
7006
7103
|
};
|
|
7007
7104
|
var adsOperationStepErrorShape = {
|
|
7008
|
-
errorCode:
|
|
7009
|
-
errorMessage:
|
|
7010
|
-
remediation:
|
|
7105
|
+
errorCode: z38.string().min(1).max(100),
|
|
7106
|
+
errorMessage: z38.string().min(1).max(500),
|
|
7107
|
+
remediation: z38.string().min(1).max(500)
|
|
7011
7108
|
};
|
|
7012
|
-
var adsOperationStepPendingDtoSchema =
|
|
7109
|
+
var adsOperationStepPendingDtoSchema = z38.object({
|
|
7013
7110
|
...adsOperationStepBaseShape,
|
|
7014
7111
|
...adsOperationStepNoErrorShape,
|
|
7015
|
-
state:
|
|
7016
|
-
providerUpdatedAt:
|
|
7017
|
-
remediation:
|
|
7018
|
-
startedAt:
|
|
7019
|
-
finishedAt:
|
|
7112
|
+
state: z38.literal(AdsOperationStepStates.pending),
|
|
7113
|
+
providerUpdatedAt: z38.null(),
|
|
7114
|
+
remediation: z38.null(),
|
|
7115
|
+
startedAt: z38.null(),
|
|
7116
|
+
finishedAt: z38.null()
|
|
7020
7117
|
}).strict();
|
|
7021
|
-
var adsOperationStepExecutingDtoSchema =
|
|
7118
|
+
var adsOperationStepExecutingDtoSchema = z38.object({
|
|
7022
7119
|
...adsOperationStepBaseShape,
|
|
7023
7120
|
...adsOperationStepNoErrorShape,
|
|
7024
|
-
state:
|
|
7025
|
-
providerUpdatedAt:
|
|
7026
|
-
remediation:
|
|
7121
|
+
state: z38.literal(AdsOperationStepStates.executing),
|
|
7122
|
+
providerUpdatedAt: z38.null(),
|
|
7123
|
+
remediation: z38.null(),
|
|
7027
7124
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7028
|
-
finishedAt:
|
|
7125
|
+
finishedAt: z38.null()
|
|
7029
7126
|
}).strict();
|
|
7030
|
-
var adsOperationStepActiveDtoSchema =
|
|
7127
|
+
var adsOperationStepActiveDtoSchema = z38.object({
|
|
7031
7128
|
...adsOperationStepBaseShape,
|
|
7032
7129
|
...adsOperationStepNoErrorShape,
|
|
7033
|
-
state:
|
|
7034
|
-
providerUpdatedAt:
|
|
7035
|
-
remediation:
|
|
7130
|
+
state: z38.literal(AdsOperationStepStates.active),
|
|
7131
|
+
providerUpdatedAt: z38.number().int().nonnegative(),
|
|
7132
|
+
remediation: z38.null(),
|
|
7036
7133
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7037
7134
|
finishedAt: adsActivationIsoTimestampSchema
|
|
7038
7135
|
}).strict();
|
|
7039
|
-
var adsOperationStepFailedDtoSchema =
|
|
7136
|
+
var adsOperationStepFailedDtoSchema = z38.object({
|
|
7040
7137
|
...adsOperationStepBaseShape,
|
|
7041
7138
|
...adsOperationStepErrorShape,
|
|
7042
|
-
state:
|
|
7043
|
-
providerUpdatedAt:
|
|
7139
|
+
state: z38.literal(AdsOperationStepStates.failed),
|
|
7140
|
+
providerUpdatedAt: z38.union([z38.number().int().nonnegative(), z38.null()]),
|
|
7044
7141
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7045
7142
|
finishedAt: adsActivationIsoTimestampSchema
|
|
7046
7143
|
}).strict();
|
|
7047
|
-
var adsOperationStepRollbackExecutingDtoSchema =
|
|
7144
|
+
var adsOperationStepRollbackExecutingDtoSchema = z38.object({
|
|
7048
7145
|
...adsOperationStepBaseShape,
|
|
7049
7146
|
...adsOperationStepNoErrorShape,
|
|
7050
|
-
state:
|
|
7051
|
-
providerUpdatedAt:
|
|
7052
|
-
remediation:
|
|
7147
|
+
state: z38.literal(AdsOperationStepStates.rollback_executing),
|
|
7148
|
+
providerUpdatedAt: z38.number().int().nonnegative(),
|
|
7149
|
+
remediation: z38.string().min(1).max(500),
|
|
7053
7150
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7054
|
-
finishedAt:
|
|
7151
|
+
finishedAt: z38.null()
|
|
7055
7152
|
}).strict();
|
|
7056
|
-
var adsOperationStepRolledBackDtoSchema =
|
|
7153
|
+
var adsOperationStepRolledBackDtoSchema = z38.object({
|
|
7057
7154
|
...adsOperationStepBaseShape,
|
|
7058
7155
|
...adsOperationStepNoErrorShape,
|
|
7059
|
-
state:
|
|
7060
|
-
providerUpdatedAt:
|
|
7061
|
-
remediation:
|
|
7156
|
+
state: z38.literal(AdsOperationStepStates.rolled_back),
|
|
7157
|
+
providerUpdatedAt: z38.number().int().nonnegative(),
|
|
7158
|
+
remediation: z38.string().min(1).max(500),
|
|
7062
7159
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7063
7160
|
finishedAt: adsActivationIsoTimestampSchema
|
|
7064
7161
|
}).strict();
|
|
7065
|
-
var adsOperationStepRollbackFailedDtoSchema =
|
|
7162
|
+
var adsOperationStepRollbackFailedDtoSchema = z38.object({
|
|
7066
7163
|
...adsOperationStepBaseShape,
|
|
7067
7164
|
...adsOperationStepErrorShape,
|
|
7068
|
-
state:
|
|
7069
|
-
providerUpdatedAt:
|
|
7165
|
+
state: z38.literal(AdsOperationStepStates.rollback_failed),
|
|
7166
|
+
providerUpdatedAt: z38.number().int().nonnegative(),
|
|
7070
7167
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7071
7168
|
finishedAt: adsActivationIsoTimestampSchema
|
|
7072
7169
|
}).strict();
|
|
7073
|
-
var adsOperationStepUnknownDtoSchema =
|
|
7170
|
+
var adsOperationStepUnknownDtoSchema = z38.object({
|
|
7074
7171
|
...adsOperationStepBaseShape,
|
|
7075
7172
|
...adsOperationStepErrorShape,
|
|
7076
|
-
state:
|
|
7077
|
-
providerUpdatedAt:
|
|
7173
|
+
state: z38.literal(AdsOperationStepStates.unknown),
|
|
7174
|
+
providerUpdatedAt: z38.union([z38.number().int().nonnegative(), z38.null()]),
|
|
7078
7175
|
startedAt: adsActivationIsoTimestampSchema,
|
|
7079
7176
|
finishedAt: adsActivationIsoTimestampSchema
|
|
7080
7177
|
}).strict();
|
|
7081
|
-
var adsOperationStepDtoSchema =
|
|
7178
|
+
var adsOperationStepDtoSchema = z38.discriminatedUnion("state", [
|
|
7082
7179
|
adsOperationStepPendingDtoSchema,
|
|
7083
7180
|
adsOperationStepExecutingDtoSchema,
|
|
7084
7181
|
adsOperationStepActiveDtoSchema,
|
|
@@ -7092,29 +7189,29 @@ var AdsActivationVersionPolicies = {
|
|
|
7092
7189
|
exact: "exact",
|
|
7093
7190
|
refreshSemanticallyUnchanged: "refresh_semantically_unchanged"
|
|
7094
7191
|
};
|
|
7095
|
-
var adsActivationVersionPolicySchema =
|
|
7192
|
+
var adsActivationVersionPolicySchema = z38.enum([
|
|
7096
7193
|
AdsActivationVersionPolicies.exact,
|
|
7097
7194
|
AdsActivationVersionPolicies.refreshSemanticallyUnchanged
|
|
7098
7195
|
]);
|
|
7099
|
-
var adsActivationGrantCreateRequestSchema =
|
|
7196
|
+
var adsActivationGrantCreateRequestSchema = z38.object({
|
|
7100
7197
|
manifest: adsActivationManifestSchema,
|
|
7101
7198
|
executorApiKeyId: adsEntityIdSchema,
|
|
7102
7199
|
expiresAt: adsActivationIsoTimestampSchema,
|
|
7103
7200
|
versionPolicy: adsActivationVersionPolicySchema.default(AdsActivationVersionPolicies.exact)
|
|
7104
7201
|
}).strict();
|
|
7105
|
-
var adsActivationGrantResponseSchema =
|
|
7202
|
+
var adsActivationGrantResponseSchema = z38.object({
|
|
7106
7203
|
grant: adsActivationGrantDtoSchema
|
|
7107
7204
|
}).strict();
|
|
7108
|
-
var adsActivationGrantRevokeRequestSchema =
|
|
7109
|
-
var adsActivateTreeRequestSchema =
|
|
7205
|
+
var adsActivationGrantRevokeRequestSchema = z38.object({}).strict();
|
|
7206
|
+
var adsActivateTreeRequestSchema = z38.object({
|
|
7110
7207
|
operationKey: adsOperationKeySchema,
|
|
7111
7208
|
grantId: adsEntityIdSchema,
|
|
7112
7209
|
manifestHash: adsActivationManifestHashSchema
|
|
7113
7210
|
}).strict();
|
|
7114
|
-
var adsActivateTreeResponseSchema =
|
|
7211
|
+
var adsActivateTreeResponseSchema = z38.object({
|
|
7115
7212
|
grant: adsActivationGrantDtoSchema,
|
|
7116
7213
|
operation: adsOperationDtoSchema,
|
|
7117
|
-
steps:
|
|
7214
|
+
steps: z38.array(adsOperationStepDtoSchema)
|
|
7118
7215
|
}).strict();
|
|
7119
7216
|
var adsUnresolvedOperationStatesDefault = [
|
|
7120
7217
|
AdsOperationStates.pending,
|
|
@@ -7133,23 +7230,23 @@ function parseUnresolvedOperationStates(value) {
|
|
|
7133
7230
|
}
|
|
7134
7231
|
return typeof value === "string" ? value.split(",").filter(Boolean) : value;
|
|
7135
7232
|
}
|
|
7136
|
-
var adsUnresolvedOperationListQuerySchema =
|
|
7137
|
-
state:
|
|
7233
|
+
var adsUnresolvedOperationListQuerySchema = z38.object({
|
|
7234
|
+
state: z38.preprocess(
|
|
7138
7235
|
parseUnresolvedOperationStates,
|
|
7139
|
-
|
|
7236
|
+
z38.array(adsUnresolvedOperationStateSchema).min(1).max(3).refine((states) => new Set(states).size === states.length, "state values must be unique")
|
|
7140
7237
|
),
|
|
7141
|
-
limit:
|
|
7142
|
-
cursor:
|
|
7238
|
+
limit: z38.coerce.number().int().min(1).max(200).default(100),
|
|
7239
|
+
cursor: z38.string().min(1).max(1e3).optional()
|
|
7143
7240
|
});
|
|
7144
|
-
var adsUnresolvedOperationListResponseSchema =
|
|
7145
|
-
operations:
|
|
7146
|
-
count:
|
|
7147
|
-
nextCursor:
|
|
7241
|
+
var adsUnresolvedOperationListResponseSchema = z38.object({
|
|
7242
|
+
operations: z38.array(adsOperationDtoSchema),
|
|
7243
|
+
count: z38.number().int().nonnegative(),
|
|
7244
|
+
nextCursor: z38.string().nullable()
|
|
7148
7245
|
});
|
|
7149
|
-
var adsOperationReconcileRequestSchema =
|
|
7150
|
-
var adsOperationReconcileResponseSchema =
|
|
7246
|
+
var adsOperationReconcileRequestSchema = z38.object({}).strict();
|
|
7247
|
+
var adsOperationReconcileResponseSchema = z38.object({
|
|
7151
7248
|
operation: adsOperationDtoSchema,
|
|
7152
|
-
resolved:
|
|
7249
|
+
resolved: z38.boolean()
|
|
7153
7250
|
});
|
|
7154
7251
|
function adsCtr(clicks, impressions) {
|
|
7155
7252
|
return impressions > 0 ? clicks / impressions : null;
|
|
@@ -7622,6 +7719,8 @@ export {
|
|
|
7622
7719
|
reportActionCategoryLabel,
|
|
7623
7720
|
reportConfidenceLabel,
|
|
7624
7721
|
projectReportDtoSchema,
|
|
7722
|
+
organicEvidencePeriodSchema,
|
|
7723
|
+
organicEvidenceDtoSchema,
|
|
7625
7724
|
dedupeReportActions,
|
|
7626
7725
|
dedupeReportOpportunities,
|
|
7627
7726
|
CodingAgents,
|