@fluid-app/v2025-06-cli-commands 0.1.337 → 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.
package/dist/index.mjs CHANGED
@@ -1,20 +1,21 @@
1
- import { createDomainCommand } from "@fluid-app/fluid-cli";
1
+ import { createDomainCommand, declareInputs } from "@fluid-app/fluid-cli";
2
2
  import "commander";
3
3
  //#region src/generated/company-contacts.ts
4
4
  function registerCompanyContacts(parent, ctx) {
5
5
  const resource = parent.command("company-contacts").description("Company Contacts");
6
- resource.command("create").description("Create a company contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
6
+ declareInputs(resource.command("create").description("Create a company contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
7
7
  const client = await ctx.getClient();
8
8
  let body;
9
- if (opts.bodyFile) {
10
- const { readFileSync } = await import("fs");
11
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
12
- } else if (opts.body) body = ctx.parseBody(opts.body);
9
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
10
+ else if (opts.body) body = ctx.parseBody(opts.body);
13
11
  if (ctx.verbose) process.stderr.write("POST /api/company/contacts\n");
14
12
  const result = await client.post(`/api/company/contacts`, body);
15
13
  ctx.output(result);
16
- });
17
- resource.command("list").description("List company contacts").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter contacts by status").option("--search-query <value>", "Search contacts by name, email, or phone").option("--by-metadata <value>", "Filter contacts by metadata (JSON string)").action(async (opts) => {
14
+ }), (opts) => opts.bodyFile ? [{
15
+ kind: "file",
16
+ path: String(opts.bodyFile)
17
+ }] : []);
18
+ declareInputs(resource.command("list").description("List company contacts").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter contacts by status").option("--search-query <value>", "Search contacts by name, email, or phone").option("--by-metadata <value>", "Filter contacts by metadata (JSON string)").action(async (opts) => {
18
19
  const client = await ctx.getClient();
19
20
  const params = {};
20
21
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -25,46 +26,47 @@ function registerCompanyContacts(parent, ctx) {
25
26
  if (ctx.verbose) process.stderr.write("GET /api/company/contacts\n");
26
27
  const result = await client.get(`/api/company/contacts`, params);
27
28
  ctx.output(result);
28
- });
29
- resource.command("delete <id>").description("Delete a company contact").action(async (id) => {
29
+ }), () => []);
30
+ declareInputs(resource.command("delete <id>").description("Delete a company contact").action(async (id) => {
30
31
  const client = await ctx.getClient();
31
32
  if (ctx.verbose) process.stderr.write(`DELETE /api/company/contacts/${id}
32
33
  `);
33
34
  const result = await client.delete(`/api/company/contacts/${id}`);
34
35
  ctx.output(result);
35
- });
36
- resource.command("get <id>").description("Get a company contact").action(async (id) => {
36
+ }), () => []);
37
+ declareInputs(resource.command("get <id>").description("Get a company contact").action(async (id) => {
37
38
  const client = await ctx.getClient();
38
39
  if (ctx.verbose) process.stderr.write(`GET /api/company/contacts/${id}
39
40
  `);
40
41
  const result = await client.get(`/api/company/contacts/${id}`);
41
42
  ctx.output(result);
42
- });
43
- resource.command("update <id>").description("Update a company contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
43
+ }), () => []);
44
+ declareInputs(resource.command("update <id>").description("Update a company contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
44
45
  const client = await ctx.getClient();
45
46
  let body;
46
- if (opts.bodyFile) {
47
- const { readFileSync } = await import("fs");
48
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
49
- } else if (opts.body) body = ctx.parseBody(opts.body);
47
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
48
+ else if (opts.body) body = ctx.parseBody(opts.body);
50
49
  if (ctx.verbose) process.stderr.write(`PATCH /api/company/contacts/${id}
51
50
  `);
52
51
  const result = await client.patch(`/api/company/contacts/${id}`, body);
53
52
  ctx.output(result);
54
- });
53
+ }), (opts) => opts.bodyFile ? [{
54
+ kind: "file",
55
+ path: String(opts.bodyFile)
56
+ }] : []);
55
57
  }
56
58
  //#endregion
57
59
  //#region src/generated/compliance.ts
58
60
  function registerCompliance(parent, ctx) {
59
61
  const resource = parent.command("compliance").description("Compliance");
60
- resource.command("get-latest-product <product-id>").description("Get latest compliance scan for a product").action(async (productId) => {
62
+ declareInputs(resource.command("get-latest-product <product-id>").description("Get latest compliance scan for a product").action(async (productId) => {
61
63
  const client = await ctx.getClient();
62
64
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/products/${productId}/compliance
63
65
  `);
64
66
  const result = await client.get(`/api/v202506/products/${productId}/compliance`);
65
67
  ctx.output(result);
66
- });
67
- resource.command("list-product <product-id>").description("List all compliance scans for a product").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (productId, opts) => {
68
+ }), () => []);
69
+ declareInputs(resource.command("list-product <product-id>").description("List all compliance scans for a product").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (productId, opts) => {
68
70
  const client = await ctx.getClient();
69
71
  const params = {};
70
72
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -73,53 +75,55 @@ function registerCompliance(parent, ctx) {
73
75
  `);
74
76
  const result = await client.get(`/api/v202506/products/${productId}/compliances`, params);
75
77
  ctx.output(result);
76
- });
77
- resource.command("create-product <product-id>").description("Create a new compliance scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, opts) => {
78
+ }), () => []);
79
+ declareInputs(resource.command("create-product <product-id>").description("Create a new compliance scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, opts) => {
78
80
  const client = await ctx.getClient();
79
81
  let body;
80
- if (opts.bodyFile) {
81
- const { readFileSync } = await import("fs");
82
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
83
- } else if (opts.body) body = ctx.parseBody(opts.body);
82
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
83
+ else if (opts.body) body = ctx.parseBody(opts.body);
84
84
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/products/${productId}/compliances
85
85
  `);
86
86
  const result = await client.post(`/api/v202506/products/${productId}/compliances`, body);
87
87
  ctx.output(result);
88
- });
89
- resource.command("get-product <product-id> <id>").description("Get a specific compliance scan for a product").action(async (productId, id) => {
88
+ }), (opts) => opts.bodyFile ? [{
89
+ kind: "file",
90
+ path: String(opts.bodyFile)
91
+ }] : []);
92
+ declareInputs(resource.command("get-product <product-id> <id>").description("Get a specific compliance scan for a product").action(async (productId, id) => {
90
93
  const client = await ctx.getClient();
91
94
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/products/${productId}/compliances/${id}
92
95
  `);
93
96
  const result = await client.get(`/api/v202506/products/${productId}/compliances/${id}`);
94
97
  ctx.output(result);
95
- });
96
- resource.command("update-product <product-id> <id>").description("Update a compliance scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, id, opts) => {
98
+ }), () => []);
99
+ declareInputs(resource.command("update-product <product-id> <id>").description("Update a compliance scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, id, opts) => {
97
100
  const client = await ctx.getClient();
98
101
  let body;
99
- if (opts.bodyFile) {
100
- const { readFileSync } = await import("fs");
101
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
102
- } else if (opts.body) body = ctx.parseBody(opts.body);
102
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
103
+ else if (opts.body) body = ctx.parseBody(opts.body);
103
104
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/products/${productId}/compliances/${id}
104
105
  `);
105
106
  const result = await client.patch(`/api/v202506/products/${productId}/compliances/${id}`, body);
106
107
  ctx.output(result);
107
- });
108
- resource.command("delete-product <product-id> <id>").description("Delete a compliance scan for a product").action(async (productId, id) => {
108
+ }), (opts) => opts.bodyFile ? [{
109
+ kind: "file",
110
+ path: String(opts.bodyFile)
111
+ }] : []);
112
+ declareInputs(resource.command("delete-product <product-id> <id>").description("Delete a compliance scan for a product").action(async (productId, id) => {
109
113
  const client = await ctx.getClient();
110
114
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/products/${productId}/compliances/${id}
111
115
  `);
112
116
  const result = await client.delete(`/api/v202506/products/${productId}/compliances/${id}`);
113
117
  ctx.output(result);
114
- });
115
- resource.command("get-latest-media <medium-id>").description("Get latest compliance scan for media").action(async (mediumId) => {
118
+ }), () => []);
119
+ declareInputs(resource.command("get-latest-media <medium-id>").description("Get latest compliance scan for media").action(async (mediumId) => {
116
120
  const client = await ctx.getClient();
117
121
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/media/${mediumId}/compliance
118
122
  `);
119
123
  const result = await client.get(`/api/v202506/media/${mediumId}/compliance`);
120
124
  ctx.output(result);
121
- });
122
- resource.command("list-media <medium-id>").description("List all compliance scans for media").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (mediumId, opts) => {
125
+ }), () => []);
126
+ declareInputs(resource.command("list-media <medium-id>").description("List all compliance scans for media").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (mediumId, opts) => {
123
127
  const client = await ctx.getClient();
124
128
  const params = {};
125
129
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -128,53 +132,55 @@ function registerCompliance(parent, ctx) {
128
132
  `);
129
133
  const result = await client.get(`/api/v202506/media/${mediumId}/compliances`, params);
130
134
  ctx.output(result);
131
- });
132
- resource.command("create-media <medium-id>").description("Create a new compliance scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, opts) => {
135
+ }), () => []);
136
+ declareInputs(resource.command("create-media <medium-id>").description("Create a new compliance scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, opts) => {
133
137
  const client = await ctx.getClient();
134
138
  let body;
135
- if (opts.bodyFile) {
136
- const { readFileSync } = await import("fs");
137
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
138
- } else if (opts.body) body = ctx.parseBody(opts.body);
139
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
140
+ else if (opts.body) body = ctx.parseBody(opts.body);
139
141
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/media/${mediumId}/compliances
140
142
  `);
141
143
  const result = await client.post(`/api/v202506/media/${mediumId}/compliances`, body);
142
144
  ctx.output(result);
143
- });
144
- resource.command("get-media <medium-id> <id>").description("Get a specific compliance scan for media").action(async (mediumId, id) => {
145
+ }), (opts) => opts.bodyFile ? [{
146
+ kind: "file",
147
+ path: String(opts.bodyFile)
148
+ }] : []);
149
+ declareInputs(resource.command("get-media <medium-id> <id>").description("Get a specific compliance scan for media").action(async (mediumId, id) => {
145
150
  const client = await ctx.getClient();
146
151
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/media/${mediumId}/compliances/${id}
147
152
  `);
148
153
  const result = await client.get(`/api/v202506/media/${mediumId}/compliances/${id}`);
149
154
  ctx.output(result);
150
- });
151
- resource.command("update-media <medium-id> <id>").description("Update a compliance scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, id, opts) => {
155
+ }), () => []);
156
+ declareInputs(resource.command("update-media <medium-id> <id>").description("Update a compliance scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, id, opts) => {
152
157
  const client = await ctx.getClient();
153
158
  let body;
154
- if (opts.bodyFile) {
155
- const { readFileSync } = await import("fs");
156
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
157
- } else if (opts.body) body = ctx.parseBody(opts.body);
159
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
160
+ else if (opts.body) body = ctx.parseBody(opts.body);
158
161
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/media/${mediumId}/compliances/${id}
159
162
  `);
160
163
  const result = await client.patch(`/api/v202506/media/${mediumId}/compliances/${id}`, body);
161
164
  ctx.output(result);
162
- });
163
- resource.command("delete-media <medium-id> <id>").description("Delete a compliance scan for media").action(async (mediumId, id) => {
165
+ }), (opts) => opts.bodyFile ? [{
166
+ kind: "file",
167
+ path: String(opts.bodyFile)
168
+ }] : []);
169
+ declareInputs(resource.command("delete-media <medium-id> <id>").description("Delete a compliance scan for media").action(async (mediumId, id) => {
164
170
  const client = await ctx.getClient();
165
171
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/media/${mediumId}/compliances/${id}
166
172
  `);
167
173
  const result = await client.delete(`/api/v202506/media/${mediumId}/compliances/${id}`);
168
174
  ctx.output(result);
169
- });
170
- resource.command("get-latest-playlist <playlist-id>").description("Get latest compliance scan for a playlist").action(async (playlistId) => {
175
+ }), () => []);
176
+ declareInputs(resource.command("get-latest-playlist <playlist-id>").description("Get latest compliance scan for a playlist").action(async (playlistId) => {
171
177
  const client = await ctx.getClient();
172
178
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/playlists/${playlistId}/compliance
173
179
  `);
174
180
  const result = await client.get(`/api/v202506/playlists/${playlistId}/compliance`);
175
181
  ctx.output(result);
176
- });
177
- resource.command("list-playlist <playlist-id>").description("List all compliance scans for a playlist").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (playlistId, opts) => {
182
+ }), () => []);
183
+ declareInputs(resource.command("list-playlist <playlist-id>").description("List all compliance scans for a playlist").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (playlistId, opts) => {
178
184
  const client = await ctx.getClient();
179
185
  const params = {};
180
186
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -183,53 +189,55 @@ function registerCompliance(parent, ctx) {
183
189
  `);
184
190
  const result = await client.get(`/api/v202506/playlists/${playlistId}/compliances`, params);
185
191
  ctx.output(result);
186
- });
187
- resource.command("create-playlist <playlist-id>").description("Create a new compliance scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
192
+ }), () => []);
193
+ declareInputs(resource.command("create-playlist <playlist-id>").description("Create a new compliance scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
188
194
  const client = await ctx.getClient();
189
195
  let body;
190
- if (opts.bodyFile) {
191
- const { readFileSync } = await import("fs");
192
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
193
- } else if (opts.body) body = ctx.parseBody(opts.body);
196
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
197
+ else if (opts.body) body = ctx.parseBody(opts.body);
194
198
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/playlists/${playlistId}/compliances
195
199
  `);
196
200
  const result = await client.post(`/api/v202506/playlists/${playlistId}/compliances`, body);
197
201
  ctx.output(result);
198
- });
199
- resource.command("get-playlist <playlist-id> <id>").description("Get a specific compliance scan for a playlist").action(async (playlistId, id) => {
202
+ }), (opts) => opts.bodyFile ? [{
203
+ kind: "file",
204
+ path: String(opts.bodyFile)
205
+ }] : []);
206
+ declareInputs(resource.command("get-playlist <playlist-id> <id>").description("Get a specific compliance scan for a playlist").action(async (playlistId, id) => {
200
207
  const client = await ctx.getClient();
201
208
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/playlists/${playlistId}/compliances/${id}
202
209
  `);
203
210
  const result = await client.get(`/api/v202506/playlists/${playlistId}/compliances/${id}`);
204
211
  ctx.output(result);
205
- });
206
- resource.command("update-playlist <playlist-id> <id>").description("Update a compliance scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, id, opts) => {
212
+ }), () => []);
213
+ declareInputs(resource.command("update-playlist <playlist-id> <id>").description("Update a compliance scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, id, opts) => {
207
214
  const client = await ctx.getClient();
208
215
  let body;
209
- if (opts.bodyFile) {
210
- const { readFileSync } = await import("fs");
211
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
212
- } else if (opts.body) body = ctx.parseBody(opts.body);
216
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
217
+ else if (opts.body) body = ctx.parseBody(opts.body);
213
218
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/playlists/${playlistId}/compliances/${id}
214
219
  `);
215
220
  const result = await client.patch(`/api/v202506/playlists/${playlistId}/compliances/${id}`, body);
216
221
  ctx.output(result);
217
- });
218
- resource.command("delete-playlist <playlist-id> <id>").description("Delete a compliance scan for a playlist").action(async (playlistId, id) => {
222
+ }), (opts) => opts.bodyFile ? [{
223
+ kind: "file",
224
+ path: String(opts.bodyFile)
225
+ }] : []);
226
+ declareInputs(resource.command("delete-playlist <playlist-id> <id>").description("Delete a compliance scan for a playlist").action(async (playlistId, id) => {
219
227
  const client = await ctx.getClient();
220
228
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/playlists/${playlistId}/compliances/${id}
221
229
  `);
222
230
  const result = await client.delete(`/api/v202506/playlists/${playlistId}/compliances/${id}`);
223
231
  ctx.output(result);
224
- });
225
- resource.command("get-latest-category <category-id>").description("Get latest compliance scan for a category").action(async (categoryId) => {
232
+ }), () => []);
233
+ declareInputs(resource.command("get-latest-category <category-id>").description("Get latest compliance scan for a category").action(async (categoryId) => {
226
234
  const client = await ctx.getClient();
227
235
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/categories/${categoryId}/compliance
228
236
  `);
229
237
  const result = await client.get(`/api/v202506/categories/${categoryId}/compliance`);
230
238
  ctx.output(result);
231
- });
232
- resource.command("list-category <category-id>").description("List all compliance scans for a category").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (categoryId, opts) => {
239
+ }), () => []);
240
+ declareInputs(resource.command("list-category <category-id>").description("List all compliance scans for a category").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (categoryId, opts) => {
233
241
  const client = await ctx.getClient();
234
242
  const params = {};
235
243
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -238,53 +246,55 @@ function registerCompliance(parent, ctx) {
238
246
  `);
239
247
  const result = await client.get(`/api/v202506/categories/${categoryId}/compliances`, params);
240
248
  ctx.output(result);
241
- });
242
- resource.command("create-category <category-id>").description("Create a new compliance scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, opts) => {
249
+ }), () => []);
250
+ declareInputs(resource.command("create-category <category-id>").description("Create a new compliance scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, opts) => {
243
251
  const client = await ctx.getClient();
244
252
  let body;
245
- if (opts.bodyFile) {
246
- const { readFileSync } = await import("fs");
247
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
248
- } else if (opts.body) body = ctx.parseBody(opts.body);
253
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
254
+ else if (opts.body) body = ctx.parseBody(opts.body);
249
255
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/categories/${categoryId}/compliances
250
256
  `);
251
257
  const result = await client.post(`/api/v202506/categories/${categoryId}/compliances`, body);
252
258
  ctx.output(result);
253
- });
254
- resource.command("get-category <category-id> <id>").description("Get a specific compliance scan for a category").action(async (categoryId, id) => {
259
+ }), (opts) => opts.bodyFile ? [{
260
+ kind: "file",
261
+ path: String(opts.bodyFile)
262
+ }] : []);
263
+ declareInputs(resource.command("get-category <category-id> <id>").description("Get a specific compliance scan for a category").action(async (categoryId, id) => {
255
264
  const client = await ctx.getClient();
256
265
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/categories/${categoryId}/compliances/${id}
257
266
  `);
258
267
  const result = await client.get(`/api/v202506/categories/${categoryId}/compliances/${id}`);
259
268
  ctx.output(result);
260
- });
261
- resource.command("update-category <category-id> <id>").description("Update a compliance scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, id, opts) => {
269
+ }), () => []);
270
+ declareInputs(resource.command("update-category <category-id> <id>").description("Update a compliance scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, id, opts) => {
262
271
  const client = await ctx.getClient();
263
272
  let body;
264
- if (opts.bodyFile) {
265
- const { readFileSync } = await import("fs");
266
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
267
- } else if (opts.body) body = ctx.parseBody(opts.body);
273
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
274
+ else if (opts.body) body = ctx.parseBody(opts.body);
268
275
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/categories/${categoryId}/compliances/${id}
269
276
  `);
270
277
  const result = await client.patch(`/api/v202506/categories/${categoryId}/compliances/${id}`, body);
271
278
  ctx.output(result);
272
- });
273
- resource.command("delete-category <category-id> <id>").description("Delete a compliance scan for a category").action(async (categoryId, id) => {
279
+ }), (opts) => opts.bodyFile ? [{
280
+ kind: "file",
281
+ path: String(opts.bodyFile)
282
+ }] : []);
283
+ declareInputs(resource.command("delete-category <category-id> <id>").description("Delete a compliance scan for a category").action(async (categoryId, id) => {
274
284
  const client = await ctx.getClient();
275
285
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/categories/${categoryId}/compliances/${id}
276
286
  `);
277
287
  const result = await client.delete(`/api/v202506/categories/${categoryId}/compliances/${id}`);
278
288
  ctx.output(result);
279
- });
280
- resource.command("get-latest-collection <collection-id>").description("Get latest compliance scan for a collection").action(async (collectionId) => {
289
+ }), () => []);
290
+ declareInputs(resource.command("get-latest-collection <collection-id>").description("Get latest compliance scan for a collection").action(async (collectionId) => {
281
291
  const client = await ctx.getClient();
282
292
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/collections/${collectionId}/compliance
283
293
  `);
284
294
  const result = await client.get(`/api/v202506/collections/${collectionId}/compliance`);
285
295
  ctx.output(result);
286
- });
287
- resource.command("list-collection <collection-id>").description("List all compliance scans for a collection").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (collectionId, opts) => {
296
+ }), () => []);
297
+ declareInputs(resource.command("list-collection <collection-id>").description("List all compliance scans for a collection").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (collectionId, opts) => {
288
298
  const client = await ctx.getClient();
289
299
  const params = {};
290
300
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -293,53 +303,55 @@ function registerCompliance(parent, ctx) {
293
303
  `);
294
304
  const result = await client.get(`/api/v202506/collections/${collectionId}/compliances`, params);
295
305
  ctx.output(result);
296
- });
297
- resource.command("create-collection <collection-id>").description("Create a new compliance scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, opts) => {
306
+ }), () => []);
307
+ declareInputs(resource.command("create-collection <collection-id>").description("Create a new compliance scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, opts) => {
298
308
  const client = await ctx.getClient();
299
309
  let body;
300
- if (opts.bodyFile) {
301
- const { readFileSync } = await import("fs");
302
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
303
- } else if (opts.body) body = ctx.parseBody(opts.body);
310
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
311
+ else if (opts.body) body = ctx.parseBody(opts.body);
304
312
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/collections/${collectionId}/compliances
305
313
  `);
306
314
  const result = await client.post(`/api/v202506/collections/${collectionId}/compliances`, body);
307
315
  ctx.output(result);
308
- });
309
- resource.command("get-collection <collection-id> <id>").description("Get a specific compliance scan for a collection").action(async (collectionId, id) => {
316
+ }), (opts) => opts.bodyFile ? [{
317
+ kind: "file",
318
+ path: String(opts.bodyFile)
319
+ }] : []);
320
+ declareInputs(resource.command("get-collection <collection-id> <id>").description("Get a specific compliance scan for a collection").action(async (collectionId, id) => {
310
321
  const client = await ctx.getClient();
311
322
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/collections/${collectionId}/compliances/${id}
312
323
  `);
313
324
  const result = await client.get(`/api/v202506/collections/${collectionId}/compliances/${id}`);
314
325
  ctx.output(result);
315
- });
316
- resource.command("update-collection <collection-id> <id>").description("Update a compliance scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, id, opts) => {
326
+ }), () => []);
327
+ declareInputs(resource.command("update-collection <collection-id> <id>").description("Update a compliance scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, id, opts) => {
317
328
  const client = await ctx.getClient();
318
329
  let body;
319
- if (opts.bodyFile) {
320
- const { readFileSync } = await import("fs");
321
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
322
- } else if (opts.body) body = ctx.parseBody(opts.body);
330
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
331
+ else if (opts.body) body = ctx.parseBody(opts.body);
323
332
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/collections/${collectionId}/compliances/${id}
324
333
  `);
325
334
  const result = await client.patch(`/api/v202506/collections/${collectionId}/compliances/${id}`, body);
326
335
  ctx.output(result);
327
- });
328
- resource.command("delete-collection <collection-id> <id>").description("Delete a compliance scan for a collection").action(async (collectionId, id) => {
336
+ }), (opts) => opts.bodyFile ? [{
337
+ kind: "file",
338
+ path: String(opts.bodyFile)
339
+ }] : []);
340
+ declareInputs(resource.command("delete-collection <collection-id> <id>").description("Delete a compliance scan for a collection").action(async (collectionId, id) => {
329
341
  const client = await ctx.getClient();
330
342
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/collections/${collectionId}/compliances/${id}
331
343
  `);
332
344
  const result = await client.delete(`/api/v202506/collections/${collectionId}/compliances/${id}`);
333
345
  ctx.output(result);
334
- });
335
- resource.command("get-latest-post <post-id>").description("Get latest compliance scan for a post").action(async (postId) => {
346
+ }), () => []);
347
+ declareInputs(resource.command("get-latest-post <post-id>").description("Get latest compliance scan for a post").action(async (postId) => {
336
348
  const client = await ctx.getClient();
337
349
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/posts/${postId}/compliance
338
350
  `);
339
351
  const result = await client.get(`/api/v202506/posts/${postId}/compliance`);
340
352
  ctx.output(result);
341
- });
342
- resource.command("list-post <post-id>").description("List all compliance scans for a post").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (postId, opts) => {
353
+ }), () => []);
354
+ declareInputs(resource.command("list-post <post-id>").description("List all compliance scans for a post").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (postId, opts) => {
343
355
  const client = await ctx.getClient();
344
356
  const params = {};
345
357
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -348,53 +360,55 @@ function registerCompliance(parent, ctx) {
348
360
  `);
349
361
  const result = await client.get(`/api/v202506/posts/${postId}/compliances`, params);
350
362
  ctx.output(result);
351
- });
352
- resource.command("create-post <post-id>").description("Create a new compliance scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, opts) => {
363
+ }), () => []);
364
+ declareInputs(resource.command("create-post <post-id>").description("Create a new compliance scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, opts) => {
353
365
  const client = await ctx.getClient();
354
366
  let body;
355
- if (opts.bodyFile) {
356
- const { readFileSync } = await import("fs");
357
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
358
- } else if (opts.body) body = ctx.parseBody(opts.body);
367
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
368
+ else if (opts.body) body = ctx.parseBody(opts.body);
359
369
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/posts/${postId}/compliances
360
370
  `);
361
371
  const result = await client.post(`/api/v202506/posts/${postId}/compliances`, body);
362
372
  ctx.output(result);
363
- });
364
- resource.command("get-post <post-id> <id>").description("Get a specific compliance scan for a post").action(async (postId, id) => {
373
+ }), (opts) => opts.bodyFile ? [{
374
+ kind: "file",
375
+ path: String(opts.bodyFile)
376
+ }] : []);
377
+ declareInputs(resource.command("get-post <post-id> <id>").description("Get a specific compliance scan for a post").action(async (postId, id) => {
365
378
  const client = await ctx.getClient();
366
379
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/posts/${postId}/compliances/${id}
367
380
  `);
368
381
  const result = await client.get(`/api/v202506/posts/${postId}/compliances/${id}`);
369
382
  ctx.output(result);
370
- });
371
- resource.command("update-post <post-id> <id>").description("Update a compliance scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, id, opts) => {
383
+ }), () => []);
384
+ declareInputs(resource.command("update-post <post-id> <id>").description("Update a compliance scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, id, opts) => {
372
385
  const client = await ctx.getClient();
373
386
  let body;
374
- if (opts.bodyFile) {
375
- const { readFileSync } = await import("fs");
376
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
377
- } else if (opts.body) body = ctx.parseBody(opts.body);
387
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
388
+ else if (opts.body) body = ctx.parseBody(opts.body);
378
389
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/posts/${postId}/compliances/${id}
379
390
  `);
380
391
  const result = await client.patch(`/api/v202506/posts/${postId}/compliances/${id}`, body);
381
392
  ctx.output(result);
382
- });
383
- resource.command("delete-post <post-id> <id>").description("Delete a compliance scan for a post").action(async (postId, id) => {
393
+ }), (opts) => opts.bodyFile ? [{
394
+ kind: "file",
395
+ path: String(opts.bodyFile)
396
+ }] : []);
397
+ declareInputs(resource.command("delete-post <post-id> <id>").description("Delete a compliance scan for a post").action(async (postId, id) => {
384
398
  const client = await ctx.getClient();
385
399
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/posts/${postId}/compliances/${id}
386
400
  `);
387
401
  const result = await client.delete(`/api/v202506/posts/${postId}/compliances/${id}`);
388
402
  ctx.output(result);
389
- });
390
- resource.command("get-latest-enrollment-pack <enrollment-pack-id>").description("Get latest compliance scan for an enrollment pack").action(async (enrollmentPackId) => {
403
+ }), () => []);
404
+ declareInputs(resource.command("get-latest-enrollment-pack <enrollment-pack-id>").description("Get latest compliance scan for an enrollment pack").action(async (enrollmentPackId) => {
391
405
  const client = await ctx.getClient();
392
406
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/enrollment_packs/${enrollmentPackId}/compliance
393
407
  `);
394
408
  const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliance`);
395
409
  ctx.output(result);
396
- });
397
- resource.command("list-enrollment-pack <enrollment-pack-id>").description("List all compliance scans for an enrollment pack").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (enrollmentPackId, opts) => {
410
+ }), () => []);
411
+ declareInputs(resource.command("list-enrollment-pack <enrollment-pack-id>").description("List all compliance scans for an enrollment pack").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (enrollmentPackId, opts) => {
398
412
  const client = await ctx.getClient();
399
413
  const params = {};
400
414
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -403,146 +417,153 @@ function registerCompliance(parent, ctx) {
403
417
  `);
404
418
  const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances`, params);
405
419
  ctx.output(result);
406
- });
407
- resource.command("create-enrollment-pack <enrollment-pack-id>").description("Create a new compliance scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, opts) => {
420
+ }), () => []);
421
+ declareInputs(resource.command("create-enrollment-pack <enrollment-pack-id>").description("Create a new compliance scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, opts) => {
408
422
  const client = await ctx.getClient();
409
423
  let body;
410
- if (opts.bodyFile) {
411
- const { readFileSync } = await import("fs");
412
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
413
- } else if (opts.body) body = ctx.parseBody(opts.body);
424
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
425
+ else if (opts.body) body = ctx.parseBody(opts.body);
414
426
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/enrollment_packs/${enrollmentPackId}/compliances
415
427
  `);
416
428
  const result = await client.post(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances`, body);
417
429
  ctx.output(result);
418
- });
419
- resource.command("get-enrollment-pack <enrollment-pack-id> <id>").description("Get a specific compliance scan for an enrollment pack").action(async (enrollmentPackId, id) => {
430
+ }), (opts) => opts.bodyFile ? [{
431
+ kind: "file",
432
+ path: String(opts.bodyFile)
433
+ }] : []);
434
+ declareInputs(resource.command("get-enrollment-pack <enrollment-pack-id> <id>").description("Get a specific compliance scan for an enrollment pack").action(async (enrollmentPackId, id) => {
420
435
  const client = await ctx.getClient();
421
436
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}
422
437
  `);
423
438
  const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}`);
424
439
  ctx.output(result);
425
- });
426
- resource.command("update-enrollment-pack <enrollment-pack-id> <id>").description("Update a compliance scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, id, opts) => {
440
+ }), () => []);
441
+ declareInputs(resource.command("update-enrollment-pack <enrollment-pack-id> <id>").description("Update a compliance scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, id, opts) => {
427
442
  const client = await ctx.getClient();
428
443
  let body;
429
- if (opts.bodyFile) {
430
- const { readFileSync } = await import("fs");
431
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
432
- } else if (opts.body) body = ctx.parseBody(opts.body);
444
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
445
+ else if (opts.body) body = ctx.parseBody(opts.body);
433
446
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}
434
447
  `);
435
448
  const result = await client.patch(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}`, body);
