@fluid-app/v2025-06-cli-commands 0.1.8 → 0.1.9

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.8",
3
+ "version": "0.1.9",
4
4
  "description": "Auto-generated CLI commands for Fluid v2025-06 API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -25,8 +25,8 @@
25
25
  "tsdown": "^0.21.0",
26
26
  "tsx": "^4.21.0",
27
27
  "typescript": "^5",
28
- "@fluid-app/typescript-config": "0.0.0",
29
- "@fluid-app/api-client-scripts": "0.0.0"
28
+ "@fluid-app/api-client-scripts": "0.0.0",
29
+ "@fluid-app/typescript-config": "0.0.0"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=18.0.0"
@@ -25,9 +25,7 @@ export function registerCompanyContacts(
25
25
  body = ctx.parseBody(opts.body);
26
26
  }
27
27
  if (ctx.verbose)
28
- process.stderr.write(
29
- `POST ${new URL(`/api/company/contacts`, "https://placeholder").pathname}\n`,
30
- );
28
+ process.stderr.write("POST " + `/api/company/contacts` + "\n");
31
29
  const result = await client.post(`/api/company/contacts`, body);
32
30
  ctx.output(result);
33
31
  });
@@ -35,11 +33,17 @@ export function registerCompanyContacts(
35
33
  resource
36
34
  .command("list")
37
35
  .description("List company contacts")
38
- .option("--page <value>", "page")
39
- .option("--per-page <value>", "per_page")
40
- .option("--status <value>", "status")
41
- .option("--search-query <value>", "search_query")
42
- .option("--by-metadata <value>", "by_metadata")
36
+ .option("--page <value>", "Page number for pagination")
37
+ .option("--per-page <value>", "Number of records per page")
38
+ .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
+ )
43
47
  .action(async (opts) => {
44
48
  const client = await ctx.getClient();
45
49
  const params: Record<string, unknown> = {};
@@ -51,9 +55,7 @@ export function registerCompanyContacts(
51
55
  if (opts.byMetadata !== undefined)
52
56
  params["by_metadata"] = opts.byMetadata;
53
57
  if (ctx.verbose)
54
- process.stderr.write(
55
- `GET ${new URL(`/api/company/contacts`, "https://placeholder").pathname}\n`,
56
- );
58
+ process.stderr.write("GET " + `/api/company/contacts` + "\n");
57
59
  const result = await client.get(`/api/company/contacts`, params);
58
60
  ctx.output(result);
59
61
  });
@@ -61,12 +63,10 @@ export function registerCompanyContacts(
61
63
  resource
62
64
  .command("delete <id>")
63
65
  .description("Delete a company contact")
64
- .action(async (id, opts) => {
66
+ .action(async (id) => {
65
67
  const client = await ctx.getClient();
66
68
  if (ctx.verbose)
67
- process.stderr.write(
68
- `DELETE ${new URL(`/api/company/contacts/${id}`, "https://placeholder").pathname}\n`,
69
- );
69
+ process.stderr.write("DELETE " + `/api/company/contacts/${id}` + "\n");
70
70
  const result = await client.delete(`/api/company/contacts/${id}`);
71
71
  ctx.output(result);
72
72
  });
@@ -74,12 +74,10 @@ export function registerCompanyContacts(
74
74
  resource
75
75
  .command("get <id>")
76
76
  .description("Get a company contact")
77
- .action(async (id, opts) => {
77
+ .action(async (id) => {
78
78
  const client = await ctx.getClient();
79
79
  if (ctx.verbose)
80
- process.stderr.write(
81
- `GET ${new URL(`/api/company/contacts/${id}`, "https://placeholder").pathname}\n`,
82
- );
80
+ process.stderr.write("GET " + `/api/company/contacts/${id}` + "\n");
83
81
  const result = await client.get(`/api/company/contacts/${id}`);
84
82
  ctx.output(result);
85
83
  });
@@ -99,9 +97,7 @@ export function registerCompanyContacts(
99
97
  body = ctx.parseBody(opts.body);
100
98
  }
101
99
  if (ctx.verbose)
102
- process.stderr.write(
103
- `PATCH ${new URL(`/api/company/contacts/${id}`, "https://placeholder").pathname}\n`,
104
- );
100
+ process.stderr.write("PATCH " + `/api/company/contacts/${id}` + "\n");
105
101
  const result = await client.patch(`/api/company/contacts/${id}`, body);
106
102
  ctx.output(result);
107
103
  });