@rolino/contracts 0.8.0 → 0.9.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @rolino/contracts
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b4ebe20: Expose saved remote delivery IDs and safe provider management links in post destination results.
8
+ - 592d4f2: Add existing-delivery checks and confirmed YouTube recovery across the API, SDK, CLI, and MCP. Preserve exact video and version bindings, action-specific permissions, and stable retry results without uploading another copy. Show saved remote IDs in CLI post details.
9
+
3
10
  ## 0.8.0
4
11
 
5
12
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -210,6 +210,9 @@ __export(index_exports, {
210
210
  NormalizedMediaCleanupSelectionSchema: () => NormalizedMediaCleanupSelectionSchema,
211
211
  PUBLISHING_PROVIDER_COUNT: () => PUBLISHING_PROVIDER_COUNT,
212
212
  PlatformPostStatusSchema: () => PlatformPostStatusSchema,
213
+ PostDeliveryCheckInputSchema: () => PostDeliveryCheckInputSchema,
214
+ PostDeliveryCheckResponseSchema: () => PostDeliveryCheckResponseSchema,
215
+ PostDeliveryCheckResultSchema: () => PostDeliveryCheckResultSchema,
213
216
  PostDeliveryModeSchema: () => PostDeliveryModeSchema,
214
217
  PostDestinationSchema: () => PostDestinationSchema,
215
218
  PostDestinationStageSchema: () => PostDestinationStageSchema,
@@ -225,6 +228,12 @@ __export(index_exports, {
225
228
  PostReadinessCheckSchema: () => PostReadinessCheckSchema,
226
229
  PostReadinessResponseSchema: () => PostReadinessResponseSchema,
227
230
  PostReadinessSchema: () => PostReadinessSchema,
231
+ PostRecoveryExecuteInputSchema: () => PostRecoveryExecuteInputSchema,
232
+ PostRecoveryInputSchema: () => PostRecoveryInputSchema,
233
+ PostRecoveryPreviewResponseSchema: () => PostRecoveryPreviewResponseSchema,
234
+ PostRecoveryPreviewSchema: () => PostRecoveryPreviewSchema,
235
+ PostRecoveryResponseSchema: () => PostRecoveryResponseSchema,
236
+ PostRecoveryResultSchema: () => PostRecoveryResultSchema,
228
237
  PostResponseSchema: () => PostResponseSchema,
229
238
  PostScheduleExecuteInputSchema: () => PostScheduleExecuteInputSchema,
230
239
  PostScheduleExecuteResponseSchema: () => PostScheduleExecuteResponseSchema,
@@ -298,7 +307,7 @@ __export(index_exports, {
298
307
  module.exports = __toCommonJS(index_exports);
299
308
  var import_zod = require("zod");
300
309
  var API_VERSION = "v1";
301
- var CONTRACT_VERSION = "0.19.0";
310
+ var CONTRACT_VERSION = "0.20.0";
302
311
  var RequestMetadataSchema = import_zod.z.object({
303
312
  requestId: import_zod.z.string().min(1)
304
313
  });
@@ -1345,6 +1354,9 @@ var PostDestinationSchema = import_zod.z.object({
1345
1354
  scheduledAt: import_zod.z.string().datetime().nullable(),
1346
1355
  publishedAt: import_zod.z.string().datetime().nullable(),
1347
1356
  remoteUrl: import_zod.z.string().url().nullable(),
1357
+ remotePostId: import_zod.z.string().nullable().optional(),
1358
+ remoteContainerId: import_zod.z.string().nullable().optional(),
1359
+ studioUrl: import_zod.z.string().url().nullable().optional(),
1348
1360
  attemptCount: import_zod.z.number().int().nonnegative()
1349
1361
  });
1350
1362
  var TikTokPostSettingsSchema = import_zod.z.object({
@@ -2287,6 +2299,61 @@ var BacklinkContactSchema = import_zod.z.object({
2287
2299
  var BacklinkContactListDataSchema = import_zod.z.object({ items: import_zod.z.array(BacklinkContactSchema).max(50), page: import_zod.z.object({ limit: import_zod.z.number().int().min(1).max(50), nextCursor: SeoCursorSchema.nullable() }).strict() }).strict();
2288
2300
  var BacklinkContactListQuerySchema = import_zod.z.object({ limit: import_zod.z.coerce.number().int().min(1).max(50).default(20), cursor: SeoCursorSchema.optional() }).strict();
2289
2301
  var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactListDataSchema);
2302
+ var PostDeliveryCheckInputSchema = import_zod.z.object({ provider: PublishingProviderSchema }).strict();
2303
+ var PostDeliveryCheckResultSchema = import_zod.z.object({
2304
+ postId: import_zod.z.string().min(1),
2305
+ provider: PublishingProviderSchema,
2306
+ kind: import_zod.z.enum(["PUBLISHED", "SCHEDULED", "PROCESSING", "ACTION_REQUIRED", "UNKNOWN", "BUSY"]),
2307
+ message: import_zod.z.string(),
2308
+ version: import_zod.z.number().int().positive(),
2309
+ remotePostId: import_zod.z.string().nullable(),
2310
+ remoteContainerId: import_zod.z.string().nullable(),
2311
+ studioUrl: import_zod.z.string().url().nullable()
2312
+ });
2313
+ var PostDeliveryCheckResponseSchema = successEnvelopeSchema(PostDeliveryCheckResultSchema);
2314
+ var PostRecoveryInputSchema = import_zod.z.object({
2315
+ provider: import_zod.z.literal("YOUTUBE"),
2316
+ action: import_zod.z.enum(["ATTACH", "RESUME"]),
2317
+ videoId: import_zod.z.string().regex(/^[\w-]{11}$/),
2318
+ publishAt: import_zod.z.string().datetime({ offset: true }).nullable().optional()
2319
+ }).strict().superRefine((input, context) => {
2320
+ if (input.action === "RESUME" && input.publishAt === void 0) {
2321
+ context.addIssue({ code: "custom", path: ["publishAt"], message: "RESUME requires a future time or explicit null to publish now." });
2322
+ }
2323
+ if (input.action === "ATTACH" && input.publishAt !== void 0) {
2324
+ context.addIssue({ code: "custom", path: ["publishAt"], message: "Attachment cannot change publication time." });
2325
+ }
2326
+ });
2327
+ var PostRecoveryExecuteInputSchema = PostRecoveryInputSchema.safeExtend({
2328
+ confirmationToken: import_zod.z.string().trim().min(1).max(200)
2329
+ });
2330
+ var PostRecoveryPreviewSchema = import_zod.z.object({
2331
+ operation: import_zod.z.literal("posts.recovery.execute"),
2332
+ projectId: import_zod.z.string().min(1),
2333
+ postId: import_zod.z.string().min(1),
2334
+ provider: import_zod.z.literal("YOUTUBE"),
2335
+ action: import_zod.z.enum(["ATTACH", "RESUME"]),
2336
+ videoId: import_zod.z.string(),
2337
+ publishAt: import_zod.z.string().datetime({ offset: true }).nullable().optional(),
2338
+ version: import_zod.z.number().int().positive(),
2339
+ title: import_zod.z.string(),
2340
+ description: import_zod.z.string(),
2341
+ channel: import_zod.z.string().nullable(),
2342
+ accountId: import_zod.z.string(),
2343
+ privacy: import_zod.z.string(),
2344
+ consequence: import_zod.z.string(),
2345
+ confirmation: import_zod.z.object({ token: import_zod.z.string().min(1), expiresAt: import_zod.z.string().datetime() })
2346
+ });
2347
+ var PostRecoveryPreviewResponseSchema = successEnvelopeSchema(PostRecoveryPreviewSchema);
2348
+ var PostRecoveryResultSchema = import_zod.z.object({
2349
+ postId: import_zod.z.string().min(1),
2350
+ provider: import_zod.z.literal("YOUTUBE"),
2351
+ action: import_zod.z.enum(["ATTACH", "RESUME"]),
2352
+ videoId: import_zod.z.string(),
2353
+ kind: import_zod.z.enum(["ATTACHED", "QUEUED", "PUBLISHED"]),
2354
+ version: import_zod.z.number().int().positive()
2355
+ });
2356
+ var PostRecoveryResponseSchema = successEnvelopeSchema(PostRecoveryResultSchema);
2290
2357
  // Annotate the CommonJS export names for ESM import in node:
2291
2358
  0 && (module.exports = {
2292
2359
  AGENT_CAPABILITIES,
@@ -2479,6 +2546,9 @@ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactLis
2479
2546
  NormalizedMediaCleanupSelectionSchema,
2480
2547
  PUBLISHING_PROVIDER_COUNT,
2481
2548
  PlatformPostStatusSchema,
2549
+ PostDeliveryCheckInputSchema,
2550
+ PostDeliveryCheckResponseSchema,
2551
+ PostDeliveryCheckResultSchema,
2482
2552
  PostDeliveryModeSchema,
2483
2553
  PostDestinationSchema,
2484
2554
  PostDestinationStageSchema,
@@ -2494,6 +2564,12 @@ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactLis
2494
2564
  PostReadinessCheckSchema,
2495
2565
  PostReadinessResponseSchema,
2496
2566
  PostReadinessSchema,
2567
+ PostRecoveryExecuteInputSchema,
2568
+ PostRecoveryInputSchema,
2569
+ PostRecoveryPreviewResponseSchema,
2570
+ PostRecoveryPreviewSchema,
2571
+ PostRecoveryResponseSchema,
2572
+ PostRecoveryResultSchema,
2497
2573
  PostResponseSchema,
2498
2574
  PostScheduleExecuteInputSchema,
2499
2575
  PostScheduleExecuteResponseSchema,