436
449
  ctx.output(result);
437
- });
438
- resource.command("delete-enrollment-pack <enrollment-pack-id> <id>").description("Delete a compliance scan for an enrollment pack").action(async (enrollmentPackId, id) => {
450
+ }), (opts) => opts.bodyFile ? [{
451
+ kind: "file",
452
+ path: String(opts.bodyFile)
453
+ }] : []);
454
+ declareInputs(resource.command("delete-enrollment-pack <enrollment-pack-id> <id>").description("Delete a compliance scan for an enrollment pack").action(async (enrollmentPackId, id) => {
439
455
  const client = await ctx.getClient();
440
456
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}
441
457
  `);
442
458
  const result = await client.delete(`/api/v202506/enrollment_packs/${enrollmentPackId}/compliances/${id}`);
443
459
  ctx.output(result);
444
- });
460
+ }), () => []);
445
461
  }
446
462
  //#endregion
447
463
  //#region src/generated/customers.ts
448
464
  function registerCustomers(parent, ctx) {
449
465
  const resource = parent.command("customers").description("Customers");
450
- resource.command("create").description("Create a customer").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
466
+ declareInputs(resource.command("create").description("Create a customer").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
451
467
  const client = await ctx.getClient();
452
468
  let body;
453
- if (opts.bodyFile) {
454
- const { readFileSync } = await import("fs");
455
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
456
- } else if (opts.body) body = ctx.parseBody(opts.body);
469
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
470
+ else if (opts.body) body = ctx.parseBody(opts.body);
457
471
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/customers\n");
458
472
  const result = await client.post(`/api/v2025-06/customers`, body);
459
473
  ctx.output(result);
460
- });
461
- resource.command("list").description("List customers").option("--params <value>", "Query parameters for filtering, pagination, and sorting").action(async (opts) => {
474
+ }), (opts) => opts.bodyFile ? [{
475
+ kind: "file",
476
+ path: String(opts.bodyFile)
477
+ }] : []);
478
+ declareInputs(resource.command("list").description("List customers").option("--params <value>", "Query parameters for filtering, pagination, and sorting").action(async (opts) => {
462
479
  const client = await ctx.getClient();
463
480
  const params = {};
464
481
  if (opts.params !== void 0) params["params"] = opts.params;
465
482
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/customers\n");
466
483
  const result = await client.get(`/api/v2025-06/customers`, params);
467
484
  ctx.output(result);
468
- });
469
- resource.command("delete <id>").description("Delete a customer").action(async (id) => {
485
+ }), () => []);
486
+ declareInputs(resource.command("delete <id>").description("Delete a customer").action(async (id) => {
470
487
  const client = await ctx.getClient();
471
488
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/customers/${id}
472
489
  `);
473
490
  const result = await client.delete(`/api/v2025-06/customers/${id}`);
474
491
  ctx.output(result);
475
- });
476
- resource.command("get <id>").description("Get a customer").action(async (id) => {
492
+ }), () => []);
493
+ declareInputs(resource.command("get <id>").description("Get a customer").action(async (id) => {
477
494
  const client = await ctx.getClient();
478
495
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/customers/${id}
479
496
  `);
480
497
  const result = await client.get(`/api/v2025-06/customers/${id}`);
481
498
  ctx.output(result);
482
- });
483
- resource.command("update <id>").description("Update a customer").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
499
+ }), () => []);
500
+ declareInputs(resource.command("update <id>").description("Update a customer").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
484
501
  const client = await ctx.getClient();
485
502
  let body;
486
- if (opts.bodyFile) {
487
- const { readFileSync } = await import("fs");
488
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
489
- } else if (opts.body) body = ctx.parseBody(opts.body);
503
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
504
+ else if (opts.body) body = ctx.parseBody(opts.body);
490
505
  if (ctx.verbose) process.stderr.write(`PATCH /api/v2025-06/customers/${id}
491
506
  `);
492
507
  const result = await client.patch(`/api/v2025-06/customers/${id}`, body);
493
508
  ctx.output(result);
494
- });
495
- resource.command("create-bulk").description("Create multiple customers").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
509
+ }), (opts) => opts.bodyFile ? [{
510
+ kind: "file",
511
+ path: String(opts.bodyFile)
512
+ }] : []);
513
+ declareInputs(resource.command("create-bulk").description("Create multiple customers").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
496
514
  const client = await ctx.getClient();
497
515
  let body;
498
- if (opts.bodyFile) {
499
- const { readFileSync } = await import("fs");
500
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
501
- } else if (opts.body) body = ctx.parseBody(opts.body);
516
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
517
+ else if (opts.body) body = ctx.parseBody(opts.body);
502
518
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/customers/bulk\n");
503
519
  const result = await client.post(`/api/v2025-06/customers/bulk`, body);
504
520
  ctx.output(result);
505
- });
506
- resource.command("delete-bulk").description("Delete multiple customers").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
521
+ }), (opts) => opts.bodyFile ? [{
522
+ kind: "file",
523
+ path: String(opts.bodyFile)
524
+ }] : []);
525
+ declareInputs(resource.command("delete-bulk").description("Delete multiple customers").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
507
526
  const client = await ctx.getClient();
508
527
  let body;
509
- if (opts.bodyFile) {
510
- const { readFileSync } = await import("fs");
511
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
512
- } else if (opts.body) body = ctx.parseBody(opts.body);
528
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
529
+ else if (opts.body) body = ctx.parseBody(opts.body);
513
530
  if (ctx.verbose) process.stderr.write("DELETE /api/v2025-06/customers/bulk\n");
514
531
  const result = await client.delete(`/api/v2025-06/customers/bulk`, { body });
515
532
  ctx.output(result);
516
- });
533
+ }), (opts) => opts.bodyFile ? [{
534
+ kind: "file",
535
+ path: String(opts.bodyFile)
536
+ }] : []);
517
537
  }
518
538
  //#endregion
519
539
  //#region src/generated/email-settings.ts
520
540
  function registerEmailSettings(parent, ctx) {
521
541
  const resource = parent.command("email-settings").description("Email Settings");
522
- resource.command("get-company").description("returns company email settings").action(async () => {
542
+ declareInputs(resource.command("get-company").description("returns company email settings").action(async () => {
523
543
  const client = await ctx.getClient();
524
544
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/company-email-settings\n");
525
545
  const result = await client.get(`/api/v2025-06/company-email-settings`);
526
546
  ctx.output(result);
527
- });
528
- resource.command("update-company <id>").description("updates company email settings").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
547
+ }), () => []);
548
+ declareInputs(resource.command("update-company <id>").description("updates company email settings").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
529
549
  const client = await ctx.getClient();
530
550
  let body;
531
- if (opts.bodyFile) {
532
- const { readFileSync } = await import("fs");
533
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
534
- } else if (opts.body) body = ctx.parseBody(opts.body);
551
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
552
+ else if (opts.body) body = ctx.parseBody(opts.body);
535
553
  if (ctx.verbose) process.stderr.write(`PATCH /api/v2025-06/company-email-settings/${id}
536
554
  `);
537
555
  const result = await client.patch(`/api/v2025-06/company-email-settings/${id}`, body);
538
556
  ctx.output(result);
539
- });
557
+ }), (opts) => opts.bodyFile ? [{
558
+ kind: "file",
559
+ path: String(opts.bodyFile)
560
+ }] : []);
540
561
  }
541
562
  //#endregion
542
563
  //#region src/generated/enrollment-pack-media.ts
543
564
  function registerEnrollmentPackMedia(parent, ctx) {
544
565
  const resource = parent.command("enrollment-pack-media").description("EnrollmentPackMedia");
545
- resource.command("list <enrollment-pack-id>").description("List media associated with enrollment pack").option("--page <value>", "page").action(async (enrollmentPackId, opts) => {
566
+ declareInputs(resource.command("list <enrollment-pack-id>").description("List media associated with enrollment pack").option("--page <value>", "page").action(async (enrollmentPackId, opts) => {
546
567
  const client = await ctx.getClient();
547
568
  const params = {};
548
569
  if (opts.page !== void 0) params["page"] = opts.page;
@@ -550,61 +571,63 @@ function registerEnrollmentPackMedia(parent, ctx) {
550
571
  `);
551
572
  const result = await client.get(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`, params);
552
573
  ctx.output(result);
553
- });
554
- resource.command("create <enrollment-pack-id>").description("Associate media with enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, opts) => {
574
+ }), () => []);
575
+ declareInputs(resource.command("create <enrollment-pack-id>").description("Associate media with enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, opts) => {
555
576
  const client = await ctx.getClient();
556
577
  let body;
557
- if (opts.bodyFile) {
558
- const { readFileSync } = await import("fs");
559
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
560
- } else if (opts.body) body = ctx.parseBody(opts.body);
578
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
579
+ else if (opts.body) body = ctx.parseBody(opts.body);
561
580
  if (ctx.verbose) process.stderr.write(`POST /api/v2025-06/enrollment_packs/${enrollmentPackId}/media
562
581
  `);
563
582
  const result = await client.post(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media`, body);
564
583
  ctx.output(result);
565
- });
566
- resource.command("delete <enrollment-pack-id> <id>").description("Medium removed from enrollment pack").action(async (enrollmentPackId, id) => {
584
+ }), (opts) => opts.bodyFile ? [{
585
+ kind: "file",
586
+ path: String(opts.bodyFile)
587
+ }] : []);
588
+ declareInputs(resource.command("delete <enrollment-pack-id> <id>").description("Medium removed from enrollment pack").action(async (enrollmentPackId, id) => {
567
589
  const client = await ctx.getClient();
568
590
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}
569
591
  `);
570
592
  const result = await client.delete(`/api/v2025-06/enrollment_packs/${enrollmentPackId}/media/${id}`);
571
593
  ctx.output(result);
572
- });
594
+ }), () => []);
573
595
  }
574
596
  //#endregion
575
597
  //#region src/generated/fair-share-settings.ts
576
598
  function registerFairShareSettings(parent, ctx) {
577
599
  const resource = parent.command("fair-share-settings").description("Fair Share Settings");
578
- resource.command("get").description("Get Fair Share settings").action(async () => {
600
+ declareInputs(resource.command("get").description("Get Fair Share settings").action(async () => {
579
601
  const client = await ctx.getClient();
580
602
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/fairshare/settings\n");
581
603
  const result = await client.get(`/api/v2025-06/fairshare/settings`);
582
604
  ctx.output(result);
583
- });
584
- resource.command("update").description("Update Fair Share settings").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
605
+ }), () => []);
606
+ declareInputs(resource.command("update").description("Update Fair Share settings").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
585
607
  const client = await ctx.getClient();
586
608
  let body;
587
- if (opts.bodyFile) {
588
- const { readFileSync } = await import("fs");
589
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
590
- } else if (opts.body) body = ctx.parseBody(opts.body);
609
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
610
+ else if (opts.body) body = ctx.parseBody(opts.body);
591
611
  if (ctx.verbose) process.stderr.write("PATCH /api/v2025-06/fairshare/settings\n");
592
612
  const result = await client.patch(`/api/v2025-06/fairshare/settings`, body);
593
613
  ctx.output(result);
594
- });
614
+ }), (opts) => opts.bodyFile ? [{
615
+ kind: "file",
616
+ path: String(opts.bodyFile)
617
+ }] : []);
595
618
  }
596
619
  //#endregion
597
620
  //#region src/generated/lighthouse.ts
598
621
  function registerLighthouse(parent, ctx) {
599
622
  const resource = parent.command("lighthouse").description("Lighthouse");
600
- resource.command("get-latest-product <product-id>").description("Get latest Lighthouse scan for a product").action(async (productId) => {
623
+ declareInputs(resource.command("get-latest-product <product-id>").description("Get latest Lighthouse scan for a product").action(async (productId) => {
601
624
  const client = await ctx.getClient();
602
625
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/products/${productId}/lighthouse
603
626
  `);
604
627
  const result = await client.get(`/api/v202506/products/${productId}/lighthouse`);
605
628
  ctx.output(result);
606
- });
607
- resource.command("list-product <product-id>").description("List all Lighthouse scans for a product").option("--page <value>", "Page number").option("--per-page <value>", "Items per page").action(async (productId, opts) => {
629
+ }), () => []);
630
+ declareInputs(resource.command("list-product <product-id>").description("List all Lighthouse scans for a product").option("--page <value>", "Page number").option("--per-page <value>", "Items per page").action(async (productId, opts) => {
608
631
  const client = await ctx.getClient();
609
632
  const params = {};
610
633
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -613,53 +636,55 @@ function registerLighthouse(parent, ctx) {
613
636
  `);
614
637
  const result = await client.get(`/api/v202506/products/${productId}/lighthouses`, params);
615
638
  ctx.output(result);
616
- });
617
- resource.command("create-product <product-id>").description("Create a new Lighthouse scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, opts) => {
639
+ }), () => []);
640
+ declareInputs(resource.command("create-product <product-id>").description("Create a new Lighthouse scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, opts) => {
618
641
  const client = await ctx.getClient();
619
642
  let body;
620
- if (opts.bodyFile) {
621
- const { readFileSync } = await import("fs");
622
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
623
- } else if (opts.body) body = ctx.parseBody(opts.body);
643
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
644
+ else if (opts.body) body = ctx.parseBody(opts.body);
624
645
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/products/${productId}/lighthouses
625
646
  `);
626
647
  const result = await client.post(`/api/v202506/products/${productId}/lighthouses`, body);
627
648
  ctx.output(result);
628
- });
629
- resource.command("get-product <product-id> <id>").description("Get a specific Lighthouse scan for a product").action(async (productId, id) => {
649
+ }), (opts) => opts.bodyFile ? [{
650
+ kind: "file",
651
+ path: String(opts.bodyFile)
652
+ }] : []);
653
+ declareInputs(resource.command("get-product <product-id> <id>").description("Get a specific Lighthouse scan for a product").action(async (productId, id) => {
630
654
  const client = await ctx.getClient();
631
655
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/products/${productId}/lighthouses/${id}
632
656
  `);
633
657
  const result = await client.get(`/api/v202506/products/${productId}/lighthouses/${id}`);
634
658
  ctx.output(result);
635
- });
636
- resource.command("update-product <product-id> <id>").description("Update a Lighthouse scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, id, opts) => {
659
+ }), () => []);
660
+ declareInputs(resource.command("update-product <product-id> <id>").description("Update a Lighthouse scan for a product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, id, opts) => {
637
661
  const client = await ctx.getClient();
638
662
  let body;
639
- if (opts.bodyFile) {
640
- const { readFileSync } = await import("fs");
641
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
642
- } else if (opts.body) body = ctx.parseBody(opts.body);
663
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
664
+ else if (opts.body) body = ctx.parseBody(opts.body);
643
665
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/products/${productId}/lighthouses/${id}
644
666
  `);
645
667
  const result = await client.patch(`/api/v202506/products/${productId}/lighthouses/${id}`, body);
646
668
  ctx.output(result);
647
- });
648
- resource.command("delete-product <product-id> <id>").description("Delete a Lighthouse scan for a product").action(async (productId, id) => {
669
+ }), (opts) => opts.bodyFile ? [{
670
+ kind: "file",
671
+ path: String(opts.bodyFile)
672
+ }] : []);
673
+ declareInputs(resource.command("delete-product <product-id> <id>").description("Delete a Lighthouse scan for a product").action(async (productId, id) => {
649
674
  const client = await ctx.getClient();
650
675
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/products/${productId}/lighthouses/${id}
651
676
  `);
652
677
  const result = await client.delete(`/api/v202506/products/${productId}/lighthouses/${id}`);
653
678
  ctx.output(result);
654
- });
655
- resource.command("get-latest-media <medium-id>").description("Get latest Lighthouse scan for media").action(async (mediumId) => {
679
+ }), () => []);
680
+ declareInputs(resource.command("get-latest-media <medium-id>").description("Get latest Lighthouse scan for media").action(async (mediumId) => {
656
681
  const client = await ctx.getClient();
657
682
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/media/${mediumId}/lighthouse
658
683
  `);
659
684
  const result = await client.get(`/api/v202506/media/${mediumId}/lighthouse`);
660
685
  ctx.output(result);
661
- });
662
- resource.command("list-media <medium-id>").description("List all Lighthouse scans for media").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (mediumId, opts) => {
686
+ }), () => []);
687
+ declareInputs(resource.command("list-media <medium-id>").description("List all Lighthouse scans for media").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (mediumId, opts) => {
663
688
  const client = await ctx.getClient();
664
689
  const params = {};
665
690
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -668,53 +693,55 @@ function registerLighthouse(parent, ctx) {
668
693
  `);
669
694
  const result = await client.get(`/api/v202506/media/${mediumId}/lighthouses`, params);
670
695
  ctx.output(result);
671
- });
672
- resource.command("create-media <medium-id>").description("Create a new Lighthouse scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, opts) => {
696
+ }), () => []);
697
+ declareInputs(resource.command("create-media <medium-id>").description("Create a new Lighthouse scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, opts) => {
673
698
  const client = await ctx.getClient();
674
699
  let body;
675
- if (opts.bodyFile) {
676
- const { readFileSync } = await import("fs");
677
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
678
- } else if (opts.body) body = ctx.parseBody(opts.body);
700
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
701
+ else if (opts.body) body = ctx.parseBody(opts.body);
679
702
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/media/${mediumId}/lighthouses
680
703
  `);
681
704
  const result = await client.post(`/api/v202506/media/${mediumId}/lighthouses`, body);
682
705
  ctx.output(result);
683
- });
684
- resource.command("get-media <medium-id> <id>").description("Get a specific Lighthouse scan for media").action(async (mediumId, id) => {
706
+ }), (opts) => opts.bodyFile ? [{
707
+ kind: "file",
708
+ path: String(opts.bodyFile)
709
+ }] : []);
710
+ declareInputs(resource.command("get-media <medium-id> <id>").description("Get a specific Lighthouse scan for media").action(async (mediumId, id) => {
685
711
  const client = await ctx.getClient();
686
712
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/media/${mediumId}/lighthouses/${id}
687
713
  `);
688
714
  const result = await client.get(`/api/v202506/media/${mediumId}/lighthouses/${id}`);
689
715
  ctx.output(result);
690
- });
691
- resource.command("update-media <medium-id> <id>").description("Update a Lighthouse scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, id, opts) => {
716
+ }), () => []);
717
+ declareInputs(resource.command("update-media <medium-id> <id>").description("Update a Lighthouse scan for media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediumId, id, opts) => {
692
718
  const client = await ctx.getClient();
693
719
  let body;
694
- if (opts.bodyFile) {
695
- const { readFileSync } = await import("fs");
696
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
697
- } else if (opts.body) body = ctx.parseBody(opts.body);
720
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
721
+ else if (opts.body) body = ctx.parseBody(opts.body);
698
722
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/media/${mediumId}/lighthouses/${id}
699
723
  `);
700
724
  const result = await client.patch(`/api/v202506/media/${mediumId}/lighthouses/${id}`, body);
701
725
  ctx.output(result);
702
- });
703
- resource.command("delete-media <medium-id> <id>").description("Delete a Lighthouse scan for media").action(async (mediumId, id) => {
726
+ }), (opts) => opts.bodyFile ? [{
727
+ kind: "file",
728
+ path: String(opts.bodyFile)
729
+ }] : []);
730
+ declareInputs(resource.command("delete-media <medium-id> <id>").description("Delete a Lighthouse scan for media").action(async (mediumId, id) => {
704
731
  const client = await ctx.getClient();
705
732
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/media/${mediumId}/lighthouses/${id}
706
733
  `);
707
734
  const result = await client.delete(`/api/v202506/media/${mediumId}/lighthouses/${id}`);
708
735
  ctx.output(result);
709
- });
710
- resource.command("get-latest-playlist <playlist-id>").description("Get latest Lighthouse scan for a playlist").action(async (playlistId) => {
736
+ }), () => []);
737
+ declareInputs(resource.command("get-latest-playlist <playlist-id>").description("Get latest Lighthouse scan for a playlist").action(async (playlistId) => {
711
738
  const client = await ctx.getClient();
712
739
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/playlists/${playlistId}/lighthouse
713
740
  `);
714
741
  const result = await client.get(`/api/v202506/playlists/${playlistId}/lighthouse`);
715
742
  ctx.output(result);
716
- });
717
- resource.command("list-playlist <playlist-id>").description("List all Lighthouse scans for a playlist").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (playlistId, opts) => {
743
+ }), () => []);
744
+ declareInputs(resource.command("list-playlist <playlist-id>").description("List all Lighthouse scans for a playlist").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (playlistId, opts) => {
718
745
  const client = await ctx.getClient();
719
746
  const params = {};
720
747
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -723,53 +750,55 @@ function registerLighthouse(parent, ctx) {
723
750
  `);
724
751
  const result = await client.get(`/api/v202506/playlists/${playlistId}/lighthouses`, params);
725
752
  ctx.output(result);
726
- });
727
- resource.command("create-playlist <playlist-id>").description("Create a new Lighthouse scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
753
+ }), () => []);
754
+ declareInputs(resource.command("create-playlist <playlist-id>").description("Create a new Lighthouse scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
728
755
  const client = await ctx.getClient();
729
756
  let body;
730
- if (opts.bodyFile) {
731
- const { readFileSync } = await import("fs");
732
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
733
- } else if (opts.body) body = ctx.parseBody(opts.body);
757
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
758
+ else if (opts.body) body = ctx.parseBody(opts.body);
734
759
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/playlists/${playlistId}/lighthouses
735
760
  `);
736
761
  const result = await client.post(`/api/v202506/playlists/${playlistId}/lighthouses`, body);
737
762
  ctx.output(result);
738
- });
739
- resource.command("get-playlist <playlist-id> <id>").description("Get a specific Lighthouse scan for a playlist").action(async (playlistId, id) => {
763
+ }), (opts) => opts.bodyFile ? [{
764
+ kind: "file",
765
+ path: String(opts.bodyFile)
766
+ }] : []);
767
+ declareInputs(resource.command("get-playlist <playlist-id> <id>").description("Get a specific Lighthouse scan for a playlist").action(async (playlistId, id) => {
740
768
  const client = await ctx.getClient();
741
769
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/playlists/${playlistId}/lighthouses/${id}
742
770
  `);
743
771
  const result = await client.get(`/api/v202506/playlists/${playlistId}/lighthouses/${id}`);
744
772
  ctx.output(result);
745
- });
746
- resource.command("update-playlist <playlist-id> <id>").description("Update a Lighthouse scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, id, opts) => {
773
+ }), () => []);
774
+ declareInputs(resource.command("update-playlist <playlist-id> <id>").description("Update a Lighthouse scan for a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, id, opts) => {
747
775
  const client = await ctx.getClient();
748
776
  let body;
749
- if (opts.bodyFile) {
750
- const { readFileSync } = await import("fs");
751
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
752
- } else if (opts.body) body = ctx.parseBody(opts.body);
777
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
778
+ else if (opts.body) body = ctx.parseBody(opts.body);
753
779
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/playlists/${playlistId}/lighthouses/${id}
754
780
  `);
755
781
  const result = await client.patch(`/api/v202506/playlists/${playlistId}/lighthouses/${id}`, body);
756
782
  ctx.output(result);
757
- });
758
- resource.command("delete-playlist <playlist-id> <id>").description("Delete a Lighthouse scan for a playlist").action(async (playlistId, id) => {
783
+ }), (opts) => opts.bodyFile ? [{
784
+ kind: "file",
785
+ path: String(opts.bodyFile)
786
+ }] : []);
787
+ declareInputs(resource.command("delete-playlist <playlist-id> <id>").description("Delete a Lighthouse scan for a playlist").action(async (playlistId, id) => {
759
788
  const client = await ctx.getClient();
760
789
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/playlists/${playlistId}/lighthouses/${id}
761
790
  `);
762
791
  const result = await client.delete(`/api/v202506/playlists/${playlistId}/lighthouses/${id}`);
763
792
  ctx.output(result);
764
- });
765
- resource.command("get-latest-category <category-id>").description("Get latest Lighthouse scan for a category").action(async (categoryId) => {
793
+ }), () => []);
794
+ declareInputs(resource.command("get-latest-category <category-id>").description("Get latest Lighthouse scan for a category").action(async (categoryId) => {
766
795
  const client = await ctx.getClient();
767
796
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/categories/${categoryId}/lighthouse
768
797
  `);
769
798
  const result = await client.get(`/api/v202506/categories/${categoryId}/lighthouse`);
770
799
  ctx.output(result);
771
- });
772
- resource.command("list-category <category-id>").description("List all Lighthouse scans for a category").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (categoryId, opts) => {
800
+ }), () => []);
801
+ declareInputs(resource.command("list-category <category-id>").description("List all Lighthouse scans for a category").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (categoryId, opts) => {
773
802
  const client = await ctx.getClient();
774
803
  const params = {};
775
804
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -778,53 +807,55 @@ function registerLighthouse(parent, ctx) {
778
807
  `);
779
808
  const result = await client.get(`/api/v202506/categories/${categoryId}/lighthouses`, params);
780
809
  ctx.output(result);
781
- });
782
- resource.command("create-category <category-id>").description("Create a new Lighthouse scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, opts) => {
810
+ }), () => []);
811
+ declareInputs(resource.command("create-category <category-id>").description("Create a new Lighthouse scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, opts) => {
783
812
  const client = await ctx.getClient();
784
813
  let body;
785
- if (opts.bodyFile) {
786
- const { readFileSync } = await import("fs");
787
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
788
- } else if (opts.body) body = ctx.parseBody(opts.body);
814
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
815
+ else if (opts.body) body = ctx.parseBody(opts.body);
789
816
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/categories/${categoryId}/lighthouses
790
817
  `);
791
818
  const result = await client.post(`/api/v202506/categories/${categoryId}/lighthouses`, body);
792
819
  ctx.output(result);
793
- });
794
- resource.command("get-category <category-id> <id>").description("Get a specific Lighthouse scan for a category").action(async (categoryId, id) => {
820
+ }), (opts) => opts.bodyFile ? [{
821
+ kind: "file",
822
+ path: String(opts.bodyFile)
823
+ }] : []);
824
+ declareInputs(resource.command("get-category <category-id> <id>").description("Get a specific Lighthouse scan for a category").action(async (categoryId, id) => {
795
825
  const client = await ctx.getClient();
796
826
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/categories/${categoryId}/lighthouses/${id}
797
827
  `);
798
828
  const result = await client.get(`/api/v202506/categories/${categoryId}/lighthouses/${id}`);
799
829
  ctx.output(result);
800
- });
801
- resource.command("update-category <category-id> <id>").description("Update a Lighthouse scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, id, opts) => {
830
+ }), () => []);
831
+ declareInputs(resource.command("update-category <category-id> <id>").description("Update a Lighthouse scan for a category").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (categoryId, id, opts) => {
802
832
  const client = await ctx.getClient();
803
833
  let body;
804
- if (opts.bodyFile) {
805
- const { readFileSync } = await import("fs");
806
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
807
- } else if (opts.body) body = ctx.parseBody(opts.body);
834
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
835
+ else if (opts.body) body = ctx.parseBody(opts.body);
808
836
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/categories/${categoryId}/lighthouses/${id}
809
837
  `);
810
838
  const result = await client.patch(`/api/v202506/categories/${categoryId}/lighthouses/${id}`, body);
811
839
  ctx.output(result);
812
- });
813
- resource.command("delete-category <category-id> <id>").description("Delete a Lighthouse scan for a category").action(async (categoryId, id) => {
840
+ }), (opts) => opts.bodyFile ? [{
841
+ kind: "file",
842
+ path: String(opts.bodyFile)
843
+ }] : []);
844
+ declareInputs(resource.command("delete-category <category-id> <id>").description("Delete a Lighthouse scan for a category").action(async (categoryId, id) => {
814
845
  const client = await ctx.getClient();
815
846
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/categories/${categoryId}/lighthouses/${id}
816
847
  `);
817
848
  const result = await client.delete(`/api/v202506/categories/${categoryId}/lighthouses/${id}`);
818
849
  ctx.output(result);
819
- });
820
- resource.command("get-latest-collection <collection-id>").description("Get latest Lighthouse scan for a collection").action(async (collectionId) => {
850
+ }), () => []);
851
+ declareInputs(resource.command("get-latest-collection <collection-id>").description("Get latest Lighthouse scan for a collection").action(async (collectionId) => {
821
852
  const client = await ctx.getClient();
822
853
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/collections/${collectionId}/lighthouse
823
854
  `);
824
855
  const result = await client.get(`/api/v202506/collections/${collectionId}/lighthouse`);
825
856
  ctx.output(result);
826
- });
827
- resource.command("list-collection <collection-id>").description("List all Lighthouse scans for a collection").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (collectionId, opts) => {
857
+ }), () => []);
858
+ declareInputs(resource.command("list-collection <collection-id>").description("List all Lighthouse scans for a collection").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (collectionId, opts) => {
828
859
  const client = await ctx.getClient();
829
860
  const params = {};
830
861
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -833,53 +864,55 @@ function registerLighthouse(parent, ctx) {
833
864
  `);
834
865
  const result = await client.get(`/api/v202506/collections/${collectionId}/lighthouses`, params);
835
866
  ctx.output(result);
836
- });
837
- resource.command("create-collection <collection-id>").description("Create a new Lighthouse scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, opts) => {
867
+ }), () => []);
868
+ declareInputs(resource.command("create-collection <collection-id>").description("Create a new Lighthouse scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, opts) => {
838
869
  const client = await ctx.getClient();
839
870
  let body;
840
- if (opts.bodyFile) {
841
- const { readFileSync } = await import("fs");
842
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
843
- } else if (opts.body) body = ctx.parseBody(opts.body);
871
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
872
+ else if (opts.body) body = ctx.parseBody(opts.body);
844
873
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/collections/${collectionId}/lighthouses
845
874
  `);
846
875
  const result = await client.post(`/api/v202506/collections/${collectionId}/lighthouses`, body);
847
876
  ctx.output(result);
848
- });
849
- resource.command("get-collection <collection-id> <id>").description("Get a specific Lighthouse scan for a collection").action(async (collectionId, id) => {
877
+ }), (opts) => opts.bodyFile ? [{
878
+ kind: "file",
879
+ path: String(opts.bodyFile)
880
+ }] : []);
881
+ declareInputs(resource.command("get-collection <collection-id> <id>").description("Get a specific Lighthouse scan for a collection").action(async (collectionId, id) => {
850
882
  const client = await ctx.getClient();
851
883
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/collections/${collectionId}/lighthouses/${id}
852
884
  `);
853
885
  const result = await client.get(`/api/v202506/collections/${collectionId}/lighthouses/${id}`);
854
886
  ctx.output(result);
855
- });
856
- resource.command("update-collection <collection-id> <id>").description("Update a Lighthouse scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, id, opts) => {
887
+ }), () => []);
888
+ declareInputs(resource.command("update-collection <collection-id> <id>").description("Update a Lighthouse scan for a collection").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (collectionId, id, opts) => {
857
889
  const client = await ctx.getClient();
858
890
  let body;
859
- if (opts.bodyFile) {
860
- const { readFileSync } = await import("fs");
861
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
862
- } else if (opts.body) body = ctx.parseBody(opts.body);
891
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
892
+ else if (opts.body) body = ctx.parseBody(opts.body);
863
893
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/collections/${collectionId}/lighthouses/${id}
864
894
  `);
865
895
  const result = await client.patch(`/api/v202506/collections/${collectionId}/lighthouses/${id}`, body);
866
896
  ctx.output(result);
867
- });
868
- resource.command("delete-collection <collection-id> <id>").description("Delete a Lighthouse scan for a collection").action(async (collectionId, id) => {
897
+ }), (opts) => opts.bodyFile ? [{
898
+ kind: "file",
899
+ path: String(opts.bodyFile)
900
+ }] : []);
901
+ declareInputs(resource.command("delete-collection <collection-id> <id>").description("Delete a Lighthouse scan for a collection").action(async (collectionId, id) => {
869
902
  const client = await ctx.getClient();
870
903
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/collections/${collectionId}/lighthouses/${id}
871
904
  `);
872
905
  const result = await client.delete(`/api/v202506/collections/${collectionId}/lighthouses/${id}`);
873
906
  ctx.output(result);
874
- });
875
- resource.command("get-latest-post <post-id>").description("Get latest Lighthouse scan for a post").action(async (postId) => {
907
+ }), () => []);
908
+ declareInputs(resource.command("get-latest-post <post-id>").description("Get latest Lighthouse scan for a post").action(async (postId) => {
876
909
  const client = await ctx.getClient();
877
910
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/posts/${postId}/lighthouse
878
911
  `);
879
912
  const result = await client.get(`/api/v202506/posts/${postId}/lighthouse`);
880
913
  ctx.output(result);
881
- });
882
- resource.command("list-post <post-id>").description("List all Lighthouse scans for a post").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (postId, opts) => {
914
+ }), () => []);
915
+ declareInputs(resource.command("list-post <post-id>").description("List all Lighthouse scans for a post").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (postId, opts) => {
883
916
  const client = await ctx.getClient();
884
917
  const params = {};
885
918
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -888,53 +921,55 @@ function registerLighthouse(parent, ctx) {
888
921
  `);
889
922
  const result = await client.get(`/api/v202506/posts/${postId}/lighthouses`, params);
890
923
  ctx.output(result);
891
- });
892
- resource.command("create-post <post-id>").description("Create a new Lighthouse scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, opts) => {
924
+ }), () => []);
925
+ declareInputs(resource.command("create-post <post-id>").description("Create a new Lighthouse scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, opts) => {
893
926
  const client = await ctx.getClient();
894
927
  let body;
895
- if (opts.bodyFile) {
896
- const { readFileSync } = await import("fs");
897
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
898
- } else if (opts.body) body = ctx.parseBody(opts.body);
928
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
929
+ else if (opts.body) body = ctx.parseBody(opts.body);
899
930
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/posts/${postId}/lighthouses
900
931
  `);
901
932
  const result = await client.post(`/api/v202506/posts/${postId}/lighthouses`, body);
902
933
  ctx.output(result);
903
- });
904
- resource.command("get-post <post-id> <id>").description("Get a specific Lighthouse scan for a post").action(async (postId, id) => {
934
+ }), (opts) => opts.bodyFile ? [{
935
+ kind: "file",
936
+ path: String(opts.bodyFile)
937
+ }] : []);
938
+ declareInputs(resource.command("get-post <post-id> <id>").description("Get a specific Lighthouse scan for a post").action(async (postId, id) => {
905
939
  const client = await ctx.getClient();
906
940
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/posts/${postId}/lighthouses/${id}
907
941
  `);
908
942
  const result = await client.get(`/api/v202506/posts/${postId}/lighthouses/${id}`);
909
943
  ctx.output(result);
910
- });
911
- resource.command("update-post <post-id> <id>").description("Update a Lighthouse scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, id, opts) => {
944
+ }), () => []);
945
+ declareInputs(resource.command("update-post <post-id> <id>").description("Update a Lighthouse scan for a post").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (postId, id, opts) => {
912
946
  const client = await ctx.getClient();
913
947
  let body;
914
- if (opts.bodyFile) {
915
- const { readFileSync } = await import("fs");
916
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
917
- } else if (opts.body) body = ctx.parseBody(opts.body);
948
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
949
+ else if (opts.body) body = ctx.parseBody(opts.body);
918
950
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/posts/${postId}/lighthouses/${id}
919
951
  `);
920
952
  const result = await client.patch(`/api/v202506/posts/${postId}/lighthouses/${id}`, body);
921
953
  ctx.output(result);
922
- });
923
- resource.command("delete-post <post-id> <id>").description("Delete a Lighthouse scan for a post").action(async (postId, id) => {
954
+ }), (opts) => opts.bodyFile ? [{
955
+ kind: "file",
956
+ path: String(opts.bodyFile)
957
+ }] : []);
958
+ declareInputs(resource.command("delete-post <post-id> <id>").description("Delete a Lighthouse scan for a post").action(async (postId, id) => {
924
959
  const client = await ctx.getClient();
925
960
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/posts/${postId}/lighthouses/${id}
926
961
  `);
927
962
  const result = await client.delete(`/api/v202506/posts/${postId}/lighthouses/${id}`);
928
963
  ctx.output(result);
929
- });
930
- resource.command("get-latest-enrollment-pack <enrollment-pack-id>").description("Get latest Lighthouse scan for an enrollment pack").action(async (enrollmentPackId) => {
964
+ }), () => []);
965
+ declareInputs(resource.command("get-latest-enrollment-pack <enrollment-pack-id>").description("Get latest Lighthouse scan for an enrollment pack").action(async (enrollmentPackId) => {
931
966
  const client = await ctx.getClient();
932
967
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/enrollment_packs/${enrollmentPackId}/lighthouse
933
968
  `);
934
969
  const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/lighthouse`);
935
970
  ctx.output(result);
936
- });
937
- resource.command("list-enrollment-pack <enrollment-pack-id>").description("List all Lighthouse scans for an enrollment pack").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (enrollmentPackId, opts) => {
971
+ }), () => []);
972
+ declareInputs(resource.command("list-enrollment-pack <enrollment-pack-id>").description("List all Lighthouse scans for an enrollment pack").option("--page <value>", "page").option("--per-page <value>", "per_page").action(async (enrollmentPackId, opts) => {
938
973
  const client = await ctx.getClient();
939
974
  const params = {};
940
975
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -943,51 +978,53 @@ function registerLighthouse(parent, ctx) {
943
978
  `);
944
979
  const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses`, params);
945
980
  ctx.output(result);
946
- });
947
- resource.command("create-enrollment-pack <enrollment-pack-id>").description("Create a new Lighthouse scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, opts) => {
981
+ }), () => []);
982
+ declareInputs(resource.command("create-enrollment-pack <enrollment-pack-id>").description("Create a new Lighthouse scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, opts) => {
948
983
  const client = await ctx.getClient();
949
984
  let body;
950
- if (opts.bodyFile) {
951
- const { readFileSync } = await import("fs");
952
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
953
- } else if (opts.body) body = ctx.parseBody(opts.body);
985
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
986
+ else if (opts.body) body = ctx.parseBody(opts.body);
954
987
  if (ctx.verbose) process.stderr.write(`POST /api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses
955
988
  `);
956
989
  const result = await client.post(`/api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses`, body);
957
990
  ctx.output(result);
958
- });
959
- resource.command("get-enrollment-pack <enrollment-pack-id> <id>").description("Get a specific Lighthouse scan for an enrollment pack").action(async (enrollmentPackId, id) => {
991
+ }), (opts) => opts.bodyFile ? [{
992
+ kind: "file",
993
+ path: String(opts.bodyFile)
994
+ }] : []);
995
+ declareInputs(resource.command("get-enrollment-pack <enrollment-pack-id> <id>").description("Get a specific Lighthouse scan for an enrollment pack").action(async (enrollmentPackId, id) => {
960
996
  const client = await ctx.getClient();
961
997
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses/${id}
962
998
  `);
