@fluid-app/v2025-06-cli-commands 0.1.337 → 0.1.339
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +815 -739
- package/package.json +2 -2
- package/src/generated/company-contacts.ts +13 -15
- package/src/generated/compliance.ts +99 -113
- package/src/generated/customers.ts +19 -23
- package/src/generated/default.ts +5 -5
- package/src/generated/email-settings.ts +6 -7
- package/src/generated/enrollment-pack-media.ts +8 -9
- package/src/generated/fair-share-settings.ts +6 -7
- package/src/generated/lighthouse.ts +99 -113
- package/src/generated/media-enrollment-packs.ts +8 -9
- package/src/generated/media-products.ts +8 -9
- package/src/generated/orders.ts +9 -9
- package/src/generated/partner-tokens.ts +25 -29
- package/src/generated/playlists.ts +24 -29
- package/src/generated/product-media.ts +8 -9
- package/src/generated/reps.ts +29 -33
- package/src/generated/share-statistics.ts +17 -17
- package/src/generated/users-brand-guidelines.ts +3 -3
- package/src/generated/users-contacts.ts +40 -47
- package/src/generated/users-media.ts +13 -15
- package/src/generated/users-notes.ts +13 -15
- package/src/generated/users-playlists.ts +13 -15
- package/src/generated/users-products.ts +5 -5
- package/src/generated/users-tasks.ts +15 -17
- package/src/generated/widgets.ts +49 -57
- package/src/lib/types.ts +2 -1
package/src/generated/reps.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// reps.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import type
|
|
3
|
+
import { declareInputs, type CommandContext } from "../lib/types.js";
|
|
4
4
|
|
|
5
5
|
function parseBooleanOption(value: string, flag: string): boolean {
|
|
6
6
|
const normalized = value.trim().toLowerCase();
|
|
@@ -12,7 +12,7 @@ function parseBooleanOption(value: string, flag: string): boolean {
|
|
|
12
12
|
export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
13
13
|
const resource = parent.command("reps").description("Reps");
|
|
14
14
|
|
|
15
|
-
resource
|
|
15
|
+
declareInputs(resource
|
|
16
16
|
.command("create")
|
|
17
17
|
.description("Create a rep")
|
|
18
18
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -21,17 +21,16 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
21
21
|
const client = await ctx.getClient();
|
|
22
22
|
let body: unknown;
|
|
23
23
|
if (opts.bodyFile) {
|
|
24
|
-
|
|
25
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
24
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
26
25
|
} else if (opts.body) {
|
|
27
26
|
body = ctx.parseBody(opts.body);
|
|
28
27
|
}
|
|
29
28
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v2025-06/reps` + "\n");
|
|
30
29
|
const result = await client.post(`/api/v2025-06/reps`, body);
|
|
31
30
|
ctx.output(result);
|
|
32
|
-
});
|
|
31
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
33
32
|
|
|
34
|
-
resource
|
|
33
|
+
declareInputs(resource
|
|
35
34
|
.command("list")
|
|
36
35
|
.description("List reps")
|
|
37
36
|
.option("--params <value>", "Query parameters for filtering, pagination, and sorting")
|
|
@@ -42,9 +41,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
42
41
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps` + "\n");
|
|
43
42
|
const result = await client.get(`/api/v2025-06/reps`, params);
|
|
44
43
|
ctx.output(result);
|
|
45
|
-
});
|
|
44
|
+
}), () => []);
|
|
46
45
|
|
|
47
|
-
resource
|
|
46
|
+
declareInputs(resource
|
|
48
47
|
.command("get-credited-orders <rep-id>")
|
|
49
48
|
.description("List credited orders for a rep")
|
|
50
49
|
.option("--start-date <value>", "Filter orders from this date (ISO 8601 format)")
|
|
@@ -89,9 +88,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
89
88
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps/${repId}/credited_orders` + "\n");
|
|
90
89
|
const result = await client.get(`/api/v2025-06/reps/${repId}/credited_orders`, params);
|
|
91
90
|
ctx.output(result);
|
|
92
|
-
});
|
|
91
|
+
}), () => []);
|
|
93
92
|
|
|
94
|
-
resource
|
|
93
|
+
declareInputs(resource
|
|
95
94
|
.command("delete <id>")
|
|
96
95
|
.description("Delete a rep")
|
|
97
96
|
.action(async (id) => {
|
|
@@ -99,9 +98,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
99
98
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v2025-06/reps/${id}` + "\n");
|
|
100
99
|
const result = await client.delete(`/api/v2025-06/reps/${id}`);
|
|
101
100
|
ctx.output(result);
|
|
102
|
-
});
|
|
101
|
+
}), () => []);
|
|
103
102
|
|
|
104
|
-
resource
|
|
103
|
+
declareInputs(resource
|
|
105
104
|
.command("get <id>")
|
|
106
105
|
.description("Get a rep")
|
|
107
106
|
.action(async (id) => {
|
|
@@ -109,9 +108,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
109
108
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps/${id}` + "\n");
|
|
110
109
|
const result = await client.get(`/api/v2025-06/reps/${id}`);
|
|
111
110
|
ctx.output(result);
|
|
112
|
-
});
|
|
111
|
+
}), () => []);
|
|
113
112
|
|
|
114
|
-
resource
|
|
113
|
+
declareInputs(resource
|
|
115
114
|
.command("update <id>")
|
|
116
115
|
.description("Update a rep")
|
|
117
116
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -120,17 +119,16 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
120
119
|
const client = await ctx.getClient();
|
|
121
120
|
let body: unknown;
|
|
122
121
|
if (opts.bodyFile) {
|
|
123
|
-
|
|
124
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
122
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
125
123
|
} else if (opts.body) {
|
|
126
124
|
body = ctx.parseBody(opts.body);
|
|
127
125
|
}
|
|
128
126
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/v2025-06/reps/${id}` + "\n");
|
|
129
127
|
const result = await client.patch(`/api/v2025-06/reps/${id}`, body);
|
|
130
128
|
ctx.output(result);
|
|
131
|
-
});
|
|
129
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
132
130
|
|
|
133
|
-
resource
|
|
131
|
+
declareInputs(resource
|
|
134
132
|
.command("get-most-shared <rep-id>")
|
|
135
133
|
.description("Get most shared resources")
|
|
136
134
|
.option("--limit <value>", "Number of resources to return (default: 10)")
|
|
@@ -147,9 +145,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
147
145
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps/${repId}/most_shared` + "\n");
|
|
148
146
|
const result = await client.get(`/api/v2025-06/reps/${repId}/most_shared`, params);
|
|
149
147
|
ctx.output(result);
|
|
150
|
-
});
|
|
148
|
+
}), () => []);
|
|
151
149
|
|
|
152
|
-
resource
|
|
150
|
+
declareInputs(resource
|
|
153
151
|
.command("get-most-viewed <rep-id>")
|
|
154
152
|
.description("Get most viewed resources")
|
|
155
153
|
.option("--limit <value>", "Number of resources to return (default: 10)")
|
|
@@ -166,9 +164,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
166
164
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps/${repId}/most_viewed` + "\n");
|
|
167
165
|
const result = await client.get(`/api/v2025-06/reps/${repId}/most_viewed`, params);
|
|
168
166
|
ctx.output(result);
|
|
169
|
-
});
|
|
167
|
+
}), () => []);
|
|
170
168
|
|
|
171
|
-
resource
|
|
169
|
+
declareInputs(resource
|
|
172
170
|
.command("get-shared-assets <rep-id>")
|
|
173
171
|
.description("List shared assets for a rep")
|
|
174
172
|
.option("--limit <value>", "Maximum number of assets to return (default: 12)")
|
|
@@ -179,9 +177,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
179
177
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps/${repId}/shared_assets` + "\n");
|
|
180
178
|
const result = await client.get(`/api/v2025-06/reps/${repId}/shared_assets`, params);
|
|
181
179
|
ctx.output(result);
|
|
182
|
-
});
|
|
180
|
+
}), () => []);
|
|
183
181
|
|
|
184
|
-
resource
|
|
182
|
+
declareInputs(resource
|
|
185
183
|
.command("get-top-products-sold <rep-id>")
|
|
186
184
|
.description("Get top products sold by rep")
|
|
187
185
|
.option("--limit <value>", "Number of top products to return (1-10, default: 5)")
|
|
@@ -194,9 +192,9 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
194
192
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/reps/${repId}/top_products_sold` + "\n");
|
|
195
193
|
const result = await client.get(`/api/v2025-06/reps/${repId}/top_products_sold`, params);
|
|
196
194
|
ctx.output(result);
|
|
197
|
-
});
|
|
195
|
+
}), () => []);
|
|
198
196
|
|
|
199
|
-
resource
|
|
197
|
+
declareInputs(resource
|
|
200
198
|
.command("create-bulk")
|
|
201
199
|
.description("Create multiple reps")
|
|
202
200
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -205,17 +203,16 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
205
203
|
const client = await ctx.getClient();
|
|
206
204
|
let body: unknown;
|
|
207
205
|
if (opts.bodyFile) {
|
|
208
|
-
|
|
209
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
206
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
210
207
|
} else if (opts.body) {
|
|
211
208
|
body = ctx.parseBody(opts.body);
|
|
212
209
|
}
|
|
213
210
|
if (ctx.verbose) process.stderr.write("POST " + `/api/v2025-06/reps/bulk` + "\n");
|
|
214
211
|
const result = await client.post(`/api/v2025-06/reps/bulk`, body);
|
|
215
212
|
ctx.output(result);
|
|
216
|
-
});
|
|
213
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
217
214
|
|
|
218
|
-
resource
|
|
215
|
+
declareInputs(resource
|
|
219
216
|
.command("delete-bulk")
|
|
220
217
|
.description("Delete multiple reps")
|
|
221
218
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -224,14 +221,13 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
224
221
|
const client = await ctx.getClient();
|
|
225
222
|
let body: unknown;
|
|
226
223
|
if (opts.bodyFile) {
|
|
227
|
-
|
|
228
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
224
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
229
225
|
} else if (opts.body) {
|
|
230
226
|
body = ctx.parseBody(opts.body);
|
|
231
227
|
}
|
|
232
228
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/v2025-06/reps/bulk` + "\n");
|
|
233
229
|
const result = await client.delete(`/api/v2025-06/reps/bulk`, { body });
|
|
234
230
|
ctx.output(result);
|
|
235
|
-
});
|
|
231
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
236
232
|
|
|
237
233
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// share-statistics.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import type
|
|
3
|
+
import { declareInputs, type CommandContext } from "../lib/types.js";
|
|
4
4
|
|
|
5
5
|
export function registerShareStatistics(parent: Command, ctx: CommandContext): void {
|
|
6
6
|
const resource = parent.command("share-statistics").description("Share Statistics");
|
|
7
7
|
|
|
8
|
-
resource
|
|
8
|
+
declareInputs(resource
|
|
9
9
|
.command("get-media-share-stats <id>")
|
|
10
10
|
.description("Get share statistics for media")
|
|
11
11
|
.action(async (id) => {
|
|
@@ -13,9 +13,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
13
13
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/media/${id}/share_stats` + "\n");
|
|
14
14
|
const result = await client.get(`/api/v2025-06/media/${id}/share_stats`);
|
|
15
15
|
ctx.output(result);
|
|
16
|
-
});
|
|
16
|
+
}), () => []);
|
|
17
17
|
|
|
18
|
-
resource
|
|
18
|
+
declareInputs(resource
|
|
19
19
|
.command("get-product-share-stats <id>")
|
|
20
20
|
.description("Get share statistics for product")
|
|
21
21
|
.action(async (id) => {
|
|
@@ -23,9 +23,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
23
23
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/products/${id}/share_stats` + "\n");
|
|
24
24
|
const result = await client.get(`/api/v2025-06/products/${id}/share_stats`);
|
|
25
25
|
ctx.output(result);
|
|
26
|
-
});
|
|
26
|
+
}), () => []);
|
|
27
27
|
|
|
28
|
-
resource
|
|
28
|
+
declareInputs(resource
|
|
29
29
|
.command("get-playlist-share-stats <id>")
|
|
30
30
|
.description("Get share statistics for playlist")
|
|
31
31
|
.action(async (id) => {
|
|
@@ -33,9 +33,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
33
33
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/playlists/${id}/share_stats` + "\n");
|
|
34
34
|
const result = await client.get(`/api/v2025-06/playlists/${id}/share_stats`);
|
|
35
35
|
ctx.output(result);
|
|
36
|
-
});
|
|
36
|
+
}), () => []);
|
|
37
37
|
|
|
38
|
-
resource
|
|
38
|
+
declareInputs(resource
|
|
39
39
|
.command("get-category-share-stats <id>")
|
|
40
40
|
.description("Get share statistics for category")
|
|
41
41
|
.action(async (id) => {
|
|
@@ -43,9 +43,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
43
43
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/categories/${id}/share_stats` + "\n");
|
|
44
44
|
const result = await client.get(`/api/v2025-06/categories/${id}/share_stats`);
|
|
45
45
|
ctx.output(result);
|
|
46
|
-
});
|
|
46
|
+
}), () => []);
|
|
47
47
|
|
|
48
|
-
resource
|
|
48
|
+
declareInputs(resource
|
|
49
49
|
.command("get-collection-share-stats <id>")
|
|
50
50
|
.description("Get share statistics for collection")
|
|
51
51
|
.action(async (id) => {
|
|
@@ -53,9 +53,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
53
53
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/collections/${id}/share_stats` + "\n");
|
|
54
54
|
const result = await client.get(`/api/v2025-06/collections/${id}/share_stats`);
|
|
55
55
|
ctx.output(result);
|
|
56
|
-
});
|
|
56
|
+
}), () => []);
|
|
57
57
|
|
|
58
|
-
resource
|
|
58
|
+
declareInputs(resource
|
|
59
59
|
.command("get-post-share-stats <id>")
|
|
60
60
|
.description("Get share statistics for post")
|
|
61
61
|
.action(async (id) => {
|
|
@@ -63,9 +63,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
63
63
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/posts/${id}/share_stats` + "\n");
|
|
64
64
|
const result = await client.get(`/api/v2025-06/posts/${id}/share_stats`);
|
|
65
65
|
ctx.output(result);
|
|
66
|
-
});
|
|
66
|
+
}), () => []);
|
|
67
67
|
|
|
68
|
-
resource
|
|
68
|
+
declareInputs(resource
|
|
69
69
|
.command("get-page-share-stats <id>")
|
|
70
70
|
.description("Get share statistics for page")
|
|
71
71
|
.action(async (id) => {
|
|
@@ -73,9 +73,9 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
73
73
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/pages/${id}/share_stats` + "\n");
|
|
74
74
|
const result = await client.get(`/api/v2025-06/pages/${id}/share_stats`);
|
|
75
75
|
ctx.output(result);
|
|
76
|
-
});
|
|
76
|
+
}), () => []);
|
|
77
77
|
|
|
78
|
-
resource
|
|
78
|
+
declareInputs(resource
|
|
79
79
|
.command("get-enrollment-pack-share-stats <id>")
|
|
80
80
|
.description("Get share statistics for enrollment pack")
|
|
81
81
|
.action(async (id) => {
|
|
@@ -83,6 +83,6 @@ export function registerShareStatistics(parent: Command, ctx: CommandContext): v
|
|
|
83
83
|
if (ctx.verbose) process.stderr.write("GET " + `/api/v2025-06/enrollment_packs/${id}/share_stats` + "\n");
|
|
84
84
|
const result = await client.get(`/api/v2025-06/enrollment_packs/${id}/share_stats`);
|
|
85
85
|
ctx.output(result);
|
|
86
|
-
});
|
|
86
|
+
}), () => []);
|
|
87
87
|
|
|
88
88
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// users-brand-guidelines.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import type
|
|
3
|
+
import { declareInputs, type CommandContext } from "../lib/types.js";
|
|
4
4
|
|
|
5
5
|
export function registerUsersBrandGuidelines(parent: Command, ctx: CommandContext): void {
|
|
6
6
|
const resource = parent.command("users-brand-guidelines").description("Users Brand Guidelines");
|
|
7
7
|
|
|
8
|
-
resource
|
|
8
|
+
declareInputs(resource
|
|
9
9
|
.command("get-user-brand-guidelines")
|
|
10
10
|
.description("Show brand guidelines")
|
|
11
11
|
.action(async () => {
|
|
@@ -13,6 +13,6 @@ export function registerUsersBrandGuidelines(parent: Command, ctx: CommandContex
|
|
|
13
13
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/brand_guidelines` + "\n");
|
|
14
14
|
const result = await client.get(`/api/users/v2025-06/brand_guidelines`);
|
|
15
15
|
ctx.output(result);
|
|
16
|
-
});
|
|
16
|
+
}), () => []);
|
|
17
17
|
|
|
18
18
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// users-contacts.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import type
|
|
3
|
+
import { declareInputs, type CommandContext } from "../lib/types.js";
|
|
4
4
|
|
|
5
5
|
export function registerUsersContacts(parent: Command, ctx: CommandContext): void {
|
|
6
6
|
const resource = parent.command("users-contacts").description("Users Contacts");
|
|
7
7
|
|
|
8
|
-
resource
|
|
8
|
+
declareInputs(resource
|
|
9
9
|
.command("list-user-contact-activities <id>")
|
|
10
10
|
.description("List activities for a contact")
|
|
11
11
|
.option("--page <value>", "Page number for pagination")
|
|
@@ -16,9 +16,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
16
16
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts/${id}/activities` + "\n");
|
|
17
17
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}/activities`, params);
|
|
18
18
|
ctx.output(result);
|
|
19
|
-
});
|
|
19
|
+
}), () => []);
|
|
20
20
|
|
|
21
|
-
resource
|
|
21
|
+
declareInputs(resource
|
|
22
22
|
.command("bulk-delete-user-contacts")
|
|
23
23
|
.description("Bulk delete contacts")
|
|
24
24
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -27,17 +27,16 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
27
27
|
const client = await ctx.getClient();
|
|
28
28
|
let body: unknown;
|
|
29
29
|
if (opts.bodyFile) {
|
|
30
|
-
|
|
31
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
30
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
32
31
|
} else if (opts.body) {
|
|
33
32
|
body = ctx.parseBody(opts.body);
|
|
34
33
|
}
|
|
35
34
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/users/v2025-06/contacts/bulk_delete` + "\n");
|
|
36
35
|
const result = await client.delete(`/api/users/v2025-06/contacts/bulk_delete`, { body });
|
|
37
36
|
ctx.output(result);
|
|
38
|
-
});
|
|
37
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
39
38
|
|
|
40
|
-
resource
|
|
39
|
+
declareInputs(resource
|
|
41
40
|
.command("bulk-import-user-contacts")
|
|
42
41
|
.description("Bulk import contacts")
|
|
43
42
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -46,17 +45,16 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
46
45
|
const client = await ctx.getClient();
|
|
47
46
|
let body: unknown;
|
|
48
47
|
if (opts.bodyFile) {
|
|
49
|
-
|
|
50
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
48
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
51
49
|
} else if (opts.body) {
|
|
52
50
|
body = ctx.parseBody(opts.body);
|
|
53
51
|
}
|
|
54
52
|
if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/contacts/bulk` + "\n");
|
|
55
53
|
const result = await client.post(`/api/users/v2025-06/contacts/bulk`, body);
|
|
56
54
|
ctx.output(result);
|
|
57
|
-
});
|
|
55
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
58
56
|
|
|
59
|
-
resource
|
|
57
|
+
declareInputs(resource
|
|
60
58
|
.command("create-user-contact")
|
|
61
59
|
.description("Create a contact")
|
|
62
60
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -65,17 +63,16 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
65
63
|
const client = await ctx.getClient();
|
|
66
64
|
let body: unknown;
|
|
67
65
|
if (opts.bodyFile) {
|
|
68
|
-
|
|
69
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
66
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
70
67
|
} else if (opts.body) {
|
|
71
68
|
body = ctx.parseBody(opts.body);
|
|
72
69
|
}
|
|
73
70
|
if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/contacts` + "\n");
|
|
74
71
|
const result = await client.post(`/api/users/v2025-06/contacts`, body);
|
|
75
72
|
ctx.output(result);
|
|
76
|
-
});
|
|
73
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
77
74
|
|
|
78
|
-
resource
|
|
75
|
+
declareInputs(resource
|
|
79
76
|
.command("list-user-contacts")
|
|
80
77
|
.description("List user's contacts")
|
|
81
78
|
.option("--page <value>", "Page number for pagination")
|
|
@@ -94,9 +91,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
94
91
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts` + "\n");
|
|
95
92
|
const result = await client.get(`/api/users/v2025-06/contacts`, params);
|
|
96
93
|
ctx.output(result);
|
|
97
|
-
});
|
|
94
|
+
}), () => []);
|
|
98
95
|
|
|
99
|
-
resource
|
|
96
|
+
declareInputs(resource
|
|
100
97
|
.command("delete-user-contact <id>")
|
|
101
98
|
.description("Delete a contact")
|
|
102
99
|
.action(async (id) => {
|
|
@@ -104,9 +101,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
104
101
|
if (ctx.verbose) process.stderr.write("DELETE " + `/api/users/v2025-06/contacts/${id}` + "\n");
|
|
105
102
|
const result = await client.delete(`/api/users/v2025-06/contacts/${id}`);
|
|
106
103
|
ctx.output(result);
|
|
107
|
-
});
|
|
104
|
+
}), () => []);
|
|
108
105
|
|
|
109
|
-
resource
|
|
106
|
+
declareInputs(resource
|
|
110
107
|
.command("get-user-contact <id>")
|
|
111
108
|
.description("Get a contact")
|
|
112
109
|
.action(async (id) => {
|
|
@@ -114,9 +111,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
114
111
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts/${id}` + "\n");
|
|
115
112
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}`);
|
|
116
113
|
ctx.output(result);
|
|
117
|
-
});
|
|
114
|
+
}), () => []);
|
|
118
115
|
|
|
119
|
-
resource
|
|
116
|
+
declareInputs(resource
|
|
120
117
|
.command("update-user-contact <id>")
|
|
121
118
|
.description("Update a contact")
|
|
122
119
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -125,17 +122,16 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
125
122
|
const client = await ctx.getClient();
|
|
126
123
|
let body: unknown;
|
|
127
124
|
if (opts.bodyFile) {
|
|
128
|
-
|
|
129
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
125
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
130
126
|
} else if (opts.body) {
|
|
131
127
|
body = ctx.parseBody(opts.body);
|
|
132
128
|
}
|
|
133
129
|
if (ctx.verbose) process.stderr.write("PATCH " + `/api/users/v2025-06/contacts/${id}` + "\n");
|
|
134
130
|
const result = await client.patch(`/api/users/v2025-06/contacts/${id}`, body);
|
|
135
131
|
ctx.output(result);
|
|
136
|
-
});
|
|
132
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
137
133
|
|
|
138
|
-
resource
|
|
134
|
+
declareInputs(resource
|
|
139
135
|
.command("create-user-contact-note <id>")
|
|
140
136
|
.description("Create a note for a contact (deprecated)")
|
|
141
137
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -144,17 +140,16 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
144
140
|
const client = await ctx.getClient();
|
|
145
141
|
let body: unknown;
|
|
146
142
|
if (opts.bodyFile) {
|
|
147
|
-
|
|
148
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
143
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
149
144
|
} else if (opts.body) {
|
|
150
145
|
body = ctx.parseBody(opts.body);
|
|
151
146
|
}
|
|
152
147
|
if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/contacts/${id}/notes` + "\n");
|
|
153
148
|
const result = await client.post(`/api/users/v2025-06/contacts/${id}/notes`, body);
|
|
154
149
|
ctx.output(result);
|
|
155
|
-
});
|
|
150
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
156
151
|
|
|
157
|
-
resource
|
|
152
|
+
declareInputs(resource
|
|
158
153
|
.command("list-user-contact-notes <id>")
|
|
159
154
|
.description("List notes for a contact")
|
|
160
155
|
.action(async (id) => {
|
|
@@ -162,9 +157,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
162
157
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts/${id}/notes` + "\n");
|
|
163
158
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}/notes`);
|
|
164
159
|
ctx.output(result);
|
|
165
|
-
});
|
|
160
|
+
}), () => []);
|
|
166
161
|
|
|
167
|
-
resource
|
|
162
|
+
declareInputs(resource
|
|
168
163
|
.command("list-user-contact-orders <id>")
|
|
169
164
|
.description("List orders for a contact")
|
|
170
165
|
.option("--page <value>", "Page number for pagination")
|
|
@@ -179,9 +174,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
179
174
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts/${id}/orders` + "\n");
|
|
180
175
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}/orders`, params);
|
|
181
176
|
ctx.output(result);
|
|
182
|
-
});
|
|
177
|
+
}), () => []);
|
|
183
178
|
|
|
184
|
-
resource
|
|
179
|
+
declareInputs(resource
|
|
185
180
|
.command("mark-user-contact-read <id>")
|
|
186
181
|
.description("Mark contact's activities as read")
|
|
187
182
|
.action(async (id) => {
|
|
@@ -189,9 +184,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
189
184
|
if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/contacts/${id}/read` + "\n");
|
|
190
185
|
const result = await client.post(`/api/users/v2025-06/contacts/${id}/read`);
|
|
191
186
|
ctx.output(result);
|
|
192
|
-
});
|
|
187
|
+
}), () => []);
|
|
193
188
|
|
|
194
|
-
resource
|
|
189
|
+
declareInputs(resource
|
|
195
190
|
.command("list-user-contact-subscription-orders <id>")
|
|
196
191
|
.description("List subscription orders for a contact")
|
|
197
192
|
.option("--page <value>", "Page number for pagination")
|
|
@@ -206,9 +201,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
206
201
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts/${id}/subscription_orders` + "\n");
|
|
207
202
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}/subscription_orders`, params);
|
|
208
203
|
ctx.output(result);
|
|
209
|
-
});
|
|
204
|
+
}), () => []);
|
|
210
205
|
|
|
211
|
-
resource
|
|
206
|
+
declareInputs(resource
|
|
212
207
|
.command("create-user-contact-task <id>")
|
|
213
208
|
.description("Create a task for a contact")
|
|
214
209
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -217,17 +212,16 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
217
212
|
const client = await ctx.getClient();
|
|
218
213
|
let body: unknown;
|
|
219
214
|
if (opts.bodyFile) {
|
|
220
|
-
|
|
221
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
215
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
222
216
|
} else if (opts.body) {
|
|
223
217
|
body = ctx.parseBody(opts.body);
|
|
224
218
|
}
|
|
225
219
|
if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/contacts/${id}/tasks` + "\n");
|
|
226
220
|
const result = await client.post(`/api/users/v2025-06/contacts/${id}/tasks`, body);
|
|
227
221
|
ctx.output(result);
|
|
228
|
-
});
|
|
222
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
229
223
|
|
|
230
|
-
resource
|
|
224
|
+
declareInputs(resource
|
|
231
225
|
.command("list-user-contact-tasks <id>")
|
|
232
226
|
.description("List tasks for a contact")
|
|
233
227
|
.action(async (id) => {
|
|
@@ -235,9 +229,9 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
235
229
|
if (ctx.verbose) process.stderr.write("GET " + `/api/users/v2025-06/contacts/${id}/tasks` + "\n");
|
|
236
230
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}/tasks`);
|
|
237
231
|
ctx.output(result);
|
|
238
|
-
});
|
|
232
|
+
}), () => []);
|
|
239
233
|
|
|
240
|
-
resource
|
|
234
|
+
declareInputs(resource
|
|
241
235
|
.command("toggle-user-contact-note-pin <id> <note-id>")
|
|
242
236
|
.description("Toggle pinned status of a note (deprecated)")
|
|
243
237
|
.option("--body <json>", "Request body as JSON string")
|
|
@@ -246,14 +240,13 @@ export function registerUsersContacts(parent: Command, ctx: CommandContext): voi
|
|
|
246
240
|
const client = await ctx.getClient();
|
|
247
241
|
let body: unknown;
|
|
248
242
|
if (opts.bodyFile) {
|
|
249
|
-
|
|
250
|
-
body = ctx.parseBody(readFileSync(opts.bodyFile, "utf-8"));
|
|
243
|
+
body = ctx.parseBody(ctx.inputs.readFile(opts.bodyFile, "utf-8"));
|
|
251
244
|
} else if (opts.body) {
|
|
252
245
|
body = ctx.parseBody(opts.body);
|
|
253
246
|
}
|
|
254
247
|
if (ctx.verbose) process.stderr.write("POST " + `/api/users/v2025-06/contacts/${id}/notes/${noteId}/toggle_pinned` + "\n");
|
|
255
248
|
const result = await client.post(`/api/users/v2025-06/contacts/${id}/notes/${noteId}/toggle_pinned`, body);
|
|
256
249
|
ctx.output(result);
|
|
257
|
-
});
|
|
250
|
+
}), (opts) => (opts.bodyFile ? [{ kind: "file", path: String(opts.bodyFile) }] : []));
|
|
258
251
|
|
|
259
252
|
}
|