@ai-sdk/provider-utils
Advanced tools
Comparing version 1.0.15 to 1.0.16
@@ -1,2 +0,2 @@ | ||
import { JSONParseError, TypeValidationError, APICallError } from '@ai-sdk/provider'; | ||
import { JSONValue, JSONParseError, TypeValidationError, APICallError } from '@ai-sdk/provider'; | ||
import { z, ZodSchema } from 'zod'; | ||
@@ -108,7 +108,8 @@ | ||
* @param text - The JSON string to parse. | ||
* @returns {unknown} - The parsed JSON object. | ||
* @returns {JSONValue} - The parsed JSON object. | ||
*/ | ||
declare function parseJSON({ text }: { | ||
declare function parseJSON(options: { | ||
text: string; | ||
}): unknown; | ||
schema?: undefined; | ||
}): JSONValue; | ||
/** | ||
@@ -122,3 +123,3 @@ * Parses a JSON string into a strongly-typed object using the provided schema. | ||
*/ | ||
declare function parseJSON<T>({ text, schema, }: { | ||
declare function parseJSON<T>(options: { | ||
text: string; | ||
@@ -140,5 +141,6 @@ schema: ZodSchema<T> | Validator<T>; | ||
*/ | ||
declare function safeParseJSON({ text }: { | ||
declare function safeParseJSON(options: { | ||
text: string; | ||
}): ParseResult<unknown>; | ||
schema?: undefined; | ||
}): ParseResult<JSONValue>; | ||
/** | ||
@@ -152,3 +154,3 @@ * Safely parses a JSON string into a strongly-typed object, using a provided schema to validate the object. | ||
*/ | ||
declare function safeParseJSON<T>({ text, schema, }: { | ||
declare function safeParseJSON<T>(options: { | ||
text: string; | ||
@@ -155,0 +157,0 @@ schema: ZodSchema<T> | Validator<T>; |
{ | ||
"name": "@ai-sdk/provider-utils", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1297981
13146