@tai42/api-client 8.1.0 → 9.1.0

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/src/schemas.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  import { z } from 'zod';
8
8
 
9
9
  /** An arbitrary JSON value (tool results, rendered payloads). */
10
- export const jsonValue: z.ZodType<unknown> = z.unknown();
10
+ export const jsonValue: z.ZodType = z.unknown();
11
11
 
12
12
  /** A JSON Schema object (Pydantic-emitted). Permissive; parsed by the auto-form. */
13
13
  export const jsonSchema = z.record(z.string(), z.unknown());
@@ -488,14 +488,14 @@ export type ConnectorRef = z.infer<typeof connectorRef>;
488
488
  * connector-owned entry back at its connection, and the editor renders such
489
489
  * entries read-only. `.nullish()` because a hand-authored entry carries `null`
490
490
  * (present) or omits the key. Every other field (title, config, extensions) rides
491
- * through `.passthrough()` unmodeled so the config editor keeps editing the whole
491
+ * through `.loose()` unmodeled so the config editor keeps editing the whole
492
492
  * entry — narrowing it to a typed subset would silently strip the fields it saves.
493
493
  */
494
494
  export const manifestMcpEntry = z
495
495
  .object({
496
496
  managed: connectorRef.nullish(),
497
497
  })
498
- .passthrough();
498
+ .loose();
499
499
  export type ManifestMcpEntry = z.infer<typeof manifestMcpEntry>;
500
500
 
501
501
  export const manifestView = z.object({
@@ -761,7 +761,7 @@ export const providerView = z.object({
761
761
  // Required and a real URL: the contract's `ProviderDescriptor.icon_url` runs
762
762
  // `check_web_url(schemes=("https",))`, which rejects an empty/relative value, so
763
763
  // an empty or malformed one here is drift and fails the parse loudly.
764
- icon_url: z.string().url(),
764
+ icon_url: z.url(),
765
765
  kind: z.enum(['oauth', 'none']),
766
766
  origin: z.enum(['system', 'community']),
767
767
  category: z.string(),
@@ -1830,7 +1830,7 @@ export const scheduleItem = z
1830
1830
  args: z.array(jsonValue).optional(),
1831
1831
  kwargs: z.record(z.string(), jsonValue).optional(),
1832
1832
  })
1833
- .passthrough();
1833
+ .loose();
1834
1834
  export const scheduleList = z.array(scheduleItem);
1835
1835
  export type ScheduleItem = z.infer<typeof scheduleItem>;
1836
1836
 
@@ -1840,7 +1840,7 @@ export const serverDateTime = z
1840
1840
  local: jsonValue.optional(),
1841
1841
  system: jsonValue.optional(),
1842
1842
  })
1843
- .passthrough();
1843
+ .loose();
1844
1844
 
1845
1845
  // -- observability -----------------------------------------------------------
1846
1846