@togglhq/cli 1.11.144 → 1.11.146

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 { a as CommanderError, i as shutdownCliTelemetry, n as captureCliException, r as initCliTelemetry, t as createProgram } from "./program-BEO-4L3J.js";
2
+ import { a as CommanderError, i as shutdownCliTelemetry, n as captureCliException, r as initCliTelemetry, t as createProgram } from "./program-_hHKpj_k.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
package/build/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-BEO-4L3J.js";
1
+ import { t as createProgram } from "./program-_hHKpj_k.js";
2
2
  export { createProgram };
@@ -7796,7 +7796,8 @@ const OrganizationUserResponseSchema = /* @__PURE__ */ object({
7796
7796
  work_role_id: /* @__PURE__ */ number(),
7797
7797
  workspace_user_id: /* @__PURE__ */ number()
7798
7798
  })),
7799
- custom_field_values: /* @__PURE__ */ optional(/* @__PURE__ */ array(CustomFieldValueSchema))
7799
+ custom_field_values: /* @__PURE__ */ optional(/* @__PURE__ */ array(CustomFieldValueSchema)),
7800
+ has_calendar_integration: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("HasCalendarIntegration is true when the member has a calendar connected in Focus. The field is present only when the request sets include_calendar_integration to true and the calendar lookup succeeded. The field is absent when the lookup failed. Absent means unknown. It does not mean false. A member who connected a calendar in another product stays false here until they open the Focus calendar integrations page.")))
7800
7801
  });
7801
7802
  const ProjectBulkArchivePayloadSchema = /* @__PURE__ */ object({ project_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
7802
7803
  const ProjectBulkRestorePayloadSchema = /* @__PURE__ */ object({ project_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
@@ -9892,7 +9893,7 @@ async function getOrganizationTeamsClassic(httpClient, organization_id, { worksp
9892
9893
  })
9893
9894
  }).json();
9894
9895
  }
9895
- async function getOrganizationUsersClassic(httpClient, organization_id, { workspaces, user_account_ids, org_user_ids, groups, toggl_products, active_status, roles, only_admins, filter, sort_dir, page, per_page, tag_ids, include_working_hours, include_rates, pinned_ids, has_group, cf_filter, include_custom_fields } = {}, signal) {
9896
+ async function getOrganizationUsersClassic(httpClient, organization_id, { workspaces, user_account_ids, org_user_ids, groups, toggl_products, active_status, roles, only_admins, filter, sort_dir, page, per_page, tag_ids, include_working_hours, include_rates, pinned_ids, has_group, cf_filter, include_custom_fields, include_calendar_integration } = {}, signal) {
9896
9897
  const response = await httpClient.get(`organizations/${organization_id}/users`, {
9897
9898
  signal,
9898
9899
  searchParams: buildSearchParams$2({
@@ -9914,7 +9915,8 @@ async function getOrganizationUsersClassic(httpClient, organization_id, { worksp
9914
9915
  pinned_ids,
9915
9916
  has_group,
9916
9917
  cf_filter,
9917
- include_custom_fields
9918
+ include_custom_fields,
9919
+ include_calendar_integration
9918
9920
  }, true)
9919
9921
  });
9920
9922
  return withResponseMeta(await response.json(), response.headers, response.status);
@@ -10777,7 +10779,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
10777
10779
  ]))
10778
10780
  });
10779
10781
  //#endregion
10780
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10782
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
10781
10783
  async function getInvitations(httpClient, signal) {
10782
10784
  return (await httpClient.get(`invitations`, { signal })).json();
10783
10785
  }
@@ -10794,7 +10796,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
10794
10796
  return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
10795
10797
  }
10796
10798
  //#endregion
