@clickraft/cli 0.8.2 → 0.8.3

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/cli.js CHANGED
@@ -5,11 +5,11 @@ import { readFileSync } from "fs";
5
5
  import { dirname as dirname2, join as join2 } from "path";
6
6
  import { fileURLToPath } from "url";
7
7
 
8
- // src/api/client.ts
9
- import { request as undiciRequest } from "undici";
8
+ // ../sdk/dist/index.js
9
+ import { z } from "zod";
10
10
  import { z as z2 } from "zod";
11
-
12
- // src/auth/redact.ts
11
+ import { z as z3 } from "zod";
12
+ import { z as z4 } from "zod";
13
13
  var TOKEN_FIELD_PATTERN = /"(access_token|refresh_token|device_code|user_code|code_verifier|client_secret)"\s*:\s*"[^"]*"/gi;
14
14
  var BARE_TOKEN_PATTERN = /\bck_(?:live|dev|test)_[A-Za-z0-9_-]+/gi;
15
15
  function redactTokenLikeFields(input) {
@@ -20,6 +20,71 @@ function redactTokenLikeValue(token) {
20
20
  if (token.length <= 12) return "[REDACTED]";
21
21
  return `${token.slice(0, 8)}...[REDACTED]`;
22
22
  }
23
+ var BalanceResponseSchema = z.object({
24
+ totalCredits: z.number(),
25
+ subscriptionCredits: z.number(),
26
+ purchasedCredits: z.number(),
27
+ promotionalCredits: z.number(),
28
+ rateLimit: z.object({
29
+ apiBurstPerMinute: z.number()
30
+ }).strict()
31
+ }).strict();
32
+ var BrandModelSummarySchema = z2.object({
33
+ id: z2.string().uuid(),
34
+ source: z2.enum(["system", "user"]),
35
+ slug: z2.string().nullable(),
36
+ name: z2.string(),
37
+ description: z2.string().nullable(),
38
+ thumbnailUrl: z2.string().nullable(),
39
+ tags: z2.array(z2.string()),
40
+ category: z2.string().nullable(),
41
+ isPremium: z2.boolean().nullable(),
42
+ isFeatured: z2.boolean().nullable(),
43
+ badgeText: z2.string().nullable(),
44
+ usageCount: z2.number().nullable(),
45
+ createdAt: z2.string()
46
+ }).strict();
47
+ var BrandModelsListResponseSchema = z2.object({
48
+ brandModels: z2.array(BrandModelSummarySchema)
49
+ }).strict();
50
+ var ProductImageSummarySchema = z3.object({
51
+ id: z3.string().uuid(),
52
+ url: z3.string(),
53
+ altText: z3.string().nullable(),
54
+ isPrimary: z3.boolean(),
55
+ sortOrder: z3.number().int()
56
+ });
57
+ var ProductSummarySchema = z3.object({
58
+ id: z3.string().uuid(),
59
+ title: z3.string(),
60
+ sourceType: z3.string(),
61
+ syncStatus: z3.enum(["synced", "pending", "stale", "error", "deleted_upstream"]).nullable(),
62
+ vendor: z3.string().nullable(),
63
+ productType: z3.string().nullable(),
64
+ tags: z3.array(z3.string()),
65
+ images: z3.array(ProductImageSummarySchema)
66
+ });
67
+ var ProductsListResponseSchema = z3.object({
68
+ items: z3.array(ProductSummarySchema),
69
+ nextCursor: z3.string().nullable()
70
+ });
71
+ var TokenRowSchema = z4.object({
72
+ id: z4.string().uuid(),
73
+ organizationId: z4.string().uuid(),
74
+ userId: z4.string().uuid(),
75
+ clientId: z4.string().nullable(),
76
+ tokenPrefix: z4.string(),
77
+ name: z4.string().nullable(),
78
+ scopes: z4.array(z4.string()),
79
+ lastUsedAt: z4.string().nullable(),
80
+ expiresAt: z4.string(),
81
+ createdAt: z4.string()
82
+ }).strict();
83
+ var TokensListResponseSchema = z4.array(TokenRowSchema);
84
+
85
+ // src/api/client.ts
86
+ import { request as undiciRequest } from "undici";
87
+ import { z as z6 } from "zod";
23
88
 
24
89
  // src/errors/codes.ts
25
90
  var LOGIN_HINT = "Run `clickraft login` to authenticate.";
@@ -554,15 +619,15 @@ function signalToAbortError(signal) {
554
619
  }
555
620
 
556
621
  // src/api/types.ts
557
- import { z } from "zod";
558
- var ServerSuccessSchema = (payload) => z.object({ data: payload }).strict();
559
- var ServerErrorBodySchema = z.object({
560
- error: z.object({
561
- code: z.string().min(1),
562
- message: z.string(),
563
- correlationId: z.string().optional(),
564
- retryAfter: z.number().int().nonnegative().optional(),
565
- details: z.unknown().optional()
622
+ import { z as z5 } from "zod";
623
+ var ServerSuccessSchema = (payload) => z5.object({ data: payload }).strict();
624
+ var ServerErrorBodySchema = z5.object({
625
+ error: z5.object({
626
+ code: z5.string().min(1),
627
+ message: z5.string(),
628
+ correlationId: z5.string().optional(),
629
+ retryAfter: z5.number().int().nonnegative().optional(),
630
+ details: z5.unknown().optional()
566
631
  }).strict()
567
632
  }).strict();
568
633
 
@@ -744,7 +809,7 @@ function parseSuccessBody(args) {
744
809
  err
745
810
  );
746
811
  }
747
- const envelope = ServerSuccessSchema(args.responseSchema ?? z2.unknown()).safeParse(parsed);
812
+ const envelope = ServerSuccessSchema(args.responseSchema ?? z6.unknown()).safeParse(parsed);
748
813
  if (!envelope.success) {
749
814
  const issues = formatSchemaIssues(envelope.error);
750
815
  throw new ApiError(
@@ -985,9 +1050,6 @@ function buildPayload(args) {
985
1050
  return payload;
986
1051
  }
987
1052
 
988
- // src/commands/balance.ts
989
- import { z as z4 } from "zod";
990
-
991
1053
  // src/auth/credentials.ts
992
1054
  import {
993
1055
  access,
@@ -1030,31 +1092,31 @@ function getCredentialsPath(ctx = {}) {
1030
1092
  }
1031
1093
 
1032
1094
  // src/auth/types.ts
1033
- import { z as z3 } from "zod";
1034
- var DeviceAuthorizationRequestSchema = z3.object({
1035
- client_id: z3.string(),
1036
- scope: z3.string()
1095
+ import { z as z7 } from "zod";
1096
+ var DeviceAuthorizationRequestSchema = z7.object({
1097
+ client_id: z7.string(),
1098
+ scope: z7.string()
1037
1099
  });
1038
- var DeviceAuthorizationResponseSchema = z3.object({
1039
- device_code: z3.string(),
1040
- user_code: z3.string().min(1),
1041
- verification_uri: z3.string().url(),
1042
- verification_uri_complete: z3.string().url().optional(),
1043
- expires_in: z3.number().int().positive(),
1044
- interval: z3.number().int().positive().default(5)
1100
+ var DeviceAuthorizationResponseSchema = z7.object({
1101
+ device_code: z7.string(),
1102
+ user_code: z7.string().min(1),
1103
+ verification_uri: z7.string().url(),
1104
+ verification_uri_complete: z7.string().url().optional(),
1105
+ expires_in: z7.number().int().positive(),
1106
+ interval: z7.number().int().positive().default(5)
1045
1107
  });
1046
- var DeviceTokenPollRequestSchema = z3.object({
1047
- client_id: z3.string(),
1048
- device_code: z3.string(),
1049
- grant_type: z3.literal("urn:ietf:params:oauth:grant-type:device_code")
1108
+ var DeviceTokenPollRequestSchema = z7.object({
1109
+ client_id: z7.string(),
1110
+ device_code: z7.string(),
1111
+ grant_type: z7.literal("urn:ietf:params:oauth:grant-type:device_code")
1050
1112
  });
1051
- var TokenResponseSchema = z3.object({
1052
- access_token: z3.string(),
1053
- token_type: z3.literal("Bearer"),
1054
- expires_in: z3.number().int().positive(),
1055
- scope: z3.string()
1113
+ var TokenResponseSchema = z7.object({
1114
+ access_token: z7.string(),
1115
+ token_type: z7.literal("Bearer"),
1116
+ expires_in: z7.number().int().positive(),
1117
+ scope: z7.string()
1056
1118
  });
1057
- var DeviceTokenPollErrorCodeSchema = z3.enum([
1119
+ var DeviceTokenPollErrorCodeSchema = z7.enum([
1058
1120
  "authorization_pending",
1059
1121
  "slow_down",
1060
1122
  "access_denied",
@@ -1065,27 +1127,27 @@ var DeviceTokenPollErrorCodeSchema = z3.enum([
1065
1127
  "unsupported_grant_type",
1066
1128
  "invalid_scope"
1067
1129
  ]);
1068
- var DeviceTokenPollErrorSchema = z3.object({
1130
+ var DeviceTokenPollErrorSchema = z7.object({
1069
1131
  error: DeviceTokenPollErrorCodeSchema,
1070
- error_description: z3.string().optional()
1132
+ error_description: z7.string().optional()
1071
1133
  });
1072
- var CredentialsProfileSchema = z3.object({
1073
- apiBaseUrl: z3.string().url(),
1074
- accessToken: z3.string(),
1075
- tokenType: z3.literal("Bearer"),
1076
- tokenPrefix: z3.string(),
1077
- organizationId: z3.string().uuid(),
1078
- organizationSlug: z3.string(),
1079
- userId: z3.string().uuid(),
1080
- scopes: z3.array(z3.string()),
1081
- expiresAt: z3.string().datetime(),
1082
- issuedAt: z3.string().datetime(),
1083
- clientId: z3.string()
1134
+ var CredentialsProfileSchema = z7.object({
1135
+ apiBaseUrl: z7.string().url(),
1136
+ accessToken: z7.string(),
1137
+ tokenType: z7.literal("Bearer"),
1138
+ tokenPrefix: z7.string(),
1139
+ organizationId: z7.string().uuid(),
1140
+ organizationSlug: z7.string(),
1141
+ userId: z7.string().uuid(),
1142
+ scopes: z7.array(z7.string()),
1143
+ expiresAt: z7.string().datetime(),
1144
+ issuedAt: z7.string().datetime(),
1145
+ clientId: z7.string()
1084
1146
  }).strict();
1085
- var CredentialsFileSchema = z3.object({
1086
- version: z3.literal(1),
1087
- defaultProfile: z3.string(),
1088
- profiles: z3.record(z3.string(), CredentialsProfileSchema)
1147
+ var CredentialsFileSchema = z7.object({
1148
+ version: z7.literal(1),
1149
+ defaultProfile: z7.string(),
1150
+ profiles: z7.record(z7.string(), CredentialsProfileSchema)
1089
1151
  }).strict();
1090
1152
 
1091
1153
  // src/auth/credentials.ts
@@ -1318,15 +1380,6 @@ function trim(value) {
1318
1380
  }
1319
1381
 
1320
1382
  // src/commands/balance.ts
1321
- var BalanceResponseSchema = z4.object({
1322
- totalCredits: z4.number(),
1323
- subscriptionCredits: z4.number(),
1324
- purchasedCredits: z4.number(),
1325
- promotionalCredits: z4.number(),
1326
- rateLimit: z4.object({
1327
- apiBurstPerMinute: z4.number()
1328
- }).strict()
1329
- }).strict();
1330
1383
  async function getBalance(options) {
1331
1384
  const config = await loadConfig({
1332
1385
  flagProfile: options.profile,
@@ -1352,25 +1405,7 @@ async function getBalance(options) {
1352
1405
  }
1353
1406
 
1354
1407
  // src/commands/brand-model/list.ts
1355
- import { z as z5 } from "zod";
1356
- var BrandModelSummarySchema = z5.object({
1357
- id: z5.string().uuid(),
1358
- source: z5.enum(["system", "user"]),
1359
- slug: z5.string().nullable(),
1360
- name: z5.string(),
1361
- description: z5.string().nullable(),
1362
- thumbnailUrl: z5.string().nullable(),
1363
- tags: z5.array(z5.string()),
1364
- category: z5.string().nullable(),
1365
- isPremium: z5.boolean().nullable(),
1366
- isFeatured: z5.boolean().nullable(),
1367
- badgeText: z5.string().nullable(),
1368
- usageCount: z5.number().nullable(),
1369
- createdAt: z5.string()
1370
- }).strict();
1371
- var BrandModelsListResponseSchema = z5.object({
1372
- brandModels: z5.array(BrandModelSummarySchema)
1373
- }).strict();
1408
+ import "zod";
1374
1409
  async function listBrandModels(options) {
1375
1410
  const config = await loadConfig({
1376
1411
  flagProfile: options.profile,
@@ -1396,35 +1431,35 @@ async function listBrandModels(options) {
1396
1431
  }
1397
1432
 
1398
1433
  // src/schemas/jobs.ts
1399
- import { z as z6 } from "zod";
1400
- var ProductReferenceSchema = z6.object({
1401
- id: z6.string().uuid(),
1402
- imageId: z6.string().uuid().optional()
1434
+ import { z as z9 } from "zod";
1435
+ var ProductReferenceSchema = z9.object({
1436
+ id: z9.string().uuid(),
1437
+ imageId: z9.string().uuid().optional()
1403
1438
  }).strict();
1404
- var GenerateCreateRequestSchema = z6.object({
1405
- modelSlug: z6.string().min(1).max(100),
1406
- input: z6.object({
1407
- prompt: z6.string().max(1e4).optional(),
1408
- referenceImageUrl: z6.string().url().optional(),
1409
- referenceImages: z6.array(z6.string().url()).max(8).optional(),
1410
- aspectRatio: z6.string().regex(/^\d+:\d+$/).optional(),
1411
- resolution: z6.string().regex(/^\d+x\d+$/).optional(),
1412
- durationSeconds: z6.number().int().min(1).max(60).optional(),
1413
- providerParams: z6.record(z6.string(), z6.unknown()).optional()
1439
+ var GenerateCreateRequestSchema = z9.object({
1440
+ modelSlug: z9.string().min(1).max(100),
1441
+ input: z9.object({
1442
+ prompt: z9.string().max(1e4).optional(),
1443
+ referenceImageUrl: z9.string().url().optional(),
1444
+ referenceImages: z9.array(z9.string().url()).max(8).optional(),
1445
+ aspectRatio: z9.string().regex(/^\d+:\d+$/).optional(),
1446
+ resolution: z9.string().regex(/^\d+x\d+$/).optional(),
1447
+ durationSeconds: z9.number().int().min(1).max(60).optional(),
1448
+ providerParams: z9.record(z9.string(), z9.unknown()).optional()
1414
1449
  }).strict(),
1415
- options: z6.object({
1416
- workflowId: z6.string().uuid().optional(),
1417
- nodeId: z6.string().optional()
1450
+ options: z9.object({
1451
+ workflowId: z9.string().uuid().optional(),
1452
+ nodeId: z9.string().optional()
1418
1453
  }).strict().optional(),
1419
- products: z6.array(ProductReferenceSchema).min(1).max(10).optional()
1454
+ products: z9.array(ProductReferenceSchema).min(1).max(10).optional()
1420
1455
  }).strict();
1421
- var GenerateCreateResponseSchema = z6.object({
1422
- jobId: z6.string().uuid(),
1423
- status: z6.enum(["queued", "processing", "completed", "failed"]),
1424
- estimatedSeconds: z6.number().int().nonnegative().nullable(),
1425
- creditsCharged: z6.number().int().nonnegative()
1456
+ var GenerateCreateResponseSchema = z9.object({
1457
+ jobId: z9.string().uuid(),
1458
+ status: z9.enum(["queued", "processing", "completed", "failed"]),
1459
+ estimatedSeconds: z9.number().int().nonnegative().nullable(),
1460
+ creditsCharged: z9.number().int().nonnegative()
1426
1461
  }).strict();
1427
- var GenerationStatusSchema = z6.enum([
1462
+ var GenerationStatusSchema = z9.enum([
1428
1463
  "queued",
1429
1464
  "processing",
1430
1465
  "uploading",
@@ -1440,18 +1475,18 @@ var TERMINAL_STATUSES = /* @__PURE__ */ new Set([
1440
1475
  function isTerminalStatus(status) {
1441
1476
  return TERMINAL_STATUSES.has(status);
1442
1477
  }
1443
- var GenerationResultSchema = z6.object({
1444
- jobId: z6.string().uuid(),
1478
+ var GenerationResultSchema = z9.object({
1479
+ jobId: z9.string().uuid(),
1445
1480
  status: GenerationStatusSchema,
1446
- modelSlug: z6.string(),
1447
- resultUrl: z6.string().url().nullable(),
1448
- thumbnailUrl: z6.string().url().nullable(),
1449
- errorCode: z6.string().nullable(),
1450
- errorMessage: z6.string().nullable(),
1451
- creditsCharged: z6.number().int().nonnegative(),
1452
- creditsRefunded: z6.boolean(),
1453
- startedAt: z6.string().nullable(),
1454
- completedAt: z6.string().nullable()
1481
+ modelSlug: z9.string(),
1482
+ resultUrl: z9.string().url().nullable(),
1483
+ thumbnailUrl: z9.string().url().nullable(),
1484
+ errorCode: z9.string().nullable(),
1485
+ errorMessage: z9.string().nullable(),
1486
+ creditsCharged: z9.number().int().nonnegative(),
1487
+ creditsRefunded: z9.boolean(),
1488
+ startedAt: z9.string().nullable(),
1489
+ completedAt: z9.string().nullable()
1455
1490
  }).strict();
1456
1491
 
1457
1492
  // src/commands/upload.ts
@@ -1461,19 +1496,19 @@ import { basename } from "path";
1461
1496
  import { request as undiciRequest2 } from "undici";
1462
1497
 
1463
1498
  // src/schemas/assets.ts
1464
- import { z as z7 } from "zod";
1499
+ import { z as z10 } from "zod";
1465
1500
  var MAX_UPLOAD_SIZE_BYTES = 15 * 1024 * 1024;
1466
- var UploadRequestSchema = z7.object({
1467
- filename: z7.string().min(1).max(255),
1468
- contentType: z7.string().regex(/^[\w-]+\/[\w+.-]+$/),
1469
- sizeBytes: z7.number().int().positive().max(MAX_UPLOAD_SIZE_BYTES),
1470
- contentHash: z7.string().regex(/^sha256:[0-9a-f]{64}$/)
1501
+ var UploadRequestSchema = z10.object({
1502
+ filename: z10.string().min(1).max(255),
1503
+ contentType: z10.string().regex(/^[\w-]+\/[\w+.-]+$/),
1504
+ sizeBytes: z10.number().int().positive().max(MAX_UPLOAD_SIZE_BYTES),
1505
+ contentHash: z10.string().regex(/^sha256:[0-9a-f]{64}$/)
1471
1506
  }).strict();
1472
- var UploadResponseSchema = z7.object({
1473
- assetId: z7.string().uuid(),
1474
- uploadUrl: z7.string().url(),
1475
- publicUrl: z7.string().url(),
1476
- deduplicated: z7.boolean()
1507
+ var UploadResponseSchema = z10.object({
1508
+ assetId: z10.string().uuid(),
1509
+ uploadUrl: z10.string().url(),
1510
+ publicUrl: z10.string().url(),
1511
+ deduplicated: z10.boolean()
1477
1512
  }).strict();
1478
1513
 
1479
1514
  // src/commands/upload.ts
@@ -2569,48 +2604,48 @@ function formatRevokeFailure(err, token) {
2569
2604
  }
2570
2605
 
2571
2606
  // src/schemas/models.ts
2572
- import { z as z8 } from "zod";
2573
- var ModelSummarySchema = z8.object({
2574
- id: z8.string().uuid(),
2575
- slug: z8.string(),
2576
- displayName: z8.string(),
2577
- description: z8.string().nullable(),
2578
- shortDescription: z8.string().nullable(),
2579
- providerSlug: z8.string(),
2580
- providerName: z8.string(),
2581
- modelType: z8.string(),
2582
- category: z8.string(),
2583
- costTier: z8.string(),
2584
- creditCost: z8.number(),
2585
- pricingStrategy: z8.string(),
2586
- estimatedSeconds: z8.object({
2587
- typical: z8.number(),
2588
- range: z8.array(z8.number())
2607
+ import { z as z11 } from "zod";
2608
+ var ModelSummarySchema = z11.object({
2609
+ id: z11.string().uuid(),
2610
+ slug: z11.string(),
2611
+ displayName: z11.string(),
2612
+ description: z11.string().nullable(),
2613
+ shortDescription: z11.string().nullable(),
2614
+ providerSlug: z11.string(),
2615
+ providerName: z11.string(),
2616
+ modelType: z11.string(),
2617
+ category: z11.string(),
2618
+ costTier: z11.string(),
2619
+ creditCost: z11.number(),
2620
+ pricingStrategy: z11.string(),
2621
+ estimatedSeconds: z11.object({
2622
+ typical: z11.number(),
2623
+ range: z11.array(z11.number())
2589
2624
  }).passthrough().nullable(),
2590
- status: z8.string(),
2591
- modalities: z8.object({
2592
- input: z8.array(z8.string()),
2593
- output: z8.array(z8.string())
2625
+ status: z11.string(),
2626
+ modalities: z11.object({
2627
+ input: z11.array(z11.string()),
2628
+ output: z11.array(z11.string())
2594
2629
  }).passthrough().nullable(),
2595
- bestFor: z8.array(z8.string()),
2596
- badges: z8.array(
2597
- z8.object({
2598
- type: z8.string(),
2599
- label: z8.string(),
2600
- color: z8.string(),
2601
- expires_at: z8.string().nullable().optional()
2630
+ bestFor: z11.array(z11.string()),
2631
+ badges: z11.array(
2632
+ z11.object({
2633
+ type: z11.string(),
2634
+ label: z11.string(),
2635
+ color: z11.string(),
2636
+ expires_at: z11.string().nullable().optional()
2602
2637
  }).strict()
2603
2638
  ),
2604
- isFeatured: z8.boolean(),
2605
- isDefault: z8.boolean(),
2606
- docsUrl: z8.string().nullable(),
2607
- llmContext: z8.string().nullable(),
2608
- constraints: z8.record(z8.string(), z8.unknown()).nullable(),
2609
- modelFamily: z8.string().nullable(),
2610
- isFamilyPrimary: z8.boolean().nullable()
2639
+ isFeatured: z11.boolean(),
2640
+ isDefault: z11.boolean(),
2641
+ docsUrl: z11.string().nullable(),
2642
+ llmContext: z11.string().nullable(),
2643
+ constraints: z11.record(z11.string(), z11.unknown()).nullable(),
2644
+ modelFamily: z11.string().nullable(),
2645
+ isFamilyPrimary: z11.boolean().nullable()
2611
2646
  }).strict();
2612
- var ModelsListResponseSchema = z8.object({
2613
- models: z8.array(ModelSummarySchema)
2647
+ var ModelsListResponseSchema = z11.object({
2648
+ models: z11.array(ModelSummarySchema)
2614
2649
  }).strict();
2615
2650
 
2616
2651
  // src/commands/models/internal.ts
@@ -2647,23 +2682,23 @@ async function listModels(opts) {
2647
2682
  }
2648
2683
 
2649
2684
  // src/schemas/node-types.ts
2650
- import { z as z9 } from "zod";
2651
- var NodeTypeSummarySchema = z9.object({
2652
- type: z9.string(),
2653
- portCount: z9.number()
2685
+ import { z as z12 } from "zod";
2686
+ var NodeTypeSummarySchema = z12.object({
2687
+ type: z12.string(),
2688
+ portCount: z12.number()
2654
2689
  }).strict();
2655
- var NodeTypePortSchema = z9.object({
2656
- handleId: z9.string(),
2657
- direction: z9.enum(["input", "output"]),
2658
- dataType: z9.string()
2690
+ var NodeTypePortSchema = z12.object({
2691
+ handleId: z12.string(),
2692
+ direction: z12.enum(["input", "output"]),
2693
+ dataType: z12.string()
2659
2694
  }).strict();
2660
- var NodeTypeDetailSchema = z9.object({
2661
- type: z9.string(),
2662
- ports: z9.array(NodeTypePortSchema),
2663
- agentWritableFields: z9.array(z9.string())
2695
+ var NodeTypeDetailSchema = z12.object({
2696
+ type: z12.string(),
2697
+ ports: z12.array(NodeTypePortSchema),
2698
+ agentWritableFields: z12.array(z12.string())
2664
2699
  }).strict();
2665
- var NodeTypesListResponseSchema = z9.object({
2666
- nodeTypes: z9.array(NodeTypeSummarySchema)
2700
+ var NodeTypesListResponseSchema = z12.object({
2701
+ nodeTypes: z12.array(NodeTypeSummarySchema)
2667
2702
  }).strict();
2668
2703
 
2669
2704
  // src/commands/nodes/internal.ts
@@ -2705,28 +2740,7 @@ async function listNodes(opts) {
2705
2740
  }
2706
2741
 
2707
2742
  // src/commands/product/list.ts
2708
- import { z as z10 } from "zod";
2709
- var ProductImageSummarySchema = z10.object({
2710
- id: z10.string().uuid(),
2711
- url: z10.string(),
2712
- altText: z10.string().nullable(),
2713
- isPrimary: z10.boolean(),
2714
- sortOrder: z10.number().int()
2715
- });
2716
- var ProductSummarySchema = z10.object({
2717
- id: z10.string().uuid(),
2718
- title: z10.string(),
2719
- sourceType: z10.string(),
2720
- syncStatus: z10.enum(["synced", "pending", "stale", "error", "deleted_upstream"]).nullable(),
2721
- vendor: z10.string().nullable(),
2722
- productType: z10.string().nullable(),
2723
- tags: z10.array(z10.string()),
2724
- images: z10.array(ProductImageSummarySchema)
2725
- });
2726
- var ProductsListResponseSchema = z10.object({
2727
- items: z10.array(ProductSummarySchema),
2728
- nextCursor: z10.string().nullable()
2729
- });
2743
+ import "zod";
2730
2744
  var DEFAULT_LIMIT = 50;
2731
2745
  async function listProducts(options) {
2732
2746
  const config = await loadConfig({
@@ -2856,33 +2870,33 @@ async function buildTemplateClient(opts) {
2856
2870
  }
2857
2871
 
2858
2872
  // src/schemas/templates.ts
2859
- import { z as z11 } from "zod";
2860
- var DeclaredParamSchema = z11.object({
2861
- name: z11.string(),
2862
- type: z11.string(),
2863
- required: z11.boolean(),
2864
- defaultValue: z11.string().nullable().optional(),
2865
- enumValues: z11.array(z11.string()).nullable().optional(),
2866
- description: z11.string().nullable().optional()
2873
+ import { z as z14 } from "zod";
2874
+ var DeclaredParamSchema = z14.object({
2875
+ name: z14.string(),
2876
+ type: z14.string(),
2877
+ required: z14.boolean(),
2878
+ defaultValue: z14.string().nullable().optional(),
2879
+ enumValues: z14.array(z14.string()).nullable().optional(),
2880
+ description: z14.string().nullable().optional()
2867
2881
  }).strict();
2868
- var TemplateSummarySchema = z11.object({
2869
- id: z11.string().uuid(),
2870
- source: z11.enum(["own", "system"]),
2871
- name: z11.string(),
2872
- description: z11.string().nullable(),
2873
- category: z11.string().nullable(),
2874
- thumbnailUrl: z11.string().nullable(),
2875
- tags: z11.array(z11.string()),
2876
- createdAt: z11.string()
2882
+ var TemplateSummarySchema = z14.object({
2883
+ id: z14.string().uuid(),
2884
+ source: z14.enum(["own", "system"]),
2885
+ name: z14.string(),
2886
+ description: z14.string().nullable(),
2887
+ category: z14.string().nullable(),
2888
+ thumbnailUrl: z14.string().nullable(),
2889
+ tags: z14.array(z14.string()),
2890
+ createdAt: z14.string()
2877
2891
  }).strict();
2878
2892
  var TemplateDetailSchema = TemplateSummarySchema.extend({
2879
- declaredParams: z11.array(DeclaredParamSchema),
2880
- timesUsed: z11.number()
2893
+ declaredParams: z14.array(DeclaredParamSchema),
2894
+ timesUsed: z14.number()
2881
2895
  }).strict();
2882
- var TemplatesListResponseSchema = z11.object({
2883
- templates: z11.array(TemplateSummarySchema),
2884
- cursor: z11.string().nullable(),
2885
- hasMore: z11.boolean()
2896
+ var TemplatesListResponseSchema = z14.object({
2897
+ templates: z14.array(TemplateSummarySchema),
2898
+ cursor: z14.string().nullable(),
2899
+ hasMore: z14.boolean()
2886
2900
  }).strict();
2887
2901
 
2888
2902
  // src/commands/template/list.ts
@@ -2932,20 +2946,7 @@ async function getTemplate(opts) {
2932
2946
  }
2933
2947
 
2934
2948
  // src/commands/tokens/list.ts
2935
- import { z as z12 } from "zod";
2936
- var TokenRowSchema = z12.object({
2937
- id: z12.string().uuid(),
2938
- organizationId: z12.string().uuid(),
2939
- userId: z12.string().uuid(),
2940
- clientId: z12.string().nullable(),
2941
- tokenPrefix: z12.string(),
2942
- name: z12.string().nullable(),
2943
- scopes: z12.array(z12.string()),
2944
- lastUsedAt: z12.string().nullable(),
2945
- expiresAt: z12.string(),
2946
- createdAt: z12.string()
2947
- }).strict();
2948
- var TokensListResponseSchema = z12.array(TokenRowSchema);
2949
+ import "zod";
2949
2950
  async function listTokens(options) {
2950
2951
  const config = await loadConfig({
2951
2952
  flagProfile: options.profile,
@@ -2971,51 +2972,51 @@ async function listTokens(options) {
2971
2972
  }
2972
2973
 
2973
2974
  // src/schemas/workflows.ts
2974
- import { z as z13 } from "zod";
2975
- var WorkflowDeclaredParamSchema = z13.object({
2976
- name: z13.string(),
2977
- type: z13.string(),
2978
- required: z13.boolean().optional(),
2979
- defaultValue: z13.unknown().optional(),
2980
- description: z13.unknown().optional()
2975
+ import { z as z16 } from "zod";
2976
+ var WorkflowDeclaredParamSchema = z16.object({
2977
+ name: z16.string(),
2978
+ type: z16.string(),
2979
+ required: z16.boolean().optional(),
2980
+ defaultValue: z16.unknown().optional(),
2981
+ description: z16.unknown().optional()
2981
2982
  }).passthrough();
2982
- var WorkflowSummarySchema = z13.object({
2983
- id: z13.string().uuid(),
2984
- name: z13.string(),
2985
- tags: z13.array(z13.string()),
2986
- declared_params: z13.array(WorkflowDeclaredParamSchema).nullable().default([]),
2987
- canvas_rev: z13.number().int().nonnegative(),
2988
- updated_at: z13.string()
2983
+ var WorkflowSummarySchema = z16.object({
2984
+ id: z16.string().uuid(),
2985
+ name: z16.string(),
2986
+ tags: z16.array(z16.string()),
2987
+ declared_params: z16.array(WorkflowDeclaredParamSchema).nullable().default([]),
2988
+ canvas_rev: z16.number().int().nonnegative(),
2989
+ updated_at: z16.string()
2989
2990
  }).strict();
2990
- var WorkflowsListResponseSchema = z13.object({
2991
- items: z13.array(WorkflowSummarySchema),
2992
- nextCursor: z13.string().nullable()
2991
+ var WorkflowsListResponseSchema = z16.object({
2992
+ items: z16.array(WorkflowSummarySchema),
2993
+ nextCursor: z16.string().nullable()
2993
2994
  }).strict();
2994
- var WorkflowDetailSchema = z13.object({
2995
- id: z13.string().uuid(),
2996
- name: z13.string(),
2997
- description: z13.string().nullable(),
2998
- tags: z13.array(z13.string()),
2999
- declared_params: z13.array(WorkflowDeclaredParamSchema).nullable().default([]),
3000
- canvas_rev: z13.number().int().nonnegative(),
3001
- nodes: z13.array(z13.unknown()),
3002
- edges: z13.array(z13.unknown()),
3003
- created_at: z13.string(),
3004
- updated_at: z13.string()
2995
+ var WorkflowDetailSchema = z16.object({
2996
+ id: z16.string().uuid(),
2997
+ name: z16.string(),
2998
+ description: z16.string().nullable(),
2999
+ tags: z16.array(z16.string()),
3000
+ declared_params: z16.array(WorkflowDeclaredParamSchema).nullable().default([]),
3001
+ canvas_rev: z16.number().int().nonnegative(),
3002
+ nodes: z16.array(z16.unknown()),
3003
+ edges: z16.array(z16.unknown()),
3004
+ created_at: z16.string(),
3005
+ updated_at: z16.string()
3005
3006
  }).strict();
3006
- var WorkflowCreateResponseSchema = z13.object({
3007
- id: z13.string().uuid(),
3008
- name: z13.string(),
3009
- description: z13.string().nullable(),
3010
- tags: z13.array(z13.string()),
3011
- declared_params: z13.array(WorkflowDeclaredParamSchema).nullable().default([]),
3012
- canvas_rev: z13.number().int().nonnegative(),
3013
- created_at: z13.string(),
3014
- updated_at: z13.string()
3007
+ var WorkflowCreateResponseSchema = z16.object({
3008
+ id: z16.string().uuid(),
3009
+ name: z16.string(),
3010
+ description: z16.string().nullable(),
3011
+ tags: z16.array(z16.string()),
3012
+ declared_params: z16.array(WorkflowDeclaredParamSchema).nullable().default([]),
3013
+ canvas_rev: z16.number().int().nonnegative(),
3014
+ created_at: z16.string(),
3015
+ updated_at: z16.string()
3015
3016
  }).strict();
3016
- var WorkflowMutateResponseSchema = z13.object({
3017
- canvas_rev: z13.number().int().nonnegative(),
3018
- applied: z13.number().int().nonnegative(),
3017
+ var WorkflowMutateResponseSchema = z16.object({
3018
+ canvas_rev: z16.number().int().nonnegative(),
3019
+ applied: z16.number().int().nonnegative(),
3019
3020
  workflow: WorkflowDetailSchema
3020
3021
  }).strict();
3021
3022