@rolino/contracts 0.5.0 → 0.7.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.18.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
@@ -91,20 +95,26 @@ var CapabilityIdSchema = z.enum([
91
95
  "integrations:read",
92
96
  "calendar:read",
93
97
  "seo:read",
98
+ "backlinks:read",
99
+ "backlinks:write",
100
+ "backlinks:contacts",
94
101
  "blog:read",
95
102
  "blog:write",
96
103
  "blog:manage",
97
104
  "blog:approve",
98
105
  "blog:publish"
99
106
  ]);
107
+ var AGENT_CAPABILITIES = CapabilityIdSchema.options;
100
108
  var AgentBlogPlanSchema = z.object({
101
109
  id: z.string().min(1),
110
+ version: z.number().int().positive(),
102
111
  state: z.string().min(1),
103
112
  windowStart: z.string().datetime(),
104
113
  windowEnd: z.string().datetime(),
105
114
  cadence: z.object({ weekdays: z.array(z.number().int().min(0).max(6)) }),
106
115
  activeRevisionId: z.string().nullable(),
107
- itemCount: z.number().int().nonnegative()
116
+ itemCount: z.number().int().nonnegative(),
117
+ successorState: z.enum(["NOT_STARTED", "GENERATING", "READY", "NEEDS_ATTENTION"]).optional()
108
118
  });
109
119
  var AgentBlogArticleSchema = z.object({
110
120
  id: z.string().min(1),
@@ -115,8 +125,34 @@ var AgentBlogArticleSchema = z.object({
115
125
  approvedRevisionId: z.string().nullable(),
116
126
  publishedRevisionId: z.string().nullable(),
117
127
  scheduledPublishAt: z.string().datetime().nullable(),
118
- updatedAt: z.string().datetime()
128
+ updatedAt: z.string().datetime(),
129
+ preparationState: z.enum(["PREPARING", "READY_FOR_REVIEW", "SCHEDULED", "MEASURING", "NEEDS_ATTENTION"]).optional(),
130
+ nextAction: z.enum(["WAIT", "REVIEW_ARTICLE", "OPEN_SCHEDULE", "VIEW_OBSERVATION", "RESOLVE_ISSUE"]).optional()
119
131
  });
132
+ var AgentBlogArticleQualitySummarySchema = z.object({
133
+ version: z.literal(2),
134
+ decision: z.enum(["READY_FOR_REVIEW", "NEEDS_ATTENTION"]),
135
+ checks: z.array(z.object({ code: z.enum(["SAFE_MARKDOWN", "REQUIRED_METADATA", "CANONICAL_PATH", "CATALOG_LINKS", "LIVE_LINK_TARGETS", "QUERY_OWNERSHIP", "CONTENT_OVERLAP", "BRAND_TERMS", "EVIDENCE_OWNERSHIP"]), status: z.enum(["PASSED", "FAILED", "WARNING"]), message: z.string().max(240) }).strict()).max(9)
136
+ }).strict();
137
+ var AgentBlogMetricSourceSchema = z.object({
138
+ provider: z.enum(["GOOGLE_SEARCH_CONSOLE", "GOOGLE_ANALYTICS"]),
139
+ observedAt: z.string().datetime(),
140
+ periodStart: z.string().datetime().nullable(),
141
+ periodEnd: z.string().datetime().nullable(),
142
+ metrics: z.record(z.string().max(40), z.number().finite()).refine((metrics) => Object.keys(metrics).length <= 20, { message: "Blog metric sources can contain at most 20 metrics." })
143
+ }).strict();
144
+ var AgentBlogPerformanceObservationSchema = z.object({
145
+ state: z.enum(["WAITING", "MATCHED", "MISSING_MATCH", "MEASURING", "OBSERVED", "PARTIAL", "UNAVAILABLE", "STALE"]),
146
+ latestCheckpoint: z.enum(["BASELINE", "DAY_28", "DAY_56"]).nullable(),
147
+ nextCheckpoint: z.enum(["BASELINE", "DAY_28", "DAY_56"]).nullable(),
148
+ checkpoints: z.array(z.object({
149
+ checkpoint: z.enum(["BASELINE", "DAY_28", "DAY_56"]),
150
+ state: z.enum(["WAITING", "MATCHED", "MISSING_MATCH", "MEASURING", "OBSERVED", "PARTIAL", "UNAVAILABLE", "STALE"]),
151
+ targetDataThrough: z.string().date().nullable(),
152
+ sources: z.array(AgentBlogMetricSourceSchema).max(2),
153
+ siteContext: z.array(AgentBlogMetricSourceSchema).max(2)
154
+ }).strict()).max(3)
155
+ }).strict();
120
156
  var AgentBlogImageSchema = z.object({
121
157
  id: z.string().min(1),
122
158
  revisionId: z.string().nullable(),
@@ -148,8 +184,9 @@ var AgentBlogArticleDetailSchema = AgentBlogArticleSchema.extend({
148
184
  callToAction: z.unknown().nullable(),
149
185
  internalLinks: z.unknown()
150
186
  }).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)
187
+ 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(), quality: AgentBlogArticleQualitySummarySchema.nullable().optional() })),
188
+ images: z.array(AgentBlogImageSchema),
189
+ measurement: AgentBlogPerformanceObservationSchema.nullable().optional()
153
190
  });