10797
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/org/utils/requests.mjs
10799
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/org/utils/requests.mjs
10798
10800
  function buildSearchParams(params, flattenArrays = false) {
10799
10801
  const searchParams = new URLSearchParams();
10800
10802
  Object.entries(params).forEach(([key, value]) => {
@@ -10806,7 +10808,7 @@ function buildSearchParams(params, flattenArrays = false) {
10806
10808
  return searchParams;
10807
10809
  }
10808
10810
  //#endregion
10809
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
10811
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
10810
10812
  async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
10811
10813
  return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
10812
10814
  }
@@ -10820,7 +10822,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
10820
10822
  return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
10821
10823
  }
10822
10824
  //#endregion
10823
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
10825
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
10824
10826
  async function getWorkspaces(httpClient, organization_id, signal) {
10825
10827
  return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
10826
10828
  }
@@ -10829,7 +10831,7 @@ async function getWorkspaceUserMeRoles(httpClient, organization_id, workspace_id
10829
10831
  }
10830
10832
  const WorkingHoursCreateInputSchema = /* @__PURE__ */ object$2({
10831
10833
  working_hours: /* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ maxValue$1(168)),
10832
- starting_hours: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ maxValue$1(24))),
10834
+ starting_hours: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ minValue$1(0), /* @__PURE__ */ maxValue$1(24))),
10833
10835
  weekday: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ minValue$1(0), /* @__PURE__ */ maxValue$1(6)))
10834
10836
  });
10835
10837
  const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
@@ -10840,7 +10842,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
10840
10842
  });
10841
10843
  const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
10842
10844
  //#endregion
10843
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
10845
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
10844
10846
  async function holidayListDates(httpClient, organization_id, { year, country }, signal) {
10845
10847
  return (await httpClient.get(`holidays/organizations/${organization_id}/calendar/dates`, {
10846
10848
  signal,
@@ -10851,12 +10853,12 @@ async function holidayListDates(httpClient, organization_id, { year, country },
10851
10853
  })).json();
10852
10854
  }
10853
10855
  //#endregion
10854
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
10856
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
10855
10857
  async function getStatus(httpClient, signal) {
10856
10858
  return (await httpClient.get(`shared_data/api/status`, { signal })).json();
10857
10859
  }
10858
10860
  //#endregion
10859
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
10861
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
10860
10862
  async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
10861
10863
  return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
10862
10864
  signal,
@@ -10884,7 +10886,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
10884
10886
  return response.json();
10885
10887
  }
10886
10888
  //#endregion
10887
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.124_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_969a045e6e4f645cea4cd5f88b441655/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
10889
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.125_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_dd41a645f19849b5a4873ff5ff27ddc4/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
10888
10890
  async function getMyWorkingHours(httpClient, organization_id, signal) {
10889
10891
  return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
10890
10892
  }
@@ -15103,6 +15105,9 @@ async function dismissATemplateEstimateSuggestion(httpClient, organization_id, w
15103
15105
  }
15104
15106
  //#endregion
15105
15107
  //#region ../focus-queries/dist/reports/requests.ts