963
999
  const result = await client.get(`/api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses/${id}`);
964
1000
  ctx.output(result);
965
- });
966
- resource.command("update-enrollment-pack <enrollment-pack-id> <id>").description("Update a Lighthouse scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, id, opts) => {
1001
+ }), () => []);
1002
+ declareInputs(resource.command("update-enrollment-pack <enrollment-pack-id> <id>").description("Update a Lighthouse scan for an enrollment pack").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (enrollmentPackId, id, opts) => {
967
1003
  const client = await ctx.getClient();
968
1004
  let body;
969
- if (opts.bodyFile) {
970
- const { readFileSync } = await import("fs");
971
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
972
- } else if (opts.body) body = ctx.parseBody(opts.body);
1005
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1006
+ else if (opts.body) body = ctx.parseBody(opts.body);
973
1007
  if (ctx.verbose) process.stderr.write(`PATCH /api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses/${id}
974
1008
  `);
975
1009
  const result = await client.patch(`/api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses/${id}`, body);
976
1010
  ctx.output(result);
977
- });
978
- resource.command("delete-enrollment-pack <enrollment-pack-id> <id>").description("Delete a Lighthouse scan for an enrollment pack").action(async (enrollmentPackId, id) => {
1011
+ }), (opts) => opts.bodyFile ? [{
1012
+ kind: "file",
1013
+ path: String(opts.bodyFile)
1014
+ }] : []);
1015
+ declareInputs(resource.command("delete-enrollment-pack <enrollment-pack-id> <id>").description("Delete a Lighthouse scan for an enrollment pack").action(async (enrollmentPackId, id) => {
979
1016
  const client = await ctx.getClient();
980
1017
  if (ctx.verbose) process.stderr.write(`DELETE /api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses/${id}
981
1018
  `);
982
1019
  const result = await client.delete(`/api/v202506/enrollment_packs/${enrollmentPackId}/lighthouses/${id}`);
983
1020
  ctx.output(result);
984
- });
1021
+ }), () => []);
985
1022
  }
