kenso 0.1.108 → 0.1.109

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
@@ -2477,7 +2477,7 @@ var VERSION;
2477
2477
  var init_version = __esm({
2478
2478
  "src/core/version.ts"() {
2479
2479
  "use strict";
2480
- VERSION = true ? "0.1.108" : "0.0.0-dev";
2480
+ VERSION = true ? "0.1.109" : "0.0.0-dev";
2481
2481
  }
2482
2482
  });
2483
2483
 
@@ -14682,6 +14682,7 @@ var init_run2 = __esm({
14682
14682
  description: "this_month, last_month, this_quarter (default), last_quarter, this_year, last_year, last_30_days, last_90_days, a month (2026-03), a quarter (2026-Q1), a year (2026) or a day range (2026-03-01..2026-03-31)"
14683
14683
  },
14684
14684
  owner: { type: "string", description: "Only this member's deals (a member id)", aliases: ["owner-member-id"] },
14685
+ pipeline: { type: "string", description: "Only this pipeline's deals and stages (a pipeline id from kenso pipelines list)", aliases: ["pipeline-id"] },
14685
14686
  "time-zone": { type: "string", description: "IANA zone days start in when you have no app time zone (default UTC)" },
14686
14687
  full: { type: "boolean", description: "Print the API's whole answer instead of the table" }
14687
14688
  },
@@ -14689,6 +14690,7 @@ var init_run2 = __esm({
14689
14690
  examples: [
14690
14691
  "kenso reports run pipeline_by_stage",
14691
14692
  "kenso reports run won_by_month --period this_year --owner 41",
14693
+ "kenso reports run pipeline_by_stage --pipeline 6",
14692
14694
  "kenso reports run won_by_source_campaign --period 2026-Q4 --full"
14693
14695
  ],
14694
14696
  beta: { featureGates: { all: ["opportunities", "reports"] } },
@@ -14702,12 +14704,17 @@ var init_run2 = __esm({
14702
14704
  if (owner !== void 0 && !/^[1-9]\d*$/.test(owner)) {
14703
14705
  throw usageError(`--owner must be a member id (got "${owner}").`, { field: "owner", next: "kenso members list" });
14704
14706
  }
14707
+ const pipeline = typeof flags.pipeline === "string" ? flags.pipeline.trim() : void 0;
14708
+ if (pipeline !== void 0 && !/^[1-9]\d*$/.test(pipeline)) {
14709
+ throw usageError(`--pipeline must be a pipeline id (got "${pipeline}").`, { field: "pipeline", next: "kenso pipelines list" });
14710
+ }
14705
14711
  const res = await ctx.client.request({
14706
14712
  method: "GET",
14707
14713
  path: `/v1/reports/${report2}`,
14708
14714
  query: {
14709
14715
  period: typeof flags.period === "string" ? flags.period : void 0,
14710
14716
  ownerMemberId: owner,
14717
+ pipelineId: pipeline,
14711
14718
  timeZone: typeof flags["time-zone"] === "string" ? flags["time-zone"] : void 0
14712
14719
  },
14713
14720
  signal: ctx.signal
@@ -14760,10 +14767,11 @@ var init_summary = __esm({
14760
14767
  description: "this_month, last_month, this_quarter (default), last_quarter, this_year, last_year, last_30_days, last_90_days, a month (2026-03), a quarter (2026-Q1), a year (2026) or a day range (2026-03-01..2026-03-31)"
14761
14768
  },
14762
14769
  owner: { type: "string", description: "Only this member's deals (a member id)", aliases: ["owner-member-id"] },
14770
+ pipeline: { type: "string", description: "Only this pipeline's deals and stages (a pipeline id from kenso pipelines list)", aliases: ["pipeline-id"] },
14763
14771
  "time-zone": { type: "string", description: "IANA zone days start in when you have no app time zone (default UTC)" },
14764
14772
  full: { type: "boolean", description: "Print the API's whole answer instead of the rows" }
14765
14773
  },
14766
- examples: ["kenso reports summary", "kenso reports summary --period last_quarter --owner 41", "kenso reports summary --full"],
14774
+ examples: ["kenso reports summary", "kenso reports summary --period last_quarter --owner 41", "kenso reports summary --pipeline 6", "kenso reports summary --full"],
14767
14775
  beta: { featureGates: { all: ["opportunities", "reports"] } },
14768
14776
  operationIds: ["reports.summary"],
14769
14777
  async run(ctx, { flags }) {
@@ -14771,12 +14779,17 @@ var init_summary = __esm({
14771
14779
  if (owner !== void 0 && !/^[1-9]\d*$/.test(owner)) {
14772
14780
  throw usageError(`--owner must be a member id (got "${owner}").`, { field: "owner", next: "kenso members list" });
14773
14781
  }
14782
+ const pipeline = typeof flags.pipeline === "string" ? flags.pipeline.trim() : void 0;
14783
+ if (pipeline !== void 0 && !/^[1-9]\d*$/.test(pipeline)) {
14784
+ throw usageError(`--pipeline must be a pipeline id (got "${pipeline}").`, { field: "pipeline", next: "kenso pipelines list" });
14785
+ }
14774
14786
  const res = await ctx.client.request({
14775
14787
  method: "GET",
14776
14788
  path: "/v1/reports/summary",
14777
14789
  query: {
14778
14790
  period: typeof flags.period === "string" ? flags.period : void 0,
14779
14791
  ownerMemberId: owner,
14792
+ pipelineId: pipeline,
14780
14793
  timeZone: typeof flags["time-zone"] === "string" ? flags["time-zone"] : void 0
14781
14794
  },
14782
14795
  signal: ctx.signal