@postonus/cli 0.1.21 → 0.1.23

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
@@ -28,9 +28,9 @@ var PLAN_CONFIGS = {
28
28
  perPlatformMonthlyPosts: { TWITTER: 100 },
29
29
  mediaStorageGb: 10,
30
30
  vaCredits: 60,
31
- requestsPerMinute: 120,
32
- requestsPerMinutePerKey: 60,
33
- webRequestsPerMinute: 300,
31
+ requestsPerMinute: 600,
32
+ requestsPerMinutePerKey: 300,
33
+ webRequestsPerMinute: 600,
34
34
  features: [
35
35
  "Calendar & queue management",
36
36
  "Per-channel post overrides",
@@ -56,9 +56,9 @@ var PLAN_CONFIGS = {
56
56
  perPlatformMonthlyPosts: { TWITTER: 500 },
57
57
  mediaStorageGb: 50,
58
58
  vaCredits: 300,
59
- requestsPerMinute: 600,
60
- requestsPerMinutePerKey: 300,
61
- webRequestsPerMinute: 600,
59
+ requestsPerMinute: 1800,
60
+ requestsPerMinutePerKey: 900,
61
+ webRequestsPerMinute: 1200,
62
62
  features: [
63
63
  "Everything in Hobby, plus:",
64
64
  "Growth Autopilots (repurpose top posts across channels)",
@@ -82,9 +82,9 @@ var PLAN_CONFIGS = {
82
82
  mediaStorageGb: UNLIMITED,
83
83
  vaCredits: UNLIMITED,
84
84
  // Finite on purpose — see the `requestsPerMinute` doc comment.
85
- requestsPerMinute: 2e3,
86
- requestsPerMinutePerKey: 1e3,
87
- webRequestsPerMinute: 1200,
85
+ requestsPerMinute: 6e3,
86
+ requestsPerMinutePerKey: 3e3,
87
+ webRequestsPerMinute: 2400,
88
88
  features: ["Everything in Pro, plus:", "Onboarding call with founders", "Dedicated support"]
89
89
  }
90
90
  };
@@ -103,9 +103,9 @@ var TRIAL_PLAN_CONFIG = {
103
103
  perPlatformMonthlyPosts: { TWITTER: 0 },
104
104
  mediaStorageGb: 2,
105
105
  vaCredits: 30,
106
- requestsPerMinute: 120,
107
- requestsPerMinutePerKey: 60,
108
- webRequestsPerMinute: 300,
106
+ requestsPerMinute: 600,
107
+ requestsPerMinutePerKey: 300,
108
+ webRequestsPerMinute: 600,
109
109
  features: []
110
110
  };
111
111
  var PLAN_LABELS = {
@@ -8505,6 +8505,9 @@ var quotaErrors = {
8505
8505
  }
8506
8506
  };
8507
8507
  var badRequest = { BAD_REQUEST: { message: "Bad request." } };
8508
+ var stateConflict = {
8509
+ CONFLICT: { status: 409, message: "The workflow is not in a state that allows this." }
8510
+ };
8508
8511
  var MediaAttachmentSchema = object({
8509
8512
  id: Uuid,
8510
8513
  url: string2(),
@@ -8626,9 +8629,7 @@ var WorkflowSettingsSchema = object({
8626
8629
  });
8627
8630
  var UpdateWorkflowInputSchema = object({
8628
8631
  id: Uuid,
8629
- data: WorkflowSettingsSchema.partial().extend({
8630
- status: _enum(["DRAFT", "RUNNING", "PAUSED", "COMPLETED", "FAILED"]).optional()
8631
- })
8632
+ data: WorkflowSettingsSchema.partial()
8632
8633
  });
8633
8634
  var CapturedPostSchema = object({
8634
8635
  remoteId: string2().min(1),
@@ -8817,8 +8818,8 @@ var workflowsContract = {
8817
8818
  list: tagged13.route({ method: "GET", path: "/repurpose/workflows", summary: "List growth workflows" }).errors(orgErrors).output(array(GrowthWorkflowSchema)),
8818
8819
  get: tagged13.route({ method: "GET", path: "/repurpose/workflows/{id}", summary: "Get a growth workflow" }).errors(orgErrors).input(IdPathParam).output(GrowthWorkflowSchema),
8819
8820
  update: tagged13.route({ method: "PATCH", path: "/repurpose/workflows/{id}", summary: "Update a growth workflow" }).errors({ ...publishErrors, ...quotaErrors }).input(UpdateWorkflowInputSchema).output(GrowthWorkflowSchema),
8820
- pause: tagged13.route({ method: "POST", path: "/repurpose/workflows/{id}/pause", summary: "Pause a growth workflow" }).errors(writableErrors).input(object({ id: Uuid, reason: string2().optional() })).output(GrowthWorkflowSchema),
8821
- resume: tagged13.route({ method: "POST", path: "/repurpose/workflows/{id}/resume", summary: "Resume a paused growth workflow" }).errors({ ...publishErrors, ...quotaErrors }).input(object({ id: Uuid, resumeFromCursor: _enum(["old", "now"]) })).output(GrowthWorkflowSchema),
8821
+ pause: tagged13.route({ method: "POST", path: "/repurpose/workflows/{id}/pause", summary: "Pause a growth workflow" }).errors({ ...writableErrors, ...stateConflict }).input(object({ id: Uuid, reason: string2().optional() })).output(GrowthWorkflowSchema),
8822
+ resume: tagged13.route({ method: "POST", path: "/repurpose/workflows/{id}/resume", summary: "Resume a paused growth workflow" }).errors({ ...publishErrors, ...quotaErrors, ...stateConflict }).input(object({ id: Uuid, resumeFromCursor: _enum(["old", "now"]) })).output(GrowthWorkflowSchema),
8822
8823
  delete: tagged13.route({ method: "DELETE", path: "/repurpose/workflows/{id}", summary: "Delete a growth workflow" }).errors(orgErrors).input(IdPathParam).output(DeletedSchema),
8823
8824
  runNow: tagged13.route({
8824
8825
  method: "POST",
@@ -9118,7 +9119,10 @@ var CreateMessageInputSchema = object({
9118
9119
  var GetTicketInputSchema = object({ ticketId: TicketId });
9119
9120
  var ADMIN_TICKET_FILTER_VALUES = ["needs_response", "waiting", "stale", "resolved", "all"];
9120
9121
  var GetAdminTicketsInputSchema = object({ filter: _enum(ADMIN_TICKET_FILTER_VALUES).optional() });
9121
- var UpdateTicketStatusInputSchema = object({ ticketId: TicketId, status: SupportTicketStatusSchema });
9122
+ var UpdateTicketStatusInputSchema = object({
9123
+ ticketId: TicketId,
9124
+ status: _enum(["waiting_on_user", "resolved"])
9125
+ });
9122
9126
  var ticketErrors = { ...authedErrors, NOT_FOUND: { message: "Ticket not found." } };
9123
9127
  var internal5 = base.route({ tags: ["Support"] }).meta({ internal: true });
9124
9128
  var supportContract = {
@@ -9136,7 +9140,7 @@ var supportContract = {
9136
9140
  method: "PATCH",
9137
9141
  path: "/internal/support/admin/tickets/{ticketId}/status",
9138
9142
  summary: "Update a ticket\u2019s status"
9139
- }).errors(authedErrors).input(UpdateTicketStatusInputSchema).output(SupportTicketSchema)
9143
+ }).errors({ ...authedErrors, CONFLICT: { status: 409, message: "The ticket cannot move to that status." } }).input(UpdateTicketStatusInputSchema).output(SupportTicketSchema)
9140
9144
  };
9141
9145
 
9142
9146
  // ../../packages/api-contract/src/tags.ts
@@ -9408,6 +9412,17 @@ var ApprovalSettingsInputSchema = object({
9408
9412
  approverRoles: array(_enum(["owner", "admin", "member"])),
9409
9413
  minApprovers: number2().int().min(1).max(5)
9410
9414
  });
9415
+ var AlertWebhookSettingsSchema = object({
9416
+ url: string2().nullable(),
9417
+ notifyOnPublish: boolean2()
9418
+ });
9419
+ var UpdateAlertWebhookInputSchema = object({
9420
+ url: string2().url("Must be a valid HTTP or HTTPS URL").nullable().or(literal("")),
9421
+ notifyOnPublish: boolean2().default(false)
9422
+ });
9423
+ var TestAlertWebhookInputSchema = object({
9424
+ url: string2().url("Must be a valid HTTP or HTTPS URL")
9425
+ });
9411
9426
  var WorkspaceSummarySchema = object({
9412
9427
  id: string2(),
9413
9428
  name: string2(),
@@ -9446,7 +9461,21 @@ var workspaceContract = {
9446
9461
  }).input(TransferOwnershipInputSchema).output(SuccessSchema),
9447
9462
  updateApprovalSettings: tagged19.route({ method: "PATCH", path: "/workspaces/approval-settings", summary: "Update approval settings" }).errors(orgErrors).input(ApprovalSettingsInputSchema).output(SuccessSchema),
9448
9463
  getBrandVoice: tagged19.route({ method: "GET", path: "/workspaces/brand-voice", summary: "Get the workspace brand voice" }).errors(orgErrors).output(object({ voiceProfile: string2() })),
9449
- updateBrandVoice: tagged19.route({ method: "PATCH", path: "/workspaces/brand-voice", summary: "Update the workspace brand voice" }).errors(orgErrors).input(object({ voiceProfile: string2().max(2e3) })).output(SuccessSchema)
9464
+ updateBrandVoice: tagged19.route({ method: "PATCH", path: "/workspaces/brand-voice", summary: "Update the workspace brand voice" }).errors(orgErrors).input(object({ voiceProfile: string2().max(2e3) })).output(SuccessSchema),
9465
+ getAlertWebhook: tagged19.route({ method: "GET", path: "/workspaces/alert-webhook", summary: "Get workspace alert webhook settings" }).errors(orgErrors).output(AlertWebhookSettingsSchema),
9466
+ updateAlertWebhook: tagged19.route({ method: "PATCH", path: "/workspaces/alert-webhook", summary: "Update workspace alert webhook settings" }).errors({
9467
+ ...orgErrors,
9468
+ FORBIDDEN: { message: "Only workspace administrators can update alert webhook settings" }
9469
+ }).input(UpdateAlertWebhookInputSchema).output(SuccessSchema),
9470
+ testAlertWebhook: tagged19.route({
9471
+ method: "POST",
9472
+ path: "/workspaces/alert-webhook/test",
9473
+ summary: "Send a test notification to the webhook"
9474
+ }).errors({
9475
+ ...orgErrors,
9476
+ FORBIDDEN: { message: "Only workspace administrators can test alert webhook settings" },
9477
+ BAD_REQUEST: { message: "Failed to deliver test alert to the provided webhook URL" }
9478
+ }).input(TestAlertWebhookInputSchema).output(SuccessSchema)
9450
9479
  };
9451
9480
 
9452
9481
  // ../../packages/api-contract/src/contract.ts
@@ -9479,17 +9508,17 @@ var contract = {
9479
9508
  workspace: workspaceContract
9480
9509
  };
9481
9510
 
9482
- // ../../node_modules/.pnpm/@orpc+openapi@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/openapi/dist/shared/openapi.BwdtJjDu.mjs
9511
+ // ../../node_modules/.pnpm/@orpc+openapi@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/openapi/dist/shared/openapi.BwdtJjDu.mjs
9483
9512
  import { isORPCErrorStatus, fallbackORPCErrorStatus, fallbackORPCErrorMessage } from "@orpc/client";
9484
9513
  import { toHttpPath } from "@orpc/client/standard";
9485
9514
  import { fallbackContractConfig as fallbackContractConfig2, getEventIteratorSchemaDetails } from "@orpc/contract";
9486
9515
  import { standardizeHTTPPath, StandardOpenAPIJsonSerializer, getDynamicParams } from "@orpc/openapi-client/standard";
9487
9516
 
9488
- // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/server/dist/index.mjs
9517
+ // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/server/dist/index.mjs
9489
9518
  import { mergeErrorMap as mergeErrorMap2, mergeMeta, mergeRoute, mergePrefix as mergePrefix2, mergeTags, isContractProcedure as isContractProcedure2, getContractRouter, fallbackContractConfig } from "@orpc/contract";
9490
9519
  import { ValidationError as ValidationError2, eventIterator, type, validateORPCError as validateORPCError2 } from "@orpc/contract";
9491
9520
 
9492
- // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9521
+ // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9493
9522
  import { isContractProcedure, validateORPCError, ValidationError, mergePrefix, mergeErrorMap, enhanceRoute } from "@orpc/contract";
9494
9523
 
9495
9524
  // ../../node_modules/.pnpm/@orpc+shared@1.16.1_@opentelemetry+api@1.10.0/node_modules/@orpc/shared/dist/index.mjs
@@ -9749,7 +9778,7 @@ function overlayProxy(target, partial2) {
9749
9778
  return proxy;
9750
9779
  }
9751
9780
 
9752
- // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9781
+ // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9753
9782
  import { ORPCError, mapEventIterator } from "@orpc/client";
9754
9783
 
9755
9784
  // ../../node_modules/.pnpm/@orpc+standard-server@1.16.1_@opentelemetry+api@1.10.0/node_modules/@orpc/standard-server/dist/index.mjs
@@ -9898,7 +9927,7 @@ var HibernationEventIterator = class extends AsyncIteratorClass {
9898
9927
  }
9899
9928
  };
9900
9929
 
9901
- // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9930
+ // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/server/dist/shared/server.DEBcqOjg.mjs
9902
9931
  var LAZY_SYMBOL = /* @__PURE__ */ Symbol("ORPC_LAZY_SYMBOL");
9903
9932
  function lazy2(loader, meta2 = {}) {
9904
9933
  return {
@@ -10251,7 +10280,7 @@ async function resolveContractProcedures(options, callback) {
10251
10280
  }
10252
10281
  }
10253
10282
 
10254
- // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/server/dist/index.mjs
10283
+ // ../../node_modules/.pnpm/@orpc+server@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/server/dist/index.mjs
10255
10284
  import { toORPCError } from "@orpc/client";
10256
10285
  import { ORPCError as ORPCError2, isDefinedError, safe } from "@orpc/client";
10257
10286
  var DEFAULT_CONFIG = {
@@ -10646,7 +10675,7 @@ var TypeName;
10646
10675
  TypeName2["String"] = "string";
10647
10676
  })(TypeName || (TypeName = {}));
10648
10677
 
10649
- // ../../node_modules/.pnpm/@orpc+openapi@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/openapi/dist/shared/openapi.BwdtJjDu.mjs
10678
+ // ../../node_modules/.pnpm/@orpc+openapi@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/openapi/dist/shared/openapi.BwdtJjDu.mjs
10650
10679
  var OPERATION_EXTENDER_SYMBOL = /* @__PURE__ */ Symbol("ORPC_OPERATION_EXTENDER");
10651
10680
  function getCustomOpenAPIOperation(o) {
10652
10681
  return o[OPERATION_EXTENDER_SYMBOL];
@@ -11501,13 +11530,13 @@ ${errors.join("\n\n")}`
11501
11530
  }
11502
11531
  };
11503
11532
 
11504
- // ../../node_modules/.pnpm/@orpc+openapi@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/openapi/dist/index.mjs
11533
+ // ../../node_modules/.pnpm/@orpc+openapi@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/openapi/dist/index.mjs
11505
11534
  import { createORPCErrorFromJson } from "@orpc/client";
11506
11535
  import { StandardOpenAPISerializer, StandardOpenAPIJsonSerializer as StandardOpenAPIJsonSerializer2, StandardBracketNotationSerializer } from "@orpc/openapi-client/standard";
11507
11536
  import "@orpc/client/standard";
11508
11537
  import "@orpc/contract";
11509
11538
 
11510
- // ../../node_modules/.pnpm/@orpc+json-schema@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.0/node_modules/@orpc/json-schema/dist/index.mjs
11539
+ // ../../node_modules/.pnpm/@orpc+json-schema@1.16.1_@opentelemetry+api@1.10.0_ws@8.22.1/node_modules/@orpc/json-schema/dist/index.mjs
11511
11540
  var JsonSchemaXNativeType = /* @__PURE__ */ ((JsonSchemaXNativeType2) => {
11512
11541
  JsonSchemaXNativeType2["BigInt"] = "bigint";
11513
11542
  JsonSchemaXNativeType2["RegExp"] = "regexp";
@@ -11518,7 +11547,7 @@ var JsonSchemaXNativeType = /* @__PURE__ */ ((JsonSchemaXNativeType2) => {
11518
11547
  return JsonSchemaXNativeType2;
11519
11548
  })(JsonSchemaXNativeType || {});
11520
11549
 
11521
- // ../../node_modules/.pnpm/@orpc+zod@1.16.1_@opentelemetry+api@1.10.0_@orpc+contract@1.16.1_@opentelemetry+api@1.1_5e7190f497e0d8af82eb254f52223720/node_modules/@orpc/zod/dist/zod4/index.mjs
11550
+ // ../../node_modules/.pnpm/@orpc+zod@1.16.1_@opentelemetry+api@1.10.0_@orpc+contract@1.16.1_@opentelemetry+api@1.1_2308bc075ea90d1ee11574f662e35bd3/node_modules/@orpc/zod/dist/zod4/index.mjs
11522
11551
  var JSON_SCHEMA_REGISTRY = registry();
11523
11552
  var JSON_SCHEMA_INPUT_REGISTRY = registry();
11524
11553
  var JSON_SCHEMA_OUTPUT_REGISTRY = registry();
@@ -12125,7 +12154,7 @@ function formatTable(headers, rows) {
12125
12154
  }
12126
12155
 
12127
12156
  // src/version.ts
12128
- var CLI_VERSION = "0.1.21";
12157
+ var CLI_VERSION = "0.1.23";
12129
12158
 
12130
12159
  // src/client.ts
12131
12160
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";