@fluid-app/v2025-06-cli-commands 0.1.0
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/.turbo/turbo-build.log +18 -0
- package/dist/index.d.mts +7 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1969 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +42 -0
- package/scripts/generate-cli-commands.ts +17 -0
- package/src/generated/company-contacts.ts +108 -0
- package/src/generated/compliance.ts +819 -0
- package/src/generated/customers.ts +139 -0
- package/src/generated/default.ts +35 -0
- package/src/generated/email-settings.ts +50 -0
- package/src/generated/enrollment-pack-media.ts +71 -0
- package/src/generated/fair-share-settings.ts +50 -0
- package/src/generated/index.ts +52 -0
- package/src/generated/lighthouse.ts +819 -0
- package/src/generated/media-enrollment-packs.ts +71 -0
- package/src/generated/media-products.ts +71 -0
- package/src/generated/partner-tokens.ts +184 -0
- package/src/generated/playlists.ts +202 -0
- package/src/generated/product-media.ts +69 -0
- package/src/generated/reps.ts +307 -0
- package/src/generated/share-statistics.ts +126 -0
- package/src/generated/users-contacts.ts +300 -0
- package/src/generated/users-media.ts +115 -0
- package/src/generated/users-notes.ts +114 -0
- package/src/generated/users-playlists.ts +113 -0
- package/src/generated/users-tasks.ts +118 -0
- package/src/generated/widgets.ts +423 -0
- package/src/index.ts +20 -0
- package/src/lib/types.ts +2 -0
- package/tsconfig.json +10 -0
- package/tsdown.config.ts +12 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// customers.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerCustomers(parent: Command, ctx: CommandContext): void {
|
|
6
|
+
const resource = parent.command("customers").description("Customers");
|
|
7
|
+
|
|
8
|
+
resource
|
|
9
|
+
.command("create")
|
|
10
|
+
.description("Create a customer")
|
|
11
|
+
.option("--body <json>", "Request body as JSON string")
|
|
12
|
+
.option("--body-file <path>", "Read request body from file")
|
|
13
|
+
.action(async (opts) => {
|
|
14
|
+
const client = await ctx.getClient();
|
|
15
|
+
let body: unknown;
|
|
16
|
+
if (opts.bodyFile) {
|
|
17
|
+
const { readFileSync } = await import("fs");
|
|
18
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
19
|
+
} else if (opts.body) {
|
|
20
|
+
body = ctx.parseBody(opts.body);
|
|
21
|
+
}
|
|
22
|
+
if (ctx.verbose)
|
|
23
|
+
process.stderr.write(
|
|
24
|
+
`POST ${new URL(`/api/v2025-06/customers`, "https://placeholder").pathname}\n`,
|
|
25
|
+
);
|
|
26
|
+
const result = await client.post(`/api/v2025-06/customers`, body);
|
|
27
|
+
ctx.output(result);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
resource
|
|
31
|
+
.command("list")
|
|
32
|
+
.description("List customers")
|
|
33
|
+
.option("--params <value>", "params")
|
|
34
|
+
.action(async (opts) => {
|
|
35
|
+
const client = await ctx.getClient();
|
|
36
|
+
const params: Record<string, unknown> = {};
|
|
37
|
+
if (opts.params !== undefined) params["params"] = opts.params;
|
|
38
|
+
if (ctx.verbose)
|
|
39
|
+
process.stderr.write(
|
|
40
|
+
`GET ${new URL(`/api/v2025-06/customers`, "https://placeholder").pathname}\n`,
|
|
41
|
+
);
|
|
42
|
+
const result = await client.get(`/api/v2025-06/customers`, params);
|
|
43
|
+
ctx.output(result);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
resource
|
|
47
|
+
.command("delete <id>")
|
|
48
|
+
.description("Delete a customer")
|
|
49
|
+
.action(async (id, opts) => {
|
|
50
|
+
const client = await ctx.getClient();
|
|
51
|
+
if (ctx.verbose)
|
|
52
|
+
process.stderr.write(
|
|
53
|
+
`DELETE ${new URL(`/api/v2025-06/customers/${id}`, "https://placeholder").pathname}\n`,
|
|
54
|
+
);
|
|
55
|
+
const result = await client.delete(`/api/v2025-06/customers/${id}`);
|
|
56
|
+
ctx.output(result);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
resource
|
|
60
|
+
.command("get <id>")
|
|
61
|
+
.description("Get a customer")
|
|
62
|
+
.action(async (id, opts) => {
|
|
63
|
+
const client = await ctx.getClient();
|
|
64
|
+
if (ctx.verbose)
|
|
65
|
+
process.stderr.write(
|
|
66
|
+
`GET ${new URL(`/api/v2025-06/customers/${id}`, "https://placeholder").pathname}\n`,
|
|
67
|
+
);
|
|
68
|
+
const result = await client.get(`/api/v2025-06/customers/${id}`);
|
|
69
|
+
ctx.output(result);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
resource
|
|
73
|
+
.command("update <id>")
|
|
74
|
+
.description("Update a customer")
|
|
75
|
+
.option("--body <json>", "Request body as JSON string")
|
|
76
|
+
.option("--body-file <path>", "Read request body from file")
|
|
77
|
+
.action(async (id, opts) => {
|
|
78
|
+
const client = await ctx.getClient();
|
|
79
|
+
let body: unknown;
|
|
80
|
+
if (opts.bodyFile) {
|
|
81
|
+
const { readFileSync } = await import("fs");
|
|
82
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
83
|
+
} else if (opts.body) {
|
|
84
|
+
body = ctx.parseBody(opts.body);
|
|
85
|
+
}
|
|
86
|
+
if (ctx.verbose)
|
|
87
|
+
process.stderr.write(
|
|
88
|
+
`PATCH ${new URL(`/api/v2025-06/customers/${id}`, "https://placeholder").pathname}\n`,
|
|
89
|
+
);
|
|
90
|
+
const result = await client.patch(`/api/v2025-06/customers/${id}`, body);
|
|
91
|
+
ctx.output(result);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
resource
|
|
95
|
+
.command("create-bulk")
|
|
96
|
+
.description("Create multiple customers")
|
|
97
|
+
.option("--body <json>", "Request body as JSON string")
|
|
98
|
+
.option("--body-file <path>", "Read request body from file")
|
|
99
|
+
.action(async (opts) => {
|
|
100
|
+
const client = await ctx.getClient();
|
|
101
|
+
let body: unknown;
|
|
102
|
+
if (opts.bodyFile) {
|
|
103
|
+
const { readFileSync } = await import("fs");
|
|
104
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
105
|
+
} else if (opts.body) {
|
|
106
|
+
body = ctx.parseBody(opts.body);
|
|
107
|
+
}
|
|
108
|
+
if (ctx.verbose)
|
|
109
|
+
process.stderr.write(
|
|
110
|
+
`POST ${new URL(`/api/v2025-06/customers/bulk`, "https://placeholder").pathname}\n`,
|
|
111
|
+
);
|
|
112
|
+
const result = await client.post(`/api/v2025-06/customers/bulk`, body);
|
|
113
|
+
ctx.output(result);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
resource
|
|
117
|
+
.command("delete-bulk")
|
|
118
|
+
.description("Delete multiple customers")
|
|
119
|
+
.option("--body <json>", "Request body as JSON string")
|
|
120
|
+
.option("--body-file <path>", "Read request body from file")
|
|
121
|
+
.action(async (opts) => {
|
|
122
|
+
const client = await ctx.getClient();
|
|
123
|
+
let body: unknown;
|
|
124
|
+
if (opts.bodyFile) {
|
|
125
|
+
const { readFileSync } = await import("fs");
|
|
126
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
127
|
+
} else if (opts.body) {
|
|
128
|
+
body = ctx.parseBody(opts.body);
|
|
129
|
+
}
|
|
130
|
+
if (ctx.verbose)
|
|
131
|
+
process.stderr.write(
|
|
132
|
+
`DELETE ${new URL(`/api/v2025-06/customers/bulk`, "https://placeholder").pathname}\n`,
|
|
133
|
+
);
|
|
134
|
+
const result = await client.delete(`/api/v2025-06/customers/bulk`, {
|
|
135
|
+
body,
|
|
136
|
+
});
|
|
137
|
+
ctx.output(result);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// default.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerDefault(parent: Command, ctx: CommandContext): void {
|
|
6
|
+
const resource = parent.command("default").description("default");
|
|
7
|
+
|
|
8
|
+
resource
|
|
9
|
+
.command("get-order-journey-events <order-id>")
|
|
10
|
+
.description("Get order journey events")
|
|
11
|
+
.action(async (orderId, opts) => {
|
|
12
|
+
const client = await ctx.getClient();
|
|
13
|
+
if (ctx.verbose)
|
|
14
|
+
process.stderr.write(
|
|
15
|
+
`GET ${new URL(`/api/v202506/orders/${orderId}/journey/events`, "https://placeholder").pathname}\n`,
|
|
16
|
+
);
|
|
17
|
+
const result = await client.get(
|
|
18
|
+
`/api/v202506/orders/${orderId}/journey/events`,
|
|
19
|
+
);
|
|
20
|
+
ctx.output(result);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
resource
|
|
24
|
+
.command("get-order-journey <order-id>")
|
|
25
|
+
.description("Get an order journey")
|
|
26
|
+
.action(async (orderId, opts) => {
|
|
27
|
+
const client = await ctx.getClient();
|
|
28
|
+
if (ctx.verbose)
|
|
29
|
+
process.stderr.write(
|
|
30
|
+
`GET ${new URL(`/api/v202506/orders/${orderId}/journey`, "https://placeholder").pathname}\n`,
|
|
31
|
+
);
|
|
32
|
+
const result = await client.get(`/api/v202506/orders/${orderId}/journey`);
|
|
33
|
+
ctx.output(result);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// email-settings.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerEmailSettings(
|
|
6
|
+
parent: Command,
|
|
7
|
+
ctx: CommandContext,
|
|
8
|
+
): void {
|
|
9
|
+
const resource = parent
|
|
10
|
+
.command("email-settings")
|
|
11
|
+
.description("Email Settings");
|
|
12
|
+
|
|
13
|
+
resource
|
|
14
|
+
.command("get-company-email-settings")
|
|
15
|
+
.description("returns company email settings")
|
|
16
|
+
.action(async (opts) => {
|
|
17
|
+
const client = await ctx.getClient();
|
|
18
|
+
if (ctx.verbose)
|
|
19
|
+
process.stderr.write(
|
|
20
|
+
`GET ${new URL(`/api/v2025-06/company-email-settings`, "https://placeholder").pathname}\n`,
|
|
21
|
+
);
|
|
22
|
+
const result = await client.get(`/api/v2025-06/company-email-settings`);
|
|
23
|
+
ctx.output(result);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
resource
|
|
27
|
+
.command("update-company-email-settings <id>")
|
|
28
|
+
.description("updates company email settings")
|
|
29
|
+
.option("--body <json>", "Request body as JSON string")
|
|
30
|
+
.option("--body-file <path>", "Read request body from file")
|
|
31
|
+
.action(async (id, opts) => {
|
|
32
|
+
const client = await ctx.getClient();
|
|
33
|
+
let body: unknown;
|
|
34
|
+
if (opts.bodyFile) {
|
|
35
|
+
const { readFileSync } = await import("fs");
|
|
36
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
37
|
+
} else if (opts.body) {
|
|
38
|
+
body = ctx.parseBody(opts.body);
|
|
39
|
+
}
|
|
40
|
+
if (ctx.verbose)
|
|
41
|
+
process.stderr.write(
|
|
42
|
+
`PATCH ${new URL(`/api/v2025-06/company-email-settings/${id}`, "https://placeholder").pathname}\n`,
|
|
43
|
+
);
|
|
44
|
+
const result = await client.patch(
|
|
45
|
+
`/api/v2025-06/company-email-settings/${id}`,
|
|
46
|
+
body,
|
|
47
|
+
);
|
|
48
|
+
ctx.output(result);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// enrollment-pack-media.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerEnrollmentPackMedia(
|
|
6
|
+
parent: Command,
|
|
7
|
+
ctx: CommandContext,
|
|
8
|
+
): void {
|
|
9
|
+
const resource = parent
|
|
10
|
+
.command("enrollment-pack-media")
|
|
11
|
+
.description("EnrollmentPackMedia");
|
|
12
|
+
|
|
13
|
+
resource
|
|
14
|
+
.command("list <enrollment-pack-id>")
|
|
15
|
+
.description("List media associated with enrollment pack")
|
|
16
|
+
.option("--page <value>", "page")
|
|
17
|
+
.action(async (enrollmentPackId, opts) => {
|
|
18
|
+
const client = await ctx.getClient();
|
|
19
|
+
const params: Record<string, unknown> = {};
|
|
20
|
+
if (opts.page !== undefined) params["page"] = opts.page;
|
|
21
|
+
if (ctx.verbose)
|
|
22
|
+
process.stderr.write(
|
|
23
|
+
`GET ${new URL(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`, "https://placeholder").pathname}\n`,
|
|
24
|
+
);
|
|
25
|
+
const result = await client.get(
|
|
26
|
+
`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`,
|
|
27
|
+
params,
|
|
28
|
+
);
|
|
29
|
+
ctx.output(result);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
resource
|
|
33
|
+
.command("create <enrollment-pack-id>")
|
|
34
|
+
.description("Associate media with enrollment pack")
|
|
35
|
+
.option("--body <json>", "Request body as JSON string")
|
|
36
|
+
.option("--body-file <path>", "Read request body from file")
|
|
37
|
+
.action(async (enrollmentPackId, opts) => {
|
|
38
|
+
const client = await ctx.getClient();
|
|
39
|
+
let body: unknown;
|
|
40
|
+
if (opts.bodyFile) {
|
|
41
|
+
const { readFileSync } = await import("fs");
|
|
42
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
43
|
+
} else if (opts.body) {
|
|
44
|
+
body = ctx.parseBody(opts.body);
|
|
45
|
+
}
|
|
46
|
+
if (ctx.verbose)
|
|
47
|
+
process.stderr.write(
|
|
48
|
+
`POST ${new URL(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`, "https://placeholder").pathname}\n`,
|
|
49
|
+
);
|
|
50
|
+
const result = await client.post(
|
|
51
|
+
`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`,
|
|
52
|
+
body,
|
|
53
|
+
);
|
|
54
|
+
ctx.output(result);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
resource
|
|
58
|
+
.command("delete <enrollment-pack-id> <id>")
|
|
59
|
+
.description("Medium removed from enrollment pack")
|
|
60
|
+
.action(async (enrollmentPackId, id, opts) => {
|
|
61
|
+
const client = await ctx.getClient();
|
|
62
|
+
if (ctx.verbose)
|
|
63
|
+
process.stderr.write(
|
|
64
|
+
`DELETE ${new URL(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}`, "https://placeholder").pathname}\n`,
|
|
65
|
+
);
|
|
66
|
+
const result = await client.delete(
|
|
67
|
+
`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}`,
|
|
68
|
+
);
|
|
69
|
+
ctx.output(result);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// fair-share-settings.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerFairShareSettings(
|
|
6
|
+
parent: Command,
|
|
7
|
+
ctx: CommandContext,
|
|
8
|
+
): void {
|
|
9
|
+
const resource = parent
|
|
10
|
+
.command("fair-share-settings")
|
|
11
|
+
.description("Fair Share Settings");
|
|
12
|
+
|
|
13
|
+
resource
|
|
14
|
+
.command("get")
|
|
15
|
+
.description("Get Fair Share settings")
|
|
16
|
+
.action(async (opts) => {
|
|
17
|
+
const client = await ctx.getClient();
|
|
18
|
+
if (ctx.verbose)
|
|
19
|
+
process.stderr.write(
|
|
20
|
+
`GET ${new URL(`/api/v2025-06/fairshare/settings`, "https://placeholder").pathname}\n`,
|
|
21
|
+
);
|
|
22
|
+
const result = await client.get(`/api/v2025-06/fairshare/settings`);
|
|
23
|
+
ctx.output(result);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
resource
|
|
27
|
+
.command("update")
|
|
28
|
+
.description("Update Fair Share settings")
|
|
29
|
+
.option("--body <json>", "Request body as JSON string")
|
|
30
|
+
.option("--body-file <path>", "Read request body from file")
|
|
31
|
+
.action(async (opts) => {
|
|
32
|
+
const client = await ctx.getClient();
|
|
33
|
+
let body: unknown;
|
|
34
|
+
if (opts.bodyFile) {
|
|
35
|
+
const { readFileSync } = await import("fs");
|
|
36
|
+
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
37
|
+
} else if (opts.body) {
|
|
38
|
+
body = ctx.parseBody(opts.body);
|
|
39
|
+
}
|
|
40
|
+
if (ctx.verbose)
|
|
41
|
+
process.stderr.write(
|
|
42
|
+
`PATCH ${new URL(`/api/v2025-06/fairshare/settings`, "https://placeholder").pathname}\n`,
|
|
43
|
+
);
|
|
44
|
+
const result = await client.patch(
|
|
45
|
+
`/api/v2025-06/fairshare/settings`,
|
|
46
|
+
body,
|
|
47
|
+
);
|
|
48
|
+
ctx.output(result);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// index.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
import { registerCompanyContacts } from "./company-contacts.js";
|
|
6
|
+
import { registerCompliance } from "./compliance.js";
|
|
7
|
+
import { registerCustomers } from "./customers.js";
|
|
8
|
+
import { registerEmailSettings } from "./email-settings.js";
|
|
9
|
+
import { registerEnrollmentPackMedia } from "./enrollment-pack-media.js";
|
|
10
|
+
import { registerFairShareSettings } from "./fair-share-settings.js";
|
|
11
|
+
import { registerLighthouse } from "./lighthouse.js";
|
|
12
|
+
import { registerMediaEnrollmentPacks } from "./media-enrollment-packs.js";
|
|
13
|
+
import { registerMediaProducts } from "./media-products.js";
|
|
14
|
+
import { registerPartnerTokens } from "./partner-tokens.js";
|
|
15
|
+
import { registerPlaylists } from "./playlists.js";
|
|
16
|
+
import { registerProductMedia } from "./product-media.js";
|
|
17
|
+
import { registerReps } from "./reps.js";
|
|
18
|
+
import { registerShareStatistics } from "./share-statistics.js";
|
|
19
|
+
import { registerUsersContacts } from "./users-contacts.js";
|
|
20
|
+
import { registerUsersMedia } from "./users-media.js";
|
|
21
|
+
import { registerUsersNotes } from "./users-notes.js";
|
|
22
|
+
import { registerUsersPlaylists } from "./users-playlists.js";
|
|
23
|
+
import { registerUsersTasks } from "./users-tasks.js";
|
|
24
|
+
import { registerWidgets } from "./widgets.js";
|
|
25
|
+
import { registerDefault } from "./default.js";
|
|
26
|
+
|
|
27
|
+
export function registerAllCommands(
|
|
28
|
+
parent: Command,
|
|
29
|
+
ctx: CommandContext,
|
|
30
|
+
): void {
|
|
31
|
+
registerCompanyContacts(parent, ctx);
|
|
32
|
+
registerCompliance(parent, ctx);
|
|
33
|
+
registerCustomers(parent, ctx);
|
|
34
|
+
registerEmailSettings(parent, ctx);
|
|
35
|
+
registerEnrollmentPackMedia(parent, ctx);
|
|
36
|
+
registerFairShareSettings(parent, ctx);
|
|
37
|
+
registerLighthouse(parent, ctx);
|
|
38
|
+
registerMediaEnrollmentPacks(parent, ctx);
|
|
39
|
+
registerMediaProducts(parent, ctx);
|
|
40
|
+
registerPartnerTokens(parent, ctx);
|
|
41
|
+
registerPlaylists(parent, ctx);
|
|
42
|
+
registerProductMedia(parent, ctx);
|
|
43
|
+
registerReps(parent, ctx);
|
|
44
|
+
registerShareStatistics(parent, ctx);
|
|
45
|
+
registerUsersContacts(parent, ctx);
|
|
46
|
+
registerUsersMedia(parent, ctx);
|
|
47
|
+
registerUsersNotes(parent, ctx);
|
|
48
|
+
registerUsersPlaylists(parent, ctx);
|
|
49
|
+
registerUsersTasks(parent, ctx);
|
|
50
|
+
registerWidgets(parent, ctx);
|
|
51
|
+
registerDefault(parent, ctx);
|
|
52
|
+
}
|