@fluid-app/v2025-06-cli-commands 0.1.7 → 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.
@@ -20,9 +20,7 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
20
20
  body = ctx.parseBody(opts.body);
21
21
  }
22
22
  if (ctx.verbose)
23
- process.stderr.write(
24
- `POST ${new URL(`/api/v2025-06/customers`, "https://placeholder").pathname}\n`,
25
- );
23
+ process.stderr.write("POST " + `/api/v2025-06/customers` + "\n");
26
24
  const result = await client.post(`/api/v2025-06/customers`, body);
27
25
  ctx.output(result);
28
26
  });
@@ -30,15 +28,16 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
30
28
  resource
31
29
  .command("list")
32
30
  .description("List customers")
33
- .option("--params <value>", "params")
31
+ .option(
32
+ "--params <value>",
33
+ "Query parameters for filtering, pagination, and sorting",
34
+ )
34
35
  .action(async (opts) => {
35
36
  const client = await ctx.getClient();
36
37
  const params: Record<string, unknown> = {};
37
38
  if (opts.params !== undefined) params["params"] = opts.params;
38
39
  if (ctx.verbose)
39
- process.stderr.write(
40
- `GET ${new URL(`/api/v2025-06/customers`, "https://placeholder").pathname}\n`,
41
- );
40
+ process.stderr.write("GET " + `/api/v2025-06/customers` + "\n");
42
41
  const result = await client.get(`/api/v2025-06/customers`, params);
43
42
  ctx.output(result);
44
43
  });
@@ -46,11 +45,11 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
46
45
  resource
47
46
  .command("delete <id>")
48
47
  .description("Delete a customer")
49
- .action(async (id, opts) => {
48
+ .action(async (id) => {
50
49
  const client = await ctx.getClient();
51
50
  if (ctx.verbose)
52
51
  process.stderr.write(
53
- `DELETE ${new URL(`/api/v2025-06/customers/${id}`, "https://placeholder").pathname}\n`,
52
+ "DELETE " + `/api/v2025-06/customers/${id}` + "\n",
54
53
  );
55
54
  const result = await client.delete(`/api/v2025-06/customers/${id}`);
56
55
  ctx.output(result);
@@ -59,12 +58,10 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
59
58
  resource
60
59
  .command("get <id>")
61
60
  .description("Get a customer")
62
- .action(async (id, opts) => {
61
+ .action(async (id) => {
63
62
  const client = await ctx.getClient();
64
63
  if (ctx.verbose)
65
- process.stderr.write(
66
- `GET ${new URL(`/api/v2025-06/customers/${id}`, "https://placeholder").pathname}\n`,
67
- );
64
+ process.stderr.write("GET " + `/api/v2025-06/customers/${id}` + "\n");
68
65
  const result = await client.get(`/api/v2025-06/customers/${id}`);
69
66
  ctx.output(result);
70
67
  });
@@ -84,9 +81,7 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
84
81
  body = ctx.parseBody(opts.body);
85
82
  }
86
83
  if (ctx.verbose)
87
- process.stderr.write(
88
- `PATCH ${new URL(`/api/v2025-06/customers/${id}`, "https://placeholder").pathname}\n`,
89
- );
84
+ process.stderr.write("PATCH " + `/api/v2025-06/customers/${id}` + "\n");
90
85
  const result = await client.patch(`/api/v2025-06/customers/${id}`, body);
91
86
  ctx.output(result);
92
87
  });
@@ -106,9 +101,7 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
106
101
  body = ctx.parseBody(opts.body);
107
102
  }
108
103
  if (ctx.verbose)
109
- process.stderr.write(
110
- `POST ${new URL(`/api/v2025-06/customers/bulk`, "https://placeholder").pathname}\n`,
111
- );
104
+ process.stderr.write("POST " + `/api/v2025-06/customers/bulk` + "\n");
112
105
  const result = await client.post(`/api/v2025-06/customers/bulk`, body);
113
106
  ctx.output(result);
114
107
  });
@@ -128,9 +121,7 @@ export function registerCustomers(parent: Command, ctx: CommandContext): void {
128
121
  body = ctx.parseBody(opts.body);
129
122
  }
130
123
  if (ctx.verbose)
