@rolino/contracts 0.5.0-beta.0 → 0.6.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/dist/index.js CHANGED
@@ -1,13 +1,14 @@
1
1
  // src/index.ts
2
2
  import { z } from "zod";
3
3
  var API_VERSION = "v1";
4
- var CONTRACT_VERSION = "0.16.0";
4
+ var CONTRACT_VERSION = "0.17.0";
5
5
  var RequestMetadataSchema = z.object({
6
6
  requestId: z.string().min(1)
7
7
  });
8
8
  var ApiErrorCodeSchema = z.enum([
9
9
  "AUTH_REQUIRED",
10
10
  "FORBIDDEN",
11
+ "METHOD_NOT_ALLOWED",
11
12
  "NOT_FOUND",
12
13
  "FEATURE_DISABLED",
13
14
  "BILLING_REQUIRED",
@@ -26,6 +27,9 @@ var ApiProblemSchema = z.object({
26
27
  error: z.object({
27
28
  code: ApiErrorCodeSchema,
28
29
  message: z.string().min(1),
30
+ // Optional while clients can still communicate with older Rolino deployments.
31
+ // Current servers include this field on every API problem response.
32
+ resolution: z.string().min(1).optional(),
29
33
  details: z.record(z.string(), z.unknown()).optional()
30
34
  }),
31
35
  meta: RequestMetadataSchema
@@ -94,10 +98,12 @@ var CapabilityIdSchema = z.enum([
94
98
  "blog:read",
95
99
  "blog:write",
96
100
  "blog:manage",
101
+ "blog:approve",
97
102
  "blog:publish"
98
103
  ]);
99
104
  var AgentBlogPlanSchema = z.object({
100
105
  id: z.string().min(1),
106
+ version: z.number().int().positive(),
101
107
  state: z.string().min(1),
102
108
  windowStart: z.string().datetime(),
103
109
  windowEnd: z.string().datetime(),
@@ -116,6 +122,21 @@ var AgentBlogArticleSchema = z.object({
116
122
  scheduledPublishAt: z.string().datetime().nullable(),
117
123
  updatedAt: z.string().datetime()
118
124
  });
125
+ var AgentBlogImageSchema = z.object({
126
+ id: z.string().min(1),
127
+ revisionId: z.string().nullable(),
128
+ version: z.number().int().positive(),
129
+ purpose: z.enum(["FEATURED", "SECTION", "SOCIAL_PREVIEW"]),
130
+ source: z.enum(["GENERATED", "AGENT_UPLOAD"]),
131
+ state: z.enum(["QUEUED", "GENERATING", "READY_FOR_REVIEW", "APPROVED", "REJECTED", "FAILED"]),
132
+ publicUrl: z.string().url().nullable(),
133
+ mimeType: z.enum(["image/jpeg", "image/png", "image/webp"]).nullable(),
134
+ width: z.number().int().positive().nullable(),
135
+ height: z.number().int().positive().nullable(),
136
+ altText: z.string().nullable(),
137
+ caption: z.string().nullable(),
138
+ createdAt: z.string().datetime()
139
+ }).strict();
119
140
  var AgentBlogArticleDetailSchema = AgentBlogArticleSchema.extend({
120
141
  draft: z.object({
121
142
  id: z.string().min(1),
@@ -132,7 +153,8 @@ var AgentBlogArticleDetailSchema = AgentBlogArticleSchema.extend({
132
153
  callToAction: z.unknown().nullable(),
133
154
  internalLinks: z.unknown()
134
155
  }).nullable(),
135
- 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() }))
156
+ 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() })),
157
+ images: z.array(AgentBlogImageSchema)
136
158
  });
137
159
  var AgentBlogJobSchema = z.object({
138
160
  id: z.string().min(1),
@@ -161,13 +183,126 @@ var AgentBlogDraftUpdateSchema = z.object({
161
183
  scheduledPublishAt: z.string().datetime().nullable().optional()
162
184
  });
163
185
  var AgentBlogGenerateRequestSchema = z.object({ idempotencyKey: z.string().trim().min(8).max(200) });
186
+ var AgentBlogImageGenerateRequestSchema = z.object({
187
+ revisionId: z.string().min(1),
188
+ idempotencyKey: z.string().trim().min(8).max(200),
189
+ editorialBrief: z.string().trim().max(500).optional()
190
+ }).strict();
191
+ var AgentBlogImageUploadPrepareRequestSchema = z.object({
192
+ revisionId: z.string().min(1),
193
+ fileName: z.string().trim().min(1).max(255),
194
+ contentType: z.enum(["image/jpeg", "image/png", "image/webp"]),
195
+ fileSize: z.number().int().positive().max(25 * 1024 * 1024)
196
+ }).strict();
197
+ var AgentBlogImageUploadCompleteRequestSchema = AgentBlogImageUploadPrepareRequestSchema.extend({
198
+ storageKey: z.string().min(1).max(1024),
199
+ altText: z.string().trim().min(1).max(300)
200
+ }).strict();
201
+ var AgentBlogImageReviewRequestSchema = z.object({
202
+ expectedVersion: z.number().int().positive(),
203
+ decision: z.enum(["APPROVED", "REJECTED"]),
204
+ altText: z.string().max(300),
205
+ idempotencyKey: z.string().trim().min(8).max(200)
206
+ }).strict();
207
+ var AgentBlogApprovalPreviewRequestSchema = z.object({ revisionId: z.string().min(1) }).strict();
208
+ var AgentBlogApprovalExecuteRequestSchema = AgentBlogApprovalPreviewRequestSchema.extend({
209
+ confirmationToken: z.string().min(1),
210
+ idempotencyKey: z.string().trim().min(8).max(200)
211
+ }).strict();
212
+ var AgentBlogApprovalImageSummarySchema = z.object({
213
+ id: z.string(),
214
+ purpose: z.enum(["FEATURED", "SECTION", "SOCIAL_PREVIEW"]),
215
+ contentPosition: z.string().nullable(),
216
+ width: z.number().int().positive(),
217
+ height: z.number().int().positive(),
218
+ mimeType: z.enum(["image/jpeg", "image/png", "image/webp"]),
219
+ altText: z.string().min(1),
220
+ caption: z.string().nullable(),
221
+ version: z.number().int().positive()
222
+ }).strict();
223
+ var AgentBlogApprovalLinkSummarySchema = z.object({
224
+ pageId: z.string(),
225
+ liveState: z.enum(["LIVE", "REDIRECT"])
226
+ }).strict();
227
+ var AgentBlogApprovalPreviewSchema = z.object({
228
+ articleId: z.string(),
229
+ revisionId: z.string(),
230
+ title: z.string(),
231
+ slug: z.string(),
232
+ revisionNumber: z.number().int().positive(),
233
+ contentHash: z.string(),
234
+ images: z.array(AgentBlogApprovalImageSummarySchema),
235
+ links: z.array(AgentBlogApprovalLinkSummarySchema),
236
+ warnings: z.array(z.string()),
237
+ bundleHash: z.string().regex(/^[a-f0-9]{64}$/),
238
+ confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }).strict()
239
+ }).strict();
240
+ var AgentBlogApprovalExecuteSchema = AgentBlogApprovalPreviewSchema.omit({ confirmation: true }).extend({
241
+ approvalSource: z.literal("AGENT"),
242
+ approvedAt: z.string().datetime()
243
+ }).strict();
164
244
  var AgentBlogDestinationSelectionSchema = z.array(z.string().min(1)).min(1).max(20);
245
+ var AgentBlogIanaTimeZoneSchema = z.string().trim().min(1).max(100).refine((timeZone) => {
246
+ try {
247
+ new Intl.DateTimeFormat("en", { timeZone }).format();
248
+ return true;
249
+ } catch {
250
+ return false;
251
+ }
252
+ }, "timezone must be a valid IANA timezone");
253
+ var AgentBlogSchedulePreviewRequestSchema = z.object({
254
+ revisionId: z.string().min(1),
255
+ destinationIds: AgentBlogDestinationSelectionSchema.optional(),
256
+ scheduledAt: z.string().datetime({ offset: true }),
257
+ timezone: AgentBlogIanaTimeZoneSchema
258
+ }).strict();
259
+ var AgentBlogScheduleExecuteRequestSchema = AgentBlogSchedulePreviewRequestSchema.extend({
260
+ confirmationToken: z.string().min(1),
261
+ idempotencyKey: z.string().trim().min(8).max(200)
262
+ }).strict();
263
+ var AgentBlogScheduleCancelPreviewRequestSchema = z.object({}).strict();
264
+ var AgentBlogScheduleCancelExecuteRequestSchema = z.object({
265
+ confirmationToken: z.string().min(1),
266
+ idempotencyKey: z.string().trim().min(8).max(200)
267
+ }).strict();
268
+ var AgentBlogSchedulePreviewSchema = z.object({
269
+ articleId: z.string(),
270
+ revisionId: z.string(),
271
+ contentHash: z.string(),
272
+ approvalBundleHash: z.string().regex(/^[a-f0-9]{64}$/),
273
+ approvalSource: z.enum(["USER", "AGENT"]).nullable(),
274
+ destinationIds: AgentBlogDestinationSelectionSchema,
275
+ scheduledAt: z.string().datetime(),
276
+ timezone: AgentBlogIanaTimeZoneSchema,
277
+ currentScheduleVersion: z.string().datetime(),
278
+ previousScheduledAt: z.string().datetime().nullable(),
279
+ confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }).strict()
280
+ }).strict();
281
+ var AgentBlogScheduleExecuteSchema = AgentBlogSchedulePreviewSchema.omit({ confirmation: true }).extend({
282
+ jobId: z.string(),
283
+ scheduleVersion: z.string().datetime(),
284
+ state: z.literal("SCHEDULED")
285
+ }).strict();
286
+ var AgentBlogScheduleCancelPreviewSchema = z.object({
287
+ articleId: z.string(),
288
+ revisionId: z.string(),
289
+ approvalBundleHash: z.string().regex(/^[a-f0-9]{64}$/),
290
+ destinationIds: AgentBlogDestinationSelectionSchema,
291
+ scheduledAt: z.string().datetime(),
292
+ timezone: AgentBlogIanaTimeZoneSchema,
293
+ scheduleVersion: z.string().datetime(),
294
+ confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }).strict()
295
+ }).strict();
296
+ var AgentBlogScheduleCancelExecuteSchema = AgentBlogScheduleCancelPreviewSchema.omit({ confirmation: true }).extend({
297
+ state: z.literal("APPROVED"),
298
+ canceledAt: z.string().datetime()
299
+ }).strict();
165
300
  var AgentBlogPublishPreviewRequestSchema = z.object({ revisionId: z.string().min(1), destinationIds: AgentBlogDestinationSelectionSchema.optional() });
