@fluid-app/v2025-06-cli-commands 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -6
- package/dist/index.mjs +666 -382
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/generated/company-contacts.ts +18 -22
- package/src/generated/compliance.ts +145 -105
- package/src/generated/customers.ts +13 -22
- package/src/generated/default.ts +4 -4
- package/src/generated/email-settings.ts +5 -5
- package/src/generated/enrollment-pack-media.ts +10 -4
- package/src/generated/fair-share-settings.ts +3 -3
- package/src/generated/index.ts +6 -0
- package/src/generated/lighthouse.ts +147 -107
- package/src/generated/media-enrollment-packs.ts +6 -4
- package/src/generated/media-products.ts +4 -4
- package/src/generated/orders.ts +63 -0
- package/src/generated/partner-tokens.ts +16 -24
- package/src/generated/playlists.ts +24 -29
- package/src/generated/product-media.ts +4 -4
- package/src/generated/reps.ts +95 -58
- package/src/generated/share-statistics.ts +16 -16
- package/src/generated/users-brand-guidelines.ts +25 -0
- package/src/generated/users-contacts.ts +84 -29
- package/src/generated/users-media.ts +13 -19
- package/src/generated/users-notes.ts +10 -16
- package/src/generated/users-playlists.ts +12 -16
- package/src/generated/users-products.ts +82 -0
- package/src/generated/users-tasks.ts +16 -19
- package/src/generated/widgets.ts +72 -88
package/src/generated/reps.ts
CHANGED
|
@@ -27,9 +27,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
27
27
|
body = ctx.parseBody(opts.body);
|
|
28
28
|
}
|
|
29
29
|
if (ctx.verbose)
|
|
30
|
-
process.stderr.write(
|
|
31
|
-
`POST ${new URL(`/api/v2025-06/reps`, "https://placeholder").pathname}\n`,
|
|
32
|
-
);
|
|
30
|
+
process.stderr.write("POST " + `/api/v2025-06/reps` + "\n");
|
|
33
31
|
const result = await client.post(`/api/v2025-06/reps`, body);
|
|
34
32
|
ctx.output(result);
|
|
35
33
|
});
|
|
@@ -37,15 +35,16 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
37
35
|
resource
|
|
38
36
|
.command("list")
|
|
39
37
|
.description("List reps")
|
|
40
|
-
.option(
|
|
38
|
+
.option(
|
|
39
|
+
"--params <value>",
|
|
40
|
+
"Query parameters for filtering, pagination, and sorting",
|
|
41
|
+
)
|
|
41
42
|
.action(async (opts) => {
|
|
42
43
|
const client = await ctx.getClient();
|
|
43
44
|
const params: Record<string, unknown> = {};
|
|
44
45
|
if (opts.params !== undefined) params["params"] = opts.params;
|
|
45
46
|
if (ctx.verbose)
|
|
46
|
-
process.stderr.write(
|
|
47
|
-
`GET ${new URL(`/api/v2025-06/reps`, "https://placeholder").pathname}\n`,
|
|
48
|
-
);
|
|
47
|
+
process.stderr.write("GET " + `/api/v2025-06/reps` + "\n");
|
|
49
48
|
const result = await client.get(`/api/v2025-06/reps`, params);
|
|
50
49
|
ctx.output(result);
|
|
51
50
|
});
|
|
@@ -53,24 +52,45 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
53
52
|
resource
|
|
54
53
|
.command("get-credited-orders <rep-id>")
|
|
55
54
|
.description("List credited orders for a rep")
|
|
56
|
-
.option(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.option(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
.option("--
|
|
65
|
-
.option("--
|
|
66
|
-
.option("--
|
|
67
|
-
.option("--
|
|
68
|
-
.option("--
|
|
69
|
-
.option("--
|
|
70
|
-
.option("--
|
|
71
|
-
.option(
|
|
72
|
-
|
|
73
|
-
|
|
55
|
+
.option(
|
|
56
|
+
"--start-date <value>",
|
|
57
|
+
"Filter orders from this date (ISO 8601 format)",
|
|
58
|
+
)
|
|
59
|
+
.option(
|
|
60
|
+
"--end-date <value>",
|
|
61
|
+
"Filter orders until this date (ISO 8601 format)",
|
|
62
|
+
)
|
|
63
|
+
.option("--page <value>", "Page number for pagination")
|
|
64
|
+
.option("--per-page <value>", "Number of records per page")
|
|
65
|
+
.option("--customer-id <value>", "Filter orders by customer ID")
|
|
66
|
+
.option("--user-company-id <value>", "Filter orders by user company ID")
|
|
67
|
+
.option("--unfulfilled <value>", "Filter unfulfilled orders")
|
|
68
|
+
.option("--unpaid <value>", "Filter unpaid orders")
|
|
69
|
+
.option("--search-query <value>", "Search orders by query")
|
|
70
|
+
.option(
|
|
71
|
+
"--within-days <value>",
|
|
72
|
+
"Filter orders within specified number of days",
|
|
73
|
+
)
|
|
74
|
+
.option("--metadata <value>", "Filter orders by metadata (JSON string)")
|
|
75
|
+
.option("--subscription-id <value>", "Filter orders by subscription ID")
|
|
76
|
+
.option(
|
|
77
|
+
"--sorted-by <value>",
|
|
78
|
+
"Sort orders by field and direction (e.g., 'created_at_desc')",
|
|
79
|
+
)
|
|
80
|
+
.option(
|
|
81
|
+
"--status <value>",
|
|
82
|
+
"Filter orders by status or 'all' for all statuses",
|
|
83
|
+
)
|
|
84
|
+
.option("--type <value>", "Filter orders by type")
|
|
85
|
+
.option("--cart-source <value>", "Filter orders by cart source")
|
|
86
|
+
.option(
|
|
87
|
+
"--country-isos <value>",
|
|
88
|
+
"Filter orders by country ISO codes (comma-separated)",
|
|
89
|
+
)
|
|
90
|
+
.option(
|
|
91
|
+
"--force-stats <value>",
|
|
92
|
+
"Force stats calculation even for large datasets (>10,000 records)",
|
|
93
|
+
)
|
|
74
94
|
.action(async (repId, opts) => {
|
|
75
95
|
const client = await ctx.getClient();
|
|
76
96
|
const params: Record<string, unknown> = {};
|
|
@@ -110,7 +130,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
110
130
|
);
|
|
111
131
|
if (ctx.verbose)
|
|
112
132
|
process.stderr.write(
|
|
113
|
-
|
|
133
|
+
"GET " + `/api/v2025-06/reps/${repId}/credited_orders` + "\n",
|
|
114
134
|
);
|
|
115
135
|
const result = await client.get(
|
|
116
136
|
`/api/v2025-06/reps/${repId}/credited_orders`,
|
|
@@ -122,12 +142,10 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
122
142
|
resource
|
|
123
143
|
.command("delete <id>")
|
|
124
144
|
.description("Delete a rep")
|
|
125
|
-
.action(async (id
|
|
145
|
+
.action(async (id) => {
|
|
126
146
|
const client = await ctx.getClient();
|
|
127
147
|
if (ctx.verbose)
|
|
128
|
-
process.stderr.write(
|
|
129
|
-
`DELETE ${new URL(`/api/v2025-06/reps/${id}`, "https://placeholder").pathname}\n`,
|
|
130
|
-
);
|
|
148
|
+
process.stderr.write("DELETE " + `/api/v2025-06/reps/${id}` + "\n");
|
|
131
149
|
const result = await client.delete(`/api/v2025-06/reps/${id}`);
|
|
132
150
|
ctx.output(result);
|
|
133
151
|
});
|
|
@@ -135,12 +153,10 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
135
153
|
resource
|
|
136
154
|
.command("get <id>")
|
|
137
155
|
.description("Get a rep")
|
|
138
|
-
.action(async (id
|
|
156
|
+
.action(async (id) => {
|
|
139
157
|
const client = await ctx.getClient();
|
|
140
158
|
if (ctx.verbose)
|
|
141
|
-
process.stderr.write(
|
|
142
|
-
`GET ${new URL(`/api/v2025-06/reps/${id}`, "https://placeholder").pathname}\n`,
|
|
143
|
-
);
|
|
159
|
+
process.stderr.write("GET " + `/api/v2025-06/reps/${id}` + "\n");
|
|
144
160
|
const result = await client.get(`/api/v2025-06/reps/${id}`);
|
|
145
161
|
ctx.output(result);
|
|
146
162
|
});
|
|
@@ -160,9 +176,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
160
176
|
body = ctx.parseBody(opts.body);
|
|
161
177
|
}
|
|
162
178
|
if (ctx.verbose)
|
|
163
|
-
process.stderr.write(
|
|
164
|
-
`PATCH ${new URL(`/api/v2025-06/reps/${id}`, "https://placeholder").pathname}\n`,
|
|
165
|
-
);
|
|
179
|
+
process.stderr.write("PATCH " + `/api/v2025-06/reps/${id}` + "\n");
|
|
166
180
|
const result = await client.patch(`/api/v2025-06/reps/${id}`, body);
|
|
167
181
|
ctx.output(result);
|
|
168
182
|
});
|
|
@@ -170,10 +184,19 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
170
184
|
resource
|
|
171
185
|
.command("get-most-shared <rep-id>")
|
|
172
186
|
.description("Get most shared resources")
|
|
173
|
-
.option("--limit <value>", "
|
|
174
|
-
.option(
|
|
175
|
-
|
|
176
|
-
|
|
187
|
+
.option("--limit <value>", "Number of resources to return (default: 10)")
|
|
188
|
+
.option(
|
|
189
|
+
"--period <value>",
|
|
190
|
+
"Time period filter: 7d, 30d, 90d, 1y, or all (default: all)",
|
|
191
|
+
)
|
|
192
|
+
.option(
|
|
193
|
+
"--shareable-type <value>",
|
|
194
|
+
"Type of resource to filter: products, media, pages, libraries, enrollment_packs, or promotions",
|
|
195
|
+
)
|
|
196
|
+
.option(
|
|
197
|
+
"--language-iso <value>",
|
|
198
|
+
"Language code for translations (e.g., 'en', 'es', 'de')",
|
|
199
|
+
)
|
|
177
200
|
.action(async (repId, opts) => {
|
|
178
201
|
const client = await ctx.getClient();
|
|
179
202
|
const params: Record<string, unknown> = {};
|
|
@@ -185,7 +208,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
185
208
|
params["language_iso"] = opts.languageIso;
|
|
186
209
|
if (ctx.verbose)
|
|
187
210
|
process.stderr.write(
|
|
188
|
-
|
|
211
|
+
"GET " + `/api/v2025-06/reps/${repId}/most_shared` + "\n",
|
|
189
212
|
);
|
|
190
213
|
const result = await client.get(
|
|
191
214
|
`/api/v2025-06/reps/${repId}/most_shared`,
|
|
@@ -197,10 +220,19 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
197
220
|
resource
|
|
198
221
|
.command("get-most-viewed <rep-id>")
|
|
199
222
|
.description("Get most viewed resources")
|
|
200
|
-
.option("--limit <value>", "
|
|
201
|
-
.option(
|
|
202
|
-
|
|
203
|
-
|
|
223
|
+
.option("--limit <value>", "Number of resources to return (default: 10)")
|
|
224
|
+
.option(
|
|
225
|
+
"--period <value>",
|
|
226
|
+
"Time period filter: 7d, 30d, 90d, 1y, or all (default: all)",
|
|
227
|
+
)
|
|
228
|
+
.option(
|
|
229
|
+
"--shareable-type <value>",
|
|
230
|
+
"Type of resource to filter: products, media, pages, libraries, enrollment_packs, or promotions",
|
|
231
|
+
)
|
|
232
|
+
.option(
|
|
233
|
+
"--language-iso <value>",
|
|
234
|
+
"Language code for translations (e.g., 'en', 'es', 'de')",
|
|
235
|
+
)
|
|
204
236
|
.action(async (repId, opts) => {
|
|
205
237
|
const client = await ctx.getClient();
|
|
206
238
|
const params: Record<string, unknown> = {};
|
|
@@ -212,7 +244,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
212
244
|
params["language_iso"] = opts.languageIso;
|
|
213
245
|
if (ctx.verbose)
|
|
214
246
|
process.stderr.write(
|
|
215
|
-
|
|
247
|
+
"GET " + `/api/v2025-06/reps/${repId}/most_viewed` + "\n",
|
|
216
248
|
);
|
|
217
249
|
const result = await client.get(
|
|
218
250
|
`/api/v2025-06/reps/${repId}/most_viewed`,
|
|
@@ -224,14 +256,17 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
224
256
|
resource
|
|
225
257
|
.command("get-shared-assets <rep-id>")
|
|
226
258
|
.description("List shared assets for a rep")
|
|
227
|
-
.option(
|
|
259
|
+
.option(
|
|
260
|
+
"--limit <value>",
|
|
261
|
+
"Maximum number of assets to return (default: 12)",
|
|
262
|
+
)
|
|
228
263
|
.action(async (repId, opts) => {
|
|
229
264
|
const client = await ctx.getClient();
|
|
230
265
|
const params: Record<string, unknown> = {};
|
|
231
266
|
if (opts.limit !== undefined) params["limit"] = Number(opts.limit);
|
|
232
267
|
if (ctx.verbose)
|
|
233
268
|
process.stderr.write(
|
|
234
|
-
|
|
269
|
+
"GET " + `/api/v2025-06/reps/${repId}/shared_assets` + "\n",
|
|
235
270
|
);
|
|
236
271
|
const result = await client.get(
|
|
237
272
|
`/api/v2025-06/reps/${repId}/shared_assets`,
|
|
@@ -243,8 +278,14 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
243
278
|
resource
|
|
244
279
|
.command("get-top-products-sold <rep-id>")
|
|
245
280
|
.description("Get top products sold by rep")
|
|
246
|
-
.option(
|
|
247
|
-
|
|
281
|
+
.option(
|
|
282
|
+
"--limit <value>",
|
|
283
|
+
"Number of top products to return (1-10, default: 5)",
|
|
284
|
+
)
|
|
285
|
+
.option(
|
|
286
|
+
"--period <value>",
|
|
287
|
+
"Time period filter: 7d, 30d, 90d, 1y, or all (default: all)",
|
|
288
|
+
)
|
|
248
289
|
.action(async (repId, opts) => {
|
|
249
290
|
const client = await ctx.getClient();
|
|
250
291
|
const params: Record<string, unknown> = {};
|
|
@@ -252,7 +293,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
252
293
|
if (opts.period !== undefined) params["period"] = opts.period;
|
|
253
294
|
if (ctx.verbose)
|
|
254
295
|
process.stderr.write(
|
|
255
|
-
|
|
296
|
+
"GET " + `/api/v2025-06/reps/${repId}/top_products_sold` + "\n",
|
|
256
297
|
);
|
|
257
298
|
const result = await client.get(
|
|
258
299
|
`/api/v2025-06/reps/${repId}/top_products_sold`,
|
|
@@ -276,9 +317,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
276
317
|
body = ctx.parseBody(opts.body);
|
|
277
318
|
}
|
|
278
319
|
if (ctx.verbose)
|
|
279
|
-
process.stderr.write(
|
|
280
|
-
`POST ${new URL(`/api/v2025-06/reps/bulk`, "https://placeholder").pathname}\n`,
|
|
281
|
-
);
|
|
320
|
+
process.stderr.write("POST " + `/api/v2025-06/reps/bulk` + "\n");
|
|
282
321
|
const result = await client.post(`/api/v2025-06/reps/bulk`, body);
|
|
283
322
|
ctx.output(result);
|
|
284
323
|
});
|
|
@@ -298,9 +337,7 @@ export function registerReps(parent: Command, ctx: CommandContext): void {
|
|
|
298
337
|
body = ctx.parseBody(opts.body);
|
|
299
338
|
}
|
|
300
339
|
if (ctx.verbose)
|
|
301
|
-
process.stderr.write(
|
|
302
|
-
`DELETE ${new URL(`/api/v2025-06/reps/bulk`, "https://placeholder").pathname}\n`,
|
|
303
|
-
);
|
|
340
|
+
process.stderr.write("DELETE " + `/api/v2025-06/reps/bulk` + "\n");
|
|
304
341
|
const result = await client.delete(`/api/v2025-06/reps/bulk`, { body });
|
|
305
342
|
ctx.output(result);
|
|
306
343
|
});
|
|
@@ -13,11 +13,11 @@ export function registerShareStatistics(
|
|
|
13
13
|
resource
|
|
14
14
|
.command("get-media-share-stats <id>")
|
|
15
15
|
.description("Get share statistics for media")
|
|
16
|
-
.action(async (id
|
|
16
|
+
.action(async (id) => {
|
|
17
17
|
const client = await ctx.getClient();
|
|
18
18
|
if (ctx.verbose)
|
|
19
19
|
process.stderr.write(
|
|
20
|
-
|
|
20
|
+
"GET " + `/api/v2025-06/media/${id}/share_stats` + "\n",
|
|
21
21
|
);
|
|
22
22
|
const result = await client.get(`/api/v2025-06/media/${id}/share_stats`);
|
|
23
23
|
ctx.output(result);
|
|
@@ -26,11 +26,11 @@ export function registerShareStatistics(
|
|
|
26
26
|
resource
|
|
27
27
|
.command("get-product-share-stats <id>")
|
|
28
28
|
.description("Get share statistics for product")
|
|
29
|
-
.action(async (id
|
|
29
|
+
.action(async (id) => {
|
|
30
30
|
const client = await ctx.getClient();
|
|
31
31
|
if (ctx.verbose)
|
|
32
32
|
process.stderr.write(
|
|
33
|
-
|
|
33
|
+
"GET " + `/api/v2025-06/products/${id}/share_stats` + "\n",
|
|
34
34
|
);
|
|
35
35
|
const result = await client.get(
|
|
36
36
|
`/api/v2025-06/products/${id}/share_stats`,
|
|
@@ -41,11 +41,11 @@ export function registerShareStatistics(
|
|
|
41
41
|
resource
|
|
42
42
|
.command("get-playlist-share-stats <id>")
|
|
43
43
|
.description("Get share statistics for playlist")
|
|
44
|
-
.action(async (id
|
|
44
|
+
.action(async (id) => {
|
|
45
45
|
const client = await ctx.getClient();
|
|
46
46
|
if (ctx.verbose)
|
|
47
47
|
process.stderr.write(
|
|
48
|
-
|
|
48
|
+
"GET " + `/api/v2025-06/playlists/${id}/share_stats` + "\n",
|
|
49
49
|
);
|
|
50
50
|
const result = await client.get(
|
|
51
51
|
`/api/v2025-06/playlists/${id}/share_stats`,
|
|
@@ -56,11 +56,11 @@ export function registerShareStatistics(
|
|
|
56
56
|
resource
|
|
57
57
|
.command("get-category-share-stats <id>")
|
|
58
58
|
.description("Get share statistics for category")
|
|
59
|
-
.action(async (id
|
|
59
|
+
.action(async (id) => {
|
|
60
60
|
const client = await ctx.getClient();
|
|
61
61
|
if (ctx.verbose)
|
|
62
62
|
process.stderr.write(
|
|
63
|
-
|
|
63
|
+
"GET " + `/api/v2025-06/categories/${id}/share_stats` + "\n",
|
|
64
64
|
);
|
|
65
65
|
const result = await client.get(
|
|
66
66
|
`/api/v2025-06/categories/${id}/share_stats`,
|
|
@@ -71,11 +71,11 @@ export function registerShareStatistics(
|
|
|
71
71
|
resource
|
|
72
72
|
.command("get-collection-share-stats <id>")
|
|
73
73
|
.description("Get share statistics for collection")
|
|
74
|
-
.action(async (id
|
|
74
|
+
.action(async (id) => {
|
|
75
75
|
const client = await ctx.getClient();
|
|
76
76
|
if (ctx.verbose)
|
|
77
77
|
process.stderr.write(
|
|
78
|
-
|
|
78
|
+
"GET " + `/api/v2025-06/collections/${id}/share_stats` + "\n",
|
|
79
79
|
);
|
|
80
80
|
const result = await client.get(
|
|
81
81
|
`/api/v2025-06/collections/${id}/share_stats`,
|
|
@@ -86,11 +86,11 @@ export function registerShareStatistics(
|
|
|
86
86
|
resource
|
|
87
87
|
.command("get-post-share-stats <id>")
|
|
88
88
|
.description("Get share statistics for post")
|
|
89
|
-
.action(async (id
|
|
89
|
+
.action(async (id) => {
|
|
90
90
|
const client = await ctx.getClient();
|
|
91
91
|
if (ctx.verbose)
|
|
92
92
|
process.stderr.write(
|
|
93
|
-
|
|
93
|
+
"GET " + `/api/v2025-06/posts/${id}/share_stats` + "\n",
|
|
94
94
|
);
|
|
95
95
|
const result = await client.get(`/api/v2025-06/posts/${id}/share_stats`);
|
|
96
96
|
ctx.output(result);
|
|
@@ -99,11 +99,11 @@ export function registerShareStatistics(
|
|
|
99
99
|
resource
|
|
100
100
|
.command("get-page-share-stats <id>")
|
|
101
101
|
.description("Get share statistics for page")
|
|
102
|
-
.action(async (id
|
|
102
|
+
.action(async (id) => {
|
|
103
103
|
const client = await ctx.getClient();
|
|
104
104
|
if (ctx.verbose)
|
|
105
105
|
process.stderr.write(
|
|
106
|
-
|
|
106
|
+
"GET " + `/api/v2025-06/pages/${id}/share_stats` + "\n",
|
|
107
107
|
);
|
|
108
108
|
const result = await client.get(`/api/v2025-06/pages/${id}/share_stats`);
|
|
109
109
|
ctx.output(result);
|
|
@@ -112,11 +112,11 @@ export function registerShareStatistics(
|
|
|
112
112
|
resource
|
|
113
113
|
.command("get-enrollment-pack-share-stats <id>")
|
|
114
114
|
.description("Get share statistics for enrollment pack")
|
|
115
|
-
.action(async (id
|
|
115
|
+
.action(async (id) => {
|
|
116
116
|
const client = await ctx.getClient();
|
|
117
117
|
if (ctx.verbose)
|
|
118
118
|
process.stderr.write(
|
|
119
|
-
|
|
119
|
+
"GET " + `/api/v2025-06/enrollment_packs/${id}/share_stats` + "\n",
|
|
120
120
|
);
|
|
121
121
|
const result = await client.get(
|
|
122
122
|
`/api/v2025-06/enrollment_packs/${id}/share_stats`,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// users-brand-guidelines.ts — AUTO-GENERATED, DO NOT EDIT
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import type { CommandContext } from "../lib/types.js";
|
|
4
|
+
|
|
5
|
+
export function registerUsersBrandGuidelines(
|
|
6
|
+
parent: Command,
|
|
7
|
+
ctx: CommandContext,
|
|
8
|
+
): void {
|
|
9
|
+
const resource = parent
|
|
10
|
+
.command("users-brand-guidelines")
|
|
11
|
+
.description("Users Brand Guidelines");
|
|
12
|
+
|
|
13
|
+
resource
|
|
14
|
+
.command("get-user-brand-guidelines")
|
|
15
|
+
.description("Show brand guidelines")
|
|
16
|
+
.action(async () => {
|
|
17
|
+
const client = await ctx.getClient();
|
|
18
|
+
if (ctx.verbose)
|
|
19
|
+
process.stderr.write(
|
|
20
|
+
"GET " + `/api/users/v2025-06/brand_guidelines` + "\n",
|
|
21
|
+
);
|
|
22
|
+
const result = await client.get(`/api/users/v2025-06/brand_guidelines`);
|
|
23
|
+
ctx.output(result);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -13,14 +13,14 @@ export function registerUsersContacts(
|
|
|
13
13
|
resource
|
|
14
14
|
.command("list-user-contact-activities <id>")
|
|
15
15
|
.description("List activities for a contact")
|
|
16
|
-
.option("--page <value>", "
|
|
16
|
+
.option("--page <value>", "Page number for pagination")
|
|
17
17
|
.action(async (id, opts) => {
|
|
18
18
|
const client = await ctx.getClient();
|
|
19
19
|
const params: Record<string, unknown> = {};
|
|
20
20
|
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
21
21
|
if (ctx.verbose)
|
|
22
22
|
process.stderr.write(
|
|
23
|
-
|
|
23
|
+
"GET " + `/api/users/v2025-06/contacts/${id}/activities` + "\n",
|
|
24
24
|
);
|
|
25
25
|
const result = await client.get(
|
|
26
26
|
`/api/users/v2025-06/contacts/${id}/activities`,
|
|
@@ -45,7 +45,7 @@ export function registerUsersContacts(
|
|
|
45
45
|
}
|
|
46
46
|
if (ctx.verbose)
|
|
47
47
|
process.stderr.write(
|
|
48
|
-
|
|
48
|
+
"DELETE " + `/api/users/v2025-06/contacts/bulk_delete` + "\n",
|
|
49
49
|
);
|
|
50
50
|
const result = await client.delete(
|
|
51
51
|
`/api/users/v2025-06/contacts/bulk_delete`,
|
|
@@ -70,7 +70,7 @@ export function registerUsersContacts(
|
|
|
70
70
|
}
|
|
71
71
|
if (ctx.verbose)
|
|
72
72
|
process.stderr.write(
|
|
73
|
-
|
|
73
|
+
"POST " + `/api/users/v2025-06/contacts/bulk` + "\n",
|
|
74
74
|
);
|
|
75
75
|
const result = await client.post(
|
|
76
76
|
`/api/users/v2025-06/contacts/bulk`,
|
|
@@ -94,9 +94,7 @@ export function registerUsersContacts(
|
|
|
94
94
|
body = ctx.parseBody(opts.body);
|
|
95
95
|
}
|
|
96
96
|
if (ctx.verbose)
|
|
97
|
-
process.stderr.write(
|
|
98
|
-
`POST ${new URL(`/api/users/v2025-06/contacts`, "https://placeholder").pathname}\n`,
|
|
99
|
-
);
|
|
97
|
+
process.stderr.write("POST " + `/api/users/v2025-06/contacts` + "\n");
|
|
100
98
|
const result = await client.post(`/api/users/v2025-06/contacts`, body);
|
|
101
99
|
ctx.output(result);
|
|
102
100
|
});
|
|
@@ -104,11 +102,17 @@ export function registerUsersContacts(
|
|
|
104
102
|
resource
|
|
105
103
|
.command("list-user-contacts")
|
|
106
104
|
.description("List user's contacts")
|
|
107
|
-
.option("--page <value>", "
|
|
108
|
-
.option("--per-page <value>", "
|
|
109
|
-
.option("--status <value>", "status")
|
|
110
|
-
.option(
|
|
111
|
-
|
|
105
|
+
.option("--page <value>", "Page number for pagination")
|
|
106
|
+
.option("--per-page <value>", "Number of records per page")
|
|
107
|
+
.option("--status <value>", "Filter contacts by status")
|
|
108
|
+
.option(
|
|
109
|
+
"--search-query <value>",
|
|
110
|
+
"Search contacts by name, email, or phone",
|
|
111
|
+
)
|
|
112
|
+
.option(
|
|
113
|
+
"--by-metadata <value>",
|
|
114
|
+
"Filter contacts by metadata (JSON string)",
|
|
115
|
+
)
|
|
112
116
|
.action(async (opts) => {
|
|
113
117
|
const client = await ctx.getClient();
|
|
114
118
|
const params: Record<string, unknown> = {};
|
|
@@ -120,9 +124,7 @@ export function registerUsersContacts(
|
|
|
120
124
|
if (opts.byMetadata !== undefined)
|
|
121
125
|
params["by_metadata"] = opts.byMetadata;
|
|
122
126
|
if (ctx.verbose)
|
|
123
|
-
process.stderr.write(
|
|
124
|
-
`GET ${new URL(`/api/users/v2025-06/contacts`, "https://placeholder").pathname}\n`,
|
|
125
|
-
);
|
|
127
|
+
process.stderr.write("GET " + `/api/users/v2025-06/contacts` + "\n");
|
|
126
128
|
const result = await client.get(`/api/users/v2025-06/contacts`, params);
|
|
127
129
|
ctx.output(result);
|
|
128
130
|
});
|
|
@@ -130,11 +132,11 @@ export function registerUsersContacts(
|
|
|
130
132
|
resource
|
|
131
133
|
.command("delete-user-contact <id>")
|
|
132
134
|
.description("Delete a contact")
|
|
133
|
-
.action(async (id
|
|
135
|
+
.action(async (id) => {
|
|
134
136
|
const client = await ctx.getClient();
|
|
135
137
|
if (ctx.verbose)
|
|
136
138
|
process.stderr.write(
|
|
137
|
-
|
|
139
|
+
"DELETE " + `/api/users/v2025-06/contacts/${id}` + "\n",
|
|
138
140
|
);
|
|
139
141
|
const result = await client.delete(`/api/users/v2025-06/contacts/${id}`);
|
|
140
142
|
ctx.output(result);
|
|
@@ -143,11 +145,11 @@ export function registerUsersContacts(
|
|
|
143
145
|
resource
|
|
144
146
|
.command("get-user-contact <id>")
|
|
145
147
|
.description("Get a contact")
|
|
146
|
-
.action(async (id
|
|
148
|
+
.action(async (id) => {
|
|
147
149
|
const client = await ctx.getClient();
|
|
148
150
|
if (ctx.verbose)
|
|
149
151
|
process.stderr.write(
|
|
150
|
-
|
|
152
|
+
"GET " + `/api/users/v2025-06/contacts/${id}` + "\n",
|
|
151
153
|
);
|
|
152
154
|
const result = await client.get(`/api/users/v2025-06/contacts/${id}`);
|
|
153
155
|
ctx.output(result);
|
|
@@ -169,7 +171,7 @@ export function registerUsersContacts(
|
|
|
169
171
|
}
|
|
170
172
|
if (ctx.verbose)
|
|
171
173
|
process.stderr.write(
|
|
172
|
-
|
|
174
|
+
"PATCH " + `/api/users/v2025-06/contacts/${id}` + "\n",
|
|
173
175
|
);
|
|
174
176
|
const result = await client.patch(
|
|
175
177
|
`/api/users/v2025-06/contacts/${id}`,
|
|
@@ -194,7 +196,7 @@ export function registerUsersContacts(
|
|
|
194
196
|
}
|
|
195
197
|
if (ctx.verbose)
|
|
196
198
|
process.stderr.write(
|
|
197
|
-
|
|
199
|
+
"POST " + `/api/users/v2025-06/contacts/${id}/notes` + "\n",
|
|
198
200
|
);
|
|
199
201
|
const result = await client.post(
|
|
200
202
|
`/api/users/v2025-06/contacts/${id}/notes`,
|
|
@@ -206,11 +208,11 @@ export function registerUsersContacts(
|
|
|
206
208
|
resource
|
|
207
209
|
.command("list-user-contact-notes <id>")
|
|
208
210
|
.description("List notes for a contact")
|
|
209
|
-
.action(async (id
|
|
211
|
+
.action(async (id) => {
|
|
210
212
|
const client = await ctx.getClient();
|
|
211
213
|
if (ctx.verbose)
|
|
212
214
|
process.stderr.write(
|
|
213
|
-
|
|
215
|
+
"GET " + `/api/users/v2025-06/contacts/${id}/notes` + "\n",
|
|
214
216
|
);
|
|
215
217
|
const result = await client.get(
|
|
216
218
|
`/api/users/v2025-06/contacts/${id}/notes`,
|
|
@@ -218,14 +220,37 @@ export function registerUsersContacts(
|
|
|
218
220
|
ctx.output(result);
|
|
219
221
|
});
|
|
220
222
|
|
|
223
|
+
resource
|
|
224
|
+
.command("list-user-contact-orders <id>")
|
|
225
|
+
.description("List orders for a contact")
|
|
226
|
+
.option("--page <value>", "Page number for pagination")
|
|
227
|
+
.option("--per-page <value>", "Number of orders per page (max 100)")
|
|
228
|
+
.option("--status <value>", "Filter by order status")
|
|
229
|
+
.action(async (id, opts) => {
|
|
230
|
+
const client = await ctx.getClient();
|
|
231
|
+
const params: Record<string, unknown> = {};
|
|
232
|
+
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
233
|
+
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
234
|
+
if (opts.status !== undefined) params["status"] = opts.status;
|
|
235
|
+
if (ctx.verbose)
|
|
236
|
+
process.stderr.write(
|
|
237
|
+
"GET " + `/api/users/v2025-06/contacts/${id}/orders` + "\n",
|
|
238
|
+
);
|
|
239
|
+
const result = await client.get(
|
|
240
|
+
`/api/users/v2025-06/contacts/${id}/orders`,
|
|
241
|
+
params,
|
|
242
|
+
);
|
|
243
|
+
ctx.output(result);
|
|
244
|
+
});
|
|
245
|
+
|
|
221
246
|
resource
|
|
222
247
|
.command("mark-user-contact-read <id>")
|
|
223
248
|
.description("Mark contact's activities as read")
|
|
224
|
-
.action(async (id
|
|
249
|
+
.action(async (id) => {
|
|
225
250
|
const client = await ctx.getClient();
|
|
226
251
|
if (ctx.verbose)
|
|
227
252
|
process.stderr.write(
|
|
228
|
-
|
|
253
|
+
"POST " + `/api/users/v2025-06/contacts/${id}/read` + "\n",
|
|
229
254
|
);
|
|
230
255
|
const result = await client.post(
|
|
231
256
|
`/api/users/v2025-06/contacts/${id}/read`,
|
|
@@ -233,6 +258,34 @@ export function registerUsersContacts(
|
|
|
233
258
|
ctx.output(result);
|
|
234
259
|
});
|
|
235
260
|
|
|
261
|
+
resource
|
|
262
|
+
.command("list-user-contact-subscription-orders <id>")
|
|
263
|
+
.description("List subscription orders for a contact")
|
|
264
|
+
.option("--page <value>", "Page number for pagination")
|
|
265
|
+
.option(
|
|
266
|
+
"--per-page <value>",
|
|
267
|
+
"Number of subscription orders per page (max 100)",
|
|
268
|
+
)
|
|
269
|
+
.option("--status <value>", "Filter by subscription order status")
|
|
270
|
+
.action(async (id, opts) => {
|
|
271
|
+
const client = await ctx.getClient();
|
|
272
|
+
const params: Record<string, unknown> = {};
|
|
273
|
+
if (opts.page !== undefined) params["page"] = Number(opts.page);
|
|
274
|
+
if (opts.perPage !== undefined) params["per_page"] = Number(opts.perPage);
|
|
275
|
+
if (opts.status !== undefined) params["status"] = opts.status;
|
|
276
|
+
if (ctx.verbose)
|
|
277
|
+
process.stderr.write(
|
|
278
|
+
"GET " +
|
|
279
|
+
`/api/users/v2025-06/contacts/${id}/subscription_orders` +
|
|
280
|
+
"\n",
|
|
281
|
+
);
|
|
282
|
+
const result = await client.get(
|
|
283
|
+
`/api/users/v2025-06/contacts/${id}/subscription_orders`,
|
|
284
|
+
params,
|
|
285
|
+
);
|
|
286
|
+
ctx.output(result);
|
|
287
|
+
});
|
|
288
|
+
|
|
236
289
|
resource
|
|
237
290
|
.command("create-user-contact-task <id>")
|
|
238
291
|
.description("Create a task for a contact")
|
|
@@ -249,7 +302,7 @@ export function registerUsersContacts(
|
|
|
249
302
|
}
|
|
250
303
|
if (ctx.verbose)
|
|
251
304
|
process.stderr.write(
|
|
252
|
-
|
|
305
|
+
"POST " + `/api/users/v2025-06/contacts/${id}/tasks` + "\n",
|
|
253
306
|
);
|
|
254
307
|
const result = await client.post(
|
|
255
308
|
`/api/users/v2025-06/contacts/${id}/tasks`,
|
|
@@ -261,11 +314,11 @@ export function registerUsersContacts(
|
|
|
261
314
|
resource
|
|
262
315
|
.command("list-user-contact-tasks <id>")
|
|
263
316
|
.description("List tasks for a contact")
|
|
264
|
-
.action(async (id
|
|
317
|
+
.action(async (id) => {
|
|
265
318
|
const client = await ctx.getClient();
|
|
266
319
|
if (ctx.verbose)
|
|
267
320
|
process.stderr.write(
|
|
268
|
-
|
|
321
|
+
"GET " + `/api/users/v2025-06/contacts/${id}/tasks` + "\n",
|
|
269
322
|
);
|
|
270
323
|
const result = await client.get(
|
|
271
324
|
`/api/users/v2025-06/contacts/${id}/tasks`,
|
|
@@ -289,7 +342,9 @@ export function registerUsersContacts(
|
|
|
289
342
|
}
|
|
290
343
|
if (ctx.verbose)
|
|
291
344
|
process.stderr.write(
|
|
292
|
-
|
|
345
|
+
"POST " +
|
|
346
|
+
`/api/users/v2025-06/contacts/${id}/notes/${noteId}/toggle_pinned` +
|
|
347
|
+
"\n",
|
|
293
348
|
);
|
|
294
349
|
const result = await client.post(
|
|
295
350
|
`/api/users/v2025-06/contacts/${id}/notes/${noteId}/toggle_pinned`,
|