@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/.turbo/turbo-build.log +5 -7
- package/dist/index.mjs +666 -382
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/generated/company-contacts.ts +18 -22
- package/src/generated/compliance.ts +145 -105
- package/src/generated/customers.ts +13 -22
- package/src/generated/default.ts +4 -4
- package/src/generated/email-settings.ts +5 -5
- package/src/generated/enrollment-pack-media.ts +10 -4
- package/src/generated/fair-share-settings.ts +3 -3
- package/src/generated/index.ts +6 -0
- package/src/generated/lighthouse.ts +147 -107
- package/src/generated/media-enrollment-packs.ts +6 -4
- package/src/generated/media-products.ts +4 -4
- package/src/generated/orders.ts +63 -0
- package/src/generated/partner-tokens.ts +16 -24
- package/src/generated/playlists.ts +24 -29
- package/src/generated/product-media.ts +4 -4
- package/src/generated/reps.ts +95 -58
- package/src/generated/share-statistics.ts +16 -16
- package/src/generated/users-brand-guidelines.ts +25 -0
- package/src/generated/users-contacts.ts +84 -29
- package/src/generated/users-media.ts +13 -19
- package/src/generated/users-notes.ts +10 -16
- package/src/generated/users-playlists.ts +12 -16
- package/src/generated/users-products.ts +82 -0
- package/src/generated/users-tasks.ts +16 -19
- package/src/generated/widgets.ts +72 -88
|
@@ -20,7 +20,7 @@ export function registerMediaEnrollmentPacks(
|
|
|
20
20
|
if (opts.page !== undefined) params["page"] = opts.page;
|
|
21
21
|
if (ctx.verbose)
|
|
22
22
|
process.stderr.write(
|
|
23
|
-
|
|
23
|
+
"GET " + `/api/v2025-06/media/${mediaId}/enrollment_packs` + "\n",
|
|
24
24
|
);
|
|
25
25
|
const result = await client.get(
|
|
26
26
|
`/api/v2025-06/media/${mediaId}/enrollment_packs`,
|
|
@@ -45,7 +45,7 @@ export function registerMediaEnrollmentPacks(
|
|
|
45
45
|
}
|
|
46
46
|
if (ctx.verbose)
|
|
47
47
|
process.stderr.write(
|
|
48
|
-
|
|
48
|
+
"POST " + `/api/v2025-06/media/${mediaId}/enrollment_packs` + "\n",
|
|
49
49
|
);
|
|
50
50
|
const result = await client.post(
|
|
51
51
|
`/api/v2025-06/media/${mediaId}/enrollment_packs`,
|
|
@@ -57,11 +57,13 @@ export function registerMediaEnrollmentPacks(
|
|
|
57
57
|
resource
|
|
58
58
|
.command("delete <media-id> <id>")
|
|
59
59
|
.description("Enrollment Pack removed from media")
|
|
60
|
-
.action(async (mediaId, id
|
|
60
|
+
.action(async (mediaId, id) => {
|
|
61
61
|
const client = await ctx.getClient();
|
|
62
62
|
if (ctx.verbose)
|
|
63
63
|
process.stderr.write(
|
|
64
|
-
|
|
64
|
+
"DELETE " +
|
|
65
|
+
`/api/v2025-06/media/${mediaId}/enrollment_packs/${id}` +
|
|
66
|
+
"\n",
|
|
65
67
|
);
|
|
66
68
|
const result = await client.delete(
|
|
67
69
|
`/api/v2025-06/media/${mediaId}/enrollment_packs/${id}`,
|
|
@@ -20,7 +20,7 @@ export function registerMediaProducts(
|
|
|
20
20
|
if (opts.page !== undefined) params["page"] = opts.page;
|
|
21
21
|
if (ctx.verbose)
|
|
22
22
|
process.stderr.write(
|
|
23
|
-
|
|
23
|
+
"GET " + `/api/v2025-06/media/${mediaId}/products` + "\n",
|
|
24
24
|
);
|
|
25
25
|
const result = await client.get(
|
|
26
26
|
`/api/v2025-06/media/${mediaId}/products`,
|
|
@@ -45,7 +45,7 @@ export function registerMediaProducts(
|
|
|
45
45
|
}
|
|
46
46
|
if (ctx.verbose)
|
|
47
47
|
process.stderr.write(
|
|
48
|
-
|
|
48
|
+
"POST " + `/api/v2025-06/media/${mediaId}/products` + "\n",
|
|
49
49
|
);
|
|
50
50
|
const result = await client.post(
|
|
51
51
|
`/api/v2025-06/media/${mediaId}/products`,
|
|
@@ -57,11 +57,11 @@ export function registerMediaProducts(
|
|
|
57
57
|
resource
|
|
58
58
|
.command("delete <media-id> <id>")
|
|
59
59
|
.description("Product removed from media")
|
|
60
|
-
.action(async (mediaId, id
|
|
60
|
+
.action(async (mediaId, id) => {
|
|
61
61
|
const client = await ctx.getClient();
|
|
62
62
|
if (ctx.verbose)
|
|
63
63
|
process.stderr.write(
|
|
64
|
-
|
|
64
|
+
"DELETE " + `/api/v2025-06/media/${mediaId}/products/${id}` + "\n",
|
|
65
65
|
);
|
|
66
66
|
const result = await client.delete(
|
|
67
67
|
`/api/v2025-06/media/${mediaId}/products/${id}`,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// orders.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerOrders(parent: Command, ctx: CommandContext): void {
|
|
6
|
+
const resource = parent.command("orders").description("Orders");
|
|
7
|
+
|
|
8
|
+
resource
|
|
9
|
+
.command("export-csv")
|
|
10
|
+
.description("Export orders as CSV")
|
|
11
|
+
.option("--params <value>", "Query parameters for CSV export")
|
|
12
|
+
.action(async (opts) => {
|
|
13
|
+
const client = await ctx.getClient();
|
|
14
|
+
const params: Record<string, unknown> = {};
|
|
15
|
+
if (opts.params !== undefined) params["params"] = opts.params;
|
|
16
|
+
if (ctx.verbose)
|
|
17
|
+
process.stderr.write("GET " + `/api/v202506/orders/export_csv` + "\n");
|
|
18
|
+
const result = await client.get(`/api/v202506/orders/export_csv`, params);
|
|
19
|
+
ctx.output(result);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
resource
|
|
23
|
+
.command("list")
|
|
24
|
+
.description("List orders")
|
|
25
|
+
.option(
|
|
26
|
+
"--params <value>",
|
|
27
|
+
"Query parameters for filtering, pagination, and sorting",
|
|
28
|
+
)
|
|
29
|
+
.action(async (opts) => {
|
|
30
|
+
const client = await ctx.getClient();
|
|
31
|
+
const params: Record<string, unknown> = {};
|
|
32
|
+
if (opts.params !== undefined) params["params"] = opts.params;
|
|
33
|
+
if (ctx.verbose)
|
|
34
|
+
process.stderr.write("GET " + `/api/v202506/orders` + "\n");
|
|
35
|
+
const result = await client.get(`/api/v202506/orders`, params);
|
|
36
|
+
ctx.output(result);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
resource
|
|
40
|
+
.command("get <id>")
|
|
41
|
+
.description("Get an order")
|
|
42
|
+
.action(async (id) => {
|
|
43
|
+
const client = await ctx.getClient();
|
|
44
|
+
if (ctx.verbose)
|
|
45
|
+
process.stderr.write("GET " + `/api/v202506/orders/${id}` + "\n");
|
|
46
|
+
const result = await client.get(`/api/v202506/orders/${id}`);
|
|
47
|
+
ctx.output(result);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
resource
|
|
51
|
+
.command("get-stats")
|
|
52
|
+
.description("Get order statistics")
|
|
53
|
+
.option("--params <value>", "Query parameters for filtering statistics")
|
|
54
|
+
.action(async (opts) => {
|
|
55
|
+
const client = await ctx.getClient();
|
|
56
|
+
const params: Record<string, unknown> = {};
|
|
57
|
+
if (opts.params !== undefined) params["params"] = opts.params;
|
|
58
|
+
if (ctx.verbose)
|
|
59
|
+
process.stderr.write("GET " + `/api/v202506/orders/stats` + "\n");
|
|
60
|
+
const result = await client.get(`/api/v202506/orders/stats`, params);
|
|
61
|
+
ctx.output(result);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
@@ -13,12 +13,10 @@ export function registerPartnerTokens(
|
|
|
13
13
|
resource
|
|
14
14
|
.command("list-deprecated")
|
|
15
15
|
.description("returns an array of partner tokens")
|
|
16
|
-
.action(async (
|
|
16
|
+
.action(async () => {
|
|
17
17
|
const client = await ctx.getClient();
|
|
18
18
|
if (ctx.verbose)
|
|
19
|
-
process.stderr.write(
|
|
20
|
-
`GET ${new URL(`/api/v2025-06/partner_tokens`, "https://placeholder").pathname}\n`,
|
|
21
|
-
);
|
|
19
|
+
process.stderr.write("GET " + `/api/v2025-06/partner_tokens` + "\n");
|
|
22
20
|
const result = await client.get(`/api/v2025-06/partner_tokens`);
|
|
23
21
|
ctx.output(result);
|
|
24
22
|
});
|
|
@@ -38,9 +36,7 @@ export function registerPartnerTokens(
|
|
|
38
36
|
body = ctx.parseBody(opts.body);
|
|
39
37
|
}
|
|
40
38
|
if (ctx.verbose)
|
|
41
|
-
process.stderr.write(
|
|
42
|
-
`POST ${new URL(`/api/v2025-06/partner_tokens`, "https://placeholder").pathname}\n`,
|
|
43
|
-
);
|
|
39
|
+
process.stderr.write("POST " + `/api/v2025-06/partner_tokens` + "\n");
|
|
44
40
|
const result = await client.post(`/api/v2025-06/partner_tokens`, body);
|
|
45
41
|
ctx.output(result);
|
|
46
42
|
});
|
|
@@ -48,11 +44,11 @@ export function registerPartnerTokens(
|
|
|
48
44
|
resource
|
|
49
45
|
.command("get-deprecated <id>")
|
|
50
46
|
.description("returns a specific partner token")
|
|
51
|
-
.action(async (id
|
|
47
|
+
.action(async (id) => {
|
|
52
48
|
const client = await ctx.getClient();
|
|
53
49
|
if (ctx.verbose)
|
|
54
50
|
process.stderr.write(
|
|
55
|
-
|
|
51
|
+
"GET " + `/api/v2025-06/partner_tokens/${id}` + "\n",
|
|
56
52
|
);
|
|
57
53
|
const result = await client.get(`/api/v2025-06/partner_tokens/${id}`);
|
|
58
54
|
ctx.output(result);
|
|
@@ -74,7 +70,7 @@ export function registerPartnerTokens(
|
|
|
74
70
|
}
|
|
75
71
|
if (ctx.verbose)
|
|
76
72
|
process.stderr.write(
|
|
77
|
-
|
|
73
|
+
"PUT " + `/api/v2025-06/partner_tokens/${id}` + "\n",
|
|
78
74
|
);
|
|
79
75
|
const result = await client.put(
|
|
80
76
|
`/api/v2025-06/partner_tokens/${id}`,
|
|
@@ -86,11 +82,11 @@ export function registerPartnerTokens(
|
|
|
86
82
|
resource
|
|
87
83
|
.command("delete-deprecated <id>")
|
|
88
84
|
.description("deletes a partner token")
|
|
89
|
-
.action(async (id
|
|
85
|
+
.action(async (id) => {
|
|
90
86
|
const client = await ctx.getClient();
|
|
91
87
|
if (ctx.verbose)
|
|
92
88
|
process.stderr.write(
|
|
93
|
-
|
|
89
|
+
"DELETE " + `/api/v2025-06/partner_tokens/${id}` + "\n",
|
|
94
90
|
);
|
|
95
91
|
const result = await client.delete(`/api/v2025-06/partner_tokens/${id}`);
|
|
96
92
|
ctx.output(result);
|
|
@@ -99,12 +95,10 @@ export function registerPartnerTokens(
|
|
|
99
95
|
resource
|
|
100
96
|
.command("list")
|
|
101
97
|
.description("returns an array of partner tokens")
|
|
102
|
-
.action(async (
|
|
98
|
+
.action(async () => {
|
|
103
99
|
const client = await ctx.getClient();
|
|
104
100
|
if (ctx.verbose)
|
|
105
|
-
process.stderr.write(
|
|
106
|
-
`GET ${new URL(`/api/v2025-06/tokens/partner`, "https://placeholder").pathname}\n`,
|
|
107
|
-
);
|
|
101
|
+
process.stderr.write("GET " + `/api/v2025-06/tokens/partner` + "\n");
|
|
108
102
|
const result = await client.get(`/api/v2025-06/tokens/partner`);
|
|
109
103
|
ctx.output(result);
|
|
110
104
|
});
|
|
@@ -124,9 +118,7 @@ export function registerPartnerTokens(
|
|
|
124
118
|
body = ctx.parseBody(opts.body);
|
|
125
119
|
}
|
|
126
120
|
if (ctx.verbose)
|
|
127
|
-
process.stderr.write(
|
|
128
|
-
`POST ${new URL(`/api/v2025-06/tokens/partner`, "https://placeholder").pathname}\n`,
|
|
129
|
-
);
|
|
121
|
+
process.stderr.write("POST " + `/api/v2025-06/tokens/partner` + "\n");
|
|
130
122
|
const result = await client.post(`/api/v2025-06/tokens/partner`, body);
|
|
131
123
|
ctx.output(result);
|
|
132
124
|
});
|
|
@@ -134,11 +126,11 @@ export function registerPartnerTokens(
|
|
|
134
126
|
resource
|
|
135
127
|
.command("get <id>")
|
|
136
128
|
.description("returns a specific partner token")
|
|
137
|
-
.action(async (id
|
|
129
|
+
.action(async (id) => {
|
|
138
130
|
const client = await ctx.getClient();
|
|
139
131
|
if (ctx.verbose)
|
|
140
132
|
process.stderr.write(
|
|
141
|
-
|
|
133
|
+
"GET " + `/api/v2025-06/tokens/partner/${id}` + "\n",
|
|
142
134
|
);
|
|
143
135
|
const result = await client.get(`/api/v2025-06/tokens/partner/${id}`);
|
|
144
136
|
ctx.output(result);
|
|
@@ -160,7 +152,7 @@ export function registerPartnerTokens(
|
|
|
160
152
|
}
|
|
161
153
|
if (ctx.verbose)
|
|
162
154
|
process.stderr.write(
|
|
163
|
-
|
|
155
|
+
"PUT " + `/api/v2025-06/tokens/partner/${id}` + "\n",
|
|
164
156
|
);
|
|
165
157
|
const result = await client.put(
|
|
166
158
|
`/api/v2025-06/tokens/partner/${id}`,
|
|
@@ -172,11 +164,11 @@ export function registerPartnerTokens(
|
|
|
172
164
|
resource
|
|
173
165
|
.command("delete <id>")
|
|
174
166
|
.description("deletes a partner token")
|
|
175
|
-
.action(async (id
|
|
167
|
+
.action(async (id) => {
|
|
176
168
|
const client = await ctx.getClient();
|
|
177
169
|
if (ctx.verbose)
|
|
178
170
|
process.stderr.write(
|
|
179
|
-
|
|
171
|
+
"DELETE " + `/api/v2025-06/tokens/partner/${id}` + "\n",
|
|
180
172
|
);
|
|
181
173
|
const result = await client.delete(`/api/v2025-06/tokens/partner/${id}`);
|
|
182
174
|
ctx.output(result);
|
|
@@ -6,7 +6,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
6
6
|
const resource = parent.command("playlists").description("Playlists");
|
|
7
7
|
|
|
8
8
|
resource
|
|
9
|
-
.command("clone
|
|
9
|
+
.command("clone <playlist-id>")
|
|
10
10
|
.description("Clone a playlist")
|
|
11
11
|
.option("--body <json>", "Request body as JSON string")
|
|
12
12
|
.option("--body-file <path>", "Read request body from file")
|
|
@@ -21,7 +21,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
21
21
|
}
|
|
22
22
|
if (ctx.verbose)
|
|
23
23
|
process.stderr.write(
|
|
24
|
-
|
|
24
|
+
"POST " + `/api/v2025-06/playlists/${playlistId}/clone` + "\n",
|
|
25
25
|
);
|
|
26
26
|
const result = await client.post(
|
|
27
27
|
`/api/v2025-06/playlists/${playlistId}/clone`,
|
|
@@ -31,7 +31,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
resource
|
|
34
|
-
.command("add-
|
|
34
|
+
.command("add-items <playlist-id>")
|
|
35
35
|
.description("add items to playlist")
|
|
36
36
|
.option("--body <json>", "Request body as JSON string")
|
|
37
37
|
.option("--body-file <path>", "Read request body from file")
|
|
@@ -46,7 +46,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
46
46
|
}
|
|
47
47
|
if (ctx.verbose)
|
|
48
48
|
process.stderr.write(
|
|
49
|
-
|
|
49
|
+
"POST " + `/api/v2025-06/playlists/${playlistId}/items` + "\n",
|
|
50
50
|
);
|
|
51
51
|
const result = await client.post(
|
|
52
52
|
`/api/v2025-06/playlists/${playlistId}/items`,
|
|
@@ -56,7 +56,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
resource
|
|
59
|
-
.command("remove-
|
|
59
|
+
.command("remove-items <playlist-id>")
|
|
60
60
|
.description("remove items from playlist")
|
|
61
61
|
.option("--body <json>", "Request body as JSON string")
|
|
62
62
|
.option("--body-file <path>", "Read request body from file")
|
|
@@ -71,7 +71,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
71
71
|
}
|
|
72
72
|
if (ctx.verbose)
|
|
73
73
|
process.stderr.write(
|
|
74
|
-
|
|
74
|
+
"DELETE " + `/api/v2025-06/playlists/${playlistId}/items` + "\n",
|
|
75
75
|
);
|
|
76
76
|
const result = await client.delete(
|
|
77
77
|
`/api/v2025-06/playlists/${playlistId}/items`,
|
|
@@ -95,9 +95,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
95
95
|
body = ctx.parseBody(opts.body);
|
|
96
96
|
}
|
|
97
97
|
if (ctx.verbose)
|
|
98
|
-
process.stderr.write(
|
|
99
|
-
`POST ${new URL(`/api/v2025-06/playlists`, "https://placeholder").pathname}\n`,
|
|
100
|
-
);
|
|
98
|
+
process.stderr.write("POST " + `/api/v2025-06/playlists` + "\n");
|
|
101
99
|
const result = await client.post(`/api/v2025-06/playlists`, body);
|
|
102
100
|
ctx.output(result);
|
|
103
101
|
});
|
|
@@ -105,10 +103,10 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
105
103
|
resource
|
|
106
104
|
.command("list")
|
|
107
105
|
.description("list playlists")
|
|
108
|
-
.option("--page-cursor <value>", "
|
|
109
|
-
.option("--page-limit <value>", "page
|
|
110
|
-
.option("--filter-status <value>", "
|
|
111
|
-
.option("--filter-title <value>", "
|
|
106
|
+
.option("--page-cursor <value>", "Cursor for pagination")
|
|
107
|
+
.option("--page-limit <value>", "Number of records per page")
|
|
108
|
+
.option("--filter-status <value>", "Filter playlists by status")
|
|
109
|
+
.option("--filter-title <value>", "Filter playlists by title")
|
|
112
110
|
.action(async (opts) => {
|
|
113
111
|
const client = await ctx.getClient();
|
|
114
112
|
const params: Record<string, unknown> = {};
|
|
@@ -121,9 +119,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
121
119
|
if (opts.filterTitle !== undefined)
|
|
122
120
|
params["filter[title]"] = opts.filterTitle;
|
|
123
121
|
if (ctx.verbose)
|
|
124
|
-
process.stderr.write(
|
|
125
|
-
`GET ${new URL(`/api/v2025-06/playlists`, "https://placeholder").pathname}\n`,
|
|
126
|
-
);
|
|
122
|
+
process.stderr.write("GET " + `/api/v2025-06/playlists` + "\n");
|
|
127
123
|
const result = await client.get(`/api/v2025-06/playlists`, params);
|
|
128
124
|
ctx.output(result);
|
|
129
125
|
});
|
|
@@ -131,11 +127,11 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
131
127
|
resource
|
|
132
128
|
.command("delete <id>")
|
|
133
129
|
.description("delete playlist")
|
|
134
|
-
.action(async (id
|
|
130
|
+
.action(async (id) => {
|
|
135
131
|
const client = await ctx.getClient();
|
|
136
132
|
if (ctx.verbose)
|
|
137
133
|
process.stderr.write(
|
|
138
|
-
|
|
134
|
+
"DELETE " + `/api/v2025-06/playlists/${id}` + "\n",
|
|
139
135
|
);
|
|
140
136
|
const result = await client.delete(`/api/v2025-06/playlists/${id}`);
|
|
141
137
|
ctx.output(result);
|
|
@@ -144,12 +140,10 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
144
140
|
resource
|
|
145
141
|
.command("get <id>")
|
|
146
142
|
.description("show playlist")
|
|
147
|
-
.action(async (id
|
|
143
|
+
.action(async (id) => {
|
|
148
144
|
const client = await ctx.getClient();
|
|
149
145
|
if (ctx.verbose)
|
|
150
|
-
process.stderr.write(
|
|
151
|
-
`GET ${new URL(`/api/v2025-06/playlists/${id}`, "https://placeholder").pathname}\n`,
|
|
152
|
-
);
|
|
146
|
+
process.stderr.write("GET " + `/api/v2025-06/playlists/${id}` + "\n");
|
|
153
147
|
const result = await client.get(`/api/v2025-06/playlists/${id}`);
|
|
154
148
|
ctx.output(result);
|
|
155
149
|
});
|
|
@@ -169,9 +163,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
169
163
|
body = ctx.parseBody(opts.body);
|
|
170
164
|
}
|
|
171
165
|
if (ctx.verbose)
|
|
172
|
-
process.stderr.write(
|
|
173
|
-
`PATCH ${new URL(`/api/v2025-06/playlists/${id}`, "https://placeholder").pathname}\n`,
|
|
174
|
-
);
|
|
166
|
+
process.stderr.write("PATCH " + `/api/v2025-06/playlists/${id}` + "\n");
|
|
175
167
|
const result = await client.patch(`/api/v2025-06/playlists/${id}`, body);
|
|
176
168
|
ctx.output(result);
|
|
177
169
|
});
|
|
@@ -179,9 +171,12 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
179
171
|
resource
|
|
180
172
|
.command("get-shareable-items")
|
|
181
173
|
.description("search shareable items")
|
|
182
|
-
.option(
|
|
183
|
-
|
|
184
|
-
|
|
174
|
+
.option(
|
|
175
|
+
"--type <value>",
|
|
176
|
+
"Type of resource to search for ('Page', 'Product', 'Promotion', 'EnrollmentPack', 'Medium')",
|
|
177
|
+
)
|
|
178
|
+
.option("--search <value>", "Search term to filter items by title")
|
|
179
|
+
.option("--country-id <value>", "Country ID to filter items")
|
|
185
180
|
.action(async (opts) => {
|
|
186
181
|
const client = await ctx.getClient();
|
|
187
182
|
const params: Record<string, unknown> = {};
|
|
@@ -191,7 +186,7 @@ export function registerPlaylists(parent: Command, ctx: CommandContext): void {
|
|
|
191
186
|
params["country_id"] = Number(opts.countryId);
|
|
192
187
|
if (ctx.verbose)
|
|
193
188
|
process.stderr.write(
|
|
194
|
-
|
|
189
|
+
"GET " + `/api/v2025-06/playlists/shareables` + "\n",
|
|
195
190
|
);
|
|
196
191
|
const result = await client.get(
|
|
197
192
|
`/api/v2025-06/playlists/shareables`,
|
|
@@ -18,7 +18,7 @@ export function registerProductMedia(
|
|
|
18
18
|
if (opts.page !== undefined) params["page"] = opts.page;
|
|
19
19
|
if (ctx.verbose)
|
|
20
20
|
process.stderr.write(
|
|
21
|
-
|
|
21
|
+
"GET " + `/api/v2025-06/products/${productId}/media` + "\n",
|
|
22
22
|
);
|
|
23
23
|
const result = await client.get(
|
|
24
24
|
`/api/v2025-06/products/${productId}/media`,
|
|
@@ -43,7 +43,7 @@ export function registerProductMedia(
|
|
|
43
43
|
}
|
|
44
44
|
if (ctx.verbose)
|
|
45
45
|
process.stderr.write(
|
|
46
|
-
|
|
46
|
+
"POST " + `/api/v2025-06/products/${productId}/media` + "\n",
|
|
47
47
|
);
|
|
48
48
|
const result = await client.post(
|
|
49
49
|
`/api/v2025-06/products/${productId}/media`,
|
|
@@ -55,11 +55,11 @@ export function registerProductMedia(
|
|
|
55
55
|
resource
|
|
56
56
|
.command("delete <product-id> <id>")
|
|
57
57
|
.description("Media removed from product")
|
|
58
|
-
.action(async (productId, id
|
|
58
|
+
.action(async (productId, id) => {
|
|
59
59
|
const client = await ctx.getClient();
|
|
60
60
|
if (ctx.verbose)
|
|
61
61
|
process.stderr.write(
|
|
62
|
-
|
|
62
|
+
"DELETE " + `/api/v2025-06/products/${productId}/media/${id}` + "\n",
|
|
63
63
|
);
|
|
64
64
|
const result = await client.delete(
|
|
65
65
|
`/api/v2025-06/products/${productId}/media/${id}`,
|