@rolino/contracts 0.8.0 → 0.10.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 +17 -0
- package/dist/index.cjs +248 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1285 -31
- package/dist/index.d.ts +1285 -31
- package/dist/index.js +221 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @rolino/contracts
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 601eda2: Add Bluesky account and media policy discovery, confirmed future local schedule cancellation, and hosted MCP media upload preparation and verification. Keep OAuth approval with the account owner and reject cancellation when delivery may have started.
|
|
8
|
+
|
|
9
|
+
Add image alt text, confirmed untouched draft deletion, and confirmed Bluesky account disconnection with independent optional permissions. Preserve original media and prevent late token refresh from restoring disconnected authorization.
|
|
10
|
+
|
|
11
|
+
- support for multiple social accounts under one brand
|
|
12
|
+
|
|
13
|
+
## 0.9.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- b4ebe20: Expose saved remote delivery IDs and safe provider management links in post destination results.
|
|
18
|
+
- 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.
|
|
19
|
+
|
|
3
20
|
## 0.8.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -166,6 +166,7 @@ __export(index_exports, {
|
|
|
166
166
|
BlogMetadataSchema: () => BlogMetadataSchema,
|
|
167
167
|
BlogSitemapEntrySchema: () => BlogSitemapEntrySchema,
|
|
168
168
|
BlogSlugRedirectSchema: () => BlogSlugRedirectSchema,
|
|
169
|
+
BlueskyDeliveryOptionsSchema: () => BlueskyDeliveryOptionsSchema,
|
|
169
170
|
CONTRACT_VERSION: () => CONTRACT_VERSION,
|
|
170
171
|
CalendarEventSchema: () => CalendarEventSchema,
|
|
171
172
|
CalendarListDataSchema: () => CalendarListDataSchema,
|
|
@@ -175,9 +176,20 @@ __export(index_exports, {
|
|
|
175
176
|
CapabilitiesResponseSchema: () => CapabilitiesResponseSchema,
|
|
176
177
|
CapabilityIdSchema: () => CapabilityIdSchema,
|
|
177
178
|
CapabilitySchema: () => CapabilitySchema,
|
|
179
|
+
DraftAccountDestinationSchema: () => DraftAccountDestinationSchema,
|
|
180
|
+
DraftDeletePreviewResponseSchema: () => DraftDeletePreviewResponseSchema,
|
|
181
|
+
DraftDeletePreviewSchema: () => DraftDeletePreviewSchema,
|
|
182
|
+
DraftDeleteResponseSchema: () => DraftDeleteResponseSchema,
|
|
183
|
+
DraftDeleteResultSchema: () => DraftDeleteResultSchema,
|
|
178
184
|
DraftPostInputSchema: () => DraftPostInputSchema,
|
|
179
185
|
DraftPostUpdateInputSchema: () => DraftPostUpdateInputSchema,
|
|
180
186
|
IntegrationConnectionStatusSchema: () => IntegrationConnectionStatusSchema,
|
|
187
|
+
IntegrationDisconnectExecuteInputSchema: () => IntegrationDisconnectExecuteInputSchema,
|
|
188
|
+
IntegrationDisconnectInputSchema: () => IntegrationDisconnectInputSchema,
|
|
189
|
+
IntegrationDisconnectPreviewResponseSchema: () => IntegrationDisconnectPreviewResponseSchema,
|
|
190
|
+
IntegrationDisconnectPreviewSchema: () => IntegrationDisconnectPreviewSchema,
|
|
191
|
+
IntegrationDisconnectResponseSchema: () => IntegrationDisconnectResponseSchema,
|
|
192
|
+
IntegrationDisconnectResultSchema: () => IntegrationDisconnectResultSchema,
|
|
181
193
|
IntegrationHealthListDataSchema: () => IntegrationHealthListDataSchema,
|
|
182
194
|
IntegrationHealthListResponseSchema: () => IntegrationHealthListResponseSchema,
|
|
183
195
|
IntegrationHealthSchema: () => IntegrationHealthSchema,
|
|
@@ -210,6 +222,9 @@ __export(index_exports, {
|
|
|
210
222
|
NormalizedMediaCleanupSelectionSchema: () => NormalizedMediaCleanupSelectionSchema,
|
|
211
223
|
PUBLISHING_PROVIDER_COUNT: () => PUBLISHING_PROVIDER_COUNT,
|
|
212
224
|
PlatformPostStatusSchema: () => PlatformPostStatusSchema,
|
|
225
|
+
PostDeliveryCheckInputSchema: () => PostDeliveryCheckInputSchema,
|
|
226
|
+
PostDeliveryCheckResponseSchema: () => PostDeliveryCheckResponseSchema,
|
|
227
|
+
PostDeliveryCheckResultSchema: () => PostDeliveryCheckResultSchema,
|
|
213
228
|
PostDeliveryModeSchema: () => PostDeliveryModeSchema,
|
|
214
229
|
PostDestinationSchema: () => PostDestinationSchema,
|
|
215
230
|
PostDestinationStageSchema: () => PostDestinationStageSchema,
|
|
@@ -225,7 +240,19 @@ __export(index_exports, {
|
|
|
225
240
|
PostReadinessCheckSchema: () => PostReadinessCheckSchema,
|
|
226
241
|
PostReadinessResponseSchema: () => PostReadinessResponseSchema,
|
|
227
242
|
PostReadinessSchema: () => PostReadinessSchema,
|
|
243
|
+
PostRecoveryExecuteInputSchema: () => PostRecoveryExecuteInputSchema,
|
|
244
|
+
PostRecoveryInputSchema: () => PostRecoveryInputSchema,
|
|
245
|
+
PostRecoveryPreviewResponseSchema: () => PostRecoveryPreviewResponseSchema,
|
|
246
|
+
PostRecoveryPreviewSchema: () => PostRecoveryPreviewSchema,
|
|
247
|
+
PostRecoveryResponseSchema: () => PostRecoveryResponseSchema,
|
|
248
|
+
PostRecoveryResultSchema: () => PostRecoveryResultSchema,
|
|
228
249
|
PostResponseSchema: () => PostResponseSchema,
|
|
250
|
+
PostScheduleCancelExecuteInputSchema: () => PostScheduleCancelExecuteInputSchema,
|
|
251
|
+
PostScheduleCancelInputSchema: () => PostScheduleCancelInputSchema,
|
|
252
|
+
PostScheduleCancelPreviewResponseSchema: () => PostScheduleCancelPreviewResponseSchema,
|
|
253
|
+
PostScheduleCancelPreviewSchema: () => PostScheduleCancelPreviewSchema,
|
|
254
|
+
PostScheduleCancelResponseSchema: () => PostScheduleCancelResponseSchema,
|
|
255
|
+
PostScheduleCancelResultSchema: () => PostScheduleCancelResultSchema,
|
|
229
256
|
PostScheduleExecuteInputSchema: () => PostScheduleExecuteInputSchema,
|
|
230
257
|
PostScheduleExecuteResponseSchema: () => PostScheduleExecuteResponseSchema,
|
|
231
258
|
PostScheduleExecuteResultSchema: () => PostScheduleExecuteResultSchema,
|
|
@@ -298,7 +325,7 @@ __export(index_exports, {
|
|
|
298
325
|
module.exports = __toCommonJS(index_exports);
|
|
299
326
|
var import_zod = require("zod");
|
|
300
327
|
var API_VERSION = "v1";
|
|
301
|
-
var CONTRACT_VERSION = "0.
|
|
328
|
+
var CONTRACT_VERSION = "0.20.0";
|
|
302
329
|
var RequestMetadataSchema = import_zod.z.object({
|
|
303
330
|
requestId: import_zod.z.string().min(1)
|
|
304
331
|
});
|
|
@@ -387,11 +414,13 @@ var CapabilityIdSchema = import_zod.z.enum([
|
|
|
387
414
|
"projects:write",
|
|
388
415
|
"posts:read",
|
|
389
416
|
"posts:write",
|
|
417
|
+
"posts:delete",
|
|
390
418
|
"posts:schedule",
|
|
391
419
|
"posts:publish",
|
|
392
420
|
"storage:read",
|
|
393
421
|
"media:delete",
|
|
394
422
|
"integrations:read",
|
|
423
|
+
"integrations:disconnect",
|
|
395
424
|
"calendar:read",
|
|
396
425
|
"seo:read",
|
|
397
426
|
"backlinks:read",
|
|
@@ -1337,6 +1366,13 @@ var PostDestinationStageSchema = import_zod.z.enum([
|
|
|
1337
1366
|
"FAILED"
|
|
1338
1367
|
]);
|
|
1339
1368
|
var PostDestinationSchema = import_zod.z.object({
|
|
1369
|
+
id: import_zod.z.string().min(1).optional(),
|
|
1370
|
+
integrationId: import_zod.z.string().min(1).nullable().optional(),
|
|
1371
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
1372
|
+
accountName: import_zod.z.string().nullable().optional(),
|
|
1373
|
+
accountAvatar: import_zod.z.string().nullable().optional(),
|
|
1374
|
+
tiktokSettings: import_zod.z.lazy(() => TikTokPostSettingsSchema).nullable().optional(),
|
|
1375
|
+
youtubeSettings: import_zod.z.lazy(() => YouTubePostSettingsSchema).nullable().optional(),
|
|
1340
1376
|
provider: PublishingProviderSchema,
|
|
1341
1377
|
status: PlatformPostStatusSchema,
|
|
1342
1378
|
deliveryMode: PostDeliveryModeSchema,
|
|
@@ -1345,6 +1381,9 @@ var PostDestinationSchema = import_zod.z.object({
|
|
|
1345
1381
|
scheduledAt: import_zod.z.string().datetime().nullable(),
|
|
1346
1382
|
publishedAt: import_zod.z.string().datetime().nullable(),
|
|
1347
1383
|
remoteUrl: import_zod.z.string().url().nullable(),
|
|
1384
|
+
remotePostId: import_zod.z.string().nullable().optional(),
|
|
1385
|
+
remoteContainerId: import_zod.z.string().nullable().optional(),
|
|
1386
|
+
studioUrl: import_zod.z.string().url().nullable().optional(),
|
|
1348
1387
|
attemptCount: import_zod.z.number().int().nonnegative()
|
|
1349
1388
|
});
|
|
1350
1389
|
var TikTokPostSettingsSchema = import_zod.z.object({
|
|
@@ -1531,14 +1570,35 @@ var DraftMediaAssetIdsSchema = import_zod.z.array(import_zod.z.string().trim().m
|
|
|
1531
1570
|
(ids) => new Set(ids).size === ids.length,
|
|
1532
1571
|
"Media asset IDs must be unique."
|
|
1533
1572
|
);
|
|
1573
|
+
var DraftMediaAltTextSchema = import_zod.z.record(import_zod.z.string().min(1).max(200), import_zod.z.string().trim().max(1e3).nullable()).refine((items) => Object.keys(items).length <= 10, "At most ten media descriptions are allowed.");
|
|
1574
|
+
var DraftAccountDestinationSchema = import_zod.z.object({
|
|
1575
|
+
integrationId: import_zod.z.string().trim().min(1).max(200),
|
|
1576
|
+
provider: PublishingProviderSchema,
|
|
1577
|
+
captionOverride: import_zod.z.string().max(5e3).nullable().default(null),
|
|
1578
|
+
tiktokSettings: TikTokDraftSettingsSchema.nullable().default(null),
|
|
1579
|
+
youtubeSettings: YouTubePostSettingsSchema.nullable().default(null)
|
|
1580
|
+
}).strict().superRefine((input, context) => {
|
|
1581
|
+
const captionSchema = DraftCaptionOverridesObjectSchema.shape[input.provider];
|
|
1582
|
+
if (!captionSchema.safeParse(input.captionOverride).success) context.addIssue({ code: "custom", path: ["captionOverride"], message: "The account caption exceeds this network's limit." });
|
|
1583
|
+
if (input.tiktokSettings && input.provider !== "TIKTOK") context.addIssue({ code: "custom", path: ["tiktokSettings"], message: "TikTok settings require a TikTok account." });
|
|
1584
|
+
if (input.youtubeSettings && input.provider !== "YOUTUBE") context.addIssue({ code: "custom", path: ["youtubeSettings"], message: "YouTube settings require a YouTube account." });
|
|
1585
|
+
if (input.provider === "YOUTUBE" && !input.youtubeSettings) context.addIssue({ code: "custom", path: ["youtubeSettings"], message: "Provide settings for this YouTube account." });
|
|
1586
|
+
});
|
|
1587
|
+
var DraftAccountDestinationsSchema = import_zod.z.array(DraftAccountDestinationSchema).max(75).refine((items) => new Set(items.map((item) => item.integrationId)).size === items.length, "Select each account only once.");
|
|
1534
1588
|
var DraftPostInputSchema = import_zod.z.object({
|
|
1589
|
+
destinations: DraftAccountDestinationsSchema.optional(),
|
|
1535
1590
|
caption: import_zod.z.string().max(3e3).transform((value) => value.trim()).default(""),
|
|
1536
1591
|
platforms: DraftPlatformsSchema.default([]),
|
|
1537
1592
|
mediaAssetIds: DraftMediaAssetIdsSchema.default([]),
|
|
1593
|
+
mediaAltText: DraftMediaAltTextSchema.optional(),
|
|
1538
1594
|
captionOverrides: DraftCaptionOverridesObjectSchema.default({}),
|
|
1539
1595
|
tiktokSettings: TikTokDraftSettingsSchema.nullable().default(null),
|
|
1540
1596
|
youtubeSettings: YouTubePostSettingsSchema.nullable().default(null)
|
|
1541
1597
|
}).strict().superRefine((input, context) => {
|
|
1598
|
+
if (input.destinations !== void 0 && (input.platforms?.length || Object.keys(input.captionOverrides ?? {}).length || input.tiktokSettings || input.youtubeSettings)) context.addIssue({ code: "custom", path: ["destinations"], message: "Use account destinations with their own settings, without legacy platform fields." });
|
|
1599
|
+
if (input.mediaAltText && Object.keys(input.mediaAltText).some((id) => !input.mediaAssetIds.includes(id))) {
|
|
1600
|
+
context.addIssue({ code: "custom", path: ["mediaAltText"], message: "Alternative text must name a selected media asset." });
|
|
1601
|
+
}
|
|
1542
1602
|
if (input.caption.length === 0 && input.mediaAssetIds.length === 0) {
|
|
1543
1603
|
context.addIssue({
|
|
1544
1604
|
code: "custom",
|
|
@@ -1583,13 +1643,16 @@ var DraftPostInputSchema = import_zod.z.object({
|
|
|
1583
1643
|
}
|
|
1584
1644
|
});
|
|
1585
1645
|
var DraftPostUpdateInputSchema = import_zod.z.object({
|
|
1646
|
+
destinations: DraftAccountDestinationsSchema.optional(),
|
|
1586
1647
|
caption: import_zod.z.string().max(3e3).transform((value) => value.trim()).optional(),
|
|
1587
1648
|
platforms: DraftPlatformsSchema.optional(),
|
|
1588
1649
|
mediaAssetIds: DraftMediaAssetIdsSchema.optional(),
|
|
1650
|
+
mediaAltText: DraftMediaAltTextSchema.optional(),
|
|
1589
1651
|
captionOverrides: DraftCaptionOverridesObjectSchema.optional(),
|
|
1590
1652
|
tiktokSettings: TikTokDraftSettingsSchema.nullable().optional(),
|
|
1591
1653
|
youtubeSettings: YouTubePostSettingsSchema.nullable().optional()
|
|
1592
1654
|
}).strict().superRefine((input, context) => {
|
|
1655
|
+
if (input.destinations !== void 0 && (input.platforms?.length || Object.keys(input.captionOverrides ?? {}).length || input.tiktokSettings || input.youtubeSettings)) context.addIssue({ code: "custom", path: ["destinations"], message: "Use account destinations with their own settings, without legacy platform fields." });
|
|
1593
1656
|
if (Object.values(input).every((value) => value === void 0)) {
|
|
1594
1657
|
context.addIssue({ code: "custom", message: "Provide at least one draft field to update." });
|
|
1595
1658
|
}
|
|
@@ -1621,6 +1684,8 @@ var ProviderHealthStatusSchema = import_zod.z.enum([
|
|
|
1621
1684
|
"unknown"
|
|
1622
1685
|
]);
|
|
1623
1686
|
var IntegrationHealthSchema = import_zod.z.object({
|
|
1687
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
1688
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
1624
1689
|
provider: PublishingProviderSchema,
|
|
1625
1690
|
connectionStatus: IntegrationConnectionStatusSchema,
|
|
1626
1691
|
connected: import_zod.z.boolean(),
|
|
@@ -1642,9 +1707,9 @@ var IntegrationHealthSchema = import_zod.z.object({
|
|
|
1642
1707
|
})
|
|
1643
1708
|
});
|
|
1644
1709
|
var IntegrationHealthListDataSchema = import_zod.z.object({
|
|
1645
|
-
items: import_zod.z.array(IntegrationHealthSchema).
|
|
1646
|
-
(items) => new Set(items.map((item) => item.provider)).size === items.length,
|
|
1647
|
-
"
|
|
1710
|
+
items: import_zod.z.array(IntegrationHealthSchema).refine(
|
|
1711
|
+
(items) => new Set(items.map((item) => item.integrationId ?? item.provider)).size === items.length,
|
|
1712
|
+
"Account health items must be unique."
|
|
1648
1713
|
)
|
|
1649
1714
|
});
|
|
1650
1715
|
var IntegrationHealthListResponseSchema = successEnvelopeSchema(
|
|
@@ -1652,9 +1717,12 @@ var IntegrationHealthListResponseSchema = successEnvelopeSchema(
|
|
|
1652
1717
|
);
|
|
1653
1718
|
var ProviderDeliveryOptionsProviderSchema = import_zod.z.enum([
|
|
1654
1719
|
"TIKTOK",
|
|
1655
|
-
"LINKEDIN"
|
|
1720
|
+
"LINKEDIN",
|
|
1721
|
+
"BLUESKY"
|
|
1656
1722
|
]);
|
|
1657
1723
|
var TikTokDeliveryOptionsSchema = import_zod.z.object({
|
|
1724
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
1725
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
1658
1726
|
provider: import_zod.z.literal("TIKTOK"),
|
|
1659
1727
|
account: import_zod.z.object({
|
|
1660
1728
|
username: import_zod.z.string().nullable(),
|
|
@@ -1683,6 +1751,8 @@ var TikTokDeliveryOptionsSchema = import_zod.z.object({
|
|
|
1683
1751
|
checkedAt: import_zod.z.string().datetime()
|
|
1684
1752
|
});
|
|
1685
1753
|
var LinkedInDeliveryOptionsSchema = import_zod.z.object({
|
|
1754
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
1755
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
1686
1756
|
provider: import_zod.z.literal("LINKEDIN"),
|
|
1687
1757
|
account: import_zod.z.object({
|
|
1688
1758
|
displayName: import_zod.z.string().nullable(),
|
|
@@ -1710,13 +1780,72 @@ var LinkedInDeliveryOptionsSchema = import_zod.z.object({
|
|
|
1710
1780
|
}),
|
|
1711
1781
|
checkedAt: import_zod.z.string().datetime()
|
|
1712
1782
|
});
|
|
1783
|
+
var BlueskyDeliveryOptionsSchema = import_zod.z.object({
|
|
1784
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
1785
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
1786
|
+
provider: import_zod.z.literal("BLUESKY"),
|
|
1787
|
+
account: import_zod.z.object({ username: import_zod.z.string().nullable(), displayName: import_zod.z.string().nullable(), avatarUrl: import_zod.z.string().url().nullable() }),
|
|
1788
|
+
supportedPostTypes: import_zod.z.tuple([import_zod.z.literal("TEXT"), import_zod.z.literal("SINGLE_IMAGE"), import_zod.z.literal("MULTI_IMAGE")]),
|
|
1789
|
+
maxCaptionGraphemes: import_zod.z.literal(300),
|
|
1790
|
+
image: import_zod.z.object({ maxItems: import_zod.z.literal(4), mimeTypes: import_zod.z.tuple([import_zod.z.literal("image/jpeg"), import_zod.z.literal("image/png"), import_zod.z.literal("image/webp")]), maxBytes: import_zod.z.literal(2e6), maxProcessedBytes: import_zod.z.literal(2e6) }),
|
|
1791
|
+
authorization: import_zod.z.object({ kind: import_zod.z.literal("HUMAN_OAUTH"), path: import_zod.z.string().startsWith("/projects/"), instruction: import_zod.z.string().min(1) }),
|
|
1792
|
+
health: import_zod.z.object({ status: ProviderHealthStatusSchema, code: import_zod.z.string().min(1), message: import_zod.z.string().min(1) }),
|
|
1793
|
+
checkedAt: import_zod.z.string().datetime()
|
|
1794
|
+
});
|
|
1713
1795
|
var ProviderDeliveryOptionsSchema = import_zod.z.discriminatedUnion("provider", [
|
|
1714
1796
|
TikTokDeliveryOptionsSchema,
|
|
1715
|
-
LinkedInDeliveryOptionsSchema
|
|
1797
|
+
LinkedInDeliveryOptionsSchema,
|
|
1798
|
+
BlueskyDeliveryOptionsSchema
|
|
1716
1799
|
]);
|
|
1717
1800
|
var ProviderDeliveryOptionsResponseSchema = successEnvelopeSchema(
|
|
1718
1801
|
ProviderDeliveryOptionsSchema
|
|
1719
1802
|
);
|
|
1803
|
+
var IntegrationDisconnectInputSchema = import_zod.z.object({ provider: import_zod.z.literal("BLUESKY"), integrationId: import_zod.z.string().min(1).max(200).optional() }).strict();
|
|
1804
|
+
var IntegrationDisconnectExecuteInputSchema = IntegrationDisconnectInputSchema.extend({ expectedVersion: import_zod.z.string().min(1).max(100), confirmationToken: import_zod.z.string().min(1).max(1024) });
|
|
1805
|
+
var IntegrationDisconnectPreviewSchema = import_zod.z.object({
|
|
1806
|
+
integrationId: import_zod.z.string().optional(),
|
|
1807
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
1808
|
+
provider: import_zod.z.literal("BLUESKY"),
|
|
1809
|
+
projectId: import_zod.z.string().min(1),
|
|
1810
|
+
expectedVersion: import_zod.z.string().min(1),
|
|
1811
|
+
account: import_zod.z.string().nullable(),
|
|
1812
|
+
pendingDeliveries: import_zod.z.number().int().nonnegative(),
|
|
1813
|
+
consequence: import_zod.z.string().min(1),
|
|
1814
|
+
confirmation: import_zod.z.object({ token: import_zod.z.string().min(1), expiresAt: import_zod.z.string().datetime() })
|
|
1815
|
+
});
|
|
1816
|
+
var IntegrationDisconnectResultSchema = import_zod.z.object({ integrationId: import_zod.z.string().optional(), provider: import_zod.z.literal("BLUESKY"), projectId: import_zod.z.string().min(1), status: import_zod.z.literal("DISCONNECTED"), remoteRevocation: import_zod.z.enum(["PENDING", "REVOKED", "UNRESOLVED", "NOT_REQUIRED"]) });
|
|
1817
|
+
var IntegrationDisconnectPreviewResponseSchema = successEnvelopeSchema(IntegrationDisconnectPreviewSchema);
|
|
1818
|
+
var IntegrationDisconnectResponseSchema = successEnvelopeSchema(IntegrationDisconnectResultSchema);
|
|
1819
|
+
var DraftDeletePreviewSchema = import_zod.z.object({
|
|
1820
|
+
operation: import_zod.z.literal("posts.delete.execute"),
|
|
1821
|
+
projectId: import_zod.z.string().min(1),
|
|
1822
|
+
postId: import_zod.z.string().min(1),
|
|
1823
|
+
version: import_zod.z.number().int().positive(),
|
|
1824
|
+
caption: import_zod.z.string(),
|
|
1825
|
+
mediaCount: import_zod.z.number().int().nonnegative(),
|
|
1826
|
+
consequence: import_zod.z.string().min(1),
|
|
1827
|
+
confirmation: import_zod.z.object({ token: import_zod.z.string().min(1), expiresAt: import_zod.z.string().datetime() })
|
|
1828
|
+
});
|
|
1829
|
+
var DraftDeleteResultSchema = import_zod.z.object({ postId: import_zod.z.string().min(1), status: import_zod.z.literal("DELETED") });
|
|
1830
|
+
var DraftDeletePreviewResponseSchema = successEnvelopeSchema(DraftDeletePreviewSchema);
|
|
1831
|
+
var DraftDeleteResponseSchema = successEnvelopeSchema(DraftDeleteResultSchema);
|
|
1832
|
+
var PostScheduleCancelInputSchema = import_zod.z.object({}).strict();
|
|
1833
|
+
var PostScheduleCancelExecuteInputSchema = import_zod.z.object({ confirmationToken: import_zod.z.string().min(1).max(1024) }).strict();
|
|
1834
|
+
var PostScheduleCancelResultSchema = import_zod.z.object({ postId: import_zod.z.string().min(1), version: import_zod.z.number().int().positive(), status: import_zod.z.literal("DRAFT") });
|
|
1835
|
+
var PostScheduleCancelPreviewSchema = import_zod.z.object({
|
|
1836
|
+
accounts: import_zod.z.array(import_zod.z.object({ destinationId: import_zod.z.string().min(1), integrationId: import_zod.z.string().nullable(), provider: PublishingProviderSchema, accountId: import_zod.z.string().nullable(), accountName: import_zod.z.string().nullable() })).optional(),
|
|
1837
|
+
operation: import_zod.z.literal("posts.schedule.cancel.execute"),
|
|
1838
|
+
projectId: import_zod.z.string().min(1),
|
|
1839
|
+
postId: import_zod.z.string().min(1),
|
|
1840
|
+
version: import_zod.z.number().int().positive(),
|
|
1841
|
+
scheduledAt: import_zod.z.string().datetime(),
|
|
1842
|
+
timezone: import_zod.z.string().nullable(),
|
|
1843
|
+
destinations: import_zod.z.array(PublishingProviderSchema).min(1),
|
|
1844
|
+
consequence: import_zod.z.string().min(1),
|
|
1845
|
+
confirmation: import_zod.z.object({ token: import_zod.z.string().min(1), expiresAt: import_zod.z.string().datetime() })
|
|
1846
|
+
});
|
|
1847
|
+
var PostScheduleCancelPreviewResponseSchema = successEnvelopeSchema(PostScheduleCancelPreviewSchema);
|
|
1848
|
+
var PostScheduleCancelResponseSchema = successEnvelopeSchema(PostScheduleCancelResultSchema);
|
|
1720
1849
|
var ReadinessStatusSchema = import_zod.z.enum([
|
|
1721
1850
|
"checking",
|
|
1722
1851
|
"pass",
|
|
@@ -1725,18 +1854,21 @@ var ReadinessStatusSchema = import_zod.z.enum([
|
|
|
1725
1854
|
"unknown"
|
|
1726
1855
|
]);
|
|
1727
1856
|
var ReadinessActionSchema = import_zod.z.object({
|
|
1857
|
+
integrationId: import_zod.z.string().optional(),
|
|
1728
1858
|
kind: import_zod.z.enum([
|
|
1729
1859
|
"reconnect",
|
|
1730
1860
|
"replace_media",
|
|
1731
1861
|
"adjust_media",
|
|
1732
1862
|
"review_settings",
|
|
1733
1863
|
"edit_caption",
|
|
1734
|
-
"refresh_health"
|
|
1864
|
+
"refresh_health",
|
|
1865
|
+
"refresh_readiness"
|
|
1735
1866
|
]),
|
|
1736
1867
|
provider: PublishingProviderSchema.optional(),
|
|
1737
1868
|
mediaId: import_zod.z.string().min(1).optional()
|
|
1738
1869
|
});
|
|
1739
1870
|
var PostReadinessCheckSchema = import_zod.z.object({
|
|
1871
|
+
integrationId: import_zod.z.string().optional(),
|
|
1740
1872
|
key: import_zod.z.string().min(1),
|
|
1741
1873
|
id: import_zod.z.enum([
|
|
1742
1874
|
"connection",
|
|
@@ -1763,6 +1895,8 @@ var PostReadinessCheckSchema = import_zod.z.object({
|
|
|
1763
1895
|
var PostReadinessSchema = import_zod.z.object({
|
|
1764
1896
|
checks: import_zod.z.array(PostReadinessCheckSchema),
|
|
1765
1897
|
accounts: import_zod.z.array(import_zod.z.object({
|
|
1898
|
+
integrationId: import_zod.z.string().optional(),
|
|
1899
|
+
externalAccountId: import_zod.z.string().nullable().optional(),
|
|
1766
1900
|
provider: PublishingProviderSchema,
|
|
1767
1901
|
connected: import_zod.z.boolean(),
|
|
1768
1902
|
username: import_zod.z.string().nullable(),
|
|
@@ -1790,7 +1924,9 @@ var PostScheduleInputSchema = import_zod.z.object({
|
|
|
1790
1924
|
var PostScheduleExecuteInputSchema = PostScheduleInputSchema.extend({
|
|
1791
1925
|
confirmationToken: import_zod.z.string().trim().min(1).max(200)
|
|
1792
1926
|
}).strict();
|
|
1927
|
+
var PublishingAccountReviewListSchema = import_zod.z.array(import_zod.z.object({ destinationId: import_zod.z.string(), integrationId: import_zod.z.string(), provider: PublishingProviderSchema, accountId: import_zod.z.string().nullable(), accountName: import_zod.z.string().nullable(), accountAvatar: import_zod.z.string().nullable(), caption: import_zod.z.string(), tiktokSettings: TikTokPostSettingsSchema.nullable(), youtubeSettings: YouTubePostSettingsSchema.nullable() })).optional();
|
|
1793
1928
|
var PostSchedulePreviewSchema = import_zod.z.object({
|
|
1929
|
+
accounts: PublishingAccountReviewListSchema,
|
|
1794
1930
|
operation: import_zod.z.literal("posts.schedule.execute"),
|
|
1795
1931
|
deliveryMode: import_zod.z.literal("SCHEDULED"),
|
|
1796
1932
|
post: import_zod.z.object({
|
|
@@ -1822,6 +1958,7 @@ var PostSchedulePreviewResponseSchema = successEnvelopeSchema(
|
|
|
1822
1958
|
PostSchedulePreviewSchema
|
|
1823
1959
|
);
|
|
1824
1960
|
var PostSchedulePendingSchema = import_zod.z.object({
|
|
1961
|
+
destinations: import_zod.z.array(import_zod.z.object({ destinationId: import_zod.z.string().min(1), integrationId: import_zod.z.string().min(1), mutationId: import_zod.z.string().min(1) })).optional(),
|
|
1825
1962
|
status: import_zod.z.literal("PENDING"),
|
|
1826
1963
|
postId: import_zod.z.string().min(1),
|
|
1827
1964
|
provider: import_zod.z.literal("YOUTUBE"),
|
|
@@ -1839,12 +1976,12 @@ var PostScheduleExecuteResponseSchema = successEnvelopeSchema(
|
|
|
1839
1976
|
PostScheduleExecuteResultSchema
|
|
1840
1977
|
);
|
|
1841
1978
|
var PostPublishInputSchema = import_zod.z.object({
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
)
|
|
1846
|
-
})
|
|
1847
|
-
var PostPublishExecuteInputSchema = PostPublishInputSchema.
|
|
1979
|
+
destinationIds: import_zod.z.array(import_zod.z.string().trim().min(1).max(200)).min(1).max(75).refine((ids) => new Set(ids).size === ids.length, "Select each destination only once.").optional(),
|
|
1980
|
+
destinations: import_zod.z.array(PublishingProviderSchema).max(PUBLISHING_PROVIDER_COUNT).refine((items) => new Set(items).size === items.length, "Select each network only once.").default([])
|
|
1981
|
+
}).strict().superRefine((input, context) => {
|
|
1982
|
+
if (input.destinationIds ? input.destinations.length > 0 : input.destinations.length === 0) context.addIssue({ code: "custom", message: "Provide destinationIds, or unambiguous legacy destinations, but not both." });
|
|
1983
|
+
});
|
|
1984
|
+
var PostPublishExecuteInputSchema = PostPublishInputSchema.safeExtend({
|
|
1848
1985
|
confirmationToken: import_zod.z.string().trim().min(1).max(200)
|
|
1849
1986
|
}).strict();
|
|
1850
1987
|
var PostPublishPreviewSchema = import_zod.z.object({
|
|
@@ -1857,6 +1994,8 @@ var PostPublishPreviewSchema = import_zod.z.object({
|
|
|
1857
1994
|
status: PostStatusSchema
|
|
1858
1995
|
}),
|
|
1859
1996
|
destinations: PostPublishInputSchema.shape.destinations,
|
|
1997
|
+
destinationIds: import_zod.z.array(import_zod.z.string()).optional(),
|
|
1998
|
+
accounts: PublishingAccountReviewListSchema,
|
|
1860
1999
|
youtube: import_zod.z.object({
|
|
1861
2000
|
visibility: YouTubePostSettingsSchema.shape.privacyStatus,
|
|
1862
2001
|
preparationStartsImmediately: import_zod.z.literal(true),
|
|
@@ -1885,6 +2024,11 @@ var CalendarEventSchema = import_zod.z.object({
|
|
|
1885
2024
|
}).nullable(),
|
|
1886
2025
|
thumbnailUrl: import_zod.z.string().url().nullable(),
|
|
1887
2026
|
destinations: import_zod.z.array(import_zod.z.object({
|
|
2027
|
+
id: import_zod.z.string().optional(),
|
|
2028
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
2029
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
2030
|
+
accountName: import_zod.z.string().nullable().optional(),
|
|
2031
|
+
accountAvatar: import_zod.z.string().nullable().optional(),
|
|
1888
2032
|
provider: PublishingProviderSchema,
|
|
1889
2033
|
status: PlatformPostStatusSchema
|
|
1890
2034
|
}))
|
|
@@ -2287,6 +2431,70 @@ var BacklinkContactSchema = import_zod.z.object({
|
|
|
2287
2431
|
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
2432
|
var BacklinkContactListQuerySchema = import_zod.z.object({ limit: import_zod.z.coerce.number().int().min(1).max(50).default(20), cursor: SeoCursorSchema.optional() }).strict();
|
|
2289
2433
|
var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactListDataSchema);
|
|
2434
|
+
var PostDeliveryCheckInputSchema = import_zod.z.object({ provider: PublishingProviderSchema, destinationId: import_zod.z.string().min(1).max(200).optional() }).strict();
|
|
2435
|
+
var PostDeliveryCheckResultSchema = import_zod.z.object({
|
|
2436
|
+
destinationId: import_zod.z.string().min(1).optional(),
|
|
2437
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
2438
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
2439
|
+
postId: import_zod.z.string().min(1),
|
|
2440
|
+
provider: PublishingProviderSchema,
|
|
2441
|
+
kind: import_zod.z.enum(["PUBLISHED", "SCHEDULED", "PROCESSING", "ACTION_REQUIRED", "UNKNOWN", "BUSY"]),
|
|
2442
|
+
message: import_zod.z.string(),
|
|
2443
|
+
version: import_zod.z.number().int().positive(),
|
|
2444
|
+
remotePostId: import_zod.z.string().nullable(),
|
|
2445
|
+
remoteContainerId: import_zod.z.string().nullable(),
|
|
2446
|
+
studioUrl: import_zod.z.string().url().nullable()
|
|
2447
|
+
});
|
|
2448
|
+
var PostDeliveryCheckResponseSchema = successEnvelopeSchema(PostDeliveryCheckResultSchema);
|
|
2449
|
+
var PostRecoveryInputSchema = import_zod.z.object({
|
|
2450
|
+
destinationId: import_zod.z.string().min(1).max(200).optional(),
|
|
2451
|
+
provider: import_zod.z.literal("YOUTUBE"),
|
|
2452
|
+
action: import_zod.z.enum(["ATTACH", "RESUME"]),
|
|
2453
|
+
videoId: import_zod.z.string().regex(/^[\w-]{11}$/),
|
|
2454
|
+
publishAt: import_zod.z.string().datetime({ offset: true }).nullable().optional()
|
|
2455
|
+
}).strict().superRefine((input, context) => {
|
|
2456
|
+
if (input.action === "RESUME" && input.publishAt === void 0) {
|
|
2457
|
+
context.addIssue({ code: "custom", path: ["publishAt"], message: "RESUME requires a future time or explicit null to publish now." });
|
|
2458
|
+
}
|
|
2459
|
+
if (input.action === "ATTACH" && input.publishAt !== void 0) {
|
|
2460
|
+
context.addIssue({ code: "custom", path: ["publishAt"], message: "Attachment cannot change publication time." });
|
|
2461
|
+
}
|
|
2462
|
+
});
|
|
2463
|
+
var PostRecoveryExecuteInputSchema = PostRecoveryInputSchema.safeExtend({
|
|
2464
|
+
confirmationToken: import_zod.z.string().trim().min(1).max(200)
|
|
2465
|
+
});
|
|
2466
|
+
var PostRecoveryPreviewSchema = import_zod.z.object({
|
|
2467
|
+
destinationId: import_zod.z.string().min(1).optional(),
|
|
2468
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
2469
|
+
operation: import_zod.z.literal("posts.recovery.execute"),
|
|
2470
|
+
projectId: import_zod.z.string().min(1),
|
|
2471
|
+
postId: import_zod.z.string().min(1),
|
|
2472
|
+
provider: import_zod.z.literal("YOUTUBE"),
|
|
2473
|
+
action: import_zod.z.enum(["ATTACH", "RESUME"]),
|
|
2474
|
+
videoId: import_zod.z.string(),
|
|
2475
|
+
publishAt: import_zod.z.string().datetime({ offset: true }).nullable().optional(),
|
|
2476
|
+
version: import_zod.z.number().int().positive(),
|
|
2477
|
+
title: import_zod.z.string(),
|
|
2478
|
+
description: import_zod.z.string(),
|
|
2479
|
+
channel: import_zod.z.string().nullable(),
|
|
2480
|
+
accountId: import_zod.z.string(),
|
|
2481
|
+
privacy: import_zod.z.string(),
|
|
2482
|
+
consequence: import_zod.z.string(),
|
|
2483
|
+
confirmation: import_zod.z.object({ token: import_zod.z.string().min(1), expiresAt: import_zod.z.string().datetime() })
|
|
2484
|
+
});
|
|
2485
|
+
var PostRecoveryPreviewResponseSchema = successEnvelopeSchema(PostRecoveryPreviewSchema);
|
|
2486
|
+
var PostRecoveryResultSchema = import_zod.z.object({
|
|
2487
|
+
destinationId: import_zod.z.string().min(1).optional(),
|
|
2488
|
+
integrationId: import_zod.z.string().nullable().optional(),
|
|
2489
|
+
accountId: import_zod.z.string().nullable().optional(),
|
|
2490
|
+
postId: import_zod.z.string().min(1),
|
|
2491
|
+
provider: import_zod.z.literal("YOUTUBE"),
|
|
2492
|
+
action: import_zod.z.enum(["ATTACH", "RESUME"]),
|
|
2493
|
+
videoId: import_zod.z.string(),
|
|
2494
|
+
kind: import_zod.z.enum(["ATTACHED", "QUEUED", "PUBLISHED"]),
|
|
2495
|
+
version: import_zod.z.number().int().positive()
|
|
2496
|
+
});
|
|
2497
|
+
var PostRecoveryResponseSchema = successEnvelopeSchema(PostRecoveryResultSchema);
|
|
2290
2498
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2291
2499
|
0 && (module.exports = {
|
|
2292
2500
|
AGENT_CAPABILITIES,
|
|
@@ -2435,6 +2643,7 @@ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactLis
|
|
|
2435
2643
|
BlogMetadataSchema,
|
|
2436
2644
|
BlogSitemapEntrySchema,
|
|
2437
2645
|
BlogSlugRedirectSchema,
|
|
2646
|
+
BlueskyDeliveryOptionsSchema,
|
|
2438
2647
|
CONTRACT_VERSION,
|
|
2439
2648
|
CalendarEventSchema,
|
|
2440
2649
|
CalendarListDataSchema,
|
|
@@ -2444,9 +2653,20 @@ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactLis
|
|
|
2444
2653
|
CapabilitiesResponseSchema,
|
|
2445
2654
|
CapabilityIdSchema,
|
|
2446
2655
|
CapabilitySchema,
|
|
2656
|
+
DraftAccountDestinationSchema,
|
|
2657
|
+
DraftDeletePreviewResponseSchema,
|
|
2658
|
+
DraftDeletePreviewSchema,
|
|
2659
|
+
DraftDeleteResponseSchema,
|
|
2660
|
+
DraftDeleteResultSchema,
|
|
2447
2661
|
DraftPostInputSchema,
|
|
2448
2662
|
DraftPostUpdateInputSchema,
|
|
2449
2663
|
IntegrationConnectionStatusSchema,
|
|
2664
|
+
IntegrationDisconnectExecuteInputSchema,
|
|
2665
|
+
IntegrationDisconnectInputSchema,
|
|
2666
|
+
IntegrationDisconnectPreviewResponseSchema,
|
|
2667
|
+
IntegrationDisconnectPreviewSchema,
|
|
2668
|
+
IntegrationDisconnectResponseSchema,
|
|
2669
|
+
IntegrationDisconnectResultSchema,
|
|
2450
2670
|
IntegrationHealthListDataSchema,
|
|
2451
2671
|
IntegrationHealthListResponseSchema,
|
|
2452
2672
|
IntegrationHealthSchema,
|
|
@@ -2479,6 +2699,9 @@ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactLis
|
|
|
2479
2699
|
NormalizedMediaCleanupSelectionSchema,
|
|
2480
2700
|
PUBLISHING_PROVIDER_COUNT,
|
|
2481
2701
|
PlatformPostStatusSchema,
|
|
2702
|
+
PostDeliveryCheckInputSchema,
|
|
2703
|
+
PostDeliveryCheckResponseSchema,
|
|
2704
|
+
PostDeliveryCheckResultSchema,
|
|
2482
2705
|
PostDeliveryModeSchema,
|
|
2483
2706
|
PostDestinationSchema,
|
|
2484
2707
|
PostDestinationStageSchema,
|
|
@@ -2494,7 +2717,19 @@ var BacklinkContactListResponseSchema = successEnvelopeSchema(BacklinkContactLis
|
|
|
2494
2717
|
PostReadinessCheckSchema,
|
|
2495
2718
|
PostReadinessResponseSchema,
|
|
2496
2719
|
PostReadinessSchema,
|
|
2720
|
+
PostRecoveryExecuteInputSchema,
|
|
2721
|
+
PostRecoveryInputSchema,
|
|
2722
|
+
PostRecoveryPreviewResponseSchema,
|
|
2723
|
+
PostRecoveryPreviewSchema,
|
|
2724
|
+
PostRecoveryResponseSchema,
|
|
2725
|
+
PostRecoveryResultSchema,
|
|
2497
2726
|
PostResponseSchema,
|
|
2727
|
+
PostScheduleCancelExecuteInputSchema,
|
|
2728
|
+
PostScheduleCancelInputSchema,
|
|
2729
|
+
PostScheduleCancelPreviewResponseSchema,
|
|
2730
|
+
PostScheduleCancelPreviewSchema,
|
|
2731
|
+
PostScheduleCancelResponseSchema,
|
|
2732
|
+
PostScheduleCancelResultSchema,
|
|
2498
2733
|
PostScheduleExecuteInputSchema,
|
|
2499
2734
|
PostScheduleExecuteResponseSchema,
|
|
2500
2735
|
PostScheduleExecuteResultSchema,
|