@postonus/cli 0.1.47 → 0.1.49
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 +110 -58
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7826,6 +7826,50 @@ var channelGroupsContract = {
|
|
|
7826
7826
|
delete: tagged5.route({ method: "DELETE", path: "/channel-groups/{id}", summary: "Delete a channel group" }).errors(orgErrors).input(IdPathParam).output(object({ success: literal(true) }))
|
|
7827
7827
|
};
|
|
7828
7828
|
|
|
7829
|
+
// ../../packages/api-contract/src/clips.ts
|
|
7830
|
+
var internal4 = base.meta({ internal: true });
|
|
7831
|
+
var ClipJobStatusSchema = _enum(["QUEUED", "PROCESSING", "DONE", "FAILED"]);
|
|
7832
|
+
var ClipJobSchema = object({
|
|
7833
|
+
id: Uuid,
|
|
7834
|
+
organizationId: string2(),
|
|
7835
|
+
createdBy: string2(),
|
|
7836
|
+
sourceMediaId: Uuid.nullable(),
|
|
7837
|
+
youtubeUrl: string2().nullable(),
|
|
7838
|
+
status: ClipJobStatusSchema,
|
|
7839
|
+
failureCode: string2().nullable(),
|
|
7840
|
+
inputSeconds: number2().int().nullable(),
|
|
7841
|
+
creditsReserved: number2().int(),
|
|
7842
|
+
transcriptVendor: string2().nullable(),
|
|
7843
|
+
clipMediaIds: array(string2()),
|
|
7844
|
+
draftPostIds: array(string2()),
|
|
7845
|
+
createdAt: Timestamp,
|
|
7846
|
+
updatedAt: Timestamp
|
|
7847
|
+
});
|
|
7848
|
+
var CreateClipJobInputSchema = object({
|
|
7849
|
+
mediaId: Uuid.optional(),
|
|
7850
|
+
youtubeUrl: string2().url().optional()
|
|
7851
|
+
});
|
|
7852
|
+
var ListClipsInputSchema = object({
|
|
7853
|
+
limit: coerce_exports.number().int().min(1).max(100).default(20).optional()
|
|
7854
|
+
});
|
|
7855
|
+
var ListClipsOutputSchema = object({
|
|
7856
|
+
items: array(ClipJobSchema)
|
|
7857
|
+
});
|
|
7858
|
+
var clipErrors = {
|
|
7859
|
+
...writableErrors,
|
|
7860
|
+
CONFLICT: { status: 409, message: "A clip job is already running for this workspace." },
|
|
7861
|
+
AI_CREDITS_EXHAUSTED: {
|
|
7862
|
+
status: 403,
|
|
7863
|
+
message: "AI credits exhausted. Upgrade your plan or wait for your credits to renew."
|
|
7864
|
+
},
|
|
7865
|
+
BAD_REQUEST: { message: "Bad request." }
|
|
7866
|
+
};
|
|
7867
|
+
var clipsContract = {
|
|
7868
|
+
create: internal4.route({ method: "POST", path: "/clips", summary: "Create a video clip job", successStatus: 201 }).errors(clipErrors).input(CreateClipJobInputSchema).output(ClipJobSchema),
|
|
7869
|
+
get: internal4.route({ method: "GET", path: "/clips/{id}", summary: "Get a clip job by ID" }).errors(orgErrors).input(IdPathParam).output(ClipJobSchema),
|
|
7870
|
+
list: internal4.route({ method: "GET", path: "/clips", summary: "List clip jobs for the active workspace" }).errors(orgErrors).input(ListClipsInputSchema).output(ListClipsOutputSchema)
|
|
7871
|
+
};
|
|
7872
|
+
|
|
7829
7873
|
// ../../packages/api-contract/src/comments.ts
|
|
7830
7874
|
var CommentAuthorSchema = object({
|
|
7831
7875
|
id: string2(),
|
|
@@ -8033,29 +8077,29 @@ var DisconnectImpactSchema = object({
|
|
|
8033
8077
|
isLastBinding: boolean2()
|
|
8034
8078
|
});
|
|
8035
8079
|
var tagged8 = base.route({ tags: ["Integrations"] });
|
|
8036
|
-
var
|
|
8080
|
+
var internal5 = tagged8.meta({ internal: true });
|
|
8037
8081
|
var integrationsContract = {
|
|
8038
8082
|
get: tagged8.route({ method: "GET", path: "/integrations", summary: "List active integrations with health" }).errors(orgErrors).output(array(IntegrationSchema)),
|
|
8039
|
-
getCapacity:
|
|
8040
|
-
listUnhealthy:
|
|
8041
|
-
listAtRiskSchedules:
|
|
8083
|
+
getCapacity: internal5.route({ method: "GET", path: "/integrations/capacity", summary: "Social-account plan capacity" }).errors(orgErrors).output(IntegrationCapacitySchema),
|
|
8084
|
+
listUnhealthy: internal5.route({ method: "GET", path: "/integrations/unhealthy", summary: "Integrations needing reconnect" }).errors(orgErrors).output(array(UnhealthyIntegrationSchema)),
|
|
8085
|
+
listAtRiskSchedules: internal5.route({
|
|
8042
8086
|
method: "GET",
|
|
8043
8087
|
path: "/integrations/at-risk-schedules",
|
|
8044
8088
|
summary: "Scheduled posts whose channel cannot currently publish"
|
|
8045
8089
|
}).errors(orgErrors).output(array(AtRiskScheduleSchema)),
|
|
8046
|
-
listPendingSelection:
|
|
8090
|
+
listPendingSelection: internal5.route({ method: "GET", path: "/integrations/pending-selection", summary: "Channels stuck at the account picker" }).errors(orgErrors).output(array(PendingSelectionIntegrationSchema)),
|
|
8047
8091
|
connectIntegration: tagged8.route({ method: "POST", path: "/integrations/connect", summary: "Start an OAuth connect" }).errors(writableErrors).input(ConnectIntegrationInputSchema).output(object({ redirectUrl: string2() })),
|
|
8048
|
-
connectCredentialIntegration:
|
|
8092
|
+
connectCredentialIntegration: internal5.route({
|
|
8049
8093
|
method: "POST",
|
|
8050
8094
|
path: "/integrations/connect-with-credentials",
|
|
8051
8095
|
summary: "Connect a platform with an app password or bot token"
|
|
8052
8096
|
}).errors(writableErrors).input(ConnectCredentialIntegrationInputSchema).output(ConnectCredentialResultSchema),
|
|
8053
|
-
listConnectAccounts:
|
|
8054
|
-
finalizeConnect:
|
|
8055
|
-
disconnectIntegration:
|
|
8056
|
-
disconnectImpact:
|
|
8057
|
-
cancelPendingSelection:
|
|
8058
|
-
refreshIntegration:
|
|
8097
|
+
listConnectAccounts: internal5.route({ method: "GET", path: "/integrations/{id}/accounts", summary: "Accounts a pending connect may select" }).errors(orgErrors).input(IdPathParam).output(array(SelectableAccountSchema)),
|
|
8098
|
+
finalizeConnect: internal5.route({ method: "POST", path: "/integrations/{id}/select", summary: "Finalize a picked account" }).errors(writableErrors).input(FinalizeConnectInputSchema).output(FinalizeConnectResultSchema),
|
|
8099
|
+
disconnectIntegration: internal5.route({ method: "DELETE", path: "/integrations/{id}", summary: "Disconnect an integration" }).errors(orgErrors).input(IdPathParam).output(DisconnectResultSchema),
|
|
8100
|
+
disconnectImpact: internal5.route({ method: "GET", path: "/integrations/{id}/disconnect-impact", summary: "What a disconnect would cost" }).errors(orgErrors).input(IdPathParam).output(DisconnectImpactSchema),
|
|
8101
|
+
cancelPendingSelection: internal5.route({ method: "POST", path: "/integrations/{id}/cancel-selection", summary: "Abandon a half-finished connect" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema),
|
|
8102
|
+
refreshIntegration: internal5.route({ method: "POST", path: "/integrations/{id}/refresh", summary: "Manually refresh a credential" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema)
|
|
8059
8103
|
};
|
|
8060
8104
|
|
|
8061
8105
|
// ../../packages/api-contract/src/upload.ts
|
|
@@ -8125,6 +8169,8 @@ var CompleteUploadOutputSchema = object({
|
|
|
8125
8169
|
publicUrl: string2(),
|
|
8126
8170
|
idempotent: boolean2(),
|
|
8127
8171
|
mediaId: Uuid.nullable(),
|
|
8172
|
+
type: MediaTypeSchema.optional(),
|
|
8173
|
+
bytes: number2().int().optional(),
|
|
8128
8174
|
variants: MediaVariantsSchema.nullable(),
|
|
8129
8175
|
variantsStatus: MediaVariantsStatusSchema.nullable(),
|
|
8130
8176
|
/** Set only by scenarios that change something the client renders immediately (`user_avatar`). */
|
|
@@ -8139,7 +8185,8 @@ var FromUrlOutputSchema = object({
|
|
|
8139
8185
|
uploadId: Uuid,
|
|
8140
8186
|
mediaId: Uuid.nullable(),
|
|
8141
8187
|
publicUrl: string2(),
|
|
8142
|
-
type: MediaTypeSchema
|
|
8188
|
+
type: MediaTypeSchema,
|
|
8189
|
+
bytes: number2().int().optional()
|
|
8143
8190
|
});
|
|
8144
8191
|
var tagged9 = base.route({ tags: ["Uploads"] });
|
|
8145
8192
|
var uploadContract = {
|
|
@@ -8236,23 +8283,23 @@ var DeleteMediaOutputSchema = object({
|
|
|
8236
8283
|
blocked: array(object({ mediaId: Uuid, usedInPostsCount: number2().int() }))
|
|
8237
8284
|
});
|
|
8238
8285
|
var tagged10 = base.route({ tags: ["Media library"] });
|
|
8239
|
-
var
|
|
8286
|
+
var internal6 = tagged10.meta({ internal: true });
|
|
8240
8287
|
var folderErrors = {
|
|
8241
8288
|
...writableErrors,
|
|
8242
8289
|
FOLDER_CYCLE: { status: 422, message: "A folder cannot be moved inside itself." }
|
|
8243
8290
|
};
|
|
8244
8291
|
var mediaContract = {
|
|
8245
|
-
list:
|
|
8292
|
+
list: internal6.route({ method: "GET", path: "/media", summary: "List library media" }).errors(orgErrors).input(ListMediaInputSchema).output(ListMediaOutputSchema),
|
|
8246
8293
|
// Declared before `getById` for readability only — oRPC matches a literal
|
|
8247
8294
|
// segment ahead of a path parameter regardless of declaration order.
|
|
8248
|
-
listFolders:
|
|
8249
|
-
createFolder:
|
|
8250
|
-
updateFolder:
|
|
8251
|
-
deleteFolder:
|
|
8252
|
-
getById:
|
|
8253
|
-
update:
|
|
8254
|
-
move:
|
|
8255
|
-
delete:
|
|
8295
|
+
listFolders: internal6.route({ method: "GET", path: "/media/folders", summary: "List media folders with counts" }).errors(orgErrors).output(ListMediaFoldersOutputSchema),
|
|
8296
|
+
createFolder: internal6.route({ method: "POST", path: "/media/folders", summary: "Create a media folder", successStatus: 201 }).errors({ ...writableErrors, CONFLICT: { message: "A folder with that name already exists here." } }).input(CreateMediaFolderInputSchema).output(MediaFolderSchema),
|
|
8297
|
+
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),
|
|
8298
|
+
deleteFolder: internal6.route({ method: "DELETE", path: "/media/folders/{id}", summary: "Delete a media folder" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema),
|
|
8299
|
+
getById: internal6.route({ method: "GET", path: "/media/{id}", summary: "Get a library asset" }).errors(orgErrors).input(IdPathParam).output(LibraryMediaSchema),
|
|
8300
|
+
update: internal6.route({ method: "PATCH", path: "/media/{id}", summary: "Rename or refile a library asset" }).errors(writableErrors).input(UpdateMediaInputSchema).output(LibraryMediaSchema),
|
|
8301
|
+
move: internal6.route({ method: "POST", path: "/media/move", summary: "File assets into a folder" }).errors(writableErrors).input(MoveMediaInputSchema).output(object({ movedIds: array(Uuid) })),
|
|
8302
|
+
delete: internal6.route({ method: "POST", path: "/media/delete", summary: "Delete library assets" }).errors(writableErrors).input(DeleteMediaInputSchema).output(DeleteMediaOutputSchema)
|
|
8256
8303
|
};
|
|
8257
8304
|
|
|
8258
8305
|
// ../../packages/api-contract/src/media-sources.ts
|
|
@@ -8428,8 +8475,12 @@ var ThreadFields = {
|
|
|
8428
8475
|
};
|
|
8429
8476
|
var SharedPostFields = {
|
|
8430
8477
|
selectedIntegrations: array(string2()).optional(),
|
|
8431
|
-
integrationContent: record(string2(), string2()).
|
|
8432
|
-
|
|
8478
|
+
integrationContent: record(string2(), string2().trim().max(DRAFT_MAX_CHARS)).refine((val) => Object.keys(val).length <= PLATFORM_VALUES.length, {
|
|
8479
|
+
message: `At most ${PLATFORM_VALUES.length} platform copy overrides allowed`
|
|
8480
|
+
}).optional(),
|
|
8481
|
+
integrationFirstComment: record(string2(), string2().trim().max(DRAFT_MAX_CHARS)).refine((val) => Object.keys(val).length <= PLATFORM_VALUES.length, {
|
|
8482
|
+
message: `At most ${PLATFORM_VALUES.length} platform first comment overrides allowed`
|
|
8483
|
+
}).optional(),
|
|
8433
8484
|
integrationSettings: IntegrationSettingsInputSchema.optional(),
|
|
8434
8485
|
subreddit: string2().trim().min(1).optional(),
|
|
8435
8486
|
xLinkHandling: _enum(["first_reply", "plain_text", "keep_live"]).optional(),
|
|
@@ -8538,7 +8589,7 @@ var AddChannelsInputSchema = object({
|
|
|
8538
8589
|
var RetryScheduleInputSchema = object({
|
|
8539
8590
|
scheduleId: Uuid,
|
|
8540
8591
|
/** Replacement copy for this channel only. Omitted leaves it as it was. */
|
|
8541
|
-
content: string2().trim().optional(),
|
|
8592
|
+
content: string2().trim().max(DRAFT_MAX_CHARS).optional(),
|
|
8542
8593
|
/**
|
|
8543
8594
|
* Which of the post's existing attachments this channel publishes, in order.
|
|
8544
8595
|
* Must be a subset of what the post already has: adding media would mean
|
|
@@ -8753,14 +8804,14 @@ var idempotent = tagged13.route({
|
|
|
8753
8804
|
]
|
|
8754
8805
|
})
|
|
8755
8806
|
});
|
|
8756
|
-
var
|
|
8807
|
+
var internal7 = tagged13.meta({ internal: true });
|
|
8757
8808
|
var postsContract = {
|
|
8758
8809
|
list: tagged13.route({ method: "GET", path: "/posts", summary: "List posts" }).errors(orgErrors).input(ListPostsInputSchema).output(PostsListOutputSchema),
|
|
8759
8810
|
// Declared before `getById` so `/posts/counts` is not read as `/posts/{id}`.
|
|
8760
8811
|
// Dashboard plumbing: the status segment row on `/posts`.
|
|
8761
|
-
counts:
|
|
8812
|
+
counts: internal7.route({ method: "GET", path: "/posts/counts", summary: "Count posts per status" }).errors(orgErrors).input(CountPostsInputSchema).output(CountPostsOutputSchema),
|
|
8762
8813
|
getById: tagged13.route({ method: "GET", path: "/posts/{id}", summary: "Get a post" }).errors(orgErrors).input(IdPathParam).output(PostWithRelationsSchema),
|
|
8763
|
-
mediaById:
|
|
8814
|
+
mediaById: internal7.route({ method: "GET", path: "/posts/media/{id}", summary: "Get post media metadata" }).errors(orgErrors).input(IdPathParam).output(MediaMetadataSchema),
|
|
8764
8815
|
create: idempotent.route({ method: "POST", path: "/posts", summary: "Create posts in bulk", successStatus: 201 }).errors({ ...writableErrors, ...postDomainErrors }).input(CreatePostsInputSchema).output(CreatePostsOutputSchema),
|
|
8765
8816
|
update: idempotent.route({ method: "PATCH", path: "/posts/{id}", summary: "Update a post" }).errors({ ...writableErrors, ...postDomainErrors }).input(UpdatePostInputSchema).output(PostStateSchema),
|
|
8766
8817
|
scheduleDraft: idempotent.route({ method: "POST", path: "/posts/{id}/schedule", summary: "Schedule a draft" }).errors({ ...writableErrors, ...postDomainErrors }).input(ScheduleDraftInputSchema).output(PostStateSchema),
|
|
@@ -8771,17 +8822,17 @@ var postsContract = {
|
|
|
8771
8822
|
path: "/posts/schedules/{scheduleId}/reschedule",
|
|
8772
8823
|
summary: "Move a schedule to a new time"
|
|
8773
8824
|
}).errors({ ...writableErrors, ...postDomainErrors }).input(RescheduleInputSchema).output(PostStateSchema),
|
|
8774
|
-
bulkScheduleInWindows:
|
|
8825
|
+
bulkScheduleInWindows: internal7.route({
|
|
8775
8826
|
method: "POST",
|
|
8776
8827
|
path: "/posts/schedules/bulk-schedule-windows",
|
|
8777
8828
|
summary: "Spread schedules across optimal windows"
|
|
8778
8829
|
}).errors({ ...writableErrors, ...postDomainErrors }).input(BulkScheduleInWindowsInputSchema).output(BulkScheduleInWindowsOutputSchema),
|
|
8779
|
-
addChannels:
|
|
8830
|
+
addChannels: internal7.route({
|
|
8780
8831
|
method: "POST",
|
|
8781
8832
|
path: "/posts/{id}/channels",
|
|
8782
8833
|
summary: "Schedule an existing post to more channels"
|
|
8783
8834
|
}).errors({ ...publishErrors, ...postDomainErrors }).input(AddChannelsInputSchema).output(AddChannelsOutputSchema),
|
|
8784
|
-
applyReviewComments:
|
|
8835
|
+
applyReviewComments: internal7.route({
|
|
8785
8836
|
method: "POST",
|
|
8786
8837
|
path: "/posts/{id}/apply-review-comments",
|
|
8787
8838
|
summary: "Rewrite post or variant from unresolved review and client comments"
|
|
@@ -9647,12 +9698,12 @@ var CreateSnippetInputSchema = object({
|
|
|
9647
9698
|
tags: array(SnippetTagSchema).default([])
|
|
9648
9699
|
});
|
|
9649
9700
|
var publicTagged3 = base.route({ tags: ["Snippets"] });
|
|
9650
|
-
var
|
|
9701
|
+
var internal8 = publicTagged3.meta({ internal: true });
|
|
9651
9702
|
var snippetsContract = {
|
|
9652
9703
|
list: publicTagged3.route({ method: "GET", path: "/snippets", summary: "List saved snippets and hashtag groups" }).errors(orgErrors).output(array(SnippetSchema)),
|
|
9653
9704
|
getById: publicTagged3.route({ method: "GET", path: "/snippets/{id}", summary: "Get a snippet" }).errors(orgErrors).input(IdPathParam).output(SnippetSchema),
|
|
9654
|
-
create:
|
|
9655
|
-
delete:
|
|
9705
|
+
create: internal8.route({ method: "POST", path: "/snippets", summary: "Create a snippet", successStatus: 201 }).errors(writableErrors).input(CreateSnippetInputSchema).output(SnippetSchema),
|
|
9706
|
+
delete: internal8.route({ method: "DELETE", path: "/snippets/{id}", summary: "Delete a snippet" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema)
|
|
9656
9707
|
};
|
|
9657
9708
|
|
|
9658
9709
|
// ../../packages/api-contract/src/support.ts
|
|
@@ -9702,19 +9753,19 @@ var UpdateTicketStatusInputSchema = object({
|
|
|
9702
9753
|
status: _enum(["waiting_on_user", "resolved"])
|
|
9703
9754
|
});
|
|
9704
9755
|
var ticketErrors = { ...authedErrors, NOT_FOUND: { message: "Ticket not found." } };
|
|
9705
|
-
var
|
|
9756
|
+
var internal9 = base.route({ tags: ["Support"] }).meta({ internal: true });
|
|
9706
9757
|
var supportContract = {
|
|
9707
|
-
createTicket:
|
|
9708
|
-
getMyTickets:
|
|
9709
|
-
getTicket:
|
|
9710
|
-
createMessage:
|
|
9758
|
+
createTicket: internal9.route({ method: "POST", path: "/internal/support/tickets", summary: "Open a support ticket", successStatus: 201 }).errors(authedErrors).input(CreateTicketInputSchema).output(SupportTicketSchema),
|
|
9759
|
+
getMyTickets: internal9.route({ method: "GET", path: "/internal/support/tickets", summary: "List the caller\u2019s support tickets" }).errors(authedErrors).output(array(TicketWithUserSchema)),
|
|
9760
|
+
getTicket: internal9.route({ method: "GET", path: "/internal/support/tickets/{ticketId}", summary: "Get a ticket and its messages" }).errors(ticketErrors).input(GetTicketInputSchema).output(TicketWithMessagesSchema),
|
|
9761
|
+
createMessage: internal9.route({
|
|
9711
9762
|
method: "POST",
|
|
9712
9763
|
path: "/internal/support/tickets/{ticketId}/messages",
|
|
9713
9764
|
summary: "Reply on a support ticket",
|
|
9714
9765
|
successStatus: 201
|
|
9715
9766
|
}).errors(ticketErrors).input(CreateMessageInputSchema).output(SupportMessageSchema),
|
|
9716
|
-
getAdminTickets:
|
|
9717
|
-
updateTicketStatus:
|
|
9767
|
+
getAdminTickets: internal9.route({ method: "GET", path: "/internal/support/admin/tickets", summary: "List tickets for staff triage" }).errors(authedErrors).input(GetAdminTicketsInputSchema).output(array(TicketWithUserSchema)),
|
|
9768
|
+
updateTicketStatus: internal9.route({
|
|
9718
9769
|
method: "PATCH",
|
|
9719
9770
|
path: "/internal/support/admin/tickets/{ticketId}/status",
|
|
9720
9771
|
summary: "Update a ticket\u2019s status"
|
|
@@ -9736,7 +9787,7 @@ var CreateTagInputSchema = object({ name: TagNameSchema });
|
|
|
9736
9787
|
var UpdateTagInputSchema = object({ id: Uuid, name: TagNameSchema });
|
|
9737
9788
|
var TagUsageCountSchema = object({ tagId: Uuid, count: AggregateCount });
|
|
9738
9789
|
var tagged17 = base.route({ tags: ["Tags"] });
|
|
9739
|
-
var
|
|
9790
|
+
var internal10 = tagged17.meta({ internal: true });
|
|
9740
9791
|
var tagsContract = {
|
|
9741
9792
|
list: tagged17.route({ method: "GET", path: "/tags", summary: "List tags" }).errors(orgErrors).output(array(TagSchema)),
|
|
9742
9793
|
/**
|
|
@@ -9744,11 +9795,11 @@ var tagsContract = {
|
|
|
9744
9795
|
* segment ahead of a path parameter regardless of declaration order, so
|
|
9745
9796
|
* `/tags/usage-counts` never resolves as `/tags/{id}`.
|
|
9746
9797
|
*/
|
|
9747
|
-
getUsageCounts:
|
|
9798
|
+
getUsageCounts: internal10.route({ method: "GET", path: "/tags/usage-counts", summary: "Count posts per tag" }).errors(orgErrors).output(array(TagUsageCountSchema)),
|
|
9748
9799
|
getById: tagged17.route({ method: "GET", path: "/tags/{id}", summary: "Get a tag" }).errors(orgErrors).input(IdPathParam).output(TagSchema),
|
|
9749
|
-
create:
|
|
9750
|
-
update:
|
|
9751
|
-
delete:
|
|
9800
|
+
create: internal10.route({ method: "POST", path: "/tags", summary: "Create a tag", successStatus: 201 }).errors({ ...writableErrors, CONFLICT: { message: "A tag with that name already exists." } }).input(CreateTagInputSchema).output(TagSchema),
|
|
9801
|
+
update: internal10.route({ method: "PATCH", path: "/tags/{id}", summary: "Rename a tag" }).errors(writableErrors).input(UpdateTagInputSchema).output(TagSchema),
|
|
9802
|
+
delete: internal10.route({ method: "DELETE", path: "/tags/{id}", summary: "Delete a tag" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
|
|
9752
9803
|
};
|
|
9753
9804
|
|
|
9754
9805
|
// ../../packages/api-contract/src/usage.ts
|
|
@@ -9784,11 +9835,11 @@ var UsageEventSchema = object({
|
|
|
9784
9835
|
createdAt: Timestamp
|
|
9785
9836
|
});
|
|
9786
9837
|
var tagged18 = base.route({ tags: ["Usage"] });
|
|
9787
|
-
var
|
|
9838
|
+
var internal11 = tagged18.meta({ internal: true });
|
|
9788
9839
|
var usageContract = {
|
|
9789
9840
|
summary: tagged18.route({ method: "GET", path: "/usage", summary: "Get API and MCP call totals for the workspace" }).errors(orgErrors).input(object({ days: WindowDays })).output(UsageSummarySchema),
|
|
9790
|
-
daily:
|
|
9791
|
-
events:
|
|
9841
|
+
daily: internal11.route({ method: "GET", path: "/usage/daily", summary: "Get daily call counts for one surface" }).errors(orgErrors).input(object({ surface: UsageSurfaceSchema, days: WindowDays })).output(object({ items: array(UsageDailyPointSchema) })),
|
|
9842
|
+
events: internal11.route({ method: "GET", path: "/usage/events", summary: "List recent API and MCP calls" }).errors(orgErrors).input(
|
|
9792
9843
|
object({
|
|
9793
9844
|
surface: UsageSurfaceSchema.optional(),
|
|
9794
9845
|
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
@@ -9933,17 +9984,17 @@ var AiQuotaSchema = object({
|
|
|
9933
9984
|
unlimited: boolean2()
|
|
9934
9985
|
});
|
|
9935
9986
|
var tagged19 = base.route({ tags: ["User"] });
|
|
9936
|
-
var
|
|
9987
|
+
var internal12 = tagged19.meta({ internal: true });
|
|
9937
9988
|
var userContract = {
|
|
9938
9989
|
me: tagged19.route({ method: "GET", path: "/users/me", summary: "Get the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).output(MeSchema),
|
|
9939
|
-
update:
|
|
9990
|
+
update: internal12.route({ method: "PATCH", path: "/users/me", summary: "Update the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).input(UpdateUserInputSchema).output(UserAccountSchema),
|
|
9940
9991
|
getPreferences: tagged19.route({ method: "GET", path: "/users/me/preferences", summary: "Get the current user's preferences" }).errors(authedErrors).output(UserPreferencesSchema),
|
|
9941
|
-
updatePreferences:
|
|
9942
|
-
resetPreferences:
|
|
9992
|
+
updatePreferences: internal12.route({ method: "PATCH", path: "/users/me/preferences", summary: "Update the current user's preferences" }).errors(authedErrors).input(UpdatePreferencesInputSchema).output(UserPreferencesSchema),
|
|
9993
|
+
resetPreferences: internal12.route({ method: "DELETE", path: "/users/me/preferences", summary: "Reset the current user's preferences" }).errors(authedErrors).output(object({ message: string2() })),
|
|
9943
9994
|
getPlanQuota: tagged19.route({ method: "GET", path: "/users/me/plan-quota", summary: "Get the active workspace's plan quota" }).errors(orgErrors).input(object({ platforms: array(PlatformEnum).optional() })).output(PlanQuotaSchema),
|
|
9944
|
-
getAiQuota:
|
|
9945
|
-
setDefaultWorkspace:
|
|
9946
|
-
setPostingFor:
|
|
9995
|
+
getAiQuota: internal12.route({ method: "GET", path: "/users/me/ai-quota", summary: "Get the active workspace's AI credit quota" }).errors(orgErrors).output(AiQuotaSchema),
|
|
9996
|
+
setDefaultWorkspace: internal12.route({ method: "POST", path: "/users/me/default-workspace", summary: "Set the current user's default workspace" }).errors({ ...authedErrors, FORBIDDEN: { message: "You are not a member of this workspace." } }).input(object({ organizationId: string2() })).output(DeletedSchema),
|
|
9997
|
+
setPostingFor: internal12.route({ method: "PUT", path: "/users/me/posting-for", summary: "Answer who the current user posts for" }).errors(authedErrors).input(object({ postingFor: _enum(POSTING_FOR_VALUES) })).output(SuccessSchema)
|
|
9947
9998
|
};
|
|
9948
9999
|
|
|
9949
10000
|
// ../../packages/api-contract/src/workspace.ts
|
|
@@ -10062,6 +10113,7 @@ var contract = {
|
|
|
10062
10113
|
billing: billingContract,
|
|
10063
10114
|
calendarShare: calendarShareContract,
|
|
10064
10115
|
channelGroups: channelGroupsContract,
|
|
10116
|
+
clips: clipsContract,
|
|
10065
10117
|
comments: commentsContract,
|
|
10066
10118
|
integrations: integrationsContract,
|
|
10067
10119
|
media: mediaContract,
|
|
@@ -12874,7 +12926,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
|
|
|
12874
12926
|
}
|
|
12875
12927
|
|
|
12876
12928
|
// src/version.ts
|
|
12877
|
-
var CLI_VERSION = "0.1.
|
|
12929
|
+
var CLI_VERSION = "0.1.49";
|
|
12878
12930
|
|
|
12879
12931
|
// src/client.ts
|
|
12880
12932
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|