@togglhq/cli 1.13.188 → 1.13.189

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-oSNYpKl6.js";
2
+ import { a as CommanderError, i as shutdownCliTelemetry, n as captureCliException, r as initCliTelemetry, t as createProgram } from "./program-CNNJYSfa.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-oSNYpKl6.js";
1
+ import { t as createProgram } from "./program-CNNJYSfa.js";
2
2
  export { createProgram };
@@ -11116,7 +11116,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
11116
11116
  ]))
11117
11117
  });
11118
11118
  //#endregion
11119
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
11119
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
11120
11120
  async function getInvitations(httpClient, signal) {
11121
11121
  return (await httpClient.get(`invitations`, { signal })).json();
11122
11122
  }
@@ -11133,7 +11133,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
11133
11133
  return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
11134
11134
  }
11135
11135
  //#endregion
11136
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/org/utils/requests.mjs
11136
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/org/utils/requests.mjs
11137
11137
  function buildSearchParams(params, flattenArrays = false) {
11138
11138
  const searchParams = new URLSearchParams();
11139
11139
  Object.entries(params).forEach(([key, value]) => {
@@ -11145,7 +11145,7 @@ function buildSearchParams(params, flattenArrays = false) {
11145
11145
  return searchParams;
11146
11146
  }
11147
11147
  //#endregion
11148
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
11148
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
11149
11149
  async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
11150
11150
  return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
11151
11151
  }
@@ -11160,7 +11160,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
11160
11160
  return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
11161
11161
  }
11162
11162
  //#endregion
11163
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
11163
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
11164
11164
  async function getWorkspaces(httpClient, organization_id, signal) {
11165
11165
  return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
11166
11166
  }
@@ -11180,7 +11180,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
11180
11180
  });
11181
11181
  const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
11182
11182
  //#endregion
11183
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
11183
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/org/holiday-calendar/requests.mjs
11184
11184
  async function holidayListDates(httpClient, organization_id, { year, country }, signal) {
11185
11185
  return (await httpClient.get(`holidays/organizations/${organization_id}/calendar/dates`, {
11186
11186
  signal,
@@ -11191,12 +11191,12 @@ async function holidayListDates(httpClient, organization_id, { year, country },
11191
11191
  })).json();
11192
11192
  }
11193
11193
  //#endregion
11194
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
11194
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
11195
11195
  async function getStatus(httpClient, signal) {
11196
11196
  return (await httpClient.get(`shared_data/api/status`, { signal })).json();
11197
11197
  }
11198
11198
  //#endregion
11199
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
11199
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
11200
11200
  async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
11201
11201
  return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
11202
11202
  signal,
@@ -11224,7 +11224,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
11224
11224
  return response.json();
11225
11225
  }
11226
11226
  //#endregion
11227
- //#region ../../node_modules/.pnpm/@toggl+queries@2.2.316_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_6d0fbe9eb784243d16dd0b20882b0a02/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
11227
+ //#region ../../node_modules/.pnpm/@toggl+queries@2.2.317_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_fb87d8d7a9794668d872ee6e9ebb6865/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
11228
11228
  async function getMyWorkingHours(httpClient, organization_id, signal) {
11229
11229
  return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
11230
11230
  }
@@ -15440,6 +15440,9 @@ async function connectAiSource(httpClient, organization_id, workspace_id, source
15440
15440
  json: data
15441
15441
  })).json();
15442
15442
  }
