@togglhq/cli 1.5.52 → 1.5.54
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-CUO6ODOB.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-CUO6ODOB.js";
|
|
2
2
|
export { createProgram };
|
|
@@ -8314,6 +8314,31 @@ function getFallback(schema, dataset, config$1) {
|
|
|
8314
8314
|
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
8315
8315
|
}
|
|
8316
8316
|
/**
|
|
8317
|
+
* Returns a fallback value as output if the input does not match the schema.
|
|
8318
|
+
*
|
|
8319
|
+
* @param schema The schema to catch.
|
|
8320
|
+
* @param fallback The fallback value.
|
|
8321
|
+
*
|
|
8322
|
+
* @returns The passed schema.
|
|
8323
|
+
*/
|
|
8324
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
8325
|
+
function fallback(schema, fallback$1) {
|
|
8326
|
+
return {
|
|
8327
|
+
...schema,
|
|
8328
|
+
fallback: fallback$1,
|
|
8329
|
+
get "~standard"() {
|
|
8330
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
8331
|
+
},
|
|
8332
|
+
"~run"(dataset, config$1) {
|
|
8333
|
+
const outputDataset = schema["~run"](dataset, config$1);
|
|
8334
|
+
return outputDataset.issues ? {
|
|
8335
|
+
typed: true,
|
|
8336
|
+
value: /* @__PURE__ */ getFallback(this, outputDataset, config$1)
|
|
8337
|
+
} : outputDataset;
|
|
8338
|
+
}
|
|
8339
|
+
};
|
|
8340
|
+
}
|
|
8341
|
+
/**
|
|
8317
8342
|
* Returns the default value of the schema.
|
|
8318
8343
|
*
|
|
8319
8344
|
* @param schema The schema to get it from.
|
|
@@ -8795,6 +8820,7 @@ const TagLiteSchema = /* @__PURE__ */ object({
|
|
|
8795
8820
|
color: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
8796
8821
|
});
|
|
8797
8822
|
const TaskSchema = /* @__PURE__ */ object({
|
|
8823
|
+
allocation_unit: /* @__PURE__ */ picklist(["percent", "flat"]),
|
|
8798
8824
|
created_at: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()),
|
|
8799
8825
|
estimate_type: /* @__PURE__ */ picklist(["daily", "total"]),
|
|
8800
8826
|
id: /* @__PURE__ */ number(),
|
|
@@ -8845,6 +8871,7 @@ const TaskSchema = /* @__PURE__ */ object({
|
|
|
8845
8871
|
updated_at: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()))
|
|
8846
8872
|
});
|
|
8847
8873
|
const TaskWithParentAndAggregationsSchema = /* @__PURE__ */ object({
|
|
8874
|
+
allocation_unit: /* @__PURE__ */ picklist(["percent", "flat"]),
|
|
8848
8875
|
created_at: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()),
|
|
8849
8876
|
estimate_type: /* @__PURE__ */ picklist(["daily", "total"]),
|
|
8850
8877
|
id: /* @__PURE__ */ number(),
|
|
@@ -9383,6 +9410,7 @@ const TagPayloadSchema = /* @__PURE__ */ object({
|
|
|
9383
9410
|
const TaskBulkArchivePayloadSchema = /* @__PURE__ */ object({ task_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
|
|
9384
9411
|
const TaskCreatePayloadSchema = /* @__PURE__ */ object({
|
|
9385
9412
|
name: /* @__PURE__ */ string(),
|
|
9413
|
+
allocation_unit: /* @__PURE__ */ optional(/* @__PURE__ */ fallback(/* @__PURE__ */ picklist(["percent", "flat"]), "flat")),
|
|
9386
9414
|
assignee_user_ids: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ array(/* @__PURE__ */ number()))),
|
|
9387
9415
|
auto_log_time: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
9388
9416
|
billable: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
@@ -9422,6 +9450,7 @@ const TaskBulkDuplicatePayloadSchema = /* @__PURE__ */ object({
|
|
|
9422
9450
|
const TaskBulkRestorePayloadSchema = /* @__PURE__ */ object({ task_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
|
|
9423
9451
|
const TaskBulkUnarchivePayloadSchema = /* @__PURE__ */ object({ task_ids: /* @__PURE__ */ pipe(/* @__PURE__ */ array(/* @__PURE__ */ number()), /* @__PURE__ */ minLength(1), /* @__PURE__ */ maxLength(100)) });
|
|
9424
9452
|
const TaskPartialUpdatePayloadSchema = /* @__PURE__ */ object({
|
|
9453
|
+
allocation_unit: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ picklist(["percent", "flat"]))),
|
|
9425
9454
|
assignee_user_ids: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ array(/* @__PURE__ */ number()))),
|
|
9426
9455
|
auto_log_time: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ boolean())),
|
|
9427
9456
|
billable: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
@@ -9456,6 +9485,7 @@ const TaskPartialUpdatePayloadSchema = /* @__PURE__ */ object({
|
|
|
9456
9485
|
});
|
|
9457
9486
|
const TaskPartialUpdatePayloadWithIDSchema = /* @__PURE__ */ object({
|
|
9458
9487
|
id: /* @__PURE__ */ number(),
|
|
9488
|
+
allocation_unit: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ picklist(["percent", "flat"]))),
|
|
9459
9489
|
assignee_user_ids: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ array(/* @__PURE__ */ number()))),
|
|
9460
9490
|
auto_log_time: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ boolean())),
|
|
9461
9491
|
billable: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
@@ -14025,6 +14055,17 @@ async function capacityGetComputations(httpClient, organization_id, workspace_id
|
|
|
14025
14055
|
}).json();
|
|
14026
14056
|
}
|
|
14027
14057
|
//#endregion
|
|
14058
|
+
//#region ../focus-queries/dist/capacity-settings/requests.ts
|
|
14059
|
+
async function getCapacitySettings(httpClient, workspace_id, signal) {
|
|
14060
|
+
return await httpClient.get(`workspaces/${workspace_id}/capacity-settings`, { signal }).json();
|
|
14061
|
+
}
|
|
14062
|
+
async function updateCapacitySettings(httpClient, workspace_id, data, signal) {
|
|
14063
|
+
return await httpClient.patch(`workspaces/${workspace_id}/capacity-settings`, {
|
|
14064
|
+
signal,
|
|
14065
|
+
json: data
|
|
14066
|
+
}).json();
|
|
14067
|
+
}
|
|
14068
|
+
//#endregion
|
|
14028
14069
|
//#region ../focus-queries/dist/composite/requests.ts
|
|
14029
14070
|
async function compositeCreateProject(httpClient, organization_id, workspace_id, data, signal) {
|
|
14030
14071
|
return await httpClient.post(`organizations/${organization_id}/workspaces/${workspace_id}/composite/projects`, {
|
|
@@ -15172,6 +15213,54 @@ const generatedFocusOperations = [
|
|
|
15172
15213
|
]));
|
|
15173
15214
|
}
|
|
15174
15215
|
},
|
|
15216
|
+
{
|
|
15217
|
+
id: "focus.capacities.settings-list",
|
|
15218
|
+
family: "focus",
|
|
15219
|
+
resource: "capacities",
|
|
15220
|
+
action: "settings-list",
|
|
15221
|
+
title: "Settings List Capacities",
|
|
15222
|
+
description: "Settings List Capacities.",
|
|
15223
|
+
safety: "read",
|
|
15224
|
+
destructive: false,
|
|
15225
|
+
cli: {
|
|
15226
|
+
group: ["capacities", "settings"],
|
|
15227
|
+
command: "list",
|
|
15228
|
+
interactive: "hidden"
|
|
15229
|
+
},
|
|
15230
|
+
mcp: { entityTool: "capacities" },
|
|
15231
|
+
inputSchema: /* @__PURE__ */ looseObject({}),
|
|
15232
|
+
execute: (_input, { client }) => client.runGeneratedRequest("getCapacitySettings", () => callGeneratedRequest(getCapacitySettings, [
|
|
15233
|
+
client.httpClient,
|
|
15234
|
+
client.workspaceIdNumber,
|
|
15235
|
+
void 0
|
|
15236
|
+
]))
|
|
15237
|
+
},
|
|
15238
|
+
{
|
|
15239
|
+
id: "focus.capacities.settings-update",
|
|
15240
|
+
family: "focus",
|
|
15241
|
+
resource: "capacities",
|
|
15242
|
+
action: "settings-update",
|
|
15243
|
+
title: "Settings Update Capacities",
|
|
15244
|
+
description: "Settings Update Capacities.",
|
|
15245
|
+
safety: "update",
|
|
15246
|
+
destructive: false,
|
|
15247
|
+
cli: {
|
|
15248
|
+
group: ["capacities", "settings"],
|
|
15249
|
+
command: "update",
|
|
15250
|
+
interactive: "default"
|
|
15251
|
+
},
|
|
15252
|
+
mcp: { entityTool: "capacities" },
|
|
15253
|
+
inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({ public_holidays_enabled: /* @__PURE__ */ boolean$1() }) }),
|
|
15254
|
+
execute: (input, { client }) => {
|
|
15255
|
+
const data = input;
|
|
15256
|
+
return client.runGeneratedRequest("updateCapacitySettings", () => callGeneratedRequest(updateCapacitySettings, [
|
|
15257
|
+
client.httpClient,
|
|
15258
|
+
client.workspaceIdNumber,
|
|
15259
|
+
data.payload ?? data.data ?? data,
|
|
15260
|
+
void 0
|
|
15261
|
+
]));
|
|
15262
|
+
}
|
|
15263
|
+
},
|
|
15175
15264
|
{
|
|
15176
15265
|
id: "focus.clients.create",
|
|
15177
15266
|
family: "focus",
|
|
@@ -15403,6 +15492,7 @@ const generatedFocusOperations = [
|
|
|
15403
15492
|
inputSchema: /* @__PURE__ */ looseObject({ payload: /* @__PURE__ */ looseObject({
|
|
15404
15493
|
task: /* @__PURE__ */ looseObject({
|
|
15405
15494
|
name: /* @__PURE__ */ string$1(),
|
|
15495
|
+
allocation_unit: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(["percent", "flat"])),
|
|
15406
15496
|
auto_log_time: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
|
|
15407
15497
|
billable: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
|
|
15408
15498
|
color: /* @__PURE__ */ optional$1(/* @__PURE__ */ string$1()),
|
|
@@ -15431,6 +15521,7 @@ const generatedFocusOperations = [
|
|
|
15431
15521
|
}),
|
|
15432
15522
|
subtasks: /* @__PURE__ */ optional$1(/* @__PURE__ */ array$1(/* @__PURE__ */ looseObject({
|
|
15433
15523
|
name: /* @__PURE__ */ string$1(),
|
|
15524
|
+
allocation_unit: /* @__PURE__ */ optional$1(/* @__PURE__ */ picklist$1(["percent", "flat"])),
|
|
15434
15525
|
auto_log_time: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
|
|
15435
15526
|
billable: /* @__PURE__ */ optional$1(/* @__PURE__ */ boolean$1()),
|
|
15436
15527
|
color: /* @__PURE__ */ optional$1(/* @__PURE__ */ string$1()),
|
|
@@ -25853,4 +25944,4 @@ Common commands:
|
|
|
25853
25944
|
//#endregion
|
|
25854
25945
|
export { CommanderError as n, createProgram as t };
|
|
25855
25946
|
|
|
25856
|
-
//# sourceMappingURL=program-
|
|
25947
|
+
//# sourceMappingURL=program-CUO6ODOB.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-CUO6ODOB.js";
|
|
2
2
|
export { createProgram };
|