@togglhq/cli 1.5.72 → 1.5.74

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/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as CommanderError, t as createProgram } from "./program-BZvMwzzd.js";
2
+ import { n as CommanderError, t as createProgram } from "./program-DNWUtfQL.js";
3
3
  //#region src/cli.ts
4
4
  try {
5
5
  await createProgram({ enableUpdateNotification: true }).parseAsync(process.argv);
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-BZvMwzzd.js";
1
+ import { t as createProgram } from "./program-DNWUtfQL.js";
2
2
  export { createProgram };
@@ -5643,6 +5643,27 @@ function regex(requirement, message$1) {
5643
5643
  };
5644
5644
  }
5645
5645
  /**
5646
+ * Creates a custom transformation action.
5647
+ *
5648
+ * @param operation The transformation operation.
5649
+ *
5650
+ * @returns A transform action.
5651
+ */
5652
+ /* @__NO_SIDE_EFFECTS__ */
5653
+ function transform(operation) {
5654
+ return {
5655
+ kind: "transformation",
5656
+ type: "transform",
5657
+ reference: transform,
5658
+ async: false,
5659
+ operation,
5660
+ "~run"(dataset) {
5661
+ dataset.value = this.operation(dataset.value);
5662
+ return dataset;
5663
+ }
5664
+ };
5665
+ }
5666
+ /**
5646
5667
  * Returns the fallback value of the schema.
5647
5668
  *
5648
5669
  * @param schema The schema to get it from.
@@ -10594,7 +10615,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
10594
10615
  ]))
10595
10616
  });
10596
10617
  //#endregion
10597
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10618
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10598
10619
  async function getInvitations(httpClient, signal) {
10599
10620
  return (await httpClient.get(`invitations`, { signal })).json();
10600
10621
  }
@@ -10611,7 +10632,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
10611
10632
  return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
10612
10633
  }
10613
10634
  //#endregion
10614
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/org/utils/requests.mjs
10635
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/org/utils/requests.mjs
10615
10636
  function buildSearchParams$1(params, flattenArrays = false) {
10616
10637
  const searchParams = new URLSearchParams();
10617
10638
  Object.entries(params).forEach(([key, value]) => {
@@ -10623,7 +10644,7 @@ function buildSearchParams$1(params, flattenArrays = false) {
10623
10644
  return searchParams;
10624
10645
  }
10625
10646
  //#endregion
10626
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
10647
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
10627
10648
  async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
10628
10649
  return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
10629
10650
  }
@@ -10637,7 +10658,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
10637
10658
  return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
10638
10659
  }
10639
10660
  //#endregion
10640
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
10661
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
10641
10662
  async function getWorkspaces(httpClient, organization_id, signal) {
10642
10663
  return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
10643
10664
  }
@@ -10666,7 +10687,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
10666
10687
  });
10667
10688
  const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
10668
10689
  //#endregion
10669
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
10690
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
10670
10691
  const META_SYMBOL = Symbol.for("querygen:response:meta");
10671
10692
  function withResponseMeta(data, headers, status) {
10672
10693
  if (!data) return data;
@@ -10693,7 +10714,7 @@ function buildSearchParams(params, flattenArrays = false) {
10693
10714
  return searchParams;
10694
10715
  }
10695
10716
  //#endregion
10696
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
10717
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
10697
10718
  async function getPublicHolidays(httpClient, year, { country } = {}, signal) {
10698
10719
  const response = await httpClient.get(`shared_data/api/publicholidays/${year}`, {
10699
10720
  signal,
@@ -10702,12 +10723,12 @@ async function getPublicHolidays(httpClient, year, { country } = {}, signal) {
10702
10723
  return withResponseMeta(await response.json(), response.headers, response.status);
10703
10724
  }
10704
10725
  //#endregion
10705
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
10726
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
10706
10727
  async function getStatus(httpClient, signal) {
10707
10728
  return (await httpClient.get(`shared_data/api/status`, { signal })).json();
10708
10729
  }
10709
10730
  //#endregion
10710
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
10731
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
10711
10732
  async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
10712
10733
  return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
10713
10734
  signal,
@@ -10735,7 +10756,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
10735
10756
  return response.json();
10736
10757
  }
10737
10758
  //#endregion
10738
- //#region ../../node_modules/.pnpm/@toggl+queries@1.1.70_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_441c0f03757207fd8f9f9ad7c69ceb10/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
10759
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.1.6_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_react_7a603e71e3f11edb83d2f732adabc6c4/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
10739
10760
  async function getMyWorkingHours(httpClient, organization_id, signal) {
10740
10761
  return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
10741
10762
  }
@@ -10889,8 +10910,8 @@ function parseOptionalInt(value) {
10889
10910
  return Number.isFinite(n) ? n : void 0;
10890
10911
  }
10891
10912
  function toNumberArray(value) {
10892
- const n = parseOptionalInt(value);
10893
- return n === void 0 ? void 0 : [n];
10913
+ const parsed = (Array.isArray(value) ? value : [value]).map(parseOptionalInt).filter((parsedValue) => parsedValue !== void 0);
10914
+ return parsed.length > 0 ? parsed : void 0;
10894
10915
  }
10895
10916
  function validationErrorMessage(issues) {
10896
10917
  return issues.map((issue) => issue.message ?? "invalid").join("; ");
@@ -11088,16 +11109,17 @@ var FocusClient = class {
11088
11109
  const page = parseOptionalInt(params.page);
11089
11110
  const per_page = parseOptionalInt(params.per_page);
11090
11111
  const project_id = toNumberArray(params.project_id);
11112
+ const tag_id = toNumberArray(params.tag_id);
11091
11113
  const status_id = toNumberArray(params.status_id);
11092
11114
  const parent_task_id = toNumberArray(params.parent_task_id);
11093
11115
  const assigneeUserId = parseOptionalInt(params.assignee_user_id);
11094
11116
  const assignee_user_id = assigneeUserId === void 0 ? void 0 : [assigneeUserId];
11095
- const priorityValue = params.priority;
11096
- const priority = priorityValue === void 0 ? void 0 : [priorityValue];
11117
+ const priority = params.priority === void 0 ? void 0 : [params.priority];
11097
11118
  const response = await this.run("listTasks", () => getTasksClassic(this.http, this.organizationIdNum, this.workspaceIdNum, {
11098
11119
  page,
11099
11120
  per_page,
11100
11121
  project_id,
11122
+ tag_id,
11101
11123
  status_id,
11102
11124
  parent_task_id,
11103
11125
  name: typeof params.name === "string" ? params.name : void 0,
@@ -12474,11 +12496,12 @@ async function runSkillSetup(options) {
12474
12496
  });
12475
12497
  }
12476
12498
  //#endregion
12477
- //#region ../operations/build/safety-CP4kPImt.js
12499
+ //#region ../operations/build/safety-PA22Wppt.js
12478
12500
  const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
12479
12501
  const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
12480
12502
  const dateField = (description) => /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ regex(DATE_FIELD_RE, "must be YYYY-MM-DD or RFC3339 datetime (e.g. '2025-01-01' or '2025-01-01T00:00:00Z')"), /* @__PURE__ */ description$1(description));