986
1023
  //#endregion
987
1024
  //#region src/generated/media-enrollment-packs.ts
988
1025
  function registerMediaEnrollmentPacks(parent, ctx) {
989
1026
  const resource = parent.command("media-enrollment-packs").description("MediaEnrollmentPacks");
990
- resource.command("list <media-id>").description("List enrollment_packs associated with media").option("--page <value>", "page").action(async (mediaId, opts) => {
1027
+ declareInputs(resource.command("list <media-id>").description("List enrollment_packs associated with media").option("--page <value>", "page").action(async (mediaId, opts) => {
991
1028
  const client = await ctx.getClient();
992
1029
  const params = {};
993
1030
  if (opts.page !== void 0) params["page"] = opts.page;
@@ -995,32 +1032,33 @@ function registerMediaEnrollmentPacks(parent, ctx) {
995
1032
  `);
996
1033
  const result = await client.get(`/api/v2025-06/media/${mediaId}/enrollment_packs`, params);
997
1034
  ctx.output(result);
998
- });
999
- resource.command("create <media-id>").description("Associate enrollment_pack with media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediaId, opts) => {
1035
+ }), () => []);
1036
+ declareInputs(resource.command("create <media-id>").description("Associate enrollment_pack with media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediaId, opts) => {
1000
1037
  const client = await ctx.getClient();
1001
1038
  let body;
1002
- if (opts.bodyFile) {
1003
- const { readFileSync } = await import("fs");
1004
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1005
- } else if (opts.body) body = ctx.parseBody(opts.body);
1039
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1040
+ else if (opts.body) body = ctx.parseBody(opts.body);
1006
1041
  if (ctx.verbose) process.stderr.write(`POST /api/v2025-06/media/${mediaId}/enrollment_packs
1007
1042
  `);
1008
1043
  const result = await client.post(`/api/v2025-06/media/${mediaId}/enrollment_packs`, body);
1009
1044
  ctx.output(result);
1010
- });
1011
- resource.command("delete <media-id> <id>").description("Enrollment Pack removed from media").action(async (mediaId, id) => {
1045
+ }), (opts) => opts.bodyFile ? [{
1046
+ kind: "file",
1047
+ path: String(opts.bodyFile)
1048
+ }] : []);
1049
+ declareInputs(resource.command("delete <media-id> <id>").description("Enrollment Pack removed from media").action(async (mediaId, id) => {
1012
1050
  const client = await ctx.getClient();
1013
1051
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/media/${mediaId}/enrollment_packs/${id}
1014
1052
  `);
1015
1053
  const result = await client.delete(`/api/v2025-06/media/${mediaId}/enrollment_packs/${id}`);
1016
1054
  ctx.output(result);
1017
- });
1055
+ }), () => []);
1018
1056
  }
1019
1057
  //#endregion
1020
1058
  //#region src/generated/media-products.ts
1021
1059
  function registerMediaProducts(parent, ctx) {
1022
1060
  const resource = parent.command("media-products").description("MediaProducts");
1023
- resource.command("list <media-id>").description("List products associated with media").option("--page <value>", "page").action(async (mediaId, opts) => {
1061
+ declareInputs(resource.command("list <media-id>").description("List products associated with media").option("--page <value>", "page").action(async (mediaId, opts) => {
1024
1062
  const client = await ctx.getClient();
1025
1063
  const params = {};
1026
1064
  if (opts.page !== void 0) params["page"] = opts.page;
@@ -1028,206 +1066,215 @@ function registerMediaProducts(parent, ctx) {
1028
1066
  `);
1029
1067
  const result = await client.get(`/api/v2025-06/media/${mediaId}/products`, params);
1030
1068
  ctx.output(result);
1031
- });
1032
- resource.command("create <media-id>").description("Associate product with media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediaId, opts) => {
1069
+ }), () => []);
1070
+ declareInputs(resource.command("create <media-id>").description("Associate product with media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (mediaId, opts) => {
1033
1071
  const client = await ctx.getClient();
1034
1072
  let body;
1035
- if (opts.bodyFile) {
1036
- const { readFileSync } = await import("fs");
1037
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1038
- } else if (opts.body) body = ctx.parseBody(opts.body);
1073
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1074
+ else if (opts.body) body = ctx.parseBody(opts.body);
1039
1075
  if (ctx.verbose) process.stderr.write(`POST /api/v2025-06/media/${mediaId}/products
1040
1076
  `);
1041
1077
  const result = await client.post(`/api/v2025-06/media/${mediaId}/products`, body);
1042
1078
  ctx.output(result);
1043
- });
1044
- resource.command("delete <media-id> <id>").description("Product removed from media").action(async (mediaId, id) => {
1079
+ }), (opts) => opts.bodyFile ? [{
1080
+ kind: "file",
1081
+ path: String(opts.bodyFile)
1082
+ }] : []);
1083
+ declareInputs(resource.command("delete <media-id> <id>").description("Product removed from media").action(async (mediaId, id) => {
1045
1084
  const client = await ctx.getClient();
1046
1085
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/media/${mediaId}/products/${id}
1047
1086
  `);
1048
1087
  const result = await client.delete(`/api/v2025-06/media/${mediaId}/products/${id}`);
1049
1088
  ctx.output(result);
1050
- });
1089
+ }), () => []);
1051
1090
  }
1052
1091
  //#endregion
1053
1092
  //#region src/generated/orders.ts
