@postonus/cli 0.1.36 → 0.1.38
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 +220 -62
- 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(),
|
|
@@ -7027,14 +7184,14 @@ var ListAdminEmailsInputSchema = object({
|
|
|
7027
7184
|
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
7028
7185
|
offset: coerce_exports.number().int().min(0).default(0)
|
|
7029
7186
|
});
|
|
7030
|
-
var
|
|
7187
|
+
var internal2 = base.route({ tags: ["Admin"] }).meta({ internal: true });
|
|
7031
7188
|
var adminContract = {
|
|
7032
|
-
getChannelRevenue:
|
|
7189
|
+
getChannelRevenue: internal2.route({
|
|
7033
7190
|
method: "GET",
|
|
7034
7191
|
path: "/internal/admin/channel-revenue",
|
|
7035
7192
|
summary: "Channel revenue attribution (admin only)"
|
|
7036
7193
|
}).errors(authedErrors).output(array(ChannelRevenueSchema)),
|
|
7037
|
-
listUsers:
|
|
7194
|
+
listUsers: internal2.route({ method: "GET", path: "/internal/admin/users", summary: "List users with activity (admin only)" }).errors(authedErrors).input(
|
|
7038
7195
|
object({
|
|
7039
7196
|
search: string2().trim().max(200).optional(),
|
|
7040
7197
|
audience: AdminAudienceSchema,
|
|
@@ -7042,16 +7199,17 @@ var adminContract = {
|
|
|
7042
7199
|
offset: coerce_exports.number().int().min(0).default(0)
|
|
7043
7200
|
})
|
|
7044
7201
|
).output(AdminUserListSchema),
|
|
7045
|
-
getDeveloperUsage:
|
|
7202
|
+
getDeveloperUsage: internal2.route({
|
|
7046
7203
|
method: "GET",
|
|
7047
7204
|
path: "/internal/admin/developer-usage",
|
|
7048
7205
|
summary: "Who uses the API and MCP surfaces (admin only)"
|
|
7049
7206
|
}).errors(authedErrors).input(object({ audience: AdminAudienceSchema })).output(DeveloperUsageSchema),
|
|
7050
|
-
listEmails:
|
|
7207
|
+
listEmails: internal2.route({
|
|
7051
7208
|
method: "GET",
|
|
7052
7209
|
path: "/internal/admin/emails",
|
|
7053
7210
|
summary: "List email notification log rows (admin only)"
|
|
7054
|
-
}).errors(authedErrors).input(ListAdminEmailsInputSchema).output(AdminEmailLogListSchema)
|
|
7211
|
+
}).errors(authedErrors).input(ListAdminEmailsInputSchema).output(AdminEmailLogListSchema),
|
|
7212
|
+
outreach: adminOutreachContract
|
|
7055
7213
|
};
|
|
7056
7214
|
|
|
7057
7215
|
// ../../packages/api-contract/src/analytics.ts
|
|
@@ -7117,7 +7275,7 @@ var ExportAnalyticsInputSchema = object({
|
|
|
7117
7275
|
format: AnalyticsExportFormatSchema.optional()
|
|
7118
7276
|
});
|
|
7119
7277
|
var publicTagged = base.route({ tags: ["Analytics"] });
|
|
7120
|
-
var
|
|
7278
|
+
var internal3 = publicTagged.meta({ internal: true });
|
|
7121
7279
|
var analyticsTakeawayErrors = {
|
|
7122
7280
|
...writableErrors,
|
|
7123
7281
|
AI_CREDITS_EXHAUSTED: {
|
|
@@ -7131,7 +7289,7 @@ var analyticsTakeawayErrors = {
|
|
|
7131
7289
|
};
|
|
7132
7290
|
var analyticsContract = {
|
|
7133
7291
|
getSummary: publicTagged.route({ method: "GET", path: "/analytics/summary", summary: "Get workspace analytics summary" }).errors(orgErrors).input(GetAnalyticsSummaryInputSchema).output(AnalyticsSummarySchema),
|
|
7134
|
-
generateTakeaways:
|
|
7292
|
+
generateTakeaways: internal3.route({ method: "POST", path: "/analytics/takeaways", summary: "Generate AI analytics takeaways" }).errors(analyticsTakeawayErrors).input(GenerateAnalyticsTakeawaysInputSchema).output(AnalyticsTakeawaysSchema),
|
|
7135
7293
|
exportData: publicTagged.route({ method: "GET", path: "/analytics/export", summary: "Export workspace analytics data" }).errors(orgErrors).input(ExportAnalyticsInputSchema).output(AnalyticsExportSchema)
|
|
7136
7294
|
};
|
|
7137
7295
|
|
|
@@ -7650,29 +7808,29 @@ var DisconnectImpactSchema = object({
|
|
|
7650
7808
|
isLastBinding: boolean2()
|
|
7651
7809
|
});
|
|
7652
7810
|
var tagged8 = base.route({ tags: ["Integrations"] });
|
|
7653
|
-
var
|
|
7811
|
+
var internal4 = tagged8.meta({ internal: true });
|
|
7654
7812
|
var integrationsContract = {
|
|
7655
7813
|
get: tagged8.route({ method: "GET", path: "/integrations", summary: "List active integrations with health" }).errors(orgErrors).output(array(IntegrationSchema)),
|
|
7656
|
-
getCapacity:
|
|
7657
|
-
listUnhealthy:
|
|
7658
|
-
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({
|
|
7659
7817
|
method: "GET",
|
|
7660
7818
|
path: "/integrations/at-risk-schedules",
|
|
7661
7819
|
summary: "Scheduled posts whose channel cannot currently publish"
|
|
7662
7820
|
}).errors(orgErrors).output(array(AtRiskScheduleSchema)),
|
|
7663
|
-
listPendingSelection:
|
|
7821
|
+
listPendingSelection: internal4.route({ method: "GET", path: "/integrations/pending-selection", summary: "Channels stuck at the account picker" }).errors(orgErrors).output(array(PendingSelectionIntegrationSchema)),
|
|
7664
7822
|
connectIntegration: tagged8.route({ method: "POST", path: "/integrations/connect", summary: "Start an OAuth connect" }).errors(writableErrors).input(ConnectIntegrationInputSchema).output(object({ redirectUrl: string2() })),
|
|
7665
|
-
connectCredentialIntegration:
|
|
7823
|
+
connectCredentialIntegration: internal4.route({
|
|
7666
7824
|
method: "POST",
|
|
7667
7825
|
path: "/integrations/connect-with-credentials",
|
|
7668
7826
|
summary: "Connect a platform with an app password or bot token"
|
|
7669
7827
|
}).errors(writableErrors).input(ConnectCredentialIntegrationInputSchema).output(ConnectCredentialResultSchema),
|
|
7670
|
-
listConnectAccounts:
|
|
7671
|
-
finalizeConnect:
|
|
7672
|
-
disconnectIntegration:
|
|
7673
|
-
disconnectImpact:
|
|
7674
|
-
cancelPendingSelection:
|
|
7675
|
-
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)
|
|
7676
7834
|
};
|
|
7677
7835
|
|
|
7678
7836
|
// ../../packages/api-contract/src/upload.ts
|
|
@@ -7852,23 +8010,23 @@ var DeleteMediaOutputSchema = object({
|
|
|
7852
8010
|
blocked: array(object({ mediaId: Uuid, usedInPostsCount: number2().int() }))
|
|
7853
8011
|
});
|
|
7854
8012
|
var tagged10 = base.route({ tags: ["Media library"] });
|
|
7855
|
-
var
|
|
8013
|
+
var internal5 = tagged10.meta({ internal: true });
|
|
7856
8014
|
var folderErrors = {
|
|
7857
8015
|
...writableErrors,
|
|
7858
8016
|
FOLDER_CYCLE: { status: 422, message: "A folder cannot be moved inside itself." }
|
|
7859
8017
|
};
|
|
7860
8018
|
var mediaContract = {
|
|
7861
|
-
list:
|
|
8019
|
+
list: internal5.route({ method: "GET", path: "/media", summary: "List library media" }).errors(orgErrors).input(ListMediaInputSchema).output(ListMediaOutputSchema),
|
|
7862
8020
|
// Declared before `getById` for readability only — oRPC matches a literal
|
|
7863
8021
|
// segment ahead of a path parameter regardless of declaration order.
|
|
7864
|
-
listFolders:
|
|
7865
|
-
createFolder:
|
|
7866
|
-
updateFolder:
|
|
7867
|
-
deleteFolder:
|
|
7868
|
-
getById:
|
|
7869
|
-
update:
|
|
7870
|
-
move:
|
|
7871
|
-
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)
|
|
7872
8030
|
};
|
|
7873
8031
|
|
|
7874
8032
|
// ../../packages/api-contract/src/media-sources.ts
|
|
@@ -8366,14 +8524,14 @@ var idempotent = tagged13.route({
|
|
|
8366
8524
|
]
|
|
8367
8525
|
})
|
|
8368
8526
|
});
|
|
8369
|
-
var
|
|
8527
|
+
var internal6 = tagged13.meta({ internal: true });
|
|
8370
8528
|
var postsContract = {
|
|
8371
8529
|
list: tagged13.route({ method: "GET", path: "/posts", summary: "List posts" }).errors(orgErrors).input(ListPostsInputSchema).output(PostsListOutputSchema),
|
|
8372
8530
|
// Declared before `getById` so `/posts/counts` is not read as `/posts/{id}`.
|
|
8373
8531
|
// Dashboard plumbing: the status segment row on `/posts`.
|
|
8374
|
-
counts:
|
|
8532
|
+
counts: internal6.route({ method: "GET", path: "/posts/counts", summary: "Count posts per status" }).errors(orgErrors).input(CountPostsInputSchema).output(CountPostsOutputSchema),
|
|
8375
8533
|
getById: tagged13.route({ method: "GET", path: "/posts/{id}", summary: "Get a post" }).errors(orgErrors).input(IdPathParam).output(PostWithRelationsSchema),
|
|
8376
|
-
mediaById:
|
|
8534
|
+
mediaById: internal6.route({ method: "GET", path: "/posts/media/{id}", summary: "Get post media metadata" }).errors(orgErrors).input(IdPathParam).output(MediaMetadataSchema),
|
|
8377
8535
|
create: idempotent.route({ method: "POST", path: "/posts", summary: "Create posts in bulk", successStatus: 201 }).errors({ ...writableErrors, ...postDomainErrors }).input(CreatePostsInputSchema).output(CreatePostsOutputSchema),
|
|
8378
8536
|
update: idempotent.route({ method: "PATCH", path: "/posts/{id}", summary: "Update a post" }).errors({ ...writableErrors, ...postDomainErrors }).input(UpdatePostInputSchema).output(PostStateSchema),
|
|
8379
8537
|
scheduleDraft: idempotent.route({ method: "POST", path: "/posts/{id}/schedule", summary: "Schedule a draft" }).errors({ ...writableErrors, ...postDomainErrors }).input(ScheduleDraftInputSchema).output(PostStateSchema),
|
|
@@ -8384,17 +8542,17 @@ var postsContract = {
|
|
|
8384
8542
|
path: "/posts/schedules/{scheduleId}/reschedule",
|
|
8385
8543
|
summary: "Move a schedule to a new time"
|
|
8386
8544
|
}).errors({ ...writableErrors, ...postDomainErrors }).input(RescheduleInputSchema).output(PostStateSchema),
|
|
8387
|
-
bulkScheduleInWindows:
|
|
8545
|
+
bulkScheduleInWindows: internal6.route({
|
|
8388
8546
|
method: "POST",
|
|
8389
8547
|
path: "/posts/schedules/bulk-schedule-windows",
|
|
8390
8548
|
summary: "Spread schedules across optimal windows"
|
|
8391
8549
|
}).errors({ ...writableErrors, ...postDomainErrors }).input(BulkScheduleInWindowsInputSchema).output(BulkScheduleInWindowsOutputSchema),
|
|
8392
|
-
addChannels:
|
|
8550
|
+
addChannels: internal6.route({
|
|
8393
8551
|
method: "POST",
|
|
8394
8552
|
path: "/posts/{id}/channels",
|
|
8395
8553
|
summary: "Schedule an existing post to more channels"
|
|
8396
8554
|
}).errors({ ...publishErrors, ...postDomainErrors }).input(AddChannelsInputSchema).output(AddChannelsOutputSchema),
|
|
8397
|
-
applyReviewComments:
|
|
8555
|
+
applyReviewComments: internal6.route({
|
|
8398
8556
|
method: "POST",
|
|
8399
8557
|
path: "/posts/{id}/apply-review-comments",
|
|
8400
8558
|
summary: "Rewrite post or variant from unresolved review and client comments"
|
|
@@ -9260,12 +9418,12 @@ var CreateSnippetInputSchema = object({
|
|
|
9260
9418
|
tags: array(SnippetTagSchema).default([])
|
|
9261
9419
|
});
|
|
9262
9420
|
var publicTagged3 = base.route({ tags: ["Snippets"] });
|
|
9263
|
-
var
|
|
9421
|
+
var internal7 = publicTagged3.meta({ internal: true });
|
|
9264
9422
|
var snippetsContract = {
|
|
9265
9423
|
list: publicTagged3.route({ method: "GET", path: "/snippets", summary: "List saved snippets and hashtag groups" }).errors(orgErrors).output(array(SnippetSchema)),
|
|
9266
9424
|
getById: publicTagged3.route({ method: "GET", path: "/snippets/{id}", summary: "Get a snippet" }).errors(orgErrors).input(IdPathParam).output(SnippetSchema),
|
|
9267
|
-
create:
|
|
9268
|
-
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)
|
|
9269
9427
|
};
|
|
9270
9428
|
|
|
9271
9429
|
// ../../packages/api-contract/src/support.ts
|
|
@@ -9315,19 +9473,19 @@ var UpdateTicketStatusInputSchema = object({
|
|
|
9315
9473
|
status: _enum(["waiting_on_user", "resolved"])
|
|
9316
9474
|
});
|
|
9317
9475
|
var ticketErrors = { ...authedErrors, NOT_FOUND: { message: "Ticket not found." } };
|
|
9318
|
-
var
|
|
9476
|
+
var internal8 = base.route({ tags: ["Support"] }).meta({ internal: true });
|
|
9319
9477
|
var supportContract = {
|
|
9320
|
-
createTicket:
|
|
9321
|
-
getMyTickets:
|
|
9322
|
-
getTicket:
|
|
9323
|
-
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({
|
|
9324
9482
|
method: "POST",
|
|
9325
9483
|
path: "/internal/support/tickets/{ticketId}/messages",
|
|
9326
9484
|
summary: "Reply on a support ticket",
|
|
9327
9485
|
successStatus: 201
|
|
9328
9486
|
}).errors(ticketErrors).input(CreateMessageInputSchema).output(SupportMessageSchema),
|
|
9329
|
-
getAdminTickets:
|
|
9330
|
-
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({
|
|
9331
9489
|
method: "PATCH",
|
|
9332
9490
|
path: "/internal/support/admin/tickets/{ticketId}/status",
|
|
9333
9491
|
summary: "Update a ticket\u2019s status"
|
|
@@ -9349,7 +9507,7 @@ var CreateTagInputSchema = object({ name: TagNameSchema });
|
|
|
9349
9507
|
var UpdateTagInputSchema = object({ id: Uuid, name: TagNameSchema });
|
|
9350
9508
|
var TagUsageCountSchema = object({ tagId: Uuid, count: AggregateCount });
|
|
9351
9509
|
var tagged17 = base.route({ tags: ["Tags"] });
|
|
9352
|
-
var
|
|
9510
|
+
var internal9 = tagged17.meta({ internal: true });
|
|
9353
9511
|
var tagsContract = {
|
|
9354
9512
|
list: tagged17.route({ method: "GET", path: "/tags", summary: "List tags" }).errors(orgErrors).output(array(TagSchema)),
|
|
9355
9513
|
/**
|
|
@@ -9357,11 +9515,11 @@ var tagsContract = {
|
|
|
9357
9515
|
* segment ahead of a path parameter regardless of declaration order, so
|
|
9358
9516
|
* `/tags/usage-counts` never resolves as `/tags/{id}`.
|
|
9359
9517
|
*/
|
|
9360
|
-
getUsageCounts:
|
|
9518
|
+
getUsageCounts: internal9.route({ method: "GET", path: "/tags/usage-counts", summary: "Count posts per tag" }).errors(orgErrors).output(array(TagUsageCountSchema)),
|
|
9361
9519
|
getById: tagged17.route({ method: "GET", path: "/tags/{id}", summary: "Get a tag" }).errors(orgErrors).input(IdPathParam).output(TagSchema),
|
|
9362
|
-
create:
|
|
9363
|
-
update:
|
|
9364
|
-
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)
|
|
9365
9523
|
};
|
|
9366
9524
|
|
|
9367
9525
|
// ../../packages/api-contract/src/usage.ts
|
|
@@ -9397,11 +9555,11 @@ var UsageEventSchema = object({
|
|
|
9397
9555
|
createdAt: Timestamp
|
|
9398
9556
|
});
|
|
9399
9557
|
var tagged18 = base.route({ tags: ["Usage"] });
|
|
9400
|
-
var
|
|
9558
|
+
var internal10 = tagged18.meta({ internal: true });
|
|
9401
9559
|
var usageContract = {
|
|
9402
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),
|
|
9403
|
-
daily:
|
|
9404
|
-
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(
|
|
9405
9563
|
object({
|
|
9406
9564
|
surface: UsageSurfaceSchema.optional(),
|
|
9407
9565
|
limit: coerce_exports.number().int().min(1).max(100).default(25),
|
|
@@ -9546,17 +9704,17 @@ var AiQuotaSchema = object({
|
|
|
9546
9704
|
unlimited: boolean2()
|
|
9547
9705
|
});
|
|
9548
9706
|
var tagged19 = base.route({ tags: ["User"] });
|
|
9549
|
-
var
|
|
9707
|
+
var internal11 = tagged19.meta({ internal: true });
|
|
9550
9708
|
var userContract = {
|
|
9551
9709
|
me: tagged19.route({ method: "GET", path: "/users/me", summary: "Get the current user" }).errors({ ...authedErrors, NOT_FOUND: { message: "User not found." } }).output(MeSchema),
|
|
9552
|
-
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),
|
|
9553
9711
|
getPreferences: tagged19.route({ method: "GET", path: "/users/me/preferences", summary: "Get the current user's preferences" }).errors(authedErrors).output(UserPreferencesSchema),
|
|
9554
|
-
updatePreferences:
|
|
9555
|
-
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() })),
|
|
9556
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),
|
|
9557
|
-
getAiQuota:
|
|
9558
|
-
setDefaultWorkspace:
|
|
9559
|
-
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)
|
|
9560
9718
|
};
|
|
9561
9719
|
|
|
9562
9720
|
// ../../packages/api-contract/src/workspace.ts
|
|
@@ -12487,7 +12645,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
|
|
|
12487
12645
|
}
|
|
12488
12646
|
|
|
12489
12647
|
// src/version.ts
|
|
12490
|
-
var CLI_VERSION = "0.1.
|
|
12648
|
+
var CLI_VERSION = "0.1.38";
|
|
12491
12649
|
|
|
12492
12650
|
// src/client.ts
|
|
12493
12651
|
var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|