@postonus/cli 0.1.35 → 0.1.37
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 +250 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -239,6 +239,20 @@ var isValidTimezone = (timezone) => {
|
|
|
239
239
|
// ../../packages/app-config/src/posting-for.ts
|
|
240
240
|
var POSTING_FOR_VALUES = ["product", "clients", "myself", "brand"];
|
|
241
241
|
|
|
242
|
+
// ../../packages/app-config/src/outreach.ts
|
|
243
|
+
var OUTREACH_VERIFY_STATUS_VALUES = ["pending", "ok", "risky", "invalid"];
|
|
244
|
+
var OUTREACH_PROSPECT_SOURCE_VALUES = ["paste", "mcp"];
|
|
245
|
+
var OUTREACH_ENROLLMENT_STATUS_VALUES = [
|
|
246
|
+
"draft",
|
|
247
|
+
"approved",
|
|
248
|
+
"active",
|
|
249
|
+
"replied",
|
|
250
|
+
"bounced",
|
|
251
|
+
"unsubscribed",
|
|
252
|
+
"finished",
|
|
253
|
+
"stopped"
|
|
254
|
+
];
|
|
255
|
+
|
|
242
256
|
// src/index.ts
|
|
243
257
|
import { Command, Option } from "commander";
|
|
244
258
|
|
|
@@ -6945,6 +6959,149 @@ var activityContract = {
|
|
|
6945
6959
|
list: tagged.route({ method: "GET", path: "/posts/{postId}/activity", summary: "List a post's activity feed" }).errors(orgErrors).input(object({ postId: Uuid })).output(array(ActivityEventSchema))
|
|
6946
6960
|
};
|
|
6947
6961
|
|
|
6962
|
+
// ../../packages/api-contract/src/admin-outreach.ts
|
|
6963
|
+
var internal = base.route({ tags: ["Admin", "Outreach"] }).meta({ internal: true });
|
|
6964
|
+
var OutreachImportResultSchema = object({
|
|
6965
|
+
added: number2().int().min(0),
|
|
6966
|
+
duplicate: number2().int().min(0),
|
|
6967
|
+
suppressed: number2().int().min(0),
|
|
6968
|
+
existingUser: number2().int().min(0),
|
|
6969
|
+
invalid: number2().int().min(0)
|
|
6970
|
+
});
|
|
6971
|
+
var ImportProspectsInputSchema = object({
|
|
6972
|
+
rows: array(
|
|
6973
|
+
object({
|
|
6974
|
+
email: string2().trim().toLowerCase(),
|
|
6975
|
+
name: string2().trim().optional(),
|
|
6976
|
+
company: string2().trim().optional(),
|
|
6977
|
+
handle: string2().trim().optional(),
|
|
6978
|
+
link: string2().trim().optional(),
|
|
6979
|
+
note: string2().trim().optional(),
|
|
6980
|
+
persona: string2().trim().optional()
|
|
6981
|
+
})
|
|
6982
|
+
).min(1).max(500)
|
|
6983
|
+
});
|
|
6984
|
+
var ListProspectsInputSchema = object({
|
|
6985
|
+
persona: string2().trim().optional(),
|
|
6986
|
+
verifyStatus: _enum(["all", ...OUTREACH_VERIFY_STATUS_VALUES]).optional().default("all"),
|
|
6987
|
+
enrollmentStatus: _enum(["all", "none", ...OUTREACH_ENROLLMENT_STATUS_VALUES]).optional().default("all"),
|
|
6988
|
+
search: string2().trim().max(200).optional(),
|
|
6989
|
+
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
6990
|
+
offset: coerce_exports.number().int().min(0).default(0)
|
|
6991
|
+
});
|
|
6992
|
+
var OutreachProspectItemSchema = object({
|
|
6993
|
+
id: string2(),
|
|
6994
|
+
email: string2(),
|
|
6995
|
+
name: string2().nullable(),
|
|
6996
|
+
company: string2().nullable(),
|
|
6997
|
+
handle: string2().nullable(),
|
|
6998
|
+
link: string2().nullable(),
|
|
6999
|
+
note: string2().nullable(),
|
|
7000
|
+
persona: string2().nullable(),
|
|
7001
|
+
timezone: string2().nullable(),
|
|
7002
|
+
verifyStatus: _enum(OUTREACH_VERIFY_STATUS_VALUES),
|
|
7003
|
+
verifyReason: string2().nullable(),
|
|
7004
|
+
source: _enum(OUTREACH_PROSPECT_SOURCE_VALUES),
|
|
7005
|
+
createdAt: Timestamp,
|
|
7006
|
+
enrollment: object({
|
|
7007
|
+
id: string2(),
|
|
7008
|
+
status: _enum(OUTREACH_ENROLLMENT_STATUS_VALUES),
|
|
7009
|
+
sequenceId: string2(),
|
|
7010
|
+
approvedAt: Timestamp.nullable()
|
|
7011
|
+
}).nullable()
|
|
7012
|
+
});
|
|
7013
|
+
var OutreachProspectListSchema = object({
|
|
7014
|
+
items: array(OutreachProspectItemSchema),
|
|
7015
|
+
total: AggregateCount
|
|
7016
|
+
});
|
|
7017
|
+
var ReviewMessageItemSchema = object({
|
|
7018
|
+
id: string2(),
|
|
7019
|
+
stepPosition: number2().int(),
|
|
7020
|
+
subject: string2(),
|
|
7021
|
+
body: string2(),
|
|
7022
|
+
status: string2()
|
|
7023
|
+
});
|
|
7024
|
+
var ReviewThreadItemSchema = object({
|
|
7025
|
+
enrollmentId: string2(),
|
|
7026
|
+
status: _enum(OUTREACH_ENROLLMENT_STATUS_VALUES),
|
|
7027
|
+
prospect: object({
|
|
7028
|
+
id: string2(),
|
|
7029
|
+
email: string2(),
|
|
7030
|
+
name: string2().nullable(),
|
|
7031
|
+
company: string2().nullable(),
|
|
7032
|
+
handle: string2().nullable(),
|
|
7033
|
+
link: string2().nullable(),
|
|
7034
|
+
note: string2().nullable(),
|
|
7035
|
+
persona: string2().nullable(),
|
|
7036
|
+
verifyStatus: _enum(OUTREACH_VERIFY_STATUS_VALUES),
|
|
7037
|
+
verifyReason: string2().nullable()
|
|
7038
|
+
}),
|
|
7039
|
+
messages: array(ReviewMessageItemSchema)
|
|
7040
|
+
});
|
|
7041
|
+
var ReviewPersonaGroupSchema = object({
|
|
7042
|
+
persona: string2(),
|
|
7043
|
+
count: number2().int().min(0),
|
|
7044
|
+
threads: array(ReviewThreadItemSchema)
|
|
7045
|
+
});
|
|
7046
|
+
var OutreachReviewListSchema = object({
|
|
7047
|
+
groups: array(ReviewPersonaGroupSchema)
|
|
7048
|
+
});
|
|
7049
|
+
var ApprovePersonaInputSchema = object({
|
|
7050
|
+
persona: string2().min(1)
|
|
7051
|
+
});
|
|
7052
|
+
var ApprovePersonaResultSchema = object({
|
|
7053
|
+
approvedCount: number2().int().min(0),
|
|
7054
|
+
skippedRiskyCount: number2().int().min(0)
|
|
7055
|
+
});
|
|
7056
|
+
var ApproveEnrollmentInputSchema = object({
|
|
7057
|
+
enrollmentId: string2().uuid()
|
|
7058
|
+
});
|
|
7059
|
+
var RejectEnrollmentInputSchema = object({
|
|
7060
|
+
enrollmentId: string2().uuid()
|
|
7061
|
+
});
|
|
7062
|
+
var UpdateMessageInputSchema = object({
|
|
7063
|
+
id: string2().uuid(),
|
|
7064
|
+
subject: string2().trim().min(1),
|
|
7065
|
+
body: string2().trim().min(1)
|
|
7066
|
+
});
|
|
7067
|
+
var adminOutreachContract = {
|
|
7068
|
+
importProspects: internal.route({
|
|
7069
|
+
method: "POST",
|
|
7070
|
+
path: "/internal/admin/outreach/import",
|
|
7071
|
+
summary: "Import prospects with deduplication and verification (admin only)"
|
|
7072
|
+
}).errors(authedErrors).input(ImportProspectsInputSchema).output(OutreachImportResultSchema),
|
|
7073
|
+
listProspects: internal.route({
|
|
7074
|
+
method: "GET",
|
|
7075
|
+
path: "/internal/admin/outreach/prospects",
|
|
7076
|
+
summary: "List prospects with filters (admin only)"
|
|
7077
|
+
}).errors(authedErrors).input(ListProspectsInputSchema).output(OutreachProspectListSchema),
|
|
7078
|
+
listReview: internal.route({
|
|
7079
|
+
method: "GET",
|
|
7080
|
+
path: "/internal/admin/outreach/review",
|
|
7081
|
+
summary: "List review threads grouped by persona (admin only)"
|
|
7082
|
+
}).errors(authedErrors).output(OutreachReviewListSchema),
|
|
7083
|
+
approvePersona: internal.route({
|
|
7084
|
+
method: "POST",
|
|
7085
|
+
path: "/internal/admin/outreach/review/approve-persona",
|
|
7086
|
+
summary: "Approve draft threads for a persona, skipping risky (admin only)"
|
|
7087
|
+
}).errors(authedErrors).input(ApprovePersonaInputSchema).output(ApprovePersonaResultSchema),
|
|
7088
|
+
approveEnrollment: internal.route({
|
|
7089
|
+
method: "POST",
|
|
7090
|
+
path: "/internal/admin/outreach/review/approve-enrollment",
|
|
7091
|
+
summary: "Approve a single enrollment thread (admin only)"
|
|
7092
|
+
}).errors(authedErrors).input(ApproveEnrollmentInputSchema).output(object({ success: boolean2() })),
|
|
7093
|
+
rejectEnrollment: internal.route({
|
|
7094
|
+
method: "POST",
|
|
7095
|
+
path: "/internal/admin/outreach/review/reject-enrollment",
|
|
7096
|
+
summary: "Reject a single enrollment thread (admin only)"
|
|
7097
|
+
}).errors(authedErrors).input(RejectEnrollmentInputSchema).output(object({ success: boolean2() })),
|
|
7098
|
+
updateMessage: internal.route({
|
|
7099
|
+
method: "PATCH",
|
|
7100
|
+
path: "/internal/admin/outreach/messages/{id}",
|
|
7101
|
+
summary: "Edit an outreach message inline (admin only)"
|
|
7102
|
+
}).errors(authedErrors).input(UpdateMessageInputSchema).output(object({ success: boolean2() }))
|
|
7103
|
+
};
|
|
7104
|
+
|
|
6948
7105
|
// ../../packages/api-contract/src/admin.ts
|
|
6949
7106
|
var ChannelRevenueSchema = object({
|
|
6950
7107
|
source: string2().nullable(),
|
|
@@ -7001,14 +7158,40 @@ var DeveloperUsageSchema = object({
|
|
|
7001
7158
|
/** Lifetime, per workspace. */
|
|
7002
7159
|
workspaces: array(WorkspaceDeveloperUsageSchema)
|
|
7003
7160
|
});
|
|
7004
|
-
var
|
|
7161
|
+
var AdminEmailLogStatusSchema = _enum(["all", "sent", "bounced", "pending"]);
|
|
7162
|
+
var AdminEmailLogItemSchema = object({
|
|
7163
|
+
id: string2(),
|
|
7164
|
+
sentAt: Timestamp,
|
|
7165
|
+
recipientEmail: string2(),
|
|
7166
|
+
recipientName: string2().nullable(),
|
|
7167
|
+
userId: string2(),
|
|
7168
|
+
kind: string2(),
|
|
7169
|
+
hookId: string2().nullable(),
|
|
7170
|
+
variant: string2().nullable(),
|
|
7171
|
+
status: _enum(["sent", "bounced", "pending"]),
|
|
7172
|
+
resendId: string2().nullable(),
|
|
7173
|
+
bounceFlag: boolean2(),
|
|
7174
|
+
complaintFlag: boolean2()
|
|
7175
|
+
});
|
|
7176
|
+
var AdminEmailLogListSchema = object({
|
|
7177
|
+
items: array(AdminEmailLogItemSchema),
|
|
7178
|
+
total: AggregateCount
|
|
7179
|
+
});
|
|
7180
|
+
var ListAdminEmailsInputSchema = object({
|
|
7181
|
+
kind: string2().trim().max(100).optional(),
|
|
7182
|
+
status: AdminEmailLogStatusSchema.optional().default("all"),
|
|
7183
|
+
date: string2().trim().regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD").optional(),
|
|
7184
|
+
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
7185
|
+
offset: coerce_exports.number().int().min(0).default(0)
|
|
7186
|
+
});
|
|
7187
|
+
var internal2 = base.route({ tags: ["Admin"] }).meta({ internal: true });
|
|
7005
7188
|
var adminContract = {
|
|
7006
|
-
getChannelRevenue:
|
|
7189
|
+
getChannelRevenue: internal2.route({
|
|
7007
7190
|
method: "GET",
|
|
7008
7191
|
path: "/internal/admin/channel-revenue",
|
|
7009
7192
|
summary: "Channel revenue attribution (admin only)"
|
|
7010
7193
|
}).errors(authedErrors).output(array(ChannelRevenueSchema)),
|
|
7011
|
-
listUsers:
|
|
7194
|
+
listUsers: internal2.route({ method: "GET", path: "/internal/admin/users", summary: "List users with activity (admin only)" }).errors(authedErrors).input(
|
|
7012
7195
|
object({
|
|
7013
7196
|
search: string2().trim().max(200).optional(),
|
|
7014
7197
|
audience: AdminAudienceSchema,
|
|
@@ -7016,11 +7199,17 @@ var adminContract = {
|
|
|
7016
7199
|
offset: coerce_exports.number().int().min(0).default(0)
|
|
7017
7200
|
})
|
|
7018
7201
|
).output(AdminUserListSchema),
|
|
7019
|
-
getDeveloperUsage:
|
|
7202
|
+
getDeveloperUsage: internal2.route({
|
|
7020
7203
|
method: "GET",
|
|
7021
7204
|
path: "/internal/admin/developer-usage",
|
|
7022
7205
|
summary: "Who uses the API and MCP surfaces (admin only)"
|
|
7023
|
-
}).errors(authedErrors).input(object({ audience: AdminAudienceSchema })).output(DeveloperUsageSchema)
|
|
7206
|
+
}).errors(authedErrors).input(object({ audience: AdminAudienceSchema })).output(DeveloperUsageSchema),
|
|
7207
|
+
listEmails: internal2.route({
|
|
7208
|
+
method: "GET",
|
|
7209
|
+
path: "/internal/admin/emails",
|
|
7210
|
+
summary: "List email notification log rows (admin only)"
|
|
7211
|
+
}).errors(authedErrors).input(ListAdminEmailsInputSchema).output(AdminEmailLogListSchema),
|
|
7212
|
+
outreach: adminOutreachContract
|
|
7024
7213
|
};
|
|
7025
7214
|
|
|
7026
7215
|
// ../../packages/api-contract/src/analytics.ts
|
|
@@ -7086,7 +7275,7 @@ var ExportAnalyticsInputSchema = object({
|
|
|
7086
7275
|
format: AnalyticsExportFormatSchema.optional()
|
|
7087
7276
|
});
|
|
7088
7277
|
var publicTagged = base.route({ tags: ["Analytics"] });
|
|
7089
|
-
var
|
|
7278
|
+
var internal3 = publicTagged.meta({ internal: true });
|
|
7090
7279
|
var analyticsTakeawayErrors = {
|
|
7091
7280
|
...writableErrors,
|
|
7092
7281
|
AI_CREDITS_EXHAUSTED: {
|
|
@@ -7100,7 +7289,7 @@ var analyticsTakeawayErrors = {
|
|
|
7100
7289
|
};
|
|
7101
7290
|
var analyticsContract = {
|
|
7102
7291
|
getSummary: publicTagged.route({ method: "GET", path: "/analytics/summary", summary: "Get workspace analytics summary" }).errors(orgErrors).input(GetAnalyticsSummaryInputSchema).output(AnalyticsSummarySchema),
|
|
7103
|
-
generateTakeaways:
|
|
7292
|
+
generateTakeaways: internal3.route({ method: "POST", path: "/analytics/takeaways", summary: "Generate AI analytics takeaways" }).errors(analyticsTakeawayErrors).input(GenerateAnalyticsTakeawaysInputSchema).output(AnalyticsTakeawaysSchema),
|
|
7104
7293
|
exportData: publicTagged.route({ method: "GET", path: "/analytics/export", summary: "Export workspace analytics data" }).errors(orgErrors).input(ExportAnalyticsInputSchema).output(AnalyticsExportSchema)
|
|
7105
7294
|
};
|
|
7106
7295
|
|
|
@@ -7619,29 +7808,29 @@ var DisconnectImpactSchema = object({
|
|
|
7619
7808
|
isLastBinding: boolean2()
|
|
7620
7809
|
});
|
|
7621
7810
|
var tagged8 = base.route({ tags: ["Integrations"] });
|
|
7622
|
-
var
|
|
7811
|
+
var internal4 = tagged8.meta({ internal: true });
|
|
7623
7812
|
var integrationsContract = {
|
|
7624
7813
|
get: tagged8.route({ method: "GET", path: "/integrations", summary: "List active integrations with health" }).errors(orgErrors).output(array(IntegrationSchema)),
|
|
7625
|
-
getCapacity:
|
|
7626
|
-
listUnhealthy:
|
|
7627
|
-
listAtRiskSchedules:
|
|
7814
|
+
getCapacity: internal4.route({ method: "GET", path: "/integrations/capacity", summary: "Social-account plan capacity" }).errors(orgErrors).output(IntegrationCapacitySchema),
|
|
7815
|
+
listUnhealthy: internal4.route({ method: "GET", path: "/integrations/unhealthy", summary: "Integrations needing reconnect" }).errors(orgErrors).output(array(UnhealthyIntegrationSchema)),
|
|
7816
|
+
listAtRiskSchedules: internal4.route({
|
|
7628
7817
|
method: "GET",
|
|
7629
7818
|
path: "/integrations/at-risk-schedules",
|
|
7630
7819
|
summary: "Scheduled posts whose channel cannot currently publish"
|
|
7631
7820
|
}).errors(orgErrors).output(array(AtRiskScheduleSchema)),
|
|
7632
|
-
listPendingSelection:
|
|
7821
|
+
listPendingSelection: internal4.route({ method: "GET", path: "/integrations/pending-selection", summary: "Channels stuck at the account picker" }).errors(orgErrors).output(array(PendingSelectionIntegrationSchema)),
|
|
7633
7822
|
connectIntegration: tagged8.route({ method: "POST", path: "/integrations/connect", summary: "Start an OAuth connect" }).errors(writableErrors).input(ConnectIntegrationInputSchema).output(object({ redirectUrl: string2() })),
|
|
7634
|
-
connectCredentialIntegration:
|
|
7823
|
+
connectCredentialIntegration: internal4.route({
|
|
7635
7824
|
method: "POST",
|
|
7636
7825
|
path: "/integrations/connect-with-credentials",
|
|
7637
7826
|
summary: "Connect a platform with an app password or bot token"
|
|
7638
7827
|
}).errors(writableErrors).input(ConnectCredentialIntegrationInputSchema).output(ConnectCredentialResultSchema),
|
|
7639
|
-
listConnectAccounts:
|
|
7640
|
-
finalizeConnect:
|
|
7641
|
-
disconnectIntegration:
|
|
7642
|
-
disconnectImpact:
|
|
7643
|
-
cancelPendingSelection:
|
|
7644
|
-
refreshIntegration:
|
|
7828
|
+
listConnectAccounts: internal4.route({ method: "GET", path: "/integrations/{id}/accounts", summary: "Accounts a pending connect may select" }).errors(orgErrors).input(IdPathParam).output(array(SelectableAccountSchema)),
|
|
7829
|
+
finalizeConnect: internal4.route({ method: "POST", path: "/integrations/{id}/select", summary: "Finalize a picked account" }).errors(writableErrors).input(FinalizeConnectInputSchema).output(FinalizeConnectResultSchema),
|
|
7830
|
+
disconnectIntegration: internal4.route({ method: "DELETE", path: "/integrations/{id}", summary: "Disconnect an integration" }).errors(orgErrors).input(IdPathParam).output(DisconnectResultSchema),
|
|
7831
|
+
disconnectImpact: internal4.route({ method: "GET", path: "/integrations/{id}/disconnect-impact", summary: "What a disconnect would cost" }).errors(orgErrors).input(IdPathParam).output(DisconnectImpactSchema),
|
|
7832
|
+
cancelPendingSelection: internal4.route({ method: "POST", path: "/integrations/{id}/cancel-selection", summary: "Abandon a half-finished connect" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema),
|
|
7833
|
+
refreshIntegration: internal4.route({ method: "POST", path: "/integrations/{id}/refresh", summary: "Manually refresh a credential" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema)
|
|
7645
7834
|
};
|
|
7646
7835
|
|
|
7647
7836
|
// ../../packages/api-contract/src/upload.ts
|
|
@@ -7821,23 +8010,23 @@ var DeleteMediaOutputSchema = object({
|
|
|
7821
8010
|
blocked: array(object({ mediaId: Uuid, usedInPostsCount: number2().int() }))
|
|
7822
8011
|
});
|
|
7823
8012
|
var tagged10 = base.route({ tags: ["Media library"] });
|
|
7824
|
-
var
|
|
8013
|
+
var internal5 = tagged10.meta({ internal: true });
|
|
7825
8014
|
var folderErrors = {
|
|
7826
8015
|
...writableErrors,
|
|
7827
8016
|
FOLDER_CYCLE: { status: 422, message: "A folder cannot be moved inside itself." }
|
|
7828
8017
|
};
|
|
7829
8018
|
var mediaContract = {
|
|
7830
|
-
list:
|
|
8019
|
+
list: internal5.route({ method: "GET", path: "/media", summary: "List library media" }).errors(orgErrors).input(ListMediaInputSchema).output(ListMediaOutputSchema),
|
|
7831
8020
|
// Declared before `getById` for readability only — oRPC matches a literal
|
|
7832
8021
|
// segment ahead of a path parameter regardless of declaration order.
|
|
7833
|
-
listFolders:
|
|
7834
|
-
createFolder:
|
|
7835
|
-
updateFolder:
|
|
7836
|
-
deleteFolder:
|
|
7837
|
-
getById:
|
|
7838
|
-
update:
|
|
7839
|
-
move:
|
|
7840
|
-
delete:
|
|
8022
|
+
listFolders: internal5.route({ method: "GET", path: "/media/folders", summary: "List media folders with counts" }).errors(orgErrors).output(ListMediaFoldersOutputSchema),
|
|
8023
|
+
createFolder: internal5.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),
|
|
8024
|
+
updateFolder: internal5.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),
|
|
8025
|
+
deleteFolder: internal5.route({ method: "DELETE", path: "/media/folders/{id}", summary: "Delete a media folder" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema),
|
|
8026
|
+
getById: internal5.route({ method: "GET", path: "/media/{id}", summary: "Get a library asset" }).errors(orgErrors).input(IdPathParam).output(LibraryMediaSchema),
|
|
8027
|
+
update: internal5.route({ method: "PATCH", path: "/media/{id}", summary: "Rename or refile a library asset" }).errors(writableErrors).input(UpdateMediaInputSchema).output(LibraryMediaSchema),
|
|
8028
|
+
move: internal5.route({ method: "POST", path: "/media/move", summary: "File assets into a folder" }).errors(writableErrors).input(MoveMediaInputSchema).output(object({ movedIds: array(Uuid) })),
|
|
8029
|
+
delete: internal5.route({ method: "POST", path: "/media/delete", summary: "Delete library assets" }).errors(writableErrors).input(DeleteMediaInputSchema).output(DeleteMediaOutputSchema)
|
|
7841
8030
|
};
|
|
7842
8031
|
|
|
7843
8032
|
// ../../packages/api-contract/src/media-sources.ts
|
|
@@ -8335,14 +8524,14 @@ var idempotent = tagged13.route({
|
|
|
8335
8524
|
]
|
|
8336
8525
|
})
|
|
8337
8526
|
});
|
|
8338
|
-
var
|
|
8527
|
+
var internal6 = tagged13.meta({ internal: true });
|
|
8339
8528
|
var postsContract = {
|
|
8340
8529
|
list: tagged13.route({ method: "GET", path: "/posts", summary: "List posts" }).errors(orgErrors).input(ListPostsInputSchema).output(PostsListOutputSchema),
|
|
8341
8530
|
// Declared before `getById` so `/posts/counts` is not read as `/posts/{id}`.
|
|
8342
8531
|
// Dashboard plumbing: the status segment row on `/posts`.
|
|
8343
|
-
counts:
|
|
8532
|
+
counts: internal6.route({ method: "GET", path: "/posts/counts", summary: "Count posts per status" }).errors(orgErrors).input(CountPostsInputSchema).output(CountPostsOutputSchema),
|
|
8344
8533
|
getById: tagged13.route({ method: "GET", path: "/posts/{id}", summary: "Get a post" }).errors(orgErrors).input(IdPathParam).output(PostWithRelationsSchema),
|
|
8345
|
-
mediaById:
|
|
8534
|
+
mediaById: internal6.route({ method: "GET", path: "/posts/media/{id}", summary: "Get post media metadata" }).errors(orgErrors).input(IdPathParam).output(MediaMetadataSchema),
|
|
8346
8535
|
create: idempotent.route({ method: "POST", path: "/posts", summary: "Create posts in bulk", successStatus: 201 }).errors({ ...writableErrors, ...postDomainErrors }).input(CreatePostsInputSchema).output(CreatePostsOutputSchema),
|
|
8347
8536
|
update: idempotent.route({ method: "PATCH", path: "/posts/{id}", summary: "Update a post" }).errors({ ...writableErrors, ...postDomainErrors }).input(UpdatePostInputSchema).output(PostStateSchema),
|
|
8348
8537
|
scheduleDraft: idempotent.route({ method: "POST", path: "/posts/{id}/schedule", summary: "Schedule a draft" }).errors({ ...writableErrors, ...postDomainErrors }).input(ScheduleDraftInputSchema).output(PostStateSchema),
|
|
@@ -8353,17 +8542,17 @@ var postsContract = {
|
|
|
8353
8542
|
path: "/posts/schedules/{scheduleId}/reschedule",
|
|
8354
8543
|
summary: "Move a schedule to a new time"
|
|
8355
8544
|
}).errors({ ...writableErrors, ...postDomainErrors }).input(RescheduleInputSchema).output(PostStateSchema),
|
|
8356
|
-
bulkScheduleInWindows:
|
|
8545
|
+
bulkScheduleInWindows: internal6.route({
|
|
8357
8546
|
method: "POST",
|
|
8358
8547
|
path: "/posts/schedules/bulk-schedule-windows",
|
|
8359
8548
|
summary: "Spread schedules across optimal windows"
|
|
8360
8549
|
}).errors({ ...writableErrors, ...postDomainErrors }).input(BulkScheduleInWindowsInputSchema).output(BulkScheduleInWindowsOutputSchema),
|
|
8361
|
-
addChannels:
|
|
8550
|
+
addChannels: internal6.route({
|
|
8362
8551
|
method: "POST",
|
|
8363
8552
|
path: "/posts/{id}/channels",
|
|
8364
8553
|
summary: "Schedule an existing post to more channels"
|
|
8365
8554
|
}).errors({ ...publishErrors, ...postDomainErrors }).input(AddChannelsInputSchema).output(AddChannelsOutputSchema),
|
|
8366
|
-
applyReviewComments:
|
|
8555
|
+
applyReviewComments: internal6.route({
|
|
8367
8556
|
method: "POST",
|
|
8368
8557
|
path: "/posts/{id}/apply-review-comments",
|
|
8369
8558
|
summary: "Rewrite post or variant from unresolved review and client comments"
|
|
@@ -9229,12 +9418,12 @@ var CreateSnippetInputSchema = object({
|
|
|
9229
9418
|
tags: array(SnippetTagSchema).default([])
|
|
9230
9419
|
});
|
|
9231
9420
|
var publicTagged3 = base.route({ tags: ["Snippets"] });
|
|
9232
|
-
var
|
|
9421
|
+
var internal7 = publicTagged3.meta({ internal: true });
|
|
9233
9422
|
var snippetsContract = {
|
|
9234
9423
|
list: publicTagged3.route({ method: "GET", path: "/snippets", summary: "List saved snippets and hashtag groups" }).errors(orgErrors).output(array(SnippetSchema)),
|
|
9235
9424
|
getById: publicTagged3.route({ method: "GET", path: "/snippets/{id}", summary: "Get a snippet" }).errors(orgErrors).input(IdPathParam).output(SnippetSchema),
|
|
9236
|
-
create:
|
|
9237
|
-
delete:
|
|
9425
|
+
create: internal7.route({ method: "POST", path: "/snippets", summary: "Create a snippet", successStatus: 201 }).errors(writableErrors).input(CreateSnippetInputSchema).output(SnippetSchema),
|
|
9426
|
+
delete: internal7.route({ method: "DELETE", path: "/snippets/{id}", summary: "Delete a snippet" }).errors(writableErrors).input(IdPathParam).output(DeletedSchema)
|
|
9238
9427
|
};
|
|
9239
9428
|
|
|
9240
9429
|
// ../../packages/api-contract/src/support.ts
|
|
@@ -9284,19 +9473,19 @@ var UpdateTicketStatusInputSchema = object({
|
|
|
9284
9473
|
status: _enum(["waiting_on_user", "resolved"])
|
|
9285
9474
|
});
|
|
9286
9475
|
var ticketErrors = { ...authedErrors, NOT_FOUND: { message: "Ticket not found." } };
|
|
9287
|
-
var
|
|
9476
|
+
var internal8 = base.route({ tags: ["Support"] }).meta({ internal: true });
|
|
9288
9477
|
var supportContract = {
|
|
9289
|
-
createTicket:
|
|
9290
|
-
getMyTickets:
|
|
9291
|
-
getTicket:
|
|
9292
|
-
createMessage:
|
|
9478
|
+
createTicket: internal8.route({ method: "POST", path: "/internal/support/tickets", summary: "Open a support ticket", successStatus: 201 }).errors(authedErrors).input(CreateTicketInputSchema).output(SupportTicketSchema),
|
|
9479
|
+
getMyTickets: internal8.route({ method: "GET", path: "/internal/support/tickets", summary: "List the caller\u2019s support tickets" }).errors(authedErrors).output(array(TicketWithUserSchema)),
|
|
9480
|
+
getTicket: internal8.route({ method: "GET", path: "/internal/support/tickets/{ticketId}", summary: "Get a ticket and its messages" }).errors(ticketErrors).input(GetTicketInputSchema).output(TicketWithMessagesSchema),
|
|
9481
|
+
createMessage: internal8.route({
|
|
9293
9482
|
method: "POST",
|
|
9294
9483
|
path: "/internal/support/tickets/{ticketId}/messages",
|
|
9295
9484
|
summary: "Reply on a support ticket",
|
|
9296
9485
|
successStatus: 201
|
|
9297
9486
|
}).errors(ticketErrors).input(CreateMessageInputSchema).output(SupportMessageSchema),
|
|
9298
|
-
getAdminTickets:
|
|
9299
|
-
updateTicketStatus:
|
|
9487
|
+
getAdminTickets: internal8.route({ method: "GET", path: "/internal/support/admin/tickets", summary: "List tickets for staff triage" }).errors(authedErrors).input(GetAdminTicketsInputSchema).output(array(TicketWithUserSchema)),
|
|
9488
|
+
updateTicketStatus: internal8.route({
|
|
9300
9489
|
method: "PATCH",
|
|
9301
9490
|
path: "/internal/support/admin/tickets/{ticketId}/status",
|
|
9302
9491
|
summary: "Update a ticket\u2019s status"
|
|
@@ -9318,7 +9507,7 @@ var CreateTagInputSchema = object({ name: TagNameSchema });
|
|
|
9318
9507
|
var UpdateTagInputSchema = object({ id: Uuid, name: TagNameSchema });
|
|
9319
9508
|
var TagUsageCountSchema = object({ tagId: Uuid, count: AggregateCount });
|
|
9320
9509
|
var tagged17 = base.route({ tags: ["Tags"] });
|
|
9321
|
-
var
|
|
9510
|
+
var internal9 = tagged17.meta({ internal: true });
|
|
9322
9511
|
var tagsContract = {
|
|
9323
9512
|
list: tagged17.route({ method: "GET", path: "/tags", summary: "List tags" }).errors(orgErrors).output(array(TagSchema)),
|
|
9324
9513
|
/**
|
|
@@ -9326,11 +9515,11 @@ var tagsContract = {
|
|
|
9326
9515
|
* segment ahead of a path parameter regardless of declaration order, so
|
|
9327
9516
|
* `/tags/usage-counts` never resolves as `/tags/{id}`.
|
|
9328
9517
|
*/
|
|
9329
|
-
getUsageCounts:
|
|
9518
|
+
getUsageCounts: internal9.route({ method: "GET", path: "/tags/usage-counts", summary: "Count posts per tag" }).errors(orgErrors).output(array(TagUsageCountSchema)),
|
|
9330
9519
|
getById: tagged17.route({ method: "GET", path: "/tags/{id}", summary: "Get a tag" }).errors(orgErrors).input(IdPathParam).output(TagSchema),
|
|
9331
|
-
create:
|
|
9332
|
-
update:
|
|
9333
|
-
delete:
|
|
9520
|
+
create: internal9.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),
|
|
9521
|
+
update: internal9.route({ method: "PATCH", path: "/tags/{id}", summary: "Rename a tag" }).errors(writableErrors).input(UpdateTagInputSchema).output(TagSchema),
|
|
9522
|
+
delete: internal9.route({ method: "DELETE", path: "/tags/{id}", summary: "Delete a tag" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
|
|
9334
9523
|
};
|
|
9335
9524
|
|
|
9336
9525
|
// ../../packages/api-contract/src/usage.ts
|
|
@@ -9366,11 +9555,11 @@ var UsageEventSchema = object({
|
|
|
9366
9555
|
createdAt: Timestamp
|
|
9367
9556
|
});
|
|
9368
9557
|
var tagged18 = base.route({ tags: ["Usage"] });
|
|
9369
|
-
var
|
|
9558
|
+
var internal10 = tagged18.meta({ internal: true });
|
|
9370
9559
|
var usageContract = {
|
|
9371
9560
|
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),
|
|
9372
|
-
daily:
|
|
9373
|
-
events:
|
|
9561
|
+
daily: internal10.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) })),
|
|
9562
|
+
events: internal10.route({ method: "GET", path: "/usage/events", summary: "List recent API and MCP calls" }).errors(orgErrors).input(
|
|
9374
9563
|
object({
|
|
9375
9564
|
surface: UsageSurfaceSchema.optional(),
|
|
9376
9565
|
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
@@ -9515,17 +9704,17 @@ var AiQuotaSchema = object({
|
|
|
9515
9704
|
unlimited: boolean2()
|
|
9516
9705
|
});
|
|
9517
9706
|
var tagged19 = base.route({ tags: ["User"] });
|
|
9518
|
-
var
|
|
9707
|
+
var internal11 = tagged19.meta({ internal: true });
|
|
9519
9708
|
var userContract = {
|
|
9520
9709
|
me: tagged19.route({ method: "GET", path: "/users/me", summary: "Get the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).output(MeSchema),
|
|
9521
|
-
update:
|
|
9710
|
+
update: internal11.route({ method: "PATCH", path: "/users/me", summary: "Update the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).input(UpdateUserInputSchema).output(UserAccountSchema),
|
|
9522
9711
|
getPreferences: tagged19.route({ method: "GET", path: "/users/me/preferences", summary: "Get the current user's preferences" }).errors(authedErrors).output(UserPreferencesSchema),
|
|
9523
|
-
updatePreferences:
|
|
9524
|
-
resetPreferences:
|
|
9712
|
+
updatePreferences: internal11.route({ method: "PATCH", path: "/users/me/preferences", summary: "Update the current user's preferences" }).errors(authedErrors).input(UpdatePreferencesInputSchema).output(UserPreferencesSchema),
|
|
9713
|
+
resetPreferences: internal11.route({ method: "DELETE", path: "/users/me/preferences", summary: "Reset the current user's preferences" }).errors(authedErrors).output(object({ message: string2() })),
|
|
9525
9714
|
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),
|
|
9526
|
-
getAiQuota:
|
|
9527
|
-
setDefaultWorkspace:
|
|
9528
|
-
setPostingFor:
|
|
9715
|
+
getAiQuota: internal11.route({ method: "GET", path: "/users/me/ai-quota", summary: "Get the active workspace's AI credit quota" }).errors(orgErrors).output(AiQuotaSchema),
|
|
9716
|
+
setDefaultWorkspace: internal11.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),
|
|
9717
|
+
setPostingFor: internal11.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)
|
|
9529
9718
|
};
|
|
9530
9719
|
|
|
9531
9720
|
// ../../packages/api-contract/src/workspace.ts
|
|
@@ -12456,7 +12645,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
|
|
|
12456
12645
|
}
|
|
12457
12646
|
|
|
12458
12647
|
// src/version.ts
|
|
12459
|
-
var CLI_VERSION = "0.1.
|
|
12648
|
+
var CLI_VERSION = "0.1.37";
|
|
12460
12649
|
|
|
12461
12650
|
// src/client.ts
|
|
12462
12651
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|