154
191
  var AgentBlogJobSchema = z.object({
155
192
  id: z.string().min(1),
@@ -295,7 +332,7 @@ var AgentBlogScheduleCancelExecuteSchema = AgentBlogScheduleCancelPreviewSchema.
295
332
  var AgentBlogPublishPreviewRequestSchema = z.object({ revisionId: z.string().min(1), destinationIds: AgentBlogDestinationSelectionSchema.optional() });
296
333
  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
334
  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();
335
+ 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();
299
336
  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
337
  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
338
  var AgentBlogReadinessSchema = z.enum([
@@ -345,6 +382,75 @@ var AgentBlogCadenceInputSchema = z.object({
345
382
  var AgentBlogIdempotentRequestSchema = z.object({
346
383
  idempotencyKey: z.string().trim().min(8).max(200)
347
384
  }).strict();
385
+ var AgentBlogPublicationWeekdaysSchema = z.array(z.number().int().min(0).max(6)).min(1).max(7).superRefine((weekdays, context) => {
386
+ if (new Set(weekdays).size !== weekdays.length) {
387
+ context.addIssue({ code: "custom", message: "Weekdays must be unique." });
388
+ }
389
+ });
390
+ var AgentBlogEditorialDateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
391
+ var AgentBlogPlanItemStateSchema = z.enum([
392
+ "PLANNED",
393
+ "ACCEPTED",
394
+ "DISMISSED",
395
+ "DRAFTING",
396
+ "IN_REVIEW",
397
+ "APPROVED",
398
+ "SCHEDULED",
399
+ "PUBLISHED",
400
+ "NEEDS_ATTENTION"
401
+ ]);
402
+ var AgentBlogScheduleDigestSchema = z.string().regex(/^[a-f0-9]{64}$/);
403
+ var AgentBlogPlanDateMoveSchema = z.object({
404
+ itemId: z.string().min(1),
405
+ title: z.string().min(1).max(200),
406
+ oldDate: AgentBlogEditorialDateSchema,
407
+ newDate: AgentBlogEditorialDateSchema,
408
+ state: AgentBlogPlanItemStateSchema,
409
+ version: z.number().int().positive()
410
+ }).strict();
411
+ var AgentBlogPlanLockedItemSchema = z.object({
412
+ itemId: z.string().min(1),
413
+ title: z.string().min(1).max(200),
414
+ date: AgentBlogEditorialDateSchema,
415
+ state: z.enum(["SCHEDULED", "PUBLISHED"]),
416
+ version: z.number().int().positive()
417
+ }).strict();
418
+ var AgentBlogPlanCadencePreviewRequestSchema = z.object({
419
+ weekdays: AgentBlogPublicationWeekdaysSchema,
420
+ expectedPlanVersion: z.number().int().positive()
421
+ }).strict();
422
+ var AgentBlogPlanCadencePreviewSchema = z.object({
423
+ planId: z.string().min(1),
424
+ planTitle: z.string().min(1).max(200),
425
+ planVersion: z.number().int().positive(),
426
+ scheduleDigest: AgentBlogScheduleDigestSchema,
427
+ kind: z.enum(["ready", "blocked", "noop"]),
428
+ canExecute: z.boolean(),
429
+ oldWeekdays: AgentBlogPublicationWeekdaysSchema,
430
+ newWeekdays: AgentBlogPublicationWeekdaysSchema,
431
+ moves: z.array(AgentBlogPlanDateMoveSchema).max(30),
432
+ lockedItems: z.array(AgentBlogPlanLockedItemSchema).max(30),
433
+ warnings: z.array(z.string().min(1).max(500)).max(30),
434
+ reason: z.string().min(1).max(500).nullable(),
435
+ confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict().nullable()
436
+ }).strict();
437
+ var AgentBlogPlanCadenceExecuteRequestSchema = z.object({
438
+ weekdays: AgentBlogPublicationWeekdaysSchema,
439
+ expectedPlanVersion: z.number().int().positive(),
440
+ expectedScheduleDigest: AgentBlogScheduleDigestSchema,
441
+ confirmationToken: z.string().min(1),
442
+ idempotencyKey: z.string().trim().min(8).max(200)
443
+ }).strict();
444
+ var AgentBlogPlanCadenceExecuteSchema = z.object({
445
+ planId: z.string().min(1),
446
+ planVersion: z.number().int().positive(),
447
+ publicationWeekdays: AgentBlogPublicationWeekdaysSchema,
448
+ cadencePerWeek: z.number().int().min(1).max(7),
449
+ expectedItemCount: z.number().int().nonnegative().max(30),
450
+ moves: z.array(AgentBlogPlanDateMoveSchema).max(30),
451
+ lockedItems: z.array(AgentBlogPlanLockedItemSchema).max(30),
452
+ scheduleDigest: AgentBlogScheduleDigestSchema
453
+ }).strict();
348
454
  var AgentBlogPlanCreateRequestSchema = AgentBlogCadenceInputSchema.and(AgentBlogIdempotentRequestSchema);
349
455
  var AgentBlogPlanRetryRequestSchema = AgentBlogIdempotentRequestSchema;
350
456
  var AgentBlogPlanItemSchema = z.object({
@@ -370,7 +476,9 @@ var AgentBlogPlanItemSchema = z.object({
370
476
  existingArticleComparison: z.string().nullable(),
371
477
  recommendedLinks: z.unknown(),
372
478
  targetConversionPage: z.string().nullable(),
373
- articleId: z.string().min(1).nullable()
479
+ articleId: z.string().min(1).nullable(),
480
+ preparationState: z.enum(["PREPARING", "READY_FOR_REVIEW", "SCHEDULED", "MEASURING", "NEEDS_ATTENTION"]).optional(),
481
+ nextAction: z.enum(["WAIT", "REVIEW_ARTICLE", "OPEN_SCHEDULE", "VIEW_OBSERVATION", "RESOLVE_ISSUE"]).optional()
374
482
  }).strict();
375
483
  var AgentBlogPlanItemStateRequestSchema = z.object({
376
484
  state: z.enum(["ACCEPTED", "DISMISSED"]),
@@ -428,6 +536,67 @@ var AgentBlogConnectionExecuteSchema = z.object({
428
536
  webhookSecret: z.string().min(1).optional(),
429
537
  message: z.string().min(1)
430
538
  }).strict();
539
+ var AgentBlogWebhookSemanticsSchema = z.enum(["DRAFT", "LIVE"]);
540
+ var AgentBlogWebhookDestinationChangeSchema = z.object({
541
+ destinationId: z.string().min(1).optional(),
542
+ siteId: z.string().min(1),
543
+ name: z.string().trim().min(1).max(160),
544
+ endpoint: z.string().url(),
545
+ semantics: AgentBlogWebhookSemanticsSchema
546
+ }).strict();
547
+ var AgentBlogWebhookDestinationPreviewRequestSchema = AgentBlogWebhookDestinationChangeSchema;
548
+ var AgentBlogWebhookDestinationExecuteRequestSchema = AgentBlogWebhookDestinationChangeSchema.extend({
549
+ confirmationToken: z.string().min(1).max(300),
550
+ idempotencyKey: z.string().trim().min(8).max(200)
551
+ }).strict();
552
+ var AgentBlogWebhookDestinationPreviewSchema = AgentBlogWebhookDestinationChangeSchema.extend({
553
+ destinationId: z.string().min(1).nullable(),
554
+ effect: z.string().min(1),
555
+ confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict()
556
+ }).strict();
557
+ var AgentBlogWebhookDestinationExecuteSchema = z.object({
558
+ projectId: z.string().min(1),
559
+ siteId: z.string().min(1),
560
+ destinationId: z.string().min(1),
561
+ completed: z.literal(true),
562
+ secretDelivered: z.boolean(),
563
+ alreadyDelivered: z.boolean(),
564
+ webhookSecret: z.string().min(1).optional(),
565
+ message: z.string().min(1)
566
+ }).strict();
567
+ var AgentBlogWebhookTestRequestSchema = z.object({
568
+ siteId: z.string().min(1),
569
+ destinationId: z.string().min(1),
570
+ makePrimary: z.boolean().optional()
571
+ }).strict();
572
+ var AgentBlogWebhookTestSchema = z.object({
573
+ destinationId: z.string().min(1),
574
+ status: z.enum(["CONNECTED", "NEEDS_ATTENTION"]),
575
+ enabled: z.boolean(),
576
+ testedAt: z.string().datetime(),
577
+ errorCode: z.string().nullable()
578
+ }).strict();
579
+ var AgentBlogWebhookRotatePreviewRequestSchema = z.object({
580
+ siteId: z.string().min(1),
581
+ destinationId: z.string().min(1)
582
+ }).strict();
583
+ var AgentBlogWebhookRotateExecuteRequestSchema = AgentBlogWebhookRotatePreviewRequestSchema.extend({
584
+ confirmationToken: z.string().min(1).max(300),
585
+ idempotencyKey: z.string().trim().min(8).max(200)
586
+ }).strict();
587
+ var AgentBlogWebhookRotatePreviewSchema = AgentBlogWebhookRotatePreviewRequestSchema.extend({
588
+ destinationName: z.string().min(1),
589
+ effect: z.string().min(1),
590
+ confirmation: z.object({ token: z.string().min(1), expiresAt: z.string().datetime() }).strict()
591
+ }).strict();
592
+ var AgentBlogWebhookRotateExecuteSchema = z.object({
593
+ destinationId: z.string().min(1),
594
+ completed: z.literal(true),
595
+ secretDelivered: z.boolean(),
596
+ alreadyDelivered: z.boolean(),
597
+ webhookSecret: z.string().min(1).optional(),
598
+ message: z.string().min(1)
599
+ }).strict();
431
600
  var AgentBlogRevalidationTestRequestSchema = AgentBlogIdempotentRequestSchema;
432
601
  var AgentBlogRevalidationTestSchema = z.object({
433
602
  status: z.enum(["VERIFIED", "NEEDS_ATTENTION"]),
@@ -461,6 +630,8 @@ var AgentBlogDeliveryAttemptListResponseSchema = successEnvelopeSchema(z.object(
461
630
  var AgentBlogSetupStatusResponseSchema = successEnvelopeSchema(AgentBlogSetupStatusSchema);
462
631
  var AgentBlogPlanItemsResponseSchema = successEnvelopeSchema(z.object({ items: z.array(AgentBlogPlanItemSchema) }).strict());
463
632
  var AgentBlogPlanItemResponseSchema = successEnvelopeSchema(AgentBlogPlanItemSchema);
633
+ var AgentBlogPlanCadencePreviewResponseSchema = successEnvelopeSchema(AgentBlogPlanCadencePreviewSchema);
634
+ var AgentBlogPlanCadenceExecuteResponseSchema = successEnvelopeSchema(AgentBlogPlanCadenceExecuteSchema);
464
635
  var AgentBlogPlanQueuedResponseSchema = successEnvelopeSchema(z.object({
465
636
  planId: z.string().min(1),
466
637
  job: AgentBlogJobSchema
@@ -473,6 +644,11 @@ var AgentBlogConnectionStatusResponseSchema = successEnvelopeSchema(AgentBlogCon
473
644
  var AgentBlogConnectionPreviewResponseSchema = successEnvelopeSchema(AgentBlogConnectionPreviewSchema);
474
645
  var AgentBlogConnectionExecuteResponseSchema = successEnvelopeSchema(AgentBlogConnectionExecuteSchema);
475
646
  var AgentBlogRevalidationTestResponseSchema = successEnvelopeSchema(AgentBlogRevalidationTestSchema);
647
+ var AgentBlogWebhookDestinationPreviewResponseSchema = successEnvelopeSchema(AgentBlogWebhookDestinationPreviewSchema);
648
+ var AgentBlogWebhookDestinationExecuteResponseSchema = successEnvelopeSchema(AgentBlogWebhookDestinationExecuteSchema);
649
+ var AgentBlogWebhookTestResponseSchema = successEnvelopeSchema(AgentBlogWebhookTestSchema);
650
+ var AgentBlogWebhookRotatePreviewResponseSchema = successEnvelopeSchema(AgentBlogWebhookRotatePreviewSchema);
651
+ var AgentBlogWebhookRotateExecuteResponseSchema = successEnvelopeSchema(AgentBlogWebhookRotateExecuteSchema);
476
652
  var CapabilitySchema = z.object({
477
653
  id: CapabilityIdSchema,
478
654
  available: z.boolean(),
@@ -502,7 +678,7 @@ var ApiMetaSchema = z.object({
502
678
  capabilities: z.array(CapabilitySchema)
503
679
  });
504
680
  var ApiMetaResponseSchema = successEnvelopeSchema(ApiMetaSchema);
505
- var AuthenticationKindSchema = z.enum(["session", "api_key"]);
681
+ var AuthenticationKindSchema = z.enum(["session", "api_key", "oauth"]);
506
682
  var ActorSchema = z.object({
507
683
  user: z.object({
508
684
  id: z.string().min(1),
@@ -521,31 +697,6 @@ var ActorSchema = z.object({
521
697
  capabilities: z.array(CapabilityIdSchema)
522
698
  });
523
699
  var WhoAmIResponseSchema = successEnvelopeSchema(ActorSchema);
524
- var Base64UrlSecretSchema = z.string().min(43).max(128).regex(/^[A-Za-z0-9_-]+$/);
525
- var CLI_BROWSER_AUTHORIZATION_TIMEOUT_MS = 5 * 60 * 1e3;
526
- var CliAuthorizationExchangeRequestSchema = z.object({
527
- code: Base64UrlSecretSchema,
528
- codeVerifier: Base64UrlSecretSchema
529
- });
530
- var CliAuthorizationCredentialSchema = z.object({
531
- token: z.string().min(1),
532
- tokenType: z.literal("Bearer"),
533
- expiresAt: z.string().datetime(),
534
- organization: z.object({
535
- id: z.string().min(1),
536
- name: z.string().min(1)
537
- }),
538
- capabilities: z.array(CapabilityIdSchema)
539
- });
540
- var CliAuthorizationExchangeResponseSchema = successEnvelopeSchema(
541
- CliAuthorizationCredentialSchema
542
- );
543
- var CliAuthorizationRevokeDataSchema = z.object({
544
- revoked: z.literal(true)
545
- });
546
- var CliAuthorizationRevokeResponseSchema = successEnvelopeSchema(
547
- CliAuthorizationRevokeDataSchema
548
- );
549
700
  var CapabilitiesDataSchema = z.object({
550
701
  capabilities: z.array(CapabilitySchema)
551
702
  });
@@ -682,7 +833,8 @@ var PublishingProviderSchema = z.enum([
682
833
  "TIKTOK",
683
834
  "YOUTUBE",
684
835
  "BLUESKY",
685
- "LINKEDIN"
836
+ "LINKEDIN",
837
+ "GOOGLE_BUSINESS_PROFILE"
686
838
  ]);
687
839
  var PUBLISHING_PROVIDER_COUNT = PublishingProviderSchema.options.length;
688
840
  var PostDeliveryModeSchema = z.enum(["IMMEDIATE", "SCHEDULED"]);
@@ -882,7 +1034,8 @@ var DraftCaptionOverridesObjectSchema = z.object({
882
1034
  TIKTOK: z.string().max(2200).nullable().optional(),
883
1035
  YOUTUBE: YouTubeDescriptionSchema.nullable().optional(),
884
1036
  BLUESKY: BlueskyCaptionSchema.nullable().optional(),
885
- LINKEDIN: z.string().max(3e3).nullable().optional()
1037
+ LINKEDIN: z.string().max(3e3).nullable().optional(),
1038
+ GOOGLE_BUSINESS_PROFILE: z.string().max(1500).nullable().optional()
886
1039
  }).strict();
887
1040
  var DraftPlatformsSchema = z.array(PublishingProviderSchema).max(PUBLISHING_PROVIDER_COUNT).refine(
888
1041
  (providers) => new Set(providers).size === providers.length,
@@ -1559,7 +1712,97 @@ var SeoReportListResponseSchema = successEnvelopeSchema(
1559
1712
  SeoReportListDataSchema
1560
1713
  );
1561
1714
  var SeoReportResponseSchema = successEnvelopeSchema(SeoReportSchema);
1715
+ var BacklinkOpportunityTypeSchema = z.enum(["TOOL_ROUNDUP", "COMPARISON", "RESOURCE_PAGE", "RELEVANT_ARTICLE"]);
1716
+ var BacklinkProspectStageSchema = z.enum(["NEW", "APPROVED", "CONTACT_RESEARCHING", "REVIEW_OUTREACH", "READY_TO_CONTACT", "CONTACTED", "REPLIED", "LINK_WON", "REJECTED", "NO_CONTACT", "DECLINED"]);
1717
+ var BacklinkNextActionSchema = z.enum(["REVIEW", "FIND_CONTACT", "VIEW_PROGRESS", "REVIEW_OUTREACH", "COPY_OUTREACH", "RETRY_CONTACT", "OPEN"]);
1718
+ var BacklinkContactStateSchema = z.enum(["PUBLIC_CONFIRMED", "GENERIC_PUBLIC", "NOT_FOUND", "STALE"]);
1719
+ var BacklinkVerificationStateSchema = z.enum(["QUEUED", "CHECKING", "VERIFIED", "MISSING", "BLOCKED", "FAILED"]);
1720
+ var BacklinkScoreReasonSchema = z.object({ score: z.number().int().min(0).max(100), reason: z.string().min(1).max(500) }).strict();
1721
+ var BacklinkScoreComponentsSchema = z.object({
1722
+ topicalRelevance: BacklinkScoreReasonSchema,
1723
+ editorialFit: BacklinkScoreReasonSchema,
1724
+ pageFreshness: BacklinkScoreReasonSchema,
1725
+ siteLegitimacy: BacklinkScoreReasonSchema,
1726
+ outreachFeasibility: BacklinkScoreReasonSchema.optional(),
1727
+ publisherType: z.enum([
1728
+ "INDEPENDENT_PUBLISHER",
1729
+ "PROFESSIONAL_ORGANIZATION",
1730
+ "EDUCATIONAL_ORGANIZATION",
1731
+ "AGENCY_OR_ECOSYSTEM",
1732
+ "REVIEW_OR_DIRECTORY",
1733
+ "PRODUCT_VENDOR",
1734
+ "MARKETPLACE",
1735
+ "COMMUNITY",
1736
+ "OWNED",
1737
+ "UNKNOWN"
1738
+ ]).optional(),
1739
+ difficulty: z.enum(["EASY", "MEDIUM", "HARD"]).optional(),
1740
+ productClaimsToVerify: z.array(z.string().min(1).max(300)).max(10).optional()
1741
+ }).strict();
1742
+ var BacklinkProspectSchema = z.object({
1743
+ id: SeoEntityIdSchema,
1744
+ projectId: SeoEntityIdSchema,
1745
+ url: z.string().url().max(2048),
1746
+ domain: z.string().min(1).max(253),
1747
+ title: z.string().min(1).max(300),
1748
+ opportunityType: BacklinkOpportunityTypeSchema,
1749
+ stage: BacklinkProspectStageSchema,
1750
+ version: z.number().int().positive(),
1751
+ nextAction: BacklinkNextActionSchema,
1752
+ score: z.number().int().min(0).max(100),
1753
+ scoreComponents: BacklinkScoreComponentsSchema,
1754
+ evidenceExcerpt: z.string().min(1).max(2e3),
1755
+ evidenceSourceUrl: z.string().url().max(2048),
1756
+ suggestedTargetUrl: z.string().url().max(2048),
1757
+ placementAngle: z.string().min(1).max(1e3),
1758
+ contactState: BacklinkContactStateSchema,
1759
+ lastCheckedAt: z.string().datetime(),
1760
+ createdAt: z.string().datetime(),
1761
+ updatedAt: z.string().datetime()
1762
+ }).strict();
1763
+ var BacklinkProspectListQuerySchema = z.object({
1764
+ limit: z.coerce.number().int().min(1).max(50).default(20),
1765
+ cursor: SeoCursorSchema.optional(),
1766
+ stage: BacklinkProspectStageSchema.optional(),
1767
+ opportunityType: BacklinkOpportunityTypeSchema.optional()
1768
+ }).strict();
1769
+ var BacklinkProspectListDataSchema = z.object({
1770
+ items: z.array(BacklinkProspectSchema).max(50),
1771
+ page: z.object({ limit: z.number().int().min(1).max(50), nextCursor: SeoCursorSchema.nullable() }).strict()
1772
+ }).strict();
1773
+ var BacklinkProspectListResponseSchema = successEnvelopeSchema(BacklinkProspectListDataSchema);
1774
+ var BacklinkProspectResponseSchema = successEnvelopeSchema(BacklinkProspectSchema);
1775
+ var BacklinkTargetInputSchema = z.object({ url: z.string().url().max(2048), label: z.string().trim().min(1).max(120), topicSummary: z.string().trim().min(1).max(500).optional() }).strict();
1776
+ var BacklinkDiscoveryInputSchema = z.object({ limit: z.number().int().min(1).max(20).default(20) }).strict();
1777
+ var BacklinkStageUpdateInputSchema = z.object({ stage: BacklinkProspectStageSchema, expectedVersion: z.number().int().positive() }).strict();
1778
+ var BacklinkVerificationInputSchema = z.object({ url: z.string().url().max(2048), expectedVersion: z.number().int().positive() }).strict();
1779
+ var BacklinkOutreachUpdateInputSchema = z.object({ expectedVersion: z.number().int().positive(), subject: z.string().trim().min(1).max(200), body: z.string().trim().min(1).max(3e3) }).strict();
1780
+ var BacklinkTargetSchema = z.object({ id: SeoEntityIdSchema, projectId: SeoEntityIdSchema, normalizedUrl: z.string().url().max(2048), label: z.string().min(1).max(120), topicSummary: z.string().max(500).nullable(), enabled: z.boolean(), createdAt: z.string().datetime(), updatedAt: z.string().datetime() }).strict();
1781
+ var BacklinkTargetListResponseSchema = successEnvelopeSchema(z.array(BacklinkTargetSchema).max(10));
1782
+ var BacklinkTargetResponseSchema = successEnvelopeSchema(BacklinkTargetSchema);
1783
+ var BacklinkDiscoveryRunSchema = z.object({ id: SeoEntityIdSchema, projectId: SeoEntityIdSchema, status: z.enum(["QUEUED", "RUNNING", "SUCCEEDED", "PARTIAL", "FAILED", "CANCELLED"]), promptVersion: z.number().int().positive(), configurationVersion: z.number().int().positive(), searchedCount: z.number().int().nonnegative(), fetchedCount: z.number().int().nonnegative(), savedCount: z.number().int().nonnegative(), failedCount: z.number().int().nonnegative(), safeErrorCode: z.string().max(100).nullable(), createdAt: z.string().datetime(), updatedAt: z.string().datetime() }).strict();
1784
+ var BacklinkDiscoveryRunResponseSchema = successEnvelopeSchema(BacklinkDiscoveryRunSchema);
1785
+ var BacklinkQueueResponseSchema = successEnvelopeSchema(z.object({ prospectId: SeoEntityIdSchema, status: z.literal("QUEUED") }).strict());
1786
+ var BacklinkVerificationSchema = z.object({ id: SeoEntityIdSchema, prospectId: SeoEntityIdSchema, state: BacklinkVerificationStateSchema, submittedUrl: z.string().url(), expectedTargetUrl: z.string().url() }).strict();
1787
+ var BacklinkVerificationResponseSchema = successEnvelopeSchema(BacklinkVerificationSchema);
1788
+ var BacklinkOutreachDraftSchema = z.object({ id: SeoEntityIdSchema, prospectId: SeoEntityIdSchema, version: z.number().int().positive(), subject: z.string().max(200), body: z.string().max(3e3) }).strict();
1789
+ var BacklinkOutreachDraftResponseSchema = successEnvelopeSchema(BacklinkOutreachDraftSchema);
1790
+ var BacklinkContactSchema = z.object({
1791
+ prospectId: SeoEntityIdSchema,
1792
+ name: z.string().max(160).nullable(),
1793
+ role: z.string().max(120).nullable(),
1794
+ email: z.string().email().max(320),
1795
+ evidenceState: BacklinkContactStateSchema.exclude(["NOT_FOUND"]),
1796
+ sourceUrl: z.string().url().max(2048),
1797
+ evidenceExcerpt: z.string().min(1).max(1e3),
1798
+ checkedAt: z.string().datetime(),
1799
+ draft: z.object({ version: z.number().int().positive(), subject: z.string().max(200), body: z.string().max(3e3) }).strict().nullable()
1800
+ }).strict();
1801
+ var BacklinkContactListDataSchema = z.object({ items: z.array(BacklinkContactSchema).max(50), page: z.object({ limit: z.number().int().min(1).max(50), nextCursor: SeoCursorSchema.nullable() }).strict() }).strict();
1802
+ var BacklinkContactListQuerySchema = z.object({ limit: z.coerce.number().int().min(1).max(50).default(20), cursor: SeoCursorSchema.optional() }).strict();
1803
+ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactListDataSchema);
1562
1804
  export {
1805
+ AGENT_CAPABILITIES,
1563
1806
  API_VERSION,
1564
1807
  ActorSchema,
1565
1808
  AgentBlogApprovalExecuteRequestSchema,
@@ -1573,6 +1816,7 @@ export {
1573
1816
  AgentBlogArticleCreateRequestSchema,
1574
1817
  AgentBlogArticleDetailSchema,
1575
1818
  AgentBlogArticleListResponseSchema,
1819
+ AgentBlogArticleQualitySummarySchema,
1576
1820
  AgentBlogArticleQueuedResponseSchema,
1577
1821
  AgentBlogArticleResponseSchema,
1578
1822
  AgentBlogArticleSchema,
@@ -1602,12 +1846,22 @@ export {
1602
1846
  AgentBlogImageUploadPrepareRequestSchema,
1603
1847
  AgentBlogJobResponseSchema,
1604
1848
  AgentBlogJobSchema,
1849
+ AgentBlogMetricSourceSchema,
1850
+ AgentBlogPerformanceObservationSchema,
1851
+ AgentBlogPlanCadenceExecuteRequestSchema,
1852
+ AgentBlogPlanCadenceExecuteResponseSchema,
1853
+ AgentBlogPlanCadenceExecuteSchema,
1854
+ AgentBlogPlanCadencePreviewRequestSchema,
1855
+ AgentBlogPlanCadencePreviewResponseSchema,
1856
+ AgentBlogPlanCadencePreviewSchema,
1605
1857
  AgentBlogPlanCreateRequestSchema,
1858
+ AgentBlogPlanDateMoveSchema,
1606
1859
  AgentBlogPlanItemResponseSchema,
1607
1860
  AgentBlogPlanItemSchema,
1608
1861
  AgentBlogPlanItemStateRequestSchema,
1609
1862
  AgentBlogPlanItemsResponseSchema,
1610
1863
  AgentBlogPlanListResponseSchema,
1864
+ AgentBlogPlanLockedItemSchema,
1611
1865
  AgentBlogPlanQueuedResponseSchema,
1612
1866
  AgentBlogPlanRetryRequestSchema,
1613
1867
  AgentBlogPlanSchema,
@@ -1637,17 +1891,63 @@ export {
1637
1891
  AgentBlogSchedulePreviewSchema,
1638
1892
  AgentBlogSetupStatusResponseSchema,
1639
1893
  AgentBlogSetupStatusSchema,
1894
+ AgentBlogWebhookDestinationChangeSchema,
1895
+ AgentBlogWebhookDestinationExecuteRequestSchema,
1896
+ AgentBlogWebhookDestinationExecuteResponseSchema,
1897
+ AgentBlogWebhookDestinationExecuteSchema,
1898
+ AgentBlogWebhookDestinationPreviewRequestSchema,
1899
+ AgentBlogWebhookDestinationPreviewResponseSchema,
1900
+ AgentBlogWebhookDestinationPreviewSchema,
1901
+ AgentBlogWebhookRotateExecuteRequestSchema,
1902
+ AgentBlogWebhookRotateExecuteResponseSchema,
1903
+ AgentBlogWebhookRotateExecuteSchema,
1904
+ AgentBlogWebhookRotatePreviewRequestSchema,
1905
+ AgentBlogWebhookRotatePreviewResponseSchema,
1906
+ AgentBlogWebhookRotatePreviewSchema,
1907
+ AgentBlogWebhookSemanticsSchema,
1908
+ AgentBlogWebhookTestRequestSchema,
1909
+ AgentBlogWebhookTestResponseSchema,
1910
+ AgentBlogWebhookTestSchema,
1640
1911
  ApiErrorCodeSchema,
1641
1912
  ApiMetaResponseSchema,
1642
1913
  ApiMetaSchema,
1643
1914
  ApiProblemSchema,
1644
1915
  AuthenticationKindSchema,
1916
+ BacklinkContactListDataSchema,
1917
+ BacklinkContactListQuerySchema,
1918
+ BacklinkContactListResponseSchema,
1919
+ BacklinkContactSchema,
1920
+ BacklinkContactStateSchema,
1921
+ BacklinkDiscoveryInputSchema,
1922
+ BacklinkDiscoveryRunResponseSchema,
1923
+ BacklinkDiscoveryRunSchema,
1924
+ BacklinkNextActionSchema,
1925
+ BacklinkOpportunityTypeSchema,
1926
+ BacklinkOutreachDraftResponseSchema,
1927
+ BacklinkOutreachDraftSchema,
1928
+ BacklinkOutreachUpdateInputSchema,
1929
+ BacklinkProspectListDataSchema,
1930
+ BacklinkProspectListQuerySchema,
1931
+ BacklinkProspectListResponseSchema,
1932
+ BacklinkProspectResponseSchema,
1933
+ BacklinkProspectSchema,
1934
+ BacklinkProspectStageSchema,
1935
+ BacklinkQueueResponseSchema,
1936
+ BacklinkScoreComponentsSchema,
1937
+ BacklinkStageUpdateInputSchema,
1938
+ BacklinkTargetInputSchema,
1939
+ BacklinkTargetListResponseSchema,
1940
+ BacklinkTargetResponseSchema,
1941
+ BacklinkTargetSchema,
1942
+ BacklinkVerificationInputSchema,
1943
+ BacklinkVerificationResponseSchema,
1944
+ BacklinkVerificationSchema,
1945
+ BacklinkVerificationStateSchema,
1645
1946
  BlogArticleListSchema,
1646
1947
  BlogImageSchema,
1647
1948
  BlogMetadataSchema,
1648
1949
  BlogSitemapEntrySchema,
1649
1950
  BlogSlugRedirectSchema,
1650
- CLI_BROWSER_AUTHORIZATION_TIMEOUT_MS,
1651
1951
  CONTRACT_VERSION,
1652
1952
  CalendarEventSchema,
1653
1953
  CalendarListDataSchema,
@@ -1657,11 +1957,6 @@ export {
1657
1957
  CapabilitiesResponseSchema,
1658
1958
  CapabilityIdSchema,
1659
1959
  CapabilitySchema,
1660
- CliAuthorizationCredentialSchema,
1661
- CliAuthorizationExchangeRequestSchema,
1662
- CliAuthorizationExchangeResponseSchema,
1663
- CliAuthorizationRevokeDataSchema,
1664
- CliAuthorizationRevokeResponseSchema,
1665
1960
  DraftPostInputSchema,
1666
1961
  DraftPostUpdateInputSchema,
1667
1962
  IntegrationConnectionStatusSchema,