@fluid-app/v2025-06-cli-commands 0.1.336 → 0.1.338

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.
@@ -1,6 +1,6 @@
1
1
  // users-media.ts — AUTO-GENERATED, DO NOT EDIT
2
2
  import { Command } from "commander";
3
- import type { CommandContext } from "../lib/types.js";
3
+ import { declareInputs, type CommandContext } from "../lib/types.js";
4
4
 
5
5
  function parseBooleanOption(value: string, flag: string): boolean {
6
6
  const normalized = value.trim().toLowerCase();
@@ -12,7 +12,7 @@ function parseBooleanOption(value: string, flag: string): boolean {
12
12
  export function registerUsersMedia(parent: Command, ctx: CommandContext): void {
13
13
  const resource = parent.command("users-media").description("Users Media");
14
14
 
15
- resource
15
+ declareInputs(resource
16
16
  .command("list-user-media")
17
17
  .description("List user's media")
18
18
  .option("--page <value>", "Page number for pagination")
@@ -33,9 +33,9 @@ export function registerUsersMedia(parent: Command, ctx: CommandContext): void {
33
33
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/media` + "\n");
34
34
  const result = await client.get(`/api/users/v2025-06/media`, params);
35
35
  ctx.output(result);
36
- });
36
+ }), () => []);
37
37
 
38
- resource
38
+ declareInputs(resource
39
39
  .command("create-user-media")
40
40
  .description("Create a media")
41
41
  .option("--body <json>", "Request body as JSON string")
@@ -44,17 +44,16 @@ export function registerUsersMedia(parent: Command, ctx: CommandContext): void {
44
44
  const client = await ctx.getClient();
45
45
  let body: unknown;
46
46
  if (opts.bodyFile) {
47
- const { readFileSync } = await import("fs");
48
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
47
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
49
48
  } else if (opts.body) {
50
49
  body = ctx.parseBody(opts.body);
51
50
  }
52
51
  if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/media` + "\n");
53
52
  const result = await client.post(`/api/users/v2025-06/media`, body);
54
53
  ctx.output(result);
55
- });
54
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
56
55
 
57
- resource
56
+ declareInputs(resource
58
57
  .command("get-user-media <id>")
59
58
  .description("Get a media")
60
59
  .action(async (id) => {
@@ -62,9 +61,9 @@ export function registerUsersMedia(parent: Command, ctx: CommandContext): void {
62
61
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/media/${id}` + "\n");
63
62
  const result = await client.get(`/api/users/v2025-06/media/${id}`);
64
63
  ctx.output(result);
65
- });
64
+ }), () => []);
66
65
 
67
- resource
66
+ declareInputs(resource
68
67
  .command("update-user-media <id>")
69
68
  .description("Update a media")
70
69
  .option("--body <json>", "Request body as JSON string")
@@ -73,17 +72,16 @@ export function registerUsersMedia(parent: Command, ctx: CommandContext): void {
73
72
  const client = await ctx.getClient();
74
73
  let body: unknown;
75
74
  if (opts.bodyFile) {
76
- const { readFileSync } = await import("fs");
77
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
75
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
78
76
  } else if (opts.body) {
79
77
  body = ctx.parseBody(opts.body);
80
78
  }
81
79
  if (ctx.verbose) process.stderr.write("PATCH " + `/api/users/v2025-06/media/${id}` + "\n");
82
80
  const result = await client.patch(`/api/users/v2025-06/media/${id}`, body);
83
81
  ctx.output(result);
84
- });
82
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
85
83
 
86
- resource
84
+ declareInputs(resource
87
85
  .command("delete-user-media <id>")
88
86
  .description("Delete a media")
89
87
  .action(async (id) => {
@@ -91,6 +89,6 @@ export function registerUsersMedia(parent: Command, ctx: CommandContext): void {
91
89
  if (ctx.verbose) process.stderr.write("DELETE " + `/api/users/v2025-06/media/${id}` + "\n");
92
90
  const result = await client.delete(`/api/users/v2025-06/media/${id}`);
93
91
  ctx.output(result);
94
- });
92
+ }), () => []);
95
93
 
96
94
  }
@@ -1,11 +1,11 @@
1
1
  // users-notes.ts — AUTO-GENERATED, DO NOT EDIT
2
2
  import { Command } from "commander";
3
- import type { CommandContext } from "../lib/types.js";
3
+ import { declareInputs, type CommandContext } from "../lib/types.js";
4
4
 
5
5
  export function registerUsersNotes(parent: Command, ctx: CommandContext): void {
6
6
  const resource = parent.command("users-notes").description("Users Notes");
7
7
 
8
- resource
8
+ declareInputs(resource
9
9
  .command("create-user-note")
10
10
  .description("Create a note for a contact")
11
11
  .option("--body <json>", "Request body as JSON string")
@@ -14,17 +14,16 @@ export function registerUsersNotes(parent: Command, ctx: CommandContext): void {
14
14
  const client = await ctx.getClient();
15
15
  let body: unknown;
16
16
  if (opts.bodyFile) {
17
- const { readFileSync } = await import("fs");
18
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
17
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
19
18
  } else if (opts.body) {
20
19
  body = ctx.parseBody(opts.body);
21
20
  }
22
21
  if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/notes` + "\n");
23
22
  const result = await client.post(`/api/users/v2025-06/notes`, body);
24
23
  ctx.output(result);
25
- });
24
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
26
25
 
27
- resource
26
+ declareInputs(resource
28
27
  .command("list-user-notes")
29
28
  .description("List notes for a contact")
30
29
  .option("--contact-id <value>", "Contact ID")
@@ -39,9 +38,9 @@ export function registerUsersNotes(parent: Command, ctx: CommandContext): void {
39
38
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/notes` + "\n");
40
39
  const result = await client.get(`/api/users/v2025-06/notes`, params);
41
40
  ctx.output(result);
42
- });
41
+ }), () => []);
43
42
 
44
- resource
43
+ declareInputs(resource
45
44
  .command("delete-user-note <id>")
46
45
  .description("Delete a note")
47
46
  .option("--contact-id <value>", "Contact ID")
@@ -52,9 +51,9 @@ export function registerUsersNotes(parent: Command, ctx: CommandContext): void {
52
51
  if (ctx.verbose) process.stderr.write("DELETE " + `/api/users/v2025-06/notes/${id}` + "\n");
53
52
  const result = await client.delete(`/api/users/v2025-06/notes/${id}`, { params });
54
53
  ctx.output(result);
55
- });
54
+ }), () => []);
56
55
 
57
- resource
56
+ declareInputs(resource
58
57
  .command("get-user-note <id>")
59
58
  .description("Get a note")
60
59
  .option("--contact-id <value>", "Contact ID")
@@ -65,9 +64,9 @@ export function registerUsersNotes(parent: Command, ctx: CommandContext): void {
65
64
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/notes/${id}` + "\n");
66
65
  const result = await client.get(`/api/users/v2025-06/notes/${id}`, params);
67
66
  ctx.output(result);
68
- });
67
+ }), () => []);
69
68
 