15108
+ async function getForecastAvailability(httpClient, workspace_id, signal) {
15109
+ return await httpClient.get(`reports/workspaces/${workspace_id}/forecast-availability`, { signal }).json();
15110
+ }
15106
15111
  async function getProfitabilityReport(httpClient, workspace_id, data, response_format, include_dicts, xTogglReportExport, signal) {
15107
15112
  return await httpClient.post(`reports/workspaces/${workspace_id}/profitability`, {
15108
15113
  signal,
@@ -15548,6 +15553,21 @@ async function upsertTimeEntryConstraints(httpClient, workspace_id, data, signal
15548
15553
  }).json();
15549
15554
  }
15550
15555
  //#endregion
15556
+ //#region ../focus-queries/dist/time-entry-groups/requests.ts
15557
+ async function getTimeEntryGroupsUsersClassic(httpClient, organization_id, workspace_id, { start_date, end_date, user_id, page, per_page, order_by }, signal) {
15558
+ return await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/time-entries/groups/users`, {
15559
+ signal,
15560
+ searchParams: buildSearchParams$2({
15561
+ start_date,
15562
+ end_date,
15563
+ user_id,
15564
+ page,
15565
+ per_page,
15566
+ order_by
15567
+ })
15568
+ }).json();
15569
+ }
15570
+ //#endregion
15551
15571
  //#region ../focus-queries/dist/time-off/requests.ts
15552
15572
  async function getTimeoffsByUserIds(httpClient, organization_id, { user_id, start_date, end_date }, signal) {
15553
15573
  return await httpClient.get(`organizations/${organization_id}/timeoff`, {
@@ -20598,6 +20618,28 @@ const generatedFocusOperations = [
20598
20618
  ]));
20599
20619
  }
20600
20620
  },
20621
+ {
20622
+ id: "focus.reports.get-forecast-availability",
20623
+ family: "focus",
20624
+ resource: "reports",
20625
+ action: "get-forecast-availability",
20626
+ title: "Get Forecast Availability Reports",
20627
+ description: "Get Forecast Availability Reports.",
20628
+ safety: "read",
20629
+ destructive: false,
20630
+ cli: {
20631
+ group: ["reports"],
20632
+ command: "get-forecast-availability",
20633
+ interactive: "hidden"
20634
+ },
20635
+ mcp: { entityTool: "reports" },
20636
+ inputSchema: /* @__PURE__ */ looseObject({}),
20637
+ execute: (_input, { client }) => client.runGeneratedRequest("getForecastAvailability", () => callGeneratedRequest(getForecastAvailability, [
20638
+ client.httpClient,
20639
+ client.workspaceIdNumber,
20640
+ void 0
20641
+ ]))
20642
+ },
20601
20643
  {
20602
20644
  id: "focus.reports.get-profitability",
20603
20645
  family: "focus",
@@ -24258,6 +24300,40 @@ const generatedFocusOperations = [
24258
24300
  ]));
24259
24301
  }
24260
24302
  },
24303
+ {
24304
+ id: "focus.time-entries.groups-get-users",
24305
+ family: "focus",
24306
+ resource: "time-entries",
24307
+ action: "groups-get-users",
24308
+ title: "Groups Get Users Time Entries",
24309
+ description: "Groups Get Users Time Entries.",
24310
+ safety: "read",
24311
+ destructive: false,
24312
+ cli: {
24313
+ group: ["time-entries", "groups"],
24314
+ command: "get-users",
24315
+ interactive: "hidden"
24316
+ },
24317
+ mcp: { entityTool: "time-entries" },
24318
+ inputSchema: /* @__PURE__ */ looseObject({
24319
+ end_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
24320
+ order_by: /* @__PURE__ */ unknown$1(),
24321
+ page: /* @__PURE__ */ number$2(),
24322
+ per_page: /* @__PURE__ */ unknown$1(),
24323
+ start_date: /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ isoDate$1()),
24324
+ user_id: /* @__PURE__ */ number$2()
24325
+ }),
24326
+ execute: (input, { client }) => {
24327
+ const data = input;
24328
+ return client.runGeneratedRequest("getTimeEntryGroupsUsersClassic", () => callGeneratedRequest(getTimeEntryGroupsUsersClassic, [
24329
+ client.httpClient,
24330
+ client.organizationId,
24331
+ client.workspaceIdNumber,
24332
+ data,
24333
+ void 0
24334
+ ]));
24335
+ }
24336
+ },
24261
24337
  {
24262
24338
  id: "focus.time-entries.list",
24263
24339
  family: "focus",
@@ -27818,4 +27894,4 @@ Common commands:
27818
27894
  //#endregion
27819
27895
  export { CommanderError as a, shutdownCliTelemetry as i, captureCliException as n, initCliTelemetry as r, createProgram as t };
27820
27896
 
27821
- //# sourceMappingURL=program-BEO-4L3J.js.map
27897
+ //# sourceMappingURL=program-_hHKpj_k.js.map
package/build/program.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-BEO-4L3J.js";
1
+ import { t as createProgram } from "./program-_hHKpj_k.js";
2
2
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/cli",
3
- "version": "1.11.144",
3
+ "version": "1.11.146",
4
4
  "description": "Toggl CLI for Toggl 2.0 API operations.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@toggl/cli-core": "workspace:^",
58
58
  "@toggl/operations": "workspace:^",
59
- "@toggl/queries": "2.2.124",
59
+ "@toggl/queries": "2.2.125",
60
60
  "@types/node": "22.19.11",
61
61
  "tsdown": "0.21.8",
62
62
  "typescript": "5.9.3",