@rolino/contracts 0.1.0 → 0.3.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,17 @@
1
1
  # @rolino/contracts
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5267911: Add LinkedIn member publishing as a gated provider across public contracts, SDK, CLI, and MCP workflows.
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 7d34580: Add account-specific TikTok delivery options, explicit settings review, safe partial draft updates, provider-keyed post settings, and streamed media uploads with server-verified metadata.
14
+
3
15
  ## 0.1.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -4,22 +4,29 @@ Zod schemas and TypeScript types for Rolino's versioned public API. This package
4
4
  contains transport-safe DTOs only; it must not depend on Prisma, Next.js, auth
5
5
  providers, or server implementation details.
6
6
 
7
- Contract 0.9 covers discovery, identity, capabilities, project reads and
8
- idempotent project creation, safe post and calendar reads, idempotent draft
9
- writes, and server-confirmed Instagram, TikTok, YouTube, and Bluesky scheduling
10
- and immediate publishing. YouTube additions include explicit draft settings,
11
- provider readiness, early scheduled preparation, and typed pending schedule
12
- reconciliation. Bluesky additions include 300-grapheme caption overrides,
13
- text-only and image readiness, health, scheduling, and publishing. Project and
14
- post DTOs intentionally omit storage, credentials, upload sessions, and other
15
- publishing-provider internals.
16
-
17
- Contract support does not imply that a deployment enabled YouTube or Bluesky,
18
- or completed Google/YouTube review. Servers remain authoritative for provider
19
- gates, readiness, confirmation, and reconciliation. Operators should follow the
20
- [YouTube operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/youtube.md)
21
- and
22
- [Bluesky operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/bluesky.md).
7
+ Contract 0.14 covers discovery, identity, capabilities, project reads and
8
+ idempotent project creation, safe post and calendar reads, idempotent draft
9
+ writes, and server-confirmed Instagram, TikTok, YouTube, Bluesky, and LinkedIn scheduling
10
+ and immediate publishing. YouTube additions include explicit draft settings,
11
+ provider readiness, early scheduled preparation, and typed pending schedule
12
+ reconciliation. Bluesky additions include 300-grapheme caption overrides,
13
+ text-only and image readiness, health, scheduling, and publishing. TikTok
14
+ additions include separately reviewed draft choices, secret-safe account-level
15
+ delivery options, server-stamped review time, and exact interaction enforcement.
16
+ LinkedIn additions include a 3,000-character destination override, text and
17
+ single/multi-image readiness, and a strict member-delivery-options variant.
18
+ Draft updates are partial, and post reads expose reusable asset IDs plus
19
+ provider-keyed sanitized settings so future provider variants remain additive.
20
+ Project and post DTOs intentionally omit storage credentials, upload sessions,
21
+ tokens, and other publishing-provider internals.
22
+
23
+ Contract support does not imply that a deployment enabled YouTube, Bluesky, or LinkedIn,
24
+ or completed Google/YouTube review. Servers remain authoritative for provider
25
+ gates, readiness, confirmation, and reconciliation. Operators should follow the
26
+ [YouTube operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/youtube.md)
27
+ and
28
+ [Bluesky operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/bluesky.md), and
29
+ [LinkedIn operations guide](https://github.com/deifos/rolino/blob/main/docs/integrations/linkedin.md).
23
30
 
24
31
  This is a supported transitive dependency of the public SDK, CLI, and MCP
25
32
  packages. Most users should install one of those entry points rather than
@@ -27,8 +34,8 @@ installing contracts directly.
27
34
 
28
35
  ## Support, security, and license
29
36
 
30
- Stable releases are published only after the maintainer approves the release
31
- gate. Report bugs through the
37
+ Stable releases are published only after the maintainer approves the release
38
+ gate. Report bugs through the
32
39
  [Rolino issue tracker](https://github.com/deifos/rolino/issues) and security
33
40
  issues through the repository's
34
41
  [security policy](https://github.com/deifos/rolino/security/policy).
package/dist/index.cjs CHANGED
@@ -43,10 +43,12 @@ __export(index_exports, {
43
43
  CliAuthorizationRevokeDataSchema: () => CliAuthorizationRevokeDataSchema,
44
44
  CliAuthorizationRevokeResponseSchema: () => CliAuthorizationRevokeResponseSchema,
45
45
  DraftPostInputSchema: () => DraftPostInputSchema,
46
+ DraftPostUpdateInputSchema: () => DraftPostUpdateInputSchema,
46
47
  IntegrationConnectionStatusSchema: () => IntegrationConnectionStatusSchema,
47
48
  IntegrationHealthListDataSchema: () => IntegrationHealthListDataSchema,
48
49
  IntegrationHealthListResponseSchema: () => IntegrationHealthListResponseSchema,
49
50
  IntegrationHealthSchema: () => IntegrationHealthSchema,
51
+ LinkedInDeliveryOptionsSchema: () => LinkedInDeliveryOptionsSchema,
50
52
  MediaAssetListDataSchema: () => MediaAssetListDataSchema,
51
53
  MediaAssetListQuerySchema: () => MediaAssetListQuerySchema,
52
54
  MediaAssetListResponseSchema: () => MediaAssetListResponseSchema,
@@ -63,6 +65,7 @@ __export(index_exports, {
63
65
  PostListQuerySchema: () => PostListQuerySchema,
64
66
  PostListResponseSchema: () => PostListResponseSchema,
65
67
  PostMediaSchema: () => PostMediaSchema,
68
+ PostProviderSettingsSchema: () => PostProviderSettingsSchema,
66
69
  PostPublishExecuteInputSchema: () => PostPublishExecuteInputSchema,
67
70
  PostPublishInputSchema: () => PostPublishInputSchema,
68
71
  PostPublishPreviewResponseSchema: () => PostPublishPreviewResponseSchema,
@@ -87,11 +90,16 @@ __export(index_exports, {
87
90
  ProjectResponseSchema: () => ProjectResponseSchema,
88
91
  ProjectSchema: () => ProjectSchema,
89
92
  ProjectTypeSchema: () => ProjectTypeSchema,
93
+ ProviderDeliveryOptionsProviderSchema: () => ProviderDeliveryOptionsProviderSchema,
94
+ ProviderDeliveryOptionsResponseSchema: () => ProviderDeliveryOptionsResponseSchema,
95
+ ProviderDeliveryOptionsSchema: () => ProviderDeliveryOptionsSchema,
90
96
  ProviderHealthStatusSchema: () => ProviderHealthStatusSchema,
91
97
  PublishingProviderSchema: () => PublishingProviderSchema,
92
98
  ReadinessActionSchema: () => ReadinessActionSchema,
93
99
  ReadinessStatusSchema: () => ReadinessStatusSchema,
94
100
  RequestMetadataSchema: () => RequestMetadataSchema,
101
+ TikTokDeliveryOptionsSchema: () => TikTokDeliveryOptionsSchema,
102
+ TikTokDraftSettingsSchema: () => TikTokDraftSettingsSchema,
95
103
  TikTokPostSettingsSchema: () => TikTokPostSettingsSchema,
96
104
  WhoAmIResponseSchema: () => WhoAmIResponseSchema,
97
105
  YouTubePostSettingsSchema: () => YouTubePostSettingsSchema,
@@ -100,7 +108,7 @@ __export(index_exports, {
100
108
  module.exports = __toCommonJS(index_exports);
101
109
  var import_zod = require("zod");
102
110
  var API_VERSION = "v1";
103
- var CONTRACT_VERSION = "0.12.0";
111
+ var CONTRACT_VERSION = "0.14.0";
104
112
  var RequestMetadataSchema = import_zod.z.object({
105
113
  requestId: import_zod.z.string().min(1)
106
114
  });
@@ -286,9 +294,11 @@ var PlatformPostStatusSchema = import_zod.z.enum([
286
294
  ]);
287
295
  var PostMediaSchema = import_zod.z.object({
288
296
  id: import_zod.z.string().min(1),
297
+ assetId: import_zod.z.string().min(1).nullable().optional(),
289
298
  type: import_zod.z.enum(["IMAGE", "VIDEO"]),
290
299
  url: import_zod.z.string().url(),
291
300
  mimeType: import_zod.z.string().min(1),
301
+ sizeBytes: import_zod.z.number().int().positive().nullable().optional(),
292
302
  width: import_zod.z.number().int().positive().nullable(),
293
303
  height: import_zod.z.number().int().positive().nullable(),
294
304
  durationMs: import_zod.z.number().int().nonnegative().nullable(),
@@ -343,54 +353,23 @@ var MediaAssetUploadCompleteInputSchema = MediaAssetUploadInputSchema.extend({
343
353
  durationMs: import_zod.z.number().int().nonnegative().max(864e5).nullable().optional()
344
354
  }).strict();
345
355
  var MediaAssetResponseSchema = successEnvelopeSchema(MediaAssetSchema);
346
- var PostDestinationSchema = import_zod.z.object({
347
- provider: import_zod.z.enum(["INSTAGRAM", "TIKTOK", "YOUTUBE", "BLUESKY"]),
348
- status: PlatformPostStatusSchema,
349
- captionOverride: import_zod.z.string().nullable(),
350
- scheduledAt: import_zod.z.string().datetime().nullable(),
351
- publishedAt: import_zod.z.string().datetime().nullable(),
352
- remoteUrl: import_zod.z.string().url().nullable(),
353
- attemptCount: import_zod.z.number().int().nonnegative()
354
- });
355
356
  var PublishingProviderSchema = import_zod.z.enum([
356
357
  "INSTAGRAM",
357
358
  "TIKTOK",
358
359
  "YOUTUBE",
359
- "BLUESKY"
360
+ "BLUESKY",
361
+ "LINKEDIN"
360
362
  ]);
361
363
  var PUBLISHING_PROVIDER_COUNT = PublishingProviderSchema.options.length;
362
- var PostSchema = import_zod.z.object({
363
- id: import_zod.z.string().min(1),
364
- projectId: import_zod.z.string().min(1),
365
- version: import_zod.z.number().int().positive(),
366
- campaign: import_zod.z.object({
367
- id: import_zod.z.string().min(1),
368
- title: import_zod.z.string().min(1)
369
- }).nullable(),
370
- caption: import_zod.z.string(),
371
- status: PostStatusSchema,
364
+ var PostDestinationSchema = import_zod.z.object({
365
+ provider: PublishingProviderSchema,
366
+ status: PlatformPostStatusSchema,
367
+ captionOverride: import_zod.z.string().nullable(),
372
368
  scheduledAt: import_zod.z.string().datetime().nullable(),
373
- timezone: import_zod.z.string().nullable(),
374
369
  publishedAt: import_zod.z.string().datetime().nullable(),
375
- createdAt: import_zod.z.string().datetime(),
376
- updatedAt: import_zod.z.string().datetime(),
377
- media: import_zod.z.array(PostMediaSchema),
378
- destinations: import_zod.z.array(PostDestinationSchema)
379
- });
380
- var PostListQuerySchema = import_zod.z.object({
381
- limit: import_zod.z.coerce.number().int().min(1).max(100).default(50),
382
- cursor: import_zod.z.string().min(1).optional(),
383
- status: PostStatusSchema.optional()
384
- });
385
- var PostListDataSchema = import_zod.z.object({
386
- items: import_zod.z.array(PostSchema),
387
- page: import_zod.z.object({
388
- limit: import_zod.z.number().int().min(1).max(100),
389
- nextCursor: import_zod.z.string().min(1).nullable()
390
- })
370
+ remoteUrl: import_zod.z.string().url().nullable(),
371
+ attemptCount: import_zod.z.number().int().nonnegative()
391
372
  });
392
- var PostListResponseSchema = successEnvelopeSchema(PostListDataSchema);
393
- var PostResponseSchema = successEnvelopeSchema(PostSchema);
394
373
  var TikTokPostSettingsSchema = import_zod.z.object({
395
374
  postMode: import_zod.z.enum(["DIRECT_POST", "MEDIA_UPLOAD"]).default("DIRECT_POST"),
396
375
  privacyLevel: import_zod.z.string().trim().min(1).max(100).nullable().default(null),
@@ -404,6 +383,91 @@ var TikTokPostSettingsSchema = import_zod.z.object({
404
383
  videoCoverTimestampMs: import_zod.z.number().int().nonnegative().nullable().default(null),
405
384
  consentedAt: import_zod.z.union([import_zod.z.string().datetime(), import_zod.z.literal("")]).default("")
406
385
  }).strict();
386
+ var TikTokDraftSettingsSchema = import_zod.z.object({
387
+ postMode: import_zod.z.enum(["DIRECT_POST", "MEDIA_UPLOAD"]).optional(),
388
+ privacyLevel: import_zod.z.string().trim().min(1).max(100).nullable().optional(),
389
+ allowComment: import_zod.z.boolean().optional(),
390
+ allowDuet: import_zod.z.boolean().optional(),
391
+ allowStitch: import_zod.z.boolean().optional(),
392
+ commercialContentEnabled: import_zod.z.boolean().optional(),
393
+ promotesOwnBrand: import_zod.z.boolean().optional(),
394
+ promotesThirdParty: import_zod.z.boolean().optional(),
395
+ isAiGenerated: import_zod.z.boolean().optional(),
396
+ videoCoverTimestampMs: import_zod.z.number().int().nonnegative().nullable().optional(),
397
+ reviewed: import_zod.z.boolean().optional(),
398
+ consentedAt: import_zod.z.union([import_zod.z.string().datetime(), import_zod.z.literal("")]).optional()
399
+ }).strict().superRefine((input, context) => {
400
+ const requestsReview = input.reviewed === true || Boolean(input.consentedAt);
401
+ if (input.postMode === "MEDIA_UPLOAD") {
402
+ if (input.privacyLevel != null || input.allowComment === true || input.allowDuet === true || input.allowStitch === true || input.commercialContentEnabled === true || input.promotesOwnBrand === true || input.promotesThirdParty === true || input.isAiGenerated === true || input.videoCoverTimestampMs != null) {
403
+ context.addIssue({
404
+ code: "custom",
405
+ message: "TikTok inbox drafts do not apply direct-post visibility, interaction, disclosure, AI, or cover settings."
406
+ });
407
+ }
408
+ return;
409
+ }
410
+ if (!requestsReview) return;
411
+ if (!input.postMode) {
412
+ context.addIssue({
413
+ code: "custom",
414
+ path: ["postMode"],
415
+ message: "Choose TikTok direct publishing or inbox draft delivery explicitly."
416
+ });
417
+ return;
418
+ }
419
+ const requiredBooleanFields = [
420
+ "allowComment",
421
+ "allowDuet",
422
+ "allowStitch",
423
+ "commercialContentEnabled",
424
+ "promotesOwnBrand",
425
+ "promotesThirdParty",
426
+ "isAiGenerated"
427
+ ];
428
+ if (!input.privacyLevel) {
429
+ context.addIssue({
430
+ code: "custom",
431
+ path: ["privacyLevel"],
432
+ message: "Choose TikTok visibility explicitly before reviewing the settings."
433
+ });
434
+ }
435
+ for (const field of requiredBooleanFields) {
436
+ if (input[field] === void 0) {
437
+ context.addIssue({
438
+ code: "custom",
439
+ path: [field],
440
+ message: "Choose yes or no explicitly before reviewing TikTok settings."
441
+ });
442
+ }
443
+ }
444
+ if (input.commercialContentEnabled === true && input.promotesOwnBrand !== true && input.promotesThirdParty !== true) {
445
+ context.addIssue({
446
+ code: "custom",
447
+ path: ["commercialContentEnabled"],
448
+ message: "Commercial TikTok content must identify own-brand or third-party promotion."
449
+ });
450
+ }
451
+ if (input.commercialContentEnabled === false && (input.promotesOwnBrand === true || input.promotesThirdParty === true)) {
452
+ context.addIssue({
453
+ code: "custom",
454
+ path: ["commercialContentEnabled"],
455
+ message: "Promotion declarations require commercial content to be enabled."
456
+ });
457
+ }
458
+ }).transform((input) => ({
459
+ postMode: input.postMode ?? "DIRECT_POST",
460
+ privacyLevel: input.privacyLevel ?? null,
461
+ allowComment: input.allowComment ?? false,
462
+ allowDuet: input.allowDuet ?? false,
463
+ allowStitch: input.allowStitch ?? false,
464
+ commercialContentEnabled: input.commercialContentEnabled ?? false,
465
+ promotesOwnBrand: input.promotesOwnBrand ?? false,
466
+ promotesThirdParty: input.promotesThirdParty ?? false,
467
+ isAiGenerated: input.isAiGenerated ?? false,
468
+ videoCoverTimestampMs: input.videoCoverTimestampMs ?? null,
469
+ reviewed: input.reviewed === true || Boolean(input.consentedAt)
470
+ }));
407
471
  function youtubeTagLength(tags) {
408
472
  return tags.reduce((total, tag, index) => total + (index ? 1 : 0) + tag.length + (tag.includes(" ") ? 2 : 0), 0);
409
473
  }
@@ -425,6 +489,43 @@ var YouTubePostSettingsSchema = import_zod.z.object({
425
489
  "YouTube tags exceed the 500-character aggregate limit."
426
490
  ).default([])
427
491
  }).strict();
492
+ var PostProviderSettingsSchema = import_zod.z.object({
493
+ TIKTOK: TikTokPostSettingsSchema.nullable().optional(),
494
+ YOUTUBE: YouTubePostSettingsSchema.nullable().optional()
495
+ }).strict().default({});
496
+ var PostSchema = import_zod.z.object({
497
+ id: import_zod.z.string().min(1),
498
+ projectId: import_zod.z.string().min(1),
499
+ version: import_zod.z.number().int().positive(),
500
+ campaign: import_zod.z.object({
501
+ id: import_zod.z.string().min(1),
502
+ title: import_zod.z.string().min(1)
503
+ }).nullable(),
504
+ caption: import_zod.z.string(),
505
+ status: PostStatusSchema,
506
+ scheduledAt: import_zod.z.string().datetime().nullable(),
507
+ timezone: import_zod.z.string().nullable(),
508
+ publishedAt: import_zod.z.string().datetime().nullable(),
509
+ createdAt: import_zod.z.string().datetime(),
510
+ updatedAt: import_zod.z.string().datetime(),
511
+ media: import_zod.z.array(PostMediaSchema),
512
+ destinations: import_zod.z.array(PostDestinationSchema),
513
+ providerSettings: PostProviderSettingsSchema.optional()
514
+ });
515
+ var PostListQuerySchema = import_zod.z.object({
516
+ limit: import_zod.z.coerce.number().int().min(1).max(100).default(50),
517
+ cursor: import_zod.z.string().min(1).optional(),
518
+ status: PostStatusSchema.optional()
519
+ });
520
+ var PostListDataSchema = import_zod.z.object({
521
+ items: import_zod.z.array(PostSchema),
522
+ page: import_zod.z.object({
523
+ limit: import_zod.z.number().int().min(1).max(100),
524
+ nextCursor: import_zod.z.string().min(1).nullable()
525
+ })
526
+ });
527
+ var PostListResponseSchema = successEnvelopeSchema(PostListDataSchema);
528
+ var PostResponseSchema = successEnvelopeSchema(PostSchema);
428
529
  var blueskyGraphemeSegmenter = new Intl.Segmenter("en", {
429
530
  granularity: "grapheme"
430
531
  });
@@ -437,24 +538,27 @@ var YouTubeDescriptionSchema = import_zod.z.string().max(5e3).refine(
437
538
  (value) => utf8Encoder.encode(value).length <= 5e3,
438
539
  "YouTube descriptions cannot exceed 5,000 UTF-8 bytes."
439
540
  );
440
- var DraftCaptionOverridesSchema = import_zod.z.object({
541
+ var DraftCaptionOverridesObjectSchema = import_zod.z.object({
441
542
  INSTAGRAM: import_zod.z.string().max(2200).nullable().optional(),
442
543
  TIKTOK: import_zod.z.string().max(2200).nullable().optional(),
443
544
  YOUTUBE: YouTubeDescriptionSchema.nullable().optional(),
444
- BLUESKY: BlueskyCaptionSchema.nullable().optional()
445
- }).strict().default({});
545
+ BLUESKY: BlueskyCaptionSchema.nullable().optional(),
546
+ LINKEDIN: import_zod.z.string().max(3e3).nullable().optional()
547
+ }).strict();
548
+ var DraftPlatformsSchema = import_zod.z.array(PublishingProviderSchema).max(PUBLISHING_PROVIDER_COUNT).refine(
549
+ (providers) => new Set(providers).size === providers.length,
550
+ "Publishing destinations must be unique."
551
+ );
552
+ var DraftMediaAssetIdsSchema = import_zod.z.array(import_zod.z.string().trim().min(1).max(200)).max(10).refine(
553
+ (ids) => new Set(ids).size === ids.length,
554
+ "Media asset IDs must be unique."
555
+ );
446
556
  var DraftPostInputSchema = import_zod.z.object({
447
- caption: import_zod.z.string().max(2200).transform((value) => value.trim()).default(""),
448
- platforms: import_zod.z.array(PublishingProviderSchema).max(PUBLISHING_PROVIDER_COUNT).refine(
449
- (providers) => new Set(providers).size === providers.length,
450
- "Publishing destinations must be unique."
451
- ).default([]),
452
- mediaAssetIds: import_zod.z.array(import_zod.z.string().trim().min(1).max(200)).max(10).refine(
453
- (ids) => new Set(ids).size === ids.length,
454
- "Media asset IDs must be unique."
455
- ).default([]),
456
- captionOverrides: DraftCaptionOverridesSchema,
457
- tiktokSettings: TikTokPostSettingsSchema.nullable().default(null),
557
+ caption: import_zod.z.string().max(3e3).transform((value) => value.trim()).default(""),
558
+ platforms: DraftPlatformsSchema.default([]),
559
+ mediaAssetIds: DraftMediaAssetIdsSchema.default([]),
560
+ captionOverrides: DraftCaptionOverridesObjectSchema.default({}),
561
+ tiktokSettings: TikTokDraftSettingsSchema.nullable().default(null),
458
562
  youtubeSettings: YouTubePostSettingsSchema.nullable().default(null)
459
563
  }).strict().superRefine((input, context) => {
460
564
  if (input.caption.length === 0 && input.mediaAssetIds.length === 0) {
@@ -500,6 +604,32 @@ var DraftPostInputSchema = import_zod.z.object({
500
604
  });
501
605
  }
502
606
  });
607
+ var DraftPostUpdateInputSchema = import_zod.z.object({
608
+ caption: import_zod.z.string().max(3e3).transform((value) => value.trim()).optional(),
609
+ platforms: DraftPlatformsSchema.optional(),
610
+ mediaAssetIds: DraftMediaAssetIdsSchema.optional(),
611
+ captionOverrides: DraftCaptionOverridesObjectSchema.optional(),
612
+ tiktokSettings: TikTokDraftSettingsSchema.nullable().optional(),
613
+ youtubeSettings: YouTubePostSettingsSchema.nullable().optional()
614
+ }).strict().superRefine((input, context) => {
615
+ if (Object.values(input).every((value) => value === void 0)) {
616
+ context.addIssue({ code: "custom", message: "Provide at least one draft field to update." });
617
+ }
618
+ if (input.platforms && input.tiktokSettings && !input.platforms.includes("TIKTOK")) {
619
+ context.addIssue({
620
+ code: "custom",
621
+ path: ["tiktokSettings"],
622
+ message: "TikTok settings require the TIKTOK destination."
623
+ });
624
+ }
625
+ if (input.platforms && input.youtubeSettings && !input.platforms.includes("YOUTUBE")) {
626
+ context.addIssue({
627
+ code: "custom",
628
+ path: ["youtubeSettings"],
629
+ message: "YouTube settings require the YOUTUBE destination."
630
+ });
631
+ }
632
+ });
503
633
  var IntegrationConnectionStatusSchema = import_zod.z.enum([
504
634
  "PENDING",
505
635
  "CONNECTED",
@@ -542,6 +672,65 @@ var IntegrationHealthListDataSchema = import_zod.z.object({
542
672
  var IntegrationHealthListResponseSchema = successEnvelopeSchema(
543
673
  IntegrationHealthListDataSchema
544
674
  );
675
+ var ProviderDeliveryOptionsProviderSchema = import_zod.z.enum([
676
+ "TIKTOK",
677
+ "LINKEDIN"
678
+ ]);
679
+ var TikTokDeliveryOptionsSchema = import_zod.z.object({
680
+ provider: import_zod.z.literal("TIKTOK"),
681
+ account: import_zod.z.object({
682
+ username: import_zod.z.string().nullable(),
683
+ displayName: import_zod.z.string().nullable(),
684
+ avatarUrl: import_zod.z.string().url().nullable()
685
+ }),
686
+ allowedPostModes: import_zod.z.array(import_zod.z.enum(["DIRECT_POST", "MEDIA_UPLOAD"])).max(2).refine(
687
+ (items) => new Set(items).size === items.length,
688
+ "TikTok post modes must be unique."
689
+ ),
690
+ visibilityOptions: import_zod.z.array(import_zod.z.string().trim().min(1).max(100)).max(20).refine(
691
+ (items) => new Set(items).size === items.length,
692
+ "TikTok visibility options must be unique."
693
+ ),
694
+ interactions: import_zod.z.object({
695
+ comment: import_zod.z.object({ available: import_zod.z.boolean() }),
696
+ duet: import_zod.z.object({ available: import_zod.z.boolean() }),
697
+ stitch: import_zod.z.object({ available: import_zod.z.boolean() })
698
+ }),
699
+ maxVideoDurationMs: import_zod.z.number().int().positive().max(864e5).nullable(),
700
+ health: import_zod.z.object({
701
+ status: ProviderHealthStatusSchema,
702
+ code: import_zod.z.string().min(1),
703
+ message: import_zod.z.string().min(1)
704
+ }),
705
+ checkedAt: import_zod.z.string().datetime()
706
+ });
707
+ var LinkedInDeliveryOptionsSchema = import_zod.z.object({
708
+ provider: import_zod.z.literal("LINKEDIN"),
709
+ account: import_zod.z.object({
710
+ displayName: import_zod.z.string().nullable(),
711
+ avatarUrl: import_zod.z.string().url().nullable()
712
+ }),
713
+ supportedPostTypes: import_zod.z.array(import_zod.z.enum(["TEXT", "SINGLE_IMAGE", "MULTI_IMAGE"])).length(3),
714
+ image: import_zod.z.object({
715
+ maxItems: import_zod.z.literal(10),
716
+ mimeTypes: import_zod.z.tuple([import_zod.z.literal("image/jpeg"), import_zod.z.literal("image/png")]),
717
+ maxPixelsExclusive: import_zod.z.literal(36152320),
718
+ maxBytes: import_zod.z.literal(26214400)
719
+ }),
720
+ health: import_zod.z.object({
721
+ status: ProviderHealthStatusSchema,
722
+ code: import_zod.z.string().min(1),
723
+ message: import_zod.z.string().min(1)
724
+ }),
725
+ checkedAt: import_zod.z.string().datetime()
726
+ });
727
+ var ProviderDeliveryOptionsSchema = import_zod.z.discriminatedUnion("provider", [
728
+ TikTokDeliveryOptionsSchema,
729
+ LinkedInDeliveryOptionsSchema
730
+ ]);
731
+ var ProviderDeliveryOptionsResponseSchema = successEnvelopeSchema(
732
+ ProviderDeliveryOptionsSchema
733
+ );
545
734
  var ReadinessStatusSchema = import_zod.z.enum([
546
735
  "checking",
547
736
  "pass",
@@ -767,10 +956,12 @@ var CalendarListResponseSchema = successEnvelopeSchema(
767
956
  CliAuthorizationRevokeDataSchema,
768
957
  CliAuthorizationRevokeResponseSchema,
769
958
  DraftPostInputSchema,
959
+ DraftPostUpdateInputSchema,
770
960
  IntegrationConnectionStatusSchema,
771
961
  IntegrationHealthListDataSchema,
772
962
  IntegrationHealthListResponseSchema,
773
963
  IntegrationHealthSchema,
964
+ LinkedInDeliveryOptionsSchema,
774
965
  MediaAssetListDataSchema,
775
966
  MediaAssetListQuerySchema,
776
967
  MediaAssetListResponseSchema,
@@ -787,6 +978,7 @@ var CalendarListResponseSchema = successEnvelopeSchema(
787
978
  PostListQuerySchema,
788
979
  PostListResponseSchema,
789
980
  PostMediaSchema,
981
+ PostProviderSettingsSchema,
790
982
  PostPublishExecuteInputSchema,
791
983
  PostPublishInputSchema,
792
984
  PostPublishPreviewResponseSchema,
@@ -811,11 +1003,16 @@ var CalendarListResponseSchema = successEnvelopeSchema(
811
1003
  ProjectResponseSchema,
812
1004
  ProjectSchema,
813
1005
  ProjectTypeSchema,
1006
+ ProviderDeliveryOptionsProviderSchema,
1007
+ ProviderDeliveryOptionsResponseSchema,
1008
+ ProviderDeliveryOptionsSchema,
814
1009
  ProviderHealthStatusSchema,
815
1010
  PublishingProviderSchema,
816
1011
  ReadinessActionSchema,
817
1012
  ReadinessStatusSchema,
818
1013
  RequestMetadataSchema,
1014
+ TikTokDeliveryOptionsSchema,
1015
+ TikTokDraftSettingsSchema,
819
1016
  TikTokPostSettingsSchema,
820
1017
  WhoAmIResponseSchema,
821
1018
  YouTubePostSettingsSchema,