70
- resource
69
+ declareInputs(resource
71
70
  .command("update-user-note <id>")
72
71
  .description("Update a note")
73
72
  .option("--body <json>", "Request body as JSON string")
@@ -76,14 +75,13 @@ export function registerUsersNotes(parent: Command, ctx: CommandContext): void {
76
75
  const client = await ctx.getClient();
77
76
  let body: unknown;
78
77
  if (opts.bodyFile) {
79
- const { readFileSync } = await import("fs");
80
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
78
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
81
79
  } else if (opts.body) {
82
80
  body = ctx.parseBody(opts.body);
83
81
  }
84
82
  if (ctx.verbose) process.stderr.write("PATCH " + `/api/users/v2025-06/notes/${id}` + "\n");
85
83
  const result = await client.patch(`/api/users/v2025-06/notes/${id}`, body);
86
84
  ctx.output(result);
87
- });
85
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
88
86
 
89
87
  }
@@ -1,11 +1,11 @@
1
1
  // users-playlists.ts — AUTO-GENERATED, DO NOT EDIT
2
2
  import { Command } from "commander";
3
- import type { CommandContext } from "../lib/types.js";
3
+ import { declareInputs, type CommandContext } from "../lib/types.js";
4
4
 
5
5
  export function registerUsersPlaylists(parent: Command, ctx: CommandContext): void {
6
6
  const resource = parent.command("users-playlists").description("Users Playlists");
7
7
 
8
- resource
8
+ declareInputs(resource
9
9
  .command("create-user-playlist")
10
10
  .description("Create a playlist")
11
11
  .option("--body <json>", "Request body as JSON string")
@@ -14,17 +14,16 @@ export function registerUsersPlaylists(parent: Command, ctx: CommandContext): vo
14
14
  const client = await ctx.getClient();
15
15
  let body: unknown;
16
16
  if (opts.bodyFile) {
17
- const { readFileSync } = await import("fs");
18
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
17
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
19
18
  } else if (opts.body) {
20
19
  body = ctx.parseBody(opts.body);
21
20
  }
22
21
  if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/playlists` + "\n");
23
22
  const result = await client.post(`/api/users/v2025-06/playlists`, body);
24
23
  ctx.output(result);
25
- });
24
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
26
25
 
27
- resource
26
+ declareInputs(resource
28
27
  .command("list-user-playlists")
29
28
  .description("List user's playlists")
30
29
  .option("--page-cursor <value>", "Cursor for pagination")
@@ -43,9 +42,9 @@ export function registerUsersPlaylists(parent: Command, ctx: CommandContext): vo
43
42
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/playlists` + "\n");
44
43
  const result = await client.get(`/api/users/v2025-06/playlists`, params);
45
44
  ctx.output(result);
46
- });
45
+ }), () => []);
47
46
 
