@togglhq/cli 1.5.75 → 1.6.0
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/README.md
CHANGED
|
@@ -78,7 +78,7 @@ toggl [global flags] <group> … <subcommand> [flags]
|
|
|
78
78
|
|
|
79
79
|
Many endpoints use two segments (`toggl tasks list`). Some use nested groups, including:
|
|
80
80
|
|
|
81
|
-
- **`toggl organization …`** — organization APIs (not `toggl org …`; there is no `org` top-level command). Examples: `toggl organization invitations list`, `toggl organization members get`, `toggl organization workspaces list
|
|
81
|
+
- **`toggl organization …`** — organization APIs (not `toggl org …`; there is no `org` top-level command). Examples: `toggl organization invitations list`, `toggl organization members get`, `toggl organization workspaces list`.
|
|
82
82
|
- **`toggl shared …`** — shared workspace/org data routed through `@toggl/queries` helpers (status, holidays, working hours, time off). Example: `toggl shared status get`.
|
|
83
83
|
|
|
84
84
|
Core resource groups still include `tasks`, `projects`, `time-blocks`, `time-entries`, `statuses`, `users`, `tags`, `clients`, and others surfaced by the public command catalog. Some low-level endpoints are omitted from the CLI and MCP. Existing public command paths and operation IDs stay stable; use `toggl --help` and `toggl <group> --help` to explore what shipped.
|
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-
|
|
2
|
+
import { n as CommanderError, t as createProgram } from "./program-BCqI2fZI.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-
|
|
1
|
+
import { t as createProgram } from "./program-BCqI2fZI.js";
|
|
2
2
|
export { createProgram };
|
|
@@ -10578,7 +10578,8 @@ const WorkspaceAssignmentRequestSchema = /* @__PURE__ */ object$2({
|
|
|
10578
10578
|
const InvitationsRequestSchema = /* @__PURE__ */ object$2({
|
|
10579
10579
|
initiating_product: /* @__PURE__ */ string$1(),
|
|
10580
10580
|
invitations: /* @__PURE__ */ array$1(/* @__PURE__ */ object$2({
|
|
10581
|
-
|
|
10581
|
+
accounts_role_id: /* @__PURE__ */ number$2(),
|
|
10582
|
+
admin: /* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("A pointer so an omitted flag does not read as admin=false.")),
|
|
10582
10583
|
email: /* @__PURE__ */ string$1(),
|
|
10583
10584
|
groups: /* @__PURE__ */ array$1(/* @__PURE__ */ object$2({ group_id: /* @__PURE__ */ number$2() })),
|
|
10584
10585
|
workspaces: /* @__PURE__ */ array$1(/* @__PURE__ */ object$2({
|
|
@@ -10591,8 +10592,8 @@ const InvitationsRequestSchema = /* @__PURE__ */ object$2({
|
|
|
10591
10592
|
skip_email: /* @__PURE__ */ boolean$1()
|
|
10592
10593
|
});
|
|
10593
10594
|
const PutOrganizationUserRequestSchema = /* @__PURE__ */ object$2({
|
|
10595
|
+
accounts_role_id: /* @__PURE__ */ number$2(),
|
|
10594
10596
|
active: /* @__PURE__ */ boolean$1(),
|
|
10595
|
-
admin: /* @__PURE__ */ boolean$1(),
|
|
10596
10597
|
groups: /* @__PURE__ */ array$1(GroupAssignmentRequestSchema),
|
|
10597
10598
|
name: /* @__PURE__ */ string$1(),
|
|
10598
10599
|
tags: /* @__PURE__ */ array$1(TagAssignmentRequestSchema),
|
|
@@ -10615,7 +10616,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
|
|
|
10615
10616
|
]))
|
|
10616
10617
|
});
|
|
10617
10618
|
//#endregion
|
|
10618
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10619
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
|
|
10619
10620
|
async function getInvitations(httpClient, signal) {
|
|
10620
10621
|
return (await httpClient.get(`invitations`, { signal })).json();
|
|
10621
10622
|
}
|
|
@@ -10632,7 +10633,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
|
|
|
10632
10633
|
return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
|
|
10633
10634
|
}
|
|
10634
10635
|
//#endregion
|
|
10635
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10636
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/org/utils/requests.mjs
|
|
10636
10637
|
function buildSearchParams$1(params, flattenArrays = false) {
|
|
10637
10638
|
const searchParams = new URLSearchParams();
|
|
10638
10639
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -10644,7 +10645,7 @@ function buildSearchParams$1(params, flattenArrays = false) {
|
|
|
10644
10645
|
return searchParams;
|
|
10645
10646
|
}
|
|
10646
10647
|
//#endregion
|
|
10647
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10648
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
|
|
10648
10649
|
async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
|
|
10649
10650
|
return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
|
|
10650
10651
|
}
|
|
@@ -10658,19 +10659,10 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
|
|
|
10658
10659
|
return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
|
|
10659
10660
|
}
|
|
10660
10661
|
//#endregion
|
|
10661
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10662
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
|
|
10662
10663
|
async function getWorkspaces(httpClient, organization_id, signal) {
|
|
10663
10664
|
return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
|
|
10664
10665
|
}
|
|
10665
|
-
async function getWorkspaceTimezone(httpClient, organization_id, workspace_id, signal) {
|
|
10666
|
-
return (await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/settings/timezone`, { signal })).json();
|
|
10667
|
-
}
|
|
10668
|
-
async function putWorkspaceTimezone(httpClient, organization_id, workspace_id, data, signal) {
|
|
10669
|
-
return (await httpClient.put(`organizations/${organization_id}/workspaces/${workspace_id}/settings/timezone`, {
|
|
10670
|
-
signal,
|
|
10671
|
-
json: data
|
|
10672
|
-
})).json();
|
|
10673
|
-
}
|
|
10674
10666
|
async function getWorkspaceUserMeRoles(httpClient, organization_id, workspace_id, signal) {
|
|
10675
10667
|
return (await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/users/me/roles`, { signal })).json();
|
|
10676
10668
|
}
|
|
@@ -10687,7 +10679,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
|
|
|
10687
10679
|
});
|
|
10688
10680
|
const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
|
|
10689
10681
|
//#endregion
|
|
10690
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10682
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
|
|
10691
10683
|
const META_SYMBOL = Symbol.for("querygen:response:meta");
|
|
10692
10684
|
function withResponseMeta(data, headers, status) {
|
|
10693
10685
|
if (!data) return data;
|
|
@@ -10714,21 +10706,24 @@ function buildSearchParams(params, flattenArrays = false) {
|
|
|
10714
10706
|
return searchParams;
|
|
10715
10707
|
}
|
|
10716
10708
|
//#endregion
|
|
10717
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10718
|
-
async function getPublicHolidays(httpClient, year, { country } = {}, signal) {
|
|
10709
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
|
|
10710
|
+
async function getPublicHolidays(httpClient, year, { country, organization_id } = {}, signal) {
|
|
10719
10711
|
const response = await httpClient.get(`shared_data/api/publicholidays/${year}`, {
|
|
10720
10712
|
signal,
|
|
10721
|
-
searchParams: buildSearchParams({
|
|
10713
|
+
searchParams: buildSearchParams({
|
|
10714
|
+
country,
|
|
10715
|
+
organization_id
|
|
10716
|
+
})
|
|
10722
10717
|
});
|
|
10723
10718
|
return withResponseMeta(await response.json(), response.headers, response.status);
|
|
10724
10719
|
}
|
|
10725
10720
|
//#endregion
|
|
10726
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10721
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
|
|
10727
10722
|
async function getStatus(httpClient, signal) {
|
|
10728
10723
|
return (await httpClient.get(`shared_data/api/status`, { signal })).json();
|
|
10729
10724
|
}
|
|
10730
10725
|
//#endregion
|
|
10731
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10726
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
|
|
10732
10727
|
async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
|
|
10733
10728
|
return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
|
|
10734
10729
|
signal,
|
|
@@ -10756,7 +10751,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
|
|
|
10756
10751
|
return response.json();
|
|
10757
10752
|
}
|
|
10758
10753
|
//#endregion
|
|
10759
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10754
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.69_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_reac_6aa573ea023c4ca30a2fd33648f077ba/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
|
|
10760
10755
|
async function getMyWorkingHours(httpClient, organization_id, signal) {
|
|
10761
10756
|
return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
|
|
10762
10757
|
}
|
|
@@ -11592,20 +11587,6 @@ var FocusClient = class {
|
|
|
11592
11587
|
data: response.data
|
|
11593
11588
|
} : response;
|
|
11594
11589
|
}
|
|
11595
|
-
async getOrgWorkspaceTimezone(workspaceId) {
|
|
11596
|
-
const response = await this.run("getOrgWorkspaceTimezone", () => getWorkspaceTimezone(this.orgHttp, this.organizationIdNum, workspaceId));
|
|
11597
|
-
return response.ok ? {
|
|
11598
|
-
ok: true,
|
|
11599
|
-
data: response.data
|
|
11600
|
-
} : response;
|
|
11601
|
-
}
|
|
11602
|
-
async updateOrgWorkspaceTimezone(workspaceId, payload) {
|
|
11603
|
-
const response = await this.run("updateOrgWorkspaceTimezone", () => putWorkspaceTimezone(this.orgHttp, this.organizationIdNum, workspaceId, payload));
|
|
11604
|
-
return response.ok ? {
|
|
11605
|
-
ok: true,
|
|
11606
|
-
data: response.data
|
|
11607
|
-
} : response;
|
|
11608
|
-
}
|
|
11609
11590
|
async getSharedDataStatus() {
|
|
11610
11591
|
const response = await this.run("getSharedDataStatus", () => getStatus(this.sharedDataHttp));
|
|
11611
11592
|
return this.softValidateResponse("getSharedDataStatus", StatusOKSchema, response);
|
|
@@ -12496,7 +12477,7 @@ async function runSkillSetup(options) {
|
|
|
12496
12477
|
});
|
|
12497
12478
|
}
|
|
12498
12479
|
//#endregion
|
|
12499
|
-
//#region ../operations/build/safety-
|
|
12480
|
+
//#region ../operations/build/safety-FZlH3SQa.js
|
|
12500
12481
|
const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
|
|
12501
12482
|
const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
|
|
12502
12483
|
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));
|
|
@@ -13680,71 +13661,6 @@ const orgSharedOperations = [
|
|
|
13680
13661
|
return client.getMyWorkspaceRoles(body.workspace_id ?? Number.parseInt(client.workspaceId, 10));
|
|
13681
13662
|
}
|
|
13682
13663
|
},
|
|
13683
|
-
{
|
|
13684
|
-
id: "org.workspaces.get-timezone",
|
|
13685
|
-
family: "org",
|
|
13686
|
-
resource: "workspaces",
|
|
13687
|
-
action: "get-timezone",
|
|
13688
|
-
title: "Get workspace timezone",
|
|
13689
|
-
description: "Get the workspace-level default timezone (null when unset). Requires organization admin.",
|
|
13690
|
-
agentGuidance: "Use when you need the org-wide default timezone for a workspace. When timezone is null, members use their personal timezones.",
|
|
13691
|
-
safety: "read",
|
|
13692
|
-
destructive: false,
|
|
13693
|
-
cli: {
|
|
13694
|
-
group: ["organization", "workspaces"],
|
|
13695
|
-
command: "get-timezone",
|
|
13696
|
-
examples: [{
|
|
13697
|
-
description: "Get timezone for the active workspace",
|
|
13698
|
-
data: {}
|
|
13699
|
-
}, {
|
|
13700
|
-
description: "Get timezone for a specific workspace",
|
|
13701
|
-
data: { workspace_id: 40770900 }
|
|
13702
|
-
}]
|
|
13703
|
-
},
|
|
13704
|
-
mcp: { entityTool: "org-workspaces" },
|
|
13705
|
-
inputSchema: /* @__PURE__ */ object$2({ workspace_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Workspace ID (defaults to profile)"))) }),
|
|
13706
|
-
execute: (input, { client }) => {
|
|
13707
|
-
const body = input;
|
|
13708
|
-
return client.getOrgWorkspaceTimezone(body.workspace_id ?? client.workspaceIdNumber);
|
|
13709
|
-
}
|
|
13710
|
-
},
|
|
13711
|
-
{
|
|
13712
|
-
id: "org.workspaces.update-timezone",
|
|
13713
|
-
family: "org",
|
|
13714
|
-
resource: "workspaces",
|
|
13715
|
-
action: "update-timezone",
|
|
13716
|
-
title: "Update workspace timezone",
|
|
13717
|
-
description: "Set or clear the workspace-level default timezone. Requires organization admin.",
|
|
13718
|
-
agentGuidance: "Set timezone to an IANA name (e.g. Europe/London) or clear with clear: true / timezone: null so members fall back to personal timezones.",
|
|
13719
|
-
safety: "update",
|
|
13720
|
-
destructive: false,
|
|
13721
|
-
cli: {
|
|
13722
|
-
group: ["organization", "workspaces"],
|
|
13723
|
-
command: "update-timezone",
|
|
13724
|
-
examples: [{
|
|
13725
|
-
description: "Set default timezone for the active workspace",
|
|
13726
|
-
data: { timezone: "Europe/London" }
|
|
13727
|
-
}, {
|
|
13728
|
-
description: "Clear workspace default timezone",
|
|
13729
|
-
data: { clear: true }
|
|
13730
|
-
}]
|
|
13731
|
-
},
|
|
13732
|
-
mcp: { entityTool: "org-workspaces" },
|
|
13733
|
-
inputSchema: /* @__PURE__ */ object$2({
|
|
13734
|
-
workspace_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Workspace ID (defaults to profile)"))),
|
|
13735
|
-
timezone: /* @__PURE__ */ optional$1(/* @__PURE__ */ nullable$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("IANA timezone (e.g. \"Europe/London\"), or null to clear")))),
|
|
13736
|
-
clear: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("Clear workspace default timezone")))
|
|
13737
|
-
}),
|
|
13738
|
-
execute: (input, { client }) => {
|
|
13739
|
-
const body = input;
|
|
13740
|
-
const workspaceId = body.workspace_id ?? client.workspaceIdNumber;
|
|
13741
|
-
const clearsTimezone = body.clear === true || body.timezone === null;
|
|
13742
|
-
if (clearsTimezone && typeof body.timezone === "string") throw new Error("Pass either a timezone string or clear/null, not both");
|
|
13743
|
-
if (clearsTimezone) return client.updateOrgWorkspaceTimezone(workspaceId, { timezone: null });
|
|
13744
|
-
if (body.timezone === void 0) throw new Error("Pass --timezone <IANA>, --clear true, or timezone: null to remove the default");
|
|
13745
|
-
return client.updateOrgWorkspaceTimezone(workspaceId, { timezone: body.timezone });
|
|
13746
|
-
}
|
|
13747
|
-
},
|
|
13748
13664
|
{
|
|
13749
13665
|
id: "shared.status.get",
|
|
13750
13666
|
family: "shared",
|
|
@@ -25143,4 +25059,4 @@ Common commands:
|
|
|
25143
25059
|
//#endregion
|
|
25144
25060
|
export { CommanderError as n, createProgram as t };
|
|
25145
25061
|
|
|
25146
|
-
//# sourceMappingURL=program-
|
|
25062
|
+
//# sourceMappingURL=program-BCqI2fZI.js.map
|
package/build/program.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createProgram } from "./program-
|
|
1
|
+
import { t as createProgram } from "./program-BCqI2fZI.js";
|
|
2
2
|
export { createProgram };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@togglhq/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
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": "2.1.
|
|
58
|
+
"@toggl/queries": "2.1.69",
|
|
59
59
|
"@types/node": "22.19.11",
|
|
60
60
|
"tsdown": "0.21.8",
|
|
61
61
|
"typescript": "5.9.3",
|
|
@@ -21,9 +21,6 @@ toggl --workspace-id 789012 tasks list --project-id 123456
|
|
|
21
21
|
```bash
|
|
22
22
|
toggl organization invitations list
|
|
23
23
|
toggl organization workspaces list
|
|
24
|
-
toggl organization workspaces get-timezone
|
|
25
|
-
toggl organization workspaces update-timezone --timezone Europe/London
|
|
26
|
-
toggl organization workspaces update-timezone --clear true
|
|
27
24
|
toggl shared status get
|
|
28
25
|
toggl shared holidays list
|
|
29
26
|
```
|