1054
1093
  function registerOrders(parent, ctx) {
1055
1094
  const resource = parent.command("orders").description("Orders");
1056
- resource.command("export-csv").description("Export orders as CSV").option("--params <value>", "Query parameters for CSV export").action(async (opts) => {
1095
+ declareInputs(resource.command("export-csv").description("Export orders as CSV").option("--params <value>", "Query parameters for CSV export").action(async (opts) => {
1057
1096
  const client = await ctx.getClient();
1058
1097
  const params = {};
1059
1098
  if (opts.params !== void 0) params["params"] = opts.params;
1060
1099
  if (ctx.verbose) process.stderr.write("GET /api/v202506/orders/export_csv\n");
1061
1100
  const result = await client.get(`/api/v202506/orders/export_csv`, params);
1062
1101
  ctx.output(result);
1063
- });
1064
- resource.command("list").description("List orders").option("--params <value>", "Query parameters for filtering, pagination, and sorting").action(async (opts) => {
1102
+ }), () => []);
1103
+ declareInputs(resource.command("list").description("List orders").option("--params <value>", "Query parameters for filtering, pagination, and sorting").action(async (opts) => {
1065
1104
  const client = await ctx.getClient();
1066
1105
  const params = {};
1067
1106
  if (opts.params !== void 0) params["params"] = opts.params;
1068
1107
  if (ctx.verbose) process.stderr.write("GET /api/v202506/orders\n");
1069
1108
  const result = await client.get(`/api/v202506/orders`, params);
1070
1109
  ctx.output(result);
1071
- });
1072
- resource.command("get <id>").description("Get an order").action(async (id) => {
1110
+ }), () => []);
1111
+ declareInputs(resource.command("get <id>").description("Get an order").action(async (id) => {
1073
1112
  const client = await ctx.getClient();
1074
1113
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/orders/${id}
1075
1114
  `);
1076
1115
  const result = await client.get(`/api/v202506/orders/${id}`);
1077
1116
  ctx.output(result);
1078
- });
1079
- resource.command("get-stats").description("Get order statistics").option("--params <value>", "Query parameters for filtering statistics").action(async (opts) => {
1117
+ }), () => []);
1118
+ declareInputs(resource.command("get-stats").description("Get order statistics").option("--params <value>", "Query parameters for filtering statistics").action(async (opts) => {
1080
1119
  const client = await ctx.getClient();
1081
1120
  const params = {};
1082
1121
  if (opts.params !== void 0) params["params"] = opts.params;
1083
1122
  if (ctx.verbose) process.stderr.write("GET /api/v202506/orders/stats\n");
1084
1123
  const result = await client.get(`/api/v202506/orders/stats`, params);
1085
1124
  ctx.output(result);
1086
- });
1125
+ }), () => []);
1087
1126
  }
1088
1127
  //#endregion
1089
1128
  //#region src/generated/partner-tokens.ts
1090
1129
  function registerPartnerTokens(parent, ctx) {
1091
1130
  const resource = parent.command("partner-tokens").description("Partner Tokens");
1092
- resource.command("list-deprecated").description("returns an array of partner tokens").action(async () => {
1131
+ declareInputs(resource.command("list-deprecated").description("returns an array of partner tokens").action(async () => {
1093
1132
  const client = await ctx.getClient();
1094
1133
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/partner_tokens\n");
1095
1134
  const result = await client.get(`/api/v2025-06/partner_tokens`);
1096
1135
  ctx.output(result);
1097
- });
1098
- resource.command("create-deprecated").description("creates a new partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1136
+ }), () => []);
1137
+ declareInputs(resource.command("create-deprecated").description("creates a new partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1099
1138
  const client = await ctx.getClient();
1100
1139
  let body;
1101
- if (opts.bodyFile) {
1102
- const { readFileSync } = await import("fs");
1103
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1104
- } else if (opts.body) body = ctx.parseBody(opts.body);
1140
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1141
+ else if (opts.body) body = ctx.parseBody(opts.body);
1105
1142
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/partner_tokens\n");
1106
1143
  const result = await client.post(`/api/v2025-06/partner_tokens`, body);
1107
1144
  ctx.output(result);
1108
- });
1109
- resource.command("get-deprecated <id>").description("returns a specific partner token").action(async (id) => {
1145
+ }), (opts) => opts.bodyFile ? [{
1146
+ kind: "file",
1147
+ path: String(opts.bodyFile)
1148
+ }] : []);
1149
+ declareInputs(resource.command("get-deprecated <id>").description("returns a specific partner token").action(async (id) => {
1110
1150
  const client = await ctx.getClient();
1111
1151
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/partner_tokens/${id}
1112
1152
  `);
1113
1153
  const result = await client.get(`/api/v2025-06/partner_tokens/${id}`);
1114
1154
  ctx.output(result);
1115
- });
1116
- resource.command("update-deprecated <id>").description("updates a partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1155
+ }), () => []);
1156
+ declareInputs(resource.command("update-deprecated <id>").description("updates a partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1117
1157
  const client = await ctx.getClient();
1118
1158
  let body;
1119
- if (opts.bodyFile) {
1120
- const { readFileSync } = await import("fs");
1121
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1122
- } else if (opts.body) body = ctx.parseBody(opts.body);
1159
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1160
+ else if (opts.body) body = ctx.parseBody(opts.body);
1123
1161
  if (ctx.verbose) process.stderr.write(`PUT /api/v2025-06/partner_tokens/${id}
1124
1162
  `);
1125
1163
  const result = await client.put(`/api/v2025-06/partner_tokens/${id}`, body);
1126
1164
  ctx.output(result);
1127
- });
1128
- resource.command("delete-deprecated <id>").description("deletes a partner token").action(async (id) => {
1165
+ }), (opts) => opts.bodyFile ? [{
1166
+ kind: "file",
1167
+ path: String(opts.bodyFile)
1168
+ }] : []);
1169
+ declareInputs(resource.command("delete-deprecated <id>").description("deletes a partner token").action(async (id) => {
1129
1170
  const client = await ctx.getClient();
1130
1171
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/partner_tokens/${id}
1131
1172
  `);
1132
1173
  const result = await client.delete(`/api/v2025-06/partner_tokens/${id}`);
1133
1174
  ctx.output(result);
1134
- });
1135
- resource.command("list").description("returns an array of partner tokens").action(async () => {
1175
+ }), () => []);
1176
+ declareInputs(resource.command("list").description("returns an array of partner tokens").action(async () => {
1136
1177
  const client = await ctx.getClient();
1137
1178
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/tokens/partner\n");
1138
1179
  const result = await client.get(`/api/v2025-06/tokens/partner`);
1139
1180
  ctx.output(result);
1140
- });
1141
- resource.command("create").description("creates a new partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1181
+ }), () => []);
1182
+ declareInputs(resource.command("create").description("creates a new partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1142
1183
  const client = await ctx.getClient();
1143
1184
  let body;
1144
- if (opts.bodyFile) {
1145
- const { readFileSync } = await import("fs");
1146
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1147
- } else if (opts.body) body = ctx.parseBody(opts.body);
1185
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1186
+ else if (opts.body) body = ctx.parseBody(opts.body);
1148
1187
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/tokens/partner\n");
1149
1188
  const result = await client.post(`/api/v2025-06/tokens/partner`, body);
1150
1189
  ctx.output(result);
1151
- });
1152
- resource.command("get <id>").description("returns a specific partner token").action(async (id) => {
1190
+ }), (opts) => opts.bodyFile ? [{
1191
+ kind: "file",
1192
+ path: String(opts.bodyFile)
1193
+ }] : []);
1194
+ declareInputs(resource.command("get <id>").description("returns a specific partner token").action(async (id) => {
1153
1195
  const client = await ctx.getClient();
1154
1196
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/tokens/partner/${id}
1155
1197
  `);
1156
1198
  const result = await client.get(`/api/v2025-06/tokens/partner/${id}`);
1157
1199
  ctx.output(result);
1158
- });
1159
- resource.command("update <id>").description("updates a partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1200
+ }), () => []);
1201
+ declareInputs(resource.command("update <id>").description("updates a partner token").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1160
1202
  const client = await ctx.getClient();
1161
1203
  let body;
1162
- if (opts.bodyFile) {
1163
- const { readFileSync } = await import("fs");
1164
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1165
- } else if (opts.body) body = ctx.parseBody(opts.body);
1204
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1205
+ else if (opts.body) body = ctx.parseBody(opts.body);
1166
1206
  if (ctx.verbose) process.stderr.write(`PUT /api/v2025-06/tokens/partner/${id}
1167
1207
  `);
1168
1208
  const result = await client.put(`/api/v2025-06/tokens/partner/${id}`, body);
1169
1209
  ctx.output(result);
1170
- });
1171
- resource.command("delete <id>").description("deletes a partner token").action(async (id) => {
1210
+ }), (opts) => opts.bodyFile ? [{
1211
+ kind: "file",
1212
+ path: String(opts.bodyFile)
1213
+ }] : []);
1214
+ declareInputs(resource.command("delete <id>").description("deletes a partner token").action(async (id) => {
1172
1215
  const client = await ctx.getClient();
1173
1216
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/tokens/partner/${id}
1174
1217
  `);
1175
1218
  const result = await client.delete(`/api/v2025-06/tokens/partner/${id}`);
1176
1219
  ctx.output(result);
1177
- });
1220
+ }), () => []);
1178
1221
  }
1179
1222
  //#endregion
1180
1223
  //#region src/generated/playlists.ts
1181
1224
  function registerPlaylists(parent, ctx) {
1182
1225
  const resource = parent.command("playlists").description("Playlists");
1183
- resource.command("clone <playlist-id>").description("Clone a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
1226
+ declareInputs(resource.command("clone <playlist-id>").description("Clone a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
1184
1227
  const client = await ctx.getClient();
1185
1228
  let body;
1186
- if (opts.bodyFile) {
1187
- const { readFileSync } = await import("fs");
1188
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1189
- } else if (opts.body) body = ctx.parseBody(opts.body);
1229
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1230
+ else if (opts.body) body = ctx.parseBody(opts.body);
1190
1231
  if (ctx.verbose) process.stderr.write(`POST /api/v2025-06/playlists/${playlistId}/clone
1191
1232
  `);
1192
1233
  const result = await client.post(`/api/v2025-06/playlists/${playlistId}/clone`, body);
1193
1234
  ctx.output(result);
1194
- });
1195
- resource.command("add-items <playlist-id>").description("add items to playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
1235
+ }), (opts) => opts.bodyFile ? [{
1236
+ kind: "file",
1237
+ path: String(opts.bodyFile)
1238
+ }] : []);
1239
+ declareInputs(resource.command("add-items <playlist-id>").description("add items to playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
1196
1240
  const client = await ctx.getClient();
1197
1241
  let body;
1198
- if (opts.bodyFile) {
1199
- const { readFileSync } = await import("fs");
1200
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1201
- } else if (opts.body) body = ctx.parseBody(opts.body);
1242
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1243
+ else if (opts.body) body = ctx.parseBody(opts.body);
1202
1244
  if (ctx.verbose) process.stderr.write(`POST /api/v2025-06/playlists/${playlistId}/items
1203
1245
  `);
1204
1246
  const result = await client.post(`/api/v2025-06/playlists/${playlistId}/items`, body);
1205
1247
  ctx.output(result);
1206
- });
1207
- resource.command("remove-items <playlist-id>").description("remove items from playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
1248
+ }), (opts) => opts.bodyFile ? [{
1249
+ kind: "file",
1250
+ path: String(opts.bodyFile)
1251
+ }] : []);
1252
+ declareInputs(resource.command("remove-items <playlist-id>").description("remove items from playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (playlistId, opts) => {
1208
1253
  const client = await ctx.getClient();
1209
1254
  let body;
1210
- if (opts.bodyFile) {
1211
- const { readFileSync } = await import("fs");
1212
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1213
- } else if (opts.body) body = ctx.parseBody(opts.body);
1255
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1256
+ else if (opts.body) body = ctx.parseBody(opts.body);
1214
1257
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/playlists/${playlistId}/items
1215
1258
  `);
1216
1259
  const result = await client.delete(`/api/v2025-06/playlists/${playlistId}/items`, { body });
1217
1260
  ctx.output(result);
1218
- });
1219
- resource.command("create").description("create playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1261
+ }), (opts) => opts.bodyFile ? [{
1262
+ kind: "file",
1263
+ path: String(opts.bodyFile)
1264
+ }] : []);
1265
+ declareInputs(resource.command("create").description("create playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1220
1266
  const client = await ctx.getClient();
1221
1267
  let body;
1222
- if (opts.bodyFile) {
1223
- const { readFileSync } = await import("fs");
1224
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1225
- } else if (opts.body) body = ctx.parseBody(opts.body);
1268
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1269
+ else if (opts.body) body = ctx.parseBody(opts.body);
1226
1270
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/playlists\n");
1227
1271
  const result = await client.post(`/api/v2025-06/playlists`, body);
1228
1272
  ctx.output(result);
1229
- });
1230
- resource.command("list").description("list playlists").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--filter-status <value>", "Filter playlists by status").option("--filter-title <value>", "Filter playlists by title").action(async (opts) => {
1273
+ }), (opts) => opts.bodyFile ? [{
1274
+ kind: "file",
1275
+ path: String(opts.bodyFile)
1276
+ }] : []);
1277
+ declareInputs(resource.command("list").description("list playlists").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--filter-status <value>", "Filter playlists by status").option("--filter-title <value>", "Filter playlists by title").action(async (opts) => {
1231
1278
  const client = await ctx.getClient();
1232
1279
  const params = {};
1233
1280
  if (opts.pageCursor !== void 0) params["page[cursor]"] = opts.pageCursor;
@@ -1237,34 +1284,35 @@ function registerPlaylists(parent, ctx) {
1237
1284
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/playlists\n");
1238
1285
  const result = await client.get(`/api/v2025-06/playlists`, params);
1239
1286
  ctx.output(result);
1240
- });
1241
- resource.command("delete <id>").description("delete playlist").action(async (id) => {
1287
+ }), () => []);
1288
+ declareInputs(resource.command("delete <id>").description("delete playlist").action(async (id) => {
1242
1289
  const client = await ctx.getClient();
1243
1290
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/playlists/${id}
1244
1291
  `);
1245
1292
  const result = await client.delete(`/api/v2025-06/playlists/${id}`);
1246
1293
  ctx.output(result);
1247
- });
1248
- resource.command("get <id>").description("show playlist").action(async (id) => {
1294
+ }), () => []);
1295
+ declareInputs(resource.command("get <id>").description("show playlist").action(async (id) => {
1249
1296
  const client = await ctx.getClient();
1250
1297
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/playlists/${id}
1251
1298
  `);
1252
1299
  const result = await client.get(`/api/v2025-06/playlists/${id}`);
1253
1300
  ctx.output(result);
1254
- });
1255
- resource.command("update <id>").description("update playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1301
+ }), () => []);
1302
+ declareInputs(resource.command("update <id>").description("update playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1256
1303
  const client = await ctx.getClient();
1257
1304
  let body;
1258
- if (opts.bodyFile) {
1259
- const { readFileSync } = await import("fs");
1260
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1261
- } else if (opts.body) body = ctx.parseBody(opts.body);
1305
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1306
+ else if (opts.body) body = ctx.parseBody(opts.body);
1262
1307
  if (ctx.verbose) process.stderr.write(`PATCH /api/v2025-06/playlists/${id}
1263
1308
  `);
1264
1309
  const result = await client.patch(`/api/v2025-06/playlists/${id}`, body);
1265
1310
  ctx.output(result);
1266
- });
1267
- resource.command("get-shareable-items").description("search shareable items").option("--type <value>", "Type of resource to search for ('Page', 'Product', 'Promotion', 'EnrollmentPack', 'Medium')").option("--search <value>", "Search term to filter items by title").option("--country-id <value>", "Country ID to filter items").action(async (opts) => {
1311
+ }), (opts) => opts.bodyFile ? [{
1312
+ kind: "file",
1313
+ path: String(opts.bodyFile)
1314
+ }] : []);
1315
+ declareInputs(resource.command("get-shareable-items").description("search shareable items").option("--type <value>", "Type of resource to search for ('Page', 'Product', 'Promotion', 'EnrollmentPack', 'Medium')").option("--search <value>", "Search term to filter items by title").option("--country-id <value>", "Country ID to filter items").action(async (opts) => {
1268
1316
  const client = await ctx.getClient();
1269
1317
  const params = {};
1270
1318
  if (opts.type !== void 0) params["type"] = opts.type;
@@ -1273,13 +1321,13 @@ function registerPlaylists(parent, ctx) {
1273
1321
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/playlists/shareables\n");
1274
1322
  const result = await client.get(`/api/v2025-06/playlists/shareables`, params);
1275
1323
  ctx.output(result);
1276
- });
1324
+ }), () => []);
1277
1325
  }
1278
1326
  //#endregion
1279
1327
  //#region src/generated/product-media.ts
1280
1328
  function registerProductMedia(parent, ctx) {
1281
1329
  const resource = parent.command("product-media").description("ProductMedia");
1282
- resource.command("list <product-id>").description("List media associated with product").option("--page <value>", "page").action(async (productId, opts) => {
1330
+ declareInputs(resource.command("list <product-id>").description("List media associated with product").option("--page <value>", "page").action(async (productId, opts) => {
1283
1331
  const client = await ctx.getClient();
1284
1332
  const params = {};
1285
1333
  if (opts.page !== void 0) params["page"] = opts.page;
@@ -1287,26 +1335,27 @@ function registerProductMedia(parent, ctx) {
1287
1335
  `);
1288
1336
  const result = await client.get(`/api/v2025-06/products/${productId}/media`, params);
1289
1337
  ctx.output(result);
1290
- });
1291
- resource.command("create <product-id>").description("Associate media with product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, opts) => {
1338
+ }), () => []);
1339
+ declareInputs(resource.command("create <product-id>").description("Associate media with product").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (productId, opts) => {
1292
1340
  const client = await ctx.getClient();
1293
1341
  let body;
1294
- if (opts.bodyFile) {
1295
- const { readFileSync } = await import("fs");
1296
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1297
- } else if (opts.body) body = ctx.parseBody(opts.body);
1342
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1343
+ else if (opts.body) body = ctx.parseBody(opts.body);
1298
1344
  if (ctx.verbose) process.stderr.write(`POST /api/v2025-06/products/${productId}/media
1299
1345
  `);
1300
1346
  const result = await client.post(`/api/v2025-06/products/${productId}/media`, body);
1301
1347
  ctx.output(result);
1302
- });
1303
- resource.command("delete <product-id> <id>").description("Media removed from product").action(async (productId, id) => {
1348
+ }), (opts) => opts.bodyFile ? [{
1349
+ kind: "file",
1350
+ path: String(opts.bodyFile)
1351
+ }] : []);
1352
+ declareInputs(resource.command("delete <product-id> <id>").description("Media removed from product").action(async (productId, id) => {
1304
1353
  const client = await ctx.getClient();
1305
1354
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/products/${productId}/media/${id}
1306
1355
  `);
1307
1356
  const result = await client.delete(`/api/v2025-06/products/${productId}/media/${id}`);
1308
1357
  ctx.output(result);
1309
- });
1358
+ }), () => []);
1310
1359
  }
1311
1360
  //#endregion
1312
1361
  //#region src/generated/reps.ts
@@ -1328,26 +1377,27 @@ function parseBooleanOption$2(value, flag) {
1328
1377
  }