48
- resource
47
+ declareInputs(resource
49
48
  .command("delete-user-playlist <id>")
50
49
  .description("Delete a playlist")
51
50
  .action(async (id) => {
@@ -53,9 +52,9 @@ export function registerUsersPlaylists(parent: Command, ctx: CommandContext): vo
53
52
  if (ctx.verbose) process.stderr.write("DELETE " + `/api/users/v2025-06/playlists/${id}` + "\n");
54
53
  const result = await client.delete(`/api/users/v2025-06/playlists/${id}`);
55
54
  ctx.output(result);
56
- });
55
+ }), () => []);
57
56
 
58
- resource
57
+ declareInputs(resource
59
58
  .command("get-user-playlist <id>")
60
59
  .description("Get a playlist")
61
60
  .action(async (id) => {
@@ -63,9 +62,9 @@ export function registerUsersPlaylists(parent: Command, ctx: CommandContext): vo
63
62
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/playlists/${id}` + "\n");
64
63
  const result = await client.get(`/api/users/v2025-06/playlists/${id}`);
65
64
  ctx.output(result);
66
- });
65
+ }), () => []);
67
66
 
68
- resource
67
+ declareInputs(resource
69
68
  .command("update-user-playlist <id>")
70
69
  .description("Update a playlist")
71
70
  .option("--body <json>", "Request body as JSON string")
@@ -74,14 +73,13 @@ export function registerUsersPlaylists(parent: Command, ctx: CommandContext): vo
74
73
  const client = await ctx.getClient();
75
74
  let body: unknown;
76
75
  if (opts.bodyFile) {
77
- const { readFileSync } = await import("fs");
78
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
76
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
79
77
  } else if (opts.body) {
80
78
  body = ctx.parseBody(opts.body);
81
79
  }
82
80
  if (ctx.verbose) process.stderr.write("PATCH " + `/api/users/v2025-06/playlists/${id}` + "\n");
83
81
  const result = await client.patch(`/api/users/v2025-06/playlists/${id}`, body);
84
82
  ctx.output(result);
85
- });
83
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
86
84
 
87
85
  }
@@ -1,6 +1,6 @@
1
1
  // users-products.ts — AUTO-GENERATED, DO NOT EDIT
2
2
  import { Command } from "commander";
3
- import type { CommandContext } from "../lib/types.js";
3
+ import { declareInputs, type CommandContext } from "../lib/types.js";
4
4
 
5
5
  function parseBooleanOption(value: string, flag: string): boolean {
6
6
  const normalized = value.trim().toLowerCase();
@@ -16,7 +16,7 @@ function parseArrayOption(value: string): string[] {
16
16
  export function registerUsersProducts(parent: Command, ctx: CommandContext): void {
17
17
  const resource = parent.command("users-products").description("Users Products");
18
18
 
19
- resource
19
+ declareInputs(resource
20
20
  .command("list-user-products")
21
21
  .description("List products")
22
22
  .option("--page <value>", "Page number for pagination")
@@ -45,9 +45,9 @@ export function registerUsersProducts(parent: Command, ctx: CommandContext): voi
45
45
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/products` + "\n");
46
46
  const result = await client.get(`/api/users/v2025-06/products`, params);
47
47
  ctx.output(result);
48
- });
48
+ }), () => []);
49
49
 
