@postonus/cli 0.1.54 → 0.1.55

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 CHANGED
@@ -6959,21 +6959,15 @@ var ActivityEventTypeSchema = _enum([
6959
6959
  ]);
6960
6960
  var ActivityActorSchema = object({
6961
6961
  userId: string2().nullable(),
6962
- // null for system events (e.g. approval_reset)
6963
6962
  name: string2().nullable(),
6964
6963
  image: string2().nullable(),
6965
6964
  organizationName: string2().nullable()
6966
- // for cross-org commenters; null otherwise
6967
6965
  });
6968
6966
  var ActivityEventSchema = object({
6969
6967
  id: string2(),
6970
- // stable id: `${type}:${sourceId}` (e.g. "review_decision:<uuid>")
6971
6968
  type: ActivityEventTypeSchema,
6972
6969
  occurredAt: Timestamp,
6973
6970
  actor: ActivityActorSchema,
6974
- // The event payload's shape is a function of `type` and is never branched on by
6975
- // the server — it is opaque data assembled for the client to render, matching
6976
- // the tRPC-era shape.
6977
6971
  data: unknown()
6978
6972
  });
6979
6973
  var tagged = base.route({ tags: ["Activity"] }).meta({ internal: true });
@@ -7363,7 +7357,6 @@ var AdminUserSchema = object({
7363
7357
  lastActiveAt: Timestamp.nullable(),
7364
7358
  workspaceCount: AggregateCount,
7365
7359
  apiKeyCount: AggregateCount,
7366
- /** Calls in the last 30 days. */
7367
7360
  apiCalls: AggregateCount,
7368
7361
  mcpCalls: AggregateCount,
7369
7362
  lastDeveloperCallAt: Timestamp.nullable()
@@ -7391,9 +7384,7 @@ var WorkspaceDeveloperUsageSchema = object({
7391
7384
  });
7392
7385
  var AdminUserListSchema = object({ users: array(AdminUserSchema), total: AggregateCount });
7393
7386
  var DeveloperUsageSchema = object({
7394
- /** Last 30 days, per user, workspace and credential. */
7395
7387
  callers: array(DeveloperCallerSchema),
7396
- /** Lifetime, per workspace. */
7397
7388
  workspaces: array(WorkspaceDeveloperUsageSchema)
7398
7389
  });
7399
7390
  var AdminEmailLogStatusSchema = _enum(["all", "sent", "bounced", "pending"]);
@@ -7541,12 +7532,6 @@ var ApiKeySchema = object({
7541
7532
  lastRequest: Timestamp.nullable(),
7542
7533
  expiresAt: Timestamp.nullable(),
7543
7534
  createdAt: Timestamp,
7544
- /**
7545
- * Calls in the last 30 days, from `api_usage_event`. Deliberately not
7546
- * better-auth's `apikey.requestCount`: that counter is lifetime and
7547
- * unwindowed, so it could never agree with the chart beside it. `lastRequest`
7548
- * stays as better-auth writes it — it outlives the event log's retention.
7549
- */
7550
7535
  callCount: AggregateCount
7551
7536
  });
7552
7537
  var CreatedApiKeySchema = object({
@@ -7570,20 +7555,8 @@ var CreateApiKeyInputSchema = object({
7570
7555
  var tagged2 = base.route({ tags: ["ApiKeys"] }).meta({ internal: true });
7571
7556
  var apiKeysContract = {
7572
7557
  list: tagged2.route({ method: "GET", path: "/api-keys", summary: "List the caller\u2019s API keys" }).errors(orgErrors).output(array(ApiKeySchema)),
7573
- /**
7574
- * Org-wide count, deliberately separate from `list` (which is scoped to the
7575
- * calling member per ADR-0002) — the cap counts every member's keys.
7576
- */
7577
7558
  usage: tagged2.route({ method: "GET", path: "/api-keys/usage", summary: "Get the org-wide API key cap usage" }).errors(orgErrors).output(ApiKeyUsageSchema),
7578
- /**
7579
- * `writableBase`, not `orgBase`: minting a credential is a write, so a
7580
- * read-only workspace must not be able to do it. An API-key caller never
7581
- * reaches the handler at all — the whole slice is `internal`, so
7582
- * `publicSurfaceMiddleware` answers NOT_FOUND. That is what keeps one leaked
7583
- * key from minting more.
7584
- */
7585
7559
  create: tagged2.route({ method: "POST", path: "/api-keys", summary: "Create an API key", successStatus: 201 }).errors(writableErrors).input(CreateApiKeyInputSchema).output(CreatedApiKeySchema),
7586
- /** `orgBase`, not `writableBase` — revoking a key is allowed even read-only. */
7587
7560
  revoke: tagged2.route({ method: "DELETE", path: "/api-keys/{id}", summary: "Revoke an API key" }).errors(orgErrors).input(IdPathParam).output(object({ id: string2() }))
7588
7561
  };
7589
7562
 
@@ -7632,7 +7605,6 @@ var CancelSubscriptionOutputSchema = object({
7632
7605
  var tagged4 = base.route({ tags: ["Billing"] }).meta({ internal: true });
7633
7606
  var billingContract = {
7634
7607
  getCancellationStats: tagged4.route({ method: "GET", path: "/billing/cancellation-stats", summary: "Get cancellation stats" }).errors(orgErrors).output(CancellationStatsSchema),
7635
- /** Only the billing owner may cancel — verified in the handler, not by the transport. */
7636
7608
  cancelSubscription: tagged4.route({ method: "POST", path: "/billing/cancel", summary: "Cancel the workspace subscription" }).errors({
7637
7609
  ...orgErrors,
7638
7610
  BAD_REQUEST: { message: "No active subscription to cancel." },
@@ -7691,23 +7663,16 @@ var UpdateShareLinkInputSchema = object({
7691
7663
  id: Uuid,
7692
7664
  allowComments: boolean2().optional(),
7693
7665
  audience: ShareAudienceSchema.optional(),
7694
- /** When present, replaces the whole recipient list. */
7695
7666
  recipientUserIds: RecipientUserIds,
7696
7667
  expiresAt: DateInput.optional().nullable()
7697
7668
  });
7698
7669
  var shareTagged = base.route({ tags: ["Share"] }).meta({ internal: true });
7699
7670
  var shareContract = {
7700
- /** Type-ahead for the "share with specific people" picker. */
7701
7671
  searchPeople: shareTagged.route({ method: "GET", path: "/share-links/people", summary: "Search workspace members to invite" }).errors(orgErrors).input(SearchSharePeopleInputSchema).output(array(SharePersonSchema)),
7702
7672
  createLink: shareTagged.route({ method: "POST", path: "/share-links", summary: "Create a post share link", successStatus: 201 }).errors(orgErrors).input(CreateShareLinkInputSchema).output(PostShareLinkWithTokenSchema),
7703
7673
  listLinks: shareTagged.route({ method: "GET", path: "/share-links", summary: "List share links for a post" }).errors(orgErrors).input(ListShareLinksInputSchema).output(array(PostShareLinkWithRecipientsSchema)),
7704
7674
  revokeLink: shareTagged.route({ method: "POST", path: "/share-links/{id}/revoke", summary: "Revoke a share link" }).errors(orgErrors).input(IdPathParam).output(PostShareLinkSchema),
7705
7675
  updateLink: shareTagged.route({ method: "PATCH", path: "/share-links/{id}", summary: "Update a share link" }).errors(orgErrors).input(UpdateShareLinkInputSchema).output(PostShareLinkSchema),
7706
- /**
7707
- * Issues a fresh token for an existing link and invalidates the old URL.
7708
- * Tokens are stored hashed, so the plaintext URL cannot be shown again after
7709
- * creation — rotating is how you recover a lost link.
7710
- */
7711
7676
  rotateLink: shareTagged.route({ method: "POST", path: "/share-links/{id}/rotate", summary: "Rotate a share link token" }).errors(orgErrors).input(IdPathParam).output(PostShareLinkWithTokenSchema)
7712
7677
  };
7713
7678
 
@@ -7761,7 +7726,6 @@ var UpdateCalendarShareLinkInputSchema = object({
7761
7726
  allowApprovals: boolean2().optional(),
7762
7727
  watermark: boolean2().optional(),
7763
7728
  audience: ShareAudienceSchema.optional(),
7764
- /** `null` clears the password, `undefined` leaves it unchanged. */
7765
7729
  password: SharePasswordSchema.optional().nullable(),
7766
7730
  expiresAt: DateInput.optional().nullable()
7767
7731
  });
@@ -7790,11 +7754,6 @@ var calendarShareContract = {
7790
7754
  listLinks: calendarShareTagged.route({ method: "GET", path: "/calendar-share-links", summary: "List calendar share links" }).errors(orgErrors).input(ListCalendarShareLinksInputSchema).output(array(CalendarShareLinkWithRecipientsSchema)),
7791
7755
  updateLink: calendarShareTagged.route({ method: "PATCH", path: "/calendar-share-links/{id}", summary: "Update a calendar share link" }).errors(orgErrors).input(UpdateCalendarShareLinkInputSchema).output(CalendarShareLinkSchema),
7792
7756
  revokeLink: calendarShareTagged.route({ method: "POST", path: "/calendar-share-links/{id}/revoke", summary: "Revoke a calendar share link" }).errors(orgErrors).input(IdPathParam).output(CalendarShareLinkSchema),
7793
- /**
7794
- * Names a reviewer on the link. Only meaningful once `audience` is
7795
- * `invited`, but allowed either way so the list can be filled in before
7796
- * switching the link over.
7797
- */
7798
7757
  addRecipient: calendarShareTagged.route({
7799
7758
  method: "POST",
7800
7759
  path: "/calendar-share-links/{id}/recipients",
@@ -7832,7 +7791,6 @@ var UpdateChannelGroupInputSchema = object({
7832
7791
  var publicTagged2 = base.route({ tags: ["Channel Groups"] });
7833
7792
  var tagged5 = publicTagged2.meta({ internal: true });
7834
7793
  var channelGroupsContract = {
7835
- // Public read: the composer in the browser extension shows group chips.
7836
7794
  get: publicTagged2.route({ method: "GET", path: "/channel-groups", summary: "List channel groups" }).errors(orgErrors).output(array(ChannelGroupSchema)),
7837
7795
  create: tagged5.route({ method: "POST", path: "/channel-groups", summary: "Create a channel group", successStatus: 201 }).errors({ ...orgErrors, CONFLICT: { message: "A Channel Group with this name already exists." } }).input(CreateChannelGroupInputSchema).output(ChannelGroupSchema),
7838
7796
  update: tagged5.route({ method: "PATCH", path: "/channel-groups/{id}", summary: "Rename or re-member a channel group" }).errors({ ...orgErrors, CONFLICT: { message: "A Channel Group with this name already exists." } }).input(UpdateChannelGroupInputSchema).output(ChannelGroupSchema),
@@ -7941,7 +7899,6 @@ var commentsContract = {
7941
7899
  var PlatformLimitsSchema = object({
7942
7900
  maxChars: number2().int(),
7943
7901
  maxCharsWithMedia: number2().int().nullable(),
7944
- /** `grapheme` where the platform counts an emoji as one; otherwise UTF-16 units. */
7945
7902
  countUnit: _enum(["grapheme", "utf16"]),
7946
7903
  maxTitleChars: number2().int().nullable(),
7947
7904
  supportsThreads: boolean2(),
@@ -7957,13 +7914,11 @@ var BestTimeSlotSchema = object({
7957
7914
  scheduledAt: Timestamp,
7958
7915
  platforms: array(string2()),
7959
7916
  strength: number2(),
7960
- /** Where the slot came from: the user's saved windows, research several platforms share, one platform's research, or a default. */
7961
7917
  source: _enum(["user", "consensus", "platform", "default"])
7962
7918
  });
7963
7919
  var BestTimesSchema = object({
7964
7920
  timezone: string2(),
7965
7921
  slots: array(BestTimeSlotSchema),
7966
- /** Requested platforms with no research data; their slots are a default, not a recommendation. */
7967
7922
  platformsWithoutData: array(PlatformSchema)
7968
7923
  });
7969
7924
  var BestTimesInputSchema = object({
@@ -7993,7 +7948,6 @@ var IntegrationSchema = object({
7993
7948
  id: Uuid,
7994
7949
  platform: PlatformSchema,
7995
7950
  name: string2(),
7996
- // The account handle. Two channels on one platform can share a display name.
7997
7951
  username: string2().nullable(),
7998
7952
  image: string2(),
7999
7953
  tokenStatus: IntegrationTokenStatusSchema,
@@ -8004,7 +7958,6 @@ var IntegrationSchema = object({
8004
7958
  expiresAt: Timestamp.nullable(),
8005
7959
  autoRefreshUnavailable: boolean2(),
8006
7960
  hasFailedSchedules: boolean2(),
8007
- /** The channel's publishing limits, the same values `GET /platforms/rules` reports for its platform. */
8008
7961
  limits: PlatformLimitsSchema
8009
7962
  });
8010
7963
  var UnhealthyIntegrationSchema = object({
@@ -8175,11 +8128,6 @@ var CompleteUploadInputSchema = object({
8175
8128
  uploadId: Uuid,
8176
8129
  checksum: ChecksumSchema,
8177
8130
  multipartParts: array(object({ partNumber: number2().int().positive(), etag: string2().min(1) })).optional(),
8178
- /**
8179
- * Scenario-specific payload, validated against that scenario's own schema in
8180
- * `uploadScenarios` rather than here — the wire shape stays the same for every
8181
- * scenario while what each one accepts does not.
8182
- */
8183
8131
  input: record(string2(), unknown()).optional()
8184
8132
  });
8185
8133
  var CompleteUploadOutputSchema = object({
@@ -8193,7 +8141,6 @@ var CompleteUploadOutputSchema = object({
8193
8141
  bytes: number2().int().optional(),
8194
8142
  variants: MediaVariantsSchema.nullable(),
8195
8143
  variantsStatus: MediaVariantsStatusSchema.nullable(),
8196
- /** Set only by scenarios that change something the client renders immediately (`user_avatar`). */
8197
8144
  avatarUrl: string2().nullable()
8198
8145
  });
8199
8146
  var DeleteFileInputSchema = object({ uploadId: Uuid });
@@ -8212,12 +8159,7 @@ var tagged9 = base.route({ tags: ["Uploads"] });
8212
8159
  var uploadContract = {
8213
8160
  initiateUpload: tagged9.route({ method: "POST", path: "/uploads/initiate", summary: "Get a signed URL to upload a file" }).errors(uploadErrors).input(InitiateUploadInputSchema).output(InitiateUploadOutputSchema),
8214
8161
  completeUpload: tagged9.route({ method: "POST", path: "/uploads/complete", summary: "Complete an upload once its bytes are in storage" }).errors(uploadErrors).input(CompleteUploadInputSchema).output(CompleteUploadOutputSchema),
8215
- /** Org-scoped, not gated on `canWrite` — deleting is always allowed, even read-only. */
8216
8162
  deleteFile: tagged9.route({ method: "DELETE", path: "/uploads/{uploadId}", summary: "Delete an uploaded file" }).errors(orgErrors).input(DeleteFileInputSchema).output(DeletedSchema),
8217
- /**
8218
- * Fetches a caller-supplied URL server-side (through `fetchPublicUrl`'s SSRF
8219
- * guard) and stores the result as a completed upload.
8220
- */
8221
8163
  fromUrl: tagged9.route({
8222
8164
  method: "POST",
8223
8165
  path: "/uploads/from-url",
@@ -8233,7 +8175,6 @@ var MediaFolderFilterSchema = union([Uuid, literal("unfiled")]);
8233
8175
  var MediaFolderParentSchema = Uuid.nullable();
8234
8176
  var LibraryMediaSchema = object({
8235
8177
  id: Uuid,
8236
- /** Null for an asset that arrived with no filename to borrow — a GIPHY link. */
8237
8178
  name: string2().nullable(),
8238
8179
  url: string2(),
8239
8180
  type: MediaTypeSchema,
@@ -8253,7 +8194,6 @@ var MediaFolderSchema = object({
8253
8194
  id: Uuid,
8254
8195
  name: string2(),
8255
8196
  parentId: Uuid.nullable(),
8256
- /** Direct members only. A parent folder does not count what its children hold. */
8257
8197
  mediaCount: AggregateCount,
8258
8198
  createdAt: Timestamp
8259
8199
  });
@@ -8272,7 +8212,6 @@ var ListMediaOutputSchema = object({
8272
8212
  });
8273
8213
  var ListMediaFoldersOutputSchema = object({
8274
8214
  folders: array(MediaFolderSchema),
8275
- /** For the rail's two fixed rows, which are not folders and have no id. */
8276
8215
  totalCount: AggregateCount,
8277
8216
  unfiledCount: AggregateCount
8278
8217
  });
@@ -8288,7 +8227,6 @@ var UpdateMediaFolderInputSchema = object({
8288
8227
  var UpdateMediaInputSchema = object({
8289
8228
  id: Uuid,
8290
8229
  name: MediaNameSchema.optional(),
8291
- /** Absent leaves the asset where it is; null unfiles it. */
8292
8230
  folderId: Uuid.nullish()
8293
8231
  });
8294
8232
  var MoveMediaInputSchema = object({
@@ -8310,8 +8248,6 @@ var folderErrors = {
8310
8248
  };
8311
8249
  var mediaContract = {
8312
8250
  list: internal6.route({ method: "GET", path: "/media", summary: "List library media" }).errors(orgErrors).input(ListMediaInputSchema).output(ListMediaOutputSchema),
8313
- // Declared before `getById` for readability only — oRPC matches a literal
8314
- // segment ahead of a path parameter regardless of declaration order.
8315
8251
  listFolders: internal6.route({ method: "GET", path: "/media/folders", summary: "List media folders with counts" }).errors(orgErrors).output(ListMediaFoldersOutputSchema),
8316
8252
  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),
8317
8253
  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),
@@ -8333,7 +8269,6 @@ var MediaSourceSchema = object({
8333
8269
  comingSoon: boolean2().optional(),
8334
8270
  enabled: boolean2(),
8335
8271
  configured: boolean2(),
8336
- /** Only the public env keys a picker widget needs client-side (never a secret). */
8337
8272
  clientConfig: record(string2(), string2())
8338
8273
  });
8339
8274
  var SourceIdInputSchema = object({ sourceId: string2() });
@@ -8349,7 +8284,6 @@ var ImportedAssetSchema = object({
8349
8284
  width: number2().int().positive().optional(),
8350
8285
  height: number2().int().positive().optional(),
8351
8286
  thumbnailUrl: string2().url().optional(),
8352
- /** Unsplash ToS download-location ping. */
8353
8287
  downloadLocation: string2().url().optional()
8354
8288
  });
8355
8289
  var ImportAssetInputSchema = object({ asset: ImportedAssetSchema, scenario: literal("post_attachments") });
@@ -8420,12 +8354,7 @@ var NotificationSchema = object({
8420
8354
  var WorkspaceUnreadCountSchema = object({ organizationId: string2(), unread: number2().int() });
8421
8355
  var tagged12 = base.route({ tags: ["Notifications"] }).meta({ internal: true });
8422
8356
  var notificationsContract = {
8423
- /** Full history across every workspace — backs the standalone /notifications page. */
8424
8357
  list: tagged12.route({ method: "GET", path: "/notifications", summary: "List notifications across every workspace" }).errors(authedErrors).input(object({ limit: number2().int().positive().max(100).optional() })).output(object({ notifications: array(NotificationSchema) })),
8425
- /**
8426
- * Bell-dropdown feed: current workspace + user-global rows, plus a compact
8427
- * "other workspaces" unread summary.
8428
- */
8429
8358
  bellFeed: tagged12.route({ method: "GET", path: "/notifications/bell-feed", summary: "Get the bell-dropdown notification feed" }).errors(orgErrors).input(object({ limit: number2().int().positive().max(50).optional() })).output(
8430
8359
  object({
8431
8360
  notifications: array(NotificationSchema),
@@ -8505,12 +8434,6 @@ var SharedPostFields = {
8505
8434
  integrationSettings: IntegrationSettingsInputSchema.optional(),
8506
8435
  subreddit: string2().trim().min(1).optional(),
8507
8436
  xLinkHandling: _enum(["first_reply", "plain_text", "keep_live"]).optional(),
8508
- /**
8509
- * Which of the post's media each channel publishes, in publish order, by url.
8510
- * Omit a channel to send it as much of the post's media as its platform can
8511
- * carry — the caps live in `@postonus/integrations`, so the API never asks the
8512
- * caller to know them.
8513
- */
8514
8437
  integrationMedia: record(string2(), array(string2())).optional(),
8515
8438
  integrationTimeOffsets: record(string2(), number2().int().min(-12).max(12)).optional(),
8516
8439
  delivery: _enum(SCHEDULE_DELIVERY_VALUES).optional(),
@@ -8526,11 +8449,6 @@ var CreatePostRowSchema = object({
8526
8449
  var ThreadSchema = array(string2().trim().min(1).max(DRAFT_MAX_CHARS)).min(2).max(MAX_THREAD_SEGMENTS);
8527
8450
  var DryRunField = boolean2().optional();
8528
8451
  var TargetFields = {
8529
- /**
8530
- * Every active channel on these platforms. The alternative to
8531
- * `selectedIntegrations`, which names channels by id and is the only way to pick
8532
- * between two channels on one platform.
8533
- */
8534
8452
  platforms: array(PlatformSchema).min(1).optional(),
8535
8453
  thread: ThreadSchema.optional()
8536
8454
  };
@@ -8556,7 +8474,6 @@ var UpdatePostInputSchema = object({
8556
8474
  media: array(PostMediaInputSchema).optional(),
8557
8475
  scheduledAt: InstantInput.nullable().optional(),
8558
8476
  postAction: PostActionEnum.optional(),
8559
- /** Move named schedules individually. Applied after the rest of the update. */
8560
8477
  scheduleTimes: array(object({ scheduleId: Uuid, scheduledAt: InstantInput })).min(1).optional(),
8561
8478
  dryRun: DryRunField,
8562
8479
  ...SharedPostFields,
@@ -8575,7 +8492,6 @@ var ScheduleDraftInputSchema = object({
8575
8492
  id: Uuid,
8576
8493
  scheduledAt: InstantInput.optional(),
8577
8494
  useOptimalTime: boolean2().optional(),
8578
- // Required when the draft was saved with no channels; replaces them otherwise.
8579
8495
  selectedIntegrations: array(string2()).min(1).optional(),
8580
8496
  platforms: array(PlatformSchema).min(1).optional(),
8581
8497
  delivery: _enum(SCHEDULE_DELIVERY_VALUES).optional(),
@@ -8613,14 +8529,7 @@ var AddChannelsInputSchema = object({
8613
8529
  });
8614
8530
  var RetryScheduleInputSchema = object({
8615
8531
  scheduleId: Uuid,
8616
- /** Replacement copy for this channel only. Omitted leaves it as it was. */
8617
8532
  content: string2().trim().max(DRAFT_MAX_CHARS).optional(),
8618
- /**
8619
- * Which of the post's existing attachments this channel publishes, in order.
8620
- * Must be a subset of what the post already has: adding media would mean
8621
- * writing the post, which is shared with channels that may have published.
8622
- * An empty array publishes this channel with no media.
8623
- */
8624
8533
  attachmentMediaUrls: array(string2()).optional()
8625
8534
  });
8626
8535
  var RescheduleInputSchema = object({ scheduleId: Uuid, scheduledAt: InstantInput });
@@ -8673,12 +8582,10 @@ var PostScheduleSchema = object({
8673
8582
  publishedAt: Timestamp.nullable(),
8674
8583
  failureReason: string2().nullable(),
8675
8584
  failureDetail: ScheduleFailureDetailSchema.nullable(),
8676
- /** Set when the platform removed the post after we published it. */
8677
8585
  platformDeletedAt: Timestamp.nullable(),
8678
8586
  scheduledContent: string2().nullable(),
8679
8587
  firstComment: string2().nullable(),
8680
8588
  settings: record(string2(), unknown()).nullable(),
8681
- /** Null means this channel publishes every attachment the post has. */
8682
8589
  attachmentMediaUrls: array(string2()).nullable().optional(),
8683
8590
  platformPostId: string2().nullable(),
8684
8591
  releaseUrl: string2().nullable(),
@@ -8732,11 +8639,6 @@ var MediaMetadataSchema = object({
8732
8639
  variants: MediaVariantsSchema.nullable(),
8733
8640
  variantsStatus: MediaVariantsStatusSchema.nullable(),
8734
8641
  durationMs: number2().int().nullable(),
8735
- /**
8736
- * The frame captured for this video after upload, used as its cover wherever
8737
- * the post names none. Null for images, and for a video whose capture has not
8738
- * finished yet — the composer polls until it appears.
8739
- */
8740
8642
  autoCover: object({ id: string2(), url: string2(), timestampMs: number2().int().nullable() }).nullable()
8741
8643
  });
8742
8644
  var PostScheduleStateSchema = object({
@@ -8754,11 +8656,8 @@ var PostStateSchema = object({
8754
8656
  thread: array(string2()).nullable(),
8755
8657
  media: array(object({ url: string2(), type: MediaTypeSchema, altText: string2().nullable() })),
8756
8658
  schedules: array(PostScheduleStateSchema),
8757
- /** The post in the dashboard, for a human to take over. */
8758
8659
  url: string2(),
8759
- /** `pending` while the workspace's review gate holds the post. */
8760
8660
  review: _enum(["pending"]).nullable(),
8761
- /** True when the write was rehearsed with `dryRun` and nothing was stored. */
8762
8661
  dryRun: boolean2()
8763
8662
  });
8764
8663
  var CreatePostsOutputSchema = object({ posts: array(PostStateSchema) });
@@ -8839,8 +8738,6 @@ var idempotent = tagged13.route({
8839
8738
  var internal7 = tagged13.meta({ internal: true });
8840
8739
  var postsContract = {
8841
8740
  list: tagged13.route({ method: "GET", path: "/posts", summary: "List posts" }).errors(orgErrors).input(ListPostsInputSchema).output(PostsListOutputSchema),
8842
- // Declared before `getById` so `/posts/counts` is not read as `/posts/{id}`.
8843
- // Dashboard plumbing: the status segment row on `/posts`.
8844
8741
  counts: internal7.route({ method: "GET", path: "/posts/counts", summary: "Count posts per status" }).errors(orgErrors).input(CountPostsInputSchema).output(CountPostsOutputSchema),
8845
8742
  getById: tagged13.route({ method: "GET", path: "/posts/{id}", summary: "Get a post" }).errors(orgErrors).input(IdPathParam).output(PostWithRelationsSchema),
8846
8743
  mediaById: internal7.route({ method: "GET", path: "/posts/media/{id}", summary: "Get post media metadata" }).errors(orgErrors).input(IdPathParam).output(MediaMetadataSchema),
@@ -8890,8 +8787,6 @@ var CalendarReadInputSchema = CalendarTokenPathParam.extend({ accessKey: string2
8890
8787
  var CalendarScheduleReadInputSchema = CalendarReadInputSchema.extend({ postScheduleId: Uuid });
8891
8788
  var ReviewerIdentityFields = {
8892
8789
  reviewerName: string2().trim().min(1).max(100),
8893
- // Not optional. A decision with no email identifies nobody, so it can be
8894
- // neither deduplicated nor attributed.
8895
8790
  reviewerEmail: string2().trim().toLowerCase().email()
8896
8791
  };
8897
8792
  var CalendarUnlockInputSchema = CalendarTokenPathParam.extend({ password: string2().min(1) });
@@ -8902,10 +8797,8 @@ var PublicCalendarMetaSchema = object({
8902
8797
  allowComments: boolean2(),
8903
8798
  allowApprovals: boolean2(),
8904
8799
  watermark: boolean2(),
8905
- /** Lets the identity prompt say which email to use. The allow-list is checked server-side when a decision arrives. */
8906
8800
  audience: ShareAudienceSchema,
8907
8801
  passwordProtected: boolean2(),
8908
- /** The zone the schedules were planned in — the link creator's, not the viewer's. */
8909
8802
  timezone: string2()
8910
8803
  });
8911
8804
  var PublicScheduleMediaSchema = object({
@@ -8940,10 +8833,6 @@ var PublicScheduleSchema = object({
8940
8833
  approvalCompletedAt: Timestamp.nullable(),
8941
8834
  integrationName: string2(),
8942
8835
  integrationImage: string2().nullable(),
8943
- /**
8944
- * Every post in this card's thread, in publish order. Empty when the card is a
8945
- * single post — so an empty list means "render the body", not "a thread of none".
8946
- */
8947
8836
  threadSegments: array(string2()),
8948
8837
  media: array(PublicScheduleMediaSchema),
8949
8838
  reviews: array(PublicScheduleReviewSchema),
@@ -8975,7 +8864,6 @@ var AddCommentOutputSchema = object({
8975
8864
  var ListCommentsInputSchema = CalendarScheduleReadInputSchema;
8976
8865
  var calendarTagged = base.route({ tags: ["Public Calendar"] }).meta({ internal: true });
8977
8866
  var publicCalendarContract = {
8978
- /** `publicCalendar.unlock` only. Tighter bucket, and reaches a still-locked link. */
8979
8867
  unlock: calendarTagged.route({
8980
8868
  method: "POST",
8981
8869
  path: "/calendar-share/{token}/unlock",
@@ -8988,11 +8876,6 @@ var publicCalendarContract = {
8988
8876
  summary: "Read a shared calendar",
8989
8877
  spec: anonymous
8990
8878
  }).errors(shareErrors).input(GetCalendarInputSchema).output(PublicCalendarSchema),
8991
- /**
8992
- * Deciding is gated; *viewing* is not. A viewer has no way to prove an email
8993
- * before the identity prompt, so gating `getCalendar` would make the link
8994
- * unopenable for the very people it names.
8995
- */
8996
8879
  submitDecision: calendarTagged.route({
8997
8880
  method: "POST",
8998
8881
  path: "/calendar-share/{token}/schedules/{postScheduleId}/decision",
@@ -9045,10 +8928,6 @@ var SharedPostVariantSchema = object({
9045
8928
  scheduledContent: string2().nullable(),
9046
8929
  firstComment: string2().nullable(),
9047
8930
  scheduledAt: Timestamp.nullable(),
9048
- /**
9049
- * Every post in this channel's thread, in publish order. Empty when the channel
9050
- * sends a single post, which is what tells the view to render the body instead.
9051
- */
9052
8931
  threadSegments: array(string2())
9053
8932
  });
9054
8933
  var SharedPostSchema = object({
@@ -9071,13 +8950,6 @@ var SharedPostViewSchema = object({
9071
8950
  });
9072
8951
  var publicPostTagged = base.route({ tags: ["Public Post"] }).meta({ internal: true });
9073
8952
  var publicPostContract = {
9074
- /**
9075
- * The one anonymous read that used to sit on a bare `publicProcedure`: no
9076
- * bucket, and an unconditional view-count update per call, so a leaked link
9077
- * was an unmetered write loop. Graceful — an invite-only link this viewer is
9078
- * not on resolves to a "who are you" screen, not an error, so they can sign
9079
- * in with the right account.
9080
- */
9081
8953
  getByShareToken: publicPostTagged.route({ method: "GET", path: "/share/{token}/post", summary: "Read a shared post", spec: anonymous2 }).errors(shareErrors).input(TokenPathParam).output(SharedPostViewSchema)
9082
8954
  };
9083
8955
 
@@ -9117,7 +8989,6 @@ var recycleRuleTagged = base.route({ tags: ["Recycle Rules"] }).meta({ internal:
9117
8989
  var recycleRulesContract = {
9118
8990
  list: recycleRuleTagged.route({ method: "GET", path: "/recycle-rules", summary: "List recycle rules" }).errors(orgErrors).output(array(RecycleRuleSchema)),
9119
8991
  getById: recycleRuleTagged.route({ method: "GET", path: "/recycle-rules/{id}", summary: "Get a recycle rule" }).errors(orgErrors).input(IdPathParam).output(RecycleRuleSchema),
9120
- /** `publishErrors`: recycle rules spend money outbound, same as scheduling and publishing. */
9121
8992
  create: recycleRuleTagged.route({ method: "POST", path: "/recycle-rules", summary: "Create a recycle rule", successStatus: 201 }).errors(publishErrors).input(CreateRecycleRuleInputSchema).output(RecycleRuleSchema),
9122
8993
  update: recycleRuleTagged.route({ method: "PATCH", path: "/recycle-rules/{id}", summary: "Update a recycle rule" }).errors(publishErrors).input(UpdateRecycleRuleInputSchema).output(RecycleRuleSchema),
9123
8994
  delete: recycleRuleTagged.route({ method: "DELETE", path: "/recycle-rules/{id}", summary: "Delete a recycle rule" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema)
@@ -9383,11 +9254,6 @@ var draftsContract = {
9383
9254
  }).errors(orgErrors).input(object({ workflowId: Uuid, limit: number2().int().min(1).max(100).optional() })).output(array(DraftListItemSchema))
9384
9255
  };
9385
9256
  var runsContract = {
9386
- /**
9387
- * Declared before `get` for readability only, as with `tags.getUsageCounts` —
9388
- * oRPC matches the literal `recent-statuses` segment ahead of `{runId}`
9389
- * regardless of declaration order.
9390
- */
9391
9257
  recentStatuses: tagged14.route({
9392
9258
  method: "GET",
9393
9259
  path: "/repurpose/workflows/{workflowId}/runs/recent-statuses",
@@ -9540,13 +9406,6 @@ var ReviewStatusSchema = object({
9540
9406
  var tagged15 = base.route({ tags: ["Reviews"] }).meta({ internal: true });
9541
9407
  var reviewsContract = {
9542
9408
  getStatus: tagged15.route({ method: "GET", path: "/posts/{postId}/reviews/status", summary: "Get review status and history" }).errors(orgErrors).input(object({ postId: Uuid, postScheduleId: Uuid.optional() })).output(ReviewStatusSchema),
9543
- /**
9544
- * Sends mail from our domain to addresses the caller names, so it spends
9545
- * outbound reputation — `publishBase`, not `writableBase`, same rule as
9546
- * invitations. Approver ids are validated as members of the caller's org
9547
- * before anything is queued, so a caller cannot use this to email an
9548
- * arbitrary address.
9549
- */
9550
9409
  requestReview: tagged15.route({ method: "POST", path: "/posts/{postId}/reviews/request", summary: "Request review of a post" }).errors(publishErrors).input(
9551
9410
  object({
9552
9411
  postId: Uuid,
@@ -9574,10 +9433,6 @@ var ListSchedulesInputSchema = object({
9574
9433
  limit: coerce_exports.number().int().min(1).max(100).default(20),
9575
9434
  cursor: ScheduleListCursorInputSchema.optional(),
9576
9435
  direction: _enum(["forward", "backward"]).default("forward"),
9577
- // Enums, not free strings. Both reach a Postgres enum column, so a value
9578
- // outside the set is not a typed refusal but a query that throws — the
9579
- // endpoint answered 500 for `statuses[]=PENDING`, a status that has never
9580
- // existed. `posts.ts` already types the equivalent filters this way.
9581
9436
  platforms: array(PlatformSchema).optional(),
9582
9437
  statuses: array(_enum(SCHEDULE_STATUS_VALUES)).optional(),
9583
9438
  integrationIds: array(string2()).optional(),
@@ -9599,11 +9454,6 @@ var CountSchedulesInputSchema = object({
9599
9454
  var GetScheduleByIdInputSchema = object({ id: Uuid, postId: Uuid });
9600
9455
  var DeleteScheduleInputSchema = object({
9601
9456
  id: Uuid,
9602
- /**
9603
- * Also delete the post on the platform. Ignored for a channel that never
9604
- * published — there is nothing live to take down — and refused on Instagram,
9605
- * Threads and TikTok, whose APIs cannot delete a post at all.
9606
- */
9607
9457
  deleteRemote: boolean2().default(false)
9608
9458
  });
9609
9459
  var ScheduleListItemSchema = object({
@@ -9618,7 +9468,6 @@ var ScheduleListItemSchema = object({
9618
9468
  originRecycleEventId: string2().nullable(),
9619
9469
  failureReason: string2().nullable(),
9620
9470
  failureDetail: ScheduleFailureDetailSchema.nullable(),
9621
- /** Set when the platform removed the post after we published it. */
9622
9471
  platformDeletedAt: Timestamp.nullable(),
9623
9472
  scheduledContent: string2().nullable(),
9624
9473
  retryCount: number2(),
@@ -9628,22 +9477,11 @@ var ScheduleListItemSchema = object({
9628
9477
  approvalStatus: _enum(APPROVAL_STATUS_VALUES).nullable(),
9629
9478
  approvalRequestedAt: Timestamp.nullable(),
9630
9479
  approvalCompletedAt: Timestamp.nullable(),
9631
- /**
9632
- * Posts in this row's thread, itself included. 1 for a plain schedule.
9633
- *
9634
- * The list returns thread roots only, so a chip needs this to say "and six
9635
- * more" rather than showing the opening segment as the whole post.
9636
- */
9637
9480
  threadTotal: number2().int().min(1),
9638
9481
  post: object({
9639
9482
  id: string2(),
9640
9483
  content: string2(),
9641
9484
  createdAt: Timestamp,
9642
- /**
9643
- * The post's first attachment, for the calendar cell that leads with an
9644
- * image. `type` is the attachment's own type, so a VIDEO still reads as a
9645
- * video even though `url` is its poster frame.
9646
- */
9647
9485
  thumbnail: object({
9648
9486
  url: string2(),
9649
9487
  type: MediaTypeSchema,
@@ -9688,7 +9526,6 @@ var ScheduleWithIntegrationSchema = object({
9688
9526
  originRecycleEventId: string2().nullable(),
9689
9527
  failureReason: string2().nullable(),
9690
9528
  failureDetail: ScheduleFailureDetailSchema.nullable(),
9691
- /** Set when the platform removed the post after we published it. */
9692
9529
  platformDeletedAt: Timestamp.nullable(),
9693
9530
  scheduledContent: string2().nullable(),
9694
9531
  retryCount: number2(),
@@ -9698,20 +9535,16 @@ var ScheduleWithIntegrationSchema = object({
9698
9535
  approvalStatus: _enum(APPROVAL_STATUS_VALUES).nullable(),
9699
9536
  approvalRequestedAt: Timestamp.nullable(),
9700
9537
  approvalCompletedAt: Timestamp.nullable(),
9701
- /** 0 on the root and on a plain schedule; 1..N down a thread. */
9702
9538
  threadOrder: number2().int(),
9703
9539
  integration: object({ id: string2(), platform: PlatformSchema, name: string2(), tokenStatus: string2() }),
9704
9540
  post: PostRowSchema
9705
9541
  });
9706
9542
  var ScheduleWithPostSchema = PostRowSchema.extend({
9707
- /** The requested schedule, followed by the rest of its thread in publish order. */
9708
9543
  schedules: array(ScheduleWithIntegrationSchema)
9709
9544
  });
9710
9545
  var tagged16 = base.route({ tags: ["Schedules"] });
9711
9546
  var schedulesContract = {
9712
9547
  list: tagged16.route({ method: "GET", path: "/schedules", summary: "List schedules (calendar view)" }).errors(orgErrors).input(ListSchedulesInputSchema).output(ListSchedulesOutputSchema),
9713
- // Dashboard plumbing: the status segment row on `/posts` and `/calendar`. No
9714
- // external caller needs it, so it stays out of the public surface.
9715
9548
  counts: tagged16.route({ method: "GET", path: "/schedules/counts", summary: "Count schedules per status" }).meta({ internal: true }).errors(orgErrors).input(CountSchedulesInputSchema).output(CountSchedulesOutputSchema),
9716
9549
  getById: tagged16.route({ method: "GET", path: "/schedules/{id}", summary: "Get a schedule" }).errors(orgErrors).input(GetScheduleByIdInputSchema).output(ScheduleWithPostSchema),
9717
9550
  delete: tagged16.route({ method: "DELETE", path: "/schedules/{id}", summary: "Delete a schedule" }).errors({ ...writableErrors, ...postDomainErrors }).input(DeleteScheduleInputSchema).output(DeletedSchema)
@@ -9829,11 +9662,6 @@ var tagged17 = base.route({ tags: ["Tags"] });
9829
9662
  var internal10 = tagged17.meta({ internal: true });
9830
9663
  var tagsContract = {
9831
9664
  list: tagged17.route({ method: "GET", path: "/tags", summary: "List tags" }).errors(orgErrors).output(array(TagSchema)),
9832
- /**
9833
- * Declared before `getById` for readability only — oRPC matches a literal
9834
- * segment ahead of a path parameter regardless of declaration order, so
9835
- * `/tags/usage-counts` never resolves as `/tags/{id}`.
9836
- */
9837
9665
  getUsageCounts: internal10.route({ method: "GET", path: "/tags/usage-counts", summary: "Count posts per tag" }).errors(orgErrors).output(array(TagUsageCountSchema)),
9838
9666
  getById: tagged17.route({ method: "GET", path: "/tags/{id}", summary: "Get a tag" }).errors(orgErrors).input(IdPathParam).output(TagSchema),
9839
9667
  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),
@@ -9855,7 +9683,6 @@ var UsageSummarySchema = object({
9855
9683
  mcp: SurfaceTotalsSchema
9856
9684
  });
9857
9685
  var UsageDailyPointSchema = object({
9858
- /** `YYYY-MM-DD`, UTC. Every day in the window is present, including silent ones. */
9859
9686
  day: string2(),
9860
9687
  calls: AggregateCount,
9861
9688
  errors: AggregateCount
@@ -9863,13 +9690,11 @@ var UsageDailyPointSchema = object({
9863
9690
  var UsageEventSchema = object({
9864
9691
  id: number2().int(),
9865
9692
  surface: UsageSurfaceSchema,
9866
- /** Contract path for `api`, tool name for `mcp`. */
9867
9693
  operation: string2(),
9868
9694
  status: _enum(["ok", "error"]),
9869
9695
  statusCode: number2().int().nullable(),
9870
9696
  durationMs: number2().int(),
9871
9697
  callerKind: _enum(["api-key", "assistant", "unknown"]),
9872
- /** Key name or assistant name, resolved by the handler. */
9873
9698
  callerLabel: string2().nullable(),
9874
9699
  createdAt: Timestamp
9875
9700
  });
@@ -9882,7 +9707,6 @@ var usageContract = {
9882
9707
  object({
9883
9708
  surface: UsageSurfaceSchema.optional(),
9884
9709
  limit: coerce_exports.number().int().min(1).max(100).default(25),
9885
- /** `id` of the last row from the previous page. */
9886
9710
  cursor: coerce_exports.number().int().positive().optional()
9887
9711
  })
9888
9712
  ).output(
@@ -9904,7 +9728,6 @@ var MeSchema = object({
9904
9728
  createdAt: Timestamp,
9905
9729
  updatedAt: Timestamp,
9906
9730
  defaultOrganizationId: string2().nullable(),
9907
- /** Who the user posts for. Null until they answer the one onboarding question. */
9908
9731
  postingFor: _enum(POSTING_FOR_VALUES).nullable()
9909
9732
  });
9910
9733
  var UserAccountSchema = object({
@@ -10012,8 +9835,6 @@ var PlatformQuotaSchema = object({
10012
9835
  var PlanQuotaSchema = object({
10013
9836
  plan: string2().nullable(),
10014
9837
  periodStart: Timestamp,
10015
- // `partialRecord`, not `record`: only the requested platforms are present,
10016
- // matching `Partial<Record<Platform, PlatformQuota>>` on the old tRPC output.
10017
9838
  platforms: partialRecord(PlatformEnum, PlatformQuotaSchema)
10018
9839
  });
10019
9840
  var AiQuotaSchema = object({
@@ -10059,9 +9880,6 @@ var CreateWorkspaceInputSchema = object({
10059
9880
  });
10060
9881
  var OwnedCapacitySchema = object({
10061
9882
  planKey: string2().nullable(),
10062
- // `ownedWorkspaces` can be `UNLIMITED` (`Number.POSITIVE_INFINITY`), which
10063
- // `JSON.stringify` silently turns into `null` — nullable here so the contract
10064
- // states what the wire actually carries, and the handler converts explicitly.
10065
9883
  limit: number2().nullable(),
10066
9884
  used: number2(),
10067
9885
  overLimit: boolean2()
@@ -10096,11 +9914,6 @@ var WorkspaceSummarySchema = object({
10096
9914
  var publicTagged4 = base.route({ tags: ["Workspace"] });
10097
9915
  var tagged20 = publicTagged4.meta({ internal: true });
10098
9916
  var workspaceContract = {
10099
- /**
10100
- * Public, so an OAuth client can offer a workspace switcher: the chosen id goes
10101
- * back as `x-workspace-id`. An API key is pinned to one workspace, so it lists
10102
- * only that one.
10103
- */
10104
9917
  list: publicTagged4.route({ method: "GET", path: "/workspaces", summary: "List your workspaces" }).errors(authedErrors).output(array(WorkspaceSummarySchema)),
10105
9918
  getOwnedCapacity: tagged20.route({ method: "GET", path: "/workspaces/owned-capacity", summary: "Get owned workspace capacity" }).errors(authedErrors).output(OwnedCapacitySchema),
10106
9919
  create: tagged20.route({ method: "POST", path: "/workspaces", summary: "Create a workspace", successStatus: 201 }).errors({
@@ -10108,11 +9921,6 @@ var workspaceContract = {
10108
9921
  FORBIDDEN: { message: "You have reached your workspace capacity." },
10109
9922
  INTERNAL_SERVER_ERROR: { message: "Failed to create workspace." }
10110
9923
  }).input(CreateWorkspaceInputSchema).output(WorkspaceSchema),
10111
- /**
10112
- * Not org-scoped through `orgBase` — the caller may not have the target
10113
- * workspace active. Ownership is verified against the `organizationId` in
10114
- * the body, exactly as the tRPC procedure did.
10115
- */
10116
9924
  transferOwnership: tagged20.route({
10117
9925
  method: "POST",
10118
9926
  path: "/workspaces/{organizationId}/transfer-ownership",
@@ -12965,7 +12773,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
12965
12773
  }
12966
12774
 
12967
12775
  // src/version.ts
12968
- var CLI_VERSION = "0.1.54";
12776
+ var CLI_VERSION = "0.1.55";
12969
12777
 
12970
12778
  // src/client.ts
12971
12779
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";