@postonus/cli 0.1.57 → 0.1.59
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 +51 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6919,7 +6919,6 @@ var orgErrors = {
|
|
|
6919
6919
|
NOT_FOUND: { message: "Not found." },
|
|
6920
6920
|
FORBIDDEN: { message: "This action is not allowed." }
|
|
6921
6921
|
};
|
|
6922
|
-
var writableErrors = orgErrors;
|
|
6923
6922
|
var publishErrors = {
|
|
6924
6923
|
...orgErrors,
|
|
6925
6924
|
PAYMENT_REQUIRED: {
|
|
@@ -7494,10 +7493,17 @@ var ExportAnalyticsInputSchema = object({
|
|
|
7494
7493
|
period: AnalyticsPeriodSchema.optional(),
|
|
7495
7494
|
format: AnalyticsExportFormatSchema.optional()
|
|
7496
7495
|
});
|
|
7496
|
+
var TrackEventInputSchema = object({
|
|
7497
|
+
name: string2(),
|
|
7498
|
+
properties: record(string2(), JsonValueSchema).optional()
|
|
7499
|
+
});
|
|
7500
|
+
var TrackEventOutputSchema = object({
|
|
7501
|
+
success: boolean2()
|
|
7502
|
+
});
|
|
7497
7503
|
var publicTagged = base.route({ tags: ["Analytics"] });
|
|
7498
7504
|
var internal3 = publicTagged.meta({ internal: true });
|
|
7499
7505
|
var analyticsTakeawayErrors = {
|
|
7500
|
-
...
|
|
7506
|
+
...orgErrors,
|
|
7501
7507
|
AI_CREDITS_EXHAUSTED: {
|
|
7502
7508
|
status: 402,
|
|
7503
7509
|
message: "AI credits exhausted. Upgrade your plan or wait for your credits to renew."
|
|
@@ -7510,7 +7516,8 @@ var analyticsTakeawayErrors = {
|
|
|
7510
7516
|
var analyticsContract = {
|
|
7511
7517
|
getSummary: publicTagged.route({ method: "GET", path: "/analytics/summary", summary: "Get workspace analytics summary" }).errors(orgErrors).input(GetAnalyticsSummaryInputSchema).output(AnalyticsSummarySchema),
|
|
7512
7518
|
generateTakeaways: internal3.route({ method: "POST", path: "/analytics/takeaways", summary: "Generate AI analytics takeaways" }).errors(analyticsTakeawayErrors).input(GenerateAnalyticsTakeawaysInputSchema).output(AnalyticsTakeawaysSchema),
|
|
7513
|
-
exportData: publicTagged.route({ method: "GET", path: "/analytics/export", summary: "Export workspace analytics data" }).errors(orgErrors).input(ExportAnalyticsInputSchema).output(AnalyticsExportSchema)
|
|
7519
|
+
exportData: publicTagged.route({ method: "GET", path: "/analytics/export", summary: "Export workspace analytics data" }).errors(orgErrors).input(ExportAnalyticsInputSchema).output(AnalyticsExportSchema),
|
|
7520
|
+
track: publicTagged.route({ method: "POST", path: "/analytics/track", summary: "Track a client or extension telemetry event" }).errors(orgErrors).input(TrackEventInputSchema).output(TrackEventOutputSchema)
|
|
7514
7521
|
};
|
|
7515
7522
|
|
|
7516
7523
|
// ../../packages/api-contract/src/api-keys.ts
|
|
@@ -7547,7 +7554,7 @@ var tagged2 = base.route({ tags: ["ApiKeys"] }).meta({ internal: true });
|
|
|
7547
7554
|
var apiKeysContract = {
|
|
7548
7555
|
list: tagged2.route({ method: "GET", path: "/api-keys", summary: "List the caller\u2019s API keys" }).errors(orgErrors).output(array(ApiKeySchema)),
|
|
7549
7556
|
usage: tagged2.route({ method: "GET", path: "/api-keys/usage", summary: "Get the org-wide API key cap usage" }).errors(orgErrors).output(ApiKeyUsageSchema),
|
|
7550
|
-
create: tagged2.route({ method: "POST", path: "/api-keys", summary: "Create an API key", successStatus: 201 }).errors(
|
|
7557
|
+
create: tagged2.route({ method: "POST", path: "/api-keys", summary: "Create an API key", successStatus: 201 }).errors(orgErrors).input(CreateApiKeyInputSchema).output(CreatedApiKeySchema),
|
|
7551
7558
|
revoke: tagged2.route({ method: "DELETE", path: "/api-keys/{id}", summary: "Revoke an API key" }).errors(orgErrors).input(IdPathParam).output(object({ id: string2() }))
|
|
7552
7559
|
};
|
|
7553
7560
|
|
|
@@ -7825,7 +7832,7 @@ var ListClipsOutputSchema = object({
|
|
|
7825
7832
|
items: array(ClipJobSchema)
|
|
7826
7833
|
});
|
|
7827
7834
|
var clipErrors = {
|
|
7828
|
-
...
|
|
7835
|
+
...orgErrors,
|
|
7829
7836
|
CONFLICT: { status: 409, message: "A clip job is already running for this workspace." },
|
|
7830
7837
|
AI_CREDITS_EXHAUSTED: {
|
|
7831
7838
|
status: 403,
|
|
@@ -7871,19 +7878,19 @@ var tagged6 = base.route({ tags: ["Comments"] }).meta({ internal: true });
|
|
|
7871
7878
|
var commentsContract = {
|
|
7872
7879
|
list: tagged6.route({ method: "GET", path: "/posts/{postId}/comments", summary: "List a post's comments" }).errors(orgErrors).input(object({ postId: Uuid, postScheduleId: CommentScheduleFilter })).output(array(CommentWithAuthorSchema)),
|
|
7873
7880
|
listPublic: tagged6.route({ method: "GET", path: "/share/{token}/comments", summary: "List a shared post's comments" }).errors(shareErrors).input(object({ token: string2(), postScheduleId: CommentScheduleFilter })).output(array(CommentWithAuthorSchema)),
|
|
7874
|
-
create: tagged6.route({ method: "POST", path: "/posts/{postId}/comments", summary: "Add a comment", successStatus: 201 }).errors(
|
|
7881
|
+
create: tagged6.route({ method: "POST", path: "/posts/{postId}/comments", summary: "Add a comment", successStatus: 201 }).errors(orgErrors).input(object({ postId: Uuid, postScheduleId: Uuid.nullable().optional(), content: ContentInput })).output(CommentWithAuthorSchema),
|
|
7875
7882
|
createPublic: tagged6.route({
|
|
7876
7883
|
method: "POST",
|
|
7877
7884
|
path: "/share/{token}/comments",
|
|
7878
7885
|
summary: "Add a comment on a shared post",
|
|
7879
7886
|
successStatus: 201
|
|
7880
7887
|
}).errors(shareAuthedErrors).input(object({ token: string2(), postScheduleId: Uuid.nullable().optional(), content: ContentInput })).output(CommentWithAuthorSchema),
|
|
7881
|
-
update: tagged6.route({ method: "PATCH", path: "/comments/{id}", summary: "Edit a comment" }).errors(
|
|
7888
|
+
update: tagged6.route({ method: "PATCH", path: "/comments/{id}", summary: "Edit a comment" }).errors(orgErrors).input(object({ id: Uuid, content: ContentInput })).output(CommentSchema),
|
|
7882
7889
|
updatePublic: tagged6.route({ method: "PATCH", path: "/share/{token}/comments/{id}", summary: "Edit a comment on a shared post" }).errors(shareAuthedErrors).input(object({ token: string2(), id: Uuid, content: ContentInput })).output(CommentSchema),
|
|
7883
7890
|
delete: tagged6.route({ method: "DELETE", path: "/comments/{id}", summary: "Delete a comment" }).errors(orgErrors).input(object({ id: Uuid })).output(DeletedSchema),
|
|
7884
7891
|
deletePublic: tagged6.route({ method: "DELETE", path: "/share/{token}/comments/{id}", summary: "Delete a comment on a shared post" }).errors(shareAuthedErrors).input(object({ token: string2(), id: Uuid })).output(DeletedSchema),
|
|
7885
|
-
resolve: tagged6.route({ method: "POST", path: "/comments/{id}/resolve", summary: "Resolve or reopen a comment" }).errors(
|
|
7886
|
-
resolveMany: tagged6.route({ method: "POST", path: "/comments/resolve-many", summary: "Resolve multiple comments in bulk" }).errors(
|
|
7892
|
+
resolve: tagged6.route({ method: "POST", path: "/comments/{id}/resolve", summary: "Resolve or reopen a comment" }).errors(orgErrors).input(object({ id: Uuid, resolved: boolean2() })).output(CommentSchema),
|
|
7893
|
+
resolveMany: tagged6.route({ method: "POST", path: "/comments/resolve-many", summary: "Resolve multiple comments in bulk" }).errors(orgErrors).input(object({ ids: array(Uuid).min(1), resolved: boolean2().default(true) })).output(object({ resolvedCount: number2() }))
|
|
7887
7894
|
};
|
|
7888
7895
|
|
|
7889
7896
|
// ../../packages/api-contract/src/platforms.ts
|
|
@@ -8052,18 +8059,18 @@ var integrationsContract = {
|
|
|
8052
8059
|
summary: "Scheduled posts whose channel cannot currently publish"
|
|
8053
8060
|
}).errors(orgErrors).output(array(AtRiskScheduleSchema)),
|
|
8054
8061
|
listPendingSelection: internal5.route({ method: "GET", path: "/integrations/pending-selection", summary: "Channels stuck at the account picker" }).errors(orgErrors).output(array(PendingSelectionIntegrationSchema)),
|
|
8055
|
-
connectIntegration: tagged8.route({ method: "POST", path: "/integrations/connect", summary: "Start an OAuth connect" }).errors(
|
|
8062
|
+
connectIntegration: tagged8.route({ method: "POST", path: "/integrations/connect", summary: "Start an OAuth connect" }).errors(orgErrors).input(ConnectIntegrationInputSchema).output(object({ redirectUrl: string2() })),
|
|
8056
8063
|
connectCredentialIntegration: internal5.route({
|
|
8057
8064
|
method: "POST",
|
|
8058
8065
|
path: "/integrations/connect-with-credentials",
|
|
8059
8066
|
summary: "Connect a platform with an app password or bot token"
|
|
8060
|
-
}).errors(
|
|
8067
|
+
}).errors(orgErrors).input(ConnectCredentialIntegrationInputSchema).output(ConnectCredentialResultSchema),
|
|
8061
8068
|
listConnectAccounts: internal5.route({ method: "GET", path: "/integrations/{id}/accounts", summary: "Accounts a pending connect may select" }).errors(orgErrors).input(IdPathParam).output(array(SelectableAccountSchema)),
|
|
8062
|
-
finalizeConnect: internal5.route({ method: "POST", path: "/integrations/{id}/select", summary: "Finalize a picked account" }).errors(
|
|
8069
|
+
finalizeConnect: internal5.route({ method: "POST", path: "/integrations/{id}/select", summary: "Finalize a picked account" }).errors(orgErrors).input(FinalizeConnectInputSchema).output(FinalizeConnectResultSchema),
|
|
8063
8070
|
disconnectIntegration: internal5.route({ method: "DELETE", path: "/integrations/{id}", summary: "Disconnect an integration" }).errors(orgErrors).input(IdPathParam).output(DisconnectResultSchema),
|
|
8064
8071
|
disconnectImpact: internal5.route({ method: "GET", path: "/integrations/{id}/disconnect-impact", summary: "What a disconnect would cost" }).errors(orgErrors).input(IdPathParam).output(DisconnectImpactSchema),
|
|
8065
|
-
cancelPendingSelection: internal5.route({ method: "POST", path: "/integrations/{id}/cancel-selection", summary: "Abandon a half-finished connect" }).errors(
|
|
8066
|
-
refreshIntegration: internal5.route({ method: "POST", path: "/integrations/{id}/refresh", summary: "Manually refresh a credential" }).errors(
|
|
8072
|
+
cancelPendingSelection: internal5.route({ method: "POST", path: "/integrations/{id}/cancel-selection", summary: "Abandon a half-finished connect" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema),
|
|
8073
|
+
refreshIntegration: internal5.route({ method: "POST", path: "/integrations/{id}/refresh", summary: "Manually refresh a credential" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
|
|
8067
8074
|
};
|
|
8068
8075
|
|
|
8069
8076
|
// ../../packages/api-contract/src/upload.ts
|
|
@@ -8085,7 +8092,7 @@ var MediaVariantsSchema = object({
|
|
|
8085
8092
|
var MediaVariantsStatusSchema = _enum(["pending", "processing", "ready", "failed", "not_applicable"]);
|
|
8086
8093
|
var MediaTypeSchema = _enum(["IMAGE", "GIF", "VIDEO"]);
|
|
8087
8094
|
var uploadErrors = {
|
|
8088
|
-
...
|
|
8095
|
+
...orgErrors,
|
|
8089
8096
|
CONFLICT: { message: "Upload is not in a state that allows this operation." },
|
|
8090
8097
|
PAYLOAD_TOO_LARGE: { status: 413, message: "File is too large." }
|
|
8091
8098
|
};
|
|
@@ -8234,19 +8241,19 @@ var DeleteMediaOutputSchema = object({
|
|
|
8234
8241
|
var tagged10 = base.route({ tags: ["Media library"] });
|
|
8235
8242
|
var internal6 = tagged10.meta({ internal: true });
|
|
8236
8243
|
var folderErrors = {
|
|
8237
|
-
...
|
|
8244
|
+
...orgErrors,
|
|
8238
8245
|
FOLDER_CYCLE: { status: 422, message: "A folder cannot be moved inside itself." }
|
|
8239
8246
|
};
|
|
8240
8247
|
var mediaContract = {
|
|
8241
8248
|
list: internal6.route({ method: "GET", path: "/media", summary: "List library media" }).errors(orgErrors).input(ListMediaInputSchema).output(ListMediaOutputSchema),
|
|
8242
8249
|
listFolders: internal6.route({ method: "GET", path: "/media/folders", summary: "List media folders with counts" }).errors(orgErrors).output(ListMediaFoldersOutputSchema),
|
|
8243
|
-
createFolder: internal6.route({ method: "POST", path: "/media/folders", summary: "Create a media folder", successStatus: 201 }).errors({ ...
|
|
8250
|
+
createFolder: internal6.route({ method: "POST", path: "/media/folders", summary: "Create a media folder", successStatus: 201 }).errors({ ...orgErrors, CONFLICT: { message: "A folder with that name already exists here." } }).input(CreateMediaFolderInputSchema).output(MediaFolderSchema),
|
|
8244
8251
|
updateFolder: internal6.route({ method: "PATCH", path: "/media/folders/{id}", summary: "Rename or move a media folder" }).errors({ ...folderErrors, CONFLICT: { message: "A folder with that name already exists here." } }).input(UpdateMediaFolderInputSchema).output(MediaFolderSchema),
|
|
8245
|
-
deleteFolder: internal6.route({ method: "DELETE", path: "/media/folders/{id}", summary: "Delete a media folder" }).errors(
|
|
8252
|
+
deleteFolder: internal6.route({ method: "DELETE", path: "/media/folders/{id}", summary: "Delete a media folder" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema),
|
|
8246
8253
|
getById: internal6.route({ method: "GET", path: "/media/{id}", summary: "Get a library asset" }).errors(orgErrors).input(IdPathParam).output(LibraryMediaSchema),
|
|
8247
|
-
update: internal6.route({ method: "PATCH", path: "/media/{id}", summary: "Rename or refile a library asset" }).errors(
|
|
8248
|
-
move: internal6.route({ method: "POST", path: "/media/move", summary: "File assets into a folder" }).errors(
|
|
8249
|
-
delete: internal6.route({ method: "POST", path: "/media/delete", summary: "Delete library assets" }).errors(
|
|
8254
|
+
update: internal6.route({ method: "PATCH", path: "/media/{id}", summary: "Rename or refile a library asset" }).errors(orgErrors).input(UpdateMediaInputSchema).output(LibraryMediaSchema),
|
|
8255
|
+
move: internal6.route({ method: "POST", path: "/media/move", summary: "File assets into a folder" }).errors(orgErrors).input(MoveMediaInputSchema).output(object({ movedIds: array(Uuid) })),
|
|
8256
|
+
delete: internal6.route({ method: "POST", path: "/media/delete", summary: "Delete library assets" }).errors(orgErrors).input(DeleteMediaInputSchema).output(DeleteMediaOutputSchema)
|
|
8250
8257
|
};
|
|
8251
8258
|
|
|
8252
8259
|
// ../../packages/api-contract/src/media-sources.ts
|
|
@@ -8311,7 +8318,7 @@ var unsplashErrors = {
|
|
|
8311
8318
|
NOT_CONFIGURED: { status: 412, message: "Unsplash integration is not configured on the server." }
|
|
8312
8319
|
};
|
|
8313
8320
|
var enableSourceErrors = {
|
|
8314
|
-
...
|
|
8321
|
+
...orgErrors,
|
|
8315
8322
|
NOT_CONFIGURED: { status: 412, message: "Source is not configured on this deployment." }
|
|
8316
8323
|
};
|
|
8317
8324
|
var tagged11 = base.route({ tags: ["Media sources"] }).meta({ internal: true });
|
|
@@ -8322,9 +8329,9 @@ var mediaSourcesContract = {
|
|
|
8322
8329
|
method: "POST",
|
|
8323
8330
|
path: "/media-sources/{sourceId}/disable",
|
|
8324
8331
|
summary: "Disable a media source for this org"
|
|
8325
|
-
}).errors(
|
|
8332
|
+
}).errors(orgErrors).input(SourceIdInputSchema).output(DeletedSchema),
|
|
8326
8333
|
suggestSource: tagged11.route({ method: "POST", path: "/media-sources/suggestions", summary: "Suggest a media source not yet supported" }).errors(orgErrors).input(SuggestSourceInputSchema).output(DeletedSchema),
|
|
8327
|
-
importAsset: tagged11.route({ method: "POST", path: "/media-sources/import", summary: "Import an asset picked from a media source" }).errors(
|
|
8334
|
+
importAsset: tagged11.route({ method: "POST", path: "/media-sources/import", summary: "Import an asset picked from a media source" }).errors(orgErrors).input(ImportAssetInputSchema).output(ImportAssetOutputSchema),
|
|
8328
8335
|
unsplashTrending: tagged11.route({ method: "GET", path: "/media-sources/unsplash/trending", summary: "Unsplash curated/trending photos" }).errors(unsplashErrors).input(UnsplashPageInputSchema).output(UnsplashTrendingOutputSchema),
|
|
8329
8336
|
unsplashSearch: tagged11.route({ method: "GET", path: "/media-sources/unsplash/search", summary: "Search Unsplash photos" }).errors(unsplashErrors).input(UnsplashSearchInputSchema).output(UnsplashSearchOutputSchema)
|
|
8330
8337
|
};
|
|
@@ -8732,26 +8739,26 @@ var postsContract = {
|
|
|
8732
8739
|
counts: internal7.route({ method: "GET", path: "/posts/counts", summary: "Count posts per status" }).errors(orgErrors).input(CountPostsInputSchema).output(CountPostsOutputSchema),
|
|
8733
8740
|
getById: tagged13.route({ method: "GET", path: "/posts/{id}", summary: "Get a post" }).errors(orgErrors).input(IdPathParam).output(PostWithRelationsSchema),
|
|
8734
8741
|
mediaById: internal7.route({ method: "GET", path: "/posts/media/{id}", summary: "Get post media metadata" }).errors(orgErrors).input(IdPathParam).output(MediaMetadataSchema),
|
|
8735
|
-
create: idempotent.route({ method: "POST", path: "/posts", summary: "Create posts in bulk", successStatus: 201 }).errors({ ...
|
|
8736
|
-
update: idempotent.route({ method: "PATCH", path: "/posts/{id}", summary: "Update a post" }).errors({ ...
|
|
8737
|
-
scheduleDraft: idempotent.route({ method: "POST", path: "/posts/{id}/schedule", summary: "Schedule a draft" }).errors({ ...
|
|
8738
|
-
delete: idempotent.route({ method: "DELETE", path: "/posts/{id}", summary: "Delete a post" }).errors({ ...
|
|
8742
|
+
create: idempotent.route({ method: "POST", path: "/posts", summary: "Create posts in bulk", successStatus: 201 }).errors({ ...orgErrors, ...postDomainErrors }).input(CreatePostsInputSchema).output(CreatePostsOutputSchema),
|
|
8743
|
+
update: idempotent.route({ method: "PATCH", path: "/posts/{id}", summary: "Update a post" }).errors({ ...orgErrors, ...postDomainErrors }).input(UpdatePostInputSchema).output(PostStateSchema),
|
|
8744
|
+
scheduleDraft: idempotent.route({ method: "POST", path: "/posts/{id}/schedule", summary: "Schedule a draft" }).errors({ ...orgErrors, ...postDomainErrors }).input(ScheduleDraftInputSchema).output(PostStateSchema),
|
|
8745
|
+
delete: idempotent.route({ method: "DELETE", path: "/posts/{id}", summary: "Delete a post" }).errors({ ...orgErrors, ...postDomainErrors }).input(DeletePostInputSchema).output(DeletePostOutputSchema),
|
|
8739
8746
|
retrySchedule: idempotent.route({ method: "POST", path: "/posts/schedules/{scheduleId}/retry", summary: "Retry a failed schedule" }).errors({ ...publishErrors, ...postDomainErrors }).input(RetryScheduleInputSchema).output(PostStateSchema),
|
|
8740
8747
|
rescheduleSchedule: idempotent.route({
|
|
8741
8748
|
method: "POST",
|
|
8742
8749
|
path: "/posts/schedules/{scheduleId}/reschedule",
|
|
8743
8750
|
summary: "Move a schedule to a new time"
|
|
8744
|
-
}).errors({ ...
|
|
8751
|
+
}).errors({ ...orgErrors, ...postDomainErrors }).input(RescheduleInputSchema).output(PostStateSchema),
|
|
8745
8752
|
markPosted: idempotent.route({
|
|
8746
8753
|
method: "POST",
|
|
8747
8754
|
path: "/posts/schedules/{scheduleId}/mark-posted",
|
|
8748
8755
|
summary: "Mark a ready schedule as posted"
|
|
8749
|
-
}).errors({ ...
|
|
8756
|
+
}).errors({ ...orgErrors, ...postDomainErrors }).input(object({ scheduleId: Uuid })).output(PostStateSchema),
|
|
8750
8757
|
bulkScheduleInWindows: internal7.route({
|
|
8751
8758
|
method: "POST",
|
|
8752
8759
|
path: "/posts/schedules/bulk-schedule-windows",
|
|
8753
8760
|
summary: "Spread schedules across optimal windows"
|
|
8754
|
-
}).errors({ ...
|
|
8761
|
+
}).errors({ ...orgErrors, ...postDomainErrors }).input(BulkScheduleInWindowsInputSchema).output(BulkScheduleInWindowsOutputSchema),
|
|
8755
8762
|
addChannels: internal7.route({
|
|
8756
8763
|
method: "POST",
|
|
8757
8764
|
path: "/posts/{id}/channels",
|
|
@@ -8761,7 +8768,7 @@ var postsContract = {
|
|
|
8761
8768
|
method: "POST",
|
|
8762
8769
|
path: "/posts/{id}/apply-review-comments",
|
|
8763
8770
|
summary: "Rewrite post or variant from unresolved review and client comments"
|
|
8764
|
-
}).errors({ ...
|
|
8771
|
+
}).errors({ ...orgErrors, ...postDomainErrors }).input(ApplyReviewCommentsInputSchema).output(ApplyReviewCommentsOutputSchema)
|
|
8765
8772
|
};
|
|
8766
8773
|
|
|
8767
8774
|
// ../../packages/api-contract/src/public-calendar.ts
|
|
@@ -9198,20 +9205,20 @@ var sourcesContract = {
|
|
|
9198
9205
|
})
|
|
9199
9206
|
),
|
|
9200
9207
|
delete: tagged14.route({ method: "DELETE", path: "/repurpose/sources/{id}", summary: "Delete a source post" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema),
|
|
9201
|
-
update: tagged14.route({ method: "PATCH", path: "/repurpose/sources/{id}", summary: "Edit a source post's raw content" }).errors(
|
|
9208
|
+
update: tagged14.route({ method: "PATCH", path: "/repurpose/sources/{id}", summary: "Edit a source post's raw content" }).errors(orgErrors).input(object({ id: Uuid, rawContent: string2().min(1) })).output(object({ success: literal(true), id: Uuid })),
|
|
9202
9209
|
createDraft: tagged14.route({
|
|
9203
9210
|
method: "POST",
|
|
9204
9211
|
path: "/repurpose/sources/{id}/draft",
|
|
9205
9212
|
summary: "Create a draft post from a source post, unadapted",
|
|
9206
9213
|
successStatus: 201
|
|
9207
|
-
}).errors(
|
|
9214
|
+
}).errors(orgErrors).input(IdPathParam).output(object({ success: literal(true), postId: Uuid }))
|
|
9208
9215
|
};
|
|
9209
9216
|
var adaptContract = {
|
|
9210
9217
|
preview: tagged14.route({
|
|
9211
9218
|
method: "POST",
|
|
9212
9219
|
path: "/repurpose/adapt/preview",
|
|
9213
9220
|
summary: "Adapt a source post for a target platform synchronously and create a draft"
|
|
9214
|
-
}).errors(
|
|
9221
|
+
}).errors(orgErrors).input(object({ sourcePostId: Uuid, targetPlatform: PlatformSchema })).output(
|
|
9215
9222
|
object({
|
|
9216
9223
|
postId: Uuid,
|
|
9217
9224
|
content: string2(),
|
|
@@ -9313,7 +9320,7 @@ var workflowsContract = {
|
|
|
9313
9320
|
list: tagged14.route({ method: "GET", path: "/repurpose/workflows", summary: "List growth workflows" }).errors(orgErrors).output(array(GrowthWorkflowSchema)),
|
|
9314
9321
|
get: tagged14.route({ method: "GET", path: "/repurpose/workflows/{id}", summary: "Get a growth workflow" }).errors(orgErrors).input(IdPathParam).output(GrowthWorkflowSchema),
|
|
9315
9322
|
update: tagged14.route({ method: "PATCH", path: "/repurpose/workflows/{id}", summary: "Update a growth workflow" }).errors({ ...publishErrors, ...quotaErrors }).input(UpdateWorkflowInputSchema).output(GrowthWorkflowSchema),
|
|
9316
|
-
pause: tagged14.route({ method: "POST", path: "/repurpose/workflows/{id}/pause", summary: "Pause a growth workflow" }).errors({ ...
|
|
9323
|
+
pause: tagged14.route({ method: "POST", path: "/repurpose/workflows/{id}/pause", summary: "Pause a growth workflow" }).errors({ ...orgErrors, ...stateConflict }).input(object({ id: Uuid, reason: string2().optional() })).output(GrowthWorkflowSchema),
|
|
9317
9324
|
resume: tagged14.route({ method: "POST", path: "/repurpose/workflows/{id}/resume", summary: "Resume a paused growth workflow" }).errors({ ...publishErrors, ...quotaErrors, ...stateConflict }).input(object({ id: Uuid, resumeFromCursor: _enum(["old", "now"]) })).output(GrowthWorkflowSchema),
|
|
9318
9325
|
delete: tagged14.route({ method: "DELETE", path: "/repurpose/workflows/{id}", summary: "Delete a growth workflow" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema),
|
|
9319
9326
|
runNow: tagged14.route({
|
|
@@ -9404,7 +9411,7 @@ var reviewsContract = {
|
|
|
9404
9411
|
requiredApproverIds: array(string2()).optional()
|
|
9405
9412
|
})
|
|
9406
9413
|
).output(SuccessSchema),
|
|
9407
|
-
submitDecision: tagged15.route({ method: "POST", path: "/posts/{postId}/reviews/decision", summary: "Approve, reject, or request changes" }).errors(
|
|
9414
|
+
submitDecision: tagged15.route({ method: "POST", path: "/posts/{postId}/reviews/decision", summary: "Approve, reject, or request changes" }).errors(orgErrors).input(
|
|
9408
9415
|
object({
|
|
9409
9416
|
postId: Uuid,
|
|
9410
9417
|
postScheduleId: Uuid.nullable().optional(),
|
|
@@ -9412,7 +9419,7 @@ var reviewsContract = {
|
|
|
9412
9419
|
comment: string2().trim().max(2e3).optional()
|
|
9413
9420
|
})
|
|
9414
9421
|
).output(SuccessSchema),
|
|
9415
|
-
cancelReview: tagged15.route({ method: "POST", path: "/posts/{postId}/reviews/cancel", summary: "Cancel a pending review" }).errors(
|
|
9422
|
+
cancelReview: tagged15.route({ method: "POST", path: "/posts/{postId}/reviews/cancel", summary: "Cancel a pending review" }).errors(orgErrors).input(object({ postId: Uuid })).output(SuccessSchema)
|
|
9416
9423
|
};
|
|
9417
9424
|
|
|
9418
9425
|
// ../../packages/api-contract/src/schedules.ts
|
|
@@ -9538,7 +9545,7 @@ var schedulesContract = {
|
|
|
9538
9545
|
list: tagged16.route({ method: "GET", path: "/schedules", summary: "List schedules (calendar view)" }).errors(orgErrors).input(ListSchedulesInputSchema).output(ListSchedulesOutputSchema),
|
|
9539
9546
|
counts: tagged16.route({ method: "GET", path: "/schedules/counts", summary: "Count schedules per status" }).meta({ internal: true }).errors(orgErrors).input(CountSchedulesInputSchema).output(CountSchedulesOutputSchema),
|
|
9540
9547
|
getById: tagged16.route({ method: "GET", path: "/schedules/{id}", summary: "Get a schedule" }).errors(orgErrors).input(GetScheduleByIdInputSchema).output(ScheduleWithPostSchema),
|
|
9541
|
-
delete: tagged16.route({ method: "DELETE", path: "/schedules/{id}", summary: "Delete a schedule" }).errors({ ...
|
|
9548
|
+
delete: tagged16.route({ method: "DELETE", path: "/schedules/{id}", summary: "Delete a schedule" }).errors({ ...orgErrors, ...postDomainErrors }).input(DeleteScheduleInputSchema).output(DeletedSchema)
|
|
9542
9549
|
};
|
|
9543
9550
|
|
|
9544
9551
|
// ../../packages/api-contract/src/snippets.ts
|
|
@@ -9565,8 +9572,8 @@ var internal8 = publicTagged3.meta({ internal: true });
|
|
|
9565
9572
|
var snippetsContract = {
|
|
9566
9573
|
list: publicTagged3.route({ method: "GET", path: "/snippets", summary: "List saved snippets and hashtag groups" }).errors(orgErrors).output(array(SnippetSchema)),
|
|
9567
9574
|
getById: publicTagged3.route({ method: "GET", path: "/snippets/{id}", summary: "Get a snippet" }).errors(orgErrors).input(IdPathParam).output(SnippetSchema),
|
|
9568
|
-
create: internal8.route({ method: "POST", path: "/snippets", summary: "Create a snippet", successStatus: 201 }).errors(
|
|
9569
|
-
delete: internal8.route({ method: "DELETE", path: "/snippets/{id}", summary: "Delete a snippet" }).errors(
|
|
9575
|
+
create: internal8.route({ method: "POST", path: "/snippets", summary: "Create a snippet", successStatus: 201 }).errors(orgErrors).input(CreateSnippetInputSchema).output(SnippetSchema),
|
|
9576
|
+
delete: internal8.route({ method: "DELETE", path: "/snippets/{id}", summary: "Delete a snippet" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
|
|
9570
9577
|
};
|
|
9571
9578
|
|
|
9572
9579
|
// ../../packages/api-contract/src/support.ts
|
|
@@ -9655,8 +9662,8 @@ var tagsContract = {
|
|
|
9655
9662
|
list: tagged17.route({ method: "GET", path: "/tags", summary: "List tags" }).errors(orgErrors).output(array(TagSchema)),
|
|
9656
9663
|
getUsageCounts: internal10.route({ method: "GET", path: "/tags/usage-counts", summary: "Count posts per tag" }).errors(orgErrors).output(array(TagUsageCountSchema)),
|
|
9657
9664
|
getById: tagged17.route({ method: "GET", path: "/tags/{id}", summary: "Get a tag" }).errors(orgErrors).input(IdPathParam).output(TagSchema),
|
|
9658
|
-
create: internal10.route({ method: "POST", path: "/tags", summary: "Create a tag", successStatus: 201 }).errors({ ...
|
|
9659
|
-
update: internal10.route({ method: "PATCH", path: "/tags/{id}", summary: "Rename a tag" }).errors(
|
|
9665
|
+
create: internal10.route({ method: "POST", path: "/tags", summary: "Create a tag", successStatus: 201 }).errors({ ...orgErrors, CONFLICT: { message: "A tag with that name already exists." } }).input(CreateTagInputSchema).output(TagSchema),
|
|
9666
|
+
update: internal10.route({ method: "PATCH", path: "/tags/{id}", summary: "Rename a tag" }).errors(orgErrors).input(UpdateTagInputSchema).output(TagSchema),
|
|
9660
9667
|
delete: internal10.route({ method: "DELETE", path: "/tags/{id}", summary: "Delete a tag" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
|
|
9661
9668
|
};
|
|
9662
9669
|
|
|
@@ -12764,7 +12771,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
|
|
|
12764
12771
|
}
|
|
12765
12772
|
|
|
12766
12773
|
// src/version.ts
|
|
12767
|
-
var CLI_VERSION = "0.1.
|
|
12774
|
+
var CLI_VERSION = "0.1.59";
|
|
12768
12775
|
|
|
12769
12776
|
// src/client.ts
|
|
12770
12777
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|