50
- resource
50
+ declareInputs(resource
51
51
  .command("get-user-product <id>")
52
52
  .description("Get a product")
53
53
  .action(async (id) => {
@@ -55,6 +55,6 @@ export function registerUsersProducts(parent: Command, ctx: CommandContext): voi
55
55
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/products/${id}` + "\n");
56
56
  const result = await client.get(`/api/users/v2025-06/products/${id}`);
57
57
  ctx.output(result);
58
- });
58
+ }), () => []);
59
59
 
60
60
  }
@@ -1,11 +1,11 @@
1
1
  // users-tasks.ts — AUTO-GENERATED, DO NOT EDIT
2
2
  import { Command } from "commander";
3
- import type { CommandContext } from "../lib/types.js";
3
+ import { declareInputs, type CommandContext } from "../lib/types.js";
4
4
 
5
5
  export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
6
6
  const resource = parent.command("users-tasks").description("Users Tasks");
7
7
 
8
- resource
8
+ declareInputs(resource
9
9
  .command("complete-user-task <id>")
10
10
  .description("Toggle task completion")
11
11
  .action(async (id) => {
@@ -13,9 +13,9 @@ export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
13
13
  if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/tasks/${id}/complete` + "\n");
14
14
  const result = await client.post(`/api/users/v2025-06/tasks/${id}/complete`);
15
15
  ctx.output(result);
16
- });
16
+ }), () => []);
17
17
 
18
- resource
18
+ declareInputs(resource
19
19
  .command("create-user-task")
20
20
  .description("Create a task")
21
21
  .option("--body <json>", "Request body as JSON string")
@@ -24,17 +24,16 @@ export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
24
24
  const client = await ctx.getClient();
25
25
  let body: unknown;
26
26
  if (opts.bodyFile) {
27
- const { readFileSync } = await import("fs");
28
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
27
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
29
28
  } else if (opts.body) {
30
29
  body = ctx.parseBody(opts.body);
31
30
  }
32
31
  if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/tasks` + "\n");
33
32
  const result = await client.post(`/api/users/v2025-06/tasks`, body);
34
33
  ctx.output(result);
35
- });
34
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
36
35
 
37
- resource
36
+ declareInputs(resource
38
37
  .command("list-user-tasks")
39
38
  .description("List tasks for the current user")
40
39
  .option("--page <value>", "Page number")
@@ -51,9 +50,9 @@ export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
51
50
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/tasks` + "\n");
52
51
  const result = await client.get(`/api/users/v2025-06/tasks`, params);
53
52
  ctx.output(result);
54
- });
53
+ }), () => []);
55
54
 
56
- resource
55
+ declareInputs(resource
57
56
  .command("delete-user-task <id>")
58
57
  .description("Delete a task")
59
58
  .action(async (id) => {
@@ -61,9 +60,9 @@ export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
61
60
  if (ctx.verbose) process.stderr.write("DELETE " + `/api/users/v2025-06/tasks/${id}` + "\n");
62
61
  const result = await client.delete(`/api/users/v2025-06/tasks/${id}`);
63
62
  ctx.output(result);
64
- });
63
+ }), () => []);
65
64
 
66
- resource
65
+ declareInputs(resource
67
66
  .command("get-user-task <id>")
68
67
  .description("Get a task")
69
68
  .action(async (id) => {
@@ -71,9 +70,9 @@ export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
71
70
  if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/tasks/${id}` + "\n");
72
71
  const result = await client.get(`/api/users/v2025-06/tasks/${id}`);
73
72
  ctx.output(result);
74
- });
73
+ }), () => []);
75
74
 
76
- resource
75
+ declareInputs(resource
77
76
  .command("update-user-task <id>")
78
77
  .description("Update a task")
79
78
  .option("--body <json>", "Request body as JSON string")
@@ -82,14 +81,13 @@ export function registerUsersTasks(parent: Command, ctx: CommandContext): void {
82
81
  const client = await ctx.getClient();
83
82
  let body: unknown;
84
83
  if (opts.bodyFile) {
85
- const { readFileSync } = await import("fs");
86
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
84
+ body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
87
85
  } else if (opts.body) {
88
86
  body = ctx.parseBody(opts.body);
89
87
  }
90
88
  if (ctx.verbose) process.stderr.write("PATCH " + `/api/users/v2025-06/tasks/${id}` + "\n");
91
89
  const result = await client.patch(`/api/users/v2025-06/tasks/${id}`, body);
92
90
  ctx.output(result);
93
- });
91
+ }), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
94
92
 
95
93
  }