@postonus/cli 0.1.26 → 0.1.28
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 +79 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7361,7 +7361,8 @@ var commentsContract = {
|
|
|
7361
7361
|
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),
|
|
7362
7362
|
delete: tagged6.route({ method: "DELETE", path: "/comments/{id}", summary: "Delete a comment" }).errors(orgErrors).input(object({ id: Uuid })).output(DeletedSchema),
|
|
7363
7363
|
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),
|
|
7364
|
-
resolve: tagged6.route({ method: "POST", path: "/comments/{id}/resolve", summary: "Resolve or reopen a comment" }).errors(writableErrors).input(object({ id: Uuid, resolved: boolean2() })).output(CommentSchema)
|
|
7364
|
+
resolve: tagged6.route({ method: "POST", path: "/comments/{id}/resolve", summary: "Resolve or reopen a comment" }).errors(writableErrors).input(object({ id: Uuid, resolved: boolean2() })).output(CommentSchema),
|
|
7365
|
+
resolveMany: tagged6.route({ method: "POST", path: "/comments/resolve-many", summary: "Resolve multiple comments in bulk" }).errors(writableErrors).input(object({ ids: array(Uuid).min(1), resolved: boolean2().default(true) })).output(object({ resolvedCount: number2() }))
|
|
7365
7366
|
};
|
|
7366
7367
|
|
|
7367
7368
|
// ../../packages/api-contract/src/platforms.ts
|
|
@@ -8179,6 +8180,17 @@ var BulkScheduleInWindowsOutputSchema = object({
|
|
|
8179
8180
|
placed: array(object({ scheduleId: string2(), scheduledAt: Timestamp })),
|
|
8180
8181
|
deferred: array(string2())
|
|
8181
8182
|
});
|
|
8183
|
+
var ApplyReviewCommentsInputSchema = object({
|
|
8184
|
+
id: Uuid,
|
|
8185
|
+
postScheduleId: Uuid.optional(),
|
|
8186
|
+
customInstructions: string2().max(1e3).optional()
|
|
8187
|
+
});
|
|
8188
|
+
var ApplyReviewCommentsOutputSchema = object({
|
|
8189
|
+
originalContent: string2(),
|
|
8190
|
+
revisedContent: string2(),
|
|
8191
|
+
appliedCommentIds: array(string2()),
|
|
8192
|
+
changesSummary: string2()
|
|
8193
|
+
});
|
|
8182
8194
|
var DeletePostInputSchema = object({ id: Uuid, deleteRemote: boolean2().default(false) });
|
|
8183
8195
|
var postDomainErrors = {
|
|
8184
8196
|
POST_QUOTA_EXCEEDED: { status: 403, message: "Post limit reached.", data: ErrorDataSchema },
|
|
@@ -8207,7 +8219,12 @@ var postDomainErrors = {
|
|
|
8207
8219
|
data: ErrorDataSchema
|
|
8208
8220
|
},
|
|
8209
8221
|
NOT_A_DRAFT: { status: 409, message: "That post is not a draft." },
|
|
8210
|
-
DRAFT_HAS_NO_CHANNELS: { status: 400, message: "Choose the channels to schedule this draft on." }
|
|
8222
|
+
DRAFT_HAS_NO_CHANNELS: { status: 400, message: "Choose the channels to schedule this draft on." },
|
|
8223
|
+
NO_OPEN_COMMENTS: { status: 400, message: "There are no unresolved comments to apply." },
|
|
8224
|
+
AI_CREDITS_EXHAUSTED: {
|
|
8225
|
+
status: 402,
|
|
8226
|
+
message: "AI credits exhausted. Upgrade your plan or wait for your credits to renew."
|
|
8227
|
+
}
|
|
8211
8228
|
};
|
|
8212
8229
|
var tagged13 = base.route({ tags: ["Posts"] });
|
|
8213
8230
|
var idempotent = tagged13.route({
|
|
@@ -8252,7 +8269,12 @@ var postsContract = {
|
|
|
8252
8269
|
method: "POST",
|
|
8253
8270
|
path: "/posts/{id}/channels",
|
|
8254
8271
|
summary: "Schedule an existing post to more channels"
|
|
8255
|
-
}).errors({ ...publishErrors, ...postDomainErrors }).input(AddChannelsInputSchema).output(AddChannelsOutputSchema)
|
|
8272
|
+
}).errors({ ...publishErrors, ...postDomainErrors }).input(AddChannelsInputSchema).output(AddChannelsOutputSchema),
|
|
8273
|
+
applyReviewComments: internal4.route({
|
|
8274
|
+
method: "POST",
|
|
8275
|
+
path: "/posts/{id}/apply-review-comments",
|
|
8276
|
+
summary: "Rewrite post or variant from unresolved review and client comments"
|
|
8277
|
+
}).errors({ ...writableErrors, ...postDomainErrors }).input(ApplyReviewCommentsInputSchema).output(ApplyReviewCommentsOutputSchema)
|
|
8256
8278
|
};
|
|
8257
8279
|
|
|
8258
8280
|
// ../../packages/api-contract/src/public-calendar.ts
|
|
@@ -9094,6 +9116,34 @@ var schedulesContract = {
|
|
|
9094
9116
|
delete: tagged16.route({ method: "DELETE", path: "/schedules/{id}", summary: "Delete a schedule" }).errors({ ...writableErrors, ...postDomainErrors }).input(DeleteScheduleInputSchema).output(DeletedSchema)
|
|
9095
9117
|
};
|
|
9096
9118
|
|
|
9119
|
+
// ../../packages/api-contract/src/snippets.ts
|
|
9120
|
+
var SnippetNameSchema = string2().trim().min(1, "Enter a name").max(100, "Name must be 100 characters or less");
|
|
9121
|
+
var SnippetContentSchema = string2().min(1, "Enter snippet content").max(5e3, "Snippet content must be 5000 characters or less");
|
|
9122
|
+
var SnippetTagSchema = string2().trim().min(1).max(50);
|
|
9123
|
+
var SnippetSchema = object({
|
|
9124
|
+
id: Uuid,
|
|
9125
|
+
organizationId: string2(),
|
|
9126
|
+
name: SnippetNameSchema,
|
|
9127
|
+
content: SnippetContentSchema,
|
|
9128
|
+
tags: array(SnippetTagSchema),
|
|
9129
|
+
createdByUserId: string2().nullable(),
|
|
9130
|
+
createdAt: Timestamp,
|
|
9131
|
+
updatedAt: Timestamp
|
|
9132
|
+
});
|
|
9133
|
+
var CreateSnippetInputSchema = object({
|
|
9134
|
+
name: SnippetNameSchema,
|
|
9135
|
+
content: SnippetContentSchema,
|
|
9136
|
+
tags: array(SnippetTagSchema).default([])
|
|
9137
|
+
});
|
|
9138
|
+
var publicTagged2 = base.route({ tags: ["Snippets"] });
|
|
9139
|
+
var internal5 = publicTagged2.meta({ internal: true });
|
|
9140
|
+
var snippetsContract = {
|
|
9141
|
+
list: publicTagged2.route({ method: "GET", path: "/snippets", summary: "List saved snippets and hashtag groups" }).errors(orgErrors).output(array(SnippetSchema)),
|
|
9142
|
+
getById: publicTagged2.route({ method: "GET", path: "/snippets/{id}", summary: "Get a snippet" }).errors(orgErrors).input(IdPathParam).output(SnippetSchema),
|
|
9143
|
+
create: internal5.route({ method: "POST", path: "/snippets", summary: "Create a snippet", successStatus: 201 }).errors(writableErrors).input(CreateSnippetInputSchema).output(SnippetSchema),
|
|
9144
|
+
delete: internal5.route({ method: "DELETE", path: "/snippets/{id}", summary: "Delete a snippet" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema)
|
|
9145
|
+
};
|
|
9146
|
+
|
|
9097
9147
|
// ../../packages/api-contract/src/support.ts
|
|
9098
9148
|
var SupportTicketStatusSchema = _enum(["open", "replied", "waiting_on_user", "resolved"]);
|
|
9099
9149
|
var SupportTicketLastReplyBySchema = _enum(["user", "staff"]);
|
|
@@ -9141,19 +9191,19 @@ var UpdateTicketStatusInputSchema = object({
|
|
|
9141
9191
|
status: _enum(["waiting_on_user", "resolved"])
|
|
9142
9192
|
});
|
|
9143
9193
|
var ticketErrors = { ...authedErrors, NOT_FOUND: { message: "Ticket not found." } };
|
|
9144
|
-
var
|
|
9194
|
+
var internal6 = base.route({ tags: ["Support"] }).meta({ internal: true });
|
|
9145
9195
|
var supportContract = {
|
|
9146
|
-
createTicket:
|
|
9147
|
-
getMyTickets:
|
|
9148
|
-
getTicket:
|
|
9149
|
-
createMessage:
|
|
9196
|
+
createTicket: internal6.route({ method: "POST", path: "/internal/support/tickets", summary: "Open a support ticket", successStatus: 201 }).errors(authedErrors).input(CreateTicketInputSchema).output(SupportTicketSchema),
|
|
9197
|
+
getMyTickets: internal6.route({ method: "GET", path: "/internal/support/tickets", summary: "List the caller\u2019s support tickets" }).errors(authedErrors).output(array(TicketWithUserSchema)),
|
|
9198
|
+
getTicket: internal6.route({ method: "GET", path: "/internal/support/tickets/{ticketId}", summary: "Get a ticket and its messages" }).errors(ticketErrors).input(GetTicketInputSchema).output(TicketWithMessagesSchema),
|
|
9199
|
+
createMessage: internal6.route({
|
|
9150
9200
|
method: "POST",
|
|
9151
9201
|
path: "/internal/support/tickets/{ticketId}/messages",
|
|
9152
9202
|
summary: "Reply on a support ticket",
|
|
9153
9203
|
successStatus: 201
|
|
9154
9204
|
}).errors(ticketErrors).input(CreateMessageInputSchema).output(SupportMessageSchema),
|
|
9155
|
-
getAdminTickets:
|
|
9156
|
-
updateTicketStatus:
|
|
9205
|
+
getAdminTickets: internal6.route({ method: "GET", path: "/internal/support/admin/tickets", summary: "List tickets for staff triage" }).errors(authedErrors).input(GetAdminTicketsInputSchema).output(array(TicketWithUserSchema)),
|
|
9206
|
+
updateTicketStatus: internal6.route({
|
|
9157
9207
|
method: "PATCH",
|
|
9158
9208
|
path: "/internal/support/admin/tickets/{ticketId}/status",
|
|
9159
9209
|
summary: "Update a ticket\u2019s status"
|
|
@@ -9175,7 +9225,7 @@ var CreateTagInputSchema = object({ name: TagNameSchema });
|
|
|
9175
9225
|
var UpdateTagInputSchema = object({ id: Uuid, name: TagNameSchema });
|
|
9176
9226
|
var TagUsageCountSchema = object({ tagId: Uuid, count: AggregateCount });
|
|
9177
9227
|
var tagged17 = base.route({ tags: ["Tags"] });
|
|
9178
|
-
var
|
|
9228
|
+
var internal7 = tagged17.meta({ internal: true });
|
|
9179
9229
|
var tagsContract = {
|
|
9180
9230
|
list: tagged17.route({ method: "GET", path: "/tags", summary: "List tags" }).errors(orgErrors).output(array(TagSchema)),
|
|
9181
9231
|
/**
|
|
@@ -9183,11 +9233,11 @@ var tagsContract = {
|
|
|
9183
9233
|
* segment ahead of a path parameter regardless of declaration order, so
|
|
9184
9234
|
* `/tags/usage-counts` never resolves as `/tags/{id}`.
|
|
9185
9235
|
*/
|
|
9186
|
-
getUsageCounts:
|
|
9236
|
+
getUsageCounts: internal7.route({ method: "GET", path: "/tags/usage-counts", summary: "Count posts per tag" }).errors(orgErrors).output(array(TagUsageCountSchema)),
|
|
9187
9237
|
getById: tagged17.route({ method: "GET", path: "/tags/{id}", summary: "Get a tag" }).errors(orgErrors).input(IdPathParam).output(TagSchema),
|
|
9188
|
-
create:
|
|
9189
|
-
update:
|
|
9190
|
-
delete:
|
|
9238
|
+
create: internal7.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),
|
|
9239
|
+
update: internal7.route({ method: "PATCH", path: "/tags/{id}", summary: "Rename a tag" }).errors(writableErrors).input(UpdateTagInputSchema).output(TagSchema),
|
|
9240
|
+
delete: internal7.route({ method: "DELETE", path: "/tags/{id}", summary: "Delete a tag" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
|
|
9191
9241
|
};
|
|
9192
9242
|
|
|
9193
9243
|
// ../../packages/api-contract/src/usage.ts
|
|
@@ -9223,11 +9273,11 @@ var UsageEventSchema = object({
|
|
|
9223
9273
|
createdAt: Timestamp
|
|
9224
9274
|
});
|
|
9225
9275
|
var tagged18 = base.route({ tags: ["Usage"] });
|
|
9226
|
-
var
|
|
9276
|
+
var internal8 = tagged18.meta({ internal: true });
|
|
9227
9277
|
var usageContract = {
|
|
9228
9278
|
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),
|
|
9229
|
-
daily:
|
|
9230
|
-
events:
|
|
9279
|
+
daily: internal8.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) })),
|
|
9280
|
+
events: internal8.route({ method: "GET", path: "/usage/events", summary: "List recent API and MCP calls" }).errors(orgErrors).input(
|
|
9231
9281
|
object({
|
|
9232
9282
|
surface: UsageSurfaceSchema.optional(),
|
|
9233
9283
|
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
@@ -9377,16 +9427,16 @@ var AiQuotaSchema = object({
|
|
|
9377
9427
|
unlimited: boolean2()
|
|
9378
9428
|
});
|
|
9379
9429
|
var tagged19 = base.route({ tags: ["User"] });
|
|
9380
|
-
var
|
|
9430
|
+
var internal9 = tagged19.meta({ internal: true });
|
|
9381
9431
|
var userContract = {
|
|
9382
9432
|
me: tagged19.route({ method: "GET", path: "/users/me", summary: "Get the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).output(MeSchema),
|
|
9383
|
-
update:
|
|
9433
|
+
update: internal9.route({ method: "PATCH", path: "/users/me", summary: "Update the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).input(UpdateUserInputSchema).output(UserAccountSchema),
|
|
9384
9434
|
getPreferences: tagged19.route({ method: "GET", path: "/users/me/preferences", summary: "Get the current user's preferences" }).errors(authedErrors).output(UserPreferencesSchema),
|
|
9385
|
-
updatePreferences:
|
|
9386
|
-
resetPreferences:
|
|
9435
|
+
updatePreferences: internal9.route({ method: "PATCH", path: "/users/me/preferences", summary: "Update the current user's preferences" }).errors(authedErrors).input(UpdatePreferencesInputSchema).output(UserPreferencesSchema),
|
|
9436
|
+
resetPreferences: internal9.route({ method: "DELETE", path: "/users/me/preferences", summary: "Reset the current user's preferences" }).errors(authedErrors).output(object({ message: string2() })),
|
|
9387
9437
|
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),
|
|
9388
|
-
getAiQuota:
|
|
9389
|
-
setDefaultWorkspace:
|
|
9438
|
+
getAiQuota: internal9.route({ method: "GET", path: "/users/me/ai-quota", summary: "Get the active workspace's AI credit quota" }).errors(orgErrors).output(AiQuotaSchema),
|
|
9439
|
+
setDefaultWorkspace: internal9.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)
|
|
9390
9440
|
};
|
|
9391
9441
|
|
|
9392
9442
|
// ../../packages/api-contract/src/workspace.ts
|
|
@@ -9446,15 +9496,15 @@ var WorkspaceSummarySchema = object({
|
|
|
9446
9496
|
logo: string2().nullable(),
|
|
9447
9497
|
role: string2()
|
|
9448
9498
|
});
|
|
9449
|
-
var
|
|
9450
|
-
var tagged20 =
|
|
9499
|
+
var publicTagged3 = base.route({ tags: ["Workspace"] });
|
|
9500
|
+
var tagged20 = publicTagged3.meta({ internal: true });
|
|
9451
9501
|
var workspaceContract = {
|
|
9452
9502
|
/**
|
|
9453
9503
|
* Public, so an OAuth client can offer a workspace switcher: the chosen id goes
|
|
9454
9504
|
* back as `x-workspace-id`. An API key is pinned to one workspace, so it lists
|
|
9455
9505
|
* only that one.
|
|
9456
9506
|
*/
|
|
9457
|
-
list:
|
|
9507
|
+
list: publicTagged3.route({ method: "GET", path: "/workspaces", summary: "List your workspaces" }).errors(authedErrors).output(array(WorkspaceSummarySchema)),
|
|
9458
9508
|
getOwnedCapacity: tagged20.route({ method: "GET", path: "/workspaces/owned-capacity", summary: "Get owned workspace capacity" }).errors(authedErrors).output(OwnedCapacitySchema),
|
|
9459
9509
|
create: tagged20.route({ method: "POST", path: "/workspaces", summary: "Create a workspace", successStatus: 201 }).errors({
|
|
9460
9510
|
...authedErrors,
|
|
@@ -9518,6 +9568,7 @@ var contract = {
|
|
|
9518
9568
|
reviews: reviewsContract,
|
|
9519
9569
|
schedules: schedulesContract,
|
|
9520
9570
|
share: shareContract,
|
|
9571
|
+
snippets: snippetsContract,
|
|
9521
9572
|
support: supportContract,
|
|
9522
9573
|
tags: tagsContract,
|
|
9523
9574
|
upload: uploadContract,
|
|
@@ -12202,7 +12253,7 @@ function formatTable(headers, rows) {
|
|
|
12202
12253
|
}
|
|
12203
12254
|
|
|
12204
12255
|
// src/version.ts
|
|
12205
|
-
var CLI_VERSION = "0.1.
|
|
12256
|
+
var CLI_VERSION = "0.1.28";
|
|
12206
12257
|
|
|
12207
12258
|
// src/client.ts
|
|
12208
12259
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|