131
- process.stderr.write(
132
- `DELETE ${new URL(`/api/v2025-06/customers/bulk`, "https://placeholder").pathname}\n`,
133
- );
124
+ process.stderr.write("DELETE " + `/api/v2025-06/customers/bulk` + "\n");
134
125
  const result = await client.delete(`/api/v2025-06/customers/bulk`, {
135
126
  body,
136
127
  });
@@ -8,11 +8,11 @@ export function registerDefault(parent: Command, ctx: CommandContext): void {
8
8
  resource
9
9
  .command("get-order-journey-events <order-id>")
10
10
  .description("Get order journey events")
11
- .action(async (orderId, opts) => {
11
+ .action(async (orderId) => {
12
12
  const client = await ctx.getClient();
13
13
  if (ctx.verbose)
14
14
  process.stderr.write(
15
- `GET ${new URL(`/api/v202506/orders/${orderId}/journey/events`, "https://placeholder").pathname}\n`,
15
+ "GET " + `/api/v202506/orders/${orderId}/journey/events` + "\n",
16
16
  );
17
17
  const result = await client.get(
18
18
  `/api/v202506/orders/${orderId}/journey/events`,
@@ -23,11 +23,11 @@ export function registerDefault(parent: Command, ctx: CommandContext): void {
23
23
  resource
24
24
  .command("get-order-journey <order-id>")
25
25
  .description("Get an order journey")
26
- .action(async (orderId, opts) => {
26
+ .action(async (orderId) => {
27
27
  const client = await ctx.getClient();
28
28
  if (ctx.verbose)
29
29
  process.stderr.write(
30
- `GET ${new URL(`/api/v202506/orders/${orderId}/journey`, "https://placeholder").pathname}\n`,
30
+ "GET " + `/api/v202506/orders/${orderId}/journey` + "\n",
31
31
  );
32
32
  const result = await client.get(`/api/v202506/orders/${orderId}/journey`);
33
33
  ctx.output(result);
@@ -11,20 +11,20 @@ export function registerEmailSettings(
11
11
  .description("Email Settings");
12
12
 
13
13
  resource
14
- .command("get-company-email-settings")
14
+ .command("get-company")
15
15
  .description("returns company email settings")
16
- .action(async (opts) => {
16
+ .action(async () => {
17
17
  const client = await ctx.getClient();
18
18
  if (ctx.verbose)
19
19
  process.stderr.write(
20
- `GET ${new URL(`/api/v2025-06/company-email-settings`, "https://placeholder").pathname}\n`,
20
+ "GET " + `/api/v2025-06/company-email-settings` + "\n",
21
21
  );
22
22
  const result = await client.get(`/api/v2025-06/company-email-settings`);
23
23
  ctx.output(result);
24
24
  });
25
25
 
26
26
  resource
27
- .command("update-company-email-settings <id>")
27
+ .command("update-company <id>")
28
28
  .description("updates company email settings")
29
29
  .option("--body <json>", "Request body as JSON string")
30
30
  .option("--body-file <path>", "Read request body from file")
@@ -39,7 +39,7 @@ export function registerEmailSettings(
39
39
  }
40
40
  if (ctx.verbose)
41
41
  process.stderr.write(
42
- `PATCH ${new URL(`/api/v2025-06/company-email-settings/${id}`, "https://placeholder").pathname}\n`,
42
+ "PATCH " + `/api/v2025-06/company-email-settings/${id}` + "\n",
43
43
  );
44
44
  const result = await client.patch(
45
45
  `/api/v2025-06/company-email-settings/${id}`,
@@ -20,7 +20,9 @@ export function registerEnrollmentPackMedia(
20
20
  if (opts.page !== undefined) params["page"] = opts.page;
21
21
  if (ctx.verbose)
22
22
  process.stderr.write(
23
- `GET ${new URL(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`, "https://placeholder").pathname}\n`,
23
+ "GET " +
24
+ `/api/v2025-06/enrollment_packs/${enrollmentPackId}/media` +
25
+ "\n",
24
26
  );
25
27
  const result = await client.get(
26
28
  `/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`,
@@ -45,7 +47,9 @@ export function registerEnrollmentPackMedia(
45
47
  }
46
48
  if (ctx.verbose)
47
49
  process.stderr.write(
48
- `POST ${new URL(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`, "https://placeholder").pathname}\n`,
50
+ "POST " +
51
+ `/api/v2025-06/enrollment_packs/${enrollmentPackId}/media` +
52
+ "\n",
49
53
  );
50
54
  const result = await client.post(
51
55
  `/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`,
@@ -57,11 +61,13 @@ export function registerEnrollmentPackMedia(
57
61
  resource
58
62
  .command("delete <enrollment-pack-id> <id>")
59
63
  .description("Medium removed from enrollment pack")
60
- .action(async (enrollmentPackId, id, opts) => {
64
+ .action(async (enrollmentPackId, id) => {
61
65
  const client = await ctx.getClient();
62
66
  if (ctx.verbose)
63
67
  process.stderr.write(
64
- `DELETE ${new URL(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}`, "https://placeholder").pathname}\n`,
68
+ "DELETE " +
69
+ `/api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}` +
70
+ "\n",
65
71
  );
66
72
  const result = await client.delete(
67
73
  `/api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}`,
@@ -13,11 +13,11 @@ export function registerFairShareSettings(
13
13
  resource
14
14
  .command("get")
15
15
  .description("Get Fair Share settings")
16
- .action(async (opts) => {
16
+ .action(async () => {
17
17
  const client = await ctx.getClient();
18
18
  if (ctx.verbose)
19
19
  process.stderr.write(
20
- `GET ${new URL(`/api/v2025-06/fairshare/settings`, "https://placeholder").pathname}\n`,
20
+ "GET " + `/api/v2025-06/fairshare/settings` + "\n",
21
21
  );
22
22
  const result = await client.get(`/api/v2025-06/fairshare/settings`);
23
23
  ctx.output(result);
@@ -39,7 +39,7 @@ export function registerFairShareSettings(
39
39
  }
40
40
  if (ctx.verbose)
41
41
  process.stderr.write(
42
- `PATCH ${new URL(`/api/v2025-06/fairshare/settings`, "https://placeholder").pathname}\n`,
42
+ "PATCH " + `/api/v2025-06/fairshare/settings` + "\n",
43
43
  );
44
44
  const result = await client.patch(
45
45
  `/api/v2025-06/fairshare/settings`,
@@ -11,15 +11,18 @@ import { registerFairShareSettings } from "./fair-share-settings.js";
11
11
  import { registerLighthouse } from "./lighthouse.js";
12
12
  import { registerMediaEnrollmentPacks } from "./media-enrollment-packs.js";
13
13
  import { registerMediaProducts } from "./media-products.js";
14
+ import { registerOrders } from "./orders.js";
14
15
  import { registerPartnerTokens } from "./partner-tokens.js";
15
16
  import { registerPlaylists } from "./playlists.js";
16
17
  import { registerProductMedia } from "./product-media.js";
17
18
  import { registerReps } from "./reps.js";
18
19
  import { registerShareStatistics } from "./share-statistics.js";
20
+ import { registerUsersBrandGuidelines } from "./users-brand-guidelines.js";
19
21
  import { registerUsersContacts } from "./users-contacts.js";
20
22
  import { registerUsersMedia } from "./users-media.js";
21
23
  import { registerUsersNotes } from "./users-notes.js";
22
24
  import { registerUsersPlaylists } from "./users-playlists.js";
25
+ import { registerUsersProducts } from "./users-products.js";
23
26
  import { registerUsersTasks } from "./users-tasks.js";
24
27
  import { registerWidgets } from "./widgets.js";
25
28
  import { registerDefault } from "./default.js";
@@ -37,15 +40,18 @@ export function registerAllCommands(
37
40
  registerLighthouse(parent, ctx);
38
41
  registerMediaEnrollmentPacks(parent, ctx);
39
42
  registerMediaProducts(parent, ctx);
43
+ registerOrders(parent, ctx);
40
44
  registerPartnerTokens(parent, ctx);
41
45
  registerPlaylists(parent, ctx);
42
46
  registerProductMedia(parent, ctx);
43
47
  registerReps(parent, ctx);
44
48
  registerShareStatistics(parent, ctx);
49
+ registerUsersBrandGuidelines(parent, ctx);
45
50
  registerUsersContacts(parent, ctx);
46
51
  registerUsersMedia(parent, ctx);
47
52
  registerUsersNotes(parent, ctx);
48
53
  registerUsersPlaylists(parent, ctx);
54
+ registerUsersProducts(parent, ctx);
49
55
  registerUsersTasks(parent, ctx);
50
56
  registerWidgets(parent, ctx);
51
57
  registerDefault(parent, ctx);