@togglhq/cli 1.5.76 → 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 };
|
|
@@ -10663,15 +10663,6 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
|
|
|
10663
10663
|
async function getWorkspaces(httpClient, organization_id, signal) {
|
|
10664
10664
|
return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
|
|
10665
10665
|
}
|
|
10666
|
-
async function getWorkspaceTimezone(httpClient, organization_id, workspace_id, signal) {
|
|
10667
|
-
return (await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/settings/timezone`, { signal })).json();
|
|
10668
|
-
}
|
|
10669
|
-
async function putWorkspaceTimezone(httpClient, organization_id, workspace_id, data, signal) {
|
|
10670
|
-
return (await httpClient.put(`organizations/${organization_id}/workspaces/${workspace_id}/settings/timezone`, {
|
|
10671
|
-
signal,
|
|
10672
|
-
json: data
|
|
10673
|
-
})).json();
|
|
10674
|
-
}
|
|
10675
10666
|
async function getWorkspaceUserMeRoles(httpClient, organization_id, workspace_id, signal) {
|
|
10676
10667
|
return (await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/users/me/roles`, { signal })).json();
|
|
10677
10668
|
}
|
|
@@ -11596,20 +11587,6 @@ var FocusClient = class {
|
|
|
11596
11587
|
data: response.data
|
|
11597
11588
|
} : response;
|
|
11598
11589
|
}
|
|
11599
|
-
async getOrgWorkspaceTimezone(workspaceId) {
|
|
11600
|
-
const response = await this.run("getOrgWorkspaceTimezone", () => getWorkspaceTimezone(this.orgHttp, this.organizationIdNum, workspaceId));
|
|
11601
|
-
return response.ok ? {
|
|
11602
|
-
ok: true,
|
|
11603
|
-
data: response.data
|
|
11604
|
-
} : response;
|
|
11605
|
-
}
|
|
11606
|
-
async updateOrgWorkspaceTimezone(workspaceId, payload) {
|
|
11607
|
-
const response = await this.run("updateOrgWorkspaceTimezone", () => putWorkspaceTimezone(this.orgHttp, this.organizationIdNum, workspaceId, payload));
|
|
11608
|
-
return response.ok ? {
|
|
11609
|
-
ok: true,
|
|
11610
|
-
data: response.data
|
|
11611
|
-
} : response;
|
|
11612
|
-
}
|
|
11613
11590
|
async getSharedDataStatus() {
|
|
11614
11591
|
const response = await this.run("getSharedDataStatus", () => getStatus(this.sharedDataHttp));
|
|
11615
11592
|
return this.softValidateResponse("getSharedDataStatus", StatusOKSchema, response);
|
|
@@ -12500,7 +12477,7 @@ async function runSkillSetup(options) {
|
|
|
12500
12477
|
});
|
|
12501
12478
|
}
|
|
12502
12479
|
//#endregion
|
|
12503
|
-
//#region ../operations/build/safety-
|
|
12480
|
+
//#region ../operations/build/safety-FZlH3SQa.js
|
|
12504
12481
|
const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
|
|
12505
12482
|
const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
|
|
12506
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));
|
|
@@ -13684,71 +13661,6 @@ const orgSharedOperations = [
|
|
|
13684
13661
|
return client.getMyWorkspaceRoles(body.workspace_id ?? Number.parseInt(client.workspaceId, 10));
|
|
13685
13662
|
}
|
|
13686
13663
|
},
|
|
13687
|
-
{
|
|
13688
|
-
id: "org.workspaces.get-timezone",
|
|
13689
|
-
family: "org",
|
|
13690
|
-
resource: "workspaces",
|
|
13691
|
-
action: "get-timezone",
|
|
13692
|
-
title: "Get workspace timezone",
|
|
13693
|
-
description: "Get the workspace-level default timezone (null when unset). Requires organization admin.",
|
|
13694
|
-
agentGuidance: "Use when you need the org-wide default timezone for a workspace. When timezone is null, members use their personal timezones.",
|
|
13695
|
-
safety: "read",
|
|
13696
|
-
destructive: false,
|
|
13697
|
-
cli: {
|
|
13698
|
-
group: ["organization", "workspaces"],
|
|
13699
|
-
command: "get-timezone",
|
|
13700
|
-
examples: [{
|
|
13701
|
-
description: "Get timezone for the active workspace",
|
|
13702
|
-
data: {}
|
|
13703
|
-
}, {
|
|
13704
|
-
description: "Get timezone for a specific workspace",
|
|
13705
|
-
data: { workspace_id: 40770900 }
|
|
13706
|
-
}]
|
|
13707
|
-
},
|
|
13708
|
-
mcp: { entityTool: "org-workspaces" },
|
|
13709
|
-
inputSchema: /* @__PURE__ */ object$2({ workspace_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Workspace ID (defaults to profile)"))) }),
|
|
13710
|
-
execute: (input, { client }) => {
|
|
13711
|
-
const body = input;
|
|
13712
|
-
return client.getOrgWorkspaceTimezone(body.workspace_id ?? client.workspaceIdNumber);
|
|
13713
|
-
}
|
|
13714
|
-
},
|
|
13715
|
-
{
|
|
13716
|
-
id: "org.workspaces.update-timezone",
|
|
13717
|
-
family: "org",
|
|
13718
|
-
resource: "workspaces",
|
|
13719
|
-
action: "update-timezone",
|
|
13720
|
-
title: "Update workspace timezone",
|
|
13721
|
-
description: "Set or clear the workspace-level default timezone. Requires organization admin.",
|
|
13722
|
-
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.",
|
|
13723
|
-
safety: "update",
|
|
13724
|
-
destructive: false,
|
|
13725
|
-
cli: {
|
|
13726
|
-
group: ["organization", "workspaces"],
|
|
13727
|
-
command: "update-timezone",
|
|
13728
|
-
examples: [{
|
|
13729
|
-
description: "Set default timezone for the active workspace",
|
|
13730
|
-
data: { timezone: "Europe/London" }
|
|
13731
|
-
}, {
|
|
13732
|
-
description: "Clear workspace default timezone",
|
|
13733
|
-
data: { clear: true }
|
|
13734
|
-
}]
|
|
13735
|
-
},
|
|
13736
|
-
mcp: { entityTool: "org-workspaces" },
|
|
13737
|
-
inputSchema: /* @__PURE__ */ object$2({
|
|
13738
|
-
workspace_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Workspace ID (defaults to profile)"))),
|
|
13739
|
-
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")))),
|
|
13740
|
-
clear: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("Clear workspace default timezone")))
|
|
13741
|
-
}),
|
|
13742
|
-
execute: (input, { client }) => {
|
|
13743
|
-
const body = input;
|
|
13744
|
-
const workspaceId = body.workspace_id ?? client.workspaceIdNumber;
|
|
13745
|
-
const clearsTimezone = body.clear === true || body.timezone === null;
|
|
13746
|
-
if (clearsTimezone && typeof body.timezone === "string") throw new Error("Pass either a timezone string or clear/null, not both");
|
|
13747
|
-
if (clearsTimezone) return client.updateOrgWorkspaceTimezone(workspaceId, { timezone: null });
|
|
13748
|
-
if (body.timezone === void 0) throw new Error("Pass --timezone <IANA>, --clear true, or timezone: null to remove the default");
|
|
13749
|
-
return client.updateOrgWorkspaceTimezone(workspaceId, { timezone: body.timezone });
|
|
13750
|
-
}
|
|
13751
|
-
},
|
|
13752
13664
|
{
|
|
13753
13665
|
id: "shared.status.get",
|
|
13754
13666
|
family: "shared",
|
|
@@ -25147,4 +25059,4 @@ Common commands:
|
|
|
25147
25059
|
//#endregion
|
|
25148
25060
|
export { CommanderError as n, createProgram as t };
|
|
25149
25061
|
|
|
25150
|
-
//# 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
|
@@ -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
|
```
|