1329
1378
  function registerReps(parent, ctx) {
1330
1379
  const resource = parent.command("reps").description("Reps");
1331
- resource.command("create").description("Create a rep").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1380
+ declareInputs(resource.command("create").description("Create a rep").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1332
1381
  const client = await ctx.getClient();
1333
1382
  let body;
1334
- if (opts.bodyFile) {
1335
- const { readFileSync } = await import("fs");
1336
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1337
- } else if (opts.body) body = ctx.parseBody(opts.body);
1383
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1384
+ else if (opts.body) body = ctx.parseBody(opts.body);
1338
1385
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/reps\n");
1339
1386
  const result = await client.post(`/api/v2025-06/reps`, body);
1340
1387
  ctx.output(result);
1341
- });
1342
- resource.command("list").description("List reps").option("--params <value>", "Query parameters for filtering, pagination, and sorting").action(async (opts) => {
1388
+ }), (opts) => opts.bodyFile ? [{
1389
+ kind: "file",
1390
+ path: String(opts.bodyFile)
1391
+ }] : []);
1392
+ declareInputs(resource.command("list").description("List reps").option("--params <value>", "Query parameters for filtering, pagination, and sorting").action(async (opts) => {
1343
1393
  const client = await ctx.getClient();
1344
1394
  const params = {};
1345
1395
  if (opts.params !== void 0) params["params"] = opts.params;
1346
1396
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/reps\n");
1347
1397
  const result = await client.get(`/api/v2025-06/reps`, params);
1348
1398
  ctx.output(result);
1349
- });
1350
- resource.command("get-credited-orders <rep-id>").description("List credited orders for a rep").option("--start-date <value>", "Filter orders from this date (ISO 8601 format)").option("--end-date <value>", "Filter orders until this date (ISO 8601 format)").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--customer-id <value>", "Filter orders by customer ID").option("--user-company-id <value>", "Filter orders by user company ID").option("--unfulfilled <value>", "Filter unfulfilled orders").option("--unpaid <value>", "Filter unpaid orders").option("--search-query <value>", "Search orders by query").option("--within-days <value>", "Filter orders within specified number of days").option("--metadata <value>", "Filter orders by metadata (JSON string)").option("--subscription-id <value>", "Filter orders by subscription ID").option("--sorted-by <value>", "Sort orders by field and direction (e.g., 'created_at_desc')").option("--status <value>", "Filter orders by status or 'all' for all statuses").option("--type <value>", "Filter orders by type").option("--cart-source <value>", "Filter orders by cart source").option("--country-isos <value>", "Filter orders by country ISO codes (comma-separated)").option("--force-stats <value>", "Force stats calculation even for large datasets (>10,000 records)").action(async (repId, opts) => {
1399
+ }), () => []);
1400
+ declareInputs(resource.command("get-credited-orders <rep-id>").description("List credited orders for a rep").option("--start-date <value>", "Filter orders from this date (ISO 8601 format)").option("--end-date <value>", "Filter orders until this date (ISO 8601 format)").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--customer-id <value>", "Filter orders by customer ID").option("--user-company-id <value>", "Filter orders by user company ID").option("--unfulfilled <value>", "Filter unfulfilled orders").option("--unpaid <value>", "Filter unpaid orders").option("--search-query <value>", "Search orders by query").option("--within-days <value>", "Filter orders within specified number of days").option("--metadata <value>", "Filter orders by metadata (JSON string)").option("--subscription-id <value>", "Filter orders by subscription ID").option("--sorted-by <value>", "Sort orders by field and direction (e.g., 'created_at_desc')").option("--status <value>", "Filter orders by status or 'all' for all statuses").option("--type <value>", "Filter orders by type").option("--cart-source <value>", "Filter orders by cart source").option("--country-isos <value>", "Filter orders by country ISO codes (comma-separated)").option("--force-stats <value>", "Force stats calculation even for large datasets (>10,000 records)").action(async (repId, opts) => {
1351
1401
  const client = await ctx.getClient();
1352
1402
  const params = {};
1353
1403
  if (opts.startDate !== void 0) params["start_date"] = opts.startDate;
@@ -1372,34 +1422,35 @@ function registerReps(parent, ctx) {
1372
1422
  `);
1373
1423
  const result = await client.get(`/api/v2025-06/reps/${repId}/credited_orders`, params);
1374
1424
  ctx.output(result);
1375
- });
1376
- resource.command("delete <id>").description("Delete a rep").action(async (id) => {
1425
+ }), () => []);
1426
+ declareInputs(resource.command("delete <id>").description("Delete a rep").action(async (id) => {
1377
1427
  const client = await ctx.getClient();
1378
1428
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/reps/${id}
1379
1429
  `);
1380
1430
  const result = await client.delete(`/api/v2025-06/reps/${id}`);
1381
1431
  ctx.output(result);
1382
- });
1383
- resource.command("get <id>").description("Get a rep").action(async (id) => {
1432
+ }), () => []);
1433
+ declareInputs(resource.command("get <id>").description("Get a rep").action(async (id) => {
1384
1434
  const client = await ctx.getClient();
1385
1435
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/reps/${id}
1386
1436
  `);
1387
1437
  const result = await client.get(`/api/v2025-06/reps/${id}`);
1388
1438
  ctx.output(result);
1389
- });
1390
- resource.command("update <id>").description("Update a rep").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1439
+ }), () => []);
1440
+ declareInputs(resource.command("update <id>").description("Update a rep").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1391
1441
  const client = await ctx.getClient();
1392
1442
  let body;
1393
- if (opts.bodyFile) {
1394
- const { readFileSync } = await import("fs");
1395
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1396
- } else if (opts.body) body = ctx.parseBody(opts.body);
1443
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1444
+ else if (opts.body) body = ctx.parseBody(opts.body);
1397
1445
  if (ctx.verbose) process.stderr.write(`PATCH /api/v2025-06/reps/${id}
1398
1446
  `);
1399
1447
  const result = await client.patch(`/api/v2025-06/reps/${id}`, body);
1400
1448
  ctx.output(result);
1401
- });
1402
- resource.command("get-most-shared <rep-id>").description("Get most shared resources").option("--limit <value>", "Number of resources to return (default: 10)").option("--period <value>", "Time period filter: 7d, 30d, 90d, 1y, or all (default: all)").option("--shareable-type <value>", "Type of resource to filter: products, media, pages, libraries, enrollment_packs, or promotions").option("--language-iso <value>", "Language code for translations (e.g., 'en', 'es', 'de')").action(async (repId, opts) => {
1449
+ }), (opts) => opts.bodyFile ? [{
1450
+ kind: "file",
1451
+ path: String(opts.bodyFile)
1452
+ }] : []);
1453
+ declareInputs(resource.command("get-most-shared <rep-id>").description("Get most shared resources").option("--limit <value>", "Number of resources to return (default: 10)").option("--period <value>", "Time period filter: 7d, 30d, 90d, 1y, or all (default: all)").option("--shareable-type <value>", "Type of resource to filter: products, media, pages, libraries, enrollment_packs, or promotions").option("--language-iso <value>", "Language code for translations (e.g., 'en', 'es', 'de')").action(async (repId, opts) => {
1403
1454
  const client = await ctx.getClient();
1404
1455
  const params = {};
1405
1456
  if (opts.limit !== void 0) params["limit"] = Number(opts.limit);
@@ -1410,8 +1461,8 @@ function registerReps(parent, ctx) {
1410
1461
  `);
1411
1462
  const result = await client.get(`/api/v2025-06/reps/${repId}/most_shared`, params);
1412
1463
  ctx.output(result);
1413
- });
1414
- resource.command("get-most-viewed <rep-id>").description("Get most viewed resources").option("--limit <value>", "Number of resources to return (default: 10)").option("--period <value>", "Time period filter: 7d, 30d, 90d, 1y, or all (default: all)").option("--shareable-type <value>", "Type of resource to filter: products, media, pages, libraries, enrollment_packs, or promotions").option("--language-iso <value>", "Language code for translations (e.g., 'en', 'es', 'de')").action(async (repId, opts) => {
1464
+ }), () => []);
1465
+ declareInputs(resource.command("get-most-viewed <rep-id>").description("Get most viewed resources").option("--limit <value>", "Number of resources to return (default: 10)").option("--period <value>", "Time period filter: 7d, 30d, 90d, 1y, or all (default: all)").option("--shareable-type <value>", "Type of resource to filter: products, media, pages, libraries, enrollment_packs, or promotions").option("--language-iso <value>", "Language code for translations (e.g., 'en', 'es', 'de')").action(async (repId, opts) => {
1415
1466
  const client = await ctx.getClient();
1416
1467
  const params = {};
1417
1468
  if (opts.limit !== void 0) params["limit"] = Number(opts.limit);
@@ -1422,8 +1473,8 @@ function registerReps(parent, ctx) {
1422
1473
  `);
1423
1474
  const result = await client.get(`/api/v2025-06/reps/${repId}/most_viewed`, params);
1424
1475
  ctx.output(result);
1425
- });
1426
- resource.command("get-shared-assets <rep-id>").description("List shared assets for a rep").option("--limit <value>", "Maximum number of assets to return (default: 12)").action(async (repId, opts) => {
1476
+ }), () => []);
1477
+ declareInputs(resource.command("get-shared-assets <rep-id>").description("List shared assets for a rep").option("--limit <value>", "Maximum number of assets to return (default: 12)").action(async (repId, opts) => {
1427
1478
  const client = await ctx.getClient();
1428
1479
  const params = {};
1429
1480
  if (opts.limit !== void 0) params["limit"] = Number(opts.limit);
@@ -1431,8 +1482,8 @@ function registerReps(parent, ctx) {
1431
1482
  `);
1432
1483
  const result = await client.get(`/api/v2025-06/reps/${repId}/shared_assets`, params);
1433
1484
  ctx.output(result);
1434
- });
1435
- resource.command("get-top-products-sold <rep-id>").description("Get top products sold by rep").option("--limit <value>", "Number of top products to return (1-10, default: 5)").option("--period <value>", "Time period filter: 7d, 30d, 90d, 1y, or all (default: all)").action(async (repId, opts) => {
1485
+ }), () => []);
1486
+ declareInputs(resource.command("get-top-products-sold <rep-id>").description("Get top products sold by rep").option("--limit <value>", "Number of top products to return (1-10, default: 5)").option("--period <value>", "Time period filter: 7d, 30d, 90d, 1y, or all (default: all)").action(async (repId, opts) => {
1436
1487
  const client = await ctx.getClient();
1437
1488
  const params = {};
1438
1489
  if (opts.limit !== void 0) params["limit"] = Number(opts.limit);
@@ -1441,106 +1492,108 @@ function registerReps(parent, ctx) {
1441
1492
  `);
1442
1493
  const result = await client.get(`/api/v2025-06/reps/${repId}/top_products_sold`, params);
1443
1494
  ctx.output(result);
1444
- });
1445
- resource.command("create-bulk").description("Create multiple reps").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1495
+ }), () => []);
1496
+ declareInputs(resource.command("create-bulk").description("Create multiple reps").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1446
1497
  const client = await ctx.getClient();
1447
1498
  let body;
1448
- if (opts.bodyFile) {
1449
- const { readFileSync } = await import("fs");
1450
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1451
- } else if (opts.body) body = ctx.parseBody(opts.body);
1499
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1500
+ else if (opts.body) body = ctx.parseBody(opts.body);
1452
1501
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/reps/bulk\n");
1453
1502
  const result = await client.post(`/api/v2025-06/reps/bulk`, body);
1454
1503
  ctx.output(result);
1455
- });
1456
- resource.command("delete-bulk").description("Delete multiple reps").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1504
+ }), (opts) => opts.bodyFile ? [{
1505
+ kind: "file",
1506
+ path: String(opts.bodyFile)
1507
+ }] : []);
1508
+ declareInputs(resource.command("delete-bulk").description("Delete multiple reps").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1457
1509
  const client = await ctx.getClient();
1458
1510
  let body;
1459
- if (opts.bodyFile) {
1460
- const { readFileSync } = await import("fs");
1461
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1462
- } else if (opts.body) body = ctx.parseBody(opts.body);
1511
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1512
+ else if (opts.body) body = ctx.parseBody(opts.body);
1463
1513
  if (ctx.verbose) process.stderr.write("DELETE /api/v2025-06/reps/bulk\n");
1464
1514
  const result = await client.delete(`/api/v2025-06/reps/bulk`, { body });
1465
1515
  ctx.output(result);
1466
- });
1516
+ }), (opts) => opts.bodyFile ? [{
1517
+ kind: "file",
1518
+ path: String(opts.bodyFile)
1519
+ }] : []);
1467
1520
  }
1468
1521
  //#endregion
1469
1522
  //#region src/generated/share-statistics.ts
1470
1523
  function registerShareStatistics(parent, ctx) {
1471
1524
  const resource = parent.command("share-statistics").description("Share Statistics");
1472
- resource.command("get-media-share-stats <id>").description("Get share statistics for media").action(async (id) => {
1525
+ declareInputs(resource.command("get-media-share-stats <id>").description("Get share statistics for media").action(async (id) => {
1473
1526
  const client = await ctx.getClient();
1474
1527
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/media/${id}/share_stats
1475
1528
  `);
1476
1529
  const result = await client.get(`/api/v2025-06/media/${id}/share_stats`);
1477
1530
  ctx.output(result);
1478
- });
1479
- resource.command("get-product-share-stats <id>").description("Get share statistics for product").action(async (id) => {
1531
+ }), () => []);
1532
+ declareInputs(resource.command("get-product-share-stats <id>").description("Get share statistics for product").action(async (id) => {
1480
1533
  const client = await ctx.getClient();
1481
1534
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/products/${id}/share_stats
1482
1535
  `);
1483
1536
  const result = await client.get(`/api/v2025-06/products/${id}/share_stats`);
1484
1537
  ctx.output(result);
1485
- });
1486
- resource.command("get-playlist-share-stats <id>").description("Get share statistics for playlist").action(async (id) => {
1538
+ }), () => []);
1539
+ declareInputs(resource.command("get-playlist-share-stats <id>").description("Get share statistics for playlist").action(async (id) => {
1487
1540
  const client = await ctx.getClient();
1488
1541
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/playlists/${id}/share_stats
1489
1542
  `);
1490
1543
  const result = await client.get(`/api/v2025-06/playlists/${id}/share_stats`);
1491
1544
  ctx.output(result);
1492
- });
1493
- resource.command("get-category-share-stats <id>").description("Get share statistics for category").action(async (id) => {
1545
+ }), () => []);
1546
+ declareInputs(resource.command("get-category-share-stats <id>").description("Get share statistics for category").action(async (id) => {
1494
1547
  const client = await ctx.getClient();
1495
1548
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/categories/${id}/share_stats
1496
1549
  `);
1497
1550
  const result = await client.get(`/api/v2025-06/categories/${id}/share_stats`);
1498
1551
  ctx.output(result);
1499
- });
1500
- resource.command("get-collection-share-stats <id>").description("Get share statistics for collection").action(async (id) => {
1552
+ }), () => []);
1553
+ declareInputs(resource.command("get-collection-share-stats <id>").description("Get share statistics for collection").action(async (id) => {
1501
1554
  const client = await ctx.getClient();
1502
1555
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/collections/${id}/share_stats
1503
1556
  `);
1504
1557
  const result = await client.get(`/api/v2025-06/collections/${id}/share_stats`);
1505
1558
  ctx.output(result);
1506
- });
1507
- resource.command("get-post-share-stats <id>").description("Get share statistics for post").action(async (id) => {
1559
+ }), () => []);
1560
+ declareInputs(resource.command("get-post-share-stats <id>").description("Get share statistics for post").action(async (id) => {
1508
1561
  const client = await ctx.getClient();
1509
1562
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/posts/${id}/share_stats
1510
1563
  `);
1511
1564
  const result = await client.get(`/api/v2025-06/posts/${id}/share_stats`);
1512
1565
  ctx.output(result);
1513
- });
1514
- resource.command("get-page-share-stats <id>").description("Get share statistics for page").action(async (id) => {
1566
+ }), () => []);
1567
+ declareInputs(resource.command("get-page-share-stats <id>").description("Get share statistics for page").action(async (id) => {
1515
1568
  const client = await ctx.getClient();
1516
1569
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/pages/${id}/share_stats
1517
1570
  `);
1518
1571
  const result = await client.get(`/api/v2025-06/pages/${id}/share_stats`);
1519
1572
  ctx.output(result);
1520
- });
1521
- resource.command("get-enrollment-pack-share-stats <id>").description("Get share statistics for enrollment pack").action(async (id) => {
1573
+ }), () => []);
1574
+ declareInputs(resource.command("get-enrollment-pack-share-stats <id>").description("Get share statistics for enrollment pack").action(async (id) => {
1522
1575
  const client = await ctx.getClient();
1523
1576
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/enrollment_packs/${id}/share_stats
1524
1577
  `);
1525
1578
  const result = await client.get(`/api/v2025-06/enrollment_packs/${id}/share_stats`);
1526
1579
  ctx.output(result);
1527
- });
1580
+ }), () => []);
1528
1581
  }
1529
1582
  //#endregion
1530
1583
  //#region src/generated/users-brand-guidelines.ts
1531
1584
  function registerUsersBrandGuidelines(parent, ctx) {
1532
- parent.command("users-brand-guidelines").description("Users Brand Guidelines").command("get-user-brand-guidelines").description("Show brand guidelines").action(async () => {
1585
+ declareInputs(parent.command("users-brand-guidelines").description("Users Brand Guidelines").command("get-user-brand-guidelines").description("Show brand guidelines").action(async () => {
1533
1586
  const client = await ctx.getClient();
1534
1587
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/brand_guidelines\n");
1535
1588
  const result = await client.get(`/api/users/v2025-06/brand_guidelines`);
1536
1589
  ctx.output(result);
1537
- });
1590
+ }), () => []);
1538
1591
  }
1539
1592
  //#endregion
1540
1593
  //#region src/generated/users-contacts.ts
1541
1594
  function registerUsersContacts(parent, ctx) {
1542
1595
  const resource = parent.command("users-contacts").description("Users Contacts");
1543
- resource.command("list-user-contact-activities <id>").description("List activities for a contact").option("--page <value>", "Page number for pagination").action(async (id, opts) => {
1596
+ declareInputs(resource.command("list-user-contact-activities <id>").description("List activities for a contact").option("--page <value>", "Page number for pagination").action(async (id, opts) => {
1544
1597
  const client = await ctx.getClient();
1545
1598
  const params = {};
1546
1599
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1548,41 +1601,44 @@ function registerUsersContacts(parent, ctx) {
1548
1601
  `);
1549
1602
  const result = await client.get(`/api/users/v2025-06/contacts/${id}/activities`, params);
1550
1603
  ctx.output(result);
1551
- });
1552
- resource.command("bulk-delete-user-contacts").description("Bulk delete contacts").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1604
+ }), () => []);
1605
+ declareInputs(resource.command("bulk-delete-user-contacts").description("Bulk delete contacts").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1553
1606
  const client = await ctx.getClient();
1554
1607
  let body;
1555
- if (opts.bodyFile) {
1556
- const { readFileSync } = await import("fs");
1557
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1558
- } else if (opts.body) body = ctx.parseBody(opts.body);
1608
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1609
+ else if (opts.body) body = ctx.parseBody(opts.body);
1559
1610
  if (ctx.verbose) process.stderr.write("DELETE /api/users/v2025-06/contacts/bulk_delete\n");
1560
1611
  const result = await client.delete(`/api/users/v2025-06/contacts/bulk_delete`, { body });
1561
1612
  ctx.output(result);
1562
- });
1563
- resource.command("bulk-import-user-contacts").description("Bulk import contacts").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1613
+ }), (opts) => opts.bodyFile ? [{
1614
+ kind: "file",
1615
+ path: String(opts.bodyFile)
1616
+ }] : []);
1617
+ declareInputs(resource.command("bulk-import-user-contacts").description("Bulk import contacts").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1564
1618
  const client = await ctx.getClient();
1565
1619
  let body;
1566
- if (opts.bodyFile) {
1567
- const { readFileSync } = await import("fs");
1568
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1569
- } else if (opts.body) body = ctx.parseBody(opts.body);
1620
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1621
+ else if (opts.body) body = ctx.parseBody(opts.body);
1570
1622
  if (ctx.verbose) process.stderr.write("POST /api/users/v2025-06/contacts/bulk\n");
1571
1623
  const result = await client.post(`/api/users/v2025-06/contacts/bulk`, body);
1572
1624
  ctx.output(result);
1573
- });
1574
- resource.command("create-user-contact").description("Create a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1625
+ }), (opts) => opts.bodyFile ? [{
1626
+ kind: "file",
1627
+ path: String(opts.bodyFile)
1628
+ }] : []);
1629
+ declareInputs(resource.command("create-user-contact").description("Create a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1575
1630
  const client = await ctx.getClient();
1576
1631
  let body;
1577
- if (opts.bodyFile) {
1578
- const { readFileSync } = await import("fs");
1579
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1580
- } else if (opts.body) body = ctx.parseBody(opts.body);
1632
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1633
+ else if (opts.body) body = ctx.parseBody(opts.body);
1581
1634
  if (ctx.verbose) process.stderr.write("POST /api/users/v2025-06/contacts\n");
1582
1635
  const result = await client.post(`/api/users/v2025-06/contacts`, body);
1583
1636
  ctx.output(result);
1584
- });
1585
- resource.command("list-user-contacts").description("List user's contacts").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter contacts by status").option("--search-query <value>", "Search contacts by name, email, or phone").option("--by-metadata <value>", "Filter contacts by metadata (JSON string)").action(async (opts) => {
1637
+ }), (opts) => opts.bodyFile ? [{
1638
+ kind: "file",
1639
+ path: String(opts.bodyFile)
1640
+ }] : []);
1641
+ declareInputs(resource.command("list-user-contacts").description("List user's contacts").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter contacts by status").option("--search-query <value>", "Search contacts by name, email, or phone").option("--by-metadata <value>", "Filter contacts by metadata (JSON string)").action(async (opts) => {
1586
1642
  const client = await ctx.getClient();
1587
1643
  const params = {};
1588
1644
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1593,53 +1649,55 @@ function registerUsersContacts(parent, ctx) {
1593
1649
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/contacts\n");
1594
1650
  const result = await client.get(`/api/users/v2025-06/contacts`, params);
1595
1651
  ctx.output(result);
1596
- });
1597
- resource.command("delete-user-contact <id>").description("Delete a contact").action(async (id) => {
1652
+ }), () => []);
1653
+ declareInputs(resource.command("delete-user-contact <id>").description("Delete a contact").action(async (id) => {
1598
1654
  const client = await ctx.getClient();
1599
1655
  if (ctx.verbose) process.stderr.write(`DELETE /api/users/v2025-06/contacts/${id}
1600
1656
  `);
1601
1657
  const result = await client.delete(`/api/users/v2025-06/contacts/${id}`);
1602
1658
  ctx.output(result);
1603
- });
1604
- resource.command("get-user-contact <id>").description("Get a contact").action(async (id) => {
1659
+ }), () => []);
1660
+ declareInputs(resource.command("get-user-contact <id>").description("Get a contact").action(async (id) => {
1605
1661
  const client = await ctx.getClient();
1606
1662
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/contacts/${id}
1607
1663
  `);
1608
1664
  const result = await client.get(`/api/users/v2025-06/contacts/${id}`);
1609
1665
  ctx.output(result);
1610
- });
1611
- resource.command("update-user-contact <id>").description("Update a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1666
+ }), () => []);
1667
+ declareInputs(resource.command("update-user-contact <id>").description("Update a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1612
1668
  const client = await ctx.getClient();
1613
1669
  let body;
1614
- if (opts.bodyFile) {
1615
- const { readFileSync } = await import("fs");
1616
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1617
- } else if (opts.body) body = ctx.parseBody(opts.body);
1670
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1671
+ else if (opts.body) body = ctx.parseBody(opts.body);
1618
1672
  if (ctx.verbose) process.stderr.write(`PATCH /api/users/v2025-06/contacts/${id}
1619
1673
  `);
1620
1674
  const result = await client.patch(`/api/users/v2025-06/contacts/${id}`, body);
1621
1675
  ctx.output(result);
1622
- });
1623
- resource.command("create-user-contact-note <id>").description("Create a note for a contact (deprecated)").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1676
+ }), (opts) => opts.bodyFile ? [{
1677
+ kind: "file",
1678
+ path: String(opts.bodyFile)
1679
+ }] : []);
1680
+ declareInputs(resource.command("create-user-contact-note <id>").description("Create a note for a contact (deprecated)").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1624
1681
  const client = await ctx.getClient();
1625
1682
  let body;
1626
- if (opts.bodyFile) {
1627
- const { readFileSync } = await import("fs");
1628
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1629
- } else if (opts.body) body = ctx.parseBody(opts.body);
1683
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1684
+ else if (opts.body) body = ctx.parseBody(opts.body);
1630
1685
  if (ctx.verbose) process.stderr.write(`POST /api/users/v2025-06/contacts/${id}/notes
1631
1686
  `);
1632
1687
  const result = await client.post(`/api/users/v2025-06/contacts/${id}/notes`, body);
1633
1688
  ctx.output(result);
1634
- });
1635
- resource.command("list-user-contact-notes <id>").description("List notes for a contact").action(async (id) => {
1689
+ }), (opts) => opts.bodyFile ? [{
1690
+ kind: "file",
1691
+ path: String(opts.bodyFile)
1692
+ }] : []);
1693
+ declareInputs(resource.command("list-user-contact-notes <id>").description("List notes for a contact").action(async (id) => {
1636
1694
  const client = await ctx.getClient();
1637
1695
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/contacts/${id}/notes
1638
1696
  `);
1639
1697
  const result = await client.get(`/api/users/v2025-06/contacts/${id}/notes`);
1640
1698
  ctx.output(result);
1641
- });
1642
- resource.command("list-user-contact-orders <id>").description("List orders for a contact").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of orders per page (max 100)").option("--status <value>", "Filter by order status").action(async (id, opts) => {
1699
+ }), () => []);
1700
+ declareInputs(resource.command("list-user-contact-orders <id>").description("List orders for a contact").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of orders per page (max 100)").option("--status <value>", "Filter by order status").action(async (id, opts) => {
1643
1701
  const client = await ctx.getClient();
1644
1702
  const params = {};
1645
1703
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1649,15 +1707,15 @@ function registerUsersContacts(parent, ctx) {
1649
1707
  `);
1650
1708
  const result = await client.get(`/api/users/v2025-06/contacts/${id}/orders`, params);
1651
1709
  ctx.output(result);
1652
- });
1653
- resource.command("mark-user-contact-read <id>").description("Mark contact's activities as read").action(async (id) => {
1710
+ }), () => []);
1711
+ declareInputs(resource.command("mark-user-contact-read <id>").description("Mark contact's activities as read").action(async (id) => {
1654
1712
  const client = await ctx.getClient();
1655
1713
  if (ctx.verbose) process.stderr.write(`POST /api/users/v2025-06/contacts/${id}/read
1656
1714
  `);
1657
1715
  const result = await client.post(`/api/users/v2025-06/contacts/${id}/read`);
1658
1716
  ctx.output(result);
1659
- });
1660
- resource.command("list-user-contact-subscription-orders <id>").description("List subscription orders for a contact").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of subscription orders per page (max 100)").option("--status <value>", "Filter by subscription order status").action(async (id, opts) => {
1717
+ }), () => []);
1718
+ declareInputs(resource.command("list-user-contact-subscription-orders <id>").description("List subscription orders for a contact").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of subscription orders per page (max 100)").option("--status <value>", "Filter by subscription order status").action(async (id, opts) => {
1661
1719
  const client = await ctx.getClient();
1662
1720
  const params = {};
1663
1721
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1667,38 +1725,40 @@ function registerUsersContacts(parent, ctx) {
1667
1725
  `);
1668
1726
  const result = await client.get(`/api/users/v2025-06/contacts/${id}/subscription_orders`, params);
1669
1727
  ctx.output(result);
1670
- });
1671
- resource.command("create-user-contact-task <id>").description("Create a task for a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1728
+ }), () => []);
1729
+ declareInputs(resource.command("create-user-contact-task <id>").description("Create a task for a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1672
1730
  const client = await ctx.getClient();
1673
1731
  let body;
1674
- if (opts.bodyFile) {
1675
- const { readFileSync } = await import("fs");
1676
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1677
- } else if (opts.body) body = ctx.parseBody(opts.body);
1732
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1733
+ else if (opts.body) body = ctx.parseBody(opts.body);
1678
1734
  if (ctx.verbose) process.stderr.write(`POST /api/users/v2025-06/contacts/${id}/tasks
1679
1735
  `);
1680
1736
  const result = await client.post(`/api/users/v2025-06/contacts/${id}/tasks`, body);
1681
1737
  ctx.output(result);
1682
- });
1683
- resource.command("list-user-contact-tasks <id>").description("List tasks for a contact").action(async (id) => {
1738
+ }), (opts) => opts.bodyFile ? [{
1739
+ kind: "file",
1740
+ path: String(opts.bodyFile)
1741
+ }] : []);
1742
+ declareInputs(resource.command("list-user-contact-tasks <id>").description("List tasks for a contact").action(async (id) => {
1684
1743
  const client = await ctx.getClient();
1685
1744
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/contacts/${id}/tasks
1686
1745
  `);
1687
1746
  const result = await client.get(`/api/users/v2025-06/contacts/${id}/tasks`);
1688
1747
  ctx.output(result);
1689
- });
1690
- resource.command("toggle-user-contact-note-pin <id> <note-id>").description("Toggle pinned status of a note (deprecated)").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, noteId, opts) => {
1748
+ }), () => []);
1749
+ declareInputs(resource.command("toggle-user-contact-note-pin <id> <note-id>").description("Toggle pinned status of a note (deprecated)").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, noteId, opts) => {
1691
1750
  const client = await ctx.getClient();
1692
1751
  let body;
1693
- if (opts.bodyFile) {
1694
- const { readFileSync } = await import("fs");
1695
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1696
- } else if (opts.body) body = ctx.parseBody(opts.body);
1752
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1753
+ else if (opts.body) body = ctx.parseBody(opts.body);
1697
1754
  if (ctx.verbose) process.stderr.write(`POST /api/users/v2025-06/contacts/${id}/notes/${noteId}/toggle_pinned
1698
1755
  `);
1699
1756
  const result = await client.post(`/api/users/v2025-06/contacts/${id}/notes/${noteId}/toggle_pinned`, body);
1700
1757
  ctx.output(result);
1701
- });
1758
+ }), (opts) => opts.bodyFile ? [{
1759
+ kind: "file",
1760
+ path: String(opts.bodyFile)
1761
+ }] : []);
1702
1762
  }
1703
1763
  //#endregion
1704
1764
  //#region src/generated/users-media.ts
@@ -1720,7 +1780,7 @@ function parseBooleanOption$1(value, flag) {
1720
1780
  }
1721
1781
  function registerUsersMedia(parent, ctx) {
1722
1782
  const resource = parent.command("users-media").description("Users Media");
1723
- resource.command("list-user-media").description("List user's media").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--sorted-by <value>", "Sort order").option("--status <value>", "Filter by status").option("--active <value>", "Filter by active status").option("--search-query <value>", "Search query").action(async (opts) => {
1783
+ declareInputs(resource.command("list-user-media").description("List user's media").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--sorted-by <value>", "Sort order").option("--status <value>", "Filter by status").option("--active <value>", "Filter by active status").option("--search-query <value>", "Search query").action(async (opts) => {
1724
1784
  const client = await ctx.getClient();
1725
1785
  const params = {};
1726
1786
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1732,61 +1792,64 @@ function registerUsersMedia(parent, ctx) {
1732
1792
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/media\n");
1733
1793
  const result = await client.get(`/api/users/v2025-06/media`, params);
1734
1794
  ctx.output(result);
1735
- });
1736
- resource.command("create-user-media").description("Create a media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1795
+ }), () => []);
1796
+ declareInputs(resource.command("create-user-media").description("Create a media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1737
1797
  const client = await ctx.getClient();
1738
1798
  let body;
1739
- if (opts.bodyFile) {
1740
- const { readFileSync } = await import("fs");
1741
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1742
- } else if (opts.body) body = ctx.parseBody(opts.body);
1799
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1800
+ else if (opts.body) body = ctx.parseBody(opts.body);
1743
1801
  if (ctx.verbose) process.stderr.write("POST /api/users/v2025-06/media\n");
1744
1802
  const result = await client.post(`/api/users/v2025-06/media`, body);
1745
1803
  ctx.output(result);
1746
- });
1747
- resource.command("get-user-media <id>").description("Get a media").action(async (id) => {
1804
+ }), (opts) => opts.bodyFile ? [{
1805
+ kind: "file",
1806
+ path: String(opts.bodyFile)
1807
+ }] : []);
1808
+ declareInputs(resource.command("get-user-media <id>").description("Get a media").action(async (id) => {
1748
1809
  const client = await ctx.getClient();
1749
1810
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/media/${id}
1750
1811
  `);
1751
1812
  const result = await client.get(`/api/users/v2025-06/media/${id}`);
1752
1813
  ctx.output(result);
1753
- });
1754
- resource.command("update-user-media <id>").description("Update a media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1814
+ }), () => []);
1815
+ declareInputs(resource.command("update-user-media <id>").description("Update a media").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1755
1816
  const client = await ctx.getClient();
1756
1817
  let body;
1757
- if (opts.bodyFile) {
1758
- const { readFileSync } = await import("fs");
1759
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1760
- } else if (opts.body) body = ctx.parseBody(opts.body);
1818
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1819
+ else if (opts.body) body = ctx.parseBody(opts.body);
1761
1820
  if (ctx.verbose) process.stderr.write(`PATCH /api/users/v2025-06/media/${id}
1762
1821
  `);
1763
1822
  const result = await client.patch(`/api/users/v2025-06/media/${id}`, body);
1764
1823
  ctx.output(result);
1765
- });
1766
- resource.command("delete-user-media <id>").description("Delete a media").action(async (id) => {
1824
+ }), (opts) => opts.bodyFile ? [{
1825
+ kind: "file",
1826
+ path: String(opts.bodyFile)
1827
+ }] : []);
1828
+ declareInputs(resource.command("delete-user-media <id>").description("Delete a media").action(async (id) => {
1767
1829
  const client = await ctx.getClient();
1768
1830
  if (ctx.verbose) process.stderr.write(`DELETE /api/users/v2025-06/media/${id}
1769
1831
  `);
1770
1832
  const result = await client.delete(`/api/users/v2025-06/media/${id}`);
1771
1833
  ctx.output(result);
1772
- });
1834
+ }), () => []);
1773
1835
  }
