@togglhq/cli 1.13.92 → 1.13.93

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-8S9qTfUo.js";
2
+ import { a as CommanderError, i as shutdownCliTelemetry, n as captureCliException, r as initCliTelemetry, t as createProgram } from "./program-DUmiaHO1.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-8S9qTfUo.js";
1
+ import { t as createProgram } from "./program-DUmiaHO1.js";
2
2
  export { createProgram };
@@ -7142,7 +7142,8 @@ const TaskAssignmentSchema = /* @__PURE__ */ object({
7142
7142
  });
7143
7143
  const ClientLiteSchema = /* @__PURE__ */ object({
7144
7144
  id: /* @__PURE__ */ number(),
7145
- name: /* @__PURE__ */ string()
7145
+ name: /* @__PURE__ */ string(),
7146
+ active: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
7146
7147
  });
7147
7148
  const CustomFieldValueSchema = /* @__PURE__ */ object({
7148
7149
  custom_field_id: /* @__PURE__ */ number(),
@@ -7402,7 +7403,10 @@ const AlertRuleSchema = /* @__PURE__ */ object({
7402
7403
  });
7403
7404
  const ClientPayloadSchema = /* @__PURE__ */ object({
7404
7405
  name: /* @__PURE__ */ string(),
7405
- currency: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("Currency is the client's optional default display currency (ISO 4217). Omitted or null means the client falls back to the workspace currency. On update (PUT) it is set directly, so send it to set/keep it or null to clear.")))
7406
+ address: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Omit to keep the stored value on update; send null or a blank string to clear it."))),
7407
+ contact_email: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Omit to keep the stored value on update; send null or a blank string to clear it."))),
7408
+ currency: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("Currency is the client's optional default display currency (ISO 4217). Omitted or null means the client falls back to the workspace currency. On update (PUT) it is set directly, so send it to set/keep it or null to clear."))),
7409
+ internal_reference: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Omit to keep the stored value on update; send null or a blank string to clear it.")))
7406
7410
  });
7407
7411
  const ProjectFixedFeePayloadSchema = /* @__PURE__ */ object({
7408
7412
  amount: /* @__PURE__ */ number(),
@@ -7540,8 +7544,12 @@ const ClientSchema = /* @__PURE__ */ object({
7540
7544
  id: /* @__PURE__ */ number(),
7541
7545
  name: /* @__PURE__ */ string(),
7542
7546
  workspace_id: /* @__PURE__ */ number(),
7547
+ address: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ string())),
7548
+ contact_email: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ string())),
7543
7549
  currency: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
7544
7550
  deleted_at: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime())),
7551
+ internal_reference: /* @__PURE__ */ optional(/* @__PURE__ */ nullable(/* @__PURE__ */ string())),
7552
+ project_count: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
7545
7553
  toggl_user_id: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
7546
7554
  updated_at: /* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoDateTime()))
7547
7555
  });
@@ -9844,14 +9852,15 @@ async function viewTaskAttachment(httpClient, organization_id, workspace_id, tas
9844
9852
  }
9845
9853
  //#endregion
9846
9854
  //#region ../focus-queries/dist/clients/requests.ts
9847
- async function getClientsClassic(httpClient, workspace_id, { page, per_page, order_by, name } = {}, signal) {
9855
+ async function getClientsClassic(httpClient, workspace_id, { page, per_page, order_by, name, active } = {}, signal) {
9848
9856
  return await httpClient.get(`workspaces/${workspace_id}/clients`, {
9849
9857
  signal,
9850
9858
  searchParams: buildSearchParams$2({
9851
9859
  page,
9852
9860
  per_page,
9853
9861
  order_by,
9854
- name
9862
+ name,
9863
+ active
9855
9864
  })
9856
9865
  }).json();
9857
9866
  }
@@ -9873,9 +9882,21 @@ async function updateClient(httpClient, workspace_id, client_id, data, signal) {
9873
9882
  async function deleteClient(httpClient, workspace_id, client_id, signal) {
9874
9883
  return await httpClient.delete(`workspaces/${workspace_id}/clients/${client_id}`, { signal }).json();
9875
9884
  }
9885
+ async function archiveClient(httpClient, workspace_id, client_id, data, signal) {
9886
+ return await httpClient.patch(`workspaces/${workspace_id}/clients/${client_id}/archive`, {
9887
+ signal,
9888
+ json: data
9889
+ }).json();
9890
+ }
9891
+ async function getClientArchivePreview(httpClient, workspace_id, client_id, signal) {
9892
+ return await httpClient.get(`workspaces/${workspace_id}/clients/${client_id}/archive-preview`, { signal }).json();
9893
+ }
9876
9894
  async function restoreClient(httpClient, workspace_id, client_id, signal) {
9877
9895
  return await httpClient.patch(`workspaces/${workspace_id}/clients/${client_id}/restore`, { signal }).json();
9878
9896
  }
9897
+ async function unarchiveClient(httpClient, workspace_id, client_id, signal) {
9898
+ return await httpClient.patch(`workspaces/${workspace_id}/clients/${client_id}/unarchive`, { signal }).json();
9899
+ }
9879
9900
  //#endregion
9880
9901
  //#region ../focus-queries/dist/organization/requests.ts
9881
9902
  async function createOrganizationGroup(httpClient, organization_id, data, signal) {
@@ -17570,6 +17591,36 @@ const generatedFocusOperations = [
17570
17591
  ]));
17571
17592
  }
17572
17593
  },
17594
+ {
17595
+ id: "focus.clients.archive",
17596
+ family: "focus",
17597
+ resource: "clients",
17598
+ action: "archive",
17599
+ title: "Archive Clients",
17600
+ description: "Archive Clients.",
17601
+ safety: "update",
17602
+ destructive: false,
17603
+ cli: {
17604
+ group: ["clients"],
17605
+ command: "archive",
17606
+ interactive: "default"
17607
+ },
17608
+ mcp: { entityTool: "clients" },
17609
+ inputSchema: /* @__PURE__ */ looseObject({
17610
+ client_id: /* @__PURE__ */ number$2(),
17611
+ payload: /* @__PURE__ */ looseObject({ project_count: /* @__PURE__ */ number$2() })
17612
+ }),
17613
+ execute: (input, { client }) => {
17614
+ const data = input;
17615
+ return client.runGeneratedRequest("archiveClient", () => callGeneratedRequest(archiveClient, [
17616
+ client.httpClient,
17617
+ client.workspaceIdNumber,
17618
+ data.client_id,
17619
+ data.payload ?? data.data ?? data,
17620
+ void 0
17621
+ ]));
17622
+ }
17623
+ },
17573
17624
  {
17574
17625
  id: "focus.clients.create",
17575
17626
  family: "focus",
@@ -17633,6 +17684,32 @@ const generatedFocusOperations = [
17633
17684
  return client.getClient(data.client_id);
17634
17685
  }
17635
17686
  },
