@fluid-app/v2025-06-cli-commands 0.1.337 → 0.1.339
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/dist/index.mjs +815 -739
- package/package.json +2 -2
- package/src/generated/company-contacts.ts +13 -15
- package/src/generated/compliance.ts +99 -113
- package/src/generated/customers.ts +19 -23
- package/src/generated/default.ts +5 -5
- package/src/generated/email-settings.ts +6 -7
- package/src/generated/enrollment-pack-media.ts +8 -9
- package/src/generated/fair-share-settings.ts +6 -7
- package/src/generated/lighthouse.ts +99 -113
- package/src/generated/media-enrollment-packs.ts +8 -9
- package/src/generated/media-products.ts +8 -9
- package/src/generated/orders.ts +9 -9
- package/src/generated/partner-tokens.ts +25 -29
- package/src/generated/playlists.ts +24 -29
- package/src/generated/product-media.ts +8 -9
- package/src/generated/reps.ts +29 -33
- package/src/generated/share-statistics.ts +17 -17
- package/src/generated/users-brand-guidelines.ts +3 -3
- package/src/generated/users-contacts.ts +40 -47
- package/src/generated/users-media.ts +13 -15
- package/src/generated/users-notes.ts +13 -15
- package/src/generated/users-playlists.ts +13 -15
- package/src/generated/users-products.ts +5 -5
- package/src/generated/users-tasks.ts +15 -17
- package/src/generated/widgets.ts +49 -57
- package/src/lib/types.ts +2 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// compliance.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import type
|
|
3
|
+
import { declareInputs, type CommandContext } from "../lib/types.js";
|
|
4
4
|
|
|
5
5
|
export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
6
6
|
const resource = parent.command("compliance").description("Compliance");
|
|
7
7
|
|
|
8
|
-
resource
|
|
8
|
+
declareInputs(resource
|
|
9
9
|
.command("get-latest-product <product-id>")
|
|
10
10
|
.description("Get latest compliance scan for a product")
|
|
11
11
|
.action(async (productId) => {
|
|
@@ -13,9 +13,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
13
13
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/products/${productId}/compliance` + "\n");
|
|
14
14
|
const result = await client.get(`/api/v202506/products/${productId}/compliance`);
|
|
15
15
|
ctx.output(result);
|
|
16
|
-
});
|
|
16
|
+
}), () => []);
|
|
17
17
|
|
|
18
|
-
resource
|
|
18
|
+
declareInputs(resource
|
|
19
19
|
.command("list-product <product-id>")
|
|
20
20
|
.description("List all compliance scans for a product")
|
|
21
21
|
.option("--page <value>", "page")
|
|
@@ -28,9 +28,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
28
28
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/products/${productId}/compliances` + "\n");
|
|
29
29
|
const result = await client.get(`/api/v202506/products/${productId}/compliances`, params);
|
|
30
30
|
ctx.output(result);
|
|
31
|
-
});
|
|
31
|
+
}), () => []);
|
|
32
32
|
|
|
33
|
-
resource
|
|
33
|
+
declareInputs(resource
|
|
34
34
|
.command("create-product <product-id>")
|
|
35
35
|
.description("Create a new compliance scan for a product")
|
|
36
36
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -39,17 +39,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
39
39
|
const client = await ctx.getClient();
|
|
40
40
|
let body: unknown;
|
|
41
41
|
if (opts.bodyFile) {
|
|
42
|
-
|
|
43
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
42
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
44
43
|
} else if (opts.body) {
|
|
45
44
|
body = ctx.parseBody(opts.body);
|
|
46
45
|
}
|
|
47
46
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/products/${productId}/compliances` + "\n");
|
|
48
47
|
const result = await client.post(`/api/v202506/products/${productId}/compliances`, body);
|
|
49
48
|
ctx.output(result);
|
|
50
|
-
});
|
|
49
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
51
50
|
|
|
52
|
-
resource
|
|
51
|
+
declareInputs(resource
|
|
53
52
|
.command("get-product <product-id> <id>")
|
|
54
53
|
.description("Get a specific compliance scan for a product")
|
|
55
54
|
.action(async (productId, id) => {
|
|
@@ -57,9 +56,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
57
56
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/products/${productId}/compliances/${id}` + "\n");
|
|
58
57
|
const result = await client.get(`/api/v202506/products/${productId}/compliances/${id}`);
|
|
59
58
|
ctx.output(result);
|
|
60
|
-
});
|
|
59
|
+
}), () => []);
|
|
61
60
|
|
|
62
|
-
resource
|
|
61
|
+
declareInputs(resource
|
|
63
62
|
.command("update-product <product-id> <id>")
|
|
64
63
|
.description("Update a compliance scan for a product")
|
|
65
64
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -68,17 +67,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
68
67
|
const client = await ctx.getClient();
|
|
69
68
|
let body: unknown;
|
|
70
69
|
if (opts.bodyFile) {
|
|
71
|
-
|
|
72
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
70
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
73
71
|
} else if (opts.body) {
|
|
74
72
|
body = ctx.parseBody(opts.body);
|
|
75
73
|
}
|
|
76
74
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/products/${productId}/compliances/${id}` + "\n");
|
|
77
75
|
const result = await client.patch(`/api/v202506/products/${productId}/compliances/${id}`, body);
|
|
78
76
|
ctx.output(result);
|
|
79
|
-
});
|
|
77
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
80
78
|
|
|
81
|
-
resource
|
|
79
|
+
declareInputs(resource
|
|
82
80
|
.command("delete-product <product-id> <id>")
|
|
83
81
|
.description("Delete a compliance scan for a product")
|
|
84
82
|
.action(async (productId, id) => {
|
|
@@ -86,9 +84,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
86
84
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/products/${productId}/compliances/${id}` + "\n");
|
|
87
85
|
const result = await client.delete(`/api/v202506/products/${productId}/compliances/${id}`);
|
|
88
86
|
ctx.output(result);
|
|
89
|
-
});
|
|
87
|
+
}), () => []);
|
|
90
88
|
|
|
91
|
-
resource
|
|
89
|
+
declareInputs(resource
|
|
92
90
|
.command("get-latest-media <medium-id>")
|
|
93
91
|
.description("Get latest compliance scan for media")
|
|
94
92
|
.action(async (mediumId) => {
|
|
@@ -96,9 +94,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
96
94
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/media/${mediumId}/compliance` + "\n");
|
|
97
95
|
const result = await client.get(`/api/v202506/media/${mediumId}/compliance`);
|
|
98
96
|
ctx.output(result);
|
|
99
|
-
});
|
|
97
|
+
}), () => []);
|
|
100
98
|
|
|
101
|
-
resource
|
|
99
|
+
declareInputs(resource
|
|
102
100
|
.command("list-media <medium-id>")
|
|
103
101
|
.description("List all compliance scans for media")
|
|
104
102
|
.option("--page <value>", "page")
|
|
@@ -111,9 +109,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
111
109
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/media/${mediumId}/compliances` + "\n");
|
|
112
110
|
const result = await client.get(`/api/v202506/media/${mediumId}/compliances`, params);
|
|
113
111
|
ctx.output(result);
|
|
114
|
-
});
|
|
112
|
+
}), () => []);
|
|
115
113
|
|
|
116
|
-
resource
|
|
114
|
+
declareInputs(resource
|
|
117
115
|
.command("create-media <medium-id>")
|
|
118
116
|
.description("Create a new compliance scan for media")
|
|
119
117
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -122,17 +120,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
122
120
|
const client = await ctx.getClient();
|
|
123
121
|
let body: unknown;
|
|
124
122
|
if (opts.bodyFile) {
|
|
125
|
-
|
|
126
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
123
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
127
124
|
} else if (opts.body) {
|
|
128
125
|
body = ctx.parseBody(opts.body);
|
|
129
126
|
}
|
|
130
127
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/media/${mediumId}/compliances` + "\n");
|
|
131
128
|
const result = await client.post(`/api/v202506/media/${mediumId}/compliances`, body);
|
|
132
129
|
ctx.output(result);
|
|
133
|
-
});
|
|
130
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
134
131
|
|
|
135
|
-
resource
|
|
132
|
+
declareInputs(resource
|
|
136
133
|
.command("get-media <medium-id> <id>")
|
|
137
134
|
.description("Get a specific compliance scan for media")
|
|
138
135
|
.action(async (mediumId, id) => {
|
|
@@ -140,9 +137,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
140
137
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/media/${mediumId}/compliances/${id}` + "\n");
|
|
141
138
|
const result = await client.get(`/api/v202506/media/${mediumId}/compliances/${id}`);
|
|
142
139
|
ctx.output(result);
|
|
143
|
-
});
|
|
140
|
+
}), () => []);
|
|
144
141
|
|
|
145
|
-
resource
|
|
142
|
+
declareInputs(resource
|
|
146
143
|
.command("update-media <medium-id> <id>")
|
|
147
144
|
.description("Update a compliance scan for media")
|
|
148
145
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -151,17 +148,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
151
148
|
const client = await ctx.getClient();
|
|
152
149
|
let body: unknown;
|
|
153
150
|
if (opts.bodyFile) {
|
|
154
|
-
|
|
155
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
151
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
156
152
|
} else if (opts.body) {
|
|
157
153
|
body = ctx.parseBody(opts.body);
|
|
158
154
|
}
|
|
159
155
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/media/${mediumId}/compliances/${id}` + "\n");
|
|
160
156
|
const result = await client.patch(`/api/v202506/media/${mediumId}/compliances/${id}`, body);
|
|
161
157
|
ctx.output(result);
|
|
162
|
-
});
|
|
158
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
163
159
|
|
|
164
|
-
resource
|
|
160
|
+
declareInputs(resource
|
|
165
161
|
.command("delete-media <medium-id> <id>")
|
|
166
162
|
.description("Delete a compliance scan for media")
|
|
167
163
|
.action(async (mediumId, id) => {
|
|
@@ -169,9 +165,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
169
165
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/media/${mediumId}/compliances/${id}` + "\n");
|
|
170
166
|
const result = await client.delete(`/api/v202506/media/${mediumId}/compliances/${id}`);
|
|
171
167
|
ctx.output(result);
|
|
172
|
-
});
|
|
168
|
+
}), () => []);
|
|
173
169
|
|
|
174
|
-
resource
|
|
170
|
+
declareInputs(resource
|
|
175
171
|
.command("get-latest-playlist <playlist-id>")
|
|
176
172
|
.description("Get latest compliance scan for a playlist")
|
|
177
173
|
.action(async (playlistId) => {
|
|
@@ -179,9 +175,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
179
175
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/playlists/${playlistId}/compliance` + "\n");
|
|
180
176
|
const result = await client.get(`/api/v202506/playlists/${playlistId}/compliance`);
|
|
181
177
|
ctx.output(result);
|
|
182
|
-
});
|
|
178
|
+
}), () => []);
|
|
183
179
|
|
|
184
|
-
resource
|
|
180
|
+
declareInputs(resource
|
|
185
181
|
.command("list-playlist <playlist-id>")
|
|
186
182
|
.description("List all compliance scans for a playlist")
|
|
187
183
|
.option("--page <value>", "page")
|
|
@@ -194,9 +190,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
194
190
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/playlists/${playlistId}/compliances` + "\n");
|
|
195
191
|
const result = await client.get(`/api/v202506/playlists/${playlistId}/compliances`, params);
|
|
196
192
|
ctx.output(result);
|
|
197
|
-
});
|
|
193
|
+
}), () => []);
|
|
198
194
|
|
|
199
|
-
resource
|
|
195
|
+
declareInputs(resource
|
|
200
196
|
.command("create-playlist <playlist-id>")
|
|
201
197
|
.description("Create a new compliance scan for a playlist")
|
|
202
198
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -205,17 +201,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
205
201
|
const client = await ctx.getClient();
|
|
206
202
|
let body: unknown;
|
|
207
203
|
if (opts.bodyFile) {
|
|
208
|
-
|
|
209
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
204
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
210
205
|
} else if (opts.body) {
|
|
211
206
|
body = ctx.parseBody(opts.body);
|
|
212
207
|
}
|
|
213
208
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/playlists/${playlistId}/compliances` + "\n");
|
|
214
209
|
const result = await client.post(`/api/v202506/playlists/${playlistId}/compliances`, body);
|
|
215
210
|
ctx.output(result);
|
|
216
|
-
});
|
|
211
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
217
212
|
|
|
218
|
-
resource
|
|
213
|
+
declareInputs(resource
|
|
219
214
|
.command("get-playlist <playlist-id> <id>")
|
|
220
215
|
.description("Get a specific compliance scan for a playlist")
|
|
221
216
|
.action(async (playlistId, id) => {
|
|
@@ -223,9 +218,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
223
218
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/playlists/${playlistId}/compliances/${id}` + "\n");
|
|
224
219
|
const result = await client.get(`/api/v202506/playlists/${playlistId}/compliances/${id}`);
|
|
225
220
|
ctx.output(result);
|
|
226
|
-
});
|
|
221
|
+
}), () => []);
|
|
227
222
|
|
|
228
|
-
resource
|
|
223
|
+
declareInputs(resource
|
|
229
224
|
.command("update-playlist <playlist-id> <id>")
|
|
230
225
|
.description("Update a compliance scan for a playlist")
|
|
231
226
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -234,17 +229,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
234
229
|
const client = await ctx.getClient();
|
|
235
230
|
let body: unknown;
|
|
236
231
|
if (opts.bodyFile) {
|
|
237
|
-
|
|
238
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
232
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
239
233
|
} else if (opts.body) {
|
|
240
234
|
body = ctx.parseBody(opts.body);
|
|
241
235
|
}
|
|
242
236
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/playlists/${playlistId}/compliances/${id}` + "\n");
|
|
243
237
|
const result = await client.patch(`/api/v202506/playlists/${playlistId}/compliances/${id}`, body);
|
|
244
238
|
ctx.output(result);
|
|
245
|
-
});
|
|
239
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
246
240
|
|
|
247
|
-
resource
|
|
241
|
+
declareInputs(resource
|
|
248
242
|
.command("delete-playlist <playlist-id> <id>")
|
|
249
243
|
.description("Delete a compliance scan for a playlist")
|
|
250
244
|
.action(async (playlistId, id) => {
|
|
@@ -252,9 +246,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
252
246
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/playlists/${playlistId}/compliances/${id}` + "\n");
|
|
253
247
|
const result = await client.delete(`/api/v202506/playlists/${playlistId}/compliances/${id}`);
|
|
254
248
|
ctx.output(result);
|
|
255
|
-
});
|
|
249
|
+
}), () => []);
|
|
256
250
|
|
|
257
|
-
resource
|
|
251
|
+
declareInputs(resource
|
|
258
252
|
.command("get-latest-category <category-id>")
|
|
259
253
|
.description("Get latest compliance scan for a category")
|
|
260
254
|
.action(async (categoryId) => {
|
|
@@ -262,9 +256,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
262
256
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/categories/${categoryId}/compliance` + "\n");
|
|
263
257
|
const result = await client.get(`/api/v202506/categories/${categoryId}/compliance`);
|
|
264
258
|
ctx.output(result);
|
|
265
|
-
});
|
|
259
|
+
}), () => []);
|
|
266
260
|
|
|
267
|
-
resource
|
|
261
|
+
declareInputs(resource
|
|
268
262
|
.command("list-category <category-id>")
|
|
269
263
|
.description("List all compliance scans for a category")
|
|
270
264
|
.option("--page <value>", "page")
|
|
@@ -277,9 +271,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
277
271
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/categories/${categoryId}/compliances` + "\n");
|
|
278
272
|
const result = await client.get(`/api/v202506/categories/${categoryId}/compliances`, params);
|
|
279
273
|
ctx.output(result);
|
|
280
|
-
});
|
|
274
|
+
}), () => []);
|
|
281
275
|
|
|
282
|
-
resource
|
|
276
|
+
declareInputs(resource
|
|
283
277
|
.command("create-category <category-id>")
|
|
284
278
|
.description("Create a new compliance scan for a category")
|
|
285
279
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -288,17 +282,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
288
282
|
const client = await ctx.getClient();
|
|
289
283
|
let body: unknown;
|
|
290
284
|
if (opts.bodyFile) {
|
|
291
|
-
|
|
292
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
285
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
293
286
|
} else if (opts.body) {
|
|
294
287
|
body = ctx.parseBody(opts.body);
|
|
295
288
|
}
|
|
296
289
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/categories/${categoryId}/compliances` + "\n");
|
|
297
290
|
const result = await client.post(`/api/v202506/categories/${categoryId}/compliances`, body);
|
|
298
291
|
ctx.output(result);
|
|
299
|
-
});
|
|
292
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
300
293
|
|
|
301
|
-
resource
|
|
294
|
+
declareInputs(resource
|
|
302
295
|
.command("get-category <category-id> <id>")
|
|
303
296
|
.description("Get a specific compliance scan for a category")
|
|
304
297
|
.action(async (categoryId, id) => {
|
|
@@ -306,9 +299,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
306
299
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/categories/${categoryId}/compliances/${id}` + "\n");
|
|
307
300
|
const result = await client.get(`/api/v202506/categories/${categoryId}/compliances/${id}`);
|
|
308
301
|
ctx.output(result);
|
|
309
|
-
});
|
|
302
|
+
}), () => []);
|
|
310
303
|
|
|
311
|
-
resource
|
|
304
|
+
declareInputs(resource
|
|
312
305
|
.command("update-category <category-id> <id>")
|
|
313
306
|
.description("Update a compliance scan for a category")
|
|
314
307
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -317,17 +310,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
317
310
|
const client = await ctx.getClient();
|
|
318
311
|
let body: unknown;
|
|
319
312
|
if (opts.bodyFile) {
|
|
320
|
-
|
|
321
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
313
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
322
314
|
} else if (opts.body) {
|
|
323
315
|
body = ctx.parseBody(opts.body);
|
|
324
316
|
}
|
|
325
317
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/categories/${categoryId}/compliances/${id}` + "\n");
|
|
326
318
|
const result = await client.patch(`/api/v202506/categories/${categoryId}/compliances/${id}`, body);
|
|
327
319
|
ctx.output(result);
|
|
328
|
-
});
|
|
320
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
329
321
|
|
|
330
|
-
resource
|
|
322
|
+
declareInputs(resource
|
|
331
323
|
.command("delete-category <category-id> <id>")
|
|
332
324
|
.description("Delete a compliance scan for a category")
|
|
333
325
|
.action(async (categoryId, id) => {
|
|
@@ -335,9 +327,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
335
327
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/categories/${categoryId}/compliances/${id}` + "\n");
|
|
336
328
|
const result = await client.delete(`/api/v202506/categories/${categoryId}/compliances/${id}`);
|
|
337
329
|
ctx.output(result);
|
|
338
|
-
});
|
|
330
|
+
}), () => []);
|
|
339
331
|
|
|
340
|
-
resource
|
|
332
|
+
declareInputs(resource
|
|
341
333
|
.command("get-latest-collection <collection-id>")
|
|
342
334
|
.description("Get latest compliance scan for a collection")
|
|
343
335
|
.action(async (collectionId) => {
|
|
@@ -345,9 +337,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
345
337
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/collections/${collectionId}/compliance` + "\n");
|
|
346
338
|
const result = await client.get(`/api/v202506/collections/${collectionId}/compliance`);
|
|
347
339
|
ctx.output(result);
|
|
348
|
-
});
|
|
340
|
+
}), () => []);
|
|
349
341
|
|
|
350
|
-
resource
|
|
342
|
+
declareInputs(resource
|
|
351
343
|
.command("list-collection <collection-id>")
|
|
352
344
|
.description("List all compliance scans for a collection")
|
|
353
345
|
.option("--page <value>", "page")
|
|
@@ -360,9 +352,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
360
352
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/collections/${collectionId}/compliances` + "\n");
|
|
361
353
|
const result = await client.get(`/api/v202506/collections/${collectionId}/compliances`, params);
|
|
362
354
|
ctx.output(result);
|
|
363
|
-
});
|
|
355
|
+
}), () => []);
|
|
364
356
|
|
|
365
|
-
resource
|
|
357
|
+
declareInputs(resource
|
|
366
358
|
.command("create-collection <collection-id>")
|
|
367
359
|
.description("Create a new compliance scan for a collection")
|
|
368
360
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -371,17 +363,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
371
363
|
const client = await ctx.getClient();
|
|
372
364
|
let body: unknown;
|
|
373
365
|
if (opts.bodyFile) {
|
|
374
|
-
|
|
375
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
366
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
376
367
|
} else if (opts.body) {
|
|
377
368
|
body = ctx.parseBody(opts.body);
|
|
378
369
|
}
|
|
379
370
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/collections/${collectionId}/compliances` + "\n");
|
|
380
371
|
const result = await client.post(`/api/v202506/collections/${collectionId}/compliances`, body);
|
|
381
372
|
ctx.output(result);
|
|
382
|
-
});
|
|
373
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
383
374
|
|
|
384
|
-
resource
|
|
375
|
+
declareInputs(resource
|
|
385
376
|
.command("get-collection <collection-id> <id>")
|
|
386
377
|
.description("Get a specific compliance scan for a collection")
|
|
387
378
|
.action(async (collectionId, id) => {
|
|
@@ -389,9 +380,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
389
380
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/collections/${collectionId}/compliances/${id}` + "\n");
|
|
390
381
|
const result = await client.get(`/api/v202506/collections/${collectionId}/compliances/${id}`);
|
|
391
382
|
ctx.output(result);
|
|
392
|
-
});
|
|
383
|
+
}), () => []);
|
|
393
384
|
|
|
394
|
-
resource
|
|
385
|
+
declareInputs(resource
|
|
395
386
|
.command("update-collection <collection-id> <id>")
|
|
396
387
|
.description("Update a compliance scan for a collection")
|
|
397
388
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -400,17 +391,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
400
391
|
const client = await ctx.getClient();
|
|
401
392
|
let body: unknown;
|
|
402
393
|
if (opts.bodyFile) {
|
|
403
|
-
|
|
404
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
394
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
405
395
|
} else if (opts.body) {
|
|
406
396
|
body = ctx.parseBody(opts.body);
|
|
407
397
|
}
|
|
408
398
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/collections/${collectionId}/compliances/${id}` + "\n");
|
|
409
399
|
const result = await client.patch(`/api/v202506/collections/${collectionId}/compliances/${id}`, body);
|
|
410
400
|
ctx.output(result);
|
|
411
|
-
});
|
|
401
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
412
402
|
|
|
413
|
-
resource
|
|
403
|
+
declareInputs(resource
|
|
414
404
|
.command("delete-collection <collection-id> <id>")
|
|
415
405
|
.description("Delete a compliance scan for a collection")
|
|
416
406
|
.action(async (collectionId, id) => {
|
|
@@ -418,9 +408,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
418
408
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/collections/${collectionId}/compliances/${id}` + "\n");
|
|
419
409
|
const result = await client.delete(`/api/v202506/collections/${collectionId}/compliances/${id}`);
|
|
420
410
|
ctx.output(result);
|
|
421
|
-
});
|
|
411
|
+
}), () => []);
|
|
422
412
|
|
|
423
|
-
resource
|
|
413
|
+
declareInputs(resource
|
|
424
414
|
.command("get-latest-post <post-id>")
|
|
425
415
|
.description("Get latest compliance scan for a post")
|
|
426
416
|
.action(async (postId) => {
|
|
@@ -428,9 +418,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
428
418
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/posts/${postId}/compliance` + "\n");
|
|
429
419
|
const result = await client.get(`/api/v202506/posts/${postId}/compliance`);
|
|
430
420
|
ctx.output(result);
|
|
431
|
-
});
|
|
421
|
+
}), () => []);
|
|
432
422
|
|
|
433
|
-
resource
|
|
423
|
+
declareInputs(resource
|
|
434
424
|
.command("list-post <post-id>")
|
|
435
425
|
.description("List all compliance scans for a post")
|
|
436
426
|
.option("--page <value>", "page")
|
|
@@ -443,9 +433,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
443
433
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/posts/${postId}/compliances` + "\n");
|
|
444
434
|
const result = await client.get(`/api/v202506/posts/${postId}/compliances`, params);
|
|
445
435
|
ctx.output(result);
|
|
446
|
-
});
|
|
436
|
+
}), () => []);
|
|
447
437
|
|
|
448
|
-
resource
|
|
438
|
+
declareInputs(resource
|
|
449
439
|
.command("create-post <post-id>")
|
|
450
440
|
.description("Create a new compliance scan for a post")
|
|
451
441
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -454,17 +444,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
454
444
|
const client = await ctx.getClient();
|
|
455
445
|
let body: unknown;
|
|
456
446
|
if (opts.bodyFile) {
|
|
457
|
-
|
|
458
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
447
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
459
448
|
} else if (opts.body) {
|
|
460
449
|
body = ctx.parseBody(opts.body);
|
|
461
450
|
}
|
|
462
451
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/posts/${postId}/compliances` + "\n");
|
|
463
452
|
const result = await client.post(`/api/v202506/posts/${postId}/compliances`, body);
|
|
464
453
|
ctx.output(result);
|
|
465
|
-
});
|
|
454
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
466
455
|
|
|
467
|
-
resource
|
|
456
|
+
declareInputs(resource
|
|
468
457
|
.command("get-post <post-id> <id>")
|
|
469
458
|
.description("Get a specific compliance scan for a post")
|
|
470
459
|
.action(async (postId, id) => {
|
|
@@ -472,9 +461,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
472
461
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/posts/${postId}/compliances/${id}` + "\n");
|
|
473
462
|
const result = await client.get(`/api/v202506/posts/${postId}/compliances/${id}`);
|
|
474
463
|
ctx.output(result);
|
|
475
|
-
});
|
|
464
|
+
}), () => []);
|
|
476
465
|
|
|
477
|
-
resource
|
|
466
|
+
declareInputs(resource
|
|
478
467
|
.command("update-post <post-id> <id>")
|
|
479
468
|
.description("Update a compliance scan for a post")
|
|
480
469
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -483,17 +472,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
483
472
|
const client = await ctx.getClient();
|
|
484
473
|
let body: unknown;
|
|
485
474
|
if (opts.bodyFile) {
|
|
486
|
-
|
|
487
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
475
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
488
476
|
} else if (opts.body) {
|
|
489
477
|
body = ctx.parseBody(opts.body);
|
|
490
478
|
}
|
|
491
479
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/posts/${postId}/compliances/${id}` + "\n");
|
|
492
480
|
const result = await client.patch(`/api/v202506/posts/${postId}/compliances/${id}`, body);
|
|
493
481
|
ctx.output(result);
|
|
494
|
-
});
|
|
482
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
495
483
|
|
|
496
|
-
resource
|
|
484
|
+
declareInputs(resource
|
|
497
485
|
.command("delete-post <post-id> <id>")
|
|
498
486
|
.description("Delete a compliance scan for a post")
|
|
499
487
|
.action(async (postId, id) => {
|
|
@@ -501,9 +489,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
501
489
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/posts/${postId}/compliances/${id}` + "\n");
|
|
502
490
|
const result = await client.delete(`/api/v202506/posts/${postId}/compliances/${id}`);
|
|
503
491
|
ctx.output(result);
|
|
504
|
-
});
|
|
492
|
+
}), () => []);
|
|
505
493
|
|
|
506
|
-
resource
|
|
494
|
+
declareInputs(resource
|
|
507
495
|
.command("get-latest-enrollment-pack <enrollment-pack-id>")
|
|
508
496
|
.description("Get latest compliance scan for an enrollment pack")
|
|
509
497
|
.action(async (enrollmentPackId) => {
|
|
@@ -511,9 +499,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
511
499
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/enrollment_packs/${enrollmentPackId}/compliance` + "\n");
|
|
512
500
|
const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliance`);
|
|
513
501
|
ctx.output(result);
|
|
514
|
-
});
|
|
502
|
+
}), () => []);
|
|
515
503
|
|
|
516
|
-
resource
|
|
504
|
+
declareInputs(resource
|
|
517
505
|
.command("list-enrollment-pack <enrollment-pack-id>")
|
|
518
506
|
.description("List all compliance scans for an enrollment pack")
|
|
519
507
|
.option("--page <value>", "page")
|
|
@@ -526,9 +514,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
526
514
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/enrollment_packs/${enrollmentPackId}/compliances` + "\n");
|
|
527
515
|
const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances`, params);
|
|
528
516
|
ctx.output(result);
|
|
529
|
-
});
|
|
517
|
+
}), () => []);
|
|
530
518
|
|
|
531
|
-
resource
|
|
519
|
+
declareInputs(resource
|
|
532
520
|
.command("create-enrollment-pack <enrollment-pack-id>")
|
|
533
521
|
.description("Create a new compliance scan for an enrollment pack")
|
|
534
522
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -537,17 +525,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
537
525
|
const client = await ctx.getClient();
|
|
538
526
|
let body: unknown;
|
|
539
527
|
if (opts.bodyFile) {
|
|
540
|
-
|
|
541
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
528
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
542
529
|
} else if (opts.body) {
|
|
543
530
|
body = ctx.parseBody(opts.body);
|
|
544
531
|
}
|
|
545
532
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v202506/enrollment_packs/${enrollmentPackId}/compliances` + "\n");
|
|
546
533
|
const result = await client.post(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances`, body);
|
|
547
534
|
ctx.output(result);
|
|
548
|
-
});
|
|
535
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
549
536
|
|
|
550
|
-
resource
|
|
537
|
+
declareInputs(resource
|
|
551
538
|
.command("get-enrollment-pack <enrollment-pack-id> <id>")
|
|
552
539
|
.description("Get a specific compliance scan for an enrollment pack")
|
|
553
540
|
.action(async (enrollmentPackId, id) => {
|
|
@@ -555,9 +542,9 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
555
542
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}` + "\n");
|
|
556
543
|
const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}`);
|
|
557
544
|
ctx.output(result);
|
|
558
|
-
});
|
|
545
|
+
}), () => []);
|
|
559
546
|
|
|
560
|
-
resource
|
|
547
|
+
declareInputs(resource
|
|
561
548
|
.command("update-enrollment-pack <enrollment-pack-id> <id>")
|
|
562
549
|
.description("Update a compliance scan for an enrollment pack")
|
|
563
550
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -566,17 +553,16 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
566
553
|
const client = await ctx.getClient();
|
|
567
554
|
let body: unknown;
|
|
568
555
|
if (opts.bodyFile) {
|
|
569
|
-
|
|
570
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
556
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
571
557
|
} else if (opts.body) {
|
|
572
558
|
body = ctx.parseBody(opts.body);
|
|
573
559
|
}
|
|
574
560
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}` + "\n");
|
|
575
561
|
const result = await client.patch(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}`, body);
|
|
576
562
|
ctx.output(result);
|
|
577
|
-
});
|
|
563
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
578
564
|
|
|
579
|
-
resource
|
|
565
|
+
declareInputs(resource
|
|
580
566
|
.command("delete-enrollment-pack <enrollment-pack-id> <id>")
|
|
581
567
|
.description("Delete a compliance scan for an enrollment pack")
|
|
582
568
|
.action(async (enrollmentPackId, id) => {
|
|
@@ -584,6 +570,6 @@ export function registerCompliance(parent: Command, ctx: CommandContext): void {
|
|
|
584
570
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}` + "\n");
|
|
585
571
|
const result = await client.delete(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}`);
|
|
586
572
|
ctx.output(result);
|
|
587
|
-
});
|
|
573
|
+
}), () => []);
|
|
588
574
|
|
|
589
575
|
}
|