1774
1836
  //#endregion
1775
1837
  //#region src/generated/users-notes.ts
1776
1838
  function registerUsersNotes(parent, ctx) {
1777
1839
  const resource = parent.command("users-notes").description("Users Notes");
1778
- resource.command("create-user-note").description("Create a note for a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1840
+ declareInputs(resource.command("create-user-note").description("Create a note for a contact").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1779
1841
  const client = await ctx.getClient();
1780
1842
  let body;
1781
- if (opts.bodyFile) {
1782
- const { readFileSync } = await import("fs");
1783
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1784
- } else if (opts.body) body = ctx.parseBody(opts.body);
1843
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1844
+ else if (opts.body) body = ctx.parseBody(opts.body);
1785
1845
  if (ctx.verbose) process.stderr.write("POST /api/users/v2025-06/notes\n");
1786
1846
  const result = await client.post(`/api/users/v2025-06/notes`, body);
1787
1847
  ctx.output(result);
1788
- });
1789
- resource.command("list-user-notes").description("List notes for a contact").option("--contact-id <value>", "Contact ID").option("--page <value>", "Page number (default 1)").option("--per-page <value>", "Items per page (default 10)").action(async (opts) => {
1848
+ }), (opts) => opts.bodyFile ? [{
1849
+ kind: "file",
1850
+ path: String(opts.bodyFile)
1851
+ }] : []);
1852
+ declareInputs(resource.command("list-user-notes").description("List notes for a contact").option("--contact-id <value>", "Contact ID").option("--page <value>", "Page number (default 1)").option("--per-page <value>", "Items per page (default 10)").action(async (opts) => {
1790
1853
  const client = await ctx.getClient();
1791
1854
  const params = {};
1792
1855
  if (opts.contactId !== void 0) params["contact_id"] = Number(opts.contactId);
@@ -1795,8 +1858,8 @@ function registerUsersNotes(parent, ctx) {
1795
1858
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/notes\n");
1796
1859
  const result = await client.get(`/api/users/v2025-06/notes`, params);
1797
1860
  ctx.output(result);
1798
- });
1799
- resource.command("delete-user-note <id>").description("Delete a note").option("--contact-id <value>", "Contact ID").action(async (id, opts) => {
1861
+ }), () => []);
1862
+ declareInputs(resource.command("delete-user-note <id>").description("Delete a note").option("--contact-id <value>", "Contact ID").action(async (id, opts) => {
1800
1863
  const client = await ctx.getClient();
1801
1864
  const params = {};
1802
1865
  if (opts.contactId !== void 0) params["contact_id"] = Number(opts.contactId);
@@ -1804,8 +1867,8 @@ function registerUsersNotes(parent, ctx) {
1804
1867
  `);
1805
1868
  const result = await client.delete(`/api/users/v2025-06/notes/${id}`, { params });
1806
1869
  ctx.output(result);
1807
- });
1808
- resource.command("get-user-note <id>").description("Get a note").option("--contact-id <value>", "Contact ID").action(async (id, opts) => {
1870
+ }), () => []);
1871
+ declareInputs(resource.command("get-user-note <id>").description("Get a note").option("--contact-id <value>", "Contact ID").action(async (id, opts) => {
1809
1872
  const client = await ctx.getClient();
1810
1873
  const params = {};
1811
1874
  if (opts.contactId !== void 0) params["contact_id"] = Number(opts.contactId);
@@ -1813,36 +1876,38 @@ function registerUsersNotes(parent, ctx) {
1813
1876
  `);
1814
1877
  const result = await client.get(`/api/users/v2025-06/notes/${id}`, params);
1815
1878
  ctx.output(result);
1816
- });
1817
- resource.command("update-user-note <id>").description("Update a note").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1879
+ }), () => []);
1880
+ declareInputs(resource.command("update-user-note <id>").description("Update a note").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1818
1881
  const client = await ctx.getClient();
1819
1882
  let body;
1820
- if (opts.bodyFile) {
1821
- const { readFileSync } = await import("fs");
1822
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1823
- } else if (opts.body) body = ctx.parseBody(opts.body);
1883
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1884
+ else if (opts.body) body = ctx.parseBody(opts.body);
1824
1885
  if (ctx.verbose) process.stderr.write(`PATCH /api/users/v2025-06/notes/${id}
1825
1886
  `);
1826
1887
  const result = await client.patch(`/api/users/v2025-06/notes/${id}`, body);
1827
1888
  ctx.output(result);
1828
- });
1889
+ }), (opts) => opts.bodyFile ? [{
1890
+ kind: "file",
1891
+ path: String(opts.bodyFile)
1892
+ }] : []);
1829
1893
  }
1830
1894
  //#endregion
1831
1895
  //#region src/generated/users-playlists.ts
1832
1896
  function registerUsersPlaylists(parent, ctx) {
1833
1897
  const resource = parent.command("users-playlists").description("Users Playlists");
1834
- resource.command("create-user-playlist").description("Create a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1898
+ declareInputs(resource.command("create-user-playlist").description("Create a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1835
1899
  const client = await ctx.getClient();
1836
1900
  let body;
1837
- if (opts.bodyFile) {
1838
- const { readFileSync } = await import("fs");
1839
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1840
- } else if (opts.body) body = ctx.parseBody(opts.body);
1901
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1902
+ else if (opts.body) body = ctx.parseBody(opts.body);
1841
1903
  if (ctx.verbose) process.stderr.write("POST /api/users/v2025-06/playlists\n");
1842
1904
  const result = await client.post(`/api/users/v2025-06/playlists`, body);
1843
1905
  ctx.output(result);
1844
- });
1845
- resource.command("list-user-playlists").description("List user's playlists").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--filter-status <value>", "Filter playlists by status").option("--filter-title <value>", "Filter playlists by title").option("--sort <value>", "Sort playlists").action(async (opts) => {
1906
+ }), (opts) => opts.bodyFile ? [{
1907
+ kind: "file",
1908
+ path: String(opts.bodyFile)
1909
+ }] : []);
1910
+ declareInputs(resource.command("list-user-playlists").description("List user's playlists").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--filter-status <value>", "Filter playlists by status").option("--filter-title <value>", "Filter playlists by title").option("--sort <value>", "Sort playlists").action(async (opts) => {
1846
1911
  const client = await ctx.getClient();
1847
1912
  const params = {};
1848
1913
  if (opts.pageCursor !== void 0) params["page[cursor]"] = opts.pageCursor;
@@ -1853,33 +1918,34 @@ function registerUsersPlaylists(parent, ctx) {
1853
1918
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/playlists\n");
1854
1919
  const result = await client.get(`/api/users/v2025-06/playlists`, params);
1855
1920
  ctx.output(result);
1856
- });
1857
- resource.command("delete-user-playlist <id>").description("Delete a playlist").action(async (id) => {
1921
+ }), () => []);
1922
+ declareInputs(resource.command("delete-user-playlist <id>").description("Delete a playlist").action(async (id) => {
1858
1923
  const client = await ctx.getClient();
1859
1924
  if (ctx.verbose) process.stderr.write(`DELETE /api/users/v2025-06/playlists/${id}
1860
1925
  `);
1861
1926
  const result = await client.delete(`/api/users/v2025-06/playlists/${id}`);
1862
1927
  ctx.output(result);
1863
- });
1864
- resource.command("get-user-playlist <id>").description("Get a playlist").action(async (id) => {
1928
+ }), () => []);
1929
+ declareInputs(resource.command("get-user-playlist <id>").description("Get a playlist").action(async (id) => {
1865
1930
  const client = await ctx.getClient();
1866
1931
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/playlists/${id}
1867
1932
  `);
1868
1933
  const result = await client.get(`/api/users/v2025-06/playlists/${id}`);
1869
1934
  ctx.output(result);
1870
- });
1871
- resource.command("update-user-playlist <id>").description("Update a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1935
+ }), () => []);
1936
+ declareInputs(resource.command("update-user-playlist <id>").description("Update a playlist").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1872
1937
  const client = await ctx.getClient();
1873
1938
  let body;
1874
- if (opts.bodyFile) {
1875
- const { readFileSync } = await import("fs");
1876
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1877
- } else if (opts.body) body = ctx.parseBody(opts.body);
1939
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
1940
+ else if (opts.body) body = ctx.parseBody(opts.body);
1878
1941
  if (ctx.verbose) process.stderr.write(`PATCH /api/users/v2025-06/playlists/${id}
1879
1942
  `);
1880
1943
  const result = await client.patch(`/api/users/v2025-06/playlists/${id}`, body);
1881
1944
  ctx.output(result);
1882
- });
1945
+ }), (opts) => opts.bodyFile ? [{
1946
+ kind: "file",
1947
+ path: String(opts.bodyFile)
1948
+ }] : []);
1883
1949
  }
1884
1950
  //#endregion
1885
1951
  //#region src/generated/users-products.ts
@@ -1904,7 +1970,7 @@ function parseArrayOption(value) {
1904
1970
  }
1905
1971
  function registerUsersProducts(parent, ctx) {
1906
1972
  const resource = parent.command("users-products").description("Users Products");
1907
- resource.command("list-user-products").description("List products").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter by status. Supported values: 'active', 'draft', 'archived'. (comma-separated)").option("--availability <value>", "Filter by availability. Supported values: 'All', 'in_stock'. If not specified, returns all products. (comma-separated)").option("--search-query <value>", "Search products by title or variant SKU").option("--category-ids <value>", "Filter by category IDs (comma-separated)").option("--collection-ids <value>", "Filter by collection IDs (comma-separated)").option("--country-code <value>", "Filter by country codes (comma-separated)").option("--bundle <value>", "Filter by bundle status. true returns only bundles, false returns only non-bundles.").option("--order-by <value>", "Sort results by specified field and direction (e.g. ['price', 'asc']) (comma-separated)").action(async (opts) => {
1973
+ declareInputs(resource.command("list-user-products").description("List products").option("--page <value>", "Page number for pagination").option("--per-page <value>", "Number of records per page").option("--status <value>", "Filter by status. Supported values: 'active', 'draft', 'archived'. (comma-separated)").option("--availability <value>", "Filter by availability. Supported values: 'All', 'in_stock'. If not specified, returns all products. (comma-separated)").option("--search-query <value>", "Search products by title or variant SKU").option("--category-ids <value>", "Filter by category IDs (comma-separated)").option("--collection-ids <value>", "Filter by collection IDs (comma-separated)").option("--country-code <value>", "Filter by country codes (comma-separated)").option("--bundle <value>", "Filter by bundle status. true returns only bundles, false returns only non-bundles.").option("--order-by <value>", "Sort results by specified field and direction (e.g. ['price', 'asc']) (comma-separated)").action(async (opts) => {
1908
1974
  const client = await ctx.getClient();
1909
1975
  const params = {};
1910
1976
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1920,38 +1986,39 @@ function registerUsersProducts(parent, ctx) {
1920
1986
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/products\n");
1921
1987
  const result = await client.get(`/api/users/v2025-06/products`, params);
1922
1988
  ctx.output(result);
1923
- });
1924
- resource.command("get-user-product <id>").description("Get a product").action(async (id) => {
1989
+ }), () => []);
1990
+ declareInputs(resource.command("get-user-product <id>").description("Get a product").action(async (id) => {
1925
1991
  const client = await ctx.getClient();
1926
1992
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/products/${id}
1927
1993
  `);
1928
1994
  const result = await client.get(`/api/users/v2025-06/products/${id}`);
1929
1995
  ctx.output(result);
1930
- });
1996
+ }), () => []);
1931
1997
  }
1932
1998
  //#endregion
1933
1999
  //#region src/generated/users-tasks.ts
