@postonus/cli 0.1.48 → 0.1.50

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
@@ -262,6 +262,19 @@ var OUTREACH_SUPPRESSION_REASON_VALUES = [
262
262
  ];
263
263
  var OUTREACH_EVENT_KIND_VALUES = ["reply", "bounce", "unsubscribe"];
264
264
 
265
+ // ../../packages/app-config/src/clips.ts
266
+ var CLIP_JOB_FAILURE_CODES = [
267
+ "DOWNLOAD_FAILED",
268
+ "TRANSCRIBE_FAILED",
269
+ "NO_MOMENTS",
270
+ "ENCODE_FAILED",
271
+ "UPLOAD_FAILED",
272
+ "CAPTIONS_UNSUPPORTED",
273
+ "ENQUEUE_FAILED",
274
+ "STALE",
275
+ "UNKNOWN"
276
+ ];
277
+
265
278
  // src/index.ts
266
279
  import { Command, Option } from "commander";
267
280
 
@@ -7829,6 +7842,7 @@ var channelGroupsContract = {
7829
7842
  // ../../packages/api-contract/src/clips.ts
7830
7843
  var internal4 = base.meta({ internal: true });
7831
7844
  var ClipJobStatusSchema = _enum(["QUEUED", "PROCESSING", "DONE", "FAILED"]);
7845
+ var ClipJobFailureCodeSchema = _enum(CLIP_JOB_FAILURE_CODES);
7832
7846
  var ClipJobSchema = object({
7833
7847
  id: Uuid,
7834
7848
  organizationId: string2(),
@@ -7836,7 +7850,7 @@ var ClipJobSchema = object({
7836
7850
  sourceMediaId: Uuid.nullable(),
7837
7851
  youtubeUrl: string2().nullable(),
7838
7852
  status: ClipJobStatusSchema,
7839
- failureCode: string2().nullable(),
7853
+ failureCode: ClipJobFailureCodeSchema.nullable(),
7840
7854
  inputSeconds: number2().int().nullable(),
7841
7855
  creditsReserved: number2().int(),
7842
7856
  transcriptVendor: string2().nullable(),
@@ -7845,10 +7859,16 @@ var ClipJobSchema = object({
7845
7859
  createdAt: Timestamp,
7846
7860
  updatedAt: Timestamp
7847
7861
  });
7848
- var CreateClipJobInputSchema = object({
7849
- mediaId: Uuid.optional(),
7850
- youtubeUrl: string2().url().optional()
7851
- });
7862
+ var CreateClipJobInputSchema = union([
7863
+ object({
7864
+ mediaId: Uuid,
7865
+ youtubeUrl: never().optional()
7866
+ }),
7867
+ object({
7868
+ mediaId: never().optional(),
7869
+ youtubeUrl: string2().url()
7870
+ })
7871
+ ]);
7852
7872
  var ListClipsInputSchema = object({
7853
7873
  limit: coerce_exports.number().int().min(1).max(100).default(20).optional()
7854
7874
  });
@@ -8169,6 +8189,8 @@ var CompleteUploadOutputSchema = object({
8169
8189
  publicUrl: string2(),
8170
8190
  idempotent: boolean2(),
8171
8191
  mediaId: Uuid.nullable(),
8192
+ type: MediaTypeSchema.optional(),
8193
+ bytes: number2().int().optional(),
8172
8194
  variants: MediaVariantsSchema.nullable(),
8173
8195
  variantsStatus: MediaVariantsStatusSchema.nullable(),
8174
8196
  /** Set only by scenarios that change something the client renders immediately (`user_avatar`). */
@@ -8183,7 +8205,8 @@ var FromUrlOutputSchema = object({
8183
8205
  uploadId: Uuid,
8184
8206
  mediaId: Uuid.nullable(),
8185
8207
  publicUrl: string2(),
8186
- type: MediaTypeSchema
8208
+ type: MediaTypeSchema,
8209
+ bytes: number2().int().optional()
8187
8210
  });
8188
8211
  var tagged9 = base.route({ tags: ["Uploads"] });
8189
8212
  var uploadContract = {
@@ -8472,8 +8495,12 @@ var ThreadFields = {
8472
8495
  };
8473
8496
  var SharedPostFields = {
8474
8497
  selectedIntegrations: array(string2()).optional(),
8475
- integrationContent: record(string2(), string2()).optional(),
8476
- integrationFirstComment: record(string2(), string2()).optional(),
8498
+ integrationContent: record(string2(), string2().trim().max(DRAFT_MAX_CHARS)).refine((val) => Object.keys(val).length <= PLATFORM_VALUES.length, {
8499
+ message: `At most ${PLATFORM_VALUES.length} platform copy overrides allowed`
8500
+ }).optional(),
8501
+ integrationFirstComment: record(string2(), string2().trim().max(DRAFT_MAX_CHARS)).refine((val) => Object.keys(val).length <= PLATFORM_VALUES.length, {
8502
+ message: `At most ${PLATFORM_VALUES.length} platform first comment overrides allowed`
8503
+ }).optional(),
8477
8504
  integrationSettings: IntegrationSettingsInputSchema.optional(),
8478
8505
  subreddit: string2().trim().min(1).optional(),
8479
8506
  xLinkHandling: _enum(["first_reply", "plain_text", "keep_live"]).optional(),
@@ -8582,7 +8609,7 @@ var AddChannelsInputSchema = object({
8582
8609
  var RetryScheduleInputSchema = object({
8583
8610
  scheduleId: Uuid,
8584
8611
  /** Replacement copy for this channel only. Omitted leaves it as it was. */
8585
- content: string2().trim().optional(),
8612
+ content: string2().trim().max(DRAFT_MAX_CHARS).optional(),
8586
8613
  /**
8587
8614
  * Which of the post's existing attachments this channel publishes, in order.
8588
8615
  * Must be a subset of what the post already has: adding media would mean
@@ -12919,7 +12946,7 @@ function formatTable(headers, rows, isTty = process.stdout.isTTY) {
12919
12946
  }
12920
12947
 
12921
12948
  // src/version.ts
12922
- var CLI_VERSION = "0.1.48";
12949
+ var CLI_VERSION = "0.1.50";
12923
12950
 
12924
12951
  // src/client.ts
12925
12952
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";