166
301
  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) });
167
302
  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();
168
- 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();
303
+ 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(), capabilities: z.array(z.string()), externalSiteName: z.string().nullable(), externalSiteUrl: z.string().url().nullable(), lastTestedAt: z.string().datetime().nullable(), lastSucceededAt: z.string().datetime().nullable(), lastErrorCode: z.string().nullable() }).strict();
169
304
  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();
170
- var AgentBlogPublishPreviewSchema = z.object({ articleId: z.string(), revisionId: z.string(), contentHash: z.string(), title: z.string(), slug: z.string(), publicUrl: z.string().url(), destinations: z.array(AgentBlogPublishingDestinationSchema), confirmation: z.object({ token: z.string(), expiresAt: z.string().datetime() }) });
305
+ 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() }) });
171
306
  var AgentBlogReadinessSchema = z.enum([
172
307
  "MISSING",
173
308
  "NOT_STARTED",
@@ -215,6 +350,75 @@ var AgentBlogCadenceInputSchema = z.object({
215
350
  var AgentBlogIdempotentRequestSchema = z.object({
216
351
  idempotencyKey: z.string().trim().min(8).max(200)
217
352
  }).strict();
353
+ var AgentBlogPublicationWeekdaysSchema = z.array(z.number().int().min(0).max(6)).min(1).max(7).superRefine((weekdays, context) => {
354
+ if (new Set(weekdays).size !== weekdays.length) {
355
+ context.addIssue({ code: "custom", message: "Weekdays must be unique." });
356
+ }
357
+ });
358
+ var AgentBlogEditorialDateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
359
+ var AgentBlogPlanItemStateSchema = z.enum([
360
+ "PLANNED",
361
+ "ACCEPTED",
362
+ "DISMISSED",
363
+ "DRAFTING",
364
+ "IN_REVIEW",
365
+ "APPROVED",
366
+ "SCHEDULED",
367
+ "PUBLISHED",
368
+ "NEEDS_ATTENTION"
369
+ ]);
370
+ var AgentBlogScheduleDigestSchema = z.string().regex(/^[a-f0-9]{64}$/);
371
+ var AgentBlogPlanDateMoveSchema = z.object({
372
+ itemId: z.string().min(1),
373
+ title: z.string().min(1).max(200),
374
+ oldDate: AgentBlogEditorialDateSchema,
375
+ newDate: AgentBlogEditorialDateSchema,
376
+ state: AgentBlogPlanItemStateSchema,
377
+ version: z.number().int().positive()
378
+ }).strict();
379
+ var AgentBlogPlanLockedItemSchema = z.object({
380
+ itemId: z.string().min(1),
381
+ title: z.string().min(1).max(200),
382
+ date: AgentBlogEditorialDateSchema,
383
+ state: z.enum(["SCHEDULED", "PUBLISHED"]),
384
+ version: z.number().int().positive()
385
+ }).strict();
386
+ var AgentBlogPlanCadencePreviewRequestSchema = z.object({
387
+ weekdays: AgentBlogPublicationWeekdaysSchema,
388
+ expectedPlanVersion: z.number().int().positive()
389
+ }).strict();
390
+ var AgentBlogPlanCadencePreviewSchema = z.object({
391
+ planId: z.string().min(1),
392
+ planTitle: z.string().min(1).max(200),
393
+ planVersion: z.number().int().positive(),
394
+ scheduleDigest: AgentBlogScheduleDigestSchema,
395
+ kind: z.enum(["ready", "blocked", "noop"]),
396
+ canExecute: z.boolean(),
397
+ oldWeekdays: AgentBlogPublicationWeekdaysSchema,
398
+ newWeekdays: AgentBlogPublicationWeekdaysSchema,
399
+ moves: z.array(AgentBlogPlanDateMoveSchema).max(30),
400
+ lockedItems: z.array(AgentBlogPlanLockedItemSchema).max(30),
401
+ warnings: z.array(z.string().min(1).max(500)).max(30),
402
+ reason: z.string().min(1).max(500).nullable(),
403
+ confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict().nullable()
404
+ }).strict();
405
+ var AgentBlogPlanCadenceExecuteRequestSchema = z.object({
406
+ weekdays: AgentBlogPublicationWeekdaysSchema,
407
+ expectedPlanVersion: z.number().int().positive(),
408
+ expectedScheduleDigest: AgentBlogScheduleDigestSchema,
409
+ confirmationToken: z.string().min(1),
410
+ idempotencyKey: z.string().trim().min(8).max(200)
411
+ }).strict();
412
+ var AgentBlogPlanCadenceExecuteSchema = z.object({
413
+ planId: z.string().min(1),
414
+ planVersion: z.number().int().positive(),
415
+ publicationWeekdays: AgentBlogPublicationWeekdaysSchema,
416
+ cadencePerWeek: z.number().int().min(1).max(7),
417
+ expectedItemCount: z.number().int().nonnegative().max(30),
418
+ moves: z.array(AgentBlogPlanDateMoveSchema).max(30),
419
+ lockedItems: z.array(AgentBlogPlanLockedItemSchema).max(30),
420
+ scheduleDigest: AgentBlogScheduleDigestSchema
421
+ }).strict();
218
422
  var AgentBlogPlanCreateRequestSchema = AgentBlogCadenceInputSchema.and(AgentBlogIdempotentRequestSchema);
219
423
  var AgentBlogPlanRetryRequestSchema = AgentBlogIdempotentRequestSchema;
220
424
  var AgentBlogPlanItemSchema = z.object({
@@ -298,6 +502,67 @@ var AgentBlogConnectionExecuteSchema = z.object({
298
502
  webhookSecret: z.string().min(1).optional(),
299
503
  message: z.string().min(1)
300
504
  }).strict();
505
+ var AgentBlogWebhookSemanticsSchema = z.enum(["DRAFT", "LIVE"]);
506
+ var AgentBlogWebhookDestinationChangeSchema = z.object({
507
+ destinationId: z.string().min(1).optional(),
508
+ siteId: z.string().min(1),
509
+ name: z.string().trim().min(1).max(160),
510
+ endpoint: z.string().url(),
511
+ semantics: AgentBlogWebhookSemanticsSchema
512
+ }).strict();
513
+ var AgentBlogWebhookDestinationPreviewRequestSchema = AgentBlogWebhookDestinationChangeSchema;
514
+ var AgentBlogWebhookDestinationExecuteRequestSchema = AgentBlogWebhookDestinationChangeSchema.extend({
515
+ confirmationToken: z.string().min(1).max(300),
516
+ idempotencyKey: z.string().trim().min(8).max(200)
517
+ }).strict();
518
+ var AgentBlogWebhookDestinationPreviewSchema = AgentBlogWebhookDestinationChangeSchema.extend({
519
+ destinationId: z.string().min(1).nullable(),
520
+ effect: z.string().min(1),
521
+ confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict()
522
+ }).strict();
523
+ var AgentBlogWebhookDestinationExecuteSchema = z.object({
524
+ projectId: z.string().min(1),
525
+ siteId: z.string().min(1),
526
+ destinationId: z.string().min(1),
527
+ completed: z.literal(true),
528
+ secretDelivered: z.boolean(),
529
+ alreadyDelivered: z.boolean(),
530
+ webhookSecret: z.string().min(1).optional(),
531
+ message: z.string().min(1)
532
+ }).strict();
533
+ var AgentBlogWebhookTestRequestSchema = z.object({
534
+ siteId: z.string().min(1),
535
+ destinationId: z.string().min(1),
536
+ makePrimary: z.boolean().optional()
537
+ }).strict();
538
+ var AgentBlogWebhookTestSchema = z.object({
539
+ destinationId: z.string().min(1),
540
+ status: z.enum(["CONNECTED", "NEEDS_ATTENTION"]),
541
+ enabled: z.boolean(),
542
+ testedAt: z.string().datetime(),
543
+ errorCode: z.string().nullable()
544
+ }).strict();
545
+ var AgentBlogWebhookRotatePreviewRequestSchema = z.object({
546
+ siteId: z.string().min(1),
547
+ destinationId: z.string().min(1)
548
+ }).strict();
549
+ var AgentBlogWebhookRotateExecuteRequestSchema = AgentBlogWebhookRotatePreviewRequestSchema.extend({
550
+ confirmationToken: z.string().min(1).max(300),
551
+ idempotencyKey: z.string().trim().min(8).max(200)
552
+ }).strict();
553
+ var AgentBlogWebhookRotatePreviewSchema = AgentBlogWebhookRotatePreviewRequestSchema.extend({
554
+ destinationName: z.string().min(1),
555
+ effect: z.string().min(1),
556
+ confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict()
557
+ }).strict();
558
+ var AgentBlogWebhookRotateExecuteSchema = z.object({
559
+ destinationId: z.string().min(1),
560
+ completed: z.literal(true),
561
+ secretDelivered: z.boolean(),
562
+ alreadyDelivered: z.boolean(),
563
+ webhookSecret: z.string().min(1).optional(),
564
+ message: z.string().min(1)
565
+ }).strict();
301
566
  var AgentBlogRevalidationTestRequestSchema = AgentBlogIdempotentRequestSchema;
302
567
  var AgentBlogRevalidationTestSchema = z.object({
303
568
  status: z.enum(["VERIFIED", "NEEDS_ATTENTION"]),
@@ -308,14 +573,31 @@ var AgentBlogPlanListResponseSchema = successEnvelopeSchema(z.object({ plans: z.
308
573
  var AgentBlogArticleListResponseSchema = successEnvelopeSchema(z.object({ articles: z.array(AgentBlogArticleSchema) }));
309
574
  var AgentBlogArticleResponseSchema = successEnvelopeSchema(AgentBlogArticleDetailSchema);
310
575
  var AgentBlogJobResponseSchema = successEnvelopeSchema(AgentBlogJobSchema);
576
+ var AgentBlogImageGenerationResponseSchema = successEnvelopeSchema(z.object({ image: AgentBlogImageSchema, job: AgentBlogJobSchema }).strict());
577
+ var AgentBlogImageUploadPreparationResponseSchema = successEnvelopeSchema(z.object({
578
+ uploadUrl: z.string().url(),
579
+ storageKey: z.string(),
580
+ expiresAt: z.string().datetime(),
581
+ headers: z.object({ "Content-Type": z.enum(["image/jpeg", "image/png", "image/webp"]) }).strict(),
582
+ maxFileSize: z.number().int().positive()
583
+ }).strict());
584
+ var AgentBlogImageResponseSchema = successEnvelopeSchema(AgentBlogImageSchema);
585
+ var AgentBlogApprovalPreviewResponseSchema = successEnvelopeSchema(AgentBlogApprovalPreviewSchema);
586
+ var AgentBlogApprovalExecuteResponseSchema = successEnvelopeSchema(AgentBlogApprovalExecuteSchema);
587
+ var AgentBlogSchedulePreviewResponseSchema = successEnvelopeSchema(AgentBlogSchedulePreviewSchema);
588
+ var AgentBlogScheduleExecuteResponseSchema = successEnvelopeSchema(AgentBlogScheduleExecuteSchema);
589
+ var AgentBlogScheduleCancelPreviewResponseSchema = successEnvelopeSchema(AgentBlogScheduleCancelPreviewSchema);
590
+ var AgentBlogScheduleCancelExecuteResponseSchema = successEnvelopeSchema(AgentBlogScheduleCancelExecuteSchema);
311
591
  var AgentBlogPublishPreviewResponseSchema = successEnvelopeSchema(AgentBlogPublishPreviewSchema);
312
- var AgentBlogPublishExecuteResponseSchema = successEnvelopeSchema(z.object({ publicationId: z.string(), articleId: z.string(), revisionId: z.string(), publicUrl: z.string().url(), publishedAt: z.string().datetime() }));
592
+ 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() }));
313
593
  var AgentBlogPublishingProviderListResponseSchema = successEnvelopeSchema(z.object({ providers: z.array(AgentBlogPublishingProviderSchema) }).strict());
314
594
  var AgentBlogPublishingDestinationListResponseSchema = successEnvelopeSchema(z.object({ destinations: z.array(AgentBlogPublishingDestinationSchema) }).strict());
315
595
  var AgentBlogDeliveryAttemptListResponseSchema = successEnvelopeSchema(z.object({ deliveries: z.array(AgentBlogDeliveryAttemptSchema) }).strict());
316
596
  var AgentBlogSetupStatusResponseSchema = successEnvelopeSchema(AgentBlogSetupStatusSchema);
317
597
  var AgentBlogPlanItemsResponseSchema = successEnvelopeSchema(z.object({ items: z.array(AgentBlogPlanItemSchema) }).strict());
318
598
  var AgentBlogPlanItemResponseSchema = successEnvelopeSchema(AgentBlogPlanItemSchema);
599
+ var AgentBlogPlanCadencePreviewResponseSchema = successEnvelopeSchema(AgentBlogPlanCadencePreviewSchema);
600
+ var AgentBlogPlanCadenceExecuteResponseSchema = successEnvelopeSchema(AgentBlogPlanCadenceExecuteSchema);
319
601
  var AgentBlogPlanQueuedResponseSchema = successEnvelopeSchema(z.object({
320
602
  planId: z.string().min(1),
321
603
  job: AgentBlogJobSchema
@@ -328,6 +610,11 @@ var AgentBlogConnectionStatusResponseSchema = successEnvelopeSchema(AgentBlogCon
328
610
  var AgentBlogConnectionPreviewResponseSchema = successEnvelopeSchema(AgentBlogConnectionPreviewSchema);
329
611
  var AgentBlogConnectionExecuteResponseSchema = successEnvelopeSchema(AgentBlogConnectionExecuteSchema);
330
612
  var AgentBlogRevalidationTestResponseSchema = successEnvelopeSchema(AgentBlogRevalidationTestSchema);
613
+ var AgentBlogWebhookDestinationPreviewResponseSchema = successEnvelopeSchema(AgentBlogWebhookDestinationPreviewSchema);
614
+ var AgentBlogWebhookDestinationExecuteResponseSchema = successEnvelopeSchema(AgentBlogWebhookDestinationExecuteSchema);
615
+ var AgentBlogWebhookTestResponseSchema = successEnvelopeSchema(AgentBlogWebhookTestSchema);
616
+ var AgentBlogWebhookRotatePreviewResponseSchema = successEnvelopeSchema(AgentBlogWebhookRotatePreviewSchema);
617
+ var AgentBlogWebhookRotateExecuteResponseSchema = successEnvelopeSchema(AgentBlogWebhookRotateExecuteSchema);
331
618
  var CapabilitySchema = z.object({
332
619
  id: CapabilityIdSchema,
333
620
  available: z.boolean(),
@@ -357,7 +644,7 @@ var ApiMetaSchema = z.object({
357
644
  capabilities: z.array(CapabilitySchema)
358
645
  });
359
646
  var ApiMetaResponseSchema = successEnvelopeSchema(ApiMetaSchema);
360
- var AuthenticationKindSchema = z.enum(["session", "api_key"]);
647
+ var AuthenticationKindSchema = z.enum(["session", "api_key", "oauth"]);
361
648
  var ActorSchema = z.object({
362
649
  user: z.object({
363
650
  id: z.string().min(1),
@@ -376,31 +663,6 @@ var ActorSchema = z.object({
376
663
  capabilities: z.array(CapabilityIdSchema)
377
664
  });
378
665
  var WhoAmIResponseSchema = successEnvelopeSchema(ActorSchema);
379
- var Base64UrlSecretSchema = z.string().min(43).max(128).regex(/^[A-Za-z0-9_-]+$/);
380
- var CLI_BROWSER_AUTHORIZATION_TIMEOUT_MS = 5 * 60 * 1e3;
381
- var CliAuthorizationExchangeRequestSchema = z.object({
382
- code: Base64UrlSecretSchema,
383
- codeVerifier: Base64UrlSecretSchema
384
- });
385
- var CliAuthorizationCredentialSchema = z.object({
386
- token: z.string().min(1),
387
- tokenType: z.literal("Bearer"),
388
- expiresAt: z.string().datetime(),
389
- organization: z.object({
390
- id: z.string().min(1),
391
- name: z.string().min(1)
392
- }),
393
- capabilities: z.array(CapabilityIdSchema)
394
- });
395
- var CliAuthorizationExchangeResponseSchema = successEnvelopeSchema(
396
- CliAuthorizationCredentialSchema
397
- );
398
- var CliAuthorizationRevokeDataSchema = z.object({
399
- revoked: z.literal(true)
400
- });
401
- var CliAuthorizationRevokeResponseSchema = successEnvelopeSchema(
402
- CliAuthorizationRevokeDataSchema
403
- );
404
666
  var CapabilitiesDataSchema = z.object({
405
667
  capabilities: z.array(CapabilitySchema)
406
668
  });
@@ -537,7 +799,8 @@ var PublishingProviderSchema = z.enum([
537
799
  "TIKTOK",
538
800
  "YOUTUBE",
539
801
  "BLUESKY",
540
- "LINKEDIN"
802
+ "LINKEDIN",
803
+ "GOOGLE_BUSINESS_PROFILE"
541
804
  ]);
542
805
  var PUBLISHING_PROVIDER_COUNT = PublishingProviderSchema.options.length;
543
806
  var PostDeliveryModeSchema = z.enum(["IMMEDIATE", "SCHEDULED"]);
@@ -737,7 +1000,8 @@ var DraftCaptionOverridesObjectSchema = z.object({
737
1000
  TIKTOK: z.string().max(2200).nullable().optional(),
738
1001
  YOUTUBE: YouTubeDescriptionSchema.nullable().optional(),
739
1002
  BLUESKY: BlueskyCaptionSchema.nullable().optional(),
740
- LINKEDIN: z.string().max(3e3).nullable().optional()
1003
+ LINKEDIN: z.string().max(3e3).nullable().optional(),
1004
+ GOOGLE_BUSINESS_PROFILE: z.string().max(1500).nullable().optional()
741
1005
  }).strict();
742
1006
  var DraftPlatformsSchema = z.array(PublishingProviderSchema).max(PUBLISHING_PROVIDER_COUNT).refine(
743
1007
  (providers) => new Set(providers).size === providers.length,
@@ -1417,6 +1681,14 @@ var SeoReportResponseSchema = successEnvelopeSchema(SeoReportSchema);
1417
1681
  export {
1418
1682
  API_VERSION,
1419
1683
  ActorSchema,
1684
+ AgentBlogApprovalExecuteRequestSchema,
1685
+ AgentBlogApprovalExecuteResponseSchema,
1686
+ AgentBlogApprovalExecuteSchema,
1687
+ AgentBlogApprovalImageSummarySchema,
1688
+ AgentBlogApprovalLinkSummarySchema,
1689
+ AgentBlogApprovalPreviewRequestSchema,
1690
+ AgentBlogApprovalPreviewResponseSchema,
1691
+ AgentBlogApprovalPreviewSchema,
1420
1692
  AgentBlogArticleCreateRequestSchema,
1421
1693
  AgentBlogArticleDetailSchema,
1422
1694
  AgentBlogArticleListResponseSchema,
@@ -1439,14 +1711,30 @@ export {
1439
1711
  AgentBlogDraftUpdateSchema,
1440
1712
  AgentBlogGenerateRequestSchema,
1441
1713
  AgentBlogIdempotentRequestSchema,
1714
+ AgentBlogImageGenerateRequestSchema,
1715
+ AgentBlogImageGenerationResponseSchema,
1716
+ AgentBlogImageResponseSchema,
1717
+ AgentBlogImageReviewRequestSchema,
1718
+ AgentBlogImageSchema,
1719
+ AgentBlogImageUploadCompleteRequestSchema,
1720
+ AgentBlogImageUploadPreparationResponseSchema,
1721
+ AgentBlogImageUploadPrepareRequestSchema,
1442
1722
  AgentBlogJobResponseSchema,
1443
1723
  AgentBlogJobSchema,
1724
+ AgentBlogPlanCadenceExecuteRequestSchema,
1725
+ AgentBlogPlanCadenceExecuteResponseSchema,
1726
+ AgentBlogPlanCadenceExecuteSchema,
1727
+ AgentBlogPlanCadencePreviewRequestSchema,
1728
+ AgentBlogPlanCadencePreviewResponseSchema,
1729
+ AgentBlogPlanCadencePreviewSchema,
1444
1730
  AgentBlogPlanCreateRequestSchema,
1731
+ AgentBlogPlanDateMoveSchema,
1445
1732
  AgentBlogPlanItemResponseSchema,
1446
1733
  AgentBlogPlanItemSchema,
1447
1734
  AgentBlogPlanItemStateRequestSchema,
1448
1735
  AgentBlogPlanItemsResponseSchema,
1449
1736
  AgentBlogPlanListResponseSchema,
1737
+ AgentBlogPlanLockedItemSchema,
1450
1738
  AgentBlogPlanQueuedResponseSchema,
1451
1739
  AgentBlogPlanRetryRequestSchema,
1452
1740
  AgentBlogPlanSchema,
@@ -1462,8 +1750,37 @@ export {
1462
1750
  AgentBlogRevalidationTestRequestSchema,
1463
1751
  AgentBlogRevalidationTestResponseSchema,
1464
1752
  AgentBlogRevalidationTestSchema,
1753
+ AgentBlogScheduleCancelExecuteRequestSchema,
1754
+ AgentBlogScheduleCancelExecuteResponseSchema,
1755
+ AgentBlogScheduleCancelExecuteSchema,
1756
+ AgentBlogScheduleCancelPreviewRequestSchema,
1757
+ AgentBlogScheduleCancelPreviewResponseSchema,
1758
+ AgentBlogScheduleCancelPreviewSchema,
1759
+ AgentBlogScheduleExecuteRequestSchema,
1760
+ AgentBlogScheduleExecuteResponseSchema,
1761
+ AgentBlogScheduleExecuteSchema,
1762
+ AgentBlogSchedulePreviewRequestSchema,
1763
+ AgentBlogSchedulePreviewResponseSchema,
1764
+ AgentBlogSchedulePreviewSchema,
1465
1765
  AgentBlogSetupStatusResponseSchema,
1466
1766
  AgentBlogSetupStatusSchema,
1767
+ AgentBlogWebhookDestinationChangeSchema,
1768
+ AgentBlogWebhookDestinationExecuteRequestSchema,
1769
+ AgentBlogWebhookDestinationExecuteResponseSchema,
1770
+ AgentBlogWebhookDestinationExecuteSchema,
1771
+ AgentBlogWebhookDestinationPreviewRequestSchema,
1772
+ AgentBlogWebhookDestinationPreviewResponseSchema,
1773
+ AgentBlogWebhookDestinationPreviewSchema,
1774
+ AgentBlogWebhookRotateExecuteRequestSchema,
1775
+ AgentBlogWebhookRotateExecuteResponseSchema,
1776
+ AgentBlogWebhookRotateExecuteSchema,
1777
+ AgentBlogWebhookRotatePreviewRequestSchema,
1778
+ AgentBlogWebhookRotatePreviewResponseSchema,
1779
+ AgentBlogWebhookRotatePreviewSchema,
1780
+ AgentBlogWebhookSemanticsSchema,
1781
+ AgentBlogWebhookTestRequestSchema,
1782
+ AgentBlogWebhookTestResponseSchema,
1783
+ AgentBlogWebhookTestSchema,
1467
1784
  ApiErrorCodeSchema,
1468
1785
  ApiMetaResponseSchema,
1469
1786
  ApiMetaSchema,
@@ -1474,7 +1791,6 @@ export {
1474
1791
  BlogMetadataSchema,
1475
1792
  BlogSitemapEntrySchema,
1476
1793
  BlogSlugRedirectSchema,
1477
- CLI_BROWSER_AUTHORIZATION_TIMEOUT_MS,
1478
1794
  CONTRACT_VERSION,
1479
1795
  CalendarEventSchema,
1480
1796
  CalendarListDataSchema,
@@ -1484,11 +1800,6 @@ export {
1484
1800
  CapabilitiesResponseSchema,
1485
1801
  CapabilityIdSchema,
1486
1802
  CapabilitySchema,
1487
- CliAuthorizationCredentialSchema,
1488
- CliAuthorizationExchangeRequestSchema,
1489
- CliAuthorizationExchangeResponseSchema,
1490
- CliAuthorizationRevokeDataSchema,
1491
- CliAuthorizationRevokeResponseSchema,
1492
1803
  DraftPostInputSchema,
1493
1804
  DraftPostUpdateInputSchema,
1494
1805
  IntegrationConnectionStatusSchema,