17687
+ {
17688
+ id: "focus.clients.get-archive-preview",
17689
+ family: "focus",
17690
+ resource: "clients",
17691
+ action: "get-archive-preview",
17692
+ title: "Get Archive Preview Clients",
17693
+ description: "Get Archive Preview Clients.",
17694
+ safety: "read",
17695
+ destructive: false,
17696
+ cli: {
17697
+ group: ["clients"],
17698
+ command: "get-archive-preview",
17699
+ interactive: "available"
17700
+ },
17701
+ mcp: { entityTool: "clients" },
17702
+ inputSchema: /* @__PURE__ */ looseObject({ client_id: /* @__PURE__ */ number$2() }),
17703
+ execute: (input, { client }) => {
17704
+ const data = input;
17705
+ return client.runGeneratedRequest("getClientArchivePreview", () => callGeneratedRequest(getClientArchivePreview, [
17706
+ client.httpClient,
17707
+ client.workspaceIdNumber,
17708
+ data.client_id,
17709
+ void 0
17710
+ ]));
17711
+ }
17712
+ },
17636
17713
  {
17637
17714
  id: "focus.clients.list",
17638
17715
  family: "focus",
@@ -17680,6 +17757,32 @@ const generatedFocusOperations = [
17680
17757
  ]));
17681
17758
  }
17682
17759
  },
17760
+ {
17761
+ id: "focus.clients.unarchive",
17762
+ family: "focus",
17763
+ resource: "clients",
17764
+ action: "unarchive",
17765
+ title: "Unarchive Clients",
17766
+ description: "Unarchive Clients.",
17767
+ safety: "update",
17768
+ destructive: false,
17769
+ cli: {
17770
+ group: ["clients"],
17771
+ command: "unarchive",
17772
+ interactive: "default"
17773
+ },
17774
+ mcp: { entityTool: "clients" },
17775
+ inputSchema: /* @__PURE__ */ looseObject({ client_id: /* @__PURE__ */ number$2() }),
17776
+ execute: (input, { client }) => {
17777
+ const data = input;
17778
+ return client.runGeneratedRequest("unarchiveClient", () => callGeneratedRequest(unarchiveClient, [
17779
+ client.httpClient,
17780
+ client.workspaceIdNumber,
17781
+ data.client_id,
17782
+ void 0
17783
+ ]));
17784
+ }
17785
+ },
17683
17786
  {
17684
17787
  id: "focus.clients.update",
17685
17788
  family: "focus",
@@ -31183,4 +31286,4 @@ Common commands:
31183
31286
  //#endregion
31184
31287
  export { CommanderError as a, shutdownCliTelemetry as i, captureCliException as n, initCliTelemetry as r, createProgram as t };
31185
31288
 
31186
- //# sourceMappingURL=program-8S9qTfUo.js.map
31289
+ //# sourceMappingURL=program-DUmiaHO1.js.map
package/build/program.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as createProgram } from "./program-8S9qTfUo.js";
1
+ import { t as createProgram } from "./program-DUmiaHO1.js";
2
2
  export { createProgram };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/cli",
3
- "version": "1.13.92",
3
+ "version": "1.13.93",
4
4
  "description": "Toggl CLI for Toggl 2.0 API operations.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",