@clickraft/cli 0.1.1 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,8 +1,9 @@
1
- ## [0.1.1](https://github.com/clickraft/cli/compare/v0.1.0...v0.1.1) (2026-05-22)
1
+ ## [0.1.3](https://github.com/clickraft/cli/compare/v0.1.2...v0.1.3) (2026-05-23)
2
2
 
3
3
  ### Bug Fixes
4
4
 
5
- * **auth:** allow mixed-case user_code in OAuth device flow ([#6](https://github.com/clickraft/cli/issues/6)) ([7e94403](https://github.com/clickraft/cli/commit/7e94403d66b598db6966fd2fd24f326e386cbcd3))
5
+ * **cli:** remove double-prefix in generate/jobs/upload commands ([43c1058](https://github.com/clickraft/cli/commit/43c1058c71f3992a81b60bfa53c9171f9530f423))
6
+ * **schemas:** accept postgres-style timestamps in jobs schema ([d8a05ea](https://github.com/clickraft/cli/commit/d8a05ea8560646fd6813a11db1a5fd5c4ea4b4c4)), closes [#7](https://github.com/clickraft/cli/issues/7)
6
7
 
7
8
  # Changelog
8
9
 
package/dist/cli.js CHANGED
@@ -864,8 +864,8 @@ var GenerationResultSchema = z3.object({
864
864
  errorMessage: z3.string().nullable(),
865
865
  creditsCharged: z3.number().int().nonnegative(),
866
866
  creditsRefunded: z3.boolean(),
867
- startedAt: z3.string().datetime().nullable(),
868
- completedAt: z3.string().datetime().nullable()
867
+ startedAt: z3.string().nullable(),
868
+ completedAt: z3.string().nullable()
869
869
  }).strict();
870
870
 
871
871
  // src/commands/upload.ts
@@ -1276,7 +1276,7 @@ async function buildClient(opts) {
1276
1276
  async function postAssetMetadata(args) {
1277
1277
  return args.client.request({
1278
1278
  method: "POST",
1279
- path: "/api/agents/v1/assets",
1279
+ path: "/assets",
1280
1280
  body: {
1281
1281
  filename: args.filename,
1282
1282
  contentType: args.contentType,
@@ -1500,7 +1500,7 @@ async function generateGet(opts) {
1500
1500
  const client = opts.client ?? await buildGenerateClient(opts);
1501
1501
  return client.request({
1502
1502
  method: "GET",
1503
- path: `/api/agents/v1/jobs/${encodeURIComponent(opts.jobId)}`,
1503
+ path: `/jobs/${encodeURIComponent(opts.jobId)}`,
1504
1504
  query: opts.waitSeconds && opts.waitSeconds > 0 ? { wait: opts.waitSeconds } : void 0,
1505
1505
  responseSchema: GenerationResultSchema,
1506
1506
  signal: opts.signal
@@ -1545,7 +1545,7 @@ async function generateCreate(opts) {
1545
1545
  const body = buildRequestBody({ ...opts, referenceImages });
1546
1546
  const created = await client.request({
1547
1547
  method: "POST",
1548
- path: "/api/agents/v1/jobs",
1548
+ path: "/jobs",
1549
1549
  body,
1550
1550
  responseSchema: GenerateCreateResponseSchema,
1551
1551
  signal: opts.signal
@@ -2148,16 +2148,19 @@ function inspectTelemetry(options = {}) {
2148
2148
  // src/commands/tokens/list.ts
2149
2149
  import { z as z6 } from "zod";
2150
2150
  var TokenRowSchema = z6.object({
2151
- id: z6.string(),
2152
- prefix: z6.string(),
2151
+ id: z6.string().uuid(),
2152
+ organizationId: z6.string().uuid(),
2153
+ userId: z6.string().uuid(),
2154
+ clientId: z6.string(),
2155
+ tokenPrefix: z6.string(),
2153
2156
  name: z6.string().nullable(),
2154
2157
  scopes: z6.array(z6.string()),
2155
- last_used_at: z6.string().nullable(),
2156
- expires_at: z6.string(),
2157
- created_at: z6.string()
2158
+ lastUsedAt: z6.string().nullable(),
2159
+ expiresAt: z6.string(),
2160
+ createdAt: z6.string()
2158
2161
  }).strict();
2159
2162
  var TokensListResponseSchema = z6.object({
2160
- items: z6.array(TokenRowSchema)
2163
+ tokens: z6.array(TokenRowSchema)
2161
2164
  }).strict();
2162
2165
  async function listTokens(options) {
2163
2166
  const config = await loadConfig({
@@ -2175,7 +2178,7 @@ async function listTokens(options) {
2175
2178
  responseSchema: TokensListResponseSchema,
2176
2179
  signal: options.signal
2177
2180
  });
2178
- return data.items;
2181
+ return data.tokens;
2179
2182
  }
2180
2183
 
2181
2184
  // src/errors/format.ts
@@ -2479,11 +2482,11 @@ function renderTokensList(rows, out) {
2479
2482
  }
2480
2483
  const headers = ["PREFIX", "NAME", "SCOPES", "LAST USED", "EXPIRES"];
2481
2484
  const data = rows.map((row) => [
2482
- row.prefix,
2485
+ row.tokenPrefix,
2483
2486
  row.name ?? "\u2014",
2484
2487
  row.scopes.join(",") || "\u2014",
2485
- row.last_used_at ?? "never",
2486
- row.expires_at
2488
+ row.lastUsedAt ?? "never",
2489
+ row.expiresAt
2487
2490
  ]);
2488
2491
  const widths = headers.map(
2489
2492
  (header, i) => Math.max(header.length, ...data.map((cells) => cells[i].length))