12481
12503
  const apiDateTimeString = /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoTimestamp());
12504
+ const tagIdFilterSchema = /* @__PURE__ */ union([/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ transform((tagId) => [tagId])), /* @__PURE__ */ pipe$2(/* @__PURE__ */ array$1(/* @__PURE__ */ number$2()), /* @__PURE__ */ minLength$1(1))]);
12482
12505
  const timeBlockListSchema = /* @__PURE__ */ object$2({
12483
12506
  date_from: dateField("Range start — date-only (e.g. '2025-01-01') or RFC3339 datetime. Date-only is expanded to T00:00:00Z."),
12484
12507
  date_to: dateField("Range end — date-only (e.g. '2025-01-07') or RFC3339 datetime. Date-only is expanded to T23:59:59Z."),
@@ -12507,6 +12530,7 @@ const taskListSchema = /* @__PURE__ */ object$2({
12507
12530
  name: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("Filter by task name (partial match)"))),
12508
12531
  status_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by status ID"))),
12509
12532
  project_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by project ID"))),
12533
+ tag_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(tagIdFilterSchema, /* @__PURE__ */ description$1("Filter by tag IDs"))),
12510
12534
  assignee_user_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Filter by assignee user ID"))),
12511
12535
  priority: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ picklist$1([
12512
12536
  "none",
@@ -20446,7 +20470,7 @@ const generatedFocusOperations = [
20446
20470
  per_page: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20447
20471
  recurring_task_ids: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20448
20472
  start_date: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1())),
20449
- tag_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20473
+ tag_id: /* @__PURE__ */ optional$1(tagIdFilterSchema),
20450
20474
  team_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2())
20451
20475
  }),
