From 06fc0f74f7769628f4001b9b739c463cd84e7e6f Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:00:12 -0400 Subject: [PATCH] fix(types): correctly mark type as a required property in requests (#371) --- packages/bedrock-sdk/yarn.lock | 2 +- packages/vertex-sdk/yarn.lock | 2 +- src/resources/messages.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/bedrock-sdk/yarn.lock b/packages/bedrock-sdk/yarn.lock index cea2950a..c20d4931 100644 --- a/packages/bedrock-sdk/yarn.lock +++ b/packages/bedrock-sdk/yarn.lock @@ -16,7 +16,7 @@ "@jridgewell/trace-mapping" "^0.3.9" "@anthropic-ai/sdk@file:../../dist": - version "0.19.1" + version "0.19.2" dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" diff --git a/packages/vertex-sdk/yarn.lock b/packages/vertex-sdk/yarn.lock index 9a58fd30..1e42921b 100644 --- a/packages/vertex-sdk/yarn.lock +++ b/packages/vertex-sdk/yarn.lock @@ -16,7 +16,7 @@ "@jridgewell/trace-mapping" "^0.3.9" "@anthropic-ai/sdk@file:../../dist": - version "0.19.1" + version "0.19.2" dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" diff --git a/src/resources/messages.ts b/src/resources/messages.ts index 50d6f88b..fa594a62 100644 --- a/src/resources/messages.ts +++ b/src/resources/messages.ts @@ -78,7 +78,7 @@ export interface ContentBlockStopEvent { export interface ImageBlockParam { source: ImageBlockParam.Source; - type?: 'image'; + type: 'image'; } export namespace ImageBlockParam { @@ -87,7 +87,7 @@ export namespace ImageBlockParam { media_type: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp'; - type?: 'base64'; + type: 'base64'; } } @@ -260,7 +260,7 @@ export type MessageStreamEvent = export interface TextBlock { text: string; - type?: 'text'; + type: 'text'; } export interface TextDelta {