@rolino/contracts 0.4.0 → 0.5.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/CHANGELOG.md +57 -0
- package/README.md +47 -4
- package/dist/index.cjs +951 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6488 -2276
- package/dist/index.d.ts +6488 -2276
- package/dist/index.js +839 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var API_VERSION = "v1";
|
|
4
|
-
var CONTRACT_VERSION = "0.
|
|
4
|
+
var CONTRACT_VERSION = "0.16.0";
|
|
5
5
|
var RequestMetadataSchema = z.object({
|
|
6
6
|
requestId: z.string().min(1)
|
|
7
7
|
});
|
|
@@ -15,6 +15,11 @@ var ApiErrorCodeSchema = z.enum([
|
|
|
15
15
|
"VALIDATION_ERROR",
|
|
16
16
|
"CONFLICT",
|
|
17
17
|
"RATE_LIMITED",
|
|
18
|
+
"DELIVERY_CREDENTIAL_INVALID",
|
|
19
|
+
"DELIVERY_CREDENTIAL_REVOKED",
|
|
20
|
+
"ARTICLE_NOT_PUBLISHED",
|
|
21
|
+
"WEBHOOK_INVALID",
|
|
22
|
+
"WEBHOOK_REPLAYED",
|
|
18
23
|
"INTERNAL_ERROR"
|
|
19
24
|
]);
|
|
20
25
|
var ApiProblemSchema = z.object({
|
|
@@ -25,6 +30,50 @@ var ApiProblemSchema = z.object({
|
|
|
25
30
|
}),
|
|
26
31
|
meta: RequestMetadataSchema
|
|
27
32
|
});
|
|
33
|
+
var BlogImageSchema = z.object({
|
|
34
|
+
url: z.string().url(),
|
|
35
|
+
altText: z.string().min(1),
|
|
36
|
+
width: z.number().int().positive(),
|
|
37
|
+
height: z.number().int().positive(),
|
|
38
|
+
purpose: z.enum(["FEATURED", "SECTION", "SOCIAL_PREVIEW"])
|
|
39
|
+
});
|
|
40
|
+
var PublishedBlogArticleSchema = z.object({
|
|
41
|
+
id: z.string().min(1),
|
|
42
|
+
revisionId: z.string().min(1),
|
|
43
|
+
revisionNumber: z.number().int().positive(),
|
|
44
|
+
slug: z.string().min(1),
|
|
45
|
+
title: z.string().min(1),
|
|
46
|
+
description: z.string().nullable(),
|
|
47
|
+
excerpt: z.string().nullable(),
|
|
48
|
+
tags: z.array(z.string()),
|
|
49
|
+
author: z.string().min(1),
|
|
50
|
+
language: z.string().min(1),
|
|
51
|
+
markdown: z.string(),
|
|
52
|
+
contentBlocks: z.array(z.unknown()),
|
|
53
|
+
canonicalPath: z.string().startsWith("/"),
|
|
54
|
+
publicUrl: z.string().url(),
|
|
55
|
+
publishedAt: z.string().datetime(),
|
|
56
|
+
updatedAt: z.string().datetime(),
|
|
57
|
+
images: z.array(BlogImageSchema)
|
|
58
|
+
});
|
|
59
|
+
var BlogArticleListSchema = z.object({
|
|
60
|
+
articles: z.array(PublishedBlogArticleSchema.omit({ markdown: true, contentBlocks: true }))
|
|
61
|
+
});
|
|
62
|
+
var BlogMetadataSchema = z.object({
|
|
63
|
+
siteId: z.string().min(1),
|
|
64
|
+
name: z.string().min(1),
|
|
65
|
+
origin: z.string().url(),
|
|
66
|
+
blogBasePath: z.string().startsWith("/"),
|
|
67
|
+
language: z.string().min(1),
|
|
68
|
+
updatedAt: z.string().datetime().nullable()
|
|
69
|
+
});
|
|
70
|
+
var BlogSitemapEntrySchema = z.object({
|
|
71
|
+
url: z.string().url(),
|
|
72
|
+
lastModified: z.string().datetime()
|
|
73
|
+
});
|
|
74
|
+
var BlogSlugRedirectSchema = z.object({
|
|
75
|
+
redirect: z.object({ from: z.string().min(1), to: z.string().min(1), permanent: z.literal(true) })
|
|
76
|
+
});
|
|
28
77
|
function successEnvelopeSchema(data) {
|
|
29
78
|
return z.object({
|
|
30
79
|
data,
|
|
@@ -40,8 +89,390 @@ var CapabilityIdSchema = z.enum([
|
|
|
40
89
|
"posts:schedule",
|
|
41
90
|
"posts:publish",
|
|
42
91
|
"integrations:read",
|
|
43
|
-
"calendar:read"
|
|
92
|
+
"calendar:read",
|
|
93
|
+
"seo:read",
|
|
94
|
+
"blog:read",
|
|
95
|
+
"blog:write",
|
|
96
|
+
"blog:manage",
|
|
97
|
+
"blog:approve",
|
|
98
|
+
"blog:publish"
|
|
44
99
|
]);
|
|
100
|
+
var AgentBlogPlanSchema = z.object({
|
|
101
|
+
id: z.string().min(1),
|
|
102
|
+
state: z.string().min(1),
|
|
103
|
+
windowStart: z.string().datetime(),
|
|
104
|
+
windowEnd: z.string().datetime(),
|
|
105
|
+
cadence: z.object({ weekdays: z.array(z.number().int().min(0).max(6)) }),
|
|
106
|
+
activeRevisionId: z.string().nullable(),
|
|
107
|
+
itemCount: z.number().int().nonnegative()
|
|
108
|
+
});
|
|
109
|
+
var AgentBlogArticleSchema = z.object({
|
|
110
|
+
id: z.string().min(1),
|
|
111
|
+
state: z.string().min(1),
|
|
112
|
+
title: z.string().min(1),
|
|
113
|
+
slug: z.string().min(1),
|
|
114
|
+
currentDraftId: z.string().nullable(),
|
|
115
|
+
approvedRevisionId: z.string().nullable(),
|
|
116
|
+
publishedRevisionId: z.string().nullable(),
|
|
117
|
+
scheduledPublishAt: z.string().datetime().nullable(),
|
|
118
|
+
updatedAt: z.string().datetime()
|
|
119
|
+
});
|
|
120
|
+
var AgentBlogImageSchema = z.object({
|
|
121
|
+
id: z.string().min(1),
|
|
122
|
+
revisionId: z.string().nullable(),
|
|
123
|
+
version: z.number().int().positive(),
|
|
124
|
+
purpose: z.enum(["FEATURED", "SECTION", "SOCIAL_PREVIEW"]),
|
|
125
|
+
source: z.enum(["GENERATED", "AGENT_UPLOAD"]),
|
|
126
|
+
state: z.enum(["QUEUED", "GENERATING", "READY_FOR_REVIEW", "APPROVED", "REJECTED", "FAILED"]),
|
|
127
|
+
publicUrl: z.string().url().nullable(),
|
|
128
|
+
mimeType: z.enum(["image/jpeg", "image/png", "image/webp"]).nullable(),
|
|
129
|
+
width: z.number().int().positive().nullable(),
|
|
130
|
+
height: z.number().int().positive().nullable(),
|
|
131
|
+
altText: z.string().nullable(),
|
|
132
|
+
caption: z.string().nullable(),
|
|
133
|
+
createdAt: z.string().datetime()
|
|
134
|
+
}).strict();
|
|
135
|
+
var AgentBlogArticleDetailSchema = AgentBlogArticleSchema.extend({
|
|
136
|
+
draft: z.object({
|
|
137
|
+
id: z.string().min(1),
|
|
138
|
+
version: z.number().int().positive(),
|
|
139
|
+
title: z.string(),
|
|
140
|
+
slug: z.string(),
|
|
141
|
+
description: z.string().nullable(),
|
|
142
|
+
excerpt: z.string().nullable(),
|
|
143
|
+
canonicalPath: z.string(),
|
|
144
|
+
tags: z.array(z.string()),
|
|
145
|
+
author: z.string(),
|
|
146
|
+
language: z.string(),
|
|
147
|
+
markdown: z.string(),
|
|
148
|
+
callToAction: z.unknown().nullable(),
|
|
149
|
+
internalLinks: z.unknown()
|
|
150
|
+
}).nullable(),
|
|
151
|
+
revisions: z.array(z.object({ id: z.string().min(1), revisionNumber: z.number().int().positive(), contentHash: z.string().min(1), approvedAt: z.string().datetime().nullable(), createdAt: z.string().datetime() })),
|
|
152
|
+
images: z.array(AgentBlogImageSchema)
|
|
153
|
+
});
|
|
154
|
+
var AgentBlogJobSchema = z.object({
|
|
155
|
+
id: z.string().min(1),
|
|
156
|
+
type: z.string().min(1),
|
|
157
|
+
state: z.string().min(1),
|
|
158
|
+
attemptCount: z.number().int().nonnegative(),
|
|
159
|
+
availableAt: z.string().datetime(),
|
|
160
|
+
startedAt: z.string().datetime().nullable(),
|
|
161
|
+
completedAt: z.string().datetime().nullable(),
|
|
162
|
+
lastErrorCode: z.string().nullable(),
|
|
163
|
+
lastErrorMessage: z.string().nullable()
|
|
164
|
+
});
|
|
165
|
+
var AgentBlogDraftUpdateSchema = z.object({
|
|
166
|
+
version: z.number().int().positive(),
|
|
167
|
+
title: z.string().trim().min(1).max(200),
|
|
168
|
+
slug: z.string().trim().min(1).max(160),
|
|
169
|
+
description: z.string().trim().max(320).nullable(),
|
|
170
|
+
excerpt: z.string().trim().max(500).nullable(),
|
|
171
|
+
canonicalPath: z.string().startsWith("/"),
|
|
172
|
+
tags: z.array(z.string().trim().min(1).max(80)).max(30),
|
|
173
|
+
author: z.string().trim().min(1).max(160),
|
|
174
|
+
language: z.string().trim().min(2).max(20),
|
|
175
|
+
markdown: z.string().max(2e5),
|
|
176
|
+
callToAction: z.object({ label: z.string().trim().min(1).max(160), pageId: z.string().min(1).nullable() }).strict().nullable(),
|
|
177
|
+
internalLinks: z.array(z.object({ pageId: z.string().min(1), anchorText: z.string().trim().min(1).max(200) }).strict()).max(20),
|
|
178
|
+
scheduledPublishAt: z.string().datetime().nullable().optional()
|
|
179
|
+
});
|
|
180
|
+
var AgentBlogGenerateRequestSchema = z.object({ idempotencyKey: z.string().trim().min(8).max(200) });
|
|
181
|
+
var AgentBlogImageGenerateRequestSchema = z.object({
|
|
182
|
+
revisionId: z.string().min(1),
|
|
183
|
+
idempotencyKey: z.string().trim().min(8).max(200),
|
|
184
|
+
editorialBrief: z.string().trim().max(500).optional()
|
|
185
|
+
}).strict();
|
|
186
|
+
var AgentBlogImageUploadPrepareRequestSchema = z.object({
|
|
187
|
+
revisionId: z.string().min(1),
|
|
188
|
+
fileName: z.string().trim().min(1).max(255),
|
|
189
|
+
contentType: z.enum(["image/jpeg", "image/png", "image/webp"]),
|
|
190
|
+
fileSize: z.number().int().positive().max(25 * 1024 * 1024)
|
|
191
|
+
}).strict();
|
|
192
|
+
var AgentBlogImageUploadCompleteRequestSchema = AgentBlogImageUploadPrepareRequestSchema.extend({
|
|
193
|
+
storageKey: z.string().min(1).max(1024),
|
|
194
|
+
altText: z.string().trim().min(1).max(300)
|
|
195
|
+
}).strict();
|
|
196
|
+
var AgentBlogImageReviewRequestSchema = z.object({
|
|
197
|
+
expectedVersion: z.number().int().positive(),
|
|
198
|
+
decision: z.enum(["APPROVED", "REJECTED"]),
|
|
199
|
+
altText: z.string().max(300),
|
|
200
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
201
|
+
}).strict();
|
|
202
|
+
var AgentBlogApprovalPreviewRequestSchema = z.object({ revisionId: z.string().min(1) }).strict();
|
|
203
|
+
var AgentBlogApprovalExecuteRequestSchema = AgentBlogApprovalPreviewRequestSchema.extend({
|
|
204
|
+
confirmationToken: z.string().min(1),
|
|
205
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
206
|
+
}).strict();
|
|
207
|
+
var AgentBlogApprovalImageSummarySchema = z.object({
|
|
208
|
+
id: z.string(),
|
|
209
|
+
purpose: z.enum(["FEATURED", "SECTION", "SOCIAL_PREVIEW"]),
|
|
210
|
+
contentPosition: z.string().nullable(),
|
|
211
|
+
width: z.number().int().positive(),
|
|
212
|
+
height: z.number().int().positive(),
|
|
213
|
+
mimeType: z.enum(["image/jpeg", "image/png", "image/webp"]),
|
|
214
|
+
altText: z.string().min(1),
|
|
215
|
+
caption: z.string().nullable(),
|
|
216
|
+
version: z.number().int().positive()
|
|
217
|
+
}).strict();
|
|
218
|
+
var AgentBlogApprovalLinkSummarySchema = z.object({
|
|
219
|
+
pageId: z.string(),
|
|
220
|
+
liveState: z.enum(["LIVE", "REDIRECT"])
|
|
221
|
+
}).strict();
|
|
222
|
+
var AgentBlogApprovalPreviewSchema = z.object({
|
|
223
|
+
articleId: z.string(),
|
|
224
|
+
revisionId: z.string(),
|
|
225
|
+
title: z.string(),
|
|
226
|
+
slug: z.string(),
|
|
227
|
+
revisionNumber: z.number().int().positive(),
|
|
228
|
+
contentHash: z.string(),
|
|
229
|
+
images: z.array(AgentBlogApprovalImageSummarySchema),
|
|
230
|
+
links: z.array(AgentBlogApprovalLinkSummarySchema),
|
|
231
|
+
warnings: z.array(z.string()),
|
|
232
|
+
bundleHash: z.string().regex(/^[a-f0-9]{64}$/),
|
|
233
|
+
confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }).strict()
|
|
234
|
+
}).strict();
|
|
235
|
+
var AgentBlogApprovalExecuteSchema = AgentBlogApprovalPreviewSchema.omit({ confirmation: true }).extend({
|
|
236
|
+
approvalSource: z.literal("AGENT"),
|
|
237
|
+
approvedAt: z.string().datetime()
|
|
238
|
+
}).strict();
|
|
239
|
+
var AgentBlogDestinationSelectionSchema = z.array(z.string().min(1)).min(1).max(20);
|
|
240
|
+
var AgentBlogIanaTimeZoneSchema = z.string().trim().min(1).max(100).refine((timeZone) => {
|
|
241
|
+
try {
|
|
242
|
+
new Intl.DateTimeFormat("en", { timeZone }).format();
|
|
243
|
+
return true;
|
|
244
|
+
} catch {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
}, "timezone must be a valid IANA timezone");
|
|
248
|
+
var AgentBlogSchedulePreviewRequestSchema = z.object({
|
|
249
|
+
revisionId: z.string().min(1),
|
|
250
|
+
destinationIds: AgentBlogDestinationSelectionSchema.optional(),
|
|
251
|
+
scheduledAt: z.string().datetime({ offset: true }),
|
|
252
|
+
timezone: AgentBlogIanaTimeZoneSchema
|
|
253
|
+
}).strict();
|
|
254
|
+
var AgentBlogScheduleExecuteRequestSchema = AgentBlogSchedulePreviewRequestSchema.extend({
|
|
255
|
+
confirmationToken: z.string().min(1),
|
|
256
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
257
|
+
}).strict();
|
|
258
|
+
var AgentBlogScheduleCancelPreviewRequestSchema = z.object({}).strict();
|
|
259
|
+
var AgentBlogScheduleCancelExecuteRequestSchema = z.object({
|
|
260
|
+
confirmationToken: z.string().min(1),
|
|
261
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
262
|
+
}).strict();
|
|
263
|
+
var AgentBlogSchedulePreviewSchema = z.object({
|
|
264
|
+
articleId: z.string(),
|
|
265
|
+
revisionId: z.string(),
|
|
266
|
+
contentHash: z.string(),
|
|
267
|
+
approvalBundleHash: z.string().regex(/^[a-f0-9]{64}$/),
|
|
268
|
+
approvalSource: z.enum(["USER", "AGENT"]).nullable(),
|
|
269
|
+
destinationIds: AgentBlogDestinationSelectionSchema,
|
|
270
|
+
scheduledAt: z.string().datetime(),
|
|
271
|
+
timezone: AgentBlogIanaTimeZoneSchema,
|
|
272
|
+
currentScheduleVersion: z.string().datetime(),
|
|
273
|
+
previousScheduledAt: z.string().datetime().nullable(),
|
|
274
|
+
confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }).strict()
|
|
275
|
+
}).strict();
|
|
276
|
+
var AgentBlogScheduleExecuteSchema = AgentBlogSchedulePreviewSchema.omit({ confirmation: true }).extend({
|
|
277
|
+
jobId: z.string(),
|
|
278
|
+
scheduleVersion: z.string().datetime(),
|
|
279
|
+
state: z.literal("SCHEDULED")
|
|
280
|
+
}).strict();
|
|
281
|
+
var AgentBlogScheduleCancelPreviewSchema = z.object({
|
|
282
|
+
articleId: z.string(),
|
|
283
|
+
revisionId: z.string(),
|
|
284
|
+
approvalBundleHash: z.string().regex(/^[a-f0-9]{64}$/),
|
|
285
|
+
destinationIds: AgentBlogDestinationSelectionSchema,
|
|
286
|
+
scheduledAt: z.string().datetime(),
|
|
287
|
+
timezone: AgentBlogIanaTimeZoneSchema,
|
|
288
|
+
scheduleVersion: z.string().datetime(),
|
|
289
|
+
confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }).strict()
|
|
290
|
+
}).strict();
|
|
291
|
+
var AgentBlogScheduleCancelExecuteSchema = AgentBlogScheduleCancelPreviewSchema.omit({ confirmation: true }).extend({
|
|
292
|
+
state: z.literal("APPROVED"),
|
|
293
|
+
canceledAt: z.string().datetime()
|
|
294
|
+
}).strict();
|
|
295
|
+
var AgentBlogPublishPreviewRequestSchema = z.object({ revisionId: z.string().min(1), destinationIds: AgentBlogDestinationSelectionSchema.optional() });
|
|
296
|
+
var AgentBlogPublishExecuteRequestSchema = z.object({ revisionId: z.string().min(1), destinationIds: AgentBlogDestinationSelectionSchema.optional(), confirmationToken: z.string().min(1), idempotencyKey: z.string().trim().min(8).max(200) });
|
|
297
|
+
var AgentBlogPublishingProviderSchema = z.object({ key: z.string(), name: z.string(), description: z.string(), mode: z.string(), rollout: z.enum(["PREVIEW", "VISIBLE"]), capabilities: z.array(z.string()), authorizationStrategy: z.string(), requiresResourceDiscovery: z.boolean(), requiresFieldMapping: z.boolean(), officialDocumentationUrl: z.string().url() }).strict();
|
|
298
|
+
var AgentBlogPublishingDestinationSchema = z.object({ id: z.string(), name: z.string(), providerKey: z.string(), mode: z.string(), status: z.string(), isPrimary: z.boolean(), enabled: z.boolean(), externalSiteName: z.string().nullable(), externalSiteUrl: z.string().url().nullable(), lastTestedAt: z.string().datetime().nullable(), lastSucceededAt: z.string().datetime().nullable(), lastErrorCode: z.string().nullable() }).strict();
|
|
299
|
+
var AgentBlogDeliveryAttemptSchema = z.object({ id: z.string(), articleId: z.string().nullable(), revisionId: z.string().nullable(), destinationId: z.string().nullable(), destinationName: z.string().nullable(), operation: z.string().nullable(), state: z.string(), attemptCount: z.number().int().nonnegative(), errorCode: z.string().nullable(), retryAt: z.string().datetime().nullable(), remoteUrl: z.string().url().nullable(), createdAt: z.string().datetime(), deliveredAt: z.string().datetime().nullable() }).strict();
|
|
300
|
+
var AgentBlogPublishPreviewSchema = z.object({ articleId: z.string(), revisionId: z.string(), contentHash: z.string(), approvalBundleHash: z.string().regex(/^[a-f0-9]{64}$/), approvalSource: z.enum(["USER", "AGENT"]).nullable(), title: z.string(), slug: z.string(), publicUrl: z.string().url(), destinations: z.array(AgentBlogPublishingDestinationSchema), confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }) });
|
|
301
|
+
var AgentBlogReadinessSchema = z.enum([
|
|
302
|
+
"MISSING",
|
|
303
|
+
"NOT_STARTED",
|
|
304
|
+
"QUEUED",
|
|
305
|
+
"RUNNING",
|
|
306
|
+
"READY",
|
|
307
|
+
"USED",
|
|
308
|
+
"CONFIGURED",
|
|
309
|
+
"VERIFIED",
|
|
310
|
+
"NEEDS_ATTENTION"
|
|
311
|
+
]);
|
|
312
|
+
var AgentBlogSetupStatusSchema = z.object({
|
|
313
|
+
projectId: z.string().min(1),
|
|
314
|
+
brandName: z.string().min(1),
|
|
315
|
+
brandWebsite: z.enum(["MISSING", "READY"]),
|
|
316
|
+
websiteOrigin: z.string().url().nullable(),
|
|
317
|
+
siteId: z.string().min(1).nullable(),
|
|
318
|
+
blogBasePath: z.string().startsWith("/").nullable(),
|
|
319
|
+
siteImport: AgentBlogReadinessSchema,
|
|
320
|
+
activeJobId: z.string().min(1).nullable(),
|
|
321
|
+
plan: AgentBlogReadinessSchema,
|
|
322
|
+
activePlanId: z.string().min(1).nullable(),
|
|
323
|
+
deliveryCredential: AgentBlogReadinessSchema,
|
|
324
|
+
revalidation: AgentBlogReadinessSchema,
|
|
325
|
+
nextAction: z.enum([
|
|
326
|
+
"ADD_WEBSITE",
|
|
327
|
+
"IMPORT_SITE",
|
|
328
|
+
"WAIT_FOR_JOB",
|
|
329
|
+
"CREATE_PLAN",
|
|
330
|
+
"REVIEW_PLAN",
|
|
331
|
+
"CONFIGURE_DELIVERY",
|
|
332
|
+
"TEST_CONNECTION",
|
|
333
|
+
"READY"
|
|
334
|
+
])
|
|
335
|
+
}).strict();
|
|
336
|
+
var AgentBlogCadenceInputSchema = z.object({
|
|
337
|
+
startsOn: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
338
|
+
weekdays: z.array(z.number().int().min(0).max(6)).min(1).max(7),
|
|
339
|
+
timeZone: z.string().trim().min(1).max(100)
|
|
340
|
+
}).strict().superRefine(({ weekdays }, context) => {
|
|
341
|
+
if (new Set(weekdays).size !== weekdays.length) {
|
|
342
|
+
context.addIssue({ code: "custom", path: ["weekdays"], message: "Weekdays must be unique." });
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
var AgentBlogIdempotentRequestSchema = z.object({
|
|
346
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
347
|
+
}).strict();
|
|
348
|
+
var AgentBlogPlanCreateRequestSchema = AgentBlogCadenceInputSchema.and(AgentBlogIdempotentRequestSchema);
|
|
349
|
+
var AgentBlogPlanRetryRequestSchema = AgentBlogIdempotentRequestSchema;
|
|
350
|
+
var AgentBlogPlanItemSchema = z.object({
|
|
351
|
+
id: z.string().min(1),
|
|
352
|
+
planId: z.string().min(1),
|
|
353
|
+
planRevisionId: z.string().min(1),
|
|
354
|
+
version: z.number().int().positive(),
|
|
355
|
+
scheduledLocalDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/),
|
|
356
|
+
title: z.string().min(1),
|
|
357
|
+
recommendedSlug: z.string().min(1),
|
|
358
|
+
state: z.string().min(1),
|
|
359
|
+
workType: z.string().min(1),
|
|
360
|
+
format: z.string().min(1),
|
|
361
|
+
primaryQuery: z.string().nullable(),
|
|
362
|
+
searchIntent: z.string().nullable(),
|
|
363
|
+
summary: z.string(),
|
|
364
|
+
outline: z.unknown(),
|
|
365
|
+
selectionReason: z.string().min(1),
|
|
366
|
+
evidenceClassification: z.enum(["OBSERVED", "MIXED", "HYPOTHESIS"]),
|
|
367
|
+
evidence: z.unknown(),
|
|
368
|
+
displayMetrics: z.unknown(),
|
|
369
|
+
overlapExplanation: z.string().nullable(),
|
|
370
|
+
existingArticleComparison: z.string().nullable(),
|
|
371
|
+
recommendedLinks: z.unknown(),
|
|
372
|
+
targetConversionPage: z.string().nullable(),
|
|
373
|
+
articleId: z.string().min(1).nullable()
|
|
374
|
+
}).strict();
|
|
375
|
+
var AgentBlogPlanItemStateRequestSchema = z.object({
|
|
376
|
+
state: z.enum(["ACCEPTED", "DISMISSED"]),
|
|
377
|
+
expectedState: z.string().min(1),
|
|
378
|
+
expectedVersion: z.number().int().positive(),
|
|
379
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
380
|
+
}).strict();
|
|
381
|
+
var AgentBlogArticleCreateRequestSchema = z.object({
|
|
382
|
+
expectedState: z.literal("ACCEPTED"),
|
|
383
|
+
expectedVersion: z.number().int().positive(),
|
|
384
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
385
|
+
}).strict();
|
|
386
|
+
var AgentBlogConnectionStatusSchema = z.object({
|
|
387
|
+
projectId: z.string().min(1),
|
|
388
|
+
siteId: z.string().min(1),
|
|
389
|
+
origin: z.string().url(),
|
|
390
|
+
endpoint: z.string().url().nullable(),
|
|
391
|
+
deliveryCredential: z.enum(["MISSING", "READY", "USED"]),
|
|
392
|
+
activeCredentialId: z.string().min(1).nullable(),
|
|
393
|
+
credentialLastUsedAt: z.string().datetime().nullable(),
|
|
394
|
+
revalidation: z.enum(["MISSING", "CONFIGURED", "VERIFIED", "NEEDS_ATTENTION"]),
|
|
395
|
+
revalidationLastTestedAt: z.string().datetime().nullable(),
|
|
396
|
+
revalidationLastSucceededAt: z.string().datetime().nullable(),
|
|
397
|
+
revalidationLastErrorCode: z.string().nullable()
|
|
398
|
+
}).strict();
|
|
399
|
+
var AgentBlogConnectionRequestSchema = z.object({
|
|
400
|
+
endpoint: z.string().url().nullable(),
|
|
401
|
+
credentialAction: z.enum(["KEEP", "CREATE", "ROTATE", "REVOKE"]),
|
|
402
|
+
credentialId: z.string().min(1).nullable(),
|
|
403
|
+
secretAction: z.enum(["KEEP", "CREATE", "ROTATE"])
|
|
404
|
+
}).strict();
|
|
405
|
+
var AgentBlogConnectionPreviewRequestSchema = AgentBlogConnectionRequestSchema;
|
|
406
|
+
var AgentBlogConnectionExecuteRequestSchema = AgentBlogConnectionRequestSchema.extend({
|
|
407
|
+
confirmationToken: z.string().min(1).max(300),
|
|
408
|
+
idempotencyKey: z.string().trim().min(8).max(200)
|
|
409
|
+
}).strict();
|
|
410
|
+
var AgentBlogConnectionPreviewSchema = z.object({
|
|
411
|
+
projectId: z.string().min(1),
|
|
412
|
+
siteId: z.string().min(1),
|
|
413
|
+
siteName: z.string().min(1),
|
|
414
|
+
origin: z.string().url(),
|
|
415
|
+
endpoint: z.string().url().nullable(),
|
|
416
|
+
credentialAction: z.enum(["KEEP", "CREATE", "ROTATE", "REVOKE"]),
|
|
417
|
+
secretAction: z.enum(["KEEP", "CREATE", "ROTATE"]),
|
|
418
|
+
effect: z.string().min(1),
|
|
419
|
+
confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict()
|
|
420
|
+
}).strict();
|
|
421
|
+
var AgentBlogConnectionExecuteSchema = z.object({
|
|
422
|
+
projectId: z.string().min(1),
|
|
423
|
+
siteId: z.string().min(1),
|
|
424
|
+
completed: z.literal(true),
|
|
425
|
+
secretDelivered: z.boolean(),
|
|
426
|
+
alreadyDelivered: z.boolean(),
|
|
427
|
+
deliveryToken: z.string().min(1).optional(),
|
|
428
|
+
webhookSecret: z.string().min(1).optional(),
|
|
429
|
+
message: z.string().min(1)
|
|
430
|
+
}).strict();
|
|
431
|
+
var AgentBlogRevalidationTestRequestSchema = AgentBlogIdempotentRequestSchema;
|
|
432
|
+
var AgentBlogRevalidationTestSchema = z.object({
|
|
433
|
+
status: z.enum(["VERIFIED", "NEEDS_ATTENTION"]),
|
|
434
|
+
testedAt: z.string().datetime(),
|
|
435
|
+
errorCode: z.string().nullable()
|
|
436
|
+
}).strict();
|
|
437
|
+
var AgentBlogPlanListResponseSchema = successEnvelopeSchema(z.object({ plans: z.array(AgentBlogPlanSchema) }));
|
|
438
|
+
var AgentBlogArticleListResponseSchema = successEnvelopeSchema(z.object({ articles: z.array(AgentBlogArticleSchema) }));
|
|
439
|
+
var AgentBlogArticleResponseSchema = successEnvelopeSchema(AgentBlogArticleDetailSchema);
|
|
440
|
+
var AgentBlogJobResponseSchema = successEnvelopeSchema(AgentBlogJobSchema);
|
|
441
|
+
var AgentBlogImageGenerationResponseSchema = successEnvelopeSchema(z.object({ image: AgentBlogImageSchema, job: AgentBlogJobSchema }).strict());
|
|
442
|
+
var AgentBlogImageUploadPreparationResponseSchema = successEnvelopeSchema(z.object({
|
|
443
|
+
uploadUrl: z.string().url(),
|
|
444
|
+
storageKey: z.string(),
|
|
445
|
+
expiresAt: z.string().datetime(),
|
|
446
|
+
headers: z.object({ "Content-Type": z.enum(["image/jpeg", "image/png", "image/webp"]) }).strict(),
|
|
447
|
+
maxFileSize: z.number().int().positive()
|
|
448
|
+
}).strict());
|
|
449
|
+
var AgentBlogImageResponseSchema = successEnvelopeSchema(AgentBlogImageSchema);
|
|
450
|
+
var AgentBlogApprovalPreviewResponseSchema = successEnvelopeSchema(AgentBlogApprovalPreviewSchema);
|
|
451
|
+
var AgentBlogApprovalExecuteResponseSchema = successEnvelopeSchema(AgentBlogApprovalExecuteSchema);
|
|
452
|
+
var AgentBlogSchedulePreviewResponseSchema = successEnvelopeSchema(AgentBlogSchedulePreviewSchema);
|
|
453
|
+
var AgentBlogScheduleExecuteResponseSchema = successEnvelopeSchema(AgentBlogScheduleExecuteSchema);
|
|
454
|
+
var AgentBlogScheduleCancelPreviewResponseSchema = successEnvelopeSchema(AgentBlogScheduleCancelPreviewSchema);
|
|
455
|
+
var AgentBlogScheduleCancelExecuteResponseSchema = successEnvelopeSchema(AgentBlogScheduleCancelExecuteSchema);
|
|
456
|
+
var AgentBlogPublishPreviewResponseSchema = successEnvelopeSchema(AgentBlogPublishPreviewSchema);
|
|
457
|
+
var AgentBlogPublishExecuteResponseSchema = successEnvelopeSchema(z.object({ publicationId: z.string(), articleId: z.string(), revisionId: z.string(), approvalBundleHash: z.string().regex(/^[a-f0-9]{64}$/), approvalSource: z.enum(["USER", "AGENT"]).nullable(), publicUrl: z.string().url(), publishedAt: z.string().datetime() }));
|
|
458
|
+
var AgentBlogPublishingProviderListResponseSchema = successEnvelopeSchema(z.object({ providers: z.array(AgentBlogPublishingProviderSchema) }).strict());
|
|
459
|
+
var AgentBlogPublishingDestinationListResponseSchema = successEnvelopeSchema(z.object({ destinations: z.array(AgentBlogPublishingDestinationSchema) }).strict());
|
|
460
|
+
var AgentBlogDeliveryAttemptListResponseSchema = successEnvelopeSchema(z.object({ deliveries: z.array(AgentBlogDeliveryAttemptSchema) }).strict());
|
|
461
|
+
var AgentBlogSetupStatusResponseSchema = successEnvelopeSchema(AgentBlogSetupStatusSchema);
|
|
462
|
+
var AgentBlogPlanItemsResponseSchema = successEnvelopeSchema(z.object({ items: z.array(AgentBlogPlanItemSchema) }).strict());
|
|
463
|
+
var AgentBlogPlanItemResponseSchema = successEnvelopeSchema(AgentBlogPlanItemSchema);
|
|
464
|
+
var AgentBlogPlanQueuedResponseSchema = successEnvelopeSchema(z.object({
|
|
465
|
+
planId: z.string().min(1),
|
|
466
|
+
job: AgentBlogJobSchema
|
|
467
|
+
}).strict());
|
|
468
|
+
var AgentBlogArticleQueuedResponseSchema = successEnvelopeSchema(z.object({
|
|
469
|
+
articleId: z.string().min(1),
|
|
470
|
+
job: AgentBlogJobSchema.nullable()
|
|
471
|
+
}).strict());
|
|
472
|
+
var AgentBlogConnectionStatusResponseSchema = successEnvelopeSchema(AgentBlogConnectionStatusSchema);
|
|
473
|
+
var AgentBlogConnectionPreviewResponseSchema = successEnvelopeSchema(AgentBlogConnectionPreviewSchema);
|
|
474
|
+
var AgentBlogConnectionExecuteResponseSchema = successEnvelopeSchema(AgentBlogConnectionExecuteSchema);
|
|
475
|
+
var AgentBlogRevalidationTestResponseSchema = successEnvelopeSchema(AgentBlogRevalidationTestSchema);
|
|
45
476
|
var CapabilitySchema = z.object({
|
|
46
477
|
id: CapabilityIdSchema,
|
|
47
478
|
available: z.boolean(),
|
|
@@ -254,9 +685,24 @@ var PublishingProviderSchema = z.enum([
|
|
|
254
685
|
"LINKEDIN"
|
|
255
686
|
]);
|
|
256
687
|
var PUBLISHING_PROVIDER_COUNT = PublishingProviderSchema.options.length;
|
|
688
|
+
var PostDeliveryModeSchema = z.enum(["IMMEDIATE", "SCHEDULED"]);
|
|
689
|
+
var PostDestinationStageSchema = z.enum([
|
|
690
|
+
"DRAFT",
|
|
691
|
+
"QUEUED",
|
|
692
|
+
"UPLOADING",
|
|
693
|
+
"PROCESSING",
|
|
694
|
+
"CONFIRMING_SCHEDULE",
|
|
695
|
+
"SCHEDULED",
|
|
696
|
+
"PUBLISHING",
|
|
697
|
+
"PUBLISHED",
|
|
698
|
+
"ACTION_REQUIRED",
|
|
699
|
+
"FAILED"
|
|
700
|
+
]);
|
|
257
701
|
var PostDestinationSchema = z.object({
|
|
258
702
|
provider: PublishingProviderSchema,
|
|
259
703
|
status: PlatformPostStatusSchema,
|
|
704
|
+
deliveryMode: PostDeliveryModeSchema,
|
|
705
|
+
stage: PostDestinationStageSchema,
|
|
260
706
|
captionOverride: z.string().nullable(),
|
|
261
707
|
scheduledAt: z.string().datetime().nullable(),
|
|
262
708
|
publishedAt: z.string().datetime().nullable(),
|
|
@@ -707,6 +1153,7 @@ var PostScheduleExecuteInputSchema = PostScheduleInputSchema.extend({
|
|
|
707
1153
|
}).strict();
|
|
708
1154
|
var PostSchedulePreviewSchema = z.object({
|
|
709
1155
|
operation: z.literal("posts.schedule.execute"),
|
|
1156
|
+
deliveryMode: z.literal("SCHEDULED"),
|
|
710
1157
|
post: z.object({
|
|
711
1158
|
id: z.string().min(1),
|
|
712
1159
|
projectId: z.string().min(1),
|
|
@@ -715,6 +1162,12 @@ var PostSchedulePreviewSchema = z.object({
|
|
|
715
1162
|
}),
|
|
716
1163
|
schedule: PostScheduleInputSchema,
|
|
717
1164
|
destinations: z.array(PublishingProviderSchema).min(1).max(PUBLISHING_PROVIDER_COUNT),
|
|
1165
|
+
youtube: z.object({
|
|
1166
|
+
uploadVisibility: z.literal("PRIVATE"),
|
|
1167
|
+
publishVisibility: z.literal("PUBLIC"),
|
|
1168
|
+
preparationStartsImmediately: z.literal(true),
|
|
1169
|
+
confirmationMeaning: z.string().min(1)
|
|
1170
|
+
}).nullable().optional(),
|
|
718
1171
|
providerReconciliation: z.object({
|
|
719
1172
|
provider: z.literal("YOUTUBE"),
|
|
720
1173
|
required: z.boolean(),
|
|
@@ -735,6 +1188,8 @@ var PostSchedulePendingSchema = z.object({
|
|
|
735
1188
|
provider: z.literal("YOUTUBE"),
|
|
736
1189
|
mutationId: z.string().min(1),
|
|
737
1190
|
operation: z.enum(["SCHEDULE", "CANCEL"]),
|
|
1191
|
+
phase: z.literal("REMOTE_SCHEDULE_CONFIRMATION"),
|
|
1192
|
+
videoUploaded: z.literal(true),
|
|
738
1193
|
message: z.string().min(1)
|
|
739
1194
|
});
|
|
740
1195
|
var PostScheduleExecuteResultSchema = z.union([
|
|
@@ -755,6 +1210,7 @@ var PostPublishExecuteInputSchema = PostPublishInputSchema.extend({
|
|
|
755
1210
|
}).strict();
|
|
756
1211
|
var PostPublishPreviewSchema = z.object({
|
|
757
1212
|
operation: z.literal("posts.publish.execute"),
|
|
1213
|
+
deliveryMode: z.literal("IMMEDIATE"),
|
|
758
1214
|
post: z.object({
|
|
759
1215
|
id: z.string().min(1),
|
|
760
1216
|
projectId: z.string().min(1),
|
|
@@ -762,6 +1218,11 @@ var PostPublishPreviewSchema = z.object({
|
|
|
762
1218
|
status: PostStatusSchema
|
|
763
1219
|
}),
|
|
764
1220
|
destinations: PostPublishInputSchema.shape.destinations,
|
|
1221
|
+
youtube: z.object({
|
|
1222
|
+
visibility: YouTubePostSettingsSchema.shape.privacyStatus,
|
|
1223
|
+
preparationStartsImmediately: z.literal(true),
|
|
1224
|
+
createsSchedule: z.literal(false)
|
|
1225
|
+
}).nullable().optional(),
|
|
765
1226
|
readiness: PostReadinessSchema,
|
|
766
1227
|
confirmation: z.object({
|
|
767
1228
|
token: z.string().min(1),
|
|
@@ -834,14 +1295,358 @@ var CalendarListDataSchema = z.object({
|
|
|
834
1295
|
var CalendarListResponseSchema = successEnvelopeSchema(
|
|
835
1296
|
CalendarListDataSchema
|
|
836
1297
|
);
|
|
1298
|
+
var SeoEntityIdSchema = z.string().min(1).max(128).regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/);
|
|
1299
|
+
var SeoCursorSchema = z.string().min(1).max(512).regex(/^[A-Za-z0-9_-]+$/);
|
|
1300
|
+
var SeoOpportunityKindSchema = z.enum([
|
|
1301
|
+
"SEARCH_TOPIC_CTR",
|
|
1302
|
+
"SEARCH_TOPIC_REFRESH",
|
|
1303
|
+
"SEARCH_TOPIC_NEW_ARTICLE",
|
|
1304
|
+
"SEARCH_TOPIC_CONSOLIDATE",
|
|
1305
|
+
"SEARCH_TOPIC_CLUSTER",
|
|
1306
|
+
"COMPETITOR_KEYWORD_GAP",
|
|
1307
|
+
"COMPETITOR_RANK_GAIN",
|
|
1308
|
+
"COMPETITOR_RANK_DROP",
|
|
1309
|
+
"COMPETITOR_SHARED_GAP",
|
|
1310
|
+
"SEO_VALIDATED_COMPETITOR_GAP"
|
|
1311
|
+
]);
|
|
1312
|
+
var SeoExpectedImpactSchema = z.enum(["HIGH", "MEDIUM", "LOW"]);
|
|
1313
|
+
var SeoEvidenceProvenanceSchema = z.enum([
|
|
1314
|
+
"CUSTOMER_SEARCH_DATA",
|
|
1315
|
+
"MARKET_ESTIMATE",
|
|
1316
|
+
"ROLINO_ANALYSIS"
|
|
1317
|
+
]);
|
|
1318
|
+
var SeoEvidenceSchema = z.object({
|
|
1319
|
+
title: z.string().min(1).max(180),
|
|
1320
|
+
summary: z.string().min(1).max(500),
|
|
1321
|
+
sourceUrl: z.string().url().max(2048).nullable(),
|
|
1322
|
+
provenance: SeoEvidenceProvenanceSchema,
|
|
1323
|
+
observedAt: z.string().datetime(),
|
|
1324
|
+
periodStart: z.string().datetime().nullable(),
|
|
1325
|
+
periodEnd: z.string().datetime().nullable(),
|
|
1326
|
+
metrics: z.record(
|
|
1327
|
+
z.string().regex(/^[A-Za-z][A-Za-z0-9]{0,39}$/),
|
|
1328
|
+
z.number().finite()
|
|
1329
|
+
).refine((metrics) => Object.keys(metrics).length <= 20, {
|
|
1330
|
+
message: "SEO evidence can contain at most 20 metrics."
|
|
1331
|
+
}),
|
|
1332
|
+
estimated: z.boolean(),
|
|
1333
|
+
topRowsOnly: z.boolean(),
|
|
1334
|
+
coverageNote: z.string().max(500).nullable()
|
|
1335
|
+
}).strict();
|
|
1336
|
+
var SeoActionDecisionSchema = z.enum(["READY", "NEEDS_REVIEW", "REJECTED"]);
|
|
1337
|
+
var SeoSearchIntentSchema = z.enum(["INFORMATIONAL", "COMMERCIAL", "NAVIGATIONAL", "BRANDED", "SUSPICIOUS"]);
|
|
1338
|
+
var SeoContentTypeSchema = z.enum(["GUIDE", "TUTORIAL", "COMPARISON_PAGE", "LANDING_PAGE", "CONTENT_REFRESH"]);
|
|
1339
|
+
var SeoActionPlanSchema = z.object({
|
|
1340
|
+
version: z.number().int().positive(),
|
|
1341
|
+
decision: SeoActionDecisionSchema,
|
|
1342
|
+
decisionReason: z.string().min(1).max(500),
|
|
1343
|
+
searchIntent: SeoSearchIntentSchema,
|
|
1344
|
+
primaryKeyword: z.string().min(1).max(300),
|
|
1345
|
+
supportingKeywords: z.array(z.string().min(1).max(300)).max(12),
|
|
1346
|
+
questions: z.array(z.string().min(1).max(300)).max(8),
|
|
1347
|
+
contentType: SeoContentTypeSchema,
|
|
1348
|
+
suggestedTitle: z.string().min(1).max(180),
|
|
1349
|
+
angle: z.string().max(500),
|
|
1350
|
+
targetReader: z.string().min(1).max(500),
|
|
1351
|
+
pageGoal: z.string().max(500),
|
|
1352
|
+
outline: z.array(z.object({
|
|
1353
|
+
heading: z.string().min(1).max(180),
|
|
1354
|
+
purpose: z.string().min(1).max(500)
|
|
1355
|
+
}).strict()).max(10),
|
|
1356
|
+
rolinoConnection: z.string().max(600),
|
|
1357
|
+
cta: z.string().max(300),
|
|
1358
|
+
competitorPages: z.array(z.object({
|
|
1359
|
+
domain: z.string().min(1).max(253),
|
|
1360
|
+
url: z.string().url().nullable(),
|
|
1361
|
+
keyword: z.string().min(1).max(300),
|
|
1362
|
+
rank: z.number().min(1).max(1e3).nullable()
|
|
1363
|
+
}).strict()).max(8),
|
|
1364
|
+
existingPage: z.object({
|
|
1365
|
+
title: z.string().min(1).max(180),
|
|
1366
|
+
url: z.string().url()
|
|
1367
|
+
}).strict().nullable(),
|
|
1368
|
+
warnings: z.array(z.string().min(1).max(500)).max(8),
|
|
1369
|
+
researchTasks: z.array(z.string().min(1).max(500)).max(8),
|
|
1370
|
+
cluster: z.object({
|
|
1371
|
+
competitorDomains: z.array(z.string().min(1).max(253)).max(3),
|
|
1372
|
+
bestRank: z.number().min(1).max(1e3).nullable(),
|
|
1373
|
+
estimatedDemand: z.number().min(0).nullable(),
|
|
1374
|
+
firstPartyValidated: z.boolean(),
|
|
1375
|
+
relevanceScore: z.number().min(0).max(1),
|
|
1376
|
+
coverage: z.string().max(500)
|
|
1377
|
+
}).strict()
|
|
1378
|
+
}).strict();
|
|
1379
|
+
var SeoTaskDecisionSchema = z.enum(["READY", "NEEDS_REVIEW", "REJECTED"]);
|
|
1380
|
+
var SeoTaskFormatSchema = z.enum([
|
|
1381
|
+
"BLOG_ARTICLE",
|
|
1382
|
+
"PRODUCT_LANDING_PAGE",
|
|
1383
|
+
"COMPARISON_PAGE",
|
|
1384
|
+
"EXISTING_PAGE_REFRESH",
|
|
1385
|
+
"YOUTUBE_PRODUCTION_PACKAGE",
|
|
1386
|
+
"SOCIAL_CAMPAIGN",
|
|
1387
|
+
"LINK_OUTREACH_TASK",
|
|
1388
|
+
"RESEARCH_TASK"
|
|
1389
|
+
]);
|
|
1390
|
+
var SeoConfidenceValueSchema = z.object({
|
|
1391
|
+
score: z.number().int().min(0).max(100).nullable(),
|
|
1392
|
+
level: z.enum(["HIGH", "MEDIUM", "LOW", "UNCONFIRMED"]),
|
|
1393
|
+
label: z.string().min(1).max(120),
|
|
1394
|
+
explanation: z.string().min(1).max(500)
|
|
1395
|
+
}).strict();
|
|
1396
|
+
var SeoDecisionConfidenceSchema = z.object({
|
|
1397
|
+
topicRelevance: SeoConfidenceValueSchema,
|
|
1398
|
+
actionReadiness: SeoConfidenceValueSchema
|
|
1399
|
+
}).strict();
|
|
1400
|
+
var SeoTaskEvidenceSummarySchema = z.object({
|
|
1401
|
+
title: z.string().min(1).max(180),
|
|
1402
|
+
summary: z.string().min(1).max(500),
|
|
1403
|
+
provenance: SeoEvidenceProvenanceSchema,
|
|
1404
|
+
observedAt: z.string().datetime(),
|
|
1405
|
+
sourceUrl: z.string().url().max(2048).nullable()
|
|
1406
|
+
}).strict();
|
|
1407
|
+
var SeoAgentTaskSchema = z.object({
|
|
1408
|
+
schemaVersion: z.number().int().positive(),
|
|
1409
|
+
projectId: SeoEntityIdSchema.nullable(),
|
|
1410
|
+
opportunityId: SeoEntityIdSchema.nullable(),
|
|
1411
|
+
legacy: z.boolean(),
|
|
1412
|
+
legacyLabel: z.string().max(500).nullable(),
|
|
1413
|
+
decision: SeoTaskDecisionSchema,
|
|
1414
|
+
decisionReason: z.string().min(1).max(700),
|
|
1415
|
+
objective: z.string().min(1).max(700),
|
|
1416
|
+
primaryFormat: SeoTaskFormatSchema,
|
|
1417
|
+
supportingFormats: z.array(SeoTaskFormatSchema).max(4),
|
|
1418
|
+
formatOptions: z.array(SeoTaskFormatSchema.exclude(["RESEARCH_TASK"])).max(7),
|
|
1419
|
+
confidence: SeoDecisionConfidenceSchema,
|
|
1420
|
+
target: z.object({
|
|
1421
|
+
primaryKeyword: z.string().min(1).max(300),
|
|
1422
|
+
supportingKeywords: z.array(z.string().min(1).max(300)).max(12),
|
|
1423
|
+
searchIntent: SeoSearchIntentSchema,
|
|
1424
|
+
audience: z.string().min(1).max(500),
|
|
1425
|
+
angle: z.string().max(600)
|
|
1426
|
+
}).strict(),
|
|
1427
|
+
suggestedTitles: z.array(z.string().min(1).max(180)).max(3),
|
|
1428
|
+
outline: z.array(z.object({
|
|
1429
|
+
heading: z.string().min(1).max(180),
|
|
1430
|
+
purpose: z.string().min(1).max(600)
|
|
1431
|
+
}).strict()).max(12),
|
|
1432
|
+
researchTasks: z.array(z.string().min(1).max(600)).max(10),
|
|
1433
|
+
competitorPagesToInspect: z.array(z.object({
|
|
1434
|
+
domain: z.string().min(1).max(253),
|
|
1435
|
+
url: z.string().url().max(2048).nullable(),
|
|
1436
|
+
keyword: z.string().min(1).max(300),
|
|
1437
|
+
rank: z.number().int().min(1).max(1e3).nullable()
|
|
1438
|
+
}).strict()).max(8),
|
|
1439
|
+
productFactsToVerify: z.array(z.string().min(1).max(600)).max(8),
|
|
1440
|
+
claimsNotToInvent: z.array(z.string().min(1).max(600)).max(8),
|
|
1441
|
+
deliverables: z.array(z.object({
|
|
1442
|
+
name: z.string().min(1).max(180),
|
|
1443
|
+
requirements: z.array(z.string().min(1).max(600)).min(1).max(8)
|
|
1444
|
+
}).strict()).min(1).max(12),
|
|
1445
|
+
callToAction: z.string().max(400),
|
|
1446
|
+
destination: z.string().min(1).max(700),
|
|
1447
|
+
successMetric: z.object({
|
|
1448
|
+
name: z.string().min(1).max(180),
|
|
1449
|
+
target: z.string().min(1).max(600),
|
|
1450
|
+
measurementWindow: z.string().min(1).max(300)
|
|
1451
|
+
}).strict(),
|
|
1452
|
+
evidenceSummary: z.array(SeoTaskEvidenceSummarySchema).max(5),
|
|
1453
|
+
limitations: z.array(z.string().min(1).max(600)).max(10),
|
|
1454
|
+
nextStep: z.string().min(1).max(700),
|
|
1455
|
+
youtubePackageRequirements: z.object({
|
|
1456
|
+
subject: z.string().min(1).max(300),
|
|
1457
|
+
targetViewer: z.string().min(1).max(500),
|
|
1458
|
+
objective: z.string().min(1).max(700),
|
|
1459
|
+
titleOptions: z.number().int().min(1).max(10),
|
|
1460
|
+
hook: z.string().min(1).max(600),
|
|
1461
|
+
draftScript: z.string().min(1).max(600),
|
|
1462
|
+
sceneList: z.string().min(1).max(600),
|
|
1463
|
+
onScreenText: z.string().min(1).max(600),
|
|
1464
|
+
thumbnailConcept: z.string().min(1).max(600),
|
|
1465
|
+
thumbnailText: z.string().min(1).max(300),
|
|
1466
|
+
description: z.string().min(1).max(600),
|
|
1467
|
+
chapters: z.string().min(1).max(600),
|
|
1468
|
+
callToAction: z.string().max(400),
|
|
1469
|
+
supportingSocialPosts: z.number().int().min(0).max(10)
|
|
1470
|
+
}).strict().nullable(),
|
|
1471
|
+
imageBriefs: z.array(z.object({
|
|
1472
|
+
concept: z.string().min(1).max(600),
|
|
1473
|
+
brief: z.string().min(1).max(800),
|
|
1474
|
+
altText: z.string().min(1).max(500),
|
|
1475
|
+
prompt: z.string().min(1).max(1e3)
|
|
1476
|
+
}).strict()).max(4)
|
|
1477
|
+
}).strict();
|
|
1478
|
+
var SeoOpportunityBriefSchema = z.object({
|
|
1479
|
+
kind: SeoOpportunityKindSchema,
|
|
1480
|
+
title: z.string().min(1).max(180),
|
|
1481
|
+
summary: z.string().min(1).max(600),
|
|
1482
|
+
score: z.number().int().min(0).max(100),
|
|
1483
|
+
confidence: SeoDecisionConfidenceSchema,
|
|
1484
|
+
expectedImpact: SeoExpectedImpactSchema,
|
|
1485
|
+
recommendedAction: z.string().min(1).max(300),
|
|
1486
|
+
actionPlan: SeoActionPlanSchema,
|
|
1487
|
+
task: SeoAgentTaskSchema,
|
|
1488
|
+
evidence: z.array(SeoEvidenceSchema).max(5),
|
|
1489
|
+
brief: z.string().min(1).max(12e3)
|
|
1490
|
+
}).strict();
|
|
1491
|
+
var SeoOpportunitySchema = SeoOpportunityBriefSchema.extend({
|
|
1492
|
+
id: SeoEntityIdSchema,
|
|
1493
|
+
projectId: SeoEntityIdSchema,
|
|
1494
|
+
lastDetectedAt: z.string().datetime(),
|
|
1495
|
+
stale: z.boolean()
|
|
1496
|
+
}).strict();
|
|
1497
|
+
var SeoOpportunityListQuerySchema = z.object({
|
|
1498
|
+
limit: z.coerce.number().int().min(1).max(50).default(20),
|
|
1499
|
+
cursor: SeoCursorSchema.optional(),
|
|
1500
|
+
kind: SeoOpportunityKindSchema.optional(),
|
|
1501
|
+
expectedImpact: SeoExpectedImpactSchema.optional()
|
|
1502
|
+
}).strict();
|
|
1503
|
+
var SeoPageSchema = z.object({
|
|
1504
|
+
limit: z.number().int().min(1).max(50),
|
|
1505
|
+
nextCursor: SeoCursorSchema.nullable()
|
|
1506
|
+
}).strict();
|
|
1507
|
+
var SeoOpportunityListDataSchema = z.object({
|
|
1508
|
+
items: z.array(SeoOpportunitySchema).max(50),
|
|
1509
|
+
page: SeoPageSchema
|
|
1510
|
+
}).strict();
|
|
1511
|
+
var SeoOpportunityListResponseSchema = successEnvelopeSchema(
|
|
1512
|
+
SeoOpportunityListDataSchema
|
|
1513
|
+
);
|
|
1514
|
+
var SeoOpportunityResponseSchema = successEnvelopeSchema(
|
|
1515
|
+
SeoOpportunitySchema
|
|
1516
|
+
);
|
|
1517
|
+
var SeoReportCompletenessSchema = z.enum(["COMPLETE", "PARTIAL"]);
|
|
1518
|
+
var SeoReportTriggerSchema = z.enum(["SCHEDULED", "MANUAL"]);
|
|
1519
|
+
var SeoReportSummarySchema = z.object({
|
|
1520
|
+
id: SeoEntityIdSchema,
|
|
1521
|
+
projectId: SeoEntityIdSchema,
|
|
1522
|
+
periodStart: z.string().datetime(),
|
|
1523
|
+
periodEnd: z.string().datetime(),
|
|
1524
|
+
timeZone: z.string().min(1).max(100),
|
|
1525
|
+
deliveryDay: z.number().int().min(1).max(7),
|
|
1526
|
+
completeness: SeoReportCompletenessSchema,
|
|
1527
|
+
trigger: SeoReportTriggerSchema,
|
|
1528
|
+
createdAt: z.string().datetime(),
|
|
1529
|
+
opportunityCount: z.number().int().min(0).max(5),
|
|
1530
|
+
readyTaskCount: z.number().int().min(0).max(5),
|
|
1531
|
+
researchTaskCount: z.number().int().min(0).max(5),
|
|
1532
|
+
rejectedFindingCount: z.number().int().min(0).max(20),
|
|
1533
|
+
legacy: z.boolean()
|
|
1534
|
+
}).strict();
|
|
1535
|
+
var SeoReportSchema = SeoReportSummarySchema.extend({
|
|
1536
|
+
generatedAt: z.string().datetime(),
|
|
1537
|
+
partialLabel: z.string().max(500).nullable(),
|
|
1538
|
+
freshThrough: z.string().datetime().nullable(),
|
|
1539
|
+
opportunities: z.array(SeoOpportunityBriefSchema).max(5),
|
|
1540
|
+
rejectedFindings: z.array(z.object({
|
|
1541
|
+
decision: z.literal("REJECTED"),
|
|
1542
|
+
query: z.string().min(1).max(300),
|
|
1543
|
+
reason: z.string().min(1).max(700),
|
|
1544
|
+
observedAt: z.string().datetime()
|
|
1545
|
+
}).strict()).max(20)
|
|
1546
|
+
}).strict();
|
|
1547
|
+
var SeoReportListQuerySchema = z.object({
|
|
1548
|
+
limit: z.coerce.number().int().min(1).max(26).default(10),
|
|
1549
|
+
cursor: SeoCursorSchema.optional(),
|
|
1550
|
+
completeness: SeoReportCompletenessSchema.optional()
|
|
1551
|
+
}).strict();
|
|
1552
|
+
var SeoReportListDataSchema = z.object({
|
|
1553
|
+
items: z.array(SeoReportSummarySchema).max(26),
|
|
1554
|
+
page: SeoPageSchema.extend({
|
|
1555
|
+
limit: z.number().int().min(1).max(26)
|
|
1556
|
+
}).strict()
|
|
1557
|
+
}).strict();
|
|
1558
|
+
var SeoReportListResponseSchema = successEnvelopeSchema(
|
|
1559
|
+
SeoReportListDataSchema
|
|
1560
|
+
);
|
|
1561
|
+
var SeoReportResponseSchema = successEnvelopeSchema(SeoReportSchema);
|
|
837
1562
|
export {
|
|
838
1563
|
API_VERSION,
|
|
839
1564
|
ActorSchema,
|
|
1565
|
+
AgentBlogApprovalExecuteRequestSchema,
|
|
1566
|
+
AgentBlogApprovalExecuteResponseSchema,
|
|
1567
|
+
AgentBlogApprovalExecuteSchema,
|
|
1568
|
+
AgentBlogApprovalImageSummarySchema,
|
|
1569
|
+
AgentBlogApprovalLinkSummarySchema,
|
|
1570
|
+
AgentBlogApprovalPreviewRequestSchema,
|
|
1571
|
+
AgentBlogApprovalPreviewResponseSchema,
|
|
1572
|
+
AgentBlogApprovalPreviewSchema,
|
|
1573
|
+
AgentBlogArticleCreateRequestSchema,
|
|
1574
|
+
AgentBlogArticleDetailSchema,
|
|
1575
|
+
AgentBlogArticleListResponseSchema,
|
|
1576
|
+
AgentBlogArticleQueuedResponseSchema,
|
|
1577
|
+
AgentBlogArticleResponseSchema,
|
|
1578
|
+
AgentBlogArticleSchema,
|
|
1579
|
+
AgentBlogCadenceInputSchema,
|
|
1580
|
+
AgentBlogConnectionExecuteRequestSchema,
|
|
1581
|
+
AgentBlogConnectionExecuteResponseSchema,
|
|
1582
|
+
AgentBlogConnectionExecuteSchema,
|
|
1583
|
+
AgentBlogConnectionPreviewRequestSchema,
|
|
1584
|
+
AgentBlogConnectionPreviewResponseSchema,
|
|
1585
|
+
AgentBlogConnectionPreviewSchema,
|
|
1586
|
+
AgentBlogConnectionRequestSchema,
|
|
1587
|
+
AgentBlogConnectionStatusResponseSchema,
|
|
1588
|
+
AgentBlogConnectionStatusSchema,
|
|
1589
|
+
AgentBlogDeliveryAttemptListResponseSchema,
|
|
1590
|
+
AgentBlogDeliveryAttemptSchema,
|
|
1591
|
+
AgentBlogDestinationSelectionSchema,
|
|
1592
|
+
AgentBlogDraftUpdateSchema,
|
|
1593
|
+
AgentBlogGenerateRequestSchema,
|
|
1594
|
+
AgentBlogIdempotentRequestSchema,
|
|
1595
|
+
AgentBlogImageGenerateRequestSchema,
|
|
1596
|
+
AgentBlogImageGenerationResponseSchema,
|
|
1597
|
+
AgentBlogImageResponseSchema,
|
|
1598
|
+
AgentBlogImageReviewRequestSchema,
|
|
1599
|
+
AgentBlogImageSchema,
|
|
1600
|
+
AgentBlogImageUploadCompleteRequestSchema,
|
|
1601
|
+
AgentBlogImageUploadPreparationResponseSchema,
|
|
1602
|
+
AgentBlogImageUploadPrepareRequestSchema,
|
|
1603
|
+
AgentBlogJobResponseSchema,
|
|
1604
|
+
AgentBlogJobSchema,
|
|
1605
|
+
AgentBlogPlanCreateRequestSchema,
|
|
1606
|
+
AgentBlogPlanItemResponseSchema,
|
|
1607
|
+
AgentBlogPlanItemSchema,
|
|
1608
|
+
AgentBlogPlanItemStateRequestSchema,
|
|
1609
|
+
AgentBlogPlanItemsResponseSchema,
|
|
1610
|
+
AgentBlogPlanListResponseSchema,
|
|
1611
|
+
AgentBlogPlanQueuedResponseSchema,
|
|
1612
|
+
AgentBlogPlanRetryRequestSchema,
|
|
1613
|
+
AgentBlogPlanSchema,
|
|
1614
|
+
AgentBlogPublishExecuteRequestSchema,
|
|
1615
|
+
AgentBlogPublishExecuteResponseSchema,
|
|
1616
|
+
AgentBlogPublishPreviewRequestSchema,
|
|
1617
|
+
AgentBlogPublishPreviewResponseSchema,
|
|
1618
|
+
AgentBlogPublishPreviewSchema,
|
|
1619
|
+
AgentBlogPublishingDestinationListResponseSchema,
|
|
1620
|
+
AgentBlogPublishingDestinationSchema,
|
|
1621
|
+
AgentBlogPublishingProviderListResponseSchema,
|
|
1622
|
+
AgentBlogPublishingProviderSchema,
|
|
1623
|
+
AgentBlogRevalidationTestRequestSchema,
|
|
1624
|
+
AgentBlogRevalidationTestResponseSchema,
|
|
1625
|
+
AgentBlogRevalidationTestSchema,
|
|
1626
|
+
AgentBlogScheduleCancelExecuteRequestSchema,
|
|
1627
|
+
AgentBlogScheduleCancelExecuteResponseSchema,
|
|
1628
|
+
AgentBlogScheduleCancelExecuteSchema,
|
|
1629
|
+
AgentBlogScheduleCancelPreviewRequestSchema,
|
|
1630
|
+
AgentBlogScheduleCancelPreviewResponseSchema,
|
|
1631
|
+
AgentBlogScheduleCancelPreviewSchema,
|
|
1632
|
+
AgentBlogScheduleExecuteRequestSchema,
|
|
1633
|
+
AgentBlogScheduleExecuteResponseSchema,
|
|
1634
|
+
AgentBlogScheduleExecuteSchema,
|
|
1635
|
+
AgentBlogSchedulePreviewRequestSchema,
|
|
1636
|
+
AgentBlogSchedulePreviewResponseSchema,
|
|
1637
|
+
AgentBlogSchedulePreviewSchema,
|
|
1638
|
+
AgentBlogSetupStatusResponseSchema,
|
|
1639
|
+
AgentBlogSetupStatusSchema,
|
|
840
1640
|
ApiErrorCodeSchema,
|
|
841
1641
|
ApiMetaResponseSchema,
|
|
842
1642
|
ApiMetaSchema,
|
|
843
1643
|
ApiProblemSchema,
|
|
844
1644
|
AuthenticationKindSchema,
|
|
1645
|
+
BlogArticleListSchema,
|
|
1646
|
+
BlogImageSchema,
|
|
1647
|
+
BlogMetadataSchema,
|
|
1648
|
+
BlogSitemapEntrySchema,
|
|
1649
|
+
BlogSlugRedirectSchema,
|
|
845
1650
|
CLI_BROWSER_AUTHORIZATION_TIMEOUT_MS,
|
|
846
1651
|
CONTRACT_VERSION,
|
|
847
1652
|
CalendarEventSchema,
|
|
@@ -875,7 +1680,9 @@ export {
|
|
|
875
1680
|
MediaAssetUploadPreparationSchema,
|
|
876
1681
|
PUBLISHING_PROVIDER_COUNT,
|
|
877
1682
|
PlatformPostStatusSchema,
|
|
1683
|
+
PostDeliveryModeSchema,
|
|
878
1684
|
PostDestinationSchema,
|
|
1685
|
+
PostDestinationStageSchema,
|
|
879
1686
|
PostListDataSchema,
|
|
880
1687
|
PostListQuerySchema,
|
|
881
1688
|
PostListResponseSchema,
|
|
@@ -909,10 +1716,40 @@ export {
|
|
|
909
1716
|
ProviderDeliveryOptionsResponseSchema,
|
|
910
1717
|
ProviderDeliveryOptionsSchema,
|
|
911
1718
|
ProviderHealthStatusSchema,
|
|
1719
|
+
PublishedBlogArticleSchema,
|
|
912
1720
|
PublishingProviderSchema,
|
|
913
1721
|
ReadinessActionSchema,
|
|
914
1722
|
ReadinessStatusSchema,
|
|
915
1723
|
RequestMetadataSchema,
|
|
1724
|
+
SeoActionDecisionSchema,
|
|
1725
|
+
SeoActionPlanSchema,
|
|
1726
|
+
SeoAgentTaskSchema,
|
|
1727
|
+
SeoConfidenceValueSchema,
|
|
1728
|
+
SeoContentTypeSchema,
|
|
1729
|
+
SeoCursorSchema,
|
|
1730
|
+
SeoDecisionConfidenceSchema,
|
|
1731
|
+
SeoEntityIdSchema,
|
|
1732
|
+
SeoEvidenceProvenanceSchema,
|
|
1733
|
+
SeoEvidenceSchema,
|
|
1734
|
+
SeoExpectedImpactSchema,
|
|
1735
|
+
SeoOpportunityBriefSchema,
|
|
1736
|
+
SeoOpportunityKindSchema,
|
|
1737
|
+
SeoOpportunityListDataSchema,
|
|
1738
|
+
SeoOpportunityListQuerySchema,
|
|
1739
|
+
SeoOpportunityListResponseSchema,
|
|
1740
|
+
SeoOpportunityResponseSchema,
|
|
1741
|
+
SeoOpportunitySchema,
|
|
1742
|
+
SeoReportCompletenessSchema,
|
|
1743
|
+
SeoReportListDataSchema,
|
|
1744
|
+
SeoReportListQuerySchema,
|
|
1745
|
+
SeoReportListResponseSchema,
|
|
1746
|
+
SeoReportResponseSchema,
|
|
1747
|
+
SeoReportSchema,
|
|
1748
|
+
SeoReportSummarySchema,
|
|
1749
|
+
SeoReportTriggerSchema,
|
|
1750
|
+
SeoSearchIntentSchema,
|
|
1751
|
+
SeoTaskDecisionSchema,
|
|
1752
|
+
SeoTaskFormatSchema,
|
|
916
1753
|
TikTokDeliveryOptionsSchema,
|
|
917
1754
|
TikTokDraftSettingsSchema,
|
|
918
1755
|
TikTokPostSettingsSchema,
|