20452
20476
  execute: (input, { client }) => {
@@ -20512,7 +20536,7 @@ const generatedFocusOperations = [
20512
20536
  start_date_to: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20513
20537
  state: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20514
20538
  status_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20515
- tag_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20539
+ tag_id: /* @__PURE__ */ optional$1(tagIdFilterSchema),
20516
20540
  team_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20517
20541
  time_block_completed: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20518
20542
  time_block_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
@@ -20555,7 +20579,7 @@ const generatedFocusOperations = [
20555
20579
  per_page: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20556
20580
  source: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20557
20581
  status_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20558
- tag_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20582
+ tag_id: /* @__PURE__ */ optional$1(tagIdFilterSchema),
20559
20583
  task_id: /* @__PURE__ */ number$2(),
20560
20584
  team_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2())
20561
20585
  }),
@@ -20596,7 +20620,7 @@ const generatedFocusOperations = [
20596
20620
  per_page: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20597
20621
  source: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20598
20622
  status_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20599
- tag_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20623
+ tag_id: /* @__PURE__ */ optional$1(tagIdFilterSchema),
20600
20624
  task_id: /* @__PURE__ */ number$2(),
20601
20625
  team_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2())
20602
20626
  }),
@@ -20654,7 +20678,7 @@ const generatedFocusOperations = [
20654
20678
  start_date_from: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20655
20679
  start_date_to: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20656
20680
  status_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20657
- tag_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2()),
20681
+ tag_id: /* @__PURE__ */ optional$1(tagIdFilterSchema),
20658
20682
  tasks_per_group: /* @__PURE__ */ optional$1(/* @__PURE__ */ unknown$1()),
20659
20683
  team_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2())
20660
20684
  }),
@@ -25119,4 +25143,4 @@ Common commands:
25119
25143
  //#endregion
25120
25144
  export { CommanderError as n, createProgram as t };
25121
25145
 
25122
- //# sourceMappingURL=program-BZvMwzzd.js.map
25146
+ //# sourceMappingURL=program-DNWUtfQL.js.map
package/build/program.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-BZvMwzzd.js";
1
+ import { t as createProgram } from "./program-DNWUtfQL.js";
2
2
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/cli",
3
- "version": "1.5.72",
3
+ "version": "1.5.74",
4
4
  "description": "Toggl CLI for Toggl 2.0 API operations.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -55,7 +55,7 @@
55
55
  "devDependencies": {
56
56
  "@toggl/cli-core": "workspace:^",
57
57
  "@toggl/operations": "workspace:^",
58
- "@toggl/queries": "1.1.70",
58
+ "@toggl/queries": "2.1.6",
59
59
  "@types/node": "22.19.11",
60
60
  "tsdown": "0.21.8",
61
61
  "typescript": "5.9.3",