kenso 0.1.167 → 0.1.169

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/kenso.js CHANGED
@@ -3422,7 +3422,7 @@ var VERSION;
3422
3422
  var init_version = __esm({
3423
3423
  "src/core/version.ts"() {
3424
3424
  "use strict";
3425
- VERSION = true ? "0.1.167" : "0.0.0-dev";
3425
+ VERSION = true ? "0.1.169" : "0.0.0-dev";
3426
3426
  }
3427
3427
  });
3428
3428
 
@@ -14245,6 +14245,22 @@ async function quoteKind(ctx, kind, flags) {
14245
14245
  if (campaignId !== void 0) body2.campaignId = campaignId;
14246
14246
  const result = await creditEstimate(ctx, body2);
14247
14247
  if (result.estimateError) throw estimateFailed(result.estimateError);
14248
+ if (kind === "capacity") {
14249
+ const c = result.estimate?.capacity ?? null;
14250
+ ctx.output.object({
14251
+ capacity: c && {
14252
+ depth: c.depth,
14253
+ leadsPerMonth: c.leadsPerMonth ?? null,
14254
+ covered: c.covered ?? null,
14255
+ coveredLeadsPerMonth: c.coveredLeadsPerMonth,
14256
+ limitedBy: c.limitedBy ?? null,
14257
+ planMonthlyCredits: toCredits(c.planMonthlyMillicredits),
14258
+ extraCredits: toCredits(c.extraMillicredits),
14259
+ aiLimitPercent: c.aiLimitPercent ?? null
14260
+ }
14261
+ });
14262
+ return ExitCode.Ok;
14263
+ }
14248
14264
  const lines = result.estimate?.lines ?? [];
14249
14265
  ctx.output.object({
14250
14266
  credits: result.credits,
@@ -14293,24 +14309,28 @@ var init_quote = __esm({
14293
14309
  init_input();
14294
14310
  init_columns();
14295
14311
  init_common();
14296
- KINDS2 = ["campaign", "build", "infra", "accounts", "leads", "places", "committee_mapping", "account_research"];
14312
+ KINDS2 = ["campaign", "build", "infra", "accounts", "leads", "places", "committee_mapping", "account_research", "capacity"];
14297
14313
  COUNT_FIELD = {
14298
14314
  campaign: "targetLeads",
14299
14315
  accounts: "accountCount",
14300
14316
  leads: "leadCount",
14301
14317
  places: "pages",
14302
14318
  committee_mapping: "accountCount",
14303
- account_research: "accountCount"
14319
+ account_research: "accountCount",
14320
+ capacity: "leadsPerMonth"
14304
14321
  };
14305
14322
  command26 = {
14306
14323
  resource: "credits",
14307
14324
  action: "quote",
14308
14325
  summary: "Estimate the credits a job or a workflow run would take, against what you have",
14309
- description: "--kind prices a job through POST /v1/credits/estimates: campaign (--count is the leads it should finish with, or --campaign-id), accounts (--count accounts), leads (--count leads), places (--count pages), committee_mapping and account_research (--count accounts: mapping the buying committee, refreshing research), build and infra (their fields in --data). --workflow <id or file> --records <n> prices a workflow run through POST /v1/workflow-estimates, per record and in total. Both print credits {needed, available, sufficient}. Nothing is charged. One action's price: kenso credits rate-card --action <name>.",
14326
+ description: "--kind prices a job through POST /v1/credits/estimates: campaign (--count is the leads it should finish with, or --campaign-id), accounts (--count accounts), leads (--count leads), places (--count pages), committee_mapping and account_research (--count accounts: mapping the buying committee, refreshing research), capacity (--count is a goal in leads a month; leave it out to ask how many leads a month the plan covers; depth in --data), build and infra (their fields in --data). --workflow <id or file> --records <n> prices a workflow run through POST /v1/workflow-estimates, per record and in total. Both print credits {needed, available, sufficient}, except capacity, which prints what the plan covers against its monthly credits, not the balance. Nothing is charged. One action's price: kenso credits rate-card --action <name>.",
14310
14327
  effect: "read",
14311
14328
  flags: {
14312
- kind: { type: "string", description: "campaign, build, infra, accounts, leads, places, committee_mapping or account_research" },
14313
- count: { type: "string", description: "The kind's count: leads (campaign, leads), accounts (accounts, committee_mapping, account_research), or pages (places)" },
14329
+ kind: { type: "string", description: "campaign, build, infra, accounts, leads, places, committee_mapping, account_research or capacity" },
14330
+ count: {
14331
+ type: "string",
14332
+ description: "The kind's count: leads (campaign, leads), accounts (accounts, committee_mapping, account_research), pages (places), or leads a month (capacity)"
14333
+ },
14314
14334
  "campaign-id": { type: "string", description: "campaign: price this campaign's limit, steps and personalization" },
14315
14335
  data: { type: "string", description: "The kind's other fields as JSON, @file or - (infra items, sequenceSteps, depth)" },
14316
14336
  workflow: { type: "string", description: "A workflow id, or a workflow file priced as written" },
@@ -14319,6 +14339,7 @@ var init_quote = __esm({
14319
14339
  examples: [
14320
14340
  "kenso credits quote --kind leads --count 500",
14321
14341
  "kenso credits quote --kind campaign --campaign-id 812",
14342
+ "kenso credits quote --kind capacity --count 3000",
14322
14343
  "kenso credits quote --workflow 412 --records 200",
14323
14344
  "kenso credits quote --workflow qualify.workflow.json --records 50"
14324
14345
  ],