1934
2000
  function registerUsersTasks(parent, ctx) {
1935
2001
  const resource = parent.command("users-tasks").description("Users Tasks");
1936
- resource.command("complete-user-task <id>").description("Toggle task completion").action(async (id) => {
2002
+ declareInputs(resource.command("complete-user-task <id>").description("Toggle task completion").action(async (id) => {
1937
2003
  const client = await ctx.getClient();
1938
2004
  if (ctx.verbose) process.stderr.write(`POST /api/users/v2025-06/tasks/${id}/complete
1939
2005
  `);
1940
2006
  const result = await client.post(`/api/users/v2025-06/tasks/${id}/complete`);
1941
2007
  ctx.output(result);
1942
- });
1943
- resource.command("create-user-task").description("Create a task").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2008
+ }), () => []);
2009
+ declareInputs(resource.command("create-user-task").description("Create a task").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1944
2010
  const client = await ctx.getClient();
1945
2011
  let body;
1946
- if (opts.bodyFile) {
1947
- const { readFileSync } = await import("fs");
1948
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1949
- } else if (opts.body) body = ctx.parseBody(opts.body);
2012
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2013
+ else if (opts.body) body = ctx.parseBody(opts.body);
1950
2014
  if (ctx.verbose) process.stderr.write("POST /api/users/v2025-06/tasks\n");
1951
2015
  const result = await client.post(`/api/users/v2025-06/tasks`, body);
1952
2016
  ctx.output(result);
1953
- });
1954
- resource.command("list-user-tasks").description("List tasks for the current user").option("--page <value>", "Page number").option("--per-page <value>", "Items per page (max 100)").option("--contact-id <value>", "Filter by contact ID").option("--status <value>", "Filter by status (pending, completed, overdue)").action(async (opts) => {
2017
+ }), (opts) => opts.bodyFile ? [{
2018
+ kind: "file",
2019
+ path: String(opts.bodyFile)
2020
+ }] : []);
2021
+ declareInputs(resource.command("list-user-tasks").description("List tasks for the current user").option("--page <value>", "Page number").option("--per-page <value>", "Items per page (max 100)").option("--contact-id <value>", "Filter by contact ID").option("--status <value>", "Filter by status (pending, completed, overdue)").action(async (opts) => {
1955
2022
  const client = await ctx.getClient();
1956
2023
  const params = {};
1957
2024
  if (opts.page !== void 0) params["page"] = Number(opts.page);
@@ -1961,50 +2028,52 @@ function registerUsersTasks(parent, ctx) {
1961
2028
  if (ctx.verbose) process.stderr.write("GET /api/users/v2025-06/tasks\n");
1962
2029
  const result = await client.get(`/api/users/v2025-06/tasks`, params);
1963
2030
  ctx.output(result);
1964
- });
1965
- resource.command("delete-user-task <id>").description("Delete a task").action(async (id) => {
2031
+ }), () => []);
2032
+ declareInputs(resource.command("delete-user-task <id>").description("Delete a task").action(async (id) => {
1966
2033
  const client = await ctx.getClient();
1967
2034
  if (ctx.verbose) process.stderr.write(`DELETE /api/users/v2025-06/tasks/${id}
1968
2035
  `);
1969
2036
  const result = await client.delete(`/api/users/v2025-06/tasks/${id}`);
1970
2037
  ctx.output(result);
1971
- });
1972
- resource.command("get-user-task <id>").description("Get a task").action(async (id) => {
2038
+ }), () => []);
2039
+ declareInputs(resource.command("get-user-task <id>").description("Get a task").action(async (id) => {
1973
2040
  const client = await ctx.getClient();
1974
2041
  if (ctx.verbose) process.stderr.write(`GET /api/users/v2025-06/tasks/${id}
1975
2042
  `);
1976
2043
  const result = await client.get(`/api/users/v2025-06/tasks/${id}`);
1977
2044
  ctx.output(result);
1978
- });
1979
- resource.command("update-user-task <id>").description("Update a task").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2045
+ }), () => []);
2046
+ declareInputs(resource.command("update-user-task <id>").description("Update a task").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
1980
2047
  const client = await ctx.getClient();
1981
2048
  let body;
1982
- if (opts.bodyFile) {
1983
- const { readFileSync } = await import("fs");
1984
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
1985
- } else if (opts.body) body = ctx.parseBody(opts.body);
2049
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2050
+ else if (opts.body) body = ctx.parseBody(opts.body);
1986
2051
  if (ctx.verbose) process.stderr.write(`PATCH /api/users/v2025-06/tasks/${id}
1987
2052
  `);
1988
2053
  const result = await client.patch(`/api/users/v2025-06/tasks/${id}`, body);
1989
2054
  ctx.output(result);
1990
- });
2055
+ }), (opts) => opts.bodyFile ? [{
2056
+ kind: "file",
2057
+ path: String(opts.bodyFile)
2058
+ }] : []);
1991
2059
  }
1992
2060
  //#endregion
1993
2061
  //#region src/generated/widgets.ts
1994
2062
  function registerWidgets(parent, ctx) {
1995
2063
  const resource = parent.command("widgets").description("Widgets");
1996
- resource.command("create-banner").description("Create a banner widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2064
+ declareInputs(resource.command("create-banner").description("Create a banner widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
1997
2065
  const client = await ctx.getClient();
1998
2066
  let body;
1999
- if (opts.bodyFile) {
2000
- const { readFileSync } = await import("fs");
2001
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2002
- } else if (opts.body) body = ctx.parseBody(opts.body);
2067
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2068
+ else if (opts.body) body = ctx.parseBody(opts.body);
2003
2069
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/widgets/banners\n");
2004
2070
  const result = await client.post(`/api/v2025-06/widgets/banners`, body);
2005
2071
  ctx.output(result);
2006
- });
2007
- resource.command("list-banner").description("List banner widgets").option("--filter-status <value>", "Filter banner widgets by status").option("--filter-placement <value>", "Filter banner widgets by placement").option("--filter-behavior <value>", "Filter banner widgets by behavior").option("--filter-name <value>", "Filter banner widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order").action(async (opts) => {
2072
+ }), (opts) => opts.bodyFile ? [{
2073
+ kind: "file",
2074
+ path: String(opts.bodyFile)
2075
+ }] : []);
2076
+ declareInputs(resource.command("list-banner").description("List banner widgets").option("--filter-status <value>", "Filter banner widgets by status").option("--filter-placement <value>", "Filter banner widgets by placement").option("--filter-behavior <value>", "Filter banner widgets by behavior").option("--filter-name <value>", "Filter banner widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order").action(async (opts) => {
2008
2077
  const client = await ctx.getClient();
2009
2078
  const params = {};
2010
2079
  if (opts.filterStatus !== void 0) params["filter[status]"] = opts.filterStatus;
@@ -2017,45 +2086,47 @@ function registerWidgets(parent, ctx) {
2017
2086
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/widgets/banners\n");
2018
2087
  const result = await client.get(`/api/v2025-06/widgets/banners`, params);
2019
2088
  ctx.output(result);
2020
- });
2021
- resource.command("delete-banner <id>").description("Delete a banner widget").action(async (id) => {
2089
+ }), () => []);
2090
+ declareInputs(resource.command("delete-banner <id>").description("Delete a banner widget").action(async (id) => {
2022
2091
  const client = await ctx.getClient();
2023
2092
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/widgets/banners/${id}
2024
2093
  `);
2025
2094
  const result = await client.delete(`/api/v2025-06/widgets/banners/${id}`);
2026
2095
  ctx.output(result);
2027
- });
2028
- resource.command("get-banner <id>").description("Get a banner widget").action(async (id) => {
2096
+ }), () => []);
2097
+ declareInputs(resource.command("get-banner <id>").description("Get a banner widget").action(async (id) => {
2029
2098
  const client = await ctx.getClient();
2030
2099
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/widgets/banners/${id}
2031
2100
  `);
2032
2101
  const result = await client.get(`/api/v2025-06/widgets/banners/${id}`);
2033
2102
  ctx.output(result);
2034
- });
2035
- resource.command("update-banner <id>").description("Update a banner widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2103
+ }), () => []);
2104
+ declareInputs(resource.command("update-banner <id>").description("Update a banner widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2036
2105
  const client = await ctx.getClient();
2037
2106
  let body;
2038
- if (opts.bodyFile) {
2039
- const { readFileSync } = await import("fs");
2040
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2041
- } else if (opts.body) body = ctx.parseBody(opts.body);
2107
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2108
+ else if (opts.body) body = ctx.parseBody(opts.body);
2042
2109
  if (ctx.verbose) process.stderr.write(`PATCH /api/v2025-06/widgets/banners/${id}
2043
2110
  `);
2044
2111
  const result = await client.patch(`/api/v2025-06/widgets/banners/${id}`, body);
2045
2112
  ctx.output(result);
2046
- });
2047
- resource.command("create-cart").description("Create a cart widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2113
+ }), (opts) => opts.bodyFile ? [{
2114
+ kind: "file",
2115
+ path: String(opts.bodyFile)
2116
+ }] : []);
2117
+ declareInputs(resource.command("create-cart").description("Create a cart widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2048
2118
  const client = await ctx.getClient();
2049
2119
  let body;
2050
- if (opts.bodyFile) {
2051
- const { readFileSync } = await import("fs");
2052
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2053
- } else if (opts.body) body = ctx.parseBody(opts.body);
2120
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2121
+ else if (opts.body) body = ctx.parseBody(opts.body);
2054
2122
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/widgets/carts\n");
2055
2123
  const result = await client.post(`/api/v2025-06/widgets/carts`, body);
2056
2124
  ctx.output(result);
2057
- });
2058
- resource.command("list-cart").description("List cart widgets").option("--filter-status <value>", "Filter cart widgets by status").option("--filter-placement <value>", "Filter cart widgets by placement").option("--filter-name <value>", "Filter cart widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order (prefix with - for descending order)").action(async (opts) => {
2125
+ }), (opts) => opts.bodyFile ? [{
2126
+ kind: "file",
2127
+ path: String(opts.bodyFile)
2128
+ }] : []);
2129
+ declareInputs(resource.command("list-cart").description("List cart widgets").option("--filter-status <value>", "Filter cart widgets by status").option("--filter-placement <value>", "Filter cart widgets by placement").option("--filter-name <value>", "Filter cart widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order (prefix with - for descending order)").action(async (opts) => {
2059
2130
  const client = await ctx.getClient();
2060
2131
  const params = {};
2061
2132
  if (opts.filterStatus !== void 0) params["filter[status]"] = opts.filterStatus;
@@ -2067,45 +2138,47 @@ function registerWidgets(parent, ctx) {
2067
2138
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/widgets/carts\n");
2068
2139
  const result = await client.get(`/api/v2025-06/widgets/carts`, params);
2069
2140
  ctx.output(result);
2070
- });
2071
- resource.command("delete-cart <id>").description("Delete a cart widget").action(async (id) => {
2141
+ }), () => []);
2142
+ declareInputs(resource.command("delete-cart <id>").description("Delete a cart widget").action(async (id) => {
2072
2143
  const client = await ctx.getClient();
2073
2144
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/widgets/carts/${id}
2074
2145
  `);
2075
2146
  const result = await client.delete(`/api/v2025-06/widgets/carts/${id}`);
2076
2147
  ctx.output(result);
2077
- });
2078
- resource.command("get-cart <id>").description("Show a cart widget").action(async (id) => {
2148
+ }), () => []);
2149
+ declareInputs(resource.command("get-cart <id>").description("Show a cart widget").action(async (id) => {
2079
2150
  const client = await ctx.getClient();
2080
2151
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/widgets/carts/${id}
2081
2152
  `);
2082
2153
  const result = await client.get(`/api/v2025-06/widgets/carts/${id}`);
2083
2154
  ctx.output(result);
2084
- });
2085
- resource.command("update-cart <id>").description("Update a cart widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2155
+ }), () => []);
2156
+ declareInputs(resource.command("update-cart <id>").description("Update a cart widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2086
2157
  const client = await ctx.getClient();
2087
2158
  let body;
2088
- if (opts.bodyFile) {
2089
- const { readFileSync } = await import("fs");
2090
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2091
- } else if (opts.body) body = ctx.parseBody(opts.body);
2159
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2160
+ else if (opts.body) body = ctx.parseBody(opts.body);
2092
2161
  if (ctx.verbose) process.stderr.write(`PUT /api/v2025-06/widgets/carts/${id}
2093
2162
  `);
2094
2163
  const result = await client.put(`/api/v2025-06/widgets/carts/${id}`, body);
2095
2164
  ctx.output(result);
2096
- });
2097
- resource.command("create-chat").description("Create a chat widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2165
+ }), (opts) => opts.bodyFile ? [{
2166
+ kind: "file",
2167
+ path: String(opts.bodyFile)
2168
+ }] : []);
2169
+ declareInputs(resource.command("create-chat").description("Create a chat widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2098
2170
  const client = await ctx.getClient();
2099
2171
  let body;
2100
- if (opts.bodyFile) {
2101
- const { readFileSync } = await import("fs");
2102
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2103
- } else if (opts.body) body = ctx.parseBody(opts.body);
2172
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2173
+ else if (opts.body) body = ctx.parseBody(opts.body);
2104
2174
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/widgets/chats\n");
2105
2175
  const result = await client.post(`/api/v2025-06/widgets/chats`, body);
2106
2176
  ctx.output(result);
2107
- });
2108
- resource.command("list-chat").description("List chat widgets").option("--filter-status <value>", "Filter chat widgets by status").option("--filter-name <value>", "Filter chat widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order (prefix with - for descending order)").action(async (opts) => {
2177
+ }), (opts) => opts.bodyFile ? [{
2178
+ kind: "file",
2179
+ path: String(opts.bodyFile)
2180
+ }] : []);
2181
+ declareInputs(resource.command("list-chat").description("List chat widgets").option("--filter-status <value>", "Filter chat widgets by status").option("--filter-name <value>", "Filter chat widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order (prefix with - for descending order)").action(async (opts) => {
2109
2182
  const client = await ctx.getClient();
2110
2183
  const params = {};
2111
2184
  if (opts.filterStatus !== void 0) params["filter[status]"] = opts.filterStatus;
@@ -2116,45 +2189,47 @@ function registerWidgets(parent, ctx) {
2116
2189
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/widgets/chats\n");
2117
2190
  const result = await client.get(`/api/v2025-06/widgets/chats`, params);
2118
2191
  ctx.output(result);
2119
- });
2120
- resource.command("delete-chat <id>").description("Delete a chat widget").action(async (id) => {
2192
+ }), () => []);
2193
+ declareInputs(resource.command("delete-chat <id>").description("Delete a chat widget").action(async (id) => {
2121
2194
  const client = await ctx.getClient();
2122
2195
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/widgets/chats/${id}
2123
2196
  `);
2124
2197
  const result = await client.delete(`/api/v2025-06/widgets/chats/${id}`);
2125
2198
  ctx.output(result);
2126
- });
2127
- resource.command("get-chat <id>").description("Show a chat widget").action(async (id) => {
2199
+ }), () => []);
2200
+ declareInputs(resource.command("get-chat <id>").description("Show a chat widget").action(async (id) => {
2128
2201
  const client = await ctx.getClient();
2129
2202
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/widgets/chats/${id}
2130
2203
  `);
2131
2204
  const result = await client.get(`/api/v2025-06/widgets/chats/${id}`);
2132
2205
  ctx.output(result);
2133
- });
2134
- resource.command("update-chat <id>").description("Update a chat widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2206
+ }), () => []);
2207
+ declareInputs(resource.command("update-chat <id>").description("Update a chat widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2135
2208
  const client = await ctx.getClient();
2136
2209
  let body;
2137
- if (opts.bodyFile) {
2138
- const { readFileSync } = await import("fs");
2139
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2140
- } else if (opts.body) body = ctx.parseBody(opts.body);
2210
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2211
+ else if (opts.body) body = ctx.parseBody(opts.body);
2141
2212
  if (ctx.verbose) process.stderr.write(`PUT /api/v2025-06/widgets/chats/${id}
2142
2213
  `);
2143
2214
  const result = await client.put(`/api/v2025-06/widgets/chats/${id}`, body);
2144
2215
  ctx.output(result);
2145
- });
2146
- resource.command("create-popup").description("Create a popup widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2216
+ }), (opts) => opts.bodyFile ? [{
2217
+ kind: "file",
2218
+ path: String(opts.bodyFile)
2219
+ }] : []);
2220
+ declareInputs(resource.command("create-popup").description("Create a popup widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (opts) => {
2147
2221
  const client = await ctx.getClient();
2148
2222
  let body;
2149
- if (opts.bodyFile) {
2150
- const { readFileSync } = await import("fs");
2151
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2152
- } else if (opts.body) body = ctx.parseBody(opts.body);
2223
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2224
+ else if (opts.body) body = ctx.parseBody(opts.body);
2153
2225
  if (ctx.verbose) process.stderr.write("POST /api/v2025-06/widgets/popups\n");
2154
2226
  const result = await client.post(`/api/v2025-06/widgets/popups`, body);
2155
2227
  ctx.output(result);
2156
- });
2157
- resource.command("list-popup").description("List popup widgets").option("--filter-status <value>", "Filter popup widgets by status").option("--filter-placement <value>", "Filter popup widgets by placement").option("--filter-name <value>", "Filter popup widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order (prefix with - for descending order)").action(async (opts) => {
2228
+ }), (opts) => opts.bodyFile ? [{
2229
+ kind: "file",
2230
+ path: String(opts.bodyFile)
2231
+ }] : []);
2232
+ declareInputs(resource.command("list-popup").description("List popup widgets").option("--filter-status <value>", "Filter popup widgets by status").option("--filter-placement <value>", "Filter popup widgets by placement").option("--filter-name <value>", "Filter popup widgets by name").option("--page-cursor <value>", "Cursor for pagination").option("--page-limit <value>", "Number of records per page").option("--sort <value>", "Sort order (prefix with - for descending order)").action(async (opts) => {
2158
2233
  const client = await ctx.getClient();
2159
2234
  const params = {};
2160
2235
  if (opts.filterStatus !== void 0) params["filter[status]"] = opts.filterStatus;
@@ -2166,52 +2241,53 @@ function registerWidgets(parent, ctx) {
2166
2241
  if (ctx.verbose) process.stderr.write("GET /api/v2025-06/widgets/popups\n");
2167
2242
  const result = await client.get(`/api/v2025-06/widgets/popups`, params);
2168
2243
  ctx.output(result);
2169
- });
2170
- resource.command("delete-popup <id>").description("Delete a popup widget").action(async (id) => {
2244
+ }), () => []);
2245
+ declareInputs(resource.command("delete-popup <id>").description("Delete a popup widget").action(async (id) => {
2171
2246
  const client = await ctx.getClient();
2172
2247
  if (ctx.verbose) process.stderr.write(`DELETE /api/v2025-06/widgets/popups/${id}
2173
2248
  `);
2174
2249
  const result = await client.delete(`/api/v2025-06/widgets/popups/${id}`);
2175
2250
  ctx.output(result);
2176
- });
2177
- resource.command("get-popup <id>").description("Get a popup widget").action(async (id) => {
2251
+ }), () => []);
2252
+ declareInputs(resource.command("get-popup <id>").description("Get a popup widget").action(async (id) => {
2178
2253
  const client = await ctx.getClient();
2179
2254
  if (ctx.verbose) process.stderr.write(`GET /api/v2025-06/widgets/popups/${id}
2180
2255
  `);
2181
2256
  const result = await client.get(`/api/v2025-06/widgets/popups/${id}`);
2182
2257
  ctx.output(result);
2183
- });
2184
- resource.command("update-popup <id>").description("Update a popup widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2258
+ }), () => []);
2259
+ declareInputs(resource.command("update-popup <id>").description("Update a popup widget").option("--body <json>", "Request body as JSON string").option("--body-file <path>", "Read request body from file").action(async (id, opts) => {
2185
2260
  const client = await ctx.getClient();
2186
2261
  let body;
2187
- if (opts.bodyFile) {
2188
- const { readFileSync } = await import("fs");
2189
- body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
2190
- } else if (opts.body) body = ctx.parseBody(opts.body);
2262
+ if (opts.bodyFile) body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
2263
+ else if (opts.body) body = ctx.parseBody(opts.body);
2191
2264
  if (ctx.verbose) process.stderr.write(`PATCH /api/v2025-06/widgets/popups/${id}
2192
2265
  `);
2193
2266
  const result = await client.patch(`/api/v2025-06/widgets/popups/${id}`, body);
2194
2267
  ctx.output(result);
2195
- });
2268
+ }), (opts) => opts.bodyFile ? [{
2269
+ kind: "file",
2270
+ path: String(opts.bodyFile)
2271
+ }] : []);
2196
2272
  }
2197
2273
  //#endregion
2198
2274
  //#region src/generated/default.ts
2199
2275
  function registerDefault(parent, ctx) {
2200
2276
  const resource = parent.command("default").description("default");
2201
- resource.command("get-order-journey-events <order-id>").description("Get order journey events").action(async (orderId) => {
2277
+ declareInputs(resource.command("get-order-journey-events <order-id>").description("Get order journey events").action(async (orderId) => {
2202
2278
  const client = await ctx.getClient();
2203
2279
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/orders/${orderId}/journey/events
2204
2280
  `);
2205
2281
  const result = await client.get(`/api/v202506/orders/${orderId}/journey/events`);
2206
2282
  ctx.output(result);
2207
- });
2208
- resource.command("get-order-journey <order-id>").description("Get an order journey").action(async (orderId) => {
2283
+ }), () => []);
2284
+ declareInputs(resource.command("get-order-journey <order-id>").description("Get an order journey").action(async (orderId) => {
2209
2285
  const client = await ctx.getClient();
2210
2286
  if (ctx.verbose) process.stderr.write(`GET /api/v202506/orders/${orderId}/journey
2211
2287
  `);
2212
2288
  const result = await client.get(`/api/v202506/orders/${orderId}/journey`);
2213
2289
  ctx.output(result);
2214
- });
2290
+ }), () => []);
2215
2291
  }
2216
2292
  //#endregion
2217
2293
  //#region src/generated/index.ts