@togglhq/cli 1.6.0 → 1.6.2
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-
|
|
2
|
+
import { n as CommanderError, t as createProgram } from "./program-PTgkqyeE.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-PTgkqyeE.js";
|
|
2
2
|
export { createProgram };
|
|
@@ -10616,7 +10616,7 @@ const PublicMeEntryRequestSchema = /* @__PURE__ */ object$2({
|
|
|
10616
10616
|
]))
|
|
10617
10617
|
});
|
|
10618
10618
|
//#endregion
|
|
10619
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10619
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/org/invitation/requests.mjs
|
|
10620
10620
|
async function getInvitations(httpClient, signal) {
|
|
10621
10621
|
return (await httpClient.get(`invitations`, { signal })).json();
|
|
10622
10622
|
}
|
|
@@ -10633,7 +10633,7 @@ async function resendInvitation(httpClient, organization_id, organization_user_i
|
|
|
10633
10633
|
return (await httpClient.post(`organizations/${organization_id}/invitations/${organization_user_id}/resend`, { signal })).json();
|
|
10634
10634
|
}
|
|
10635
10635
|
//#endregion
|
|
10636
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10636
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/org/utils/requests.mjs
|
|
10637
10637
|
function buildSearchParams$1(params, flattenArrays = false) {
|
|
10638
10638
|
const searchParams = new URLSearchParams();
|
|
10639
10639
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -10645,7 +10645,7 @@ function buildSearchParams$1(params, flattenArrays = false) {
|
|
|
10645
10645
|
return searchParams;
|
|
10646
10646
|
}
|
|
10647
10647
|
//#endregion
|
|
10648
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10648
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/org/organization-user/requests.mjs
|
|
10649
10649
|
async function getOrganizationUser(httpClient, organization_id, organization_user_id, signal) {
|
|
10650
10650
|
return (await httpClient.get(`organizations/${organization_id}/users/${organization_user_id}`, { signal })).json();
|
|
10651
10651
|
}
|
|
@@ -10659,7 +10659,7 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
|
|
|
10659
10659
|
return (await httpClient.patch(`organizations/${organization_id}/users/${organization_user_id}/active_status/${status}`, { signal })).json();
|
|
10660
10660
|
}
|
|
10661
10661
|
//#endregion
|
|
10662
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10662
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/org/workspace/requests.mjs
|
|
10663
10663
|
async function getWorkspaces(httpClient, organization_id, signal) {
|
|
10664
10664
|
return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
|
|
10665
10665
|
}
|
|
@@ -10679,7 +10679,7 @@ const WorkingHoursUpdateInputSchema = /* @__PURE__ */ object$2({
|
|
|
10679
10679
|
});
|
|
10680
10680
|
const StatusOKSchema = /* @__PURE__ */ object$2({ status: /* @__PURE__ */ string$1() });
|
|
10681
10681
|
//#endregion
|
|
10682
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10682
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/shared-data/utils/requests.mjs
|
|
10683
10683
|
const META_SYMBOL = Symbol.for("querygen:response:meta");
|
|
10684
10684
|
function withResponseMeta(data, headers, status) {
|
|
10685
10685
|
if (!data) return data;
|
|
@@ -10706,7 +10706,7 @@ function buildSearchParams(params, flattenArrays = false) {
|
|
|
10706
10706
|
return searchParams;
|
|
10707
10707
|
}
|
|
10708
10708
|
//#endregion
|
|
10709
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10709
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/shared-data/public-holidays/requests.mjs
|
|
10710
10710
|
async function getPublicHolidays(httpClient, year, { country, organization_id } = {}, signal) {
|
|
10711
10711
|
const response = await httpClient.get(`shared_data/api/publicholidays/${year}`, {
|
|
10712
10712
|
signal,
|
|
@@ -10718,12 +10718,12 @@ async function getPublicHolidays(httpClient, year, { country, organization_id }
|
|
|
10718
10718
|
return withResponseMeta(await response.json(), response.headers, response.status);
|
|
10719
10719
|
}
|
|
10720
10720
|
//#endregion
|
|
10721
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10721
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/shared-data/status/requests.mjs
|
|
10722
10722
|
async function getStatus(httpClient, signal) {
|
|
10723
10723
|
return (await httpClient.get(`shared_data/api/status`, { signal })).json();
|
|
10724
10724
|
}
|
|
10725
10725
|
//#endregion
|
|
10726
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10726
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/org/timeoff/requests.mjs
|
|
10727
10727
|
async function timeoffListMyEntries(httpClient, organization_id, { from, to }, signal) {
|
|
10728
10728
|
return (await httpClient.get(`timeoff/organizations/${organization_id}/me`, {
|
|
10729
10729
|
signal,
|
|
@@ -10751,7 +10751,7 @@ async function timeoffDeleteMyEntry(httpClient, organization_id, id, signal) {
|
|
|
10751
10751
|
return response.json();
|
|
10752
10752
|
}
|
|
10753
10753
|
//#endregion
|
|
10754
|
-
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.
|
|
10754
|
+
//#region ../../node_modules/.pnpm/@toggl+queries@2.1.128_@tanstack+react-query@5.99.0_react@19.2.5__@toggl+sync@0.2.4_rea_d4140eb5f67db6c1911197579c0bcec1/node_modules/@toggl/queries/dist/shared-data/working-hours/requests.mjs
|
|
10755
10755
|
async function getMyWorkingHours(httpClient, organization_id, signal) {
|
|
10756
10756
|
return (await httpClient.get(`shared_data/api/workinghours/${organization_id}/me`, { signal })).json();
|
|
10757
10757
|
}
|
|
@@ -12477,7 +12477,7 @@ async function runSkillSetup(options) {
|
|
|
12477
12477
|
});
|
|
12478
12478
|
}
|
|
12479
12479
|
//#endregion
|
|
12480
|
-
//#region ../operations/build/safety-
|
|
12480
|
+
//#region ../operations/build/safety-nrboW9fu.js
|
|
12481
12481
|
const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
|
|
12482
12482
|
const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
|
|
12483
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));
|
|
@@ -12712,6 +12712,7 @@ const clientOverrides = { "focus.clients.list": {
|
|
|
12712
12712
|
const compositeOverrides = {
|
|
12713
12713
|
"focus.composite.create-project": {
|
|
12714
12714
|
description: "Create a project with related data such as members, milestones, rates, and billable rates.",
|
|
12715
|
+
agentGuidance: "Follow the create action's privacy and billable guidance. Project fields go under payload.project.",
|
|
12715
12716
|
cli: {
|
|
12716
12717
|
group: ["projects"],
|
|
12717
12718
|
command: "create-advanced",
|
|
@@ -13013,16 +13014,20 @@ const projectOverrides = {
|
|
|
13013
13014
|
},
|
|
13014
13015
|
"focus.projects.get": { agentGuidance: "Fetch a single project with aggregated task counts and time estimates." },
|
|
13015
13016
|
"focus.projects.create": {
|
|
13016
|
-
agentGuidance: "Required: name. Recommended: color (hex), billable
|
|
13017
|
+
agentGuidance: "Required: name. Recommended: color (hex). The API defaults private and billable to false when omitted. Match the Toggl UI on privacy. If the user explicitly asks for a shared or public project, pass private=false; no permissions check is needed, because only private projects require an entitlement. Otherwise call workspace-settings get-user-permissions and pass private=true when permissions includes access_private_projects_tasks_feature. If that permission is absent, pass private=false and tell the user; if the user explicitly required a private project, do not create a shared one. Leave billable unset unless the user explicitly says the work is billable or provides a rate. Associate with a client via client_id.",
|
|
13017
13018
|
examples: [{
|
|
13018
|
-
description: "Create a project",
|
|
13019
|
-
data: {
|
|
13019
|
+
description: "Create a private internal project",
|
|
13020
|
+
data: {
|
|
13021
|
+
name: "Internal research",
|
|
13022
|
+
private: true
|
|
13023
|
+
}
|
|
13020
13024
|
}, {
|
|
13021
|
-
description: "Create a billable project
|
|
13025
|
+
description: "Create a private billable project when billing was requested",
|
|
13022
13026
|
data: {
|
|
13023
13027
|
name: "Client work",
|
|
13028
|
+
private: true,
|
|
13024
13029
|
billable: true,
|
|
13025
|
-
color: "#
|
|
13030
|
+
color: "#DD3919"
|
|
13026
13031
|
}
|
|
13027
13032
|
}]
|
|
13028
13033
|
},
|
|
@@ -25059,4 +25064,4 @@ Common commands:
|
|
|
25059
25064
|
//#endregion
|
|
25060
25065
|
export { CommanderError as n, createProgram as t };
|
|
25061
25066
|
|
|
25062
|
-
//# sourceMappingURL=program-
|
|
25067
|
+
//# sourceMappingURL=program-PTgkqyeE.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-PTgkqyeE.js";
|
|
2
2
|
export { createProgram };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@togglhq/cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
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.128",
|
|
59
59
|
"@types/node": "22.19.11",
|
|
60
60
|
"tsdown": "0.21.8",
|
|
61
61
|
"typescript": "5.9.3",
|
|
@@ -19,9 +19,16 @@ toggl --json projects get --project-id <project-id>
|
|
|
19
19
|
Create a project:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
toggl --json projects create --data '{"name":"Q3 Planning","
|
|
22
|
+
toggl --json projects create --data '{"name":"Q3 Planning","private":true}'
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
When targeting a specific workspace, run `toggl --json workspace switch <workspace-id>` before the permissions check and create command; the project payload does not select the workspace.
|
|
26
|
+
When the user explicitly asks for a shared or public project, use `private: false` and skip the permissions check — only private projects require an entitlement.
|
|
27
|
+
Otherwise, before defaulting to a private project, run `toggl --json workspace-settings get-user-permissions`.
|
|
28
|
+
Use `private: true` when `permissions` includes `access_private_projects_tasks_feature`;
|
|
29
|
+
otherwise use `private: false` and tell the user. If the user explicitly requires privacy, do not create a shared project.
|
|
30
|
+
Omit `billable` unless billing was requested.
|
|
31
|
+
|
|
25
32
|
Rename a project:
|
|
26
33
|
|
|
27
34
|
```bash
|