@fluid-app/v2025-06-cli-commands 0.1.31 → 0.1.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-app/v2025-06-cli-commands",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "Auto-generated CLI commands for Fluid v2025-06 API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -17,20 +17,48 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "commander": "^12.0.0",
21
- "@fluid-app/fluid-cli": "0.1.29"
20
+ "@fluid-app/fluid-cli": "0.1.30",
21
+ "commander": "^12.0.0"
22
22
  },
23
23
  "devDependencies": {
24
+ "@fluid-app/api-client-scripts": "0.0.0",
25
+ "@fluid-app/typescript-config": "0.0.0",
24
26
  "@types/node": "24.10.12",
25
27
  "tsdown": "^0.21.0",
26
28
  "tsx": "^4.21.0",
27
- "typescript": "^5",
28
- "@fluid-app/typescript-config": "0.0.0",
29
- "@fluid-app/api-client-scripts": "0.0.0"
29
+ "typescript": "^5"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=18.0.0"
33
33
  },
34
+ "nx": {
35
+ "implicitDependencies": [
36
+ "@fluid-app/v2025-06-api-client"
37
+ ],
38
+ "targets": {
39
+ "typecheck": {
40
+ "dependsOn": [
41
+ {
42
+ "target": "build",
43
+ "projects": [
44
+ "@fluid-app/fluid-cli"
45
+ ]
46
+ }
47
+ ]
48
+ },
49
+ "build": {
50
+ "dependsOn": [
51
+ "typecheck",
52
+ {
53
+ "target": "build",
54
+ "projects": [
55
+ "@fluid-app/fluid-cli"
56
+ ]
57
+ }
58
+ ]
59
+ }
60
+ }
61
+ },
34
62
  "scripts": {
35
63
  "build": "tsdown",
36
64
  "dev": "tsdown --watch",
@@ -2,13 +2,8 @@
2
2
  import { Command } from "commander";
3
3
  import type { CommandContext } from "../lib/types.js";
4
4
 
5
- export function registerCompanyContacts(
6
- parent: Command,
7
- ctx: CommandContext,
8
- ): void {
9
- const resource = parent
10
- .command("company-contacts")
11
- .description("Company Contacts");
5
+ export function registerCompanyContacts(parent: Command, ctx: CommandContext): void {
6
+ const resource = parent.command("company-contacts").description("Company Contacts");
12
7
 
13
8
  resource
14
9
  .command("create")
@@ -24,8 +19,7 @@ export function registerCompanyContacts(
24
19
  } else if (opts.body) {
25
20
  body = ctx.parseBody(opts.body);
26
21
  }
27
- if (ctx.verbose)
28
- process.stderr.write("POST " + `/api/company/contacts` + "\n");
22
+ if (ctx.verbose) process.stderr.write("POST " + `/api/company/contacts` + "\n");
29
23
  const result = await client.post(`/api/company/contacts`, body);
30
24
  ctx.output(result);
31
25
  });
@@ -36,26 +30,17 @@ export function registerCompanyContacts(
36
30
  .option("--page <value>", "Page number for pagination")
37
31
  .option("--per-page <value>", "Number of records per page")
38
32
  .option("--status <value>", "Filter contacts by status")
39
- .option(
40
- "--search-query <value>",
41
- "Search contacts by name, email, or phone",
42
- )
43
- .option(
44
- "--by-metadata <value>",
45
- "Filter contacts by metadata (JSON string)",
46
- )
33
+ .option("--search-query <value>", "Search contacts by name, email, or phone")
34
+ .option("--by-metadata <value>", "Filter contacts by metadata (JSON string)")
47
35
  .action(async (opts) => {
48
36
  const client = await ctx.getClient();
49
37
  const params: Record<string, unknown> = {};
50
38
  if (opts.page !== undefined) params["page"] = Number(opts.page);
51
39
  if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
52
40
  if (opts.status !== undefined) params["status"] = opts.status;
53
- if (opts.searchQuery !== undefined)
54
- params["search_query"] = opts.searchQuery;
55
- if (opts.byMetadata !== undefined)
56
- params["by_metadata"] = opts.byMetadata;
57
- if (ctx.verbose)
58
- process.stderr.write("GET " + `/api/company/contacts` + "\n");
41
+ if (opts.searchQuery !== undefined) params["search_query"] = opts.searchQuery;
42
+ if (opts.byMetadata !== undefined) params["by_metadata"] = opts.byMetadata;
43
+ if (ctx.verbose) process.stderr.write("GET " + `/api/company/contacts` + "\n");
59
44
  const result = await client.get(`/api/company/contacts`, params);
60
45
  ctx.output(result);
61
46
  });
@@ -65,8 +50,7 @@ export function registerCompanyContacts(
65
50
  .description("Delete a company contact")
66
51
  .action(async (id) => {
67
52
  const client = await ctx.getClient();
68
- if (ctx.verbose)
69
- process.stderr.write("DELETE " + `/api/company/contacts/${id}` + "\n");
53
+ if (ctx.verbose) process.stderr.write("DELETE " + `/api/company/contacts/${id}` + "\n");
70
54
  const result = await client.delete(`/api/company/contacts/${id}`);
71
55
  ctx.output(result);
72
56
  });
@@ -76,8 +60,7 @@ export function registerCompanyContacts(
76
60
  .description("Get a company contact")
77
61
  .action(async (id) => {
78
62
  const client = await ctx.getClient();
79
- if (ctx.verbose)
80
- process.stderr.write("GET " + `/api/company/contacts/${id}` + "\n");
63
+ if (ctx.verbose) process.stderr.write("GET " + `/api/company/contacts/${id}` + "\n");
81
64
  const result = await client.get(`/api/company/contacts/${id}`);
82
65
  ctx.output(result);
83
66
  });
@@ -96,9 +79,9 @@ export function registerCompanyContacts(
96
79
  } else if (opts.body) {
97
80
  body = ctx.parseBody(opts.body);
98
81
  }
99
- if (ctx.verbose)
100
- process.stderr.write("PATCH " + `/api/company/contacts/${id}` + "\n");
82
+ if (ctx.verbose) process.stderr.write("PATCH " + `/api/company/contacts/${id}` + "\n");
101
83
  const result = await client.patch(`/api/company/contacts/${id}`, body);
102
84
  ctx.output(result);
103
85
  });
86
+
104
87
  }