15443
+ async function getAiUsage(httpClient, organization_id, workspace_id, signal) {
15444
+ return (await httpClient.get(`intelligence/organizations/${organization_id}/workspaces/${workspace_id}/usage`, { signal })).json();
15445
+ }
15443
15446
  async function runAiView(httpClient, organization_id, workspace_id, data, signal) {
15444
15447
  return (await httpClient.post(`intelligence/organizations/${organization_id}/workspaces/${workspace_id}/views/run`, {
15445
15448
  signal,
@@ -15841,6 +15844,12 @@ async function deleteCustomFieldOption(httpClient, organization_id, workspace_id
15841
15844
  if ([204, 205].includes(response.status)) return null;
15842
15845
  return response.json();
15843
15846
  }
15847
+ async function bulkPatchUserCustomFieldValues(httpClient, organization_id, workspace_id, data, signal) {
15848
+ return (await httpClient.patch(`organizations/${organization_id}/workspaces/${workspace_id}/users/custom-field-values/bulk`, {
15849
+ signal,
15850
+ json: data
15851
+ })).json();
15852
+ }
15844
15853
  async function patchUserCustomFieldValues(httpClient, organization_id, workspace_id, user_id, data, signal) {
15845
15854
  return (await httpClient.patch(`organizations/${organization_id}/workspaces/${workspace_id}/users/${user_id}/custom-field-values`, {
15846
15855
  signal,
@@ -17747,6 +17756,29 @@ const generatedFocusOperations = [
17747
17756
  void 0
17748
17757
  ]))
17749
17758
  },
17759
+ {
17760
+ id: "focus.ai.get-usage",
17761
+ family: "focus",
17762
+ resource: "ai",
17763
+ action: "get-usage",
17764
+ title: "Get Usage Ai",
17765
+ description: "Get Usage Ai.",
17766
+ safety: "read",
17767
+ destructive: false,
17768
+ cli: {
17769
+ group: ["ai"],
17770
+ command: "get-usage",
17771
+ interactive: "hidden"
17772
+ },
17773
+ mcp: { entityTool: "ai" },
17774
+ inputSchema: /* @__PURE__ */ looseObject({}),
17775
+ execute: (_input, { client }) => client.runGeneratedRequest("getAiUsage", () => callGeneratedRequest(getAiUsage, [
17776
+ client.httpClient,
17777
+ client.organizationId,
17778
+ client.workspaceIdNumber,
17779
+ void 0
17780
+ ]))
17781
+ },
17750
17782
  {
17751
17783
  id: "focus.ai.next-ai-actions",
17752
17784
  family: "focus",
@@ -18926,6 +18958,33 @@ const generatedFocusOperations = [
18926
18958
  ]));
18927
18959
  }
18928
18960
  },
18961
+ {
18962
+ id: "focus.custom-fields.bulk-patch-user-custom-field-values",
18963
+ family: "focus",
18964
+ resource: "custom-fields",
18965
+ action: "bulk-patch-user-custom-field-values",
18966
+ title: "Bulk Patch User Custom Field Values Custom Fields",
18967
+ description: "Bulk Patch User Custom Field Values Custom Fields.",
18968
+ safety: "update",
18969
+ destructive: false,
18970
+ cli: {
18971
+ group: ["custom-fields", "bulk"],
18972
+ command: "patch-user-custom-field-values",
18973
+ interactive: "default"
18974
+ },
18975
+ mcp: { entityTool: "custom-fields" },
18976
+ inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ user_ids: /* @__PURE__ */ array$1(/* @__PURE__ */ number$2()) }) }),
18977
+ execute: (input, { client }) => {
18978
+ const data = input;
18979
+ return client.runGeneratedRequest("bulkPatchUserCustomFieldValues", () => callGeneratedRequest(bulkPatchUserCustomFieldValues, [
18980
+ client.httpClient,
18981
+ client.organizationId,
18982
+ client.workspaceIdNumber,
18983
+ data.payload ?? data.data ?? data,
18984
+ void 0
18985
+ ]));
18986
+ }
18987
+ },
18929
18988
  {
18930
18989
  id: "focus.custom-fields.create",
18931
18990
  family: "focus",
@@ -32601,4 +32660,4 @@ Common commands:
32601
32660
  //#endregion
32602
32661
  export { CommanderError as a, shutdownCliTelemetry as i, captureCliException as n, initCliTelemetry as r, createProgram as t };
32603
32662
 
32604
- //# sourceMappingURL=program-oSNYpKl6.js.map
32663
+ //# sourceMappingURL=program-CNNJYSfa.js.map
package/build/program.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-oSNYpKl6.js";
1
+ import { t as createProgram } from "./program-CNNJYSfa.js";
2
2
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/cli",
3
- "version": "1.13.188",
3
+ "version": "1.13.189",
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.316",
59
+ "@toggl/queries": "2.2.317",
60
60
  "@types/node": "22.19.11",
61
61
  "tsdown": "0.21.8",
62
62